A = [1,-3, 7; -4, -16, 2 ;3, 2,-10]

If there are numbers<0, I would like to change the minus to plus by using 'IF' statement.

The result I want is A = [1,3,7; 4,16 2; 3, 2, 10].

Skip to content# MATLAB: If function for array

###### Related Question

if statementMATLAB

A = [1,-3, 7; -4, -16, 2 ;3, 2,-10]

If there are numbers<0, I would like to change the minus to plus by using 'IF' statement.

The result I want is A = [1,3,7; 4,16 2; 3, 2, 10].

- Compare two matrices or vectors that have the same numbers but in different order
- How to get positive value as an output, even the original out put is negative. (i.e, like det)
- Testing for identical numbers in matrix columns
- How do i get the arg(A(j)) and I A(j) I of an equation
- How to find the location of approximately equal value in vector
- How to terminate an if-elseif-else statement once a condition is met.
- How can i use the ceil function rightly
- From negative to positive
- How to sum vectors in a loop where it cumulatively sums with the vector created in the previous loop
- How to use linspec

## Best Answer