How do I assign a Variable name to a table Variable?
Ältere Kommentare anzeigen
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 Kommentar
Peter Perkins
am 13 Okt. 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
Antworten (1)
Kategorien
Mehr zu Tables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!