Save and load in same file
1 view (last 30 days)
Show older comments
Could please help me , i have several m1.mat,m2.mat,......mn.mat ; i add new row for m1.mat then save if by typing save m1 or save Workspace , then i repeat these steps for m2 , but when i return back to use m1 , i found it has old values before changing .
0 Comments
Accepted Answer
Walter Roberson
on 25 Dec 2017
ds = load('m1.mat');
ds.m1(end+1,:)=newdata;
save('m1.mat','ds','-struct')
3 Comments
More Answers (0)
See Also
Categories
Find more on Structures 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!