Tue 10 Jan 2017 05:07:45 PM UTC, comment #13:
I would say
.. separated by a comma, not just a space.
|
Mon 09 Jan 2017 08:25:41 PM UTC, comment #12:
LGTM, thanks for writing something better than I can come up with.
|
Mon 09 Jan 2017 08:14:47 PM UTC, comment #11:
I added some more explanation about the use of the '~' placeholder to ignore arguments (http://hg.savannah.gnu.org/hgweb/octave/rev/cae62c8d4f96). This was done on stable and will be part of the 4.2.1 bug fix release.
|
Mon 09 Jan 2017 08:09:37 PM UTC, comment #10:
I plan on pushing the attached change which adds a paragraph. Any changes needed to this?
(file #39415)
|
Thu 27 Oct 2016 05:13:16 PM UTC, comment #9:
Note that in the above expressions, the comma can be omitted in the list of output args, so for example
[a, b] = [u, s, v] = svd (a)
is equivalent to
[a b] = [u, s, v] = svd (a)
However, when using a tilde (~) as a placeholder for an output arg, you cannot omit commas between args. The reason is that the tilde is also a negation operator and the comma is needed to distinguish the two uages.
|
Thu 27 Oct 2016 05:05:12 PM UTC, comment #8:
Yes, I think the text would want to say something like
When using the tilde as an argument placeholder, it must be separated from the following argument by a comma, otherwise it is interpreted as a logical not operator.
|
Thu 27 Oct 2016 04:40:22 PM UTC, comment #7:
I think the issue is that in other matrix list expressions,
is parsed as a negation expression so there is just one expression in the list. So a comma is required here if you wish to have them treated as two separate items. This is different from
because in this case, two consecutive identifiers are parsed as two separate expressions.
|
Thu 27 Oct 2016 04:27:32 PM UTC, comment #6:
Was trying to write one, but it turns out that I do not know what to write. All the current examples use a comma. What should the manual say?
- "use a comma because one never knows" does not look like a good thing to write in a manual
- "use a comma whn a tilde is involved because of Matlab compatibility" is maybe right, but:
1) I don't know if the problem is only with comma
2) I don't know if the reason is really Matlab compatibility
|
Thu 27 Oct 2016 03:44:16 PM UTC, comment #5:
Thanks, so Octave's behavior is correct. This could use some clarification in the manual, patches welcome on the file doc/interpreter/expr.txi, section "Assignment Ops".
|
Thu 27 Oct 2016 01:10:19 PM UTC, comment #4:
In matalb 2015a
|
Wed 26 Oct 2016 05:56:31 PM UTC, comment #3:
I would lean towards addressing this in documentation. To me it seems natural that tilde is a prefix operator, and can only be used in this special mode as an argument placeholder when it's followed by a comma.
What does Matlab do?
This example with sort is a little obtuse because the two output arguments are the same (both the sorted array and the indices are [1 2]). Something like this demonstrates a little more clearly
|
Wed 26 Oct 2016 05:39:53 PM UTC, comment #2:
I changed the bug report title to something more specific. I've also lowered the priority as there is an easy work-around in using commas to separate output arguments.
|
Wed 26 Oct 2016 08:51:21 AM UTC, comment #1:
Try to put comma between the argumnets
|
Wed 26 Oct 2016 08:14:08 AM UTC, original submission:
Docs from the isargout function speaks about tilde being used to ignore an output argument. But apparently this does not work:
|