When operating on a signal in MATLAB sampling is always bein

When operating on a signal in MATLAB, sampling is always being done because MATLAB stores signals as vectors which are. in effect, discrete-time signals Furthermore, MATLAB performs ideal C-to-D conversion when operating on signals that are defined by mathematical formulas. As a result, there are cases where aliasing might occur unintentionally in a MATLAB program. Discrete-time MATLAB signals can e converted to continuous-time with the function sounds which plays out an analog signal for listening. In the following MATLAB code, a discrete-time sinusoid is generated and then played out with sounds: Determine the analog frequency (in hertz) that will be heard. The following MATLAB code generates samples of a sinusoidal waveform: Although the sinusoid was not written to have a frequency of 2400 Hz. it is possible to play out the vector xx so that it sounds like a 2400 Hz tone. Determine the value of f sump that should be used in sounds to play the vector xx as a 2400 Hz tone. The following snippet of MATLAB code generates a very long sinusoid: nn = 0:2190099; xx = (7/pi)*cos (1.8*pi*nn + 2.03); sounds(xx, 16000) Determine the frequency (in Hz) and the duration (in seconds) of the tone played by sounds. Assume that MATLAB has an infinite amount of memory so that the very long vector xx can be stored.

Solution

(a) fs= sampling frequency= 16000 Hz

W= analog frequency=1.8**fs rad/s

F= analog frequency=w/(2*)= 14400 Hz

(b) fs=2400 Hz

(C) duration=( 8000*64/4000=128 s

F=220

 When operating on a signal in MATLAB, sampling is always being done because MATLAB stores signals as vectors which are. in effect, discrete-time signals Furthe

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site