Effacer les filtres
Effacer les filtres

Create a 3D plot with shadow length, altitude, and time.

6 vues (au cours des 30 derniers jours)
Sanley Guerrier
Sanley Guerrier le 21 Août 2023
Commenté : Star Strider le 21 Août 2023
Dear experts;
I would like to create a nice 3D plot with variables shadow length, altitude, and Time. I attached my code and the data here along with a sample plot that I would like to have.
Your help will be greatly appriciated
  2 commentaires
Voss
Voss le 21 Août 2023
I don't see the sample plot. Can you attach it?
Sanley Guerrier
Sanley Guerrier le 21 Août 2023
Hi Voss,
I attached the sample plot here. Thank you!

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 21 Août 2023
Filling the inside of the 3D curve is straightforrward —
run('shadecode.mlx')
T1 = readtable('Shadedata.xlsx')
T1 = 40×4 table
Time Altitude ShadowLength ShadowLength_m _______ ________ ____________ ______________ 0.32292 1.34 616.16 2135.8 0.33333 2.34 238.74 808.83 0.34375 3.34 147.03 495.25 0.35417 4.34 106.39 357.42 0.36458 5.34 83.6 280.44 0.375 6.34 69.07 231.5 0.38542 7.34 59.05 197.77 0.39583 8.34 51.74 173.22 0.40625 17.92 46.21 154.65 0.41667 19.63 41.9 140.22 0.42708 21.22 38.49 128.79 0.4375 22.68 35.76 119.62 0.44792 24.02 33.55 112.22 0.45833 25.2 31.76 106.24 0.46875 26.24 30.33 101.45 0.47917 27.11 29.21 97.68
t = T1.Time;
Alt = T1.Altitude;
SL = T1.ShadowLength;
SLm = T1.ShadowLength_m;
figure
plot3(Alt, SL, t)
hold on
patch([Alt flip(Alt)], [SL flip(SL)], [t flip(t)], [0 0 0]+0.5, 'FaceAlpha',0.5)
hold off
grid on
xlabel('Altitude')
ylabel('Shadow Length')
zlabel('Time')
Filling the outside is not.
.
  6 commentaires
Sanley Guerrier
Sanley Guerrier le 21 Août 2023
Thank you!
Star Strider
Star Strider le 21 Août 2023
As always, my pleasure!

Connectez-vous pour commenter.

Plus de 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