movie2avi problem without any error message

1 view (last 30 days)
I coded using movie2avi. There is no error message, however, I couldn't get a movie. The movie showed 'white screen' without any movie, which I wanted to make.
My code is
a=data(:,5);%%data from Meeting\Wamit
b=a.*pi/180;%%make radian angle
p=zeros(10000,3);
p(:,1)=data(:,1);
p(:,2)=data(:,2);
p(:,3)=data(:,4).*exp(b*1j);
x=zeros(100,2);
y=zeros(100,2);
u=reshape(p(:,1),100,100);%%change matrix form to draw mesh graph.
v=reshape(p(:,2),100,100);
w=reshape(p(:,3),100,100);
%mesh(u,v,real(w));
%xlabel('x(ft)');
%ylabel('y(ft)');
%zlabel('surface elevation(ft)');
%title('surface elevation');
for t=1:200
w1=w.*exp(1j*(2*pi/7.99)*(0.1*t));
mesh(u,v,real(w1));
pause(0.1);
M(t)=getframe;
end
movie2avi(M,'wamit6.avi','compression','none','FPS',40);
I could watch the iteration of graph, which I wanted to make. However, the movie, which was made by coding, showed 'white screen'. Running code didn't show any error message.
I don't know the reason why movie always showed 'White Screen' without any error message.

Answers (1)

Ibrahim Mohammed Wajid
Ibrahim Mohammed Wajid on 4 Jul 2022
Either you donot have write permission in that directory, or else there is some difficulty about that particular file name.
Please check that whether any other file exists with that particular name.
Adding the .avi extension to the filename may help.
Please refer the following FAQ:

Tags

Community Treasure Hunt

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

Start Hunting!