|
Contents | Previous | Next | Subchapters |
| Syntax |
tpput(expression) |
tpput(expression, variable) | |
tpput(expression, variable, zone) | |
| See Also | tpget , tpput3D , tpaddzone , tpframe , tpopen , tpplottype , tpdims |
tpput function can
transfer data to Tecplot data sets of type Double or Float, other
data types are not supported. O-Matrix will convert the value
of expression to Double or Float if necessary before
transferring.
clear
tpopen
tpput([1,2,3])
Tecplot will create a new data set with variables X, Y
and Z with IMax = 1, JMax = 3, and KMax = 1. If you continue the
example by entering
v = {1,1,1,1}
tpput(v)
tpput(v*2, 2)
tpput(v*3, 3)
Tecplot will re-dimension the existing data set with IMax = 4, JMax = 1,
and KMax = 1, with variables 1, 2, and 3 containing the values illustrated below.
Data can also be transferred to a specified zone.
If you enter,
clear
tpopen
x = 0. : 0.1 : 2 * pi
y = [sin(x), cos(x)]
tpput(x,1)
tpput(y,2)
O-Matrix will create a new data set in Tecplot where the
first variable contains the value of x and
the second variable contains the value of y.
If you continue by entering
for i = 1 to 5 begin
zone = tpaddzone(1,1)
tpput(x,1,zone)
tpput(y*i, 2, zone)
end
five new zones will be created where the
values of Y contain increasing amplitudes of y.
x = 0. : 0.1 : 2 * pi
tpput(x)
and then manually change the name of the Y variable in
this data set to cos, you can transfer to this
variable by entering,
tpput(cos(x), "cos")
If you enter,
clear
tpopen([OM_INSTALL,"\example\tecplot\SixZones.lay"])
Tecplot will open the SixZones.lay sample
file from the distribution which contains six zones
named, Test One, Test Two, ... Test Six,
with variables X, sine, and cosine.
If you continue the example above by entering
sine = tpget("sine", "Test Four")
nr = rowdim(sine)
sine = sine + (rand(nr,1)-0.5)/3.0
tpput(sine,"sine", "Test Four")
O-Matrix will transfer the values from the variable
with name sine from the zone named Test Four
add a noise signal to the value, and return the updated
value to the same location. The plot will update to look like,