Hello,
When you type ' plot(X,Y) ', Scilab links together the consecutive
[X(i),Y(i)] pairs.
In your example, X(40)~6.28 and X(41)=0.
So [X(40), Y(40)] is connected to [X(41), Y(41)], and the "additional
line" represents that simple connection.
' plot(x,y1,x,y2); ' considers [x, y1] and [x, y2] as two distinct
curves, so they are not linked together.
Hope this helps,
Regards,
Paul
On 08/18/2014 04:15 AM, ?? wrote:
Hi , All:
I have a question about plotting.
I want to plot 2 lines in a graphic , so I type the command as below:
-->x=linspace(0,2*%pi,40);
-->y1=sin(x)
-->y2=cos(x);
-->X=[x,x];
-->Y=[y1,y2];
Then , I type the plot command :
-->plot(x,y1,x,y2);
The result is shown as below:
Graphic window number 0 (2).bmp
But when I type a command as below:
-->plot(X,Y);
The result is :
Graphic window number 0.bmp
It has an additional line.
Why will this line appear?
Thanks for your reply.
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
--
Paul BIGNIER
Development engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.69
http://www.scilab-enterprises.com
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users