How to save Char from Structure into Array MATLAB
17 ビュー (過去 30 日間)
古いコメントを表示
Hello, I hope you are doing well. I have the following Dataset which is basically in Structure form.
I want to save the ClassName array of two rows and one column using for loop
I have tried the following code But the codes does not work. Can any body help me with that
load ('Dataset.mat')
for i =1:length(Dataset)
ClassificationResult=Dataset(i).ClassName
OverallResult(i)=ClassificationResult;
end
0 件のコメント
回答 (1 件)
Stephen23
2023 年 4 月 5 日
S = load('Dataset.mat');
D = S.Dataset
T = string({D.ClassName})
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!