Readonly: Operands to the || and && operators must be convertable to logical scalar values. is eqal3, 153
1 view (last 30 days)
Show older comments
Hi, Can any one have idea, how to resolve it. This is freqently appearing when I run my code.
0 Comments
Answers (1)
Aravind Ravikumar
on 20 Jun 2019
You get this when one or both operands are arrays. E.g.,
>> [1 2 3] && [4 5 6]
Operands to the || and && operators must be convertible to logical scalar values.
Check the two expressions or variables you are using for the || or && operation. You are using them as scalars but they are not.
2 Comments
Aravind Ravikumar
on 20 Jun 2019
The only way I can imagine the error being genereted is cause of z_c(k,1).size(1,x) not being a scalar. Could you maybe try logging that before the if statements? Also, could you try using z_c(k).size(x) instead?
See Also
Categories
Find more on EEG/MEG/ECoG 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!