MATLAB Answers

What condition to use for checking whether at least a single negative element in a array?

1 view (last 30 days)
Neil Sam
Neil Sam on 10 Apr 2018
Commented: Neil Sam on 10 Apr 2018
For example, what condition to use instead of '<' to execute the content inside if (to check if whether at least a single negative entry exists)?
A=[1;-1];
B=[3;4];
if (A.*B < 0)
disp (A.*B)
end

  0 Comments

Sign in to comment.

Accepted Answer

More Answers (0)