HOw to convert a variable to positive irrespictive of previous ?
조회 수: 1 (최근 30일)
이전 댓글 표시
A=-3
B= 2
C= 4
D= A+B+C
D=9
As i am working on a loop A or B or C can be negative or positive but i have to put these in D as a positive value only
댓글 수: 0
채택된 답변
madhan ravi
2018년 10월 17일
편집: madhan ravi
2018년 10월 17일
abs() %gives you positive always which refers to absolute value
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!