Qubit
02-10-2002, 04:39 AM
Any matlab people here?
I've made a script to draw the time evolution of a sech^2 profile, and to store that movie in an avi file (Indeo compression).
Works well, but while the movie in matlab is very nice, the avi file is horrible! It looks like someone drawed the thing with paper and ink!!!!
Does anyone know how to improve the quality of these avi files?
Here's my .m file:
k = 2;
delta = 0;
fps = 15;
t0 = 0; t1 = 2;
x0 = k*k*t0 - delta/k;
x1 = k*k*t1 - delta/k;
x = x0:.03:x1;
aviobj = avifile('soliton');
aviobj.fps = fps;
aviobj.Quality = 100;
set(gca, 'Units', 'pixels')
set(gca, 'Position', [0 0 170 90])
for t = t0:1/fps:t1
y = 1/2*k*k ./ (cosh(1/2*(k*x - k*k*k*t + delta))).^2;
plot(x,y);
axis off;
frame = getframe;
aviobj = addframe(aviobj, frame);
end;
aviobj = close(aviobj);
I hope someone can help me.
[ 10 February 2002: Message edited by: Glaurung ]
I've made a script to draw the time evolution of a sech^2 profile, and to store that movie in an avi file (Indeo compression).
Works well, but while the movie in matlab is very nice, the avi file is horrible! It looks like someone drawed the thing with paper and ink!!!!
Does anyone know how to improve the quality of these avi files?
Here's my .m file:
k = 2;
delta = 0;
fps = 15;
t0 = 0; t1 = 2;
x0 = k*k*t0 - delta/k;
x1 = k*k*t1 - delta/k;
x = x0:.03:x1;
aviobj = avifile('soliton');
aviobj.fps = fps;
aviobj.Quality = 100;
set(gca, 'Units', 'pixels')
set(gca, 'Position', [0 0 170 90])
for t = t0:1/fps:t1
y = 1/2*k*k ./ (cosh(1/2*(k*x - k*k*k*t + delta))).^2;
plot(x,y);
axis off;
frame = getframe;
aviobj = addframe(aviobj, frame);
end;
aviobj = close(aviobj);
I hope someone can help me.
[ 10 February 2002: Message edited by: Glaurung ]