How do I assign a Variable name to a table Variable?
Afficher commentaires plus anciens
I want to assign a name that is a variable to a table variable.
tablename = strcat(a,'_',b,'_',c,'_Amplitudeanalysistable')
% the output for this is : 'scan1396_defect16_54deg_Amplitudeanalysistable'
% a , b and c are input variables
tablename = table(index2,Amplitudepoollocus,Amplitudepool)
% i want to use the name 'scan1396_defect16_54deg_Amplitudeanalysistable' for this table variable.
% i also tried strcat(a,'_',b,'_',c,'_Amplitudeanalysistable') = table(index2,Amplitudepoollocus,Amplitudepool)
which gives
" You cannot subscript a table using linear
indexing (one subscript) or
multidimensional indexing (three or more
subscripts). Use a row subscript and a
variable subscript."
1 commentaire
Peter Perkins
le 13 Oct 2017
In addition to what Walter points out, I'm guess the error you've shown is cause by either 1) a variable in your workspace named "table", which is a bad idea, or 2) you haven't shown us the real code you executed
Réponses (1)
Catégories
En savoir plus sur Tables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!