MATLAB: Multiple things to call into a loop

loop

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!

Best Answer

['/',subno{p}] instead of '/subno{p}'