structure indices in one line
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I would like to extract values from a structure. I know how to do it in two lines of code, but is it possible in one?
temp = urlAuthsMap.values;
temp{1}
My solution would have been something like [urlAuthsMap.values]{1} but that doesn't work.
>> temp = urlAuthsMap.values
Columns 1 through 11
{1x4 cell} {1x1 cell} {1x3 cell} ...
>> temp{1}
ans =
'S. A. Abraham' 'H. A. Bodner' 'C. G. Harrington' 'R. C. White Jr.'
0 commentaires
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 1 Oct 2012
Modifié(e) : Image Analyst
le 1 Oct 2012
urlAuthsMap.values = {'S. A. Abraham', 'H. A. Bodner', 'C. G. Harrington', 'R. C. White Jr.'}
% Here's how to do it.
caName1 = urlAuthsMap.values(1) % This is a cell.
strName1 = urlAuthsMap.values{1} % This is a string.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!