suppose i have a vector 'bw' if in there value '0' exist than total value of bw=0 is estimated.

1 回表示 (過去 30 日間)
bw=[120 1322 5542 5653 0 0 0 45451]; than bw=0 because zero exist in vector....if bw=[121 5454 24 54 4 5454 545 4654]; than bw=121;

採用された回答

madhan ravi
madhan ravi 2018 年 10 月 25 日
bw=[120 1322 5542 5653 0 0 0 45451]
if any(bw==0)
bw = 0
else
bw=bw(1)
end
  1 件のコメント
madhan ravi
madhan ravi 2018 年 10 月 25 日
the above code demonstrates, if any value is zero in bw it displays zero, if not displays first element of bw

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by