16 gp.
window(
"Filter plots", 10, 10, 700, 700 );
23 Mg = 20 * log10(
freqz( b, a, 1024 ) );
29 gp.
send2gp(
"set multiplot layout 2, 1" );
30 gp.
send2gp(
"set xtics (\"0\" 1,\"0.5\" 512,\"1\" 1024)" );
32 gp.
ylabel(
"Magnitude [dB]" );
33 gp.
xlabel(
"Frequency [f/Fs]" );
36 gp.
send2gp(
"set xtics (\"0\" 1,\"0.5\" 512,\"1\" 1024)" );
38 gp.
ylabel(
"Phase [rad]" );
39 gp.
xlabel(
"Frequency [f/Fs]" );
42 gp.
send2gp(
"unset multiplot" );
void plot_show(void)
Show plots.
void grid_on(void)
Set grid.
void xlabel(const char *label)
Set label for X-axis.
void ylabel(const char *label)
Set label for X-axis.
void send2gp(const char *cmdstr)
Send command to Gnuplot pipe.
void set_term(const char *ttype)
Set output terminal.
void plot_add(const T1 &x, const T2 &y, const std::string lb, const std::string ls="lines")
Push plot y vs. x with label and linespec.
void window(const int fig, const char *name, const int x, const int y, const int width, const int height)
Configure the figure used Windows environment.
arma_inline arma::vec phasez(const arma::vec b, const arma::vec a, const arma::uword K=512)
Frequency phase response function. Calculates the frequency phase response.
arma_inline arma::vec fir1(const arma::uword M, const double f0)
FIR lowpass design function. FIR lowpassdesign using windows method (hamming window)....
arma_inline arma::vec freqz(const arma::vec b, const arma::vec a, const arma::uword K=512)
Frequency magnitude response function. Calculates the frequency magnitude response.