File:Dirac function approximation.gif

頁面內容不支援其他語言。
這個檔案來自維基共享資源
維基百科,自由的百科全書

Dirac_function_approximation.gif(200 × 335 像素,檔案大小:89 KB,MIME 類型:image/gif、​循環、​10 畫格、​2.0秒)


描述 Illustration of approximating the Dirac delta function by gaussians.
日期 (UTC)
來源 self-made with MATLAB
作者 Oleg Alexandrov


Public domain 我,此作品的版權所有人,釋出此作品至公共領域。此授權條款在全世界均適用。
這可能在某些國家不合法,如果是的話:
我授予任何人有權利使用此作品於任何用途,除受法律約束外,不受任何限制。

Source code (MATLAB)

% Illustration of approximating the Dirac delta function with gaussians.

function main()

   r = 3; % the power in the Bernoulli inequality
   
   % KSmrq's colors
   red    = [0.867 0.06 0.14];
   blue   = [0, 129, 205]/256;
   green  = [0, 200,  70]/256;
   yellow = [254, 194,   0]/256;
   white = 0.99*[1, 1, 1];

  % Set up the grid and other parameters
   N = 300;
   A = -2; B = 2; 
   C=-1; D = 6;

   X = linspace(A, B, N);
   
   % Set up the figure
   lw = 3; % linewidth
   fs = 18; % font size

   for p=1:10

      a=1/p;

      % gaussian
      Y=(1/(a*sqrt(pi)))*exp(-X.^2/a^2);

      figure(1); clf; 

      set(gca, 'fontsize', fs);
      set(gca, 'linewidth', 0.4*lw)
      hold on;
      
      plot_axes (A, B, C, D, lw/1.5);
      
      plot(X, Y, 'color', blue, 'linewidth', lw);
      
      axis equal; axis([A, B, C, D]); 
      
      set(gca, 'XTick', [-2, -1, 0, 1, 2]) % text labels on the x axis
      grid on;
      
      H=text(B-1.5, D-0.5, sprintf('a=1/%d', p), 'fontsize', fs);

      % save to disk
      file = sprintf('Frame%d.eps', 1000+p);
      disp(file);
      saveas(gcf, file, 'psc2')
      
      pause(0.1);

   end

 % Converted to gif with the command
 % convert -antialias -density 100 -delay 20 -loop 10000 Frame10* Dirac_function_approximation.gif
 % then scaled in Gimp   
   
function plot_axes (A, B, C, D, lw)
   
   gray = 0.5*[1, 1, 1];
   
   plot([A B], [0, 0], 'linewidth', lw, 'color', gray);
   plot([0, 0], [C, D], 'linewidth', lw, 'color', gray);

說明

添加單行說明來描述出檔案所代表的內容

在此檔案描寫的項目

描繪內容

沒有維基數據項目的某些值

維基媒體使用者名稱 繁體中文 (已轉換拼寫):​Oleg Alexandrov
作者姓名字串 繁體中文 (已轉換拼寫):​Oleg Alexandrov

著作權狀態 繁體中文 (已轉換拼寫)

多媒體型式 繁體中文 (已轉換拼寫)

image/gif

檔案歷史

點選日期/時間以檢視該時間的檔案版本。

日期/時間縮⁠圖尺寸用戶備⁠註
目前2008年1月12日 (六) 22:51於 2008年1月12日 (六) 22:51 版本的縮圖200 × 335(89 KB)Oleg Alexandrovtweak
2008年1月12日 (六) 22:22於 2008年1月12日 (六) 22:22 版本的縮圖217 × 363(99 KB)Oleg Alexandrov{{Information |Description=Illustration of approximating the Dirac delta function by gaussians. |Source=self-made with MATLAB |Date=~~~~~ |Author= Oleg Alexandrov |Permission= |other_versions= }} {{

下列頁面有用到此檔案:

全域檔案使用狀況

以下其他 wiki 使用了這個檔案: