Contents Previous Next Subchapters

Adding a Zone to an Existing Dataset
Syntax zoneNumber = tpaddzone(I,J)
zoneNumber = tpaddzone(I,J,K)
zoneNumber = tpaddzone(I,J,Kname)
See Also tpdataset , tpzone , tpframe , tpmapcopy , tpput , tpget , tpopen

Add a new zone to the dataset of the currently active Tecplot frame. The arguments I, J, and K must be integer scalars that specify the I, J and K values of the new zone. If the variable K is not specified, K is set to 1. The return value zoneNumber is an integer scalar that specifies the number of the zone that was created. If present, the argument name must be a character row vector which is used as the name of the zone created.

If from the Tecplot menu you select "File | New Layout" and then select "Data | Create Zone | Rectangular", Tecplot will create a new data set that contains 1 zone and variables X, Y, and Z. If at the O-Matrix prompt you enter
O-Matrix will echo 2 in the command window which is the number of the new zone created and Tecplot will now have a new zone with IMax = 3, and JMax = 4, and KMax = 1.

If at the O-Matrix prompt you enter
   tpdataset({"Sample 1", "Sample 2", "Sample 3"})
O-Matrix will create a new dataset with 3 variables Sample 1, Sample 2, and Sample 3. If you continue by entering
   tpaddzone(20, 1, 1, "Experiment 1")
   tpaddzone(20, 1, 1, "Experiment 2")
O-Matrix will add 2 zones to the data set with names Experiment 1, and Experiment 2, each with I = 20, J = 1, and K = 1.

See the tpmapcopy function for additional examples that use the tpaddzone function.