I need to do the same matrix calculations repeatedly but i want to rename the variable within the loop.
Change variable name in matlab for loop.
For instance if there needs to be a scaling of all the data in name you would have to hard code name 1 2 name 2 2 etc.
Change variable name in a loop.
I m trying do make a for loop in whicht the variable name changes for every loop.
Learn more about for loop naming variables.
You could write a for loop to do it and without.
On top of that is the circa 104 bytes of meta data that every matlab array has.
With eval you use matlab commands to generate the string that will perform the operation you intend.
I need matrices r 1 r 2 r 3 r 4.
Now if you still really want to create variables with dynamically generated names you need to use eval.
Learn more about name variavle eval.
But the problem is that i dont get the variable vpn1 to which i can save more information.
Can you please help me to solve that.
Change variable name in a loop.
Using cells also give the ability to have different sizes of dataset.