亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? convolution.m.txt

?? convolution of signals
?? TXT
字號:
Some Useful MATLAB Commands

    *


                      whos, list all variables and their sizes.
                   
    *

                      clear, clears all variables.
                   
    *

                      zeros, creates a vector (or matrix) of zeros.
                   
    *

                      ones, creates a vector (or matrix) of ones.
                   
    *

                      conv, convolves two signals.
                   
    *

                      soundsc, plays an audio signal, normalizing if the values are greater than +/-1. Requires the sampling rate.
                  



    
Convolution

MATLAB has a function called conv(x,h) that you can use to convolve two discrete-time functions x(n) and h(n).  It assumes that the time steps are the same in both cases. The input signals must be finite length, and the result of the convolution has a length that is the sum of the lengths of the two signals you are convolving (actually L1+L2-1).
        

   1.


                  	Recall that a linear time-invariant system is completely described by its impulse function. In MATLAB, the impulse response must be discrete.  For example, consider the system with impulse response
                      

      h = [1 zeros(1,20) .5 zeros(1,10)];
                      


                  	Plot the impulse response using the plot command.
              	 
   2.

              		Consider an input to the system,
              		

      x = [0 1:10 ones(1,5)*5 zeros(1,40)];
              		


              		Plot the input with the plot command.
              	 
   3.

                  	Use the command conv to convolve x and h like this,
                  	

      y = conv(x, h);
                  	


                  	Use subplot to show the impulse response, input, and output of the convolution.  Note that you need to add zeros to the end of x and h (to make them the same length as y) or define a time vector for each signal in order to make the timing comparable in the different subplots.
              	 
   4.

                  	Every non-zero coefficient of the impulse response h, acts as an echo.  When you convolve the input x and impulse response h, you add up all the time-shifted and scaled echoes. Try making the second coefficient negative.  How does this change the final result?
              	

Exercise 1
Convolution and Echo
       
                
                

   1.


                              Create a new script for this problem.  Download the trumpet jazz lick "fall" here, and then load it into MATLAB using load('fall') and plot it. Use whos to see that the variables fall and Fs are created for you. (The sampling rate (Fs) for this signal should be 8000 Hz.)
                           
   2.

                              Use the following commands to convolve the following impulse response h, with the trumpet sound.
                              

      Fs = 8000     % for this example
      h = [1 zeros(1,10000) .25 zeros(1,1000)];
      y = conv(fall, h);
      plot(y)
      soundsc(y, Fs)
                              


                           
   3.

                              What if the second echo (in h) is a negative coefficient?  When you play it, it should not sound different since your ear is not sensitive to that sort of modification (simple phase change).
                           
   4.

                              Now let's build a system that delays the echo for a quarter second by inserting Fs/4 zeros before the second impulse: 
                              


      h = [1 zeros(1, round(Fs/4)) 0.25 zeros(1,1000)];
                              

                           
                               Pass the fall input signal through the system to get the output y:
                              


      y = conv(h, fall);
                              

                           
                              How do the input and output signals compare in the above step? (Look and listen).   Experiment with different numbers of zeros, and try repeating this with some of the built-in MATLAB sounds.
                              
      Note: 
      Some built-in sounds in MATLAB are chirp, gong, handel, laughter, splat, and train.  Load them with the load command and the sound data will be loaded into the variable y and the sampling rate in Fs.  
                              

                           
   5.

                              Show the TA your script file.  You should be able to run it and have it generate any plots and sounds.
                              
      Note: 

                              	You can use the pause command to pause MATLAB until a key is pressed to prevent it from playing all your sounds at once.
                              

                          

            
            
Exercise 2
Convolution and Smoothing
       
                
                

   1.  Build a box impulse response:
                           


      h2=[ones(1,50)/50 zeros(1,20)];


      Create a new signal y2 by convolving "fall" with h2
       
   2.

                              How does the output sound different from the input signal? 
       
   3.

                              Visually, a difference is that the input signal fall looks like it's centered around value 0, and the system output y2 looks like it's more positive.  Let's look more closely. Find the average value of the signal fall (use sum(fall)/length(fall)), and you should see that in fact the fall signal isn't really centered around 0.
                           
   4.

                              Next, to see what this system does to the input signal, zoom in on part of the signal:
                              

      subplot(2,1,1), plot(6400:6500, fall(6400:6500))
      subplot(2,1,2), plot(6400:6500, y2(6400:6500))
                              


                              The convolved signal should look a little smoother to you.  This is because this impulse response applies a low-pass filter to the signal.  We'll learn more about filters a bit later, but basically the idea is that the original signal is made up of sounds at many different frequencies, and the lower frequencies pass through the system, but the higher frequencies are attenuated.   This affects how it sounds as well as how it looks.                     
                          

            
            
