Problem with idnlgrey function error
显示 更早的评论
Good day, I'm a Matlab beginner
I'm trying to use matlab to estimate my experimental data with some model with the function named idnlgrey with this example : https://kr.mathworks.com/help/ident/ug/represent-nonlinear-dynamics-using-matlab-file-for-grey-box-estimation.html
I made the model named Threelevelmodel.m
function [dx, y] = Threelevelmodel(t,x,u,k1,k3,k13,k31,varargin)
y = [x(1); x(2)];
dx = [(-k3-k31)*x(1)+k13*x(2); k31*x(1)+(-k1-k13)*x(2)];
And I saved this file,
Then the main code
FileName = 'Threelevelmodel';
Order = [2 0 2]; % [ny nu nx]
Parameters = [0.011; 0.011; 0.09; 0.147]; % Initial parameters
InitialStates = [5640000000; 42500000]; % Initial states
Ts = 0; % Time-continuous system
nlgr = idnlgrey(FileName, Order, Parameters, InitialStates, Ts);
When I tried this code, I got the error like
함수 'idnlgrey'은(는) 'char'형 입력 인수에 대해 정의되지 않았습니다.
It says that the function 'idnlgrey' is not defined for the input argument 'char'
However, no matter how hard I read the matlab description of idnlgrey, the 'Filename' must contain a char variable
How can I solve it? Thank you
1 个评论
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Nonlinear Grey-Box Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!