problem with parfor loop

2 ビュー (過去 30 日間)
freebil
freebil 2013 年 10 月 2 日
コメント済み: Matt J 2013 年 10 月 3 日
Is it possible to parfor this?
for iter=1:50
for i=1:100
x(:,i)= rand(3,1)
end
end

採用された回答

Matt J
Matt J 2013 年 10 月 2 日
編集済み: Matt J 2013 年 10 月 2 日
Sure, especially since the outer loop is not doing anything and can be abandoned.
parfor i=1:100
x(:,i)= rand(3,1)
end
  6 件のコメント
freebil
freebil 2013 年 10 月 3 日
x(iter,i)= rand(1) with parfor??
Matt J
Matt J 2013 年 10 月 3 日
編集済み: Matt J 2013 年 10 月 3 日
You can do it, but doing it without loops
x=rand(50,100);
will be faster.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by