0

我有一个脚本,它在调用时使用 isrowiscolumn函数,它会生成以下错误:

>> isrow( [1,2,3] )
??? Undefined function or method 'isrow' for input arguments of type 'double'.

我可以使用内置这些功能的最低版本的 Matlab 是什么?

4

2 回答 2

1

isrow(V)iscolumn(V)函数可从Matlab 2011a获得。

于 2013-02-18T09:40:00.513 回答
1

您可以使用以下代码isrow()

function Y = isrow(X)
%
% ISROW    True for row vectors.
%
%   Y = ISROW(X) returns logical 1 if X is a row vector, 0 otherwise.
%   ISROW returns 1 for scalars also.
%
%    See also: ISCOL.
%

if ndims(X)==2 & size(X,1)==1 & size(X,2)>=1
   Y = logical(1);
else
   Y = logical(0);
end

通过 MATLAB Central 获取源代码

于 2013-08-07T15:48:02.820 回答