フィルターのクリア

How do I convert the frames I've generated Matlab to avi format

1 回表示 (過去 30 日間)
EngStudent
EngStudent 2013 年 1 月 28 日
How do I convert the frames/movie in this program to avi format so that I can show it in a power point presentation
y_max=50.0;
y_min=-50.0;
%F= (rand(20,10).*10);
N=300;
RandForce = 1030*rand(N,1) .* sign(randn(N,1));
k= 20.5;
y=RandForce./k;
%r=x_min+(x_max-x_min).*rand(n,1);
y(y_min > y | y > y_max) = 0;
figure(1)
plot(y); % Graphs the Plot
xlabel('frames');
ylabel('Random Positions');
figure (2)
scatter( 1:length(y), y, 90, [0 0 0], 'filled' );
xlabel('frames');
ylabel('Random Positions');
figure('Position', [300 300 300 300])
axlim=900;
aylim=80;
for i = 1:length(y)
%fprintf('Frame: %03d\n', i)
b=y;
plot(b,'.','MarkerSize',50)
axis([-axlim axlim -aylim aylim]);
% axis off
end
randommov = figure('Position', [300 300 300 300])
h=randommov;
set(h,'Position',[300 300 300 300])
set(h,'NextPlot','replacechildren')%Make sure each frame
%of the movie is the same size
axlim=900;
aylim=80;
N=10;
count=1;
M=moviein(N);
for j = 1:N
%fprintf('Frame: %03d\n', i)
b=y;
plot(b(j),'.','MarkerSize',50)
axis([-axlim axlim -aylim aylim]);
title('Microsphere');
S1=sprintf('Frame: %03d\n', j);
text(6,.5,S1)
titlestr = sprintf('Frame: %03d', k); % our title will change
%fprintf('Frame %d\n', k); % print loop counter68.
pause(0.1);
% axis off
M(:,j) = getframe(randommov);
M(count)=getframe(h);
count=count+1;
%movie(M)
end

採用された回答

Walter Roberson
Walter Roberson 2013 年 1 月 28 日
If necessary if you have an older MATLAB, use avifile. However, it is better to use VideoWriter if you have it.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePulse and Transition Metrics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by