modelplotDataSurf2d
create data structs to be plotted in MATLAB
Parameters
| Type | Name | Default | Description |
| Boolean | rectangular | false | set true if input data is on rectangular grid, otherwise assume scattered data |
| Integer | n | 20 | number of data points to plot |
| String | filename | "surf2d.mat" | name of MATLAB formated output file |
| Real[:,:] | data | | scattered data to be fitted: [x,y,z,w] (w is optional weight) |
| Real | s | 0 | smoothing factor (s>0) |
| Integer | kx | 3 | degree of X-dir spline (should be odd) |
| Integer | ky | 3 | degree 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[:] | tx | fill(0, 0) | array of X-dir knot positions (if given together with ty, a least square spline is generated) |
| Real[:] | ty | fill(0, 0) | array of Y-dir knot positions (if given together with ty, a least square spline is generated) |
Components
| Type | Name | Default | Description |
| Real | nk | | number of knots in both directions |