fill in the area in plot
Mostrar comentarios más antiguos
How can I fill in the area
My code is
%3.2
clear all
W=45000;
S=9;
b=7.5;
clmax=2;
clmin=-1;
nmax=4;
AR=7;
nmin=-3;
clalpha = 2*pi;
Vdive=290;
Vstall=sqrt(2*W/(1.225*S*clmax));
cd0 = 0.005;
k = 1/pi/AR;
n1v = 0:0.25:4;
i=0;
for n1 = 0:0.25:4
i=i+1;
V(i) = sqrt(2*n1*W/1.225/S/clmax);
nmaxx(i)=nmax;
nminn(i)=nmin;
end
j=0;
n2v = -3:0.25:0;
for n2 = -3:0.25:0
j=j+1;
V2(j) = sqrt(2*n2*W/1.225/S/clmin);
nmaxx(j)=nmax;
nminn(j)=nmin;
end
k=0;
nv=-3:0.25:4;
for n=-3:0.25:4
k=k+1;
Vmax(k)=Vdive;
end
m=0;
n3v=-3:0.25:4;
for n3=-3:0.25:4
m=m+1;
Vstall1(m)=Vstall;
end
figure(5); plot(V,n1v, 'DisplayName','n1v')
hold on
plot([V Vmax(end)],[nmaxx nmaxx(end)], 'DisplayName','nmaxx')
hold on
plot([V Vmax(end)],[nminn nminn(end)], 'DisplayName','nminn')
hold on
plot(V2,n2v, 'DisplayName','n2v');
plot(Vmax,nv, 'DisplayName','nv');
hold on
plot(Vstall1,n3v, 'DisplayName','n3v');
xlim([-1 325]);
ylim([-4 5]);
Respuesta aceptada
Más respuestas (2)
Sulaymon Eshkabilov
el 17 de Feb. de 2023
0 votos
Use patch().
How far it is different from your previous post:
Image Analyst
el 19 de Feb. de 2023
0 votos
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
