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