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