Is there any way to put a nlinfit function in a for loop?

1 次查看(过去 30 天)
Hello every body. Is there any way to put a nlinfit function in a for loop?
  2 个评论
Star Strider
Star Strider 2021-11-14
Yes.
Please be a bit more specific about the application and desired result. (With all due respect, an ambiguous question will produce only an ambiguous answer.)
Sargondjani
Sargondjani 2021-11-14
Please be more specific? Are your Y's different data sets, or your X's, or both?
Assume X are 2D matrices stored in a 3D array, and Ys as column vectors in a 2D matrix:
for ii = 1:nn
beta(:,ii) = nlinfit(X(:,:,ii),Y(:,ii),modelfun,beta0)
end
where you should pre-allocate beta.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by