Check if a number of varibles in a function satifies a condition.
Mostrar comentarios más antiguos
Say for example I had the function
function [d,e] = examplefunction(a,b,c,d,e)
end
I would like to check if the inputs satify predetermined conditions such as, are all inputs numbers, do the inputs fall within their respective ranges, do more than one input equal zero.I was thinking I would use a variety of if else statements including the
tf = isa(obj,ClassName)
function. Then build a matrix of these logical values and see if any are false. My promblem is that I dont know if this is the most efficient way of doing this plus I dont know how I would compare multiple input varibles at once.
Any help would be appreciated.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Type Identification en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!