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

조회 수: 1 (최근 30일)
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
KSSV
KSSV 2016년 11월 28일
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.

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

답변 (1개)

Walter Roberson
Walter Roberson 2016년 11월 28일
z = (xx.*yy.*(xx.^2-yy.^2)) ./ (eps+(xx.^2+yy.^2));

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by