error ' Undefined function 'AND' for input arguments of type 'logical'.''
Show older comments
i am doing a threshold on three pictures and afterwards applying AND logical operator between them but im getting this error .. this is the line find = AND( Part2_S11 & Part2_S12 & Part2_S22 ) ;
4 Comments
David Fletcher
on 11 Mar 2018
Isn't just Part2_S11 & Part2_S12 & Part2_S22 what you want to do? What is the purpose of AND(...). Do you mean and(...) and if so then it will need two arguments, not just the one (the result of Part2_S11 & Part2_S12 & Part2_S22) that it is operating on in your code
AND( Part2_S11 & Part2_S12 & Part2_S22 )
David Fletcher
on 11 Mar 2018
Edited: David Fletcher
on 11 Mar 2018
Isnt that what you were doing with Part2_S11 & Part2_S12 & Part2_S22. When written the and function is lowercase, not uppercase, and it operates on two arguments, not three and not one. Assuming all the matrices are logicals of the same size doesn't this do what you want?
find = Part2_S11 & Part2_S12 & Part2_S22
Walter Roberson
on 12 Mar 2018
Your arrays appear have at least one complex valued component. It does not make sense to to AND them.
Answers (1)
Fangjun Jiang
on 11 Mar 2018
0 votes
use low case, "and"
Categories
Find more on Image Arithmetic 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!