Functions |
id | chEnd () |
| disp ([freq1 freq2]) elseif unlockInfo.plot.harmoNum |
harmonics to plot Zero for
basic frequency for first
harmonic else | warning ('Problems with the harmonics plotted!!!') end windSz |
| warning ('LAG!!!!')%Data eegData |
Plotting switch typePlot case
specEpoch | warning ('Plot only the Oz, O1 and O2 channels') |
Plotting switch typePlot case
specEpoch avrage and single
check matched decoded get
decoder from this specData | data () case 'spectAll'%%Subplot all set(hFig |
Higher freq bound for | xlabel ('Freq.[Hz]') |
Higher freq bound for axis
tight end case specAll Subplot
all | set (hFig,'Position',[399 49 901 768],'visible','on') fStart |
Higher freq bound for | ylabel ('Freq.[Hz]') end case 'specOrganizado!!!'set(hFig |
| subplot (chEnd-chStart+1, 1, kk) hold off imagesc(tspec(tStart |
Bold end pause end case specDcdTgt | set (hFig,'Position',[131 49 1355 768])%%Subplot all with decoder targets fStart |
| subplot ((chEnd-chStart+1)*2+1, 1,[kk *2-1 kk *2]) imagesc(tspec(tStart |
| warning ('Axis in time and freq.shifted!!!') pause end case 'eachAllSpec'%%Plot each/pause for iCh |
| title (unlockInfo.main.elecLoc{iCh},'FontWeight','Bold') xlabel('Time[s]') |
end case specWindow Plot | O2 (2:4) fStart = round(freq1*SpecInfo.hz2spec) |
Bold | xlabel ('Time[s]') |
Higher freq bound Find Oz and O2 | strcmpi (unlockInfo.main.elecLoc,'o1') case 'timeWindow'%%Time domain plots for ii |
| fprintf ('%i-%i-%i\n',[tStart tEnd ii])%Plot each channel kk=0 |
Bold | ylabel (unlockInfo.main.elecLoc{iCh},'FontWeight','Bold') xlabel('Time[s]') |
Bold | ylim ([-0.8 0.8]) axis tight end pause end%Decoded targets using the HSD%indx |
| imagesc (tspec, fspec, 10 *log((abs(flipud(squeeze((specData.data(:,:, ii)))'))))) |
| title (sprintf('Ch%i', chs(ii))) |
end Figure for function | plotSpec (allTgtMeanSpec, allTgtSpecInfo, plotInfo)%%%%%%%%%%%%%%%%Plotting each channels%for Ch |
Variables |
function | hFig |
| chStart = unlockInfo.plot.chStart |
last index for plotted channels | freq1 = unlockInfo.plot.freq1 + 1 |
Add since Freq vals start in
zero lower bound frequency | freq2 = unlockInfo.plot.freq2 |
higher bound frequency if
unlockInfo plot | harmoNum = = 1 |
Size of plotted window | movWind = unlockInfo.plot.movWind |
Size of window moves | typePlot = unlockInfo.plot.typePlot |
Type of plot | lagVal = 0.4 |
| eegTime = 0:1/unlockInfo.main.Fs:unlockInfo.main.len |
| eegDcdTgt = unlockData.dcdTgt |
| fspec = specData.fspec |
| tspec = specData.tspec |
Plotting switch typePlot case
specEpoch avrage and single | trial |
Plotting switch typePlot case
specEpoch avrage and single
check matched decoded get
decoder from this specData | Position |
Plotting switch typePlot case
specEpoch avrage and single
check matched decoded get
decoder from this specData | visible |
Plotting switch typePlot case
specEpoch avrage and single
check matched decoded get
decoder from this specData on | fStart = round(freq1*SpecInfo.hz2spec) |
Lower frequency bound | fEnd = round(freq2*SpecInfo.hz2spec) |
Higher freq bound for | iCh |
Higher freq bound for | ii |
| tEnd = ii + round(windSz*SpecInfo.sec2spec) |
converted to time samples | rawStart = round((ii/SpecInfo.sec2spec)*unlockInfo.main.Fs) |
| rawEnd = round((windSz + ii/SpecInfo.sec2spec)*unlockInfo.main.Fs) |
Plot each channel | kk = 0 |
| FontWeight |
Bold end subplot((chEnd-chStart+1)*2+1,
1,(chEnd-chStart+1)*2+1) plot(eegTime(rawStart
axis | tight |
end case specWindow Plot | O1 |
end case specWindow Plot | Oz |
| dcdTgt = unlockData.dcdTgt(indx) |
unlockInfo main elecLoc | totalTime = unlockInfo.main.szData(1)/unlockInfo.main.Fs |
for | iChs |
| loco |