From: William P. Y. H <wil...@ya...> - 2005-11-12 07:25:48
|
I got another idea (basically the same as the previous one, but simpler): function retval = isvector (x) retval = 0; if !ismatrix(x), return; endif s_x = size(x); if any(s_x < 1), return; endif if ((s_x == 1) || (length(find(s_x-1)) == 1)) retval = 1; endif endfunction P.S.: Sorry, I didn't mean to flood the list with this kind of topics... William Poetra Yoga Hadisoeseno __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com |