Effacer les filtres
Effacer les filtres

Specify the y value where the graph should start

1 vue (au cours des 30 derniers jours)
Marie Vangen
Marie Vangen le 10 Fév 2021
Im trying to make a graph with two plots where the one called n should only plot up to y = 0.593, but im kinda stuck on how to do that
%Variabler
A_sveip = 2.27;
luft_tett = 1.225;
%Virkningsgrad
v_0k5 = [0:0.5:30.5];
P_0k5 = [0 0 0 0 0 20 30 50 70 95 120 160 210 270 310 360 390 420 470 540 670 730 750 760 770 775 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 0 0 0 0 0 0 0 0 0 0 0 0];
n=[];
for i = 1:length(v_0k5)
y(i) = (2*P_0k5(i))/(luft_tett*A_sveip.*((v_0k5(i))^3));
n = y < 0.593;
end
yyaxis right
plot(v_0k5,n)
yyaxis left
hold on
plot (v_0k5,P_0k5)

Réponse acceptée

madhan ravi
madhan ravi le 10 Fév 2021
%Variabler
A_sveip = 2.27;
luft_tett = 1.225;
%Virkningsgrad
v_0k5 = [0:0.5:30.5];
P_0k5 = [0 0 0 0 0 20 30 50 70 95 120 160 210 270 310 360 390 420 470 540 670 730 750 760 770 775 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 780 0 0 0 0 0 0 0 0 0 0 0 0];
y = (2*P_0k5) ./ (luft_tett*A_sveip.*v_0k5.^3);
in = y < 0.593;
yyaxis right
plot(v_0k5(in), y(in))
yyaxis left
hold on
plot(v_0k5, P_0k5)

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by