multiple arguments in function
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Parul
el 14 de Oct. de 2013
Comentada: Image Analyst
el 15 de Oct. de 2013
i want to define a function, where output arguments are around 2000, how can i do that.
function [u1, u2.....u2000]=train()
0 comentarios
Respuesta aceptada
sixwwwwww
el 14 de Oct. de 2013
Dear Parul,
You can use "varargout" for any number of output arguments. So in your case
function [varargout] = train()
2 comentarios
Image Analyst
el 15 de Oct. de 2013
So you did that??? You actually created 2000 separate variables instead of using an array like I suggested? There are no experienced MATLAB programmers I know who would take that approach.
Más respuestas (1)
Image Analyst
el 14 de Oct. de 2013
Make the u's an array or structure and return that.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!