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:
ode45 need help

Subject: ode45 need help

From: Tomasz

Date: 6 Jun, 2010 11:03:05

Message: 1 of 3

Hi

i have a problem how to solve that equation in matlab:

d^2x/dt^2+2/t dx/dt=0

the initial state is:
x(0)=0.005
dx/dt(0)=0

i put the variable z
z=dx/dt
and my equation is in form

dz/dt+2/t * z=0

and now is my problem how to implement it in matlab

thx for any help

Subject: ode45 need help

From: Francesco

Date: 6 Jun, 2010 17:30:08

Message: 2 of 3

I had a problem with simulink about the ode solver. Did you try to change the solver? To move to ode15 for example.. This the only help I can give you. I'm sorry
"Tomasz " <skorpionxx@tlen.pl> wrote in message <hufv99$7hl$1@fred.mathworks.com>...
> Hi
>
> i have a problem how to solve that equation in matlab:
>
> d^2x/dt^2+2/t dx/dt=0
>
> the initial state is:
> x(0)=0.005
> dx/dt(0)=0
>
> i put the variable z
> z=dx/dt
> and my equation is in form
>
> dz/dt+2/t * z=0
>
> and now is my problem how to implement it in matlab
>
> thx for any help

Subject: ode45 need help

From: Steven Lord

Date: 7 Jun, 2010 02:23:57

Message: 3 of 3


"Tomasz " <skorpionxx@tlen.pl> wrote in message
news:hufv99$7hl$1@fred.mathworks.com...
> Hi
>
> i have a problem how to solve that equation in matlab:
>
> d^2x/dt^2+2/t dx/dt=0
>
> the initial state is:
> x(0)=0.005
> dx/dt(0)=0
>
> i put the variable z
> z=dx/dt
> and my equation is in form
>
> dz/dt+2/t * z=0
>
> and now is my problem how to implement it in matlab

Look at the Examples section of this documentation page:

http://www.mathworks.com/access/helpdesk/help/techdoc/math/f1-662913.html

You can adapt the first example to do what you want.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for 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