how to extract the string from the struct array
조회 수: 11 (최근 30일)
이전 댓글 표시
PSM.name
ans =
'CLOUD13_PSM4_Total_cutoffs_corr_20181001.mat'
ans =
'CLOUD13_PSM4_Total_cutoffs_corr_20181002.mat'
ans =
'CLOUD13_PSM4_Total_cutoffs_corr_20181003.mat'
ans =
'CLOUD13_PSM4_Total_cutoffs_corr_20181004.mat'
I hope I can get the name from the PSM.name one by one by using number,but I already try the PSM.name(1,1);PSM.name{1,1}, neither of them works.
댓글 수: 0
답변 (1개)
Jos (10584)
2018년 10월 5일
I think you have a so-called struct array. Try:
PSM(1).name
댓글 수: 1
Stephen23
2018년 10월 5일
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!