필터 지우기
필터 지우기

How to build a rotationally symmetric mask?

조회 수: 2 (최근 30일)
Mario Trevino
Mario Trevino 2013년 1월 8일
Hi everyone, suppose I have 'p' given by a generalized Gaussian function and want to make a rotationally symmetric mask of it (i.e. a 2d square). Any easy way?
%_____________________________________________
x = -6:0.01:6;
alfa=2; beta=10; mean=0;
p=(beta/(2*alfa*gamma(1/beta))).*exp(-((abs(x-mean)/alfa).^beta));
plot(x,p)

채택된 답변

Matt J
Matt J 2013년 1월 8일
p= @(x) (beta/(2*alfa*gamma(1/beta))).*exp(-((abs(x-mean)/alfa).^beta));
[xx,yy]=ndgrid(-6:0.01:6);
mask = p(sqrt(xx.^2+yy.^2))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by