MATLAB Answers

0

MATLAB : PROBLEM WITH CELLFUN AND TWO VARIABLES FUNCTION.

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 Comments

Sign in to comment.

Tags

1 Answer

Answer by Roman Müller-Hainbach on 2 Nov 2017
 Accepted Answer

Try this:
tempoutemp = cellfun( @(network,arr)sim(network,arr), tempwmul,temptemp, 'un',0 );

  1 Comment

It works fine but results are the sames: it uses only the first network for all data sets.

Sign in to comment.