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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!