Thread Subject: ...in mathlab

Subject: ...in mathlab

From: Shiyuan Gu

Date: 2 Feb, 2009 18:50:00

Message: 1 of 3

"..." is often seen in the parameter of some functions. What does it exactly mean and how does it use?
Thank you.

Subject: ...in mathlab

From: Matt Fig

Date: 2 Feb, 2009 19:14:02

Message: 2 of 3

Do you mean Matlab?

... is a continuation symbol. It means that the coder wanted to put one long line onto two lines. In an M-file, these two do the same thing:


A = round(rand(1,40)*80) - round(rand(1,40)*80);

A = round(rand(1,40)*80) - ...
      round(rand(1,40)*80);




`i\Lhrr`TTrryrr[rl3TX!XUTV[Zb-^bagr@_a_bgbTgTbV\XX[Tyb8Ucch

Subject: ...in mathlab

From: Steven Lord

Date: 2 Feb, 2009 22:00:47

Message: 3 of 3


"Shiyuan Gu" <gshy2014@gmail.com> wrote in message
news:3644873.1233600631418.JavaMail.jakarta@nitrogen.mathforum.org...
> "..." is often seen in the parameter of some functions. What does it
> exactly mean and how does it use?
> Thank you.

It can mean that the line of code is being continued on the next line:

x = [1, 2, 3, ...
    4, 5, 6];

% is the same as

x = [1, 2, 3, 4, 5, 6];

When it appears in M-file help or documentation, it usually means that some
of the preceding input arguments have been omitted (so that the line of help
text can focus on the new input argument being introduced.) For example:

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/quad.html

The last syntax given in the Syntax expression uses ... to indicate that
there are some input arguments that you'll need to pass into QUAD, but
that's not the focus of that last line. The focus of that last line is to
introduce the second output argument from QUAD.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/rand.html?BB=1

The last two syntaxes listed in the documentation for RAND uses the ellipsis
as described above. The size inputs (n, m and n, m through p, or none at
all) are required, but those last two syntaxes are focused more on the
'double' and 'single' flags. The third and fourth syntaxes use the ellipsis
in yet a third way -- to indicate that you can add in an arbitrary number of
elements after the third size input p.

--
Steve Lord
slord@mathworks.com

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com