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_plot_activ(activ, activ_plot_axes, timeFrame)
function [] = fc_plot_activ(activ, activ_plot_axes, timeFrame)

% Function to plot a spy graph of the activity (0 or 1) of all nodes, at
% each time step of the last simulation (using activity matrix 'activ' passed
% as an argument). If there is a 3rd arg, only plot up to that time step.

if isempty(activ)
    return;
end

axes(activ_plot_axes);
cla;
hold on;
ylabel('Time step');
xlabel(activ_plot_axes, 'Node');
set(activ_plot_axes, 'visible', 'on');

% If 3 args, only plot up to that time step. So shorten activ before
% plotting
if nargin == 3
    shortened_activ = activ(1:timeFrame, :);
    spy(shortened_activ);
    set(gca, 'PlotBoxAspectRatio', [1 1 1]);
    hold off;
    return;
end

spy(activ);
set(gca, 'PlotBoxAspectRatio', [1 1 1]);
xlabel(activ_plot_axes, 'Node');
hold off;

return

Contact us at files@mathworks.com