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

2 次查看(过去 30 天)
A= [ 12 -16 -7 ]
answer= [ 12 16 7]
i need a function that converts all negative integers to positive integers

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by