problem to save structura in .mat file
3 ビュー (過去 30 日間)
古いコメントを表示
a.w=1;
a.r="ff";
a.v=3;
a.s="a.tst";
save(a.s,'-struct','a')
a=load("a.tst","-mat");
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1407089/image.png)
i see 1X1 struct and not as original
3 件のコメント
Stephen23
2023 年 6 月 9 日
"i see 1X1 struct and not as original"
The original is also a 1x1 struct. They look exactly the same to me:
a.w = 1;
a.r = "ff";
a.v = 3;
a.s = "a.tst"
save(a.s,'-struct','a')
clearvars
b = load("a.tst","-mat")
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT-Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!