Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Extract numbers from table containing text and numbers
Replies: 29   Last Post: Feb 7, 2013 5:59 PM

 Messages: [ Previous | Next ]
 dpb Posts: 9,850 Registered: 6/7/07
Re: Extract numbers from table containing text and numbers
Posted: Feb 2, 2013 9:29 AM

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...

>> 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]
>>

What release are you using?

--

Date Subject Author
1/31/13 Stan
1/31/13 Stan
2/1/13 Stan
2/1/13 dpb
2/1/13 Stan
2/2/13 dpb
2/2/13 dpb
2/2/13 Stan
2/2/13 dpb
2/2/13 Stan
2/2/13 dpb
2/3/13 dpb
2/3/13 dpb
2/3/13 Bruno Luong
2/3/13 dpb
2/3/13 Bruno Luong
2/3/13 dpb
2/3/13 dpb
2/4/13 Bruno Luong
2/4/13 dpb
2/4/13 dpb
2/5/13 Bruno Luong
2/5/13 dpb
2/5/13 Bruno Luong
2/5/13 dpb
2/5/13 dpb
2/3/13 Stan
2/3/13 Bruno Luong
2/7/13 Stan