Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
>> 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started