Dirichlet Kernel

정의:

특성:

기본함수:(matlab 내장)

[code matlab]

function y=diric(x,N)
  error(nargchk(2,2,nargin,’struct’));
  if round(N) ~= N || N < 1 || numel(N) ~= 1,
      error(generatemsgid(‘MustBePosInteger’),’Requires N to be a positive integer.’);
  end

  y=sin(.5*x);
  i=find(abs(y)>1e-12);   % set where x is not divisible by 2 pi
  j=1:length(x(:));
  j(i)=[];                         % complement set
  y(i)=sin((N/2)*x(i))./(N*y(i));
  y(j)=sign(cos(x(j)*((N+1)/2)));

[/code]

그래프:
[code matlab]
t=[-3*pi:0.01:3*pi];
y=5*diric(t,5);y2=11*diric(t,11);
hold on
plot(t,y,’b-‘), plot(t,y2,’r’)
axis([-3*pi,3*pi,-5,12]), title(‘Dirichlet Kernel Function’), grid on
legend(‘diric(t,5)’,’diric(t,11)’)
hold off
[/code]

* 참고: http://en.wikipedia.org/wiki/Dirichlet_kernel

You may also like...

댓글 남기기