Need some help with solving diff.equ with matlab/simulink

  • Thread starter Thread starter rularn
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
rularn
Messages
8
Reaction score
0
Hi!

Homework Statement


I have this x'[t] + x[t] = a + Sin[b*t] diff.equ that I would like to solve with matlab/simulink.
Let set a=1, b=1 and
x(0)=2

Homework Equations


I know that x(t) = 1/2 e^-t (-cos(t) e^t+sin(t) e^t+2 e^t+3) and what it look like (see pic). I aslo got the transfer equ G(s) from Laplace and it should be:

G(s) = (a/s+b/(b^2+s^2))/(s+1),


The Attempt at a Solution



The only thing I don't get right is the initial value as you can see at the pic. It also shows what it should look like. What do I do wrong?

It should be easier to use the transfer equ G(s), but I don't get that right either. Any suggestions?

http://img205.imageshack.us/img205/821/reglerth3.jpg


Thank you!
 
Last edited by a moderator:
Physics news on Phys.org
Ah don't worry guys, I fixed it