eeg_plot_surf

eeg_plot_surf - function[p] = eeg_plot_surf(p) %...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
function[p] = eeg_plot_surf(p) % eeg_plot_surf - Plot a patch surface with voltage colourmap % %[p] = eeg_plot_surf(p) % % fields of p struct used: % % p.rangeMethod - initialised by eeg_toolbox_defaults % p.colorMap.map - initialised by eeg_toolbox_defaults % % p.volt.sampleTime % p.mesh.data.vertices{p.mesh.current} % p.mesh.data.faces{p.mesh.current} % p.mesh.data.timeseries{p.mesh.current} % % $Revision: 1.1 $ $Date: 2009/04/28 22:13:52 $ % Licence: GNU GPL, no express or implied warranties % History: 10/2002, Darren.Weber_at_radiology.ucsf.edu % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fprintf('\nEEG_PLOT_SURF. ..\n'); tic; % confirm that a patch surface is available if isfield(p,'mesh'), if isfield(p.mesh,'data'), if isfield(p.mesh.data,'timeseries'), if isempty(p.mesh.data.Cdata{p.mesh.current}), msg = sprintf('. ..p.mesh.data.Cdata{%d} is empty\n',p.mesh.current); error(msg); end end end else error('. ..p.mesh.data is empty - load mesh first\n'); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Determine/validate the min, max surface color data range %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Select mesh timeseries values at samplePoint switch p.mesh.data.meshtype{p.mesh.current}, case {'scalp','elec'}, samplePoint = p.volt.samplePoint; sampleTime = p.volt.sampleTime; otherwise samplePoint = p.mesh.samplePoint; sampleTime = p.mesh.sampleTime; end % get number of vertices nvert = size(p.mesh.data.vertices{p.mesh.current},1);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
% Assume more vertices than time points [s1,s2] = size(p.mesh.data.Cdata{p.mesh.current}); if isequal(nvert,s1), % vertices in rows, timepoints in columns
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

eeg_plot_surf - function[p] = eeg_plot_surf(p) %...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online