For the following, drag and drop the statements to the correct lines: Blank 1 Question 1 Blank 2 Question 1f=.5e3;tlen=.5; Blank 3 Question 1 Blank 4 Question 1sound(x,fs) Blank 5 Question 1xlabel('time, s')ylabel('amplitude, arbitary units')axis([0 1/f*10 − 1 1])t=0:Ts:tlen − Ts; Ts=1/fs; x=sin(2*pi*f*t); fs=44.1e3; plot(t,x)
Question
For the following, drag and drop the statements to the correct lines: Blank 1 Question 1 Blank 2 Question 1f=.5e3;tlen=.5; Blank 3 Question 1 Blank 4 Question 1sound(x,fs) Blank 5 Question 1xlabel('time, s')ylabel('amplitude, arbitary units')axis([0 1/f10 − 1 1])t=0:Ts:tlen − Ts; Ts=1/fs; x=sin(2pift); fs=44.1e3; plot(t,x)
Solution
The correct order for the statements is:
Blank 1 Question 1: fs=44.1e3; Blank 2 Question 1: f=.5e3; tlen=.5; Ts=1/fs; Blank 3 Question 1: t=0:Ts:tlen - Ts; x=sin(2pift); Blank 4 Question 1: sound(x,fs) Blank 5 Question 1: plot(t,x); xlabel('time, s'); ylabel('amplitude, arbitrary units'); axis([0 1/f10 − 1 1])
This sequence of commands is written in MATLAB language. It first defines the sampling frequency (fs), the frequency of the signal (f), the length of the signal (tlen), and the sampling period (Ts). Then it generates the time vector (t) and the signal (x), plays the sound, and finally plots the signal with time on the x-axis and amplitude on the y-axis. The axis command sets the limits of the x-axis and y-axis.
Similar Questions
For the following code:fs=12e3;Ts=1/fs;tlen=4.5;t=0:Ts:tlen − Ts;fmin=0.1e3;fmax=3e3;fstep=(fmax − fmin)/length(t);f=fmin:fstep:fmax − fstep;x=sin(2*pi*f.*t);sound(x,fs)plot(t,x)xlabel('time, s')ylabel('amplitude, arbitary units')axis([0 1/fmin*5 − 1 1])How much time will the signal take to play back?
For the following:f=.5e3;fs=44.1e3;Ts=1/fs;tlen=.5;t=0:Ts:tlen − Ts;x=sin(2*pi*f*t);sound(x,fs)plot(t,x)xlabel('time, s')ylabel('amplitude, arbitary units')axis([0 1/f*10 − 1 1])What is fs?
or the following code:fs=18.28e3;Ts=1/fs;tlen=4.2;t=0:Ts:tlen − Ts;fmin=0.1e3;fmax=3e3;fstep=(fmax − fmin)/length(t);f=fmin:fstep:fmax − fstep;x=sin(2*pi*f.*t);sound(x,fs)plot(t,x)xlabel('time, s')ylabel('amplitude, arbitary units')axis([0 1/fmin*5 − 1 1])
Item102points Time Remaining 20 minutes 41 seconds00:20:41eBookReferencesItem 10 Time Remaining 20 minutes 41 seconds00:20:41MATLAB 056 - User-defined function instructionsWhich command is used in MATLAB to get the instructions related to any predefined or user-defined functions?Multiple Choicedefineinstructionshelpfunction/?
Time left 0:39:28Question 1Answer savedMarked out of 1.0Flag questionTipsQuestion textRefer to the graph. An increase in the quantity demanded would best be reflected by a change from:Question 1Select one:a.line A to B.b.point 6 to 3.c.line A to C.d.point 6 to 4.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.