フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

While loop won't plot while remebering numbers

1 回表示 (過去 30 日間)
NielsDS
NielsDS 2016 年 12 月 5 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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

回答 (1 件)

Kelly Kearney
Kelly Kearney 2016 年 12 月 5 日
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.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by