Plots model predictions and data
shregr2(func, p, x, y, Z)
Plots model predictions and data (optionally). It allows you to plot a response surface in 3 dimensions, together with your data, or sets of xz-curves or yz-curves. The data are projected on the surface, and on the curves, to show the difference between the data and model predictions. These projections help to reveal which data-point relates to which curve.
- func: name of user-defined function (see nrregr2)
- p: (r,k)-matrix with parameters in p(1,:)
- x: (n,1)-vector with first independent variable
- y: (m,1)-vector with second independent variable
- Z: (n,m)-matrix with observations (optional)
Options can be set by shregr2_options Inputs as in nrregr2; the data matrix is optional. The ranges of the two independent variables can be set optionally in two 2-vectors with upper and lower values.
assuming that function_name, pars, xvalues, yvalues, and zdata are defined properly: shregr2('function_name', pars, xvalues, yvalues, zdata) or shregr2 ('function_name', pars, xvalues, yvalues).