No BSD License  

Highlights from
CoCoMac

image thumbnail
from CoCoMac by James Allen
Download CoCoMac.org cortical connectivity data, model it as a network, and simulate epileptic sprea

fc_saveAnimation(movieMatrix)
function [] = fc_saveAnimation(movieMatrix)

% Asks user for a save location, and saves a movie matrix generated by
% fc_animate as a .avi

if isempty(movieMatrix)
    errordlg('Cannot save - need to have run an animation first.')
    return;
end

% Ask the user where to save mat file
[save_name, save_path] = uiputfile('.avi', 'Save animation');
saveFile = [save_path save_name];

% If the user did not select a file..
if isequal(save_path,0) | isequal(save_name,0)
    msgbox('Did not save animation!', 'Warning,', 'warn')
    % Otherwise...
else
    try
        movie2avi(movieMatrix, saveFile, 'FPS',1)
    catch
        errordlg(['Error saving data structure to ' saveFile ': ' lasterr])
    end
end

fc_saveLog(['Saved animation: ' saveFile]);

return

Contact us at files@mathworks.com