Readonly: Operands to the || and && operators must be convertable to logical scalar values. is eqal3, 153
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, Can any one have idea, how to resolve it. This is freqently appearing when I run my code.
0 件のコメント
回答 (1 件)
Aravind Ravikumar
2019 年 6 月 20 日
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 件のコメント
Aravind Ravikumar
2019 年 6 月 20 日
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?
参考
カテゴリ
Help Center および File Exchange で EEG/MEG/ECoG についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!