From: nma124@hotmail.com (steve_H)
Subject: Re: Who said strong typing is a benefit?
Date: 13 Oct 2002 12:53:54 -0700
Date: 2002-10-13T19:53:54+00:00 [thread overview]
Message-ID: <8db3d6c8.0210131153.686a2123@posting.google.com> (raw)
In-Reply-To: 87lm52eaa9.fsf@deneb.enyo.de
Florian Weimer <fw@deneb.enyo.de> wrote in message news:<87lm52eaa9.fsf@deneb.enyo.de>...
> Jim Rogers <jimmaureenrogers@worldnet.att.net> writes:
>
> > My favorite response to this kind of question is "what will Matlab do
> > when you take the square root of a string?"
>
> >> sqrt ('@Q')
>
> ans =
>
> 8 9
>
> >>
>
> Ugh. Consistent, but useless.
>
When not sure if the variable is string or not, use:
"� help ischar
ISCHAR True for character array (string).
ISCHAR(S) returns 1 if S is a character array and 0 otherwise.
See also CHAR."
When using anything other than the basic data type in matlab (which is
a double), then things do not look so pretty any more. But almost
everything in matlab is a double (ok, except strings). from the simple
loop counter variable to the 20 MB sparse matrix to the index into an
array of only 5 elements, they are all of type double as default.
next prev parent reply other threads:[~2002-10-13 19:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-13 1:18 Who said strong typing is a benefit? steve_H
2002-10-13 2:53 ` Jim Rogers
2002-10-13 18:27 ` Jeffrey Carter
2002-10-13 3:24 ` Richard Riehle
2002-10-13 7:10 ` tmoran
2002-10-13 13:00 ` Jim Rogers
2002-10-13 13:30 ` Florian Weimer
2002-10-13 17:28 ` Michael Bode
2002-10-13 22:07 ` Florian Weimer
2002-10-13 19:53 ` steve_H [this message]
2002-10-13 19:31 ` steve_H
2002-10-13 15:33 ` steve_H
2002-10-13 17:14 ` Larry Kilgallen
2002-10-14 1:21 ` Dmitry A.Kazakov
2002-10-13 19:42 ` steve_H
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox