Question

Write as a MatLab script For X=0 ~ 2π with intervals of π/100 use the following...

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

Homework Answers

Answer #1

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:


Know the answer?
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
Similar Questions
Write a Matlab script that plots the following functions over 0 ≤ x ≤ 5π: f1(x)...
Write a Matlab script that plots the following functions over 0 ≤ x ≤ 5π: f1(x) = sin2 x − cos x, f2(x) = −0.1 x 3 + 2 x 2 + 10, f3(x) = e −x/π , f4(x) = sin(x) ln(x + 1). The plots should be in four separate frames, but all four frames should be in one figure window. To do this you can use the subplot command to create 2 × 2 subfigures.
Use Matlab to solve the following (a) Create a plot with a sphere at the center...
Use Matlab to solve the following (a) Create a plot with a sphere at the center of the graph (origin) representing the sun with a radius of 6955000 km. Make sure that the outside of the sphere is painted in ’autumn’ colors. (Hint: look up the sphere() function, the colormap() function, and the surf() function). (b) Create a variable t ranging from 0 to 2? with increments of 0.01. (c) The following Table gives you important values needed to compute...
Plot entire travelling paths of two projectiles, i.e., two angry birds, on x-y plane, assuming they...
Plot entire travelling paths of two projectiles, i.e., two angry birds, on x-y plane, assuming they were thrown at the origin. The first angry bird was thrown with the initial velocity, vo,1 = 2 m/s, and the angle of the initial velocity from the horizontal plane, (theta),1 = (pi)/4, while the other was thrown with vo,2 = 10 m/s and (theta),2 = (pi)/6. Make sure that you plot two paths in the same plot with different line types, colors, and...
Using MATLAB The range of an object shot at an angle θ (with respect to x-axis),...
Using MATLAB The range of an object shot at an angle θ (with respect to x-axis), with the initial velocity of V0 (in the absence of air resistance), is calculated by the following formula: range=(Vo^2/g)(sin(2theta)) where (0<=theta<=pi/2) And the trajectory of object is given by:     h=tan(theta).x-(g/2Vo^2*cos^2(theta)).x^2 .Where h is the height of the object at each x location and g = 9.81 m/s2. a) Using π/8 increment size for the angle and V0 = 10 m/s, plot the trajectories of...
Please use Mat lab only. Thanks (b) Plotting Sunspots Load the Matlab data file, sunspot.dat, and...
Please use Mat lab only. Thanks (b) Plotting Sunspots Load the Matlab data file, sunspot.dat, and experiment with making plots and subplots. The file is a simple 288 row by 2 column matrix where the first column has consecutive years from 1700 until 1987 and the second column has the mean sunspot number for that year. Then we will construct year and spots vectors from the two columns and plot spots as a function of year. load sunspot.dat; year =...
PLEASE USE MAT LAB ONLY. THANK YOU (a) Create and plot the signals listed below and...
PLEASE USE MAT LAB ONLY. THANK YOU (a) Create and plot the signals listed below and save your Matlab code in a script file. i) Cosine signal of frequency 100 Hz over the range [0,0.1] seconds and samples spaced 10^- 4 seconds apart with a phase of pi/2 and an amplitude of 1.   PLEASE USE MAT LAB ONLY. THANK YOU ii) A square wave that oscillates between 0 and 1 every five samples, plot 3 periods of the waveform. iii)...
Problem 3 you can use Matlab and also i give u the Problem 1 code its...
Problem 3 you can use Matlab and also i give u the Problem 1 code its on Matlab Using the same initial code fragment as in Problem 1, add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the impulse response of an IIR bandpass filter with band edge frequencies 750 Hz and 850 Hz and based on a 4th order Butterworth prototype. Name your program p3.sce this is the Problem 1 code and the solutin clear; clc;...
Assume that we are working with an aluminum alloy (k = 180 W/moC) triangular fin with...
Assume that we are working with an aluminum alloy (k = 180 W/moC) triangular fin with a length, L = 5 cm, base thickness, b = 1 cm, a very large width, w = 1 m. The base of the fin is maintained at a temperature of T0 = 200oC (at the left boundary node). The fin is losing heat to the surrounding air/medium at T? = 25oC with a heat transfer coefficient of h = 15 W/m2oC. Using the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT