I m new to DSP programming, and I m wondering how best to carry out the seemingly basic operation of level adujustment. Say I have an 8 bit number that represents the amplitude I want a signal to be in 256 steps. I have a set of 16 bit numbers representing the signal data. What s the best way to go about scaling the signal data based on the "volume" parameter so that say 0 is complete attenuation, and 255 leaves the data unchanged?
I have two waveforms which are linked by a numerical factor. I need to use optimal scaling (least squares) between the two waveforms to calculate this factor in Matlab. Unfortunately I have no idea ...