I’m trying to plot a line between two points: a(xa,ya) and b(xb,yb). How can I do that in Scilab?
Thanks in advance for your help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I find it convenient to do this with the
plotcommand. Assemble your vertices as arrays of [x0 x1 x2 x3 …] and [y0 y1 y2 y3 …] and then feed them intoplot.So to draw a line from (0,0) to (30,40) you could use:
You can give it matrices to have it plot multiple lines in one command – type
help plotin the console to get the specifics of the row/column conventions.