MATLAB Answers

From negative to positive

264 views (last 30 days)
Guido Pastore
Guido Pastore on 3 Mar 2019
Edited: Stephan on 3 Mar 2019
How can I make all the elements of an array of double positive that are negative?

  0 Comments

Sign in to comment.

Accepted Answer

Stephan
Stephan on 3 Mar 2019
Edited: Stephan on 3 Mar 2019
Hi,
if you have no complex numbers:
abs(A)
For complex numbers abs will calculate the magnitude.
Best regards
Stephan

  0 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by