필터 지우기
필터 지우기

Extrapolating a loop to a threshold

조회 수: 1 (최근 30일)
Andrew Wileman
Andrew Wileman 2015년 9월 24일
댓글: Andrew Wileman 2015년 9월 24일
Hi, I have a problem in estimating some data up to a threshold. Basically, what I would like to do is pass a data value to an equation and then loop the calculation until it reaches a threshold. Can anyone please help?

채택된 답변

Thorsten
Thorsten 2015년 9월 24일
편집: Thorsten 2015년 9월 24일
y = 2;
threshold = 10; % sample threshold
while y < threshold
y = y^2 % sample calculation, put your function here
end
  댓글 수: 1
Andrew Wileman
Andrew Wileman 2015년 9월 24일
That's great, thank you very much Thorsten.

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

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by