MATLAB : PROBLEM WITH CELLFUN AND TWO VARIABLES FUNCTION.
2 次查看(过去 30 天)
显示 更早的评论
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!