dpb <firstname.lastname@example.org> wrote in message <email@example.com>... > On 3/23/2013 6:17 PM, angelina wrote: > ... > > > The thing is , that for the first line I don't have the equation.I only > > have the three points .Is there a way to find it in Matlab? > > How would you find it given the points using pencil and paper? That > should give you an idea of how to find it using Matlab. > > Do you know a priori the points are identically on a straight line or is > this a regression problem? > > --
doc polyfit, polyval for starters for fitting 3 points to a line. Although there are many other ways to do this in Matlab.
doc anonymous function (@ symbol) for user created functions, again many ways to do this as polyval above does, provided the right inputs.
Be adventurous.... I realize that this may seem like a big problem but what you are asking is very straight forward. Take some time, read the documentation and play around in Matlab to solve your problem. I promise, you won't break anything.