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
A square has a side of 6.25 feet. What is the area in square feet? Round to the correct significant digits.
denis23 [38]
Area of a square = side^2
area = 6.25^2 = <span> <span> <span> 39.0625 </span> </span> </span> square feet

= 39.06 (rounded)

4 0
3 years ago
Bob Nale is the owner of Nale’s Quick Fill. Bob would like to estimate the mean number of gallons of gasoline sold to his custom
ira [324]

Answer:

a) The best estimator for the population mean is given by the sample mean \hat \mu = \bar X = 5.70

b) The 99% confidence interval would be given by (4.969;6.431)    

c) We are 99% confident that the true mean for th number of gallons of gasoline  sold to his customers is between 4.969 and 6.431.

Step-by-step explanation:

1) Previous concepts

A confidence interval is "a range of values that’s likely to include a population value with a certain degree of confidence. It is often expressed a % whereby a population means lies between an upper and lower interval".

The margin of error is the range of values below and above the sample statistic in a confidence interval.

Normal distribution, is a "probability distribution that is symmetric about the mean, showing that data near the mean are more frequent in occurrence than data far from the mean".

\bar X represent the sample mean for the sample  

\mu population mean (variable of interest)

\sigma=1.9 represent the population standard deviation

n=45 represent the sample size  

2) Part a

The best estimator for the population mean is given by the sample mean \hat \mu = \bar X = 5.70

3) Part b. Develop a 99 percent confidence interval for the population mean.

The confidence interval for the mean is given by the following formula:

\bar X \pm z_{\alpha/2}\frac{\sigma}{\sqrt{n}}   (1)

Since the Confidence is 0.95 or 95%, the value of \alpha=0.01 and \alpha/2 =0.005, and we can use excel, a calculator or a table to find the critical value. The excel command would be: "=-NORM.INV(0.005,0,1)".And we see that z_{\alpha/2}=2.58

Now we have everything in order to replace into formula (1):

5.7-2.58\frac{1.9}{\sqrt{45}}=4.969    

5.7+2.58\frac{1.9}{\sqrt{45}}=6.431

So on this case the 99% confidence interval would be given by (4.969;6.431)    

4) Part c. Interpret the meaning of part (b).

On this case we can say this: We are 99% confident that the true mean for th number of gallons of gasoline  sold to his customers is between 4.969 and 6.431.

4 0
4 years ago
(5ab-4a-6)-(4ab-1) find the sum please fast
jekas [21]

We need to get rid of expression parentheses.

If there is a negative sign in front of it,

each term within the expression changes sign.

Otherwise, the expression remains unchanged.

Numerical 'like' terms will be added. There is only one group of like terms

the answer is: ab-4a-5 

<span />
7 0
3 years ago
Sean got m marks for his math test.Emma got 15 more marks than Sean Emma score is 97
Dafna1 [17]
97-15=82 so he got 82
5 0
3 years ago
If possible help me in this. I need to find the two odd numbers...​
Lelechka [254]

Part (a)

Consecutive odd integers are integers that odd and they follow one right after another. If x is odd, then x+2 is the next odd integer

For example, if x = 7, then x+2 = 9 is right after.

<h3>Answer:  x+2</h3>

========================================================

Part (b)

The consecutive odd integers we're dealing with are x and x+2.

Their squares are x^2 and (x+2)^2, and these squares add to 394.

<h3>Answer: x^2 + (x+2)^2 = 394</h3>

========================================================

Part (c)

We'll solve the equation we just set up.

x^2 + (x+2)^2 = 394

x^2 + x^2 + 4x + 4 = 394

2x^2+4x+4-394 = 0

2x^2+4x-390 = 0

2(x^2 + 2x - 195) = 0

x^2 + 2x - 195 = 0

You could factor this, but the quadratic formula avoids trial and error.

Use a = 1, b = 2, c = -195 in the quadratic formula.

x = \frac{-b\pm\sqrt{b^2-4ac}}{2a}\\\\x = \frac{-(2)\pm\sqrt{(2)^2-4(1)(-195)}}{2(1)}\\\\x = \frac{-2\pm\sqrt{784}}{2}\\\\x = \frac{-2\pm28}{2}\\\\x = \frac{-2+28}{2} \ \text{ or } \ x = \frac{-2-28}{2}\\\\x = \frac{26}{2} \ \text{ or } \ x = \frac{-30}{2}\\\\x = 13 \ \text{ or } \ x = -15\\\\

If x = 13, then x+2 = 13+2 = 15

Then note how x^2 + (x+2)^2 = 13^2 + 15^2 = 169 + 225 = 394

Or we could have x = -15 which leads to x+2 = -15+2 = -13

So, x^2 + (x+2)^2 = (-15)^2 + (-13)^2 = 225 + 169 = 394

We get the same thing either way.

<h3>Answer: Either 13, 15  or  -15, -13</h3>
4 0
3 years ago
Other questions:
  • Solve for x 1/4(4x-1)=-1/7-5/7
    8·1 answer
  • What would the next figure in the geometric pattern below be?
    13·1 answer
  • Which of the following statements is false?
    11·2 answers
  • The school auditorium has 448 chairs set out for the third- grade performance.What is 448 rounded to the nearest ten
    15·1 answer
  • A game is played as follows: a die numbered 1 to 6 is rolled. If the number 1 comes up, you get nothing. If the number 2, 3, or
    5·2 answers
  • Seven out of 13 students that apply to Biglarge University will get accepted. If
    5·1 answer
  • Which transformation is represented in the diagram​
    5·1 answer
  • Evaluate 5−44⋅(−0.75)−18÷23⋅0.8−45.
    7·1 answer
  • Help me due in 5 mins!
    14·1 answer
  • the area of a parallelogram measures 171 cm the base of the parallelogram is 18 cm in length which of the following best represe
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!