I built this small while loop in order to consistently reduce total supply until it is below or equal to total demand. The calculation is relatively simple and should only require the loop to iterate a handful of times (sub 100).
Yet, when I run, the price only reduces by one increment and the counter shoots up infinitely. Can anyone help?
Thanks
Cita come
Jordan Bisset (2026). Issue with While loop (https://it.mathworks.com/matlabcentral/fileexchange/66970-issue-with-while-loop), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2017b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Scopri di più su Loops and Conditional Statements in Help Center e MATLAB Answers
Tag
Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0.0 |
