필터 지우기
필터 지우기

Regarding code addnoise.m in ideal binary mask

조회 수: 1 (최근 30일)
Hemangi
Hemangi 2015년 2월 1일
편집: Image Analyst 2015년 2월 1일
while running addnoise.m code available in ideal binary mask folder on mathworks site I've come across a command SNR = @(signal,noisy)( 20*log10(norm(signal)/norm(signal-noisy)) ); what is meaning of @(signal,noisy)? The terms in second bracket are signal to noise ratio in db.Then what is the need of @?

답변 (1개)

Image Analyst
Image Analyst 2015년 2월 1일
편집: Image Analyst 2015년 2월 1일
It indicates that it is an anonymous function. Sort of like a short one-liner macro type of function rather than a full blown function like you're probably used to. Maybe they call it anonymous because no one understands them or knows what they are or how to use them, as is evident in your case, and with many other novices. :-)
If you like, you can use a traditional function instead of that cryptic one-liner form.
function output = SNR(signal,noisy)
output = 20*log10(norm(signal)/norm(signal-noisy));
The @ in the line indicates that it's now going to list the input arguments. They are listed separated by commas and wrapped in parentheses.

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by