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@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

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to