필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Ashkan Rigi
Ashkan Rigi 2021년 11월 14일
댓글: Sargondjani 2021년 11월 14일
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