from
CoCoMac
by James Allen Download CoCoMac.org cortical connectivity data, model it as a network, and simulate epileptic sprea
fc_loadData(list_startNodes)
% Loads a network data file previously saved by download().
% It is called from the gui. Returns:
% 'data' (the main data structure),
% 'net' (a numerical connectivity matrix made by makeNet)
% and 'netLabels' (a cell array of labels which index 'net')
function [data, net, netLabels] = fc_loadData(list_startNodes)
[network_name, network_path] = uigetfile('.mat','Select .mat file containing network data');
networkData = [network_path network_name];
% If the user did not select a file..
if isequal(network_path,0) | isequal(network_name,0)
errordlg('You must select a .mat file containing a data structure called ''data''')
data = [];
net = [];
netLabels = [];
set(gca, 'visible', 'off');
return;
else
try
load (networkData);
catch
errordlg(['Error opening .mat file :' lasterr])
data = [];
net = [];
netLabels = [];
set(gca, 'visible', 'off');
return;
end
end
fc_saveLog(['Loaded network data from file ' networkData]);
% Make the connectivity matrix
[net netLabels] = makeNet(data);
return;