What is the reason while plotting sinc function in mathematical it is cutting at 0 why ? what is the difference
    7 ビュー (過去 30 日間)
  
       古いコメントを表示
    
回答 (1 件)
  DGM
      
      
 2022 年 2 月 23 日
        
      編集済み: DGM
      
      
 2022 年 2 月 23 日
  
      What do you mean "plotting ... in mathematical"?
If you're just comparing the MATLAB sinc() function against sin(x)/x or sin(pi*x)/(pi*x), then keep in mind that it's undefined at 0.  Given your coarse plot, the presence of any NaNs will leave a big hole.
x = linspace(-10,10,101);
y1 = sinc(x); % this fills f(0) with the limit value
plot(x,y1)
y2 = sin(pi*x)./(pi*x); % this doesn't fill the hole
plot(x,y2)
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


