Linear regression to a matrix

22 vues (au cours des 30 derniers jours)
Chenglong Li
Chenglong Li le 26 Mai 2020
Commenté : ruizhi yang le 31 Mar 2021
Hi,
Suppose there is an observed matrix , how can I find a linear regression () via , where is a given matrix, and =ones(m,n)?
As I know, Matlab provides some solutions for the case of the obseved vector , such as regress, but not for the observed matrix.
Thanks!
  1 commentaire
ruizhi yang
ruizhi yang le 31 Mar 2021
Your question is very clear. How did you solve this problem? can you share?thanks a lot

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 26 Mai 2020
P = polyfit(X,Y,1)
  2 commentaires
KSSV
KSSV le 26 Mai 2020
The polyfit gives you approximate, using the above is more apt.
Chenglong Li
Chenglong Li le 26 Mai 2020
Thanks a lot! :)

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by