Documentation Center

  • Trial Software
  • Product Updates

Contents

gnegate

Generalized negation

Syntax

gnegate(x)

Description

This function generalizes matrix negation to the negation of cell arrays of matrices combined in an element-wise fashion.

gnegate(x) takes a matrix or cell array of matrices, and negates the matrices.

Examples

Here is an example of negating a cell array:

x = {[1 2; 3 4],[1 3; 5 2]};
y = gnegate(x);
y{1}, y{2}

See Also

| | | |

Was this topic helpful?