Readonly: Operands to the || and && operators must be convertable to logical scalar values. is eqal3, 153
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
![error.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/225596/error.png)
Hi, Can any one have idea, how to resolve it. This is freqently appearing when I run my code.
0 comentarios
Respuestas (1)
Aravind Ravikumar
el 20 de Jun. de 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 comentarios
Aravind Ravikumar
el 20 de Jun. de 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?
Ver también
Categorías
Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!