data2cols.m

来自「一个很好用的摄像机标定程序」· M 代码 · 共 36 行

M
36
字号
function [array, dims, count] = data2cols(varargin)%[array, dims, count] = data2cols(varargin)%%Convert data to columns and put them together to a matrix%%Input:%  VARARGIN - arrays of data%%Output:%  ARRAY   - matrix ot the size PROD(DIMS) x COUNT with the data arrays%            as its columns%  DIMS    - sizes of the data arrays%  COUNT   - number of the data arrays%%Notes:%  All input data should have the same dimensions.%  In only one array is given, it is transformed to a matrix.%%See also:%  JOIN%%Radim Halir, Charles University Prague, halir@ms.mff.cuni.cz%Created: 25.2.1997%Last modified: 4.6.1997if (nargin > 1)  array = join(varargin{:});else  array = varargin{1};enddims = size(array);count = dims(end);dims(end) = [];array = reshape(array, prod(dims), count);

⌨️ 快捷键说明

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