nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
waveform_generation.hpp File Reference
#include <memory_resource>
#include <nk/value/fn_handle.hpp>
#include <nk/value/span.hpp>
#include <nk/value/value.hpp>
#include <string>

Go to the source code of this file.

Functions

Value nk::signal::rectpuls (const Value &t, double w=1.0, std::pmr::memory_resource *mr=nullptr)
 Rectangular pulse of unit amplitude on the open interval (-w/2, w/2).
Value nk::signal::tripuls (const Value &t, double w=1.0, std::pmr::memory_resource *mr=nullptr)
 Triangular pulse of unit amplitude on |t| ≤ w/2.
Value nk::signal::gauspuls (const Value &t, double fc, double bw=0.5, std::pmr::memory_resource *mr=nullptr)
 Gaussian-modulated sinusoid.
Value nk::signal::pulstran (const Value &t, const Value &d, const std::string &fnName, double fcOrW=1.0, double bw=0.5, std::pmr::memory_resource *mr=nullptr)
 Pulse train: Σ_i fn(t - d_i) for a named pulse type.
Value nk::signal::pulstranHandle (Span< const double > t, Span< const double > d, FnHandle fn, std::pmr::memory_resource *mr=nullptr)
 Pulse train with a callback-based pulse generator.
Value nk::signal::chirp (const Value &t, double f0, double t1, double f1, const std::string &method="linear", std::pmr::memory_resource *mr=nullptr)
 Frequency-modulated cosine (chirp).
Value nk::signal::square (const Value &t, double duty=50.0, std::pmr::memory_resource *mr=nullptr)
 Square wave with period 2π.
Value nk::signal::sawtooth (const Value &t, double width=1.0, std::pmr::memory_resource *mr=nullptr)
 Sawtooth wave on period 2π.
Value nk::signal::sinc (const Value &t, std::pmr::memory_resource *mr=nullptr)
 Normalised cardinal sine: sinc(0) = 1, otherwise sin(πt)/(πt).
Value nk::signal::gmonopuls (const Value &t, double fc, std::pmr::memory_resource *mr=nullptr)
 Gaussian monopulse at centre frequency fc.
Value nk::signal::diric (const Value &x, int n, std::pmr::memory_resource *mr=nullptr)
 Dirichlet (periodic-sinc) function of order n.
Value nk::signal::modulate (const Value &x, double Fc, double Fs, const std::string &method, const Value &opt=Value::Empty, std::pmr::memory_resource *mr=nullptr)
 Analog modulation: AM / FM / PM family.
Value nk::signal::demod (const Value &y, double Fc, double Fs, const std::string &method, const Value &opt=Value::Empty, std::pmr::memory_resource *mr=nullptr)
 Analog demodulation (AM family).
Value nk::signal::vco (const Value &x, double fc, double fs, std::pmr::memory_resource *mr=nullptr)
 Voltage-controlled (frequency-modulated) oscillator.
Value nk::signal::vco (const Value &x, double fmin, double fmax, double fs, std::pmr::memory_resource *mr=nullptr)
 Voltage-controlled oscillator, explicit [Fmin, Fmax] range form (y = vco(x, [fmin fmax], fs)).