How can I solve a Heaviside function in MATLAB R2017b ?

1 回表示 (過去 30 日間)
mohammed lubbad
mohammed lubbad 2018 年 10 月 7 日
コメント済み: Walter Roberson 2018 年 10 月 11 日
i found a problem in heaviside(t-10) but when be in heaviside(10) it solve it !!
[ysm,xsm]=lsim(Asm,Gsm,H,zeros(k,r),5*u*heaviside(t-10),t,x0);
[yopt,xopt]=lsim(A-B*Kopt,G,H,zeros(k,r),5*u*heaviside(t-10),t,x0);
but I always get an error sound like
error using * Inner matrix dimensions must agree. I was trying to rewrite an expression like this:

採用された回答

Walter Roberson
Walter Roberson 2018 年 10 月 7 日
5.*u.*heaviside(t-10)
  3 件のコメント
mohammed lubbad
mohammed lubbad 2018 年 10 月 8 日
walter
do you have coder about sliding mode
Walter Roberson
Walter Roberson 2018 年 10 月 11 日
I do not have any code about sliding mode, sorry.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by