MATLAB: Matlabonramp 13.2.

13.2

The elseif keyword can be used after if to add more conditions. You can include multiple elseif blocks.
Try adding a variable doDisplay to toggle if the densities are displayed. Add this condition with an elseif block.
I don't really understand or know what to write and what the task wants. What does mean "to toggle" here mean?
This is the furhther practice from the Matlab Onramp course chapter 13

Best Answer

"Toggle" means to switch between to states (on/off, yes/no, in/out, show/hide, etc).
A Further Practice section is an area to practice what you have learned. Here, you are provided with a suggestion of what you could do. The suggestion is to replace "else" with "elseif". This creates the opportunity to test a second condition, doDisplay. Follow the same steps you used to create the first condition, doPlot.
Related Question