elec_3d_2d.m
来自「Matlab下的EEG处理程序库」· M 代码 · 共 36 行
M
36 行
function [Xt,Yt] = elec_3d_2d(X,Y,Z,Zrad)
% ELEC_3D_2D - Project Cartesian 3D coordinates to a 2D plane.
%
% [Xt,Yt] = elec_3d_2d(X,Y,Z,Zrad)
%
% Project 3D electrode positions onto a 2D plane, using
% gnomonic projection, which draws a line from a point
% halfway between equator and south pole, through electrode,
% to a plane tangential to north pole.
%
% Given: Set of 3D Cartesian coordinates (X,Y,Z with Z > 0)
% X,Y midpoint at 0
% Zrad is radius in Z
%
% See also elec_2d_3d.m
%
% $Revision: 1.2 $ $Date: 2003/03/02 03:20:44 $
% Licence: GNU GPL, no implied or express warranties
% History: 10/1999, Chris Harvey
% 07/2001, Darren.Weber@flinders.edu.au
% - using matrix algebra rather than indexed looping
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rad = Zrad / 2;
t = (Z + rad) * ( 1/rad );
Xt = X .* t;
Yt = Y .* t;
return
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?