Need help in 3d plot
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a variation of a certain value "I" with respect to each hour (as data, not as a function), so an array of 24 elements each day for "I", and I have experimental data for it for every day of the year.
I need to 3d plot this data, on one axis time in hour from 1 to 24, on the other axis "I" varying every hour, and on the third axis the days of the year (1 to 365) considering the experimental data of "I" varies from day to day too.
How to I do a 3d plot of this? also do I put all the values of I in the array as 24 columns (for the hours) and 365 rows? or what is better to 3d plot them?
Please if anyone can help I am new here, thank you
0 commentaires
Réponses (1)
Star Strider
le 14 Nov 2020
Try this (with your matrix of ‘I’ values):
I = randn(24,365); % Create Data (For Lack Thereof)
Hr = 0:23; % Hours
Dy = 1:365; % Days
figure
surf(Dy, Hr, I)
grid on
xlabel('Days')
ylabel('Hours')
zlabel('I')
It may be necessary to reverse the first two arguments (and their respective axis labels) if your ‘I’ matrix is transposed from the one I created.
0 commentaires
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!