Error in creating a function

1 visualizzazione (ultimi 30 giorni)
GEORGIOS BEKAS
GEORGIOS BEKAS il 2 Ago 2018
Commentato: GEORGIOS BEKAS il 2 Ago 2018
What's wrong in the following expression?
ObjectiveFunction = @x() sim(net, x')
  2 Commenti
Stephen23
Stephen23 il 2 Ago 2018
@x() sim(net, x')
^^^
should be:
@(x) sim(net, x')
^^^
GEORGIOS BEKAS
GEORGIOS BEKAS il 2 Ago 2018
thanks.

Accedi per commentare.

Risposta accettata

madhan ravi
madhan ravi il 2 Ago 2018
Modificato: madhan ravi il 2 Ago 2018
hi try this,
ObjectiveFunction = @(x) sim(net, x')
REASON: FUNCTION HANDLE SHOULD BE DETERMINED INSIDE PARENTHESES.

Più risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by