TimeHistoryF is part of the WaveTrain system class library
TimeHistoryF outputs a time-dependent float value given an input signal vector sv having dimension (nt) and corresponding time vector tv with dimension (nt). The output value is chosen based on the current time; if the current time falls between two times in the time vector, the output value is chosen by interpolating the input signal vector (if sampleFlag = 0), or by sample-and-hold (if sampleFlag != 0). The parameter t0 defines the start time in the time vector, so that at simulation time t = 0.0 s, the output grid will be that for tv = t0. Also, the input time vector may be defined such that the time history does not begin until t > 0.0 s, and in prior times the initial value s0 is used. If the time vector ends before the end of the simulation, the last value is held throughout the remainder of the simulation.
|
Parameters
|
tv |  Vector<double> | Time vector, length nt (s) | Vector() |
sv |  Vector<float> | Signal vector, length (nt) | Vector() |
t0 |  double | The time within the tv vector that is to correspond to simulation time t=0.0 (s) | 0.0 |
s0 |  float | Default signal value before initial time | 0.0 |
sampleFlag |  int | Sample flag (0 = interpolate; 1 = sample and hold) | 0 |
Inputs
|
None |
Outputs
|
s |  float | Signal value | 0.0 |
Subsystems |
|
|
Last Saved: Wed Feb 13 12:04:45 MST 2008 by TVE version 2007B
|
|