compare(data,sys) can not be used inside function?
1 次查看(过去 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!