compare(data,sys) can not be used inside function?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hallo @ all.
I think I stumbled upon a bug in Matlab R2011b:
My goal was to compare the fit of different estimated models to measured data by using the function compare(data, sys) from ident toolbox and something strange happened. Although I am able to use the function in 'base' Workspace
[~, fit, ~] = compare(dataPack{1,1}, b)
fit =
90.5454
I can not use it inside another user defined function
function fit = fitOfModel(iddataObj, varargin )
[~, fit, ~] = compare(iddataObj,varargin);
end
calling this function with the same input as before returns an error
[~, fit, ~] = fitOfModel(dataPack{1,1}, b)
Undefined function 'compare' for input arguments of type 'iddata'.
I have no idea as to why this might happen. Could someone please enlighten me? Is this a bug?
Ps.: dataPack is a cell array where each cell contains an iddata object with data from experiments and b is the estimated P1D idproc model for the data in dataPack{1,1}
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Transfer Function Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!