Write as a MatLab script
For X=0 ~ 2π with intervals of π/100 use the following
equations
Y4=sin(X), Y5=sin(X-0.25), Y6=sin (X-1.5), Y7=sin(X-0.85),
Y8=sin(X)sin(X+0.75) a. Plot Y4 and Y8 in the same plot using the
hold on/off. Add title, labels. Plot them with different colors and
line styles b. Plot Y5 × Y6 and Y8 in the same plot without using
the hold on/off. Add title, labels. Plot them with different colors
and line styles c. Plot one of the Y equations as a 3D graph.
Please add title and labels
MATLAB:
clc;close all;clear all;
x=0:pi/100:2*pi;
Y4=sin(x);
Y5=sin(x-0.25);
Y6=sin(x-1.5);
Y7=sin(x-0.85);
Y8=(sin(x)).*(sin(x+0.75))
figure;
plot(x,Y4,'-.r*');hold on;plot(x,Y8,'--mo');xlabel('x');
title('plots of Y4 and Y8');grid on;hold off;
legend('Y4','Y8');
figure;
plot(x,Y5.*Y6,':bs',x,Y8,'-.g*');xlabel('x');
title('plots of Y5xY6 and Y8');grid on;
legend('Y5xY6','Y8');
%3D plot
figure;
ribbon(Y4)
title('Plot of Y4')
Plots:
Get Answers For Free
Most questions answered within 1 hours.