modelplotDataSurf2d

create data structs to be plotted in MATLAB

Parameters

TypeNameDefaultDescription
Booleanrectangularfalseset true if input data is on rectangular grid, otherwise assume scattered data
Integern20number of data points to plot
Stringfilename"surf2d.mat"name of MATLAB formated output file
Real[:,:]datascattered data to be fitted: [x,y,z,w] (w is optional weight)
Reals0smoothing factor (s>0)
Integerkx3degree of X-dir spline (should be odd)
Integerky3degree of Y-dir spline (should be odd)
Real[2]x_lim{if rectangular then ApproxSpline.Utilities.vmin(data[2:size(data, 1), 1]) else ApproxSpline.Utilities.vmin(data[:, 1]), if rectangular then ApproxSpline.Utilities.vmax(data[2:size(data, 1), 1]) else ApproxSpline.Utilities.vmax(data[:, 1])}X-dir boundaries of interpolation interval
Real[2]y_lim{if rectangular then ApproxSpline.Utilities.vmin(data[1, 2:size(data, 2)]) else ApproxSpline.Utilities.vmin(data[:, 2]), if rectangular then ApproxSpline.Utilities.vmax(data[1, 2:size(data, 2)]) else ApproxSpline.Utilities.vmax(data[:, 2])}Y-dir boundaries of interpolation interval
Real[:]txfill(0, 0)array of X-dir knot positions (if given together with ty, a least square spline is generated)
Real[:]tyfill(0, 0)array of Y-dir knot positions (if given together with ty, a least square spline is generated)

Components

TypeNameDefaultDescription
Realnknumber of knots in both directions