Checking if sides of triangle are positive and if equality rule is satisfied.
Show older comments
So, I could easily do this using multiple if statements but that seems fairly repetitive. Is there an and or operator in MATLAB so that I could say: if a <= 0 and or b <= 0 and or c <= 0 error... end
And, then do a similar thing with the equality. Sorry for the fairly simple questions, first week or so using MATLAB.
Accepted Answer
More Answers (1)
Image Analyst
on 2 Oct 2013
if a<=0 || b<=0 || c<=0
% It's bad
end
Categories
Find more on Argument Definitions 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!