I have values for three different variables Z ,X,Y : how can i get the least square regression equation of Z on X and Y
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have values for three different variables Z ,X,Y : how can i get the least square regression equation of Z on X and Y
0 Kommentare
Antworten (2)
the cyclist
am 2 Jun. 2013
Bearbeitet: the cyclist
am 2 Jun. 2013
You could use either the regress() function or the LinearModel.fit() function.
doc regress
or
doc LinearModel.fit
for details.
In each case, you'll need to combine your X and Y values into one array (predictor variables) and use Z for the response variable.
2 Kommentare
the cyclist
am 2 Jun. 2013
If X and Y are column vectors, then you can combine them as so:
[X Y]
Image Analyst
am 2 Jun. 2013
I use John D'Errico's polyfitn(): http://www.mathworks.com/matlabcentral/fileexchange/34765-polyfitn
0 Kommentare
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!