From: Tomasz on
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
From: Francesco on
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(a)tlen.pl> wrote in message <hufv99$7hl$1(a)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
From: Steven Lord on

"Tomasz " <skorpionxx(a)tlen.pl> wrote in message
news:hufv99$7hl$1(a)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(a)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