multiple arguments in function

1 回表示 (過去 30 日間)
Parul
Parul 2013 年 10 月 14 日
コメント済み: Image Analyst 2013 年 10 月 15 日
i want to define a function, where output arguments are around 2000, how can i do that.
function [u1, u2.....u2000]=train()

採用された回答

sixwwwwww
sixwwwwww 2013 年 10 月 14 日
Dear Parul,
You can use "varargout" for any number of output arguments. So in your case
function [varargout] = train()
  2 件のコメント
Parul
Parul 2013 年 10 月 15 日
thnx
Image Analyst
Image Analyst 2013 年 10 月 15 日
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.

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2013 年 10 月 14 日

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by