Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Search results for query: *

  1. adityagaddam

    Different initial condition than y(0) for ode45?

    Hi, I am trying to solve a differential equation using ode45. But I need to use an initial condition other than y(0). Is there any way to do this? An example would be solving y^2 with an intial value of y(5) = 2. Matlab only seems to allow you to specify values for y(0) Thanks, Aditya
  2. adityagaddam

    Help with using the contour function with differential equations

    I am sorry, I was doing something else wrong, but I really appreciate you quick help. Thanks a lot, Aditya
  3. adityagaddam

    Help with using the contour function with differential equations

    The eps hack worked, but all the curves are squished to the bottom of the plot, would the switch in the function work better? ifso, how would you do this switch? Thanks, Aditya
  4. adityagaddam

    Help with using the contour function with differential equations

    Well, it's sort of better now. It does SOMETHING for contour(T, Y, f(T, Y), 30, 'k'), but then errors out saying : Warning: Divide by zero. > In @(t, y) (-t)./(exp(-y).*cos(y)-exp(-y)) ??? Error using ==> contourc Contour levels must be finite. Warning: Error occurred while evaluating listener...
  5. adityagaddam

    Help with using the contour function with differential equations

    Hi, I am trying to draw several solutions to a different equation. I have the following in MATLAB >>eqn = 'Dy = (-exp(y))/((t*exp(y) - sin(y)))'; >>dsolve(eqn, 't') Warning: Explicit solution could not be found; implicit solution returned. > In dsolve at 312 ans =...
Back
Top