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_run_simulation(net, netLabels, time_plot_axes, activ_plot_axes, fitLine, fitLineLabel, time_colour)
function [activ, activLabels, time_plot, linearFit, fitLine, fitLineLabel, time_colour] = fc_run_simulation(net, netLabels, time_plot_axes, activ_plot_axes, fitLine, fitLineLabel, time_colour) 

% Called by 'Run simulation' push button. Calculates the spreading
% activation data (activ), where the columns of activ represent each node,
% labeled by activLabels, and each row represents successive time steps,
% the top row being time step 1. Then makes animation panel visible to
% user, plots the activation data as a 'spy' graph in activ_plot_axes, plots the 
% time graph in time_plot_axes

[activ activLabels] = spread(net, netLabels, str2num(get(findobj('tag', 'alpha_editbox'), 'string')));
fc_allow_animation(findobj('tag', 'panel_animation'), activLabels);
fc_plot_activ(activ, activ_plot_axes);
[time_plot, time_colour] = fc_plot_time(activ, time_plot_axes);

% Call fc_calculate_fitline to calculate a first degree line of fit , 
% plot it if the 'show fit line' button is pressed, and the gradient 
% on the line as a text label
[linearFit fitLine fitLineLabel] = fc_calculate_fitline(time_plot, time_plot_axes, time_colour);

% Make sure 'simulation working' label is off
set(findobj('tag', 'label_simulation_working'), 'visible', 'off');

return

Contact us at files@mathworks.com