-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajhdsp.sty
101 lines (98 loc) · 2.21 KB
/
ajhdsp.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
\ProvidesPackage{ajhdsp}[2012/10/10 Alex's digital signal processing helpers]
\RequirePackage[free-standing-units]{siunitx}
\RequirePackage{amsmath,amssymb}
\RequirePackage{pgfplots,pgfplotstable}
\newcommand{\conv}[0]{\ast}
\newcommand{\convp}[0]{\circledast}
\newcommand{\marker}[1]{\ensuremath{\smash{\overset{\Downarrow}{#1}}}}
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\rect}{rect}
\pgfplotsset{
%
compat=1.5.1,
%
ajh dsp base plot/.style={
scaled x ticks = false,
x tick label style={/pgf/number format/fixed,},
},
%
full width/.style={
scale only axis,
height=0.25\textwidth,
width=1\textwidth,
},
%
half size/.style={
scale only axis,
height=0.25\textwidth,
width=0.45\textwidth,
},
%
pz plot/.style={
every axis plot post/.style={
only marks,
mark options={scale=1.5},
},
height=2.75in, width=2.75in,
axis x line=center,
axis y line=center,
every axis x label/.style={at={(current axis.right of origin)},anchor=west},
every axis y label/.style={at={(current axis.above origin)},anchor=south},
xmin=-1.1, xmax=1.1,
ymin=-1.1, ymax=1.1,
every tick label/.style={anchor=north east},
xlabel={$\mathrm{Re}[z]$},
ylabel={$\mathrm{Im}[z]$},
execute at begin axis={\draw[gray!50,thin] (axis cs:0,0) circle[radius=1];},
},
%
discrete ir/.style={
ajh dsp base plot,
every axis plot post/.style={
mark=*,
mark options={scale=0.75},
ycomb,
},
xmin=0,
ymin=0,
xlabel={$n$},
ylabel={$x[n]$},
axis x line=center,
axis y line=center,
every axis x label/.style={at={(current axis.right of origin)},anchor=west},
every axis y label/.style={at={(current axis.above origin)},anchor=south},
},
%
continuous ir/.style={
ajh dsp base plot,
every axis plot post/.style={
mark=none,
},
xmin=0,
ymin=0,
xlabel={$t$},
ylabel={$x(t)$},
axis x line=center,
axis y line=center,
every axis x label/.style={at={(current axis.right of origin)},anchor=west},
every axis y label/.style={at={(current axis.above origin)},anchor=south},
},
%
continuous fr/.style={
continuous ir,
xmin=-0.59, xmax=0.59,
xtick={-0.5,-0.3,...,0.5},
xlabel={$F$},
ylabel={$X(F)$},
},
%
discrete fr/.style={
discrete ir,
xmin=-0.59, xmax=0.59,
ymin=0, ymax=1.19,
xtick={-0.5,-0.3,...,0.5},
xlabel={$F$},
ylabel={$X(F)$},
},
%
}