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

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

[Octave-bug-tracker] [bug #37961] textscan : whitespace specification do


From: Ben Abbott
Subject: [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work
Date: Thu, 20 Dec 2012 03:24:36 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17

Follow-up Comment #4, bug #37961 (project octave):

Matlab gives;


A{1}

ans = 

    'XQPCTick'
    '1552111181823'
    '1552327767233'
    '1552570758808'
    '1552819036603'
    '1553037382424'
    '1553238114161'
    '1553456459982'
    '1553687128680'
    '1553905469514'
    '1554100925005'

A{2}

ans = 

    'Tag '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '


I had expected the proper syntax to read the file to be;


B = textscan (fid, '%s %s %s', 'Whitespace', ';');


However, the results from Matlab do not match Octave.  It appears that
whitespace=";" implies that spaces, tabs and such are *not* whitespace.


B{1}

ans = 

    'XQPCTick'
    '1552111181823'
    '1552327767233'
    '1552570758808'
    '1552819036603'
    '1553037382424'
    '1553238114161'
    '1553456459982'
    '1553687128680'
    '1553905469514'
    '1554100925005'

B{2}

ans = 

    'Tag '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '
    'G8 Throw '

B{3}

ans = 

    ''
    ''
    ''
    ''
    ''
    ''
    ''
    ''
    ''
    ''
    ''



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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