- You currently only check for absolute values if the value is negative, but what would happen if a positive value was above 200? (hint: you should likely use an additional non-nested if statement to check the second condition)
- Your use of warning and error are correct
How do i produce a warning and an error for the user
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
The task is to promt the user to enter an input between 0 and 200.I have to produce a warning and take the asbolute value. If the absolute value is greater than 200 I have to produce an error and terminate the program. This is what i have so far.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/239099/image.png)
0 Commenti
Risposte (1)
thoughtGarden
il 20 Set 2019
The task is to... sounds like homework!
I'll provide some food for thought
0 Commenti
Vedere anche
Categorie
Scopri di più su Language Fundamentals in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!