how to make animation from contour in specified range

4 ビュー (過去 30 日間)
hsnHkl
hsnHkl 2020 年 2 月 10 日
コメント済み: KSSV 2020 年 2 月 10 日
I have a 74x99 matrix and i want to make animation from contour with using get frame in certain range ( for example from zv_avg( :,20) to zv_avg (:,85) ) when i write this code below it gives me only contourf(zv_avg,contourlev)
addpath('G://exports/60z1j28v')
load('zv_avg.mat')
contourlev=[-0.0025:0.0002:0.01];
figure
clf
for k=1:99
zv_avg_time= zv_avg(:,k);
contourf(zv_avg,contourlev)
title('zv_animation')
drawnow
end
  1 件のコメント
KSSV
KSSV 2020 年 2 月 10 日
contourf(zv_avg,contourlev)
In the above command, you are not changing anydata, how you expect to get an animation?

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

回答 (1 件)

KSSV
KSSV 2020 年 2 月 10 日
編集済み: KSSV 2020 年 2 月 10 日
Are you looking for this or else?
addpath('G://exports/60z1j28v')
load('zv_avg.mat')
contourlev=[-0.0025:0.0002:0.01];
figure
clf
for k=1:length(contourlev)
zv_avg_time= zv_avg(:,k);
contourf(zv_avg,contourlev(k))
title('zv_animation')
drawnow
end
Or
addpath('G://exports/60z1j28v')
load('zv_avg.mat')
contourlev=[-0.0025:0.0002:0.01];
figure
clf
for k=2:99
zv_avg_time= zv_avg(:,1:k);
contourf(zv_avg_time,contourlev)
title('zv_animation')
drawnow
end
  2 件のコメント
hsnHkl
hsnHkl 2020 年 2 月 10 日
i don't want to change contour levels , what want to change is number of columns , program should consider 2 column at each time to draw contour and this will continue up to end (99. column) and i will get frames of these contour to make a animation
KSSV
KSSV 2020 年 2 月 10 日
addpath('G://exports/60z1j28v')
load('zv_avg.mat')
contourlev=[-0.0025:0.0002:0.01];
figure
clf
for k=1:2:99-1
zv_avg_time= zv_avg(:,k:k+1);
contourf(zv_avg_time,contourlev)
title('zv_animation')
drawnow
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