Need help in 3d plot
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Star Strider
2020 年 11 月 14 日
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 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!