problem of exponential function with s- function

7 次查看(过去 30 天)
I use s-function
my system is:
sys = [ u- 2*x(1) + x(2) - exp(40*x(1)) - exp(40*x(1) - 40*x(2)) + 2;
x(1) - 2*x(2) + x(3) + exp(40*x(1) - 40*x(2)) - exp(40*x(2) - 40*x(3));
x(2) - 2*x(3) + x(4) + exp(40*x(2) - 40*x(3)) - exp(40*x(3) - 40*x(4));
x(4) - x(3) - exp(40*x(3) - 40*x(4)) + 1];
when I press run, an error message appear (State derivatives returned by S-function 'tasksf' in 'Task1/S-Function' during flag=1 call must be a real vector of length 4). when I delete exp() from all equation it runs fine, what is the problem?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by