필터 지우기
필터 지우기

How to deal with (i-1)th iteration

조회 수: 3 (최근 30일)
Godas Srikar
Godas Srikar 2020년 4월 24일
답변: KSSV 2020년 4월 24일
Hi
I am drafting a program that involves "for" loop in which there is a term with A(i-1) in an expression. In this case, for the first iteration, i-1 results to zero but there won't be any value stored for A(0). How to deal with such situation

채택된 답변

KSSV
KSSV 2020년 4월 24일
You need to start iteration with 2 ...or take iteration from 1 to n-1.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by