- #1
mathsgeek
- 63
- 0
URGENT variable name MATLAB help
How do i change the variable, so it saves all the values, even if it must happen for 6 different variables name. This is because when i run it, it only saves the values for v_max when n=10 as this is the last iteration. How can i make all the values be saved. My coding is below:
radius=1:0.5:2.5;
total_flow_velocity=5
for n=5:1:10
v_max = (total_flow_velocity.*(1+n).*(1+(2.*n)))./((2.*pi)*((radius.*n).^2))
end
Thanks
How do i change the variable, so it saves all the values, even if it must happen for 6 different variables name. This is because when i run it, it only saves the values for v_max when n=10 as this is the last iteration. How can i make all the values be saved. My coding is below:
radius=1:0.5:2.5;
total_flow_velocity=5
for n=5:1:10
v_max = (total_flow_velocity.*(1+n).*(1+(2.*n)))./((2.*pi)*((radius.*n).^2))
end
Thanks