Hi All,
I found my issue. It was with the coefficient calculation, not with the ODE solver.
For what its worth, the coefficients in the second ODE (the coefficients that are functions of time) do need to be indexed as a function of t. So, something like this:
function ap = ode2(t,a)...
Hello all,
I am new to the ODE solvers in Matlab and am trying to learn:
First, I am solving a 2nd order ODE to determine x(t), x'(t), and x''(t). No problem. Then, I am using these solutions to calculate two coefficients (that are functions of time) that are used in a second, second order...
Bill Simpson, I indeed mean 'Xo' not 'X_o' (I commonly use an underscore in Matlab).
I will give your recommendation a shot and see how it goes. Thanks a lot!
Hi all,
I have a 2nd order ODE I am trying to solve using NDSolve. In the ODE there are two constant coefficients and an initial condition that I want to 'vary'; meaning, I have a table of initial conditions with corresponding constant coefficients.
It is straight forward to solve the ODE...
That is pretty similar to what I have tried... but, I'll try copying that and modifying it.
As usual, I suspect that I am missing just one small detail.
Hi all,
I am trying to evaluate and plot a function of two variable in mathematica.
Function:
R(t,\theta) = a(t) + b(t)*Y_n(\theta)
Where a(t) and b(t) are functions (that I have evaluated already), and Y is the spherical harmonic for a given n, and R is the radius.
In...
I suspect you are not using the same time interval for Phi and Y since Phi is one unit longer.
Secondly, you should only be using the "...'..." function to switch the dimensions of your vector (eg, if X is a vector with dimensions [5,1] then X' is a vector with dimensions [1,5]); I typically...
phyzguy and Simon_Tyler, thanks for the help.
I found the issue: it wasn't with my finding a[t] directly, it was solving for R[t], R'[t], and R''[t] (I wasn't getting real values). Also, I was reaching my maximum number of steps when using NDSolve to find a[t].
Also, I am still new and...
Oh geez, yeah, I meant ODE... it was a little late at night.
So, here is code. SolutionA, SolutionB and SolutionC are for R(t), R'(t), and R''(t). For coefficients A and B:
A[\text{t$\_$}] = \text{constants}*\frac{R\text{''}[t]}{R[t]}-\frac{\text{constants}}{\rho...
a\text{''}[t]+B[t]*a'[t]-A[t]*a[t]==0
a[0] = 10^-9
a'[0] = 0
a[t] = ?
The coefficients A and B are variable over time. I HAVE solved (experimental and theoretical values) for the values of A and B over the time interval of interest!
I attempted to solve for a[t] using NDSolve as one...
a\text{''}[t]+B[t]*a'[t]-A[t]*a[t]==0
a[0] = 10^-9
a'[0] = 0
a[t] = ?
The coefficients A and B are variable over time. I HAVE solved (experimental and theoretical values) for the values of A and B over the time interval of interest!
I attempted to solve for a[t] using NDSolve as one...
Hi all,
Kinda new to Mathematica.
I have evaluated a function describing a sphere's (or just circle for simplicity) radius over time. I have made a Table of values for the radius over a given time interval, and am able to plot the radius vs time.
How can I make an animated 3D plot of...