how to define an iteration number ?

조회 수: 24 (최근 30일)
Safia
Safia 2022년 11월 19일
댓글: Safia 2022년 11월 19일
Hi all!
i'm trying to implement a program in matlab attached, i'm wondering how to define the number of iteration j?

답변 (1개)

Torsten
Torsten 2022년 11월 19일
The number of iterations is initialized as 0 :
i = 0;
Within the while loop, for each time the while loop is repeated, the number of iterations i is increased by 1:
i = i+1;
  댓글 수: 14
Torsten
Torsten 2022년 11월 19일
I really don't understand the problem. If you save x in each of the iteration loops (maybe by overwriting a previous x), all would be fine, wouldn't it ?
Safia
Safia 2022년 11월 19일
@Torsten the current x used will be replaced by the output result to do the calculation in next iteration.

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

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by