Filter löschen
Filter löschen

multiple arguments in function

4 Ansichten (letzte 30 Tage)
Parul
Parul am 14 Okt. 2013
Kommentiert: Image Analyst am 15 Okt. 2013
i want to define a function, where output arguments are around 2000, how can i do that.
function [u1, u2.....u2000]=train()

Akzeptierte Antwort

sixwwwwww
sixwwwwww am 14 Okt. 2013
Dear Parul,
You can use "varargout" for any number of output arguments. So in your case
function [varargout] = train()
  2 Kommentare
Parul
Parul am 15 Okt. 2013
thnx
Image Analyst
Image Analyst am 15 Okt. 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Image Analyst
Image Analyst am 14 Okt. 2013

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by