HOw to convert a variable to positive irrespictive of previous ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Shubham Mohan Tatpalliwar
am 17 Okt. 2018
Bearbeitet: madhan ravi
am 17 Okt. 2018
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 Kommentare
Akzeptierte Antwort
madhan ravi
am 17 Okt. 2018
Bearbeitet: madhan ravi
am 17 Okt. 2018
abs() %gives you positive always which refers to absolute value
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!