combining/concatenation mat files
Show older comments
Hi,
i have 4 mat files in the array format(these files are outputs from a simulink model). the variables are the same in all 4 files. time is one of them.
the time sequence in all the 4 files is different (file A is from 1-250 sec, file B is from 251-500 sec.....file D from 750-1000 sec)
I want to merge these files so as to form a new file with time from 1-1000 sec
Any idea how to do it???
[i looked at other solutions on this forum & it didn't work. in my case although i have 250x3 array (time voltage and current), the variable is defined as 'sample1' i.e one variable name for 3 values]
Accepted Answer
More Answers (4)
cr28
on 6 Sep 2012
0 votes
2 Comments
Azzi Abdelmalek
on 6 Sep 2012
Edited: Azzi Abdelmalek
on 6 Sep 2012
there is no 16 colums, it still 3 because I'am using a vertical concatenation. check the variable new_var
cr28
on 6 Sep 2012
Will Johnson
on 20 May 2017
Edited: Will Johnson
on 20 May 2017
0 votes
Nota: En este caso la variable en los archivos es: VarA
1- Asignamos nuestros ".mat" a una variable
c1=load('file_1.mat')
c2=load('file_2.mat')
c3=load('file_3.mat')
2- Para concatenar se hace de la siguiente manera:
ctotal=[c1.VarA ; c2.VarA ; c3.VarA]
DIPAK KUMAR CHAUBEY
on 31 May 2018
0 votes
how to merge two mat files having 35 x 4 cell and 35 x 701 double into one mat file??
DIPAK KUMAR CHAUBEY
on 31 May 2018
0 votes
how to merge two mat files having 35 x 4 cell and 35 x 701 double into one mat file??
Categories
Find more on Text Files in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!