フィルターのクリア

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

1 回表示 (過去 30 日間)
Khalid Tewfik
Khalid Tewfik 2016 年 11 月 28 日
回答済み: Walter Roberson 2016 年 11 月 28 日
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 Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by