Effacer les filtres
Effacer les filtres

fill color between two curve

2 vues (au cours des 30 derniers jours)
koorosh dastan
koorosh dastan le 23 Mar 2024
Commenté : koorosh dastan le 23 Mar 2024
i have several line and i want two fill color between them but i couldnt fill properly this what i want
(all of them)
prf=3500;
NumberOfAmbigiousArea=30;
m=(1:NumberOfAmbigiousArea);
rx = zeros(1,2*length(m)); %%%Distance of Amb Area
p=prf; %PRF
qw=3500;
for i=1:qw
p=p+1;
c=3e8;
tp=30e-6;
hhhh = 6e5; %Height of satellite
tna=2*hhhh/c;
rn = c*((m-1+p*tp+tna*p)/(2*p));
rf = c*((m-p*tp+tna*p)/(2*p));
rx(1:2:2*length(m))= rn ;
rx(2:2:2*length(m))= rf ;
x1(:,i) = acosd (hhhh./rx) ; %Angle of Amb Area
end
p=prf;
figure;
plot( x1 , (p:1:p+qw-1) )

Réponse acceptée

Matt J
Matt J le 23 Mar 2024
prf=3500;
NumberOfAmbigiousArea=30;
m=(1:NumberOfAmbigiousArea);
rx = zeros(1,2*length(m)); %%%Distance of Amb Area
p=prf; %PRF
qw=3500;
for i=1:qw
p=p+1;
c=3e8;
tp=30e-6;
hhhh = 6e5; %Height of satellite
tna=2*hhhh/c;
rn = c*((m-1+p*tp+tna*p)/(2*p));
rf = c*((m-p*tp+tna*p)/(2*p));
rx(1:2:2*length(m))= rn ;
rx(2:2:2*length(m))= rf ;
x1(:,i) = acosd (hhhh./rx) ; %Angle of Amb Area
end
p=prf;
figure;
% plot( x1 , (p:1:p+qw-1) )
z=(p:1:p+qw-1);
z=[z;flip(z)];
xx=x1;
xx(1:2:end,:)=fliplr(xx(1:2:end,:));
xx=xx'; z=z';
for i=2:2:width(xx)-1
xxx=xx(:,i:i+1);
fill(xxx(:),z(:),'r'); hold on
end; hold off
  1 commentaire
koorosh dastan
koorosh dastan le 23 Mar 2024
thanks alot

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Calendar 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