Save and load in same file
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2017-12-25
ds = load('m1.mat');
ds.m1(end+1,:)=newdata;
save('m1.mat','ds','-struct')
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!