FUNCTION REFERENCE

compare

Compare model output with measured data.

Compare model output with measured data.

Syntax

[y, fit, x0] = compare(data, sys)

Syntax

[y, fit, x0] = compare(data, sys, k)

Syntax

[y, fit, x0] = compare(data, sys, 'InitialCondition', ic)

y is an iddata object with the simulated (k = Inf, default) or k-step-predicted output; fit = 100 (1 - norm(y - yhat)/norm(y - mean(y))). ic is 'e' (estimate the initial state by least squares, default), 'z' (zero) or a state vector of the sampled realisation; x0 is that state.

Example

d = iddata(filter([0 1],[1 -0.5],ones(20,1)),ones(20,1),1); [~,fit] = compare(d, idpoly([1 -0.5],[0 1]))   % 100

Differences from MATLAB: one model per call; no plot (called without outputs it returns y).

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.