plotting after a for loop doesn't work

6 vues (au cours des 30 derniers jours)
Olga Rakvag
Olga Rakvag le 20 Fév 2022
Modifié(e) : Olga Rakvag le 20 Fév 2022
close
clear all
clc;
CM=2;
CD=1;
D=1;
k=2*pi/153.9;
h=60;
H=(0:25);
for zeta_a=H/2
y = real(asin(CM/CD*((pi*D^2)/zeta_a)*sinh(k*h)^2/(sinh(2*k*h)+2*k*h)))
end
plot(H,y, '-b');

Réponse acceptée

VBBV
VBBV le 20 Fév 2022
Modifié(e) : VBBV le 20 Fév 2022
close
clear all
clc;
CM=1;
CD=2;
D=1;
k=2*pi/153.9;
h=60;
H=(0:1:25);I = 1;
for zeta_a=(H/2)
y(I) = real(asin(CM/CD*((pi*D^2)/zeta_a)*sinh(k*h)^2/(sinh(2*k*h)+2*k*h)));
I = I+1;
end
plot(H,y, '-b');
  4 commentaires
Olga Rakvag
Olga Rakvag le 20 Fév 2022
Thank you! Awesome! :-)
VBBV
VBBV le 20 Fév 2022
Welcome, It appears this equation used for propellers , wind mills for finding axial thrust load ?

Connectez-vous pour commenter.

Plus de réponses (1)

Olga Rakvag
Olga Rakvag le 20 Fév 2022
Modifié(e) : Olga Rakvag le 20 Fév 2022
Here comes the result with your code, thank you! :-)
close
clear all
clc;
CM=2;
CD=1;
D=1;
k=2*pi/153.9;
h=60;
H=(1:1:153.9/7);
I = 1;
for zeta_a=(H/2)
y(I) = real(asin(CM/CD*((pi*D^2)/zeta_a)*sinh(k*h)^2/(sinh(2*k*h)+2*k*h)))
I = I+1;
end
plot(H,y, '-b');
grid on
hold on
h=legend('$\omega t$');
set(h ,'Interpreter','latex','FontSize', 12);
ylabel(' Phase $\omega t$', 'Interpreter','latex')
xlabel('Wave height H(m) ','Interpreter','latex')
title('Phase \omegat for max total force F_T_m_a_x')

Catégories

En savoir plus sur Partial Differential Equation Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by