help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: am helpless


From: James Sherman Jr.
Subject: Re: am helpless
Date: Thu, 8 Mar 2012 17:32:56 -0500

On Thu, Mar 8, 2012 at 5:01 PM, joseph appau <address@hidden> wrote:

last i said how do i use octave to plot x,y= (0,1 )(2,0 )(3,1 )(3,2 )(3,1) to produce a straight line
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave

I'm not quite sure what you're asking.  Are you asking to plot those points?  You can plot those points by using the plot command (use "help plot" to see more info).  For your example (if I'm reading those as a series of xy ordered pairs),

x = [0, 2, 3, 3, 3];
y = [1, 0, 1, 2, 1];
plot(x,y);

but these don't (as I'm sure you're aware) lie on a straight line.  If you're looking to find a best fit line, use the polyfit command to output the coefficients of the line (i.e. a polynomial with degree 1).  Again, "help polyfit" for more detailed info.

p = polyfit(x,y, 1);

I do remember the last email you sent, and another responded by asking what you have tried so that we help you with what precisely you want to do, and I don't believe I ever saw a response from you.

James Sherman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]