Renaming variables from the parameter list to "_1".

1 view (last 30 days)
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 Comments
Ferd
Ferd on 30 Jan 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 on 30 Jan 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.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 30 Jan 2017
ParameterList = strcat(ParameterList, '_1');

More Answers (0)

Community Treasure Hunt

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

Start Hunting!