I want to create a vector in matlab that gets 5 values, from the variable 'tot'.
In my program I have a 'tot' variable that gets 1/2
tot=1/2;
I want the vector named 'xi' in the first position to get the value of 'tot'
In the second position 'xi' receives tot + value from the first position of 'xi'
In the third position 'xi' receives tot + value of the second position of 'xi'
I want to do this for the 5 vector positions, only dynamically, without having to assign the five vector values one by one.
FOLLOW THE CODE THAT IS NOT RIGHT:
tot=1/2;
xi=(tot:tot)// a partir daqui não sei mais fazer
disp(xi)