In a loop: Operands to the || and && operators must be convertible to logical scalar values
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposta accettata
José-Luis
il 23 Giu 2014
if tetnum<14 tetnum>24
I assume you meant:
if (tetnum <14 || tetnum>24)
or something similar
Più risposte (0)
Vedere anche
Categorie
Scopri di più su EEG/MEG/ECoG in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!