problem of exponential function with s- function

7 ビュー (過去 30 日間)
Ahmed
Ahmed 2015 年 9 月 12 日
編集済み: Ahmed 2015 年 9 月 12 日
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 Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by