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!