Contents Previous Next Subchapters

Getting Dataset and Zone Dimensions
Syntax [nZones, nVars] = tpdims()
[I,J,K] = tpdims(zone)
See Also tpget , tpput , tpaddzone , tpplottype , tpzonename , tpvarname

Determines the number of zones and variables in a data set and the I, J, and K values of a specified zone. If tpdims is called without arguments, the value nZones is the number of zones in the current data set and nVars is the number of variables. If nZones equals 0, the current frame does not have a data set. If called with the argument zone, the value must be an integer scalar greater than 0. The values I, J, and K specify the maximum dimension of the given plane.

If at the O-Matrix prompt you enter,
   [nZones, nVars] = tpdims
   print "nZones = ", nZones, " nVars = ", nVars
O-Matrix will respond,
nZones =  0  nVars =  0 
If you continue the example by entering
   [nZones, nVars] = tpdims
   print "nZones = ", nZones, " nVars = ", nVars
   [I, J, K] = tpdims(1)
O-Matrix will respond
nZones =  5  nVars =  6 
IMax =  12  JMax =  1  KMax =  1