linear regression of a non-linear dataset
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!