From: Walter Roberson on
Øyvind wrote:
> So is noone interested in the new release, or is it that one has to sign
> a non-disclosure agreement before downloading it? I mean, not a single
> soul is even willing to _speculate_ what's coming?

A new functionality is to be introduced for sort(). sort() will continue
to support the current forms but in addition it will support adding a
function handle after the usual parameters (though before or after the
optional direction keyword is supported). For example,

sort(A,2,@mycompare,'descend')

The function handle will be expected to take two parameters of the same
type as class(A), and to return -1, 0, or 1, indicating whether the
first parameter is less than, equal to, or greater than the second
parameter.

In this way, sort is extended to support custom sort orders, and to
support sorting of non-numeric (or char) objects such as objects or cell
arrays.
From: Bruno Luong on
Walter Roberson <roberson(a)hushmail.com> wrote in message <hmc9n5$c3b$1(a)canopus.cc.umanitoba.ca>...

>
> A new functionality is to be introduced for sort(). sort() will continue
> to support the current forms but in addition it will support adding a
> function handle after the usual parameters (though before or after the
> optional direction keyword is supported). For example,
>
> sort(A,2,@mycompare,'descend')
>

Seriously, it is not had to write one. The issue is while SORT on numeric array uses processor arithmetic comparison that is far faster than calling any Matlab comparison function call which is - I expect - MUCH slower due to overhead. That alone defeats any attempt to implement any efficient sorting with customized order. The best alternative is up for user to map his objects to numerical array before sorting.

Bruno
From: Dave Robinson on
"Matt Fig" <spamanon(a)yahoo.com> wrote in message <hmb8dc$8fi$1(a)fred.mathworks.com>...
> Two of my new favorites, which I am sure will help slow some of the traffic on cssm:
>
>
> >>help domyhomework
> DOMYHOMEWORK Automatic assignment completion.
> FNAME = DOMYHOMEWORK(DESCRIPTION,DESIREDGRADE) writes to an M-File, FNAME, the correct solution to the homework assignment given by the text of DESCRIPTION. The optional input, DESIREDGRADE, will take into account the desired level of MATLAB competence. These are to be capital letters chose from 'A','B','C',D','F'. If 'A' is chose, the code within the M-File will be fully documented, with help and an H1 line, with input and error checking, and vectorized where appropriate for optimum efficiency. If 'D' is chosen, there will be no comments, no help, and nearly every line will use a call to EVAL. Also the code may be buggy.
>
> See also DOMYSENIORPROJECT, DOMYGRADUATETHESIS

Shouldn't the parameters of the DOMYHOMEWORK function be reversed? I thought it should be

FNAME = DOMYHOMEWORK(DESIREDGRADE,DESCRIPTION)

where DESCRIPTION is an optional parameter to allow it not to be used so that students need not break into valuable drinking time actually describing what he/she wants the application to do - after all thats what a significant number of these students expect us to work with. This should be relatively easy for TMW to implement using the Steve Eddins Mind Reading function - surely he must have it perfected by now?

Regards

Dave Robinson
From: Steve Eddins on
Dave Robinson wrote:
> "Matt Fig" <spamanon(a)yahoo.com> wrote in message
> <hmb8dc$8fi$1(a)fred.mathworks.com>...
>> Two of my new favorites, which I am sure will help slow some of the
>> traffic on cssm:
>>
>>
>> >>help domyhomework
>> DOMYHOMEWORK Automatic assignment completion.
>> FNAME = DOMYHOMEWORK(DESCRIPTION,DESIREDGRADE) writes to an
>> M-File, FNAME, the correct solution to the homework assignment given
>> by the text of DESCRIPTION. The optional input, DESIREDGRADE, will
>> take into account the desired level of MATLAB competence. These are
>> to be capital letters chose from 'A','B','C',D','F'. If 'A' is chose,
>> the code within the M-File will be fully documented, with help and an
>> H1 line, with input and error checking, and vectorized where
>> appropriate for optimum efficiency. If 'D' is chosen, there will be
>> no comments, no help, and nearly every line will use a call to EVAL.
>> Also the code may be buggy.
>> See also DOMYSENIORPROJECT, DOMYGRADUATETHESIS
>
> Shouldn't the parameters of the DOMYHOMEWORK function be reversed? I
> thought it should be
> FNAME = DOMYHOMEWORK(DESIREDGRADE,DESCRIPTION)
>
> where DESCRIPTION is an optional parameter to allow it not to be used so
> that students need not break into valuable drinking time actually
> describing what he/she wants the application to do - after all thats
> what a significant number of these students expect us to work with. This
> should be relatively easy for TMW to implement using the Steve Eddins
> Mind Reading function - surely he must have it perfected by now?
>
> Regards
>
> Dave Robinson

Boy, you guys have long memories. ;-)

Still working on it, I'm afraid.

---
Steve Eddins
http://blogs.mathworks.com/steve/
From: Matt Fig on
Steve Eddins <Steve.Eddins(a)mathworks.com> wrote in message
>
> Boy, you guys have long memories. ;-)
>
> Still working on it, I'm afraid.
>
> ---
> Steve Eddins
> http://blogs.mathworks.com/steve/



Well, it surely would be among the most important M-Files ever written!