Polyfit - Forcing a non-zero intercept
Mostra commenti meno recenti
Hi,
Is there any way to specify the y-intercept value of polyfit? I have had a look around, and when this question is asked most people are trying to fit it to a 0 y-intercept. In my case, I need to fit least-square lines to several different groups of points whose y-intercepts are known and are non-zero.
Any help would be great,
FP
Risposta accettata
Più risposte (1)
So you just have a slope to estimate? It should be just
slope=xData\(yData-yIntercept);
Categorie
Scopri di più su Linear and Nonlinear Regression in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!