Problem with idnlgrey function error
Mostra commenti meno recenti
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 Commento
Risposte (0)
Categorie
Scopri di più su Nonlinear Grey-Box Models in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!