MATLAB : PROBLEM WITH CELLFUN AND TWO VARIABLES FUNCTION.

2 vues (au cours des 30 derniers jours)
Emiliano Rosso
Emiliano Rosso le 28 Oct 2017
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?

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by