This commit is contained in:
xin
2025-05-07 11:10:44 +08:00
parent 8820b28ab8
commit fb037dbf6f
56 changed files with 2679 additions and 470 deletions

View File

@ -1,6 +1,5 @@
extern crate savgol_rs;
use savgol_rs::savgol_filter;
pub fn savgol(data: Vec<f64>, window: usize, order: usize) -> Vec<f64> {
let svinput= savgol_rs::SavGolInput{data:&data,window_length:window,poly_order:order,derivative:0};
@ -20,4 +19,4 @@ fn test_savgol() {
let smoothed_data = savgol(data.clone(), window, order);
println!("Smoothed data: {:?}", smoothed_data);
}
}