linear regression of a non-linear dataset
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!