Load an array instead of a struct with fields
36 次查看(过去 30 天)
显示 更早的评论
I'm having an annoying problem where I create an array and save it to a .mat file, but when I load it, it is now converted to a "struct with fields" format which I then cannot seam to be able to access the values of. Why does it convert it? How do I get it to just plain leave it as an array!?
0 个评论
采纳的回答
Bruno Luong
2022-8-7
编辑:Bruno Luong
2022-8-7
Do this when loading,
Container = load('Saving.mat');
Saving = Container.Saving;
Check out doc of save ans struct so you won't be stuck for basic data manipulation syntax.
"Why does it convert it?"
Because you tell MATLAB doing so with your command
Saving = load('Saving.mat');
0 个评论
更多回答(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!