|
READMAT.OMS
Script File:
# Description:
# Read a Matlab(c) binary data file
#
# The sample file example\MatContours.mat contains six
# variables Run1,Run2,...,Run6 that are 10x15 matrices
# created in Matlab. This example reads the data
# and creates a contour plot for each variable.
const iFile = [OM_INSTALL,"\example\MatContours.mat"]
mVars = mfvars(iFile) # Determine the variables in the file
levels = seq(15)+5 # levels for contour plots
for i = 1 to rowdim(mVars) begin
D = mfread(iFile, mVars.row(i))
contour(D, levels, seq(10), seq(15)', i*2, "surface")
end
grotate(30, 0, 70)
gtitle(iFile)
Output:
|
|