How do i quantize data with N levels?

1 vue (au cours des 30 derniers jours)
Deniz Bozdogan
Deniz Bozdogan le 3 Nov 2021
I have the following code and have to quantize Y with N=8 levels in the uniform quantizer. Can you help me about it? Thank you in advance.
close all;
clear all;
rand('seed', sum(100*clock));
x1 = 0 + (4-0) .* rand(1000000,1);
x2 = -2 + (0-(-2)) .* rand(1000000,1);
y=x1+x2;
ymeansquared=mean(y.^2);

Réponses (1)

Scott MacKenzie
Scott MacKenzie le 3 Nov 2021
y1 = discretize(y,8);

Catégories

En savoir plus sur Timing and presenting 2D and 3D stimuli dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by