Recent content by hasidim

  1. H

    MATLAB Matlab ODE45: solving with coefficients that are functions of time

    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)...
  2. H

    MATLAB Matlab ODE45: solving with coefficients that are functions of time

    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...
  3. H

    Mathematica MATHEMATICA: NDSolve, 2nd order ODE, Table of IC HELP

    Bill Simpson, That worked beautifully for my problem. Thanks again for the advice ('Reap' and 'Sow' are new functions to me).
  4. H

    Mathematica MATHEMATICA: NDSolve, 2nd order ODE, Table of IC HELP

    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!
  5. H

    Mathematica MATHEMATICA: NDSolve, 2nd order ODE, Table of IC HELP

    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...
  6. H

    Mathematica Mathematica: plot and evaluate function of 2 variables

    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.
  7. H

    Mathematica Mathematica: plot and evaluate function of 2 variables

    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...
  8. H

    MATLAB Help plotting transfer function in matlab

    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...
  9. H

    Mathematica Mathematica: 2nd order PDE, variable coefficients

    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...
  10. H

    Mathematica Mathematica: 2nd order PDE, variable coefficients

    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...
  11. H

    Mathematica Mathematica: 2nd order PDE, variable coefficients

    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...
  12. H

    Mathematica: 2nd order PDE variable coefficients

    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...
  13. H

    MATLAB Analyzing Falling Object w/ Linear Friction: Troubleshooting Code

    It worked fine for me with: x=(m./b)*(g*t + exp(-b*t./m));
  14. H

    Mathematica Mathematica: Animated plot sphere as function of time

    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...
Back
Top