Error in creating a function

1 vue (au cours des 30 derniers jours)
GEORGIOS BEKAS
GEORGIOS BEKAS le 2 Août 2018
Commenté : GEORGIOS BEKAS le 2 Août 2018
What's wrong in the following expression?
ObjectiveFunction = @x() sim(net, x')
  2 commentaires
Stephen23
Stephen23 le 2 Août 2018
@x() sim(net, x')
^^^
should be:
@(x) sim(net, x')
^^^
GEORGIOS BEKAS
GEORGIOS BEKAS le 2 Août 2018
thanks.

Connectez-vous pour commenter.

Réponse acceptée

madhan ravi
madhan ravi le 2 Août 2018
Modifié(e) : madhan ravi le 2 Août 2018
hi try this,
ObjectiveFunction = @(x) sim(net, x')
REASON: FUNCTION HANDLE SHOULD BE DETERMINED INSIDE PARENTHESES.

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by