help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: missing MatLab function ISREAL


From: A. Scottedward Hodel
Subject: Re: missing MatLab function ISREAL
Date: Thu, 15 Jul 1999 11:02:48 -0500

This would a simple m-file to write, e.g.

function flg = isreal(x)
  if(isstr(x))       error("x is a string")
  elseif(is_list(x)) error("x is a list")
  endif
  flg = isempty(find(imag(x) != 0);
endfunction

You may wish to add/remove argument checking.

Note: the above code is OTTOMH (off the top of my head)
    and has not been tested.

A S Hodel Assoc. Prof. Dept Elect Eng, Auburn Univ,AL  36849-5201
On leave at NASA Marshall Space Flight Center (256) 544-1426
Address until 15 Mar 2000:Mail Code TD-55, MSFC, Alabama, 35812
http://www.eng.auburn.edu/~scotte

----------
>From: Frédéric BERIER <address@hidden>
>To: address@hidden
>Subject: missing MatLab function ISREAL
>Date: Thu, Jul 15, 1999, 11:52 AM
>

>MatLab function isreal(), is missing in octave. Can somebody send me the
>code.
>
>--
>  Frederic BERIER           http://www-opt.enst-bretagne.fr/~berier/
>Departement d'Optique
>  ENST de Bretagne
>   BP 832                   Tel bureau   : (33) 2 98 00 13 25
> 29285 BREST cedex                   Fax : (33) 2 98 00 10 25
>
>
>




---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]