Question: I used this code but i think is in not working right. >> clc; clear all; tspan = [-1 2]; y0 =- 3; %ode45 [x,y]

I used this code but i think is in not working right. I used this code but i think is in not working

>> clc;

clear all;

tspan = [-1 2];

y0 =- 3;

%ode45

[x,y] = ode45(@(x,y) y^2-x^2, tspan, y0);

plot(x,y,'r')

hold on

y01=0;

[x,y1] = ode45(@(x,y) y^2-x^2, tspan, y01);

plot(x,y1,'b')

xlabel('x','fontsize',15)

ylabel('y','fontsize',15)

legend('y(-1)=-3','y(-1)=0')

title('my namei','fontsize',25)

text(0,0.01, datestr(clock), ...

'Units', 'normalized', ... % Not depending on the data

'HorizontalAlignment', 'left', ...

'VerticalAlignment', 'bottom');

Consider the following differential equation: dy a. Use the MATLAB routine ode45 to generate approximate solutions to this differential equation over the interval-l

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!