Info

この質問は閉じられています。 編集または回答するには再度開いてください。

parfor loop variable cannot be classified

3 ビュー (過去 30 日間)
mzaya
mzaya 2016 年 2 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I'm trying to create a function that will select each column from a 1X30 cell and set the velocity value to the mean(defined as a 1X30 cell from another function), but I keep getting "The variable A in a parfor cannot be classified"
function [A]=set_vel(cell, mean)
A={};
parfor i=1:length(cell)
for j=1:length(mean)
A{i,j} = setvalues(cell{i},'vel', mean{j});
end
end
Can someone help?
  1 件のコメント
mzaya
mzaya 2016 年 2 月 17 日
編集済み: mzaya 2016 年 2 月 17 日
Oh just figured it out. Here is what I did:
A={};
parfor i=1:length(cell)
M{i} = mean(cell{i}(:,5));
A{i} = setvalues(cell{i},'vel', M{i});
end
end

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by