In a loop: Operands to the || and && operators must be convertible to logical scalar values

Hi! I need to analyze some EEGs comparing all the EEGs between the files called CSC14 and CSC24 to one called CSC1. So inside the loop of the analysis I've inserted this one:
for fl=1:length(filenames) filename = filenames{fl}; tetname=filename(regexp(filename,'\d')); %extracts the tetrode number from the file name tetnum=str2double(tetname); if tetnum<14 tetnum>24;
continue;
end
But for some reasons I get this error:
Operands to the || and && operators must be convertible to logical scalar values
How can I solve it? Thanks a lot.

 採用された回答

José-Luis
José-Luis 2014 年 6 月 23 日
if tetnum<14 tetnum>24
I assume you meant:
if (tetnum <14 || tetnum>24)
or something similar

1 件のコメント

Ambra
Ambra 2014 年 6 月 23 日
Oh, man, I'm terrible! That was a stupid error! =D Thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEEG/MEG/ECoG についてさらに検索

製品

質問済み:

2014 年 6 月 23 日

コメント済み:

2014 年 6 月 23 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by