Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

quantized to binary coding

Status
Not open for further replies.

ruchisahay

Newbie level 2
Joined
Aug 28, 2014
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
11
i hv problem regarding coding
i have taken a sine signal and quantized it using midtread quantization
but i dont know how to convert that quantized signal into BINARY FORM
Plzzz... help me out asap.heres my coding
Code:
clc;
close all;
clear all;
 t=0:0.01:10;
 y=8*sin(4*pi*t);
 b=8;
 l=2^b;
 subplot(3,1,1);
 plot(y);
ymin = min(y); ymax = max(y);
 Delta = (ymax - ymin)/l;
 dec = Delta*[-l/2:-1 0 1:l/2]
subplot(3,1,2);
 stem(dec);
 
Last edited by a moderator:

Hi,

how many bits?
with or without sign?

for 16 bit signed: values are -32768...0...+32767
just multiply the sine value with 32767 and perform rounding.
Please make sure that rounding near zero (+/-1 LSB does what you want and there is no larger gap as with other values).


Klaus
 

[Moved]midtread quantization

can any one plz tell me code to do midtread quantization coding in matlab
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top