multiple arguments in function

i want to define a function, where output arguments are around 2000, how can i do that.
function [u1, u2.....u2000]=train()

 Respuesta aceptada

sixwwwwww
sixwwwwww el 14 de Oct. de 2013

0 votos

Dear Parul,
You can use "varargout" for any number of output arguments. So in your case
function [varargout] = train()

2 comentarios

Parul
Parul el 15 de Oct. de 2013
thnx
Image Analyst
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 14 de Oct. de 2013

Comentada:

el 15 de Oct. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by