Terrain
ExportData
export terrain data points to an Excel file
Calling Sequence
Parameters
Options
Description
Examples
ExportData(T, filedir, opts)
T:-ExportData(filedir, opts)
T
-
Terrain; the Terrain object
filedir
string; folder directory to export the Excel file
opts
(optional) equation(s) of the form option = value; specify options for the ExportData command
overwrite = truefalse
Specifies the interpolation option. Whether or not to overwrite the existing file with the same name in the same directory. The default is true.
The ExportData method exports terrain data points to an Excel file. The first column contains the values for the first axis, the second row contains the values for the second axis, the remaining cells are the values for the up direction.
with⁡Tires:
Define the terrain equation.
eq≔0.1⁢tanh⁡x−5−tanh⁡x−30:
Generate a Terrain object using the defined equation. Select the z-axis as the up direction. The order of the two independent variables is [x,y]. Assign the range for x to be -10 to 100, and for y to be -10 to 10. Also, assign 50 grid points for the x-axis and 10 for the y-axis. Finally, set the title to myTerrain.
terrain≔GenerateTerrain⁡eq,−10..100,−10..10,50,10,up_direction=z,title=myTerrain:
Plot the generated terrain.
terrain:-Plot⁡
Export the terrain data points.
terrain:-ExportData⁡FileTools:-TemporaryDirectory⁡
true,/tmp/mpldoc3/myTerrain.xlsx
See Also
Tires
Download Help Document