Forum Discussion
Altera_Forum
Honored Contributor
13 years agothe quarter sine LUT code
Dear all I need to get the quarter sine LUT in DDFS (Herewith the MATLAB code that I used) i=[0:i-1]; x= (i-1)*sin ((pi/2)*i/31));
Altera_Forum
Honored Contributor
13 years agoThere is some error in your sine values but almost correct.
Try this: x = round(255*sin(2*pi*(0:1023)/1024)); x = x(1:256); You should get proper quarter sine from x otherwise tell us what you do with x. you can also just use: x = round(255*sin(2*pi*(0:255)/1024));