Skip to content

Commit

Permalink
Update Window.m
Browse files Browse the repository at this point in the history
moved up/dnCrossings out of plot code so that it's made even without a plot
  • Loading branch information
petersaj committed Nov 15, 2019
1 parent a457708 commit 7d6b601
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions +hw/+ptb/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,8 @@ function applyCalibration(obj, cal)

% correct the data
clock = circshift(clock,[ishift,0]);
upCrossings = find(diff( clock > 1 ) == 1);
dnCrossings = find(diff( clock > 1 ) == -1);

%% plot the data
if makePlot
Expand All @@ -684,10 +686,7 @@ function applyCalibration(obj, cal)

figure; plot(tt,clock);
ylabel('clock signal'); title('Clock');

upCrossings = find(diff( clock > 1 ) == 1);
dnCrossings = find(diff( clock > 1 ) == -1);


figure; clf
for iC = 1:length(upCrossings)
plot(tt(upCrossings(iC))*[1 1],[0 5],'-', ...
Expand Down

0 comments on commit 7d6b601

Please sign in to comment.