Question: Avg, Var ] = AvgVar ( x ) % x is the input vector, Avg and Var are the average and variance of the elements

Avg, Var]= AvgVar(x)
%x is the input vector, Avg and Var are the average and variance of the elements
2. Write a function using M File that implements the following hard-limiting function:
f(x)={0.5,f(x)>0-0.5,f(x)0
The hard-limiting function compares each element in vector x to zero. All elements that are la zero will be set to equal 0.5 and all elements that are less than zero will be set to -0.5. The harc function will return a vector with elements values that are equal to -0.5,0, or 0.5.
SigHL = HardLimiting(Sig)% Sig is the input vector, SigHL is the signal after applying hard limiting.
a) Test your function by passing the sinusoidal function you created in the MATLAB Sound your function is working probably, it should return a square function. Plot the output of your verify that the output is a square function of amplitude 0.5. Play the square function. Doe different than the sinusoidal function? Explain.
b) Download the wave file "BigDog.wav" from the course website and save it in the same saved the hard-limiting function. You can upload the sound file "BigDog.wav" to a Matlab v by using the Matlab function "audioread()" as follow:
>>[Sig1, sr]= audioread('BigDog.wav'); % sr is the sampling rate of the sound signal
Test your hard-limiting function by passing the vector Sig1 of the BigDog sound signal returned array of the hard-limiting function.
>> SigHD = HardLimiting(Sig1);
>> sound(SigHD,sr)
Do you still understand the speech signal? The hard limiting function kept the zero-cross f the speech signal and the polarity of the samples. Zero-crossing represent the stationary ardrum. Positive values of the speech signal push the eardrum inward toward the cochl ralues pull the eardrum outward. Plot the original signal and the hard limited signal. By h leleted so much information about the speech waveform and you still understand the eleting all color and texture of an image and keeping only the edges of the image.
 Avg, Var]= AvgVar(x) %x is the input vector, Avg and Var

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!