tempusSystem Class TimeHistory2
TimeHistory2 is part of the WaveTrain system class library

TimeHistory2 outputs a time-dependent 2x1 Vector< float > value given two input signal vector vx and vy having lengths nt and corresponding time vector tv with length 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 vectors (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 values vx0 and vy0 are used. If the time vector ends before the end of the simulation, the last value is held throughout the remainder of the simulation.

Tempus Block Diagram Editor Snapshot
Parameters
tv  Vector<float>   Time vector, length nt (s)   Vector()
vx  Vector<float>   X signal vector, length nt   Vector()
vy  Vector<float>   Y signal vector, length nt   Vector()
t0  float   The time within the tv vector that is to correspond to simulation time 0 (s)   0.0
vx0  float   Initial x signal value   0.0
vy0  float   Initial y signal value   0.0
sampleFlag  int   If 0, use linear interpolation, otherwise use sample and hold   0
timeLimit  double   Maximum amount of time for which recallable output vector will be stored (if zero, then all input vectors are stored)   0.0
Inputs
None
Outputs
v  Vector<float>   Output 2x1 vector   
rv  Recallable<Vector<float>>   Output recallable 2x1 vector   
Subsystems

Subsystem icon
  TimeHistory    thx
tv  Vector<float>   tv
sv  Vector<float>   vx
t0  float   t0
s0  float   vx0
sampleFlag  int   sampleFlag

Subsystem icon
  TimeHistory    thy
tv  Vector<float>   tv
sv  Vector<float>   vy
t0  float   t0
s0  float   vy0
sampleFlag  int   sampleFlag

Subsystem icon
  FtoVF    ftovf

Subsystem icon
  DVtoRV    dvtorv
timeLimit  double   timeLimit


Connections
v  <<=  ftovf.vout
rv  <<=  dvtorv.rv
ftovf.f0  <<=  thx.s
ftovf.f1  <<=  thy.s
dvtorv.dv  <<=  ftovf.vout
Last Saved: Wed Feb 13 12:25:48 MST 2008 by TVE version 2007B