Contents Previous Next Subchapters

Transferring Data from O-Matrix to Tecplot
Syntax tpput(expression)
tpput(expressionvariable)
tpput(expressionvariablezone)
See Also tpget , tpput3D , tpaddzone , tpframe , tpopen , tpplottype , tpdims

Description
Transfers data from O-Matrix to a Tecplot data set. The argument expression must be an integer, real, or double-precision valued expression. The arguments variable and zone specify the variable and zone name or number that data are transferred to. If no data set exists when this command is executed, a data set is created with variables X, Y, and Z. If no data set exists when this command is executed, the arguments variable and zone must be integer scalars if present. If the argument variable is not specified data are transferred to the first variable in the data set. If the variable zone is not specified data are transferred to the first zone. If the current frame does not contain a data set, the new dataset is created with Tecplot type Double. The 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.

Examples

Creating Data Sets and Transferring Data
If you enter,
   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.

Transferring Using Variable and Zone Names
If a data set exists in the current frame the value of expression and be transferred by giving a variable and zone name. If the variable or zone name is not unique, the first name with the specified value is used. If you create a new data set by entering
   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,