must include tittle,xlabel,ylabel,and grid on. thank you
![Plot the following functions using subplots in MATLAB. The independent variable should vary from 0 to 360 degrees. All the proper plot features should be incorporated in the subplots. [40 Points] a. cos(B 90) b. 3 sin(20) -2 c. tan (20) d. -2sin(6)](http://img.homeworklib.com/questions/34880810-a2fa-11eb-8bbe-8716e0c6cd3d.png?x-oss-process=image/resize,w_560)
MATLAB Script:
% MATLAB Script that generates four sub plots
% Theta vector that holds values from 0 to 360
theta = linspace(0, 360);
% First Function
first = cos(theta + 90);
% Creating a sub plot
subplot(3,2,1);
% Plotting theta vs function
plot(theta, first);
% Adding title
title('cos(theta + 90)');
% Adding xlabel
xlabel('Theta');
% Adding ylabel
ylabel('cos(theta+90)');
% Turning grid on
grid on;
% second Function
second = ( 3 * sin(2*theta) ) - 2;
% Creating a sub plot
subplot(3,2,2)
% Plotting theta vs function
plot(theta, second)
% Adding title
title('3sin(2theta) - 2');
% Adding xlabel
xlabel('Theta');
% Adding ylabel
ylabel('3sin(2theta) - 2');
% Turning grid on
grid on;
% third Function
third = tan(2*theta);
% Creating a sub plot
subplot(3,2,3)
% Plotting theta vs function
plot(theta, third)
% Adding title
title('tan(2theta)');
% Adding xlabel
xlabel('Theta');
% Adding ylabel
ylabel('tan(2theta)');
% Turning grid on
grid on;
% fourth Function
fourth = (-2 * sin(theta));
% Creating a sub plot
subplot(3,2,4)
% Plotting theta vs function
plot(theta, fourth)
% Adding title
title('-2sin(theta)');
% Adding xlabel
xlabel('Theta');
% Adding ylabel
ylabel('-2sin(theta)');
% Turning grid on
grid on;
____________________________________________________________________________________________
Sample Output:

must include tittle,xlabel,ylabel,and grid on. thank you Plot the following functions using subplots in MATLAB. The...
I wrote a Matlab program for the figure below. When I plot the waves, they look the same. Why do the two waves frequencies look same and How do I avoid it? (I really do need this part of the question answered.) N = 200; % Total number of time domain samples in simulation. Fs = 100 ;% sampling frequency. F1 = 10; % frequency of wave - 1. F2 = 90; % frequency of wave - 2. phi =...
These instructions are written with the assumption that code will be done in matlab. You might find the following built in commands useful: length, plot, xlabel, ylabel, title, legend, fzero, plot, disp, axis, axes, min, max. 1. A spring-mass system has the following position y(t) and velocity v(t) functions: y(t) = e −0.5t sin(2t) + √ 3e −0.5t cos(2t) v(t) = e −0.5t (2√ 3 − 0.5) sin(2t) − 0.5(4 + √ 3)e −0.5t cos(2t) where the units are in...
Using MATLAB
Plot the following functions (u and v) on the same graph in the interval 0SxS2: u-2 logio(60x 1v-3 cos(6r) Make sure to include a legend for the plot
Using matlab, write the code and plot the graph for the
following equations. The x axis would be theta from 0 deg to 360
deg while the y axis would be angular or tangential position,
velocity and acceleration.
10 100 E7360 AB- eD100mm sin 1O-Sn 2To ne cose, t Cas 2 3 4 O,= To (reano,re bease-feo, sene-Feo 6 as ) Cos O2
10 100 E7360 AB- eD100mm sin 1O-Sn 2To ne cose, t Cas 2 3 4 O,= To...
This problem will introduce you the MATLAB (if you have not used it before). In this course we will use MATLAB in a limited fashion to give you a glimpse on how it is used to solve engineering problems. In your junior year, you will spend an entire semester in AEM 3101 becoming very proficient in using MATLAB for engineering modeling and simulation purposes. In this problem you will use MATLAB to accomplish the following tasks: (a) Write a function...
please answer this asap i need this to bump up my grade! thank
you so much i really appreciate it.
Solve each of the following trigonometric equations over the given Total: 22 marks domains. SHOW YOUR WORK and make sure that your solutions are clearly indicated, either in exact values in terms of 2 or in degrees (depending on the given domain). When finished, submit your assignment to your instructor. a) sec 0 = - 2, 0<< 360° b) cos...
This is a MATLAB Question. Below is my base code for a Fourier
Series of a half triangle wave.
So I am being asked to isolate the first 8 components so that
only those first 8 components of the half triangle function are
calculated by MATLAB fft function, and then afterwards I am asked
to do the same thing but with the first 20 components rather than
the first 8. How do I isolate the first x number of components...
Please explain in detail and use MATLAB code. Thank you.
Prob. 4-1 FM and PM are, respectively, defined as FM: A cos ((t) PM: A cos (kpm(t)) The FM and PM coefficients. kf and kp are kf-100 and kp-2, respectively. The carrier frequency is 400 Hz (1) Plot both the time-domain and frequency-domain representation for two independent message signals, m1(t) and m2(t) using MATLAB. Figure 1 is, again, the illustration of the Rectangular pulse (a) Tn1(t) = 11(t _ 0.5)...
These instructions are written with the assumption that code will be done in matlab. You might find the following built in commands useful: length, plot, xlabel, ylabel, title, legend, fzero, plot, disp, axis, axes, min, max. 2. Numerical Integration (Quadrature). Write FOUR of your own numerical integration routines. One should use left-end, right-end, or mid-points, another should use the trapezoid method, another should use Simpson’s method, and the fourth should use either Guassian Quadrature or Romberg’s method. Use your four...
Program from problem 1: (Using MATLAB)
% Sampling frequency and sampling period
fs = 10000;
ts = 1/fs;
% Number of samples, assume 1000 samples
l = 1000;
t = 0:1:l-1;
t = t.*ts; % Convert the sample index into time for generation and
plotting of signal
% Frequency and amplitude of the sensor
f1 = 110;
a1 = 1.0;
% Frequency and amplitude of the power grid noise
f2 = 60;
a2 = 0.7;
% Generating the sinusoidal waves...