How to plot a matrix over time on a 2D or 3D graph

18 ビュー (過去 30 日間)
zephyr21
zephyr21 2016 年 6 月 21 日
編集済み: alexandre levy 2018 年 3 月 27 日
I have an 11x14 matrix of variables P that change over the course of 60 timesteps. I currently have P_overtime(:,:,n) = P. Where P_overtime(:,:,1) decreases to P_overtime(:,:,2) and continues to decrease until 60. How can I show this progression in a graph of some sort? Maybe some sort of animation? At the very least I'd like to show the first, 15th, 30th, and 60th timestep. Thanks for any help!

採用された回答

KSSV
KSSV 2016 年 6 月 21 日
So your matrix is of size 11X14X60 (60 being the number of time steps); You may use
for i = 1:60
surf(yourmatrix(:,:,i))
drawnow
end
  2 件のコメント
zephyr21
zephyr21 2016 年 6 月 21 日
Thank you! However, after it drops to a certain value, the y-axis changes itself and continues plotting. This makes it look like my values increase then decrease again. How can I keep the y-axis the same throughout the animation?
alexandre levy
alexandre levy 2018 年 3 月 27 日
編集済み: alexandre levy 2018 年 3 月 27 日
Hi, Thank you very much for your answer.
I want to plot a matrix dataset of x,y,z over time. x,y,z have no mathematics relation. x, y, z are the coordinates in the space of my points during the period t. I do have more than 500.000 points
Do you have any idea of how can I do that ?
Thank you very much in advance !

サインインしてコメントする。

その他の回答 (1 件)

KSSV
KSSV 2016 年 6 月 22 日
You can limit the yaxis using ylim([ymin ymax]).

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by