Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

While loop won't plot while remebering numbers

1 Ansicht (letzte 30 Tage)
NielsDS
NielsDS am 5 Dez. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I'm trying to write a kind of gambling game, in which all the results should be plotted in a graph. I used a While loop and nestled a switch in it, the program works but it won't plot. Would be great to get some help!
Small piece of the programm

Antworten (1)

Kelly Kearney
Kelly Kearney am 5 Dez. 2016
You're overwriting b each time though the loop, and not saving values to an array as you go along. So at the time of plotting, both b and n are scalars. And if you plot a single plot point without a marker, nothing will be visible.

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by