📄 getm2.m
字号:
function Matrix = getm2(multiMatrix, ix1, ix2, ix3, ix4, ix5, ix6)% RECVAR, A package for new data types in Matlab 4. % (c) FOA 1997. See the file rvright.m for copyright notice.%% Gets a two dimensional matrix from a part of a multidimensional matrix % (multimatrix). Behavoir as Matlab 5.% Matlab 5 compatibility version.% See "help getm2" in main RECVAR directory for more information.% Start : 970820 Svante Bj鰎klund (svabj).% Latest change: $Date: 1998/07/12 18:44:07 $ $Author: svabj $.% $Revision: 1.2 $% *****************************************************************************maxNoIndex = 6;if (nargin < 7) ix6 = 1;endif (nargin < 6) ix5 = 1;endif (nargin < 5) ix4 = 1;endif (nargin < 4) ix3 = 1;endif (nargin < 3) ix2 = 1;endif (nargin < 2) ix1 = 1;endsizeMM = size(multiMatrix);sizeMM = [sizeMM ones(1,maxNoIndex-size(sizeMM,2))];if (isstr(ix1) & (ix1 == ':')) ix1 = 1:sizeMM(1,1);endif (isstr(ix2) & (ix2 == ':')) ix2 = 1:sizeMM(1,2);endif (isstr(ix3) & (ix3 == ':')) ix3 = 1:sizeMM(1,3);endif (isstr(ix4) & (ix4 == ':')) ix4 = 1:sizeMM(1,4);endif (isstr(ix5) & (ix5 == ':')) ix5 = 1:sizeMM(1,5);endif (isstr(ix6) & (ix6 == ':')) ix6 = 1:sizeMM(1,6);endMatrix = squeeze(multiMatrix(ix1, ix2, ix3, ix4, ix5, ix6));%%getm code (not used any more):%if ((size(Matrix,1) == 1) & (size(Matrix,2) > 1))% % All vectors that are returned are row vectors.% Matrix = Matrix.';%end%if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -