# Producing the sinc roll off of a DAC

Discussion in 'Homework Help' started by jayo57, Jul 3, 2013.

1. ### jayo57 Thread Starter New Member

Apr 21, 2013
4
0
Hi,

I'm trying to produce the sinc roll off a DAC (it's non flat frequency response) as shown in the below image. I've managed to plot it theoretically using scilab but now i need to prove it, by producing it using a for loop, but I'm not quite sure how to do this. Any help with this would be much appreciated.

Scilab code for Theoretical plot;

Code ( (Unknown Language)):
1.
2. Fcar=100;
3. Roll = [sin(%pi/Fcar)/(%pi/Fcar),sin(10*%pi/Fcar)/(10*%pi/Fcar),sin(20*%pi/Fcar)/(20*%pi/Fcar),sin(30*%pi/Fcar)/(30*%pi/Fcar),sin(40*%pi/Fcar)/(40*%pi/Fcar),sin(50*%pi/Fcar)/(50*%pi/Fcar),sin(60*%pi/Fcar)/(60*%pi/Fcar),sin(70*%pi/Fcar)/(70*%pi/Fcar),sin(80*%pi/Fcar)/(80*%pi/Fcar),sin(90*%pi/Fcar)/(90*%pi/Fcar),sin(100*%pi/Fcar)/(100*%pi/Fcar)]; etc.......
4.
5. plot(Roll);
6. xlabel('Time index n'); ylabel('Amplitude');
7. title('Sinc Roll Off');
8.
9. rect=[1 -0.3 55 1.1];
10. zoom_rect(rect)
11.
I have also managed to plot it using the following code;

Code ( (Unknown Language)):
1.
2. stacksize('max')
3. FS=192000;
4. fout=1920;
5. t=0:1:FS;
6. sig=sinc(2*%pi*t*fout/FS);
7. //playsnd(sig,FS)
8. plot2d(sig)
9. //plot(sig)
10. rect=[0 -0.4 2000 1.3];
11. zoom_rect(rect)
12.

Last edited by a moderator: Jul 4, 2013
2. ### WBahn Moderator

Mar 31, 2012
20,221
5,747
You may not be sure how to do it, but I am quite unsure what you are even trying to do. Could you explain what you are trying to accomplish a bit more clearly.