Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following equation represents an input-output characteristic of the mu-law c

ID: 1812160 • Letter: T

Question


The following equation represents an input-output characteristic of the mu-law compressor used in pulse-code modulation (PCM).

                                                          y=[log(1+mu(|x|) / log(1+mu)] * sign(x)



Where log is the natural logarithm function,sign is the signum function.


Write a script (M-file) program to compute y . The program must accept the parameters mu and x as inputs and output the y vector. Test your program with mu=255 , and x equal to a vector that varies from 0 to 1 with an increment of 0.01.

Explanation / Answer

x=input('enter the value of x in the range 0 to 1'); mu=input('enter the value of mu '); for i=0:0.01:x y=(log(1+mu(|x|) / log(1+mu)) * sign(x); %out = compand(in,Mu,v,'mu/compressor') %out = compand(in,param,v) implements a

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote