[Scilab-users] Help me plot y = x^(1/3);

Stéphane Mottelet stephane.mottelet at utc.fr
Fri Mar 9 13:24:28 CET 2018


Le 09/03/2018 à 11:57, Hector R. Lepez a écrit :
> I have problems to graph the function
> x=[-10:1:10] y = x^(1/3); plot(x,y); the same in plot of google gives 
> a graph but scilab does anything with the sign.
>
> Héctor Lépez
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

By default in scilab non-integer power elevation of negative number is 
made in the complex domain. The particular case of the real cubic root 
can be treated like this :

y = sign(x).*abs(x)^(1/3);

otherwise (-1)^(1/3) gives you one of the complex cubic root of -1, 
namely exp(%i*%pi*1/3)

S.

-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180309/3c8cd2b4/attachment.htm>


More information about the users mailing list