-
Notifications
You must be signed in to change notification settings - Fork 2
Example of Continuous Valued Analysis Function
Erik A. Roberts edited this page Jan 10, 2018
·
6 revisions
GV can plot functionals of DynaSim (DS) simulations, i.e. a single scalar for each simulation. The built-in DS calculation functions return structures. To use these, they must be wrapped by a function that returns a scalar in a single cell.
Here is an example wrapper function for using the results of dsCalcFR
to plot the average firing rate across cells for each simulation in GV:
function resultCell = gvfr(data, varargin)
result = dsCalcFRmulti(data,'bin_size',1, 'bin_shift',1);
resultCell = {result.soma_V_FR_MUA};
end
Save this in the matlab path, then add gvfr
to the dsSimulate
call:
dsSimulate(model, 'analysis_functions',{@gvfr});
Load up GV, and use the select tab. The analysis functions, whether numerical or categorical, will be found under the analysisFn variable.