How do i quantize data with N levels?

2 ビュー (過去 30 日間)
Deniz Bozdogan
Deniz Bozdogan 2021 年 11 月 3 日
回答済み: Scott MacKenzie 2021 年 11 月 3 日
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);

回答 (1 件)

Scott MacKenzie
Scott MacKenzie 2021 年 11 月 3 日
y1 = discretize(y,8);

カテゴリ

Help Center および File ExchangeTiming and presenting 2D and 3D stimuli についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by