0
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 21-11-16, 5:21 p.m. Farhan
0

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')

10-01-17, 4:05 p.m. G_John


Log-in to answer to this question.