Error in Assignin with strings
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi Matlab users,
I have to create an cell array: cases = {'mean' 'min' 'max' 'std' 'm3' 'm4' 'm6' 'm8' 'm10' 'm25'} - This is an user input and user will enter : 'mean' 'min' 'max' 'std' 'm3' 'm4' 'm6' 'm8' 'm10' 'm25' , and I would like to use assignin to read it into the workspace. But when I read it into the workspace using strread, i am getting error like this- "Second input must be a filename or string to parse".
assignin('base','cases',strread(get(handles.cases_tag,'string')),'%s','delimiter',' ')
can anyone help how to create an cell array with the user input.
0 commentaires
Réponses (1)
Walter Roberson
le 28 Avr 2012
assignin('base', 'cases', strread(get(handles.cases_tag,'string'), '%s', 'delimiter', ' '))
That is, you had a ) in the wrong place.
0 commentaires
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!