help-octave
[Top][All Lists]
Advanced

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

Re: problems with latest strread (comma delimiters)


From: Ben Abbott
Subject: Re: problems with latest strread (comma delimiters)
Date: Wed, 19 Oct 2011 09:11:40 -0400

On Oct 19, 2011, at 5:03 AM, PhilipNienhuis wrote:

> krthie wrote:
>> 
>> Hi Philip
>>> 
>>> If you do not specify a delimiter character in strread calls, any
>> whitespace
>>> character is supposed to be delimiter character. (Default whitespace = "
>> ",
>>> "\n", "\t", "\r" & "b".)
>>> However, if you do specify a delimiter, only that delimiter char is
>> actually
>>> used and whitespace is simply ignored.
>>> 
>>> In your case,
>>> [a1, a2] = strread ("1,2\n3,4\n", '%f%f', 'delimiter', ",\n")
>>> works as desired.
>>> 
>> 
>> OK. I understand this.(I'm not sure if that's how matlab works, but I
>> cannot
>> check it as I don't have access to a license at the moment.)
>> 
> 
> Maybe, but if ML works otherwise, its behavior would be at variance with its
> own docs.
> Wouldn't surprise me, BTW.


>From ML.

[a1,a2]=strread(sprintf('1,2\n3,4\n'), '%f%f', 'delimiter',',')

a1 =

     1
     3

a2 =

     2
     4

This is consistent with how I read ML's docs. Are you saying it is  not?

Ben




reply via email to

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