How exactly does 'OR' logic works in Matlab. Getting Wrong answers.
Show older comments
How can the following be true?? The single and the double bar gives the following as true, but it's clearly wrong... What am I missing?
>> 'D' == 'A' | 'C' | 'I'
ans =
1
>> 'D'=='A'||'C'||'I'
ans =
1
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings 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!