|
|
How do I solve ode with variable coefficients?
I have an equation like that:
y"(t)*c2+y(t)*c1+c0 = 0
in which c2, c1 and c0 are also time dependent. I've already got the
time values of these coefficients, so I've only to tell to the ode
solver to changhe their value at each time step. How can I do this?
Please help me.
|
|
0
|
|
|
|
Reply
|
bananalimone (2)
|
2/22/2005 11:13:28 AM |
|
Mr. Wolf wrote:
>
>
> I have an equation like that:
>
> y"(t)*c2+y(t)*c1+c0 = 0
>
> in which c2, c1 and c0 are also time dependent. I've already got
> the
> time values of these coefficients, so I've only to tell to the ode
> solver to changhe their value at each time step. How can I do this?
>
> Please help me.
you must update values of coefficient in your ode function. you can
write a function of your coefficient and then call using feval in ode
function
ex:
dydt=zeros(10,1);
[px,py]=feval(@fonksiyon,[t,y(1),y(3),y(5),y(7),y(9)]);
dydt(1)=y(2);
dydt(2)=px-300*y(2)
dydt(3)=y(4);
dydt(4)=py-300*y(4)
tk
|
|
0
|
|
|
|
Reply
|
tkaracay6685 (1)
|
2/22/2005 3:36:53 PM
|
|
try this method
for i=1:length(c1)
[T,Y]=ode45(@(t,y)system(t,y,c(i))),t,s)
Y_c(;,:,i)=Y(:,:)
end
something like this,
so Y_c(:,:,i) has every ith dimension correponding to each value fof c1 and so on :)
SALMAN
|
|
0
|
|
|
|
Reply
|
salmanabdullah9 (206)
|
6/12/2012 12:56:12 AM
|
|
|
2 Replies
343 Views
(page loaded in 0.171 seconds)
Similiar Articles: ODE with variable coefficients - comp.soft-sys.matlabHi, I am trying to solve an ODE that has coefficients that ... ODE with variable coefficients - comp.soft-sys.matlab Hi, I am trying to solve an ODE that has coefficients ... Output non-derivative variables from ode solver - comp.soft-sys ...I am currently solving this using global variables when ... ODE with variable coefficients - comp.soft-sys.matlab ... ODE solvers A very simple ordinary differential equation ... How to solve Vibration of beam - comp.soft-sys.matlabODE with variable coefficients - comp.soft-sys.matlab How to solve Vibration of beam - comp.soft-sys.matlab ODE with variable coefficients - comp.soft-sys.matlab symbolic ... How can we define global but constant variable? - comp.soft-sys ...ODE with variable coefficients - comp.soft-sys.matlab How can ... ODE with variable coefficients - comp.soft-sys.matlab Hi, I am trying to solve an ODE that has ... Help solving ODEs in a loop - comp.soft-sys.matlabHi, I can use a function to solve a set of ODEs for but I am now trying to solve a bunch of ODE pairs which rely on each other. I have two variables xi(1) and xi(2 ... solve - Undefined function or variable 'I' - comp.soft-sys.matlab ...Dear all, I am trying to solve a simple one variable equation from a 3rd order polynomial ... The solution is actually a real value, coefficients for imaginary term are ... Coupled Differential Equation - comp.soft-sys.matlab> > How do I solve this? y = [theta1; theta2 ... equations (where capital letters are coefficients ... Coupled ordinary differential equation - Leonardo Gregory Brunnet ... How can i define global variable in matlab gui? - comp.soft-sys ...ODE with variable coefficients - comp.soft-sys.matlab How can i define global variable in matlab gui? - comp.soft-sys ... ODE with variable coefficients - comp.soft-sys ... Symbolic change of variables in a symbolic expression - comp.soft ...solve - Undefined function or variable 'I' - comp.soft-sys.matlab ... Just because an ... ODE with variable coefficients - comp.soft-sys.matlab I have an analytic ... Laser rate equation solving using ODE45 - comp.soft-sys.matlab ...How does the variable l influence the ODEs for N and S ? ... density > > > > So, to solve ODE ... Diffusion Coefficient - comp.soft-sys.matlab If you do happen to be ... Linear Ordinary Differential Equations with Variable CoefficientsSome special linear ordinary differential equations with variable coefficients and their solving methods are discussed, including Eular-Cauchy differential equation ... Laplace transform for solving ODE with variable coefficientsHomework & Coursework Questions > Calculus & Beyond ... Can we use laplace transform to solve an ODE with variable coefficients? Like this ... Theoretically, yes, if ... 7/28/2012 2:57:21 PM
|
|
|
|
|
|
|
|
|