0
votes

I am trying to inverse a matrix in matlab however i am struggling.

It is essentially a 3x3 matrix however each position of the matrix has 801 points.

I assume i need to use a for loop somehow to get out a inversed 3x3 matrix each containing 801 points.

inv(A11(1) A12(1) A13(1);A21(1) A22(1) A23(1);A31(1) A32(1) A33(1))

For example this inverse would give me the first of 801 points of the matrix

2
So A11 etc are vectors with 801 values, and you are assembling 801 3×3 matrices for inversion?John Alexiou

2 Answers

0
votes

Try this:

m = cell(801,1);
for i=1:801
  m{i} = inv([A11(i),A12(i),A13(i); A21(i),A22(i),A23(i); A31(i),A32(i),A33(i)]);
end

Now m is a cell array, and you access the i-th result with m{i}.

0
votes

I think you are not looking for the inverse of a matrix as it is some mathematically thing, but you are trying to flip its order. If you want to flip the 3x3 matrix try

A=fliplr(A) %for left-right flip
A=flipud(A) %for up down flip

if you want the matrix A to stay the same try and inverse each containing vektor try

cellfun(@(x) flipud(x),A,'Uniformoutput',false) %for up down flip in every cell