Load an array instead of a struct with fields

34 ビュー (過去 30 日間)
Jacob Anderson
Jacob Anderson 2022 年 8 月 7 日
編集済み: Bruno Luong 2022 年 8 月 7 日
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!?

採用された回答

Bruno Luong
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 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by