⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getm.m

📁 雷达信号处理、或阵列信号处理中能够用上的重要的matlab工具箱——阵列信号处理工具箱
💻 M
字号:
function Matrix = getm(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.%%  function Matrix = getm(multiMatrix, ix1, ix2, ix3, ix4, ix5, ix6)%%  Gets a two dimensional matrix from a part of a multidimensional matrix %  (multimatrix).%%  Matrix       A normal 2D Matlab matrix.%  multiMatrix  MultimatrixT%  ix1, ix2, ix3, ix4, ix5, ix6: Index/subscript (integer row vectors or ':').%%  Ex:%     b = getm(A, 1, 3:4, ':');	%     % Assigns to b the elements in A at indices:  1st dimension=1, %       2nd dimension=3:4 and 3rd dimension=all elements. %%  The first dimension whose index/subscript is a vector becomes different%  rows in the output matrix 'Matrix'.%  Note that when the output matrix is a vector, it will always be a row vector.%  This differs from squeeze(A(...)) in Matlab 5.%  The indexnumber/subscriptnumber ':' can be used to denote all elements%  in a dimension.%%  Start        : 960930 Svante Bj鰎klund (svabj).%  Latest change: $Date: 2000/10/13 19:53:31 $ $Author: svabj $.%  $Revision: 1.1 $% *****************************************************************************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 = getr(multiMatrix,'size');MM     = getr(multiMatrix, 'matrix');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);endminIndex = [min(ix1),min(ix2),min(ix3),min(ix4),min(ix5),min(ix6)];if (any(minIndex < 1))  error('Some index is to low.')end% check so that no index is larger than the corresponing element in 'sizeMM'.maxIndex = [max(ix1),max(ix2),max(ix3),max(ix4),max(ix5),max(ix6)];if (any(maxIndex > sizeMM))  error('Some index is to high.')end[noIndex1, noIndex2] = matvar('getnoix',sizeMM, ix1, ix2, ix3, ix4, ix5, ix6);index = matvar('expandix',sizeMM, ix1, ix2, ix3, ix4, ix5, ix6);Matrix = reshape(MM(index,1), noIndex1, noIndex2);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -