Borrar filtros
Borrar filtros

what is the meaning of this instruction?

1 visualización (últimos 30 días)
lotus
lotus el 22 de Mzo. de 2013
y = -Inf*ones(size(x))

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 22 de Mzo. de 2013
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 comentario
lotus
lotus el 22 de Mzo. de 2013
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?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Assembly en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by