how to extract the string from the struct array

11 visualizzazioni (ultimi 30 giorni)
Shen Jiali
Shen Jiali il 5 Ott 2018
Commentato: Stephen23 il 5 Ott 2018
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.

Risposte (1)

Jos (10584)
Jos (10584) il 5 Ott 2018
I think you have a so-called struct array. Try:
PSM(1).name

Categorie

Scopri di più su Structures in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by