我嘗試對存盤在多個矩陣(Matlab)中的資料進行線性回歸。對于向量,線性回歸非常簡單:
%x-values
x = [1.5;2.5;5]; %x-vector
%y-values
y = [9;11.1;17]; %y-vector
%Regression:
X = [ones(length(x),1) x] %Matrix to do the backslash calculation--> how can I set that up if I have a matrix for x and not a vector?
m2 = X\y;
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/490774.html
下一篇:跨單獨mat檔案的平均雙精度陣列