pub struct BodeDiagramPlotter<T, U = Hz> { /* private fields */ }Expand description
Bode diagram over [freq_from, freq_to) with step dfreq, all given in U (Hz by default).
Implementations§
Source§impl<T, U> BodeDiagramPlotter<T, U>
impl<T, U> BodeDiagramPlotter<T, U>
Sourcepub fn new(freq_from: T, freq_to: T, dfreq: T, log_scale: bool) -> Self
pub fn new(freq_from: T, freq_to: T, dfreq: T, log_scale: bool) -> Self
data_len = ceil((freq_to - freq_from) / dfreq) points starting at freq_from, in U.
Gain in dB if log_scale, otherwise the magnitude.
Sourcepub fn plot<G: Into<FrequencyTransferFunction<T>>>(
&self,
g: G,
) -> Vec<FrequencyCharacteristics<T, U>>
pub fn plot<G: Into<FrequencyTransferFunction<T>>>( &self, g: G, ) -> Vec<FrequencyCharacteristics<T, U>>
Calculate the frequency characteristics of a frequency transfer function
(or anything convertible into one, such as a continuous TransferFunction).
Sourcepub fn frequency_response_s<S: Borrow<TransferFunction<T, Continuous>>>(
&self,
tf: S,
) -> Vec<FrequencyCharacteristics<T, U>>
pub fn frequency_response_s<S: Borrow<TransferFunction<T, Continuous>>>( &self, tf: S, ) -> Vec<FrequencyCharacteristics<T, U>>
Calculate the frequency response of a polynomial in the s-domain. If polynomial is ans^n +an-1s^(n-1) + … + a0, coefficient should be set [an, an-1, …, a0]
Sourcepub fn frequency_response_z<S: Borrow<TransferFunction<T, Discrete>>>(
&self,
tf: S,
ts: T,
) -> Vec<FrequencyCharacteristics<T, U>>
pub fn frequency_response_z<S: Borrow<TransferFunction<T, Discrete>>>( &self, tf: S, ts: T, ) -> Vec<FrequencyCharacteristics<T, U>>
Calculate the frequency response of a polynomial in the z-domain. If polynomial is anz^n +an-1z^(n-1) + … + a0, coefficient should be set [an, an-1, …, a0]
Auto Trait Implementations§
impl<T, U> Freeze for BodeDiagramPlotter<T, U>
impl<T, U> RefUnwindSafe for BodeDiagramPlotter<T, U>
impl<T, U> Send for BodeDiagramPlotter<T, U>
impl<T, U> Sync for BodeDiagramPlotter<T, U>
impl<T, U> Unpin for BodeDiagramPlotter<T, U>
impl<T, U> UnsafeUnpin for BodeDiagramPlotter<T, U>
impl<T, U> UnwindSafe for BodeDiagramPlotter<T, U>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.