We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4304456 commit 4fa8b69Copy full SHA for 4fa8b69
isvec.m
@@ -10,6 +10,7 @@
10
% - Differs from MATLAB builtin function ISVECTOR which returns true
11
% for the case of a scalar, ISVEC does not.
12
% - Gives same result for row- or column-vector, ie. 3x1 or 1x3 gives true.
13
+% - Works for a symbolic math symfun.
14
%
15
% See also ISHOMOG, ISROT.
16
@@ -40,6 +41,11 @@
40
41
if nargin == 1
42
l = 3;
43
end
- d = size(v);
44
- h = logical( length(d) == 2 && min(d) == 1 && numel(v) == l );
+ if isa(v, 'symfun')
45
+ h = logical( length(formula(v)) == l);
46
+ else
47
+ d = size(v);
48
+ h = logical( length(d) == 2 && min(d) == 1 && numel(v) == l );
49
+ end
50
+end
51
0 commit comments