I have an ode which I need to solve with respect to the time variable.
I have 2 seperate scripts, one contains the function and the other contains the command.
my function is,
===================================
function dy_dt=func(t,y)
dy_dt=0.003445*((y-0.072)/y^3)^0.5;
end
===================================
In the other script I have,
===================================
clc, clear, close all
time=0:0.05:8.5;
[t,y]=ode45(@myfun1,time,0.073);
plot(t,y(:,1));
==================================
When the initial value for y=0.072 I get the following graph;
because y=0.072 leads to an erroneous graph I decided to give y=0.073 as the initial value for which I got the following graph;
This is also erroneous as this is not the result I expect. The graph I expect is attached below.
Can someone assist me on what errors I have done in my code? Thank you very much.