How can I solve a Heaviside function in MATLAB R2017b ?

1 次查看(过去 30 天)
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)

更多回答(0 个)

类别

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

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by