How can i connect dots with linear regression?

4 vues (au cours des 30 derniers jours)
Volkan Yangin
Volkan Yangin le 27 Oct 2016
Hi everbody
I have a matrix consisting 511 data points and i should connect some points with linear regression, for ex: from 1 to 15, from 15 to 66, from 66 to 121 etc. New matrix must have same size with previous matrix.
How type a code can be written for this operation?
I think, i can use if commands but i haven't created a scenario.
  1 commentaire
Jos (10584)
Jos (10584) le 27 Oct 2016
what does "connect dots with linear regression" mean?

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 27 Oct 2016
Just use polyfit() on each chunk of points. See attached polyfit demo.

Plus de réponses (0)

Catégories

En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by