Azzera filtri
Azzera filtri

Renaming variables from the parameter list to "_1".

1 visualizzazione (ultimi 30 giorni)
Input list: ParameterList = {A, B, C,...}; % picks up all the parameters from the dataset
Output ParameterList_New = {A_1, B_1, C_1,...)
If we can remove the old list, ParameterList, that would be great.
-Ferdinand
  4 Commenti
Ferd
Ferd il 30 Gen 2017
Hi Walter,
Yes, ParameterList is a cell array of strings. Input list: ParameterList = {A, B, C,...}; % picks up all the parameters names from the dataset Output ParameterList_New = {A_1, B_1, C_1,...} % (corrected the bracket)
Hi Stephen, This is more of a post-processing. Need to rename the old list with the new name.
-Ferdinand
John D'Errico
John D'Errico il 30 Gen 2017
No. The point is, you only THINK you need to do that, because you have not learned how to use variables and arrays. You still want to program in Excel, or some language like that. As Stephen said, you don't really need to do it, and it is a bad thing in general.

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 30 Gen 2017
ParameterList = strcat(ParameterList, '_1');

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by