octave-maintainers
[Top][All Lists]
Advanced

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

Re: Improving strread / textread / textscan


From: Ben Abbott
Subject: Re: Improving strread / textread / textscan
Date: Sun, 23 Oct 2011 20:53:56 -0400

On Oct 23, 2011, at 8:37 PM, Ben Abbott wrote:

> a3 = cell2mat (textscan (sprintf 
> ('Text1Text2Text\nText3TextText\nText57Text63Text'), 'Text%dText%dText'))
> 
> Matlab returns ...
> 
> a1 =
> 
>           2
>           4
> 
> a2 =
> 
>           2
> 
> Error using cat
> CAT arguments dimensions are not consistent.

I got this wrong. Removing the "cell2mat" ...

a3 = textscan (sprintf ('Text1Text2Text\nText3TextText\nText57Text63Text'), 
'Text%dText%dText')

a3 = 

    [2x1 int32]    [2]

a3{1}

ans =

           1
           3

However, I'm still having trouble understanding ML's behavior.

Ben


reply via email to

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