linear regression of a non-linear dataset

1 回表示 (過去 30 日間)
J.P.
J.P. 2016 年 11 月 11 日
Hello,
I want to use a linear regression for every three datas of my given dataset x1. I have a 3x480 matrix full of this data in the x and the y dimension. I was thinking of fitting every collom (3 datapoints) once and put the result of my magnitude into an array. I tried it using this loop:
U=double.empty(3,(length(x1)),0);
for u=1:1:length(x1)
uu = fitlm(x1(1:3,u),y1(1:3,u));
U(1:3,u)=uu.Fitted(1:3,1);
end
But it gives the Error
Attempt to grow array along ambiguous dimension.
Error in polyfit_Inet_v4 (line 26)
What am I doing wrong? Thank you for your help!

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by