How to check the type of input
Show older comments
How would I be able to check for the correct input value for a function, say I'm expecting a number but instead they put in a character?
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 1 Mar 2014
Edited: Azzi Abdelmalek
on 1 Mar 2014
Use class function
s='err'
class(s)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!