Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
resolve a differentian function

Subject: resolve a differentian function

From: X_man

Date: 10 Apr, 2010 19:20:25

Message: 1 of 3

how can I resolve a second degree differential function with matlab?


t=0:0.1:10
diff(x,2)=5+diff(x)-7*x

x is derive by t

thank you very much

Subject: resolve a differentian function

From: Greg Heath

Date: 11 Apr, 2010 01:39:43

Message: 2 of 3

On Apr 10, 3:20 pm, "X_man " <hra...@hotmail.com> wrote:
> how can I resolve a second degree differential function with matlab?
>
> t=0:0.1:10
> diff(x,2)=5+diff(x)-7*x
>
> x is derive by t
>
> thank you very much

1. If t = 0:dt:tmax, then derivative approximations would be
diff(x)/dt and diff(x,2)/(dt^2)
2. Given initial conditions x(1) and x(2) (or x(2)-x(1)), the
equation is easily rearrange into a recursion for x(i+2).
3. However, given boundary conditions at both ends
requires help from another poster or a search in the
ODE documentation.
4. Finally, you can probably use the Symbolic Toolbox.

Not much help, but it's a start.

Greg

Subject: resolve a differentian function

From: Roger Stafford

Date: 11 Apr, 2010 06:12:03

Message: 3 of 3

"X_man " <hrayr5@hotmail.com> wrote in message <hpqj1o$gun$1@fred.mathworks.com>...
> ........
> diff(x,2)=5+diff(x)-7*x
> ........
-----------------
  It should be pointed out that this is a linear differential equation of the second order and possesses a rather elementary general solution which you can work out with paper and pen about as easily as setting matlab to do it. If nothing else this can serve as a check against the solution found by matlab.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us