123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- function [Rat, Type, Day, TetrodeNumber, ClusterNumber, Session, Sessiontype, Index1] = GetSessionInfo(name)
- a=strfind(name,'-');
- b=strfind(name,'Main');
- c=strfind(name,'.');
- if ~isempty(b)
- Rat=name(a(1)+1:a(2)-1);
- Type='Main';
- Day=name(a(2)+5:a(3)-1);
- TetrodeNumber=name(a(3)+3:a(4)-1);
- ClusterNumber=name(a(4)+2:c(1)-1);
- else
- Rat=name(a(1)+1:a(2)-1);
- Type='Pilot';
- Day=name(a(2)+6:a(3)-1);
- TetrodeNumber=name(a(3)+3:a(4)-1);
- ClusterNumber=name(a(4)+2:c(1)-1);
- end
- if str2num(Rat)==448 || str2num(Rat) == 459 || str2num(Rat) == 463
- if str2num(Day)==3
- Session='Alternation';
- Sessiontype='SS';
- Index1=1;
- elseif str2num(Day)==4
- Session='Alternation';
- Sessiontype='SSCH1';
- Index1=2;
- elseif str2num(Day)==5
- Session='Alternation';
- Sessiontype='SSCH2';
- Index1=3;
- elseif str2num(Day)==6
- Session='Alternation';
- Sessiontype='FRCH1';
- Index1=4;
- elseif str2num(Day)==7
- Session='Alternation';
- Sessiontype='FRCH2';
- Index1=5;
- elseif str2num(Day)==8
- Session='Alternation';
- Sessiontype='SSFR1';
- Index1=6;
- elseif str2num(Day)==9
- Session='Alternation';
- Sessiontype='SSFR2';
- Index1=7;
- elseif str2num(Day)==10
- Session='Tmaze';
- Sessiontype='T-SSCH1';
- Index1=14;
- elseif str2num(Day)==11
- Session='Tmaze';
- Sessiontype='T-SSCH2';
- Index1=15;
- elseif str2num(Day)==12
- Session='Tmaze';
- Sessiontype='T-Quantity1';
- Index1=16;
- elseif str2num(Day)==13
- Session='Tmaze';
- Sessiontype='T-Quantity2';
- Index1=17;
- elseif str2num(Day)==14
- Session='Alternation';
- Sessiontype='Quantity1';
- Index1=8;
- elseif str2num(Day)==15
- Session='Alternation';
- Sessiontype='Quantity2';
- Index1=9;
- end
- elseif str2num(Rat)==473 || str2num(Rat) == 488
- if str2num(Day)==1
- Session='Alternation';
- Sessiontype='SS';
- Index1=1;
- elseif str2num(Day)==2
- Session='Alternation';
- Sessiontype='SSCH1';
- Index1=2;
- elseif str2num(Day)==3
- Session='Alternation';
- Sessiontype='SSCH2';
- Index1=3;
- elseif str2num(Day)==4
- Session='Alternation';
- Sessiontype='FRCH1';
- Index1=4;
- elseif str2num(Day)==5
- Session='Alternation';
- Sessiontype='FRCH2';
- Index1=5;
- elseif str2num(Day)==6
- Session='Alternation';
- Sessiontype='SSFR1';
- Index1=6;
- elseif str2num(Day)==7
- Session='Alternation';
- Sessiontype='SSFR2';
- Index1=7;
- elseif str2num(Day)==8
- Session='Tmaze';
- Sessiontype='T-SSCH1';
- Index1=14;
- elseif str2num(Day)==9
- Session='Tmaze';
- Sessiontype='T-SSCH2';
- Index1=15;
- elseif str2num(Day)==10
- Session='Tmaze';
- Sessiontype='T-Quantity1';
- Index1=16;
- elseif str2num(Day)==11
- Session='Tmaze';
- Sessiontype='T-Quantity2';
- Index1=17;
- elseif str2num(Day)==12
- Session='Alternation';
- Sessiontype='Quantity1';
- Index1=8;
- elseif str2num(Day)==13
- Session='Alternation';
- Sessiontype='Quantity2';
- Index1=9;
- elseif str2num(Day)==14
- Session='Alternation';
- Sessiontype='SSFRCH1';
- Index1=10;
- elseif str2num(Day)==15
- Session='Alternation';
- Sessiontype='SSFRCH2';
- Index1=11;
- elseif str2num(Day)==16
- Session='Alternation';
- Sessiontype='Object1';
- Index1=12;
- elseif str2num(Day)==17
- Session='Alternation';
- Sessiontype='Object2';
- Index1=13;
- end
- elseif str2num(Rat)==509
- if isequal(Type,'Pilot')
- Session='Alternation';
- Sessiontype='SS';
- Index1=1;
- else
- if str2num(Day)==1
- Session='Alternation';
- Sessiontype='SS';
- Index1=1;
- elseif str2num(Day)==2
- Session='Alternation';
- Sessiontype='SSCH1';
- Index1=2;
- elseif str2num(Day)==3
- Session='Alternation';
- Sessiontype='SSCH2';
- Index1=3;
- elseif str2num(Day)==4
- Session='Alternation';
- Sessiontype='FRCH1';
- Index1=4;
- elseif str2num(Day)==5
- Session='Alternation';
- Sessiontype='FRCH2';
- Index1=5;
- elseif str2num(Day)==6
- Session='Alternation';
- Sessiontype='SSFR1';
- Index1=6;
- elseif str2num(Day)==7
- Session='Alternation';
- Sessiontype='SSFR2';
- Index1=7;
- elseif str2num(Day)==8
- Session='Tmaze';
- Sessiontype='T-SSCH1';
- Index1=14;
- elseif str2num(Day)==9
- Session='Tmaze';
- Sessiontype='T-SSCH2';
- Index1=15;
- elseif str2num(Day)==10
- Session='Tmaze';
- Sessiontype='T-Quantity1';
- Index1=16;
- elseif str2num(Day)==11
- Session='Tmaze';
- Sessiontype='T-Quantity2';
- Index1=17;
- elseif str2num(Day)==12
- Session='Alternation';
- Sessiontype='Quantity1';
- Index1=8;
- elseif str2num(Day)==13
- Session='Alternation';
- Sessiontype='Quantity2';
- Index1=9;
- elseif str2num(Day)==14
- Session='Alternation';
- Sessiontype='SSFRCH1';
- Index1=10;
- elseif str2num(Day)==15
- Session='Alternation';
- Sessiontype='SSFRCH2';
- Index1=11;
- elseif str2num(Day)==16
- Session='Alternation';
- Sessiontype='Object1';
- Index1=12;
- elseif str2num(Day)==17
- Session='Alternation';
- Sessiontype='Object2';
- Index1=13;
- end
- end
- end
|