フィルターのクリア

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
parslee
parslee 2022 年 3 月 17 日
Thank you!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFit Postprocessing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by