i need to switch all integers in my array to positive numbers

2 vues (au cours des 30 derniers jours)
Omar Almahallawy
Omar Almahallawy le 15 Juin 2019
A= [ 12 -16 -7 ]
answer= [ 12 16 7]
i need a function that converts all negative integers to positive integers

Réponses (1)

John D'Errico
John D'Errico le 15 Juin 2019
You might need to read the getting started tutorials, if you are asking questions this basic.
help abs

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by