Question 1: Create a function that returns true if the input is a numeric array and false otherwise.
• Function Name: isNumeric
• Input: single input which may be any data class (this function does not have multiple inputs)
• Output: the output is true or false
This is what I presently have in a function m file function [output] = isNumeric(input)
%if the input is an array, the output will be "true". if the input is not
%an array, the output will be "false"
isnumeric(input);
if input == true
output=true
else
output=false
end
I have this in a script; it is an arbitrary input
x = 1
isNumeric(x)
Problem: how do you solve this problem and why does MATLAB keep telling that you need more input arguments?
I cannot seem to get this to work for some reason could somebody provide me a MATLAB code?