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,182
Registered: 6/7/07
Re: Making a square matrix from two vector
Posted: Feb 14, 2013 3:41 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 2/14/2013 10:08 AM, dpb wrote:
> On 2/14/2013 6:18 AM, Bruno Luong wrote:
...

>>
>> In many languages - even a strict one like C - the behavior of many
>> function is not completely defined (such as malloc(0), or something as
>> simple as the bit shift (a >> b)). The specific compiler will implement
>> specific behavior, yet all of them are meaningful. Just like MATLAB
>> colon.

>
> But there's a very big difference -- take malloc() since you bring it
> up. The C Standard states that malloc() w/ a size_t argument of zero is
> implementation defined (w/ two possible conforming results).
>
> While it isn't unique it's much more useful information to the developer
> than if it weren't mentioned what happens--when one knows where "there
> be dragons" regions are, then it is possible to know one needs to take
> appropriate steps to avoid or slay same.

...

That is, to be specific, the fundamental difference in documentation
philosophy in Matlab vis a vis a Standardized language is that the
Standard does intend to cover all cases in an unambiguous manner such
that an implementer can do so.

If, in fact, you can find a boundary case or somesuch that is not
covered, there is an error in the Standard and there is a formal
procedure to get official interpretations and update/correct the
Standard for the omission/error/oversight. That's a marked philosophy
difference from the way Matlab is documented (at least externally--I'm
sure there's something more nearly equivalent internally, but that's of
essentially no help to the user community since we're not privy to it).

--




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.