필터 지우기
필터 지우기

How to fit an exponential curve for every column in a matrix?

조회 수: 3 (최근 30일)
parslee
parslee 2022년 3월 17일
댓글: parslee 2022년 3월 17일
I have a matrix of 257x36 and each column represents a different data set.
I need to apply an exponential fit to each column and also store the fit values.
How can I go about doing this?
  댓글 수: 2
Torsten
Torsten 2022년 3월 17일
And what are the corresponding x-values to the y-values in the columns ?
parslee
parslee 2022년 3월 17일
x is 1 to 257 for all of them

댓글을 달려면 로그인하십시오.

채택된 답변

David Hill
David Hill 2022년 3월 17일
for k=1:36
B{k}=fit((1:257)',A(:,k),'exp1');
end
  댓글 수: 5
Torsten
Torsten 2022년 3월 17일
편집: Torsten 2022년 3월 17일
for k=1:36
B{k} = fit((1:257)',A(:,k),'exp1');
coeffs = coeffvalues(B{k});
Ahat(:,k) = coeffs(1)*exp(coeffs(2)*(1:257).');
end

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by