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

5 messages
Open this post in threaded view
|

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

 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 [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: Help me plot y = x^(1/3);

 Hello, The operator ^ seems to return the real part of one of the complex roots of x^3=1. If x=[-10:1:10]andy = x^(1/3);Thus, for x<0, the values of y are half the opposite of values obtained with x>0.With y=x.^(1/3), the values of y are complex for x<0.HTHDenis De : users [mailto:[hidden email]] De la part de Hector R. LepezEnvoyé : vendredi 9 mars 2018 11:58À : [hidden email]Objet : [Scilab-users] Help me plot y = x^(1/3); 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 [hidden email] http://lists.scilab.org/mailman/listinfo/users Denis Crété
Open this post in threaded view
|

## Re: Help me plot y = x^(1/3);

 In reply to this post by lepezhr 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 [hidden email] 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 [hidden email] http://lists.scilab.org/mailman/listinfo/users
 `This solution worked, could you explain how you put it together? What does it mean to put a sign (x) * ?? Thank you`Héctor Lépez Cel: 154137337 El viernes, 9 de marzo de 2018 09:25:18 ART, Stéphane Mottelet <[hidden email]> escribió: 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 [hidden email] 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[hidden email]http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users