Question

(MATLAB Question) Assume s1 = sin(2*(pi)*f1*t), s2 = sin(2*(pi)*f2*t + 0.4) and s3 = s1 +...

(MATLAB Question)

Assume s1 = sin(2*(pi)*f1*t), s2 = sin(2*(pi)*f2*t + 0.4) and s3 = s1 + s2, where f1 = 0.2 and f2 = 0.425. Plot s1, s2 and s3 vs t with t=0:0.1:10 on the same graph (you have to use hold on command). Label the axes and create legends for each graph.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

f1-0.2: f2=0.425; t 0:0.1:10: s1sin (2* (pi) fl*t) s2 = sin ( 2 * (pi) *f2 *t + 0.4); 33 = 31 + 32; plot (t,s1, t, s2,t, s3)s1 s2 s3 9 8 6 2 0 2 uuojaneM jo apnildurmatlab code:

f1=0.2;
f2=0.425;
t=0:0.1:10;
s1 = sin(2*(pi)*f1*t);
s2 = sin(2*(pi)*f2*t + 0.4);
s3 = s1 + s2;
plot(t,s1,t,s2,t,s3)
legend('s1','s2','s3');
xlabel('t');
ylabel('amplitude of waveform');
grid on
hold on

Add a comment
Know the answer?
Add Answer to:
(MATLAB Question) Assume s1 = sin(2*(pi)*f1*t), s2 = sin(2*(pi)*f2*t + 0.4) and s3 = s1 +...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a Matlab code to generate the signal y(t)=10*(cos(2*pi*f1*t)+ cos(2*pi*f2*t)+ cos(2*pi*f3*t)), where f1=500 Hz, f2=750 Hz...

    Write a Matlab code to generate the signal y(t)=10*(cos(2*pi*f1*t)+ cos(2*pi*f2*t)+ cos(2*pi*f3*t)), where f1=500 Hz, f2=750 Hz and f3=1000 Hz. Plot the signal in time domain. Sketch the Fourier transform of the signal with appropriately generating frequency axis. Apply an appropriate filter to y(t) so that signal part with frequency f1 can be extracted. Sketch the Fourier transform of the extracted signal. Apply an appropriate filter to y(t) so that signal part with frequency f2 can be extracted. Sketch the Fourier...

  • Observable Markov Model Given the observable Markov Model with three states, S1, S2, S3, initial probabilities...

    Observable Markov Model Given the observable Markov Model with three states, S1, S2, S3, initial probabilities \pi = [0.5, 0.2, 0.3]^T and transition probabilities A = [0.4 0.3 0.3 0.2 0.6 0.2 0.1 0.1 0.8] write a code that generates i) 20 sequences of 100 states, ii) 20 sequences of 1000 states, iii) 100 sequences of 100 states, iv) 100 sequences of 1000 states. Java or R implementation

  • solve all questions simply by using matlab. write all step here please 1Normal 1 No Spac Heading1 Heading 2 DISCUSSION Solve all tasks given below: 1. Consider function f(x) 3.5-0.5x cos(6x) for...

    solve all questions simply by using matlab. write all step here please 1Normal 1 No Spac Heading1 Heading 2 DISCUSSION Solve all tasks given below: 1. Consider function f(x) 3.5-0.5x cos(6x) for the value of x between -2.0 until 4.0. Draw the plot in dash line and in red colour, Label the title and all axes. 2. Consider the following functions for 0sxS pi: x() 10e0.St sin(3t +2) y(t) 7e-04t cos(5t - 3) (a) Draw both graphs on the same...

  • Compute Laplace transforms of the following functions: (a) f1 = (1 + t) (b) f2 =...

    Compute Laplace transforms of the following functions: (a) f1 = (1 + t) (b) f2 = eat sin(bt) 11, 0<t<1, (c) f3 = -1 1<t<2, | 2, t>2, Find the functions from their Laplace transforms: (a) Lyı] s(s + 1) (s +3) 2+s (b) L[42] = 52 + 2 s +5 (c) L[y3] = Solve the following initial value problems using the Laplace transform. Confirm each solution with a Matlab plot showing the function on the interval 0 <t<5. (a)...

  •    MATLAB SCRIPT PLEASE Matlab MATH 210 in 2020 Homework Assignment 8- Due 3/25, 11:59PM Each...

       MATLAB SCRIPT PLEASE Matlab MATH 210 in 2020 Homework Assignment 8- Due 3/25, 11:59PM Each plot should have its own figure associated with it. In all questions, give the figure a title, and label the acis. Save your matlab script as drill 10.m Do not use the fplot command. 1. Plot the function f(x) = (x + 5)2 for -5 <<<10. Include a plot title, and label both aris. 2. Use the subplot command to make two plots of...

  • Create a file named “toneA.m” with the following MATLAB code: clear all Fs=5000; Ts=1/Fs; t=[0:Ts:0.4]; F_A=440;...

    Create a file named “toneA.m” with the following MATLAB code: clear all Fs=5000; Ts=1/Fs; t=[0:Ts:0.4]; F_A=440; %Frequency of note A is 440 Hz A=sin(2*pi*F_A*t); sound(A,Fs); Type toneA at the command line and then answer the following: (a) What is the time duration of A? (b) How many elements are there in A? (c) Modify toneA.m by changing “Fs=5000” to “Fs=10000”. Can you hear any difference? (d) Create a file named “tone.m” with the following MATLAB code: function x = tone(frequency,...

  • This uses MATLAB code with plotting HW19: Plotting with plot () Due 11:59 pm Monday 1....

    This uses MATLAB code with plotting HW19: Plotting with plot () Due 11:59 pm Monday 1. (10 pts) Write a script that will produce a sine curve and a cosine curve in the same plot, 0 as shown to the right. 06 0.4 0.2 To have two sets of data in one plot, you may plot the first one, then with the command hold on", plot the other. Or, you can learn how to plot two lines with just one...

  • solve this a question simply by using Matlab. Tell me what you want to do Times...

    solve this a question simply by using Matlab. Tell me what you want to do Times New Rom12 A A Aa Copy AbCcDd AcD AaBbC AaßbCc AalB 1 Nomal 1No Spac Headingt AaßbCcD AalbCcDd AabGaDd Aut d Format Painter -7-A Heading 2 Title Subtile Sabtle Em Emphas te beard Fot Paragraph Shes 21 X axiss UNG 2. Consider the following functions for 0 <x< pi: (t) 10e0.5t sin(3t+ 2) (t) 7e0.4t cos(5t 3) plot. Differentiate both graph with different line...

  • please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab:...

    please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab: x[n] = u(n) - u[n-6] a. Mathematically compute yi[n] = x[n] * x[n] where * means convolution. Now use the conv command to perform the convolution. Graph x[n) and the resulting y(n), both over the interval Osns 20. How many non-zero terms does y(n) have? Does your computational result agree with the Matlab result? b. Repeat a. but this time with yz[n] = x[n]*h[n)...

  • Can you please help me answer Task 2.b? Please show all work. fs=44100; no_pts=8192; t=([0:no_pts-1]')/fs; y1=sin(2...

    Can you please help me answer Task 2.b? Please show all work. fs=44100; no_pts=8192; t=([0:no_pts-1]')/fs; y1=sin(2*pi*1000*t); figure; plot(t,y1); xlabel('t (second)') ylabel('y(t)') axis([0,.004,-1.2,1.2]) % constrain axis so you can actually see the wave sound(y1,fs); % play sound using windows driver. %% % Check the frequency domain signal. fr is the frequency vector and f1 is the magnitude of F{y1}. fr=([0:no_pts-1]')/no_pts*fs; %in Hz fr=fr(1:no_pts/2); % single-sided spectrum f1=abs(fft(y1)); % compute fft f1=f1(1:no_pts/2)/fs; %% % F is the continuous time Fourier. (See derivation...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT