フィルターのクリア

delay error

2 ビュー (過去 30 日間)
mahmoud ibrahim
mahmoud ibrahim 2011 年 12 月 20 日
i have voltage signal when i make it delay then subtract it from each other is suppose give zero but it give zero for some point and 7e-15 for other point and this make me problem coz i put output to switch to detected zero pass.
any one know how make it ignore 7e-15 value and make it feel like zero

回答 (1 件)

Wayne King
Wayne King 2011 年 12 月 20 日
You can always use a tolerance in your code.
tol = 1e-12; if (abs(x)< tol)
end
Or whatever you want the tolerance to be.
  1 件のコメント
mahmoud ibrahim
mahmoud ibrahim 2011 年 12 月 20 日
which one relative or absolute tolerance ??

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by