Say I had a row vector: A= [1,4,5.6]
and I wanted to have the following
if floor(A)~=A
error('vector contains non-integers')
else
*rest of program*
end
How would I need my code to be such that I can display the error message (and hence stop the program) if at least one of the elements in the row vector meets the if
conditions?