ignoring the negative values....

조회 수: 9 (최근 30일)
Offroad Jeep
Offroad Jeep 2015년 10월 7일
댓글: Offroad Jeep 2015년 10월 7일
Hi to all ...........
a = rand(1,10)-0.5 cumsum(a)
the command uses all the positive and negative values generated , I want to ignore all the negative values generated once the cumsum command is executed. NOTE(negative values cannot be ignored and is being use in some other command)
Regards.....

채택된 답변

Thorsten
Thorsten 2015년 10월 7일
편집: Thorsten 2015년 10월 7일
cumsum(a(a > 0))
  댓글 수: 1
Offroad Jeep
Offroad Jeep 2015년 10월 7일
thanks Thorsten..... can i have your email contact please

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by