[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
- problems with latest strread (comma delimiters), krthie, 2011/10/17
- Re: problems with latest strread (comma delimiters), PhilipNienhuis, 2011/10/18
- RE: problems with latest strread (comma delimiters), krthie, 2011/10/18
- RE: problems with latest strread (comma delimiters), PhilipNienhuis, 2011/10/19
- Re: problems with latest strread (comma delimiters),
Ben Abbott <=
- Re: problems with latest strread (comma delimiters), Philip Nienhuis, 2011/10/19
- Re: problems with latest strread (comma delimiters), Ben Abbott, 2011/10/19
- RE: problems with latest strread (comma delimiters), krthie, 2011/10/21
- RE: problems with latest strread (comma delimiters), PhilipNienhuis, 2011/10/21