フィルターのクリア

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 Center および File ExchangeTriangulation Representation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by