필터 지우기
필터 지우기

Designing a DPCM encoder and decoder with a Quantization being either Mid-Rise or Mid-Tread

조회 수: 9 (최근 30일)
Hello,
I want to desing a DPCM encoder and decoder, and I need it to be more flexible in terms of Applications.
Thus, I want the Qunatization to be toggled to be either Mid-Rise or Mid-Tread. And, the Predictator to be either first order or second order based on the user's choice. I am still quite lost on how to do it, thus I would apprechiate any guidance.

채택된 답변

Ganapathi Subramanian
Ganapathi Subramanian 2023년 5월 26일
Hi Abdelrhman,
It is my understanding that you are working on Differential Pulse Code Modulation technique and wants to know how the quantization to be implemented either in Mid-Rise or Mid-Tread. Please refer to the below documentation to know about DPCM and ‘quantiz’ function as these are essential for implementing them.
Refer to the below code for implementing Mid-Rise uniform quantization.
% Sample signal
x = [-3.5 -2.5 -0.9 1.3 2.6];
% Set number of quantization levels
N = 8;
% Set quantization step size
Delta = 1 ;
% Set quantization levels for midrise quantizer
L = linspace(-4+(Delta/2),4-(Delta/2),N);
% Perform midrise quantization
x_quantized = quantiz(x, L, Delta);
% Display results
disp("Original Signal: ");
disp(x);
disp("Midrise Quantizer Levels: ");
disp(L);
disp("Quantized Signal: ");
disp(x_quantized);
To toggle between Mid-Rise and Mid-Thread, you can use conditional statements to implement the quantizer.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by