nargout unavailable in anonymous functions when run from Live Script
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
The following code works fine at the command line and in mfile scripts.
>>f=@()nargout
>> f()
ans =
0
>> a=f()
a =
1
However, it fails when run as a Live Script:
f=@()nargout;
f()
a=f()
I am curious as to why.
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Argument Definitions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!