Requested 250000x250000 (931.3GB) array exceeds maximum array size preference

2 ビュー (過去 30 日間)
MAWE
MAWE 2022 年 9 月 15 日
コメント済み: MAWE 2022 年 9 月 16 日
I have two vector x1 and x2 each of length 250,000X1 samples that I want to multiply them elementwise as below, but I get the error that array exceeds maximum array size preference. How can I solve this issue?
x1.*x2

採用された回答

Voss
Voss 2022 年 9 月 15 日
One of them is a 1x250000 row vector. You can transpose that one, or you can convert it (or both) to column vector(s):
x1(:).*x2(:) % 250000x1
  2 件のコメント
MAWE
MAWE 2022 年 9 月 16 日
Thanks @Voss and @John D'Errico. It works perfectly fine now. Thanks for the clarification @John D'Errico

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Find more on Entering Commands in Help Center and File Exchange

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by