Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
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

Réponses (2)

the cyclist
the cyclist le 2 Juin 2013
Modifié(e) : the cyclist le 2 Juin 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 commentaires
mohamed
mohamed le 2 Juin 2013
sorry, i want to know how to combine my X and Y values into one array
the cyclist
the cyclist le 2 Juin 2013
If X and Y are column vectors, then you can combine them as so:
[X Y]

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 2 Juin 2013

Catégories

En savoir plus sur Linear Algebra 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