sound(5*yy1,fs,bits); %»Ø·Å¾ÎÞÏÞ»ØÉùÂ˲¨Æ÷ºóµÄÓïÒôÐźŠpause(2); %ÑÓʱ2Ãë
%ȫͨ½á¹¹µÄ»ìÏìÆ÷ 8
Êý×ÖÐźŴ¦Àí¿Î³ÌÉè¼Æ±¨¸æ
[x,fs,bits]=wavread('wlx.wav',[10000 40000]); %¶ÁÈ¡ÓïÒôÐźŠx=x(:,1); %ֻȡµ¥ÉùµÀ n1=0:2000;
a=0.5; %aȡСÓÚµÈÓÚ1
Bz1=[a,0,0,0,0,0,0,0,0,0,1]; %·Ö×ÓµÄϵÊý Az1=[1,0,0,0,0,0,0,0,0,0,a]; %·ÖĸµÄϵÊý
yy2=filter(Bz1,Az1,x); figure(6); %FIRÂ˲¨Æ÷½øÐÐÂ˲¨
subplot(2,1,1);plot(yy2); title('ȫͨӦµÄʱÓòͼ')%ȫͨ½á¹¹µÄ»ìÏìÆ÷ʱÓò²¨ÐÎ
µãµÄFFT±ä»» YY2=fft(yy2,2001); %¾È«Í¨½á¹¹µÄ»ìÏìÆ÷ºóµÄÐźÅ×ö2001 subplot(2,1,2);plot(n1(1:1000),YY2(1:1000)); %ȫͨ½á¹¹µÄ»ìÏìÆ÷ƵÆ×ͼ title('ȫͨӦµÄƵÆ×ͼ')
sound(5*yy2,fs,bits); %»Ø·Å¾È«Í¨½á¹¹µÄ»ìÏìÆ÷ºóµÄÓïÒôÐźŠ5 ³ÌÐòµ÷ÊÔ 5.1 µ÷ÊÔ¹ý³ÌÓë²½Öè
Ê×ÏÈÓüÆËã»úµÄÉùÒô±à¼¹¤¾ßÂ¼ÖÆÒ»¶ÎÓïÒô£¬Éú³É.wavÎļþ¡£ÔÙÔÚMATLABµÄmÎļþÖÐÊéд´úÂ룬Öð²½µ÷ÊÔ¡£´ýÔËÐгɹ¦ºó£¬Éè¼Æ½çÃæ£¬Ê¹´úÂëÓë½çÃæ½áºÏ¡£Éè¼Æ½çÃæÊ±Ð޸İ´Å¥µÄstringÊôÐÔÉè¼Æ°´Å¥£¬ÔÚ¶Ôÿ¸ö°´Å¥µÄ¹¦Äܱàд´úÂ룬µ÷ÊÔ²¢ÔËÐС£ 5.2 ·¢ÏÖµÄÎÊÌâ
1.¸ù¾Ý²»Í¬Â¼ÖƵÄÉùÒô£¬ÐźŲÉÑùµÄƵÂʲ»Ò»Ñù£¬ÓÐʱ²ÉÑù³öÀ´»Ø·ÅµÄÐźÅûÓÐÉùÒô£¬Õâ¾Í˵Ã÷ÐźŲÉÑùƵÂÊÓÐÎó¡£
2.±äÁ¿Î´ÉèÖóõÖµ¡£ 3.wavread()º¯ÊýÔËÓôíÎó¡£ 4.½çÃæÉè¼ÆÊ±²»ÄÜÔËÐС£ 5.3 ½â¾öµÄ°ì·¨
1.ÓÉÓÚ×Ô¼ºÂ¼ÖƵÄÉùÒôƵÂʽϸߣ¬ËùÒÔ±ØÐëÏÈÊÔÑ鲻ͬƵÂʵIJÉÑù£¬ÕÒµ½ºÏÊÊµÄÆµÂÊ¡£
9
Êý×ÖÐźŴ¦Àí¿Î³ÌÉè¼Æ±¨¸æ 2.±äÁ¿ÉèÖóõÖµ¡£
3.wavread()º¯ÊýÔËÓÃӦעÃ÷ÎļþÀàÐͲ¢ÇҷŽøworkÎļþ¼ÐÏ¡£
4.½çÃæÉè¼ÆÊ±²»ÄÜÔËÐУ¬¼ì²é´úÂ룬ÿ¶ÎÐèÒªÏȶÁÈ¡ÉùÒôÎļþÔÚÔËÐÐÏÂÃæµÄ´úÂë¡£
6ÔËÐÐÓë²âÊÔ 6.1ÔËÐгÌÐò
ͼ6-1 ½çÃæÉè¼ÆÍ¼
ͼ6-2 ÔʼÐźÅͼ 10
Êý×ÖÐźŴ¦Àí¿Î³ÌÉè¼Æ±¨¸æ
ͼ6-3 ²ÉÑùºóÐźÅͼ
ͼ6-4 ÑÓʱºóµÄÐźÅͼ
ͼ6-5 »ìÏìºóµÄÐźÅͼ 11
Êý×ÖÐźŴ¦Àí¿Î³ÌÉè¼Æ±¨¸æ
ͼ6-6 µ¥»ØÉùÂ˲¨ºóµÄÐźÅͼ
ͼ6-7 ÎÞÏÞ¸ö»ØÉùÂ˲¨ºóµÄÐźÅͼ
ͼ6-8 Ðźžȫͨ½á¹¹µÄ»ìÏìÆ÷ºóµÄͼ 12
Êý×ÖÐźŴ¦Àí¿Î³ÌÉè¼Æ±¨¸æ ½á ÂÛ
ͨ¹ýÕâ´ÎµÄ¿Î³ÌÉè¼Æ£¬ÊìϤ²¢ÕÆÎÕÁËMATLABÖÐÓйØÓïÒôÐźŵĶÁÈ¡£¬ÆµÆ×·ÖÎö£¬ÔÚʱÓòÓÃÊý×ÖÐźŴ¦Àí·½·¨½«ÐźżÓÈëÑÓʱºÍ»ìÏ죬 ÔÙ·ÖÎöÆäƵÆ×£¬²¢ÓëÔʼÐÅºÅÆµÆ×½øÐбȽϡ£
ͨ¹ýÔÚͼÊé¹ÝÒÔ¼°ÍøÉϲéÕÒ×ÊÁÏ£¬ÎÒ´óÌåÖªµÀÁËÔõôÉè¼ÆµÄ¸÷¸ö²½Öè¡£ÔÚ×ö½çÃæµÄ¹ý³ÌÖУ¬Ò²Ñ§µ½ÁËºÜ¶à£¬ÕÆÎÕÁ˾ä±úµÄÓ÷¨£¬¸÷¸ö°´Å¥ÈçºÎʵÏ֯书ÄÜ¡£×ö
matlabµÄ½çÃæ¹ý³ÌÖУ¬×îÖØÒªµÄÒ»¸ö¾Ñé¾ÍÊÇ:×îºÃÊǰѴúÂëÏÈÓýű¾ÎļþµÄÐÎʽдÍ꣬ȻºóÔÚ×ö½çÃæ£¬ÒòΪÔÚÌí¼Ó¿Ø¼þµÄ¹ý³ÌÖб¾À´Ð´ºÃµÄ³ÌÐò»á³öÎÊÌâµÄ¡£Õâ¸öÊÇÒ»¸öÈí¼þµÄÎÊÌâ¡£·ñÔòÓÐʱºò¾Í»áÀ˷Ѻܶàʱ¼ä¡£ÁíÍâÖµµÃ×¢ÒâµÄÒ»¸öÎÊÌâÊÇ:ÃüÃû×îºÃÓá°ÐÙÑÀÀûÃüÃû·¨¡±£¬·ñÔòº¯ÊýÌ«¶àÁË£¬¾Í²»ÖªµÀÃû×Ö´ú±íʲôÒâ˼£¬ÓÐʱºò£¬ÕâÑù×ÓÒ²»á½ÚÊ¡ºÜ¶àʱ¼ä¡£
ÔÚÂ¼ÖÆÉùÒôÎļþʱ£¬ÒòΪÎÒµÄÂ¼ÖÆµÄÉùÒôƵÂʽϸߣ¬ËùÒÔÔÚ²ÉÑùʱ¾¹ýºÜ¶à´ÎµÄ±ä»»²ÅÄܹ»²Éµ½ÊÊºÏµÄÆµÂÊ£¬ÔÚ´úÂë·ÖÎöÉè¼ÆÊ±£¬ÎÒÈÏʶµ½×ÔÉíÓкܶ಻×㣬ÈçºÎÈÃÉùÒô¼ÓÈëµ½MATLABÖУ¬ÈçºÎÉè¼Æ¸÷¸öÂ˲¨Æ÷µÈ¡£¿ªÊ¼¶¼ºÁÎÞÍ·Ð÷£¬µ«¾¹ý²éÔÄ×ÊÁÏ£¬ÒÔ¼°×éÔ±Ö®¼äµÄÏ໥ÌÖÂÛ£¬×îºóÈÃÕâ¸ö¿Î³ÌÉè¼ÆÄܹ»Ô²ÂúµÄÍê³ÉÁË¡£
¾¹ýÕâ´ÎµÄ¿Î³ÌÉè¼Æ£¬ÎÒ¶ÔÀíÂÛ֪ʶµÄÕÆÎÕ¸ü¼ÓÀιÌÁË£¬¶øÇÒ°ÑÀíÂÛÓëʵ¼ùÁªÏµÔÚÒ»Æð£¬Ìá¸ßÁË×Ô¼ºµÄʵ¼ùÄÜÁ¦£¬Ò²´ÓÖÐÕÒµ½ÁËÀÖȤ¡£¶øÇÒÎÒÈÏʶµ½Í¬Ñ§Ö®¼äµÄÏ໥ºÏ×÷µÄÖØÒªÐÔ£¬»¹ÓÐѧµ½ÁË×Ô¼ºÍ¨¹ý¸÷ÖÖ;¾¶ËѼ¯µÄ×ÊÁÏÓ¦¸Ã¾ßÓаÑËüÃÇÈçºÎÁªÏµÔËÓÃÆðÀ´µÄÄÜÁ¦¡£ÎÒÃÇÏëÒª°ÑËùѧµÄÄÚÈÝÈÚ»á¹áͨ£¬Ö»ÊÇѧϰ¿Î±¾ºÃ²»¹»£¬Òª°ÑËùѧϰµÄ֪ʶ¼ÓÒÔÀûÓã¬Õâ´ÎµÄ¿Î³ÌÉè¼Æ¾Í¸øÁËÎÒÃǺܺõĻú»á¡£ÈÃÎÒÃÇÔÚѧϰ»ù±¾ÖªÊ¶ºó£¬²»½öÄܼÓÒÔ¹®¹Ì£¬»¹ÄÜ´ÓÀíÂÛÉÏÉýµ½Êµ¼ùÖÐÈ¥¡£
13
Êý×ÖÐźŴ¦Àí¿Î³ÌÉè¼Æ±¨¸æ Ö л
¾¹ýÒ»ÖܵĿγÌÉè¼Æ£¬ÎÒ½¥½¥¶ÔÊý×ÖÐźŴ¦ÀíºÍMATLABµÃÓ¦Óøü¼ÓµÄÁ˽⡣ÎҵĿγÌÉè¼ÆÄܹ»³É¹¦Íê³É£¬ÕâÒª¸Ðлxx¼ÆËã»ú¹¤³ÌѧԺΪÎÒÃÇÌṩһÖܵĻú·¿Ìõ¼þ£¬¸Ðлָµ¼ÀÏʦµÄϤÐÄÖ¸µ¼£¬¸Ðл×éÔ±µÄ³ÏÖ¿°ïÖú¡£ÈÃÎÒ¶ÔÊý×ÖÐźŴ¦ÀíÓÐÁ˸ü½øÒ»²½µÄÊìϤ£¬Êµ¼Ê²Ù×÷ºÍ¿Î±¾ÉϵÄ֪ʶÓкܴóÁªÏµ£¬µ«ÓÖ¸ßÓڿα¾£¬Ò»¸ö¿´Ëƺܼòµ¥µÄ³ÌÐò£¬Òª¶¯ÊÖ°ÑËüÉè¼Æ³öÀ´¾Í±È½ÏÀ§ÄÑÁË£¬ÒòΪÊÇÉè¼ÆÒªÇóÎÒÃÇÔÚÒÔºóµÄѧϰÖÐ×¢ÒâÕâÒ»µã£¬Òª°Ñ¿Î±¾ÉÏËùѧµ½µÄ֪ʶºÍʵ¼ÊÁªÏµÆðÀ´£¬Í¬Ê±Í¨¹ý±¾´Î¿Î³Ì
Ïà¹ØÍÆ¼ö£º