필터 지우기
필터 지우기

what is the meaning of this instruction?

조회 수: 1 (최근 30일)
lotus
lotus 2013년 3월 22일
y = -Inf*ones(size(x))

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 22일
x=[1 2;3 4;5 6]
size(x)
ans =
3 2 % 3 lines and 2 columns
ones(size(x)) % create 3x2 array with 1
ans =
1 1
1 1
1 1
-inf*ones(size(x))
ans =
-Inf -Inf
-Inf -Inf
-Inf -Inf
  댓글 수: 1
lotus
lotus 2013년 3월 22일
i understand your example.thank you.but,if the code is like below:
ptotdB = dbp(ptot);
in another file:
function y=dbp(x)
y = -Inf*ones(size(x));
nonzero = x~=0;
y(nonzero) = 10*log10(abs(x(nonzero)));
i don't understand this whole code.can you explain it in the simplest way?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by