Best way to write this function in matlab while using eps in the denominator to avoid zero

3 visualizaciones (últimos 30 días)
Here's what I had z = (xx.*yy.*(xx.^2-yy.^2))/(eps(xx.^2+yy.^2)); but I kept getting a rank deficient error
  1 comentario
KSSV
KSSV el 28 de Nov. de 2016
Your denominator is x^2+y^2, it will be zero for x = y = 0. You have to skip these values. Post your full code.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 28 de Nov. de 2016
z = (xx.*yy.*(xx.^2-yy.^2)) ./ (eps+(xx.^2+yy.^2));

Categorías

Más información sobre Get Started with MATLAB 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