while loop index exceeds array elements problem

4 Ansichten (letzte 30 Tage)
mason beal
mason beal am 23 Mär. 2021
Bearbeitet: Veronica Taurino am 23 Mär. 2021
I am trying to run multiple iterations of this while loop to determine the reynolds number for various mass flow rates.. The first loop works perfectly, but when it gets to the second loop it gives me the error "Index exceeds array elements (1)" which is odd because I set up both loops the same way.. I tried reloading matlab but got the same
  11 Kommentare
DGM
DGM am 23 Mär. 2021
Glad to hear it!

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Veronica Taurino
Veronica Taurino am 23 Mär. 2021
Bearbeitet: Veronica Taurino am 23 Mär. 2021
Did you check your variable "i" has been set up to your desired value in the second while? Because in the first while you are updating it, so that the final value of ''i'' from the first "while" will be the input "i" for the second while.

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by