dst

Function dst 

Source
pub fn dst<T>(
    x: &[T],
    dsttype: Option<DSTType>,
    norm: Option<&str>,
) -> FFTResult<Vec<f64>>
where T: NumCast + Copy + Debug,
Expand description

Compute the 1-dimensional discrete sine transform.

§Arguments

  • x - Input array
  • dst_type - Type of DST to perform (default: Type2)
  • norm - Normalization mode (None, “ortho”)

§Returns

  • The DST of the input array

§Examples

use scirs2_fft::{dst, DSTType};

// Generate a simple signal
let signal = vec![1.0, 2.0, 3.0, 4.0];

// Compute DST-II of the signal
let dst_coeffs = dst(&signal, Some(DSTType::Type2), Some("ortho")).unwrap();