MATLAB Answers

0

How can I solve a Heaviside function in MATLAB R2017b ?

Asked by mohammed lubbad on 7 Oct 2018
Latest activity Commented on by Walter Roberson
on 11 Oct 2018
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:

  0 Comments

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 7 Oct 2018
 Accepted Answer

5.*u.*heaviside(t-10)

  3 Comments

Thank you Walter you made my day grateful
walter
do you have coder about sliding mode
I do not have any code about sliding mode, sorry.

Sign in to comment.