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

3 次查看(过去 30 天)
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?

采纳的回答

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