mpgwrite
The MPEG converter takes a MATLAB movie matrix and writes the movie to disk as an MPEG file.
Author: David Foti
Tried your program running 64-bit linux and Matlab 2010b and Matlab2011a both with the gcc shipped with Ubuntu and with the versions supported by Matlab. They all crashes due a double free or stack corruption.
This is my sample program
figure(1)
numframes=100;
A=moviein(numframes); % create the movie matrix
set(gca,'NextPlot','replacechildren')
axis equal % fix the axes
for i=1:numframes
plot(fft(eye(i+16)));
A(:,i)=getframe;
end
for i = 1:length(A)
if (i==1)
[r1,c1,s] = size(A(i).cdata);
rk = r1;
ck = c1;
else
[rk,ck,s] = size(A(i).cdata);
end
r1 = min(r1,rk);
c1 = min(c1,ck);
end
for i = 1:length(A)
[rk,ck] = size(A(i).cdata);
if ((rk~= r1) || (ck ~=c1))
A(i).cdata = A(i).cdata(1:r1, 1:c1,:);
end
end
% compare frame sizes
for i = 1:numframes
fprintf(1,'%d %d %d\n',i,size(A(i).cdata,1),size(A(i).cdata,2));
end
Nice idea, but bad implementation. I am working with a parameter study and data is extremely sparse, dimensions are 37x37x37x37x37x37x37, but I have less than 400 non-zero elements. The display function takes more than 10 hours to execute.
Why not simple store tubles and use an intelligent search?
Hey Joel. I looked into your source and found that you have misunderstood how the correlation length can be obtained from the auto-covariance. You are using the FWHM of the fit. The correlation length is the value of the integral itself.