You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: diamond-maze-behavior/resampleDiamondMazeTrials.m
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
end
15
15
16
16
%sets time window for resampling to constant sampling rate (in time)
17
-
newTrialSampSize = round(trialdata.trialdur/params.constSampRateTime); %find out how many samples should be in new vect
17
+
newTrialSampSize = round(trialdata.trialdurRaw/params.constSampRateTime); %find out how many samples should be in new vect
18
18
newTimes =trialdata.timeRaw(1):params.constSampRateTime:((newTrialSampSize*params.constSampRateTime)+trialdata.timeRaw(1)); %get times from start to end with const time window
19
19
for i =1:length(fnames2resample)
20
20
resampledVect = interp1(trialdata.timeRaw,trialdata.([fnames2resample{i} 'Raw']),newTimes,'linear','extrap'); %added extrap to get rid of accidental nan values in the data
oldValues = [startingValue; trialdata.([fnames2findsteppoints{i} 'Raw'])(oldInds); endingValue]; %gets values at each of the indices for stepping through
36
-
36
+
37
37
%make new vector with step functions with step occurring at each ind
0 commit comments