Matlab動畫顯示時域場分布

2021-05-23 18:32:00 字數 1311 閱讀 7799

txt檔名的格式為e_field10.txt 、e_field20.txt ......e_field4000.txt .

記錄的乙個平面的場分布

% input the base file name

f = 'e_field';

% input the total number of iterations

n = 4000;

% input the value of time step

k = 10;

%input x axis label

xaxislabel = 'y';

%input y axis label

yaxislabel = 'x';

%input plot title

graphtitle = 'e field';

% index variable for movie

i = 1;

% movie initialization

m = moviein(n / k);

% loop n / k times

for m = k : k : n

% full file name

file = [f '_' int2str(m) '.txt'];

% load the file to a

a = load(file);

% pseudocolor plot

pcolor(a);

% a color bar

colorbar;

% set equal size tick marks

axis image;

% min & max value for color code

caxis([-1e-1 1e-1]);

% shading in interpolated format

shading interp;

% set label for x axis

xlabel(xaxislabel);

% set label for y axis

ylabel(yaxislabel);

% title of the plot

title([graphtitle, ' at time step = ', int2str(m)]);

% store the frame for movie

m(:, i) = getframe;

% increment movie frame index

i = i + 1;

% end of loop

end;

動畫組 顯示動畫

cabasicanimation和cakeyframeanimation僅僅作用於單獨的屬性,而caanimationgroup可以把這些動畫組合在一起。caanimationgroup是另乙個繼承於caanimation的子類,它新增了乙個animations陣列的屬性,用來組合別的動畫。我們把清...

顯示動態動畫

1.iphone的uiimageview class不支援顯示單個動畫檔案。簡而言之,動畫不會動!iphone的image view uiimageview class 支援以下的檔案格式 2.uiimageview可以支援一組作為動畫演示。示例 animatedimageview.animatio...

UIImageView動畫顯示

nsautoreleasepool pool nsautoreleasepool alloc init nsarray myimages nsarray arraywithobjects uiimage imagenamed myimage1.png uiimage imagenamed myima...