
Your code looks correct to me. You set the initial condition to be 'y(0)==2' and that is what dsolve returned:
From the plot, it is also obvious that 'y(t)' begins at 2.
From the plot, it is also obvious that 'y(t)' begins at 2.
From the plot, it is also obvious that 'y(t)' begins at 2. Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!