123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- %% Fig. 1I - Example cell traces
- clear
- close all
- % ===========================================
- %% Plot calcium traces of three example cells
- % ===========================================
- %prepare variables
- load('Fig1i.mat');
- TimeWinFrame = [-15:1:120];% -0.5 s to 4.0 s
- fs = 30;
- for iTrialType = 1:3 %1: Go, 2: Nogo, 3: Catch
-
- meanResp = [];
- SEM = [];
-
- switch iTrialType
- case 1 %Go trial
- fig1 = figure; %Go trial
- fig1.Position = [50 50 150 300];
- meanResp = meanCalciumGo;
- SEM = ErrCalciumGo;
- Color = 'r';
- suptitle('Go');
- case 2 %Nogo trial
- fig2 = figure; %Nogo trial
- fig2.Position = [200 200 150 300];
- meanResp = meanCalciumNogo;
- SEM = ErrCalciumNogo;
- Color = 'g';
- suptitle('Nogo');
- case 3 %Catch trial
- fig3 = figure; %Catch trial
- fig3.Position = [350 350 150 300];
- meanResp = meanCalciumCatch;
- SEM = ErrCalciumCatch;
- Color = 'c';
- suptitle('Catch');
- end%switch iTrialType
-
- for iCell = 1:3 % Three example cells
- subplot(3, 1, iCell);
- shadedErrorBar(TimeWinFrame/fs, meanResp(iCell, :), SEM(iCell, :), 'lineprops', Color);
- hold on;
- box off
-
- xlim([-0.5 4.0]);
- ylim([-1 2]);
-
- vline([0 2 4]);
- hline(0, 'k');
- end%for iCell
- end%for iTrialType
|