Educational: Validating User Inputs (numbers and strings)

error checking, user stopping, validating user inputs
11 téléchargements
Mise à jour 27 nov. 2021

Afficher la licence

This code is explained in the following YouTube Video:
While Loops - Validate User Input: https://youtu.be/LyKb1MvCiG8
In this video I cover how to code while loops in MATLAB and how these can be used to control the type of information your user must provide to continue in the code (user stopping, error checking, validating user input). I provide two main demonstrations: 1. error checking a number (whole, positive number less than or equal to 157) and 2. error checking a string (yes or no).
For more of my YouTube Videos, check out my MATLAB tutorial playlist: https://youtube.com/playlist?list=PLmB_c16LoAcWz_5qK1XpBlP0DiD6cgU-r
Also subscribe to my channel (Engineering with Dr. Kelsey Joy): https://www.youtube.com/channel/UCmZl7PfanvCILyiQ5R9rONA

Citation pour cette source

Dr. Kelsey Joy (2026). Educational: Validating User Inputs (numbers and strings) (https://fr.mathworks.com/matlabcentral/fileexchange/102674-educational-validating-user-inputs-numbers-and-strings), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2021b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Version Publié le Notes de version
1.0.0