PchipPulse#
- class PchipPulse(options)#
Bases:
PartialPeriodicWaveform,ConstantTopPchipPulsegenerates pulses with PCHIP-shaped rise and fall transitions.Creates pulse signals with smooth rise and fall transitions using Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) interpolation. Provides smoother transitions than linear ramps. Inherits from
PartialPeriodicWaveform.Example1:
% Create a PCHIP pulse with rise and fall times pulse = PchipPulse(amplitude = 2.0, ... riseTime = 0.001, fallTime = 0.001); pulse.plot();
Example2:
% Create a pulse with only rise time pulse = PchipPulse(amplitude = 1.0, riseTime = 0.002); pulse.plot();
- Constructor Summary
- PchipPulse(options)#
Construct a
PchipPulseobject.- Parameters:
samplingRate (
double, optional) – Sampling rate in Hz (default: [])startTime (
double, optional) – Start time in seconds (default: 0)duration (
double, optional) – Duration in seconds (default: [])amplitude (
double, optional) – Peak-to-peak amplitude (default: [])offset (
double, optional) – DC offset (default: 0)frequency (
double, optional) – Frequency in Hz (default: [])phase (
double, optional) – Initial phase in radians (default: 0)riseTime (
double, optional) – Rise transition time in seconds (default: 0)fallTime (
double, optional) – Fall transition time in seconds (default: 0)
- Method Summary
- TimeFunc()#
Get the time function for the PCHIP pulse.
Creates a function handle that generates pulse values with PCHIP-interpolated rise and fall transitions. Implements the abstract
TimeFunc()method fromWaveform.- Returns:
Function that takes time array and returns PCHIP pulse values
- Return type:
function_handle