How to return multiple variables in a function call in MATLAB R 2015b?
Mostrar comentarios más antiguos
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 comentarios
madhan ravi
el 6 de Nov. de 2018
upload the full code and the datas required
Jan
el 6 de Nov. de 2018
What does "shown as undefined" mean? Please post the complete error message, if there is one.
Siva
el 6 de Nov. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Workspace Variables and MAT Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!