필터 지우기
필터 지우기

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

채택된 답변

madhan ravi
madhan ravi 2018년 10월 17일
편집: madhan ravi 2018년 10월 17일
abs() %gives you positive always which refers to absolute value

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by