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 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