problem of exponential function with s- function

7 Ansichten (letzte 30 Tage)
Ahmed
Ahmed am 12 Sep. 2015
Bearbeitet: Ahmed am 12 Sep. 2015
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?

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by