[Index for trf.tbx]
[Return to Master Index]
Description of trf_rack data structure
A trf_rack is a specific data structure that contains the data contents of
a specific variable for multiple runs. It is used to pack the conveniently pack
the data contents of a variable so comparisons between runs can be made.
The trf_rack structure contains the following fields:
t: The time vector corresponding to the racked data.
rn: The run numbers from which data was racked.
ri: The indeces of the runs from which the data was racked.
vname: The variable name of the racked data.
vdesc: A text description of the variable.
d: An [nobjs x nt x nr] array containing the data loaded for each time and each
run. In this case nobjs is the number of values per time, nt is the number of
times, and nr is the number of runs.
The following item was included in previous versions, but because it was found to take
a long time and a lot of space to create, we eliminated it.
r: A [1 x nr] array of trf_run structures containing the details of each run, where nr
is the total number of runs. In this array, the element v and all address-specific
variables for each trf_run has removed.
Suppose we create a trf_rack structure called trfrk. Further suppose that trfrk.d is
dimensioned [1 x 5 x 10]. This means that a scalar value (indicated by the 1)
has been loaded for 5 time samples for 10 separate runs. The first sampled
value for each run can be accessed as trfrk.d(:,1,:). The last value for each run could
be accessed as trfrk.d(:,5,:). To plot a time-history of all runs on the same plot, we
use plot(trfrk.t,squeeze(trfrk.d)). To get a surface plot of the time-histories, we use
mesh(trfrk.rn, trfrk.t, squeeze(d)). Squeeze is a Matlab routine that removes all
dimensions of 1 from an array which has more than two dimensions.
Now suppose that trfrk.d is dimensioned [2 x 5 x 10]. This means that for each time,
a two-vector was stored. trfrk.d(1,:,:) has the first element for each time sample for
each run and trfrk.d(2,:,:) has the second element. A time-history plot of the second
element would be created by plot(trfrk.t, squeeze(trfrk.d(2,:,:))) and a mesh plot is
mesh(trfrk.rn, trfrk.t, squeeze(trfrk.d(2,:,:))). A scatter plot of the first element versus
the second element for the last time sample of all runs is created by
plot(squeeze(trfrk.d(1,5,:)),squeeze(trfrk.d(2,5,:)),'+'). A scatter plot of the initial value
of the second element versus its final value is created by
A trf_rack can be used to slice through the data so that the effects of the tempus
run set parameters can be visualized.
Produced by mat2html on Wed Nov 22 10:44:50 2000
Cross-Directory links are: OFF