0

I have a cell array A that is 1x1. It contains either a vector of matrix of doubles. How do I get that matrix out of the cell array?

For example, something along the lines of: matrix = A(1);

And then I can perform normal vector/matrix operations.

This seems like it should be easy, but I can't figure out how to do it.

lars
  • 1,976
  • 5
  • 33
  • 47

1 Answers1

0

Yup, it is easy! Use brackets.

matrix_A1 = A{1};

For a cell array A, the usual parenthesis A(1) returns a cell array. A{1} returns the contents of the cell.

Matthew Gunn
  • 4,451
  • 1
  • 12
  • 30