11/19/2020 0 Comments Matlab Save Mat File Example
Properties expand aIl Unless otherwise indicatéd, properties are nontunabIe, which means yóu cannot change théir.
![]() ![]() Please see óur Privacy Policy tó learn more abóut cookies and hów to change yóur settings. So for, exampIe, with the fiIes Im attaching, éach of them cóntains a 20x2 double array and I want to merge them together to make one MAT file with 60x2 double array. Also, this batch of files is generated per each experiment i do and for each experiment the total number of MAT files may vary and the amount of elements in array in each MAT file also may vary (but there will be always 2 columns). So the answer to your question is it is not difficult, but it is fiddly. I started modifying the code but i messed something up big time. ![]() Matlab Save Mat File Example Download From FEXD path to the folder where the files are saved S dir(fullfile(D, TestLog.mat )); N natsortfiles(S.name); download from FEX. C cell(2,numel(N)); for k 1:numel(N) T load(fullfile(D,Nk)); C1,k T.Excite; C2,k T.Response; end M vertcat(C:); save( TestLog.mat, M ). Here is some code that reads your new sample files, and follows the requirements that you gave in your earlier comment: D path to the folder where the files are saved; S dir(fullfile(D, TestLog.mat ));,X natsortfiles(S.name); download from FEX.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |