644333a8c37a8d2e2d8c96c91ddc26d0d0b667b7
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

1) function plotDecodePerformance(varargin)
2) % plotDecodePerformance(timeline,decodePerformance,nClasses,rawData)
3) 
4) if(nargin==1)
5)     inputStruct       = cell2mat(varargin(1));
6)     
7)     psthStart         = inputStruct.psthStart;
8)     psthEnd           = inputStruct.psthEnd;
9)     nClasses          = inputStruct.nClasses;
10)     decodePerformance = inputStruct.decodePerformance;
11)     frameStart        = inputStruct.frameShiftStart;
12)     frameEnd          = inputStruct.frameShiftEnd;
13)     psth              = inputStruct.rawTimeCourse;
14)     SubjectID         = inputStruct.SubjectID;
15)     
16)     
17) elseif( nargin == 7)
18)     
19)     psthStart   = cell2mat(varargin(1));
20)     psthEnd     = cell2mat(varargin(2));
21)     nClasses    = cell2mat(varargin(3));
22)     decodePerformance = cell2mat(varargin(4));
23)     frameStart  = cell2mat(varargin(5));
24)     frameEnd    = cell2mat(varargin(6));
25)     psth        = varargin(7);
26)     psth        = psth{1};
27)     SubjectID   = '';
28) end
29) 
30)     f = figure;
31)     subplot(2,1,1);
32)     hold on;
33)       for voxel = 1:size(psth,2)
34)           for label = 1:size(psth{voxel},2)
35)               psthData = [];
36)               for timepoint = 1:size(psth{voxel}{label},2)
37)                   psthData = nanmean(psth{voxel}{label})+voxel/100;
38)               end
39)               plot(psthStart:psthEnd,psthData,[colorChooser(voxel), lineStyleChooser(label)]);
40)           end
41)       end
42) %     axis([psthStart psthEnd 0 0])
43)     hold off
44)     
45)     subplot(2,1,2)    
46)     hold on;
Christoph Budziszewski gui layout finished

Christoph Budziszewski authored 15 years ago

47)     
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

48)     chanceLevel = 100/nClasses;
49)     goodPredictionLevel = chanceLevel*1.5;
50)     plot([psthStart psthEnd],[chanceLevel chanceLevel],'r');
51)     plot([psthStart psthEnd],[goodPredictionLevel goodPredictionLevel],'g');
52)     axis([psthStart psthEnd 0 100])
Christoph Budziszewski gui layout finished

Christoph Budziszewski authored 15 years ago

53)     
54)     plot(frameStart:frameEnd, decodePerformance ,'b');