Filter löschen
Filter löschen

Problem in loop in programme

1 Ansicht (letzte 30 Tage)
Mahesh Dalwani
Mahesh Dalwani am 4 Apr. 2020
Beantwortet: Shivani Dixit am 30 Jun. 2021
When I'm typing i=2:10 in programme, I'm getting a i=2. It's kind of wierd.Can anyone tell what is the problem.
  2 Kommentare
dpb
dpb am 4 Apr. 2020
Not in isolation, no...need enough sample code to reproduce symptom.
Most likely while you're trying to do that you'll uncover the problem yourself... :)
Urmila Rajpurohith
Urmila Rajpurohith am 7 Apr. 2020
Bearbeitet: Urmila Rajpurohith am 7 Apr. 2020
Are you still facing the issue?
If yes, sharing of the sample code will be helpful to reproduce the issue.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Shivani Dixit
Shivani Dixit am 30 Jun. 2021
As per the problem encountered , if you are using it in a loop in a program, the iterating variable 'i' would take up the value as 10 after the program ends. As mentioned the variable 'i' takes a value of 2 , it maybe possible that only first index of i gets assigned to it.
You can share your program details for a better understanding of the problem.

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by