how to develope loop to save the 'n' elements from the vectors
2 views (last 30 days)
A= [14,51,2,15,........,7 ] % this is known
%%% i need to use p1,p2,p3,...pn in another equation. so i dont know to to save this elements from A. how to use loop to that it automatically get saved for n elements
Awais Saeed on 15 Sep 2021
Although it is not prefered to name variables in a loop but if you striclty want to do this in loops than you can use eval(). Note that using this method is NOT RECOMMENDED. It has been said many times in this forum and by MATLAB itself.
for col = 1:1:size(A,2)