summaryrefslogtreecommitdiff
path: root/fitch.sci
diff options
context:
space:
mode:
authorttt2018-07-09 16:54:44 +0530
committerttt2018-07-09 16:54:44 +0530
commite5e316e1958e27696d7670e2492992d34ff38b68 (patch)
tree8dab5cc24e31921cfb3c44444d48cfbfd3ff76f8 /fitch.sci
parent681c88404f9f2861d228d0d0c3bd61b200ca1442 (diff)
downloadFOSSEE-System-Identification-Toolbox-e5e316e1958e27696d7670e2492992d34ff38b68.tar.gz
FOSSEE-System-Identification-Toolbox-e5e316e1958e27696d7670e2492992d34ff38b68.tar.bz2
FOSSEE-System-Identification-Toolbox-e5e316e1958e27696d7670e2492992d34ff38b68.zip
added scilabs files
Diffstat (limited to 'fitch.sci')
-rw-r--r--fitch.sci42
1 files changed, 42 insertions, 0 deletions
diff --git a/fitch.sci b/fitch.sci
new file mode 100644
index 0000000..b72b472
--- /dev/null
+++ b/fitch.sci
@@ -0,0 +1,42 @@
+function varargout = fitch(varargin)
+ [lhs , rhs] = argn()
+ if ( rhs <> 1 ) then
+ errmsg = msprintf(gettext("%s: Wrong number of input arguments"), "fitch");
+ error(errmsg)
+ elseif typeof(varargin(1)) <> "idpoly" then
+ error(msprintf(gettext("%s:Input model must be ""idpoly"" type.\n"),"fitch"))
+ end
+ model = varargin(1)
+ MSE = model.Report.Fit.MSE
+ FPE = model.Report.Fit.FPE
+ FitPer = model.Report.Fit.FitPer
+ AIC = model.Report.Fit.AIC
+ AICc = model.Report.Fit.AICc
+ nAIC = model.Report.Fit.nAIC
+ BIC = model.Report.Fit.BIC
+ t = tlist(['fitch','MSE','FPE','FitPer','AIC','AICc','nAIC','BIC'],MSE,FPE,FitPer,AIC,AICc,nAIC,BIC)
+ varargout(1) = t
+endfunction
+
+function %fitch_p(mytlist)
+ f = fieldnames(mytlist)
+ maxLength = []
+ for ii = 1:size(f,'*')
+ maxLength = [maxLength length(f(ii))]
+ end
+ maxLength = max(maxLength)
+ for ii = 1:size(f,'*')
+ blanckSpace = ' '
+ for jj = 1:maxLength-length(f(ii))
+ blanckSpace = blanckSpace + ' '
+ end
+ mprintf('\t%s%s : ',blanckSpace,f(ii))
+ objectData = mytlist(f(ii))
+ if ceil(objectData)-objectData then
+ mprintf("%.4f",objectData)
+ else
+ mprintf("%d",objectData)
+ end
+ mprintf("\n")
+ end
+endfunction