フィルターのクリア

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 ビュー (過去 30 日間)
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 件)

the cyclist
the cyclist 2013 年 6 月 2 日
編集済み: the cyclist 2013 年 6 月 2 日
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 件のコメント
mohamed
mohamed 2013 年 6 月 2 日
sorry, i want to know how to combine my X and Y values into one array
the cyclist
the cyclist 2013 年 6 月 2 日
If X and Y are column vectors, then you can combine them as so:
[X Y]

サインインしてコメントする。


Image Analyst
Image Analyst 2013 年 6 月 2 日

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by