Exercise 3
Box Function
       
                                
                

   1.


                              Create a new function called unitstep.m in MATLAB.  The function should take two parameters, a time vector that specifies the finite range of the signal and a time shift value.
                              
      Note: 

                                  Calling unitstep([time],ts) should be equivalent to u(t + ts)
                              

                           
   2.

                              Use the unitstep function to create a box-shaped time signal. Write a new function called boxt.m that creates a box with specified start and end times t1 and t2. In other words, your function should take three inputs: scalars t1 and t2, and a time vector t, and should output a vector of the same size as t, which contains the values of u(t-t1)-u(t-t2) evaluated at each point in t. 
                           
   3.           
                              Create a script file called boxtscript.m that uses the function to create a box that starts at time t = -1 and ends at time t = 1, where the signal lasts from time t = -3 to t = 3. Generate three different versions of this box using three different time granularities, where the finest granularity has very sharp edges similar to the ideal box and the coarsest granularity has a step size of 0.5. 
                              
                              
      Note: 
      The different versions should all have the same time span; the difference in the plots should only be at the edges of the box because of artifacts in continuous plotting of a discrete-time signal.
                              

                           
   4.

                              Plot all three versions in one figure using subplot and save it as boxtscript.tif.
                           
   5.

                              Time: If u is a vector of length n with time span tu = t1:del:t2, and v is a vector of length m with time span tv = t3:del:t4, and both have the same time step del, then the result of conv(u,v) will be a vector of length n + m - 1 with a time span tc = (t1+t3):del:(t2+t4).                        
                           
   6.

                              Using the box function that you wrote in step 2 with a sufficiently fine grained step size (for example, del = 0.01), create box signals from (0,4) and (-1,1), with time span of (-5,10). Find and plot the result of the convolution of the two boxes and save it as convplot.tif. Use the above discussion of Time to create the appropriate time vector in your plot. Verify that the timing of signal rising and falling matches what you expect in theory.
                           
   7.

                              Amplitude: In the resulting plot from the previous step, you should notice that the amplitude is much higher than the max of 2 that you would expect from analytically computing the convolution. This is because it is thinking that the length of the box is n rather n del, which impacts the area computation in convolution. To get the correct height, you need to scale by del.  Scale and plot the resulting function, and verify that the height is now 2. Save the figure as scaled.tif
                           
   8.

                              Triangle: Design the impulse response for a system h and a system input x such that you get a perfectly symmetric triangle of length 100 as the system output y. Use subplot to plot x, h, and y, and save the plot as tri.tif.
                           
   9.

                              Be able to demonstrate your code, show your plots, and play sounds.
                          

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本一道久久a久久精品| 九色综合国产一区二区三区| 成人av手机在线观看| 国产精品人妖ts系列视频| 99热这里都是精品| 亚洲精品国产精品乱码不99| 在线观看av一区二区| 亚洲一区二区三区中文字幕在线| 欧美亚洲一区二区三区四区| 婷婷久久综合九色综合绿巨人| 911精品国产一区二区在线| 蜜乳av一区二区三区| 久久精品一区二区三区不卡牛牛| av在线播放不卡| 亚洲国产aⅴ成人精品无吗| 精品少妇一区二区三区日产乱码| 欧美日韩一本到| 亚洲一区在线观看免费观看电影高清| 国产精品中文字幕一区二区三区| 国产农村妇女毛片精品久久麻豆 | 石原莉奈一区二区三区在线观看| 91精品国产福利| 国产成人亚洲综合a∨猫咪| 亚洲美女免费视频| 欧美一区二区精品在线| 国产黄人亚洲片| 一区二区三区四区视频精品免费 | 处破女av一区二区| 亚洲风情在线资源站| 久久久久久久久久久久电影| 色综合色综合色综合| 久久激情综合网| 国产精品热久久久久夜色精品三区| 国产一区高清在线| 青青草视频一区| 国产精品视频观看| 欧美一区二区在线看| 成人丝袜18视频在线观看| 亚洲国产欧美一区二区三区丁香婷| 精品福利一二区| 欧美视频一区二区三区四区 | 国产成人综合视频| 亚洲va天堂va国产va久| 国产亚洲欧美在线| 91精品国产综合久久福利软件 | 91成人在线精品| 国产精品888| 琪琪一区二区三区| 亚洲一区二区av在线| 亚洲国产精华液网站w| 日韩欧美高清一区| 欧美日韩一本到| 91网页版在线| 成人黄色小视频| 国产丶欧美丶日本不卡视频| 毛片基地黄久久久久久天堂| 一区二区三区精品在线观看| 国产精品久久精品日日| 久久精品人人做人人综合 | 六月婷婷色综合| 亚洲国产美女搞黄色| 综合色中文字幕| 国产欧美一区二区三区在线看蜜臀| 日韩欧美专区在线| 欧美日韩综合不卡| 欧美午夜精品久久久久久超碰 | 午夜精品福利视频网站 | 亚洲午夜在线视频| 亚洲精品欧美综合四区| 国产精品乱码人人做人人爱 | 欧美亚洲国产bt| 色又黄又爽网站www久久| 成人综合婷婷国产精品久久蜜臀| 国产综合一区二区| 国产成人亚洲综合a∨婷婷| 国产精品一区二区三区99| 极品尤物av久久免费看| 国产一区美女在线| 国产高清久久久| 成人午夜视频福利| 91捆绑美女网站| 91电影在线观看| 欧美精品亚洲二区| 91精品国产欧美一区二区| 777欧美精品| 欧美成人官网二区| 久久中文字幕电影| 中文字幕成人av| 亚洲欧洲精品一区二区精品久久久 | 欧美日韩亚洲另类| 91精品欧美一区二区三区综合在| 91精品国产色综合久久久蜜香臀| 制服丝袜日韩国产| 26uuu亚洲综合色| 中文字幕 久热精品 视频在线| 中文字幕在线观看一区| 亚洲免费观看视频| 亚洲成av人片观看| 国产在线精品一区二区不卡了 | 日韩一区二区三区免费观看| 精品国产免费人成电影在线观看四季 | 久久免费看少妇高潮| 中文字幕日本乱码精品影院| 亚洲激情五月婷婷| 蜜臀99久久精品久久久久久软件| 国内精品久久久久影院薰衣草 | 欧美激情在线观看视频免费| 亚洲免费看黄网站| 久久福利资源站| 波波电影院一区二区三区| 欧美精品乱码久久久久久按摩| 日韩免费电影一区| 一区免费观看视频| 日韩高清中文字幕一区| 国产成人精品一区二区三区四区| 91亚洲国产成人精品一区二区三| 欧美日韩不卡视频| 国产精品入口麻豆原神| 五月天国产精品| 成人免费视频网站在线观看| 欧美色图一区二区三区| 久久精品这里都是精品| 亚洲大片一区二区三区| 国产精品亚洲第一区在线暖暖韩国| 91国内精品野花午夜精品| 欧美白人最猛性xxxxx69交| 亚洲精品国产一区二区三区四区在线| 久久99深爱久久99精品| 欧美亚洲尤物久久| 中文字幕av资源一区| 日韩有码一区二区三区| www.一区二区| 精品电影一区二区| 亚洲成a人在线观看| 成人av网站免费| 精品日韩一区二区三区| 亚洲激情校园春色| av综合在线播放| 国产亚洲欧美中文| 久久国产精品72免费观看| 欧美色大人视频| 亚洲三级电影网站| 大白屁股一区二区视频| 精品国产亚洲一区二区三区在线观看| 亚洲一区二区av电影| 99视频精品在线| 中日韩av电影| 国产精品一线二线三线| 日韩欧美美女一区二区三区| 亚洲一本大道在线| 在线观看亚洲专区| 亚洲精品五月天| 99久久精品国产观看| 国产欧美日韩精品一区| 精品一区二区三区在线观看国产| 欧美理论电影在线| 亚洲午夜精品17c| 欧美这里有精品| 亚洲免费三区一区二区| 色婷婷综合久久久中文字幕| 国产精品久久久久久久蜜臀| 风间由美性色一区二区三区| 久久日一线二线三线suv| 韩国av一区二区三区四区| 精品久久久久久久久久久久久久久| 免费在线看成人av| 精品嫩草影院久久| 国产精品夜夜爽| 国产欧美精品日韩区二区麻豆天美| 国产在线视视频有精品| 久久久99精品免费观看不卡| 国产精品小仙女| 国产精品久久久久影院| 91在线观看视频| 亚洲女爱视频在线| 欧美色综合天天久久综合精品| 亚洲v中文字幕| 日韩午夜激情av| 国产成人无遮挡在线视频| 日本一区二区在线不卡| 91在线免费播放| 亚洲国产欧美日韩另类综合| 欧美电影一区二区| 韩国一区二区视频| 中文字幕高清不卡| 在线免费av一区| 婷婷久久综合九色综合伊人色| 日韩你懂的在线观看| 国产福利视频一区二区三区| 亚洲日本欧美天堂| 欧美日韩亚洲综合| 久久成人免费电影| 国产精品久久久久影院亚瑟 | 国产精品久久福利| 欧美怡红院视频| 激情综合网最新| 综合在线观看色| 欧美一区二区三区四区五区| 国产精品996| 五月婷婷久久综合|