I have a two dimensional mat file. i want to extract each row into seperate mat files ?
2 views (last 30 days)
Show older comments
Commented: Wasna Madushanka Ediri Arachchi on 9 Dec 2017
I have a two dimensional mat file. i want to extract each row into seperate mat files and name it accordingly. Can you pls make available a code?
It can be done...but why you want to do that? You have everything already in a single mat ile.
A = rand(10) ;
n = size(A,1) ;
for i = 1:n
filename = strcat('row',num2str(i),'.mat') ;
Ar = A(i,:) ;
More Answers (1)
Edited: Wasna Madushanka Ediri Arachchi on 8 Dec 2017
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!