help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distinguishing between purely numerical data and alphanumeric data


From: Bill Denney
Subject: Re: Distinguishing between purely numerical data and alphanumeric data
Date: Mon, 5 Sep 2005 15:56:24 -0400 (EDT)

On Mon, 5 Sep 2005, Madhusudan Singh wrote:

How does one detect the presence of a blank string (either spaces or
newlines) ?

Depending on how specific you want to get, you can do

x = '';
if isempty(x)
   blah
endif

or you can go all out and do

x = '';
if isempty(x) && ischar(x)
   blah
endif

Bill

--
"I think he ends up being killed or something, I don't remember. It's
not very crucial to the plot, all the kids were just cannon fodder
anyway."
  -- Rich "Lowtax" Kyanka, somethingawful.com



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]