[Scilab-users] problem with max and min function ...
Serge Steer
Serge.Steer at inria.fr
Wed Dec 19 11:20:19 CET 2012
Le 19/12/2012 09:40, Paul Carrico a écrit :
> Of course I thought about it and I had a look on any complex number (I've
> seen nothing) ...
>
> Is there a trick to verify is there is a complex number in the vector ?
arrays are either real (all entries are real) or complex (all entries
are complex). Take care that the elements with imaginary part equal to
zero in complex arrays are displayed as if they were real. To test if
an array is real or not you can use the isreal function
-->t=2+0*%i
t =
2.
-->isreal(t)
ans =
F
Serge Steer
>
>
>
> -----Message d'origine-----
> De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org]
> De la part de cpt_nemo
> Envoyé : mercredi 19 décembre 2012 08:32
> À : users at lists.scilab.org
> Objet : Re: [Scilab-users] problem with max and min function ...
>
> Seems that your vector is made of complex numbers with imaginary = 0.
>
> Test the following:
>
> t=2+0*%i
> min(t)
>
> You will get the same error message.
>
> --> min(real(pb_vector))
>
>
>
> --
> View this message in context:
> http://mailinglists.scilab.org/Scilab-users-problem-with-max-and-min-functio
> n-tp4025536p4025537.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at
> Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
More information about the users
mailing list