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.

help! what is wrong with my code

Status
Not open for further replies.

jess17

Junior Member level 3
Joined
Mar 4, 2011
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,431
t = 0:.001:2*pi; % Times at which to sample the sine function

sig = sin(2*t); % Original signal, a sine wave

partition = [-1:2/15:1]; % Length 16, to represent 17 intervals

codebook = [0:1:16]; % Length 17, one entry for each interval

quants= quantiz(sig,partition,codebook); % Quantize.

x=quants;
 
Last edited:

iess17,
I am going to guess, as I do not recongize the syntax. But "partition = [-1:2/15:1]; " 15:1 is only 15, should it read 15:0?

Sckoarn
 

errm, no, its still the same :(
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top