forked from ianrmurphy/PIDtoolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPTphaseShiftDeg.m
More file actions
15 lines (12 loc) · 780 Bytes
/
PTphaseShiftDeg.m
File metadata and controls
15 lines (12 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function [phase_shift_deg] = PTphaseShiftDeg(delay_ms, freq_of_interest_hz)
% convert filter delay to phase shift in deg
% [phase_shift_deg] = PTphaseShiftDeg(delay_ms, freq_of_interest_hz), self
% explanatory
% ----------------------------------------------------------------------------------
% "THE BEER-WARE LICENSE" (Revision 42):
% <brian.white@queensu.ca> wrote this file. As long as you retain this notice you
% can do whatever you want with this stuff. If we meet some day, and you think
% this stuff is worth it, you can buy me a beer in return. -Brian White
% ----------------------------------------------------------------------------------
period_of_freq_of_interest_ms = 1000/freq_of_interest_hz;
phase_shift_deg = delay_ms / period_of_freq_of_interest_ms * 360;