Data extraction and intersection of trendline offset through points

Hello everyone,
First I have to extract different sets of data, then I have to make a trendline through specific set of points, make an offset line and determinating their intersection (for every extracted set of data). If someone can help me I can describe problem in more detail.
Thank you, best regards.

 Accepted Answer

Sounds like a job for the \ operator (which you can find described under the name "mldivide")

1 Comment

In classic Y=m*X+b form:
MB = [X(:),ones(length(X),1)] \ Y(:);
M = MB(1);
B = MB(2);

Sign in to comment.

More Answers (1)

I think I'll need more than this since I'm a newbie matlab user...

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!