Confusion, matlab, ode45 variables.


by Smiles302
Tags: confusion, matlab, ode45, variables
Smiles302
Smiles302 is offline
#1
Apr22-11, 03:35 PM
P: 26
1. The problem statement, all variables and given/known data

I am very confused over how matlab knows which variables are changeable variables in ode45.


2. Relevant equations // 3. The attempt at a solution

My input is p

Earlier have defined;
a = 1;
k = 1;
w = 1/3;

Then I want to figure out adot and adoubledot from these.

adot = (a)*(p - k/a)^(-1/2);

adoubledot = (a/2)*(p + 3*w*p);

Suddenly realised that I have no idea why matlab would let "a" change but not let "p" and "k" change...

Is there a way to tell matlab that one of the variables is changing in time and the others aren't?
Phys.Org News Partner Science news on Phys.org
SensaBubble: It's a bubble, but not as we know it (w/ video)
The hemihelix: Scientists discover a new shape using rubber bands (w/ video)
Microbes provide insights into evolution of human language
Smiles302
Smiles302 is offline
#2
Apr23-11, 07:19 AM
P: 26
Nobody? =( Does my question make sense?
jhae2.718
jhae2.718 is offline
#3
Apr23-11, 12:57 PM
PF Gold
jhae2.718's Avatar
P: 1,153
I'm not sure exactly what you're asking. For ode45 you need to define a function. Ode45 uses the function definition for variables. (I think you need to have only one variable For ode45, so if you have more than one you can use a column vector.)


Register to reply

Related Discussions
matlab ode45/independent variables help Math & Science Software 0
matlab ode45 Differential Equations 7
Matlab ODE45 Help?? Differential Equations 4
ode45 matlab Introductory Physics Homework 1
ode45 help in MATLAB Math & Science Software 0