0

I am trying to solve a system of equations Ax = b in Objective-C. My A matrix is rectangular by nature so I am trying to find x by doing x = inv(A'*A)*A'*b. I am using vDSP to multiply and transpose the matrices but I need something to invert A'*A and I can't find any function to do that. Also, how am I support to set up my matrix. The size is variable right now I am doing the following and it gives me parameter type warnings.

int numberOfPlays = (int)[playArray count];
int numberOfSignals = (int)[signalMappings count];

float playElements[numberOfPlays][numberOfSignals];
...//set the values of playElements with playElements[i][j] = 2.0 or whatever value
float aTick[numberOfSignals][numberOfPlays];

and then I am using

vDSP_mtrans(*aMatrix, 1 , *aTick, 1, numberOfSignals, numberOfPlays);
rmaddy
  • 307,833
  • 40
  • 508
  • 550
Blane Townsend
  • 2,618
  • 5
  • 39
  • 51

0 Answers0