필터 지우기
필터 지우기

out of memory, how to solve?

조회 수: 2 (최근 30일)
matteo avanzi
matteo avanzi 2017년 12월 5일
댓글: matteo avanzi 2017년 12월 5일
i was running a script and in the middle the program get me out of memory error. how can i solve it? the problem is probably the dimension of the workspace that is more than 2 GB at the time of the error.
thanks
  댓글 수: 6
matteo avanzi
matteo avanzi 2017년 12월 5일
R2017b, i have 30 31536000x1 double arrays, 2 1x31536000 an 15 scalar.
the problem are the 2 1x31536000?
matteo avanzi
matteo avanzi 2017년 12월 5일
ok thanks that's was the problem

댓글을 달려면 로그인하십시오.

답변 (1개)

Rik
Rik 2017년 12월 5일
As Walter hinted, the problem is implicit expansion:
A=1:4;
B=A';
A.*B
ans =
1 2 3 4
2 4 6 8
3 6 9 12
4 8 12 16
So your syntax expands the already large vectors to an even larger matrix. Adding a transpose to one of the vectors will solve this.

카테고리

Help CenterFile Exchange에서 Triangulation Representation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by