1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vladimir [108]
3 years ago
11

Develop a MATLAB script to generate a 5 panel vertical plot to illustrate how a function changes as the parameters change. On ea

ch plot, display the simple sine wave, y(t) = sin(2πt), as a red line. Then, add the following functions to each of the 5-panels as black lines:

Mathematics
1 answer:
Marat540 [252]3 years ago
3 0

The question is incomplete. Complete question along with Matlab code, explanation, and output results are given below.

Complete Question:

Develop a MATLAB script to generate a 5 panel vertical plot to illustrate how a function changes as the parameters change. On each plot, display the simple sine wave, y(t) = sin(2πt), as a red line. Then, add the following functions to each of the 5-panels as black lines:

y(t) = sin(2πt)  sine function

y1(t)=1+sin(2πt) effect of mean

y2(t)=2sin(2πt) effect of amplitude

y3(t)=sin(4πt) effect of frequency

y4(t)=sin(2πt) - π/4) effect of phase shift

y5(t)=cos(2πt) - π/2) relationship between sine and cosine

Step-by-step explanation:

We are required to show different sinusoidal plots to illustrate the effects of changing mean, amplitude, frequency, phase shift, and relationship of sine and cosine wave.

t=[0:0.01:2*pi] % time vector from 0 to 2pi

y=sin(2*pi*t); % the original sine function  

% effect of mean

y1=1+sin(2*pi*t);  

subplot(5,1,1) % 5 rows, 1 column and last for position

plot(t,y,'k',t,y1,'r')  % this function plots y and y1 with respect to time vector t

% 'k' for black color and 'r' for red color

grid on  

xlabel('time (t)') % x-axis is for time

ylabel('y1(t)')  % y-axis is for function value y(t)

title('effect of mean') % title of the plot

ylim([-3 3]) % limit of y-axis

xlim([0 6]) % limit of x-axis

% effect of amplitude

y2=2*sin(2*pi*t);

subplot(5,1,2)  

plot(t,y,'k',t,y2,'r')  

grid on  

xlabel('time (t)')  

ylabel('y2(t)')  

title('effect of amplitude')  

ylim([-3 3])  

xlim([0 6])  

% effect of frequency

y3=sin(4*pi*t);  

subplot(5,1,3)  

plot(t,y,'k',t,y3,'r')  

grid on  

xlabel('time (t)')  

ylabel('y3(t)')  

title('effect of frequency')  

ylim([-3 3])  

xlim([0 6])  

% effect of phase shift

y4=sin((2*pi*t)-pi/4);  

subplot(5,1,4)  

plot(t,y,'k',t,y4,'r')

grid on  

xlabel('time (t)')  

ylabel('y4(t)')  

title('effect of phase shift')  

ylim([-3 3])  

xlim([0 6])  

% relationship between sine & cosine

y5=cos((2*pi*t)-pi/2);  

subplot(5,1,5)  

plot(t,y,'k',t,y5,'r')  

grid on  

xlabel('time (t)')  

ylabel('y5(t)')  

title('relationship between sine & cosine')  

ylim([-3 3])  

xlim([0 6])  

Output Results:

The first plot shows that sine wave gets shifted to upper side with respect to the original sine wave.

The second plot shows that the amplitude of the sine wave is increased with respect to the original sine wave.

The third plot shows that the frequency of the sine wave is increased. The number of cycles are increased with respect to the original sine wave.

The fourth plot shows there is a phase shift between two waves. The modified sine wave lags the original sine wave by π/4  

The fifth plot shows the relationship between sine and cosine wave.

As we know sin(2πt)=cos(2πt - π/2)

Therefore, both waves are superimposed on each other since they are equal.

You might be interested in
Mackaya took 120 pictures at his party. 15of the pictures were good and the rest were damaged. How many pictures were damaged?
dalvyx [7]

Answer:

105

Step-by-step explanation:

the picture were damaged

=120-15

=105

3 0
3 years ago
Read 2 more answers
Need some help please​
Dafna11 [192]

Answer:

About what?

Step-by-step explanation:

7 0
3 years ago
Read 2 more answers
Find the angles a,b,c and d
I am Lyosha [343]

Answer:

  (a, b, c, d) = (101°, 79°, 83°, 97°)

Step-by-step explanation:

∠a is the supplement of the one marked 79°, so is ...

  ∠a = 180° -79°

  ∠a = 101°

__

∠b is a corresponding angle to the one marked 79°, so is congruent to it.

  ∠b = 79°

__

∠c is a vertical angle with the one marked 83°, so is congruent to it.

  ∠c = 83°

__

∠d is a same-side interior angle between two parallel lines, so is supplementary to ∠c.

  ∠d = 180° -83°

  ∠d = 97°

3 0
3 years ago
Find the value of x in the triangle shown below.<br> 56°<br> 4<br> 4.5<br> 4
svetlana [45]

Step-by-step explanation:

\frac{ \sin(56) }{4}  =  \frac{ \sin(x) }{4.5}  \\  \sin(x )  =  \frac{4.5 \times  \sin(56) }{4}  =  \frac{3.73}{4}  \\  \sin(x)  = 0.9326 \\ x = 68.84

4 0
3 years ago
Round each decimal to the nearest whole number.<br><br> 6.85 <br> 0.37 <br> 2.5 <br> 16.1
Licemer1 [7]

Answer:

7

0.37 is closest to 0 but probably 1

3

16

5 0
2 years ago
Other questions:
  • Let $P$ and $Q$ be constants. The graphs of the lines $x + 5y = 7$ and $15x + Py = Q$ are perpendicular and intersect at the poi
    7·1 answer
  • What do you get when you smelt iron?<br><br> A. Lava<br> B. Foundry
    15·2 answers
  • I need help with this I don’t understand how to do this at all so please help and thank you to however helps
    10·1 answer
  • Plzzzzzzzzzzzzz help me i begggg u just find the number for the boxes
    9·1 answer
  • 24 quarts =________gallons
    9·1 answer
  • Please help<br> 20 and 22 please if possible can you explain how if not that's ok
    12·1 answer
  • Ava borrows $600 to buy a bike at a yearly simple interest rate of 2.25%. Ava borrows the money for 3 years. How much does Ava p
    11·1 answer
  • Find five rational numbers between −2 and 0
    15·1 answer
  • Which equation represents a line parallel to the x-axis
    15·2 answers
  • 5b8c3<br> The degree of the monomial is?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!