multiple arguments in function

1 次查看(过去 30 天)
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 个评论
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 CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by