Out of memory problem

Dear all,
I am trying to compute a constrained OLS estimator, but I have issues related to the size of the matrix that I am using. My code is the following:
vecX=vec(X_st); kronF = kron(eye(N),FY); L_OLS = inv(FY'*FY)*(FY'*X_st(:,:)); vecL_OLS = vec(L_OLS); vecL_COLS = vecL_OLS - inv(kronF'*kronF)*Rest'*inv(Rest*inv(kronF'*kronF)*Rest')*(Rest*vecL_OLS - Const);
I have trouble with the computation of the kronoecker product "kron(eye(N),FY)" especially, where N = 400 and FY is 57 per 5 which makes my resulting matrix kronF too big to be undle under my system.
System: Windows XP 2002 Intel Xeon CPU 2,67Ghz 3 GB RAM Matlab 2007b, v7.5.0
Could any one suggest me a solution relatively fast to implement. Thanks

답변 (1개)

José-Luis
José-Luis 2012년 9월 20일
편집: José-Luis 2012년 9월 20일

0 개 추천

You have several options:
Use sparse matrices :
a = sparse(eye(400));
your_mat = sparse(kron(a,rand(57,5));
The not so good solution:
Increase your swap space. I don't remember how to do that in Windows (where it's called virtual memory), but google is your friend. That might make your code very slow.
What you probably don't want to hear:
Get more RAM, although that won't help much if you are in a 32 bit system.

카테고리

도움말 센터File Exchange에서 Excel Add-Ins에 대해 자세히 알아보기

태그

질문:

2012년 9월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by