Saving the changing values inide a loop
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have a situation where i need to store the values of 3 variable that are obtained from iteration . how can i do that.
i need to store the values of 'j' and 'min_u' and 's_c'. How can i do that ? as always , thanks a lot !! for s_c=0.019:0.001:0.038
u=0.001:0.001:0.028;
beta=atan2(-sqrt(-(-d+R-s_c+u) .* (-d+R+s_c-u) .* (-d+R+s_c+u) .* (-d+R-s_c-u)) ./ (u.*s_c), (R.^2-2.*R.*d-u.^2+d.^2-s_c.^2) ./ (u.*s_c))
delta_beta=atan2(-sqrt(-R.^4+(2.*u.^2+2.*s_c.^2).*R.^2-(s_c-u).^2.*(s_c+u).^2)/(u.*s_c), (u.^2+s_c.^2-R.^2)/(u.*s_c))-beta
j=min(delta_beta);
min_delta_beta_radians = j
min_delta_beta_degrees=min(delta_beta)*180/pi
v=find(delta_beta<=j,1,'last');
position_min_delta_beta=find(delta_beta<=j,1,'last')
min_u_for_specific_s_c_mm=u(v)*10^3
plot(u,delta_beta*180/pi,'color',rand(1,3))
hold all
title('Blocking Circle Radius vs \delta\beta')
xlabel('Radius of the blocking circle(u) [m]')
ylabel('\delta\beta [\circ]')
0 Commenti
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!