Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB Matlab Sysmolic maths differential equation

  1. Mar 13, 2012 #1
    Hi

    is it possible to represent unknown functions eg x(t) in matlab equations ?

    eg have f = x''
    diff(f) = x'

    or have a derivative represented via differential eg dx/dt
     
  2. jcsd
  3. Mar 24, 2012 #2
    finally found it out for those who want to know

    >> y = sym('y(t)')

    y =

    y(t)


    >> f = diff(y,2) + diff(y,1) + y

    f =

    diff(y(t),$(t,2))+diff(y(t),t)+y(t)


    >> pretty(f)

    / 2 \
    |d | /d \
    |--- y(t)| + |-- y(t)| + y(t)
    | 2 | \dt /
    \dt /
    >>
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook