Question

(Matlab) Use Matlabs built-in Runge-Kutta function ode45 to solve the problem 1010y -xz +28x - y 3 on the interval t є [0, 1

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Script (Run it as a script, not from command window):

close all
clear
clc

ic = [1; 1; 25]; % Initial Conditions
[T, Y] = ode45(@dYdt, [0 100], ic);
x = Y(:,1); y = Y(:,2); z = Y(:,3);
plot(T,x,T,z), xlabel('t'), ylabel('x(t) & z(t)')
title('Solution of ODE'), legend('x(t)', 'z(t)')
figure, plot(x,z), xlabel('x(t)'), ylabel('z(t)')
title('Trajectory')

function out = dYdt(~, Y)
% Y(1) => x, Y(2) => y, Y(3) = z
out = [-10*Y(1) + 10*Y(2); -Y(1)*Y(3) + 28*Y(1) - Y(2); Y(1)*Y(2) - 8*Y(3)/3];
end

Plots:

Solution of COE 40 20

Add a comment
Know the answer?
Add Answer to:
(Matlab) Use Matlab's built-in Runge-Kutta function ode45 to solve the problem 1010y -xz +28x - y 3 on the interval t є [0, 100 with initial condition (z(0), y(0),z(0)) = (1,1,25), and plot the t...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT