create different vector using for loop
8 views (last 30 days)
I have three users named A1, A2 and A3 and each user has three appliances like A11 represent the A1's 1st appliance and A12, A13 similarly A21, A22, A23, and A31, A32, A33. I have the following matrix A11=[1 1 1 1 2]; A12=[1 2 2 2 2]; ......so on. so how can i use for loop for excessing these vectors and if these data in excel then how can we excess?
Jan on 1 Aug 2017
Don't do this. The question is asked several times each week, and the answer is always the same. Do not hide an index in the name of a variable. Use an index instead.
Please read the linkls posted by Stephen and see also https://www.mathworks.com/help/matlab/matlab_prog/techniques-for-improving-performance.html:
Avoid functions such as eval, evalc, evalin, and feval(fname). Use the function
handle input to feval whenever possible. Indirectly evaluating a MATLAB expression
from text is computationally expensive.