Specify the y value where the graph should start

1 次查看(过去 30 天)
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)

采纳的回答

madhan ravi
madhan ravi 2021-2-10
%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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by