Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!feeder.erje.net!us.feeder.erje.net!newsfeed.straub-nv.de!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Extract numbers from table containing text and numbers
Date: Sat, 02 Feb 2013 12:40:41 -0600
Organization: Aioe.org NNTP Server
Lines: 57
Message-ID: <kejmhl$aon$1@speranza.aioe.org>
References: <kef9u8$seu$1@newscl01ah.mathworks.com> <keh2cd$6al$1@speranza.aioe.org> <keht2s$3ss$1@newscl01ah.mathworks.com> <kej7r3$upc$1@speranza.aioe.org>
NNTP-Posting-Host: npaXo/Tszhbj6XfODEj34A.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:788046

On 2/2/2013 8:29 AM, dpb wrote:
> On 2/1/2013 8:19 PM, Stan wrote:
>> dpb <none@non.net> wrote in message <keh2cd$6al$1@speranza.aioe.org>...
>>> On 1/31/2013 8:40 PM, Stan wrote:
>>> I cut'n pasted a sample line into a cell string and at the command
>>> line get...
>>>
>>> >> textscan(d{1},'Q (upper-edge -%f AmP )= %f+- %f %*s')
>>> ans =
>>> [-1.2500e-04] [0.0099] [2.8300e-04]
>>> >>
>>>
>>> Salt to suit...
>>>
>>> --
>>
>> I did this:
>>>> d = {' Q (upper-edge ........'};
>>>> textscan(d{1},'Q (upper-edge -%f AmP )= %f+- %f %*s')
>>
>> ans =
>>
>> [-1.2500e-04] [0 X 1 double] [0 X 1 double]
>>
>> ------------------------------------X------------------------------------
>>
>> How did you define the cell string? Did you use something different?
>
> Nope...just cut'n paste from your prior post...
>
...

And, just to check I copied and pasted your textscan() call above into 
command window here and it works just as expected...

 >> textscan(d{1},'Q (upper-edge -%f AmP )= %f+- %f %*s')
ans =
     [-1.2500e-04]    [0.0099]    [2.8300e-04]
 >> d={' Q (upper-edge --0.1250E-03 AmP )= 0.98880E-02+- 0.28300E-03 
units/alpha/round';'Q (upper-edge --0.2500E-03 AmP )= 0.19648E-01+- 
0.39412E-03 units/alpha/round'};
 >> textscan(d{1},'Q (upper-edge -%f AmP )= %f+- %f %*s')
ans =
     [-1.2500e-04]    [0.0099]    [2.8300e-04]
 >>

NB I also noted you had a leading space in your source string that I 
hadn't so added it--still no problem.

One does now have to begin to question that there may have been a bug 
fix in textscan() between the 12a and 12b releases.

If you have official support, might send this one in as real support 
question to TMW...unless you can uncover something internal in the 
string there that doesn't show up from the posting text...

--