Error using quantiz
Publicado por Andrew (4 intervenciones) el 20/04/2014 21:35:04
Buen día
Tengo este error al tratar de realizar la gráfica
cuantizacion con particion y codebook
Código:
Error using quantiz (line 59)
The codebook must be a real vector whose length is one more than the length of
the partition.
Agradezco me ayuden a corregir este problema ya que soy nuevo en Matlab
Gracias
Tengo este error al tratar de realizar la gráfica
cuantizacion con particion y codebook
Código:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%cuantizacion con particion y codebook
%Instantes de muestreo
t=[0:0.1:2*pi];
%señal
m=sin(t)
%Particion
partition=[-1:.2:1];
Codebook=[0 -1 -0.7 -0.5 -0.3 -0.1 0.1 0.3 0.5 0.7 1];
%cuantizacion
[intervalos,valores]=quantiz (m, particion, codebook);
%Representacion
plot(t,m)
hold on
plot(t,m,'x')
stem(t,valores,'.r');
hold off
Error using quantiz (line 59)
The codebook must be a real vector whose length is one more than the length of
the partition.
Agradezco me ayuden a corregir este problema ya que soy nuevo en Matlab
Gracias
Valora esta pregunta


0