I had previously asked this: http://www.mathworks.com/matlabcentral/answers/19875-calling-variables-instead-of-values And marked as answered, but I have a little hiccup.
I have this:
A=6; B=7; C=5; x = [7 5 6]
I want to call x1 as:
x1 = B C A
Previous answered:
x = [2 3 1] xc = {'A' 'B' 'C'} x1 = xc(x)
This line of code only works for values that are within the number of columns of the matrix.
Best Answer