这是我打算制作的图形: flight envelope
按照我的编码方式,它由在同一张图中绘制的7条不同的曲线/线组成。因此,当我使用area
函数时,不仅每个区域的颜色都不同(我使用set (ai, 'Facecolor', [x y z])
函数“解决”了一个问题),而且还在每个区域之间创建了分界线。我想知道如何删除这些行
function plot_flight_envelope (aviao, const)
W = aviao.MTOW;
S = aviao.sA;
Cl_max = aviao.CL_max_asa;
b = aviao.bA;
rho = const.rho;
g = const.g;
a = 0.0820586;
%evelope de manobra
n = 0:0.001:2.5;
n1 = 0:-0.001:-1.25;
Vs = sqrt((2 * W)/(rho * S * Cl_max)); %formula
Va = Vs * sqrt(2.5); %Va == x quando y == n_max(2.5)
Vc = 2.4 * sqrt(W/S); %FAR 23.335?
Vd = 1.4 * Vc; %FAR 23.335
hold on
plot ((Vs * sqrt(n)), n, 'b') %plota parabola positiva
n = 1:0.001:2.5; %
a1 = area ((Vs * sqrt(n)), n) %
plot (( Vs * sqrt(-1 * n1)), n1, 'b') %plota parabola negativa
n1 = -1:-0.001:-1.25; %
a2 = area (( Vs * sqrt(-1 * n1)), n1) %
a3 = area ([Va, Vc], ones(1,2) *(2.5)) %plota linhas positivas
plot ([Va, Vc], ones(1,2) *(2.5), 'b')
a4 = area ([Vc, Vd], [2.5, 2]) %
plot ([Vc, Vd], [2.5, 2], 'b')
a5 = area ([Vd, Vd], [0, 2]) %
plot ([Vd, Vd], [0, 2], 'b')
a6 = area ([(Vs * sqrt(1.25)), Vc], -1 * [1.25, 1.25]) %plota linhas negativas
plot ([(Vs * sqrt(1.25)), Vc], -1 * [1.25, 1.25], 'b')
a7 = area ([Vc, Vd], -1 * [1.25, 0]) %
plot ([Vc, Vd], -1 * [1.25, 0], 'b')
%envelope de rajada
Uc = 15.24; %FAR 23.333
Vc2 = 0:0.01:Vc;
Ud = 7.62; %FAR 23.333
Vd2 = 0:0.01:Vd;
mi = 2 * (W / (S * g)) / (rho * (S / b) * a); %formula
K = (0.88 * mi) / (5.3 + mi); %formula
ncp = calcula_n (const, Uc, Vc2, +1, K, W, S);
ncn = calcula_n (const, Uc, Vc2, -1, K, W, S);
ndp = calcula_n (const, Ud, Vd2, +1, K, W, S);
ndn = calcula_n (const, Ud, Vd2, -1, K, W, S);
plot (Vc2, ncp, 'r')
plot (Vc2, ncn, 'r')
plot (Vd2, ndp, 'r')
plot (Vd2, ndn, 'r')
plot ([max(Vc2), max(Vd2)], [max(ncp), max(ndp)], 'r')
plot ([max(Vc2), max(Vd2)], [min(ncn), min(ndn)], 'r')
set(a1,'FaceColor',[0.75 0.75 0]);
set(a2,'FaceColor',[0.75 0.75 0]);
set(a3,'FaceColor',[0.75 0.75 0]);
set(a4,'FaceColor',[0.75 0.75 0]);
set(a5,'FaceColor',[0.75 0.75 0]);
set(a6,'FaceColor',[0.75 0.75 0]);
set(a7,'FaceColor',[0.75 0.75 0]);
function n = calcula_n (const, U, V, coef, K, W, S)
n = 1 + (coef * (rho * V * a * K * U) / (2 * W / S));
end
grid
hold off
end
答案 0 :(得分:0)
您可以设置区域的边缘颜色:
set (ai, 'Edgecolor', [x y z])