Confusion, matlab, ode45 variables.

In summary, the conversation is discussing confusion over how MATLAB determines which variables are changeable in ode45 and how to specify which variables are changing in time. The person is also seeking clarification on the use of a function in ode45.
  • #1
Smiles302
27
0

Homework Statement



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


Homework Equations

//

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 realized 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?
 
Physics news on Phys.org
  • #2
Nobody? =( Does my question make sense?
 
  • #3
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.)
 

1. What is "Confusion" in the context of scientific research?

Confusion in scientific research refers to a state of uncertainty or lack of understanding about a particular phenomenon or concept. It is a common experience for scientists when faced with new or complex data, and it often leads to further investigation and analysis.

2. What is Matlab and how is it used in scientific research?

Matlab is a software platform commonly used in scientific research for data analysis, visualization, and mathematical modeling. It provides a user-friendly interface and powerful tools for manipulating and analyzing data, making it a popular choice among scientists in various fields.

3. What is the purpose of using ode45 variables in Matlab?

Ode45 variables in Matlab refer to the numerical method used to solve ordinary differential equations (ODEs). This method is particularly useful for simulating and analyzing complex systems, such as those found in physics, chemistry, and engineering. It allows scientists to model and predict the behavior of systems based on their mathematical equations.

4. How do you interpret the results from ode45 variables in Matlab?

The results from ode45 variables in Matlab are typically displayed as a graph, with the independent variable (usually time) on the x-axis and the dependent variable (such as concentration or temperature) on the y-axis. The shape and trend of the graph can provide insights into the behavior and stability of the system being modeled.

5. Are there any limitations to using ode45 variables in Matlab?

While ode45 is a powerful method for solving ODEs, it may not be suitable for all types of systems. It is most effective for systems that are not too stiff (i.e. not highly sensitive to small changes in initial conditions). In some cases, other numerical methods may be more appropriate for solving ODEs in Matlab.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
877
  • Introductory Physics Homework Help
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
993
  • Engineering and Comp Sci Homework Help
Replies
3
Views
806
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Back
Top