

Combining two text files to one in Scilab
I'd written two text file using csvWrite. Now i want these two files to combine to one text file to use in a software. Please help me with a code
Scilab


Suppose I created these 2 files and I want to combine them. (rand command creates a random matrix of the given dimension)
A=rand(10,10)
B=rand(10,5)
write_csv(A,'1.txt')
write_csv(B,'2.txt')
Now I have to load both these files by read_csv and operate on it to join the matrix as follows
C=read_csv("1.txt")
D=read_csv("2.txt")
In our case, since we have same number of rows in both the matrix we can join them by row as follows,
E=[C,D]
You can export the E matrix as csv file like as follows:
write_csv(A,'3.txt')
Login to add comment