MATLAB: Sum of square error

general matlab usage

Hello,
I'm very new to Matlab. We are attempting to curve fit a biologic response to a sinusoidal input. I'm able to fit the curve using the system identification tool without problems. For this study we need a measured of error. I have been able to get confidence intervals but what I would like to get is the sum of squares error. I have a few questions:
  1. Is there a way to display the sum of square error in Matlab?
  2. What is the number displayed on the model output as a measure of best fit?
  3. When the data is presented following the estimation, it displays the loss function and the FPE. What is the FPE?
Thank you. Michael

Best Answer

What type of model is model1 (what does class(model1) return)? PE is a System Identification Toolbox function that would work only on models recognized by it. You can create either IDPROC or IDPOLY structure for your model.
model = idproc('p1d'); model.Kp = K; model.Td = Td; model.Tp1 = Tp1;
model = idpoly(1,K/Tp1,1,1,[1 1/Tp1],'Ts',0,'noise',0);