the plot and the patch is totally different from same data, how to solve it?

4 vues (au cours des 30 derniers jours)
Sierra
Sierra le 26 Juin 2022
Commenté : dpb le 26 Juin 2022
for i = 1:length(trajectory)
plot3(trajectory(i).Longitude, trajectory(i).Latitude, trajectory(i).Altitude)
hold on
end
for i = 1: length(trajectory)
xptcl = prctile(trajectory(i).Longitude,[2.5 97.5]);
yptcl = prctile(trajectory(i).Latitude,[2.5 97.5]);
zptcl = prctile(trajectory(i).Altitude,[2.5 97.5]);
xptcl = [xptcl;];
yptcl = [yptcl;];
zptcl = [zptcl;];
xl(i,:) = xptcl;
yl(i,:) = yptcl;
zl(i,:) = zptcl;
patch([xptcl flip(xptcl)], [yptcl flip(yptcl)], [[1 1]*zptcl(1) [1 1]*zptcl(2)],'r', 'FaceAlpha',0.5)
hold on
end
plot3(xl(:,1), yl(:,1), zl(:,1), '-k', 'LineWidth',2)
plot3(xl(:,1), yl(:,1), zl(:,2), '-k', 'LineWidth',2)
plot3(xl(:,2), yl(:,2), zl(:,1), '-k', 'LineWidth',2)
plot3(xl(:,2), yl(:,2), zl(:,2), '-k', 'LineWidth',2)
grid on
view(45,30)
I wroted the code likt this above.
but it seems totally wrong.
the patch should be narrower than trajectory, because i set the range with percentile 2.5 and 97.5.
how can the patch be more bigger than the trajectory?
I thought at least the patch's size is as same as trajectory's size.
  3 commentaires
Walter Roberson
Walter Roberson le 26 Juin 2022
We do not know that there is a connection between the values in the trajectory structure, compared to the x* y* z* variables
dpb
dpb le 26 Juin 2022
The plot appears they are related given shapes shown, but could be scaled differently, for example.

Connectez-vous pour commenter.

Réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by