octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #34734] problems with latest strread (newlines


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #34734] problems with latest strread (newlines, spaces and commas)
Date: Thu, 03 Nov 2011 20:24:33 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Follow-up Comment #3, bug #34734 (project octave):

Yep, I didn't correctly "parse" your last example, sorry. "n" referred to the
one but last example.

Your inference of how str2double() mixes things up is correct.

To clarify, the bug to fix is that in ML the whitespace set always seems to be
a delimiter for numeric fields, and the delimiter parameter set only works for
string (text) fields; however Octave only accepts the delimiter set as
delimiters, for any field type.
So I have to add some magic to split off numeric fields columns separated by
whitespace.

I attached a very raw & kludgy patch to the dev sources that I think will work
as long as you have no mix of string (%s) and numeric conversion modifiers in
your format string. This patch is easy enough to apply by hand.
Pls report if this works for you.

With this patch, strread.m still passes all current tests here (though I may
need to revise them all in light of Ben's new set of tests for textscan).


(file #24297)
    _______________________________________________________

Additional Item Attachment:

File name: provsnl_strread.m.diff         Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34734>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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