Animation Plot time dependent

6 ビュー (過去 30 日間)
Jithin Jose Dsouza
Jithin Jose Dsouza 2018 年 6 月 13 日
編集済み: Jithin Jose Dsouza 2018 年 6 月 13 日
I am simulating a building with multiple rooms and a radiator in each room. I get the temperatures in each as outputs. My output data is n*1 vector whose values change with time frames. I need to create a plot where in the rooms are plotted with the same arrangement ( spatial distribution ) in Simulink. After that, each room has to be filled with color to show the temperature change in them and this plotting process has to be animated.
The animation should look something like this: https://www.youtube.com/watch?v=2OA6c1VGIMc
  2 件のコメント
KSSV
KSSV 2018 年 6 月 13 日
How is your data? It depends on your data.
Jithin Jose Dsouza
Jithin Jose Dsouza 2018 年 6 月 13 日
My data is n*1 vector whose values change with time frames.

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

回答 (1 件)

KSSV
KSSV 2018 年 6 月 13 日
n = 100;
x = ones(1,n) ;
y = 1:n ;
z = zeros(size(x));
for i = 1:10
col = rand(1,n) ;
surface([x;x],[y;y],[z;z],[col;col],...
'facecolor','no',...
'edgecolor','interp',...
'linewidth',10);
drawnow
pause(0.5)
end

カテゴリ

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