help-octave
[Top][All Lists]
Advanced

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

Re: expressing x as a real number


From: Martin Helm
Subject: Re: expressing x as a real number
Date: Sun, 27 Nov 2011 00:00:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0

Am 26.11.2011 18:29, schrieb kacheep:
>  I want to write a code that does something if x is a real number and does
> something else if its not (like if it was a letter or a symbol). 
> Is there a built in function on Octave that will help?
> If not, what is a function I could use in order to tell me if x is a number
> or not?
>
class(x) would be an option it returns "double" for real numbers (but
also for complex values) so you need to check that in addition with
isreal(x)


reply via email to

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