Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Making a square matrix from two vector
Replies: 22   Last Post: Mar 19, 2013 12:37 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,097
Registered: 6/7/07
Re: Making a square matrix from two vector
Posted: Feb 13, 2013 10:22 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 2/13/2013 1:08 AM, Bruno Luong wrote:
...

> If one wants to develop a function that accept any kind of numerical
> data, the behavior should be defined. So it is legitimate to speak how
> colon behave when feed in complex data. That's how a specification of a
> function is defined and developed. This is the basic concept of software
> development.


That's again my observation there is no definitive language reference
for Matlab--only a more or less complete narrative description.


> Now if user can't make head or tail with the behavior of such and such
> function, that's his problem.


Well, that's a problem when the behavior doesn't follow the description
but if there is no description it seems rather rude to blame that on the
user. :)

> Recently I use the fact that ([]:1) return an empty set, therefore allow
> me to save 1 test in my implementation. Is it meaningless?


Would all depend on context. Again, you bring in unrelated issues--the
question specifically was on what colon() would mean for complex input
when the two parts are separated by a different sign in the change
between their values--so that the implicit default unit step for reals
doesn't supply enough information to have a meaning.

One could, of course, define another set of defaults for the case, but
the parser already warns that the use of complex isn't legal so it's
hard to argue for anything but it being user error at the moment.

What any other case is for another particular piece of the language is
immaterial to this one.

--




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.