0
我有一個使用的時候把它叫做生成以下錯誤的isrow和iscolumn功能的腳本:哪個版本的Matlab引入了isrow和iscolumn函數?
>> isrow([1,2,3])
??? Undefined function or method 'isrow' for input arguments of type 'double'.
什麼是Matlab的最低版本,我可以使用,這將有這些功能內置?
我有一個使用的時候把它叫做生成以下錯誤的isrow和iscolumn功能的腳本:哪個版本的Matlab引入了isrow和iscolumn函數?
>> isrow([1,2,3])
??? Undefined function or method 'isrow' for input arguments of type 'double'.
什麼是Matlab的最低版本,我可以使用,這將有這些功能內置?
isrow(V)
和iscolumn(V)
功能可從Matlab 2011a。
您可以使用下面的代碼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