Make movie from imagesc

조회 수: 2 (최근 30일)
numnum
numnum 2017년 12월 17일
댓글: numnum 2017년 12월 17일
I have the following image:
t = 0:.1:10;
y4 = zeros(10,length(t));
x = zeros(size(t));
for k = 1:2:19999
f(k)=k;
x = x + sin(k*t)/k;
y4((k+1)/2,:) = x;
end
y5=x-sin(t);
img2=imagesc(y5+1);
colormap('gray') ;
I would like to generate a movie to have the function moving on the x axis. I have tried im2frame which yields this error:
Error using im2frame
Can only make movie frames from image matrices of type double or uint8
F(1) = im2frame(img2);
Any help would be greatly appreciated!
  댓글 수: 5
numnum
numnum 2017년 12월 17일
The next frame could be maybe :
img3=img2
img3.Xdata=img2.Xdata+1
and so on
numnum
numnum 2017년 12월 17일
Thank you so much I've made this work ! Have a great day!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by