converting all array elements into positive elements

I have an aray like this:
A=[1 -3 -1 4]
I would like to have the same elemnt but with all elements have been converted to positive
Then,
A=[1 3 1 4]
Any suggestions? Thank you in advance.

 채택된 답변

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

질문:

2019년 6월 15일

댓글:

2019년 6월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by