function p = myisvector(v)

% MYISVECTOR Returns 1 if all but one dimension have size 1.
%
% p = myisvector(v)
%
% Example: myisvector(rand(1,2,1)) = 1, myisvector(rand(2,2)) = 0.

% Funcion perteneciente a la Bayes Net toolbox
% (http://code.google.com/p/bnt).

s=size(v);
p = (ndims(v)<=2) & (s(1) == 1 | s(2) == 1);
