How to return multiple variables in a function call in MATLAB R 2015b?
Afficher commentaires plus anciens
I have written a function as written below. function [avgfit,pipop,bestfit]= gafitness(psz,n,pop)
But when i called this function in another script m-file , with the following line [avgfit,pipop,bestfit]= gafitness(psz,n,pop); it is returning only the fist output variable(avgfit).other output variables (pipop,besrfit) are shown as undefined.
I want to know how to modify the function call to return multiple output variables.
3 commentaires
madhan ravi
le 6 Nov 2018
upload the full code and the datas required
Jan
le 6 Nov 2018
What does "shown as undefined" mean? Please post the complete error message, if there is one.
Siva
le 6 Nov 2018
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!