Hi everyone, why do I receive "Test Results: Incorrect!" even if i'm doing exactly what is shown in the solution? MATLAB Onramp
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lorenzo Di Mauro
am 24 Mär. 2023
Kommentiert: Lorenzo Di Mauro
am 24 Mär. 2023
i'm working on MATLAB Onramp, in the section Programming>Decision Branching. test results incorrect to the left, my code in the middle, matlab onramp solution to the right. i don't understand, what does it mean "When doPlot is 0, did you not plot the data?". what am i supposed to do?
0 Kommentare
Akzeptierte Antwort
VBBV
am 24 Mär. 2023
Bearbeitet: VBBV
am 24 Mär. 2023
You are plotting code from lines 9 to 14 if the condition doPlot == 1, Instead of 5 to 8. Place the if statement beginning from line 4 and plot inside.
3 Kommentare
VBBV
am 24 Mär. 2023
You have additional lines of code for plotting beginning from line 5 and they get plotted no matter if the doPlot is equal to 1 or 0 as they are outside of the if statement
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!