MATLAB : PROBLEM WITH CELLFUN AND TWO VARIABLES FUNCTION.

조회 수: 6 (최근 30일)
Emiliano Rosso
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?

채택된 답변

Roman Müller-Hainbach
Roman Müller-Hainbach 2017년 11월 2일
Try this:
tempoutemp = cellfun( @(network,arr)sim(network,arr), tempwmul,temptemp, 'un',0 );
  댓글 수: 1
Emiliano Rosso
Emiliano Rosso 2017년 11월 3일
It works fine but results are the sames: it uses only the first network for all data sets.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by