plotchans3d.m
来自「含有多种ICA算法的eeglab工具箱」· M 代码 · 共 137 行
M
137 行
% plotchans3d() - Plots the 3D configuration from a Polhemus ELP% file. The axis of the cartesian coordinate system are% plotted. The nose is plotted as a bold red segment.%% Usage:% >> plotchans3d( elpfile, zs)% >> plotchans3d( [X,Y,Z], elecnames, zs)%% Inputs:% elpfile = ELP file from Polhemus.% [X,Y,Z] = array of 3D coordinates% elecnames = cell array containing the name of the electrodes%% Optional input:% zs = vector of electrode subset to print labels%% Author: Luca A. Finelli, SCCN/INC/UCSD, La Jolla, 02/2002% % See also: topoplot(), readlocs(), readelp(), % polhemus2topo(), pop_chanedit() %123456789012345678901234567890123456789012345678901234567890123456789012% This program is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2 of the License, or% (at your option) any later version.%% This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the% GNU General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this program; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA% $Log: plotchans3d.m,v $% Revision 1.7 2003/12/02 00:32:15 arno% axis equal%% Revision 1.6 2002/10/23 18:39:52 arno% debug%% Revision 1.5 2002/08/15 16:37:01 arno% update colo%% Revision 1.4 2002/05/02 23:24:34 scott% removed 'axis off' -sm%% Revision 1.3 2002/05/02 23:22:14 scott% added 'axis off' -sm%% Revision 1.2 2002/04/27 02:40:13 arno% editing header%% Revision 1.1 2002/04/27 02:37:38 arno% Initial revision%% Revision 1.1 2002/04/05 17:48:29 jorn% Initial revision%% 04/01/02 changed header for help2html compatibility -ad% 04/01/02 debuging zs -ad% 04/01/02 adding extra optional [X,Y,Z] argument -adfunction plotchans3d(elpfile, arg2, arg3)if nargin<1 help plotchans3d; return;end;zs = [];if isstr(elpfile) if nargin > 1 zs = arg2; end; [elocstruct, elocname, X, Y, Z ] =readelp([elpfile]);else X = elpfile(:,1)'; Y = elpfile(:,2)'; Z = elpfile(:,3)'; if nargin > 1 elocname = arg2; else elocname = []; end; if nargin > 2 zs = arg3; end;end;if isempty(zs) zs = [1:length(elocname)];end;%zs =[3 7 15 26 36 46 56 64 69 71 72];figurelim=1.05*max([X Y Z]);eps=lim/20;plot3(X,Y,Z,'ro')hold onif ~isempty(elocname) plot3(X(zs),Y(zs),Z(zs),'b*')end;plot3([0.08 0.12],[0 0],[0 0],'r','LineWidth',4) % noseplot3([0 lim],[0 0],[0 0],'b--') % axisplot3([0 0],[0 lim],[0 0],'g--')plot3([0 0],[0 0],[0 lim],'r--')plot3(0,0,0,'b+')text(lim+eps,0,0,'X','HorizontalAlignment','center',... 'VerticalAlignment','middle','Color',[0 0 0],... 'FontSize',10)text(0,lim+eps,0,'Y','HorizontalAlignment','center',... 'VerticalAlignment','middle','Color',[0 0 0],... 'FontSize',10)text(0,0,lim+eps,'Z','HorizontalAlignment','center',... 'VerticalAlignment','middle','Color',[0 0 0],... 'FontSize',10)box onif ~isempty(elocname) for i = 1:length(zs) text(X(zs(i)),Y(zs(i)),Z(zs(i))+eps,elocname(zs(i)),'HorizontalAlignment','center',... 'VerticalAlignment','middle','Color',[0 0 0],... 'FontSize',10) endend;%axis(repmat([-lim lim],1,3))axis([-lim lim -lim lim -lim*0.5 lim])axis equal;rotate3d ontry, icadefs; set(gcf, 'color', BACKCOLOR); catch, end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?