MATLAB : PROBLEM WITH CELLFUN AND TWO VARIABLES FUNCTION.
2 ビュー (過去 30 日間)
古いコメントを表示
Emiliano Rosso
2017 年 10 月 28 日
コメント済み: Emiliano Rosso
2017 年 11 月 3 日
temptemp is 1 X 44 cell : every cell is 1 X 3130 array double.
tempwmul is 1 X 44 cell : every cell is 1 X 1 trained network.
I want to simulate every network with the relative array double :
for ilog=1:44
tempoutemp{ilog} = sim(tempwmul{ilog},temptemp{ilog});
end
in vectorized mode using cellfun :
tempoutemp=cellfun(@sim,tempwmul,temptemp,'UniformOutput', false);
The code doesn't return errors but in vectorized mode it uses always the first network for all array data and result is obviously different...some help?
0 件のコメント
採用された回答
Roman Müller-Hainbach
2017 年 11 月 2 日
Try this:
tempoutemp = cellfun( @(network,arr)sim(network,arr), tempwmul,temptemp, 'un',0 );
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!