How to save Char from Structure into Array MATLAB
조회 수: 3 (최근 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에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!