Matlab inverse of large matrix -


this equation trying solve:

h = (x'*x)^-1*x'*y

where x matrix , y vector ((x'x)^-1 inverse of x-transpose times x). have coded in matlab as:

h = (x'*x)\x'*y 

which believe correct. problem x around 10000x10000, , trying calculate inverse crashing matlab on powerful computer can find (16 cores, 24gb ram). there way split up, or library designed doing such large inversions?

thank you.

i generated random 10,000 10,000 matrix x , random 10,000 1 vector y.

i broke computation step step. (code shown below)

  1. computed transpose , held in matrix k
  2. then computed matrix multiplying k x
  3. computed vector b multiplying k vector y
  4. lastly, used backslash operator on , b solve

i didn't have problem computation. took while, breaking operations smallest groups possible helped prevent computer being overwhelmed. however, composition of matrix using (ie. sparse, decimals, etc.).

x = randi(2000, [10000, 10000]); y = randi(2000, 10000, 1); k = x'; = k*x; b = k*y; s = a\b; 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -