mirror of
https://github.com/drowe67/codec2
synced 2026-08-14 19:31:34 -04:00
sinusoidal figure OK
This commit is contained in:
parent
def80d4bf6
commit
f778670d0c
3 changed files with 15 additions and 7 deletions
BIN
doc/codec2.pdf
BIN
doc/codec2.pdf
Binary file not shown.
|
|
@ -87,10 +87,11 @@ A sinewave will cause a spike or spectral line on a spectrum plot, so we can see
|
|||
(#1+2*#3,#2+0)}
|
||||
}
|
||||
|
||||
% three sine wave sources
|
||||
\draw (0, 2.0) circle (0.5); \drawSine{0}{ 2.0}{0.2}{0.2};
|
||||
\draw (0, 0.5) circle (0.5); \drawSine{0}{ 0.5}{0.2}{0.2};
|
||||
\draw (0,-1.5) circle (0.5); \drawSine{0}{-1.5}{0.2}{0.2};
|
||||
% sine wave sources
|
||||
\draw (0, 2.0) circle (0.5); \drawSine{0}{ 2.0}{0.2}{0.2}; \draw (-2.0,2.0) node {$A_1, F_0$ Hz};
|
||||
\draw (0, 0.5) circle (0.5); \drawSine{0}{ 0.5}{0.2}{0.2}; \draw (-2.0,0.5) node {$A_2, 2F_0$ Hz};
|
||||
\draw (0,-2.5) circle (0.5); \drawSine{0}{-2.5}{0.2}{0.2}; \draw (-2.0,-2.5) node {$A_L, LF_0$ Hz};
|
||||
\draw [dotted,thick] (0,0) -- (0,-2);
|
||||
|
||||
% summer
|
||||
\draw (2.5,2) circle (0.5);
|
||||
|
|
@ -100,11 +101,11 @@ A sinewave will cause a spike or spectral line on a spectrum plot, so we can see
|
|||
% connecting lines
|
||||
\draw [->] (0.5,2) -- (2,2);
|
||||
\draw [->] (0.45,0.7) -- (2.05,1.8);
|
||||
\draw [->] (0.3,-1.1) -- (2.2,1.6);
|
||||
\draw [->] (0.3,-2.1) -- (2.2,1.6);
|
||||
|
||||
% output
|
||||
% output speec
|
||||
\draw [->] (3,2) -- (4,2);
|
||||
|
||||
\draw [xshift=4.2cm,yshift=2cm,color=blue] plot[smooth] file {hts2a_37_sn.txt};
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,13 @@ function plamp(samname, f, epslatex=0)
|
|||
fn = sprintf("%s_%d_sn.tex",samname,f);
|
||||
print(fn,"-depslatex",sz); printf("\nprinting... %s\n", fn);
|
||||
|
||||
% file of points to plot in sinusoidal model
|
||||
fn = sprintf("%s_%d_sn.txt",samname,f);
|
||||
t_length = 4; s_max = 2; s=s*s_max/max(abs(s));
|
||||
N = length(s); t = (0:N-1)*t_length/N;
|
||||
s_save = [t' s']; size(s_save)
|
||||
save("-ascii",fn,"s_save"); printf("printing... %s\n", fn);
|
||||
|
||||
figure(2);
|
||||
fn = sprintf("%s_%d_sw.tex",samname,f);
|
||||
print(fn,"-depslatex",sz); printf("printing... %s\n", fn);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue