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;
댓글 수: 0
채택된 답변
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
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 Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!