Filter löschen
Filter löschen

Multiple things to call into a loop

1 Ansicht (letzte 30 Tage)
Jan
Jan am 16 Apr. 2012
I define the subject numbers like this:
subno={'s_01', 's_02','s_03', 's_04', 's_05', 's_06','s_07', 's_08', 's_09', 's_10','s_11', 's_12', 's_13', 's_14','s_15', 's_16', 's_17', 's_18','s_19', 's_20', 's_21', 's_22','s_23', 's_24', 's_25', 's_26', 's_27','s_28', 's_29','s_30', 's_31', 's_32', 's_33', 's_34', 's_35', 's_36', 's_37','s_38', 's_39'};
Each of the .vhdr and .eeg files of each subjects are stored within these files. So I need to ask the script to first enter each of these one by one. I did it like this:
for p=1:length(subno)
%defining paths
MAIN = '/data/janani/EoA/rawdata';
PATHIN=[MAIN, '/subno{p}'];
PATHOUT=[MAIN, '/EKGanalysis/'];
But when I run even just this much it says the letter ´p´ is an unknown variable even though I´ve defined that it is the number of items in subno array. What is wrong with what I´ve written? How can I make it understand that ´p´ is supposed to code for s_01 and s_02 and so on in that order?
Thank you!

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 16 Apr. 2012
['/',subno{p}] instead of '/subno{p}'

Weitere Antworten (0)

Kategorien

Mehr zu EEG/MEG/ECoG finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by