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!