f



Extract numbers from table containing text and numbers

Hello,

I am trying to extract 2 columns from a file with 425 header lines and then the following:

 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
 Q (upper-edge --0.3750E-03 AmP )=    0.18384E-01+-    0.38318E-03 units/alpha/round
 Q (upper-edge --0.5000E-03 AmP )=    0.17536E-01+-    0.37040E-03 units/alpha/round
 Q (upper-edge --0.6250E-03 AmP )=    0.16064E-01+-    0.36000E-03 units/alpha/round
 Q (upper-edge --0.7500E-03 AmP )=    0.15888E-01+-    0.35954E-03 units/alpha/round

Here is my attempt, using textscan, and the output I am getting:

>> clear
>> clc
>> fid1=fopen('rqm7yxk1.out','rt');
>> fmt1=[' %s' '%s' '%s%s%f' '%s' '%s' '   %f%s%s' '   %f' '%s'];
>> set_m=textscan(fid1, fmt1,'delimiter',' ','headerlines',425,'CollectOutput',true); %skip 425 header lines and then read in the data
>> fclose(fid1);
>> set_m

set_m = 

  Columns 1 through 4

    {1x4 cell}    [0x1 double]    {0x1 cell}    [0x1 double]

  Columns 5 through 7

    {0x2 cell}    [0x1 double]    {0x1 cell}

>> set_m{1}

ans = 

    ''    'E'    '(upper-edge'    '--0.1250E-03'

Question:
I need the 3 columns that contain the numbers. Only the first 4 columns seem to be working. Is there something that I am missing, in the formatting, for the remaining columns?
0
2/1/2013 2:40:08 AM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

29 Replies
932 Views

Similar Articles

[PageSpeed] 30

"Stan" wrote in message <kef9u8$seu$1@newscl01ah.mathworks.com>...
> Hello,
> 
> I am trying to extract 2 columns from a file with 425 header lines and then the following:
> 
>  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
>  Q (upper-edge --0.3750E-03 AmP )=    0.18384E-01+-    0.38318E-03 units/alpha/round
>  Q (upper-edge --0.5000E-03 AmP )=    0.17536E-01+-    0.37040E-03 units/alpha/round
>  Q (upper-edge --0.6250E-03 AmP )=    0.16064E-01+-    0.36000E-03 units/alpha/round
>  Q (upper-edge --0.7500E-03 AmP )=    0.15888E-01+-    0.35954E-03 units/alpha/round
> 
> Here is my attempt, using textscan, and the output I am getting:
> 
> >> clear
> >> clc
> >> fid1=fopen('rqm7yxk1.out','rt');
> >> fmt1=[' %s' '%s' '%s%s%f' '%s' '%s' '   %f%s%s' '   %f' '%s'];
> >> set_m=textscan(fid1, fmt1,'delimiter',' ','headerlines',425,'CollectOutput',true); %skip 425 header lines and then read in the data
> >> fclose(fid1);
> >> set_m
> 
> set_m = 
> 
>   Columns 1 through 4
> 
>     {1x4 cell}    [0x1 double]    {0x1 cell}    [0x1 double]
> 
>   Columns 5 through 7
> 
>     {0x2 cell}    [0x1 double]    {0x1 cell}
> 
> >> set_m{1}
> 
> ans = 
> 
>     ''    'E'    '(upper-edge'    '--0.1250E-03'
> 
> Question:
> I need the 3 columns that contain the numbers. Only the first 4 columns seem to be working. Is there something that I am missing, in the formatting, for the remaining columns?

There is a typo. It should be:
>> set_m{1}

ans = 

    ''    'Q'    '(upper-edge'    '--0.1250E-03'
0
2/1/2013 3:35:08 AM
Could it be that the string )= is not being accepted as a string?

I've tried working through this file, but it's just not reading correctly.

Please, your help would be really appreciated.
0
2/1/2013 4:20:08 PM
On 1/31/2013 8:40 PM, Stan wrote:
> Hello,
>
> I am trying to extract 2 columns from a file with 425 header lines and
> then the following:
>
> 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
....

> Here is my attempt, using textscan, and the output I am getting:
>
....

>>> fmt1=[' %s' '%s' '%s%s%f' '%s' '%s' ' %f%s%s' ' %f' '%s'];
>>> set_m=textscan(fid1, fmt1,'delimiter','
>>> ','headerlines',425,'CollectOutput',true); %skip 425 header lines and
....
> I need the 3 columns that contain the numbers. Only the first 4 columns
> seem to be working. Is there something that I am missing, in the
> formatting, for the remaining columns?

Yeah, the numbers are ill-formed w/ the doubled signs methinks...since 
you have a fixed format I'd use string-matching...

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

--
0
none1568 (7453)
2/1/2013 6:44:15 PM
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?
0
2/2/2013 2:19:08 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?

--
0
none1568 (7453)
2/2/2013 2:29:42 PM
^^^^ I'm using release R2012a.

I don't think that this would have made such a big difference though.

Do you think textscan changed recently?
0
2/2/2013 4:26:08 PM
On 2/2/2013 10:26 AM, Stan wrote:
> ^^^^ I'm using release R2012a.
>
> I don't think that this would have made such a big difference though.
>
> Do you think textscan changed recently?

Wouldn't think so, no...but this is 2012b here so anything's possible. 
Guess that raises question of which platform?  This is Win32 here...

I don't see why it shouldn't parse just fine unless there's a hidden 
character or something causing a mismatch in the comparison...can you 
retry using direct cut'n paste at command line and see if symptom 
stays/goes away?

--
0
none1568 (7453)
2/2/2013 5:50:09 PM
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...

--
0
none1568 (7453)
2/2/2013 6:40:18 PM
Okay so I re-tried with a direct copy-paste. It did not work. The leading space, as you mentioned, does not affect it.

I'm on Win 32. Unfortunately, I do not have access to R2012b.

Is there a way to read in that string using some other function (fscanf, etc.)?
0
2/2/2013 8:02:06 PM
On 2/2/2013 2:02 PM, Stan wrote:
> Okay so I re-tried with a direct copy-paste. It did not work. The
> leading space, as you mentioned, does not affect it.
>
> I'm on Win 32. Unfortunately, I do not have access to R2012b.
>
> Is there a way to read in that string using some other function (fscanf,
> etc.)?

I don't have time at the moment but there's always textread() which has 
much of the same functionality as textscan()...it requires a file, 
though, although I think I recall your original is from a file so that 
shouldn't be a problem.

There's always a way w/ fscanf() other than having to deal w/ the 
headerlines explicitly, etc., etc., ...  fgetl() and a loop is one way 
to do that, of course.

--

0
none1568 (7453)
2/2/2013 11:37:59 PM
Rather work on fixed-field extraction method. I save a piece of your data in test.txt and here is how I read it back:

>> fid=fopen('test.txt','rt');
>> c=textscan(fid,'%s','Delimiter','\n')

c = 

    {6x1 cell}

>> fclose(fid);
>> s=char(c{1})

s =

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
Q (upper-edge --0.3750E-03 AmP )= 0.18384E-01+- 0.38318E-03 units/alpha/round
Q (upper-edge --0.5000E-03 AmP )= 0.17536E-01+- 0.37040E-03 units/alpha/round
Q (upper-edge --0.6250E-03 AmP )= 0.16064E-01+- 0.36000E-03 units/alpha/round
Q (upper-edge --0.7500E-03 AmP )= 0.15888E-01+- 0.35954E-03 units/alpha/round

>> firstcol = s(:,17:26)

firstcol =

0.1250E-03
0.2500E-03
0.3750E-03
0.5000E-03
0.6250E-03
0.7500E-03

>> data1 = str2num(firstcol)

data1 =

   1.0e-03 *

    0.1250
    0.2500
    0.3750
    0.5000
    0.6250
    0.7500

% Do similar for other columns
% NOTE: textscan is NOT buggy when understand how it works

Bruno
0
b.luong5955 (6401)
2/3/2013 9:59:08 AM
On 2/3/2013 3:59 AM, Bruno Luong wrote:
....

> % NOTE: textscan is NOT buggy when understand how it works
>

Then why is it behaving differently between 12a and 12b as far as Stan 
and I can tell????  Which release/platform do you have installed?

And, parsing by reading the whole thing as a glob then sub-selecting 
fixed columns sorta' defeats the whole point, anyways...altho it's 
another example of where Fortran-like fixed field FORMAT is superior for 
such cases to the C sscanf() and friends.

--
0
none1568 (7453)
2/3/2013 3:00:50 PM
On 2/2/2013 2:02 PM, Stan wrote:
> Okay so I re-tried with a direct copy-paste. It did not work. The
> leading space, as you mentioned, does not affect it.
>
> I'm on Win 32. Unfortunately, I do not have access to R2012b.
>
> Is there a way to read in that string using some other function (fscanf,
> etc.)?
 >> type stan.txt

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
Q (upper-edge --0.3750E-03 AmP )=    0.18384E-01+-    0.38318E-03 
units/alpha/round
Q (upper-edge --0.5000E-03 AmP )=    0.17536E-01+-    0.37040E-03 
units/alpha/round
Q (upper-edge --0.6250E-03 AmP )=    0.16064E-01+-    0.36000E-03 
units/alpha/round
Q (upper-edge --0.7500E-03 AmP )=    0.15888E-01+-    0.35954E-03 
units/alpha/round

 >> [a,b,c]=textread('stan.txt','Q (upper-edge -%f AmP )= %f+- %f %*s')
a =
    1.0e-03 *
    -0.1250
    -0.2500
    -0.3750
    -0.5000
    -0.6250
    -0.7500
b =
     0.0099
     0.0196
     0.0184
     0.0175
     0.0161
     0.0159
c =
    1.0e-03 *
     0.2830
     0.3941
     0.3832
     0.3704
     0.3600
     0.3595
 >>

TEXTREAD(), while having been relegated to "red-haired stepchld" status, 
is still highly valuable...

--

0
none1568 (7453)
2/3/2013 3:07:27 PM
dpb <none@non.net> wrote in message <kelu2o$7qj$1@speranza.aioe.org>...
> On 2/3/2013 3:59 AM, Bruno Luong wrote:
> ...
> 
> > % NOTE: textscan is NOT buggy when understand how it works
> >
> 
> Then why is it behaving differently between 12a and 12b as far as Stan 
> and I can tell????  

Since when behave differently is buggy? SUM() function gives different results when it goes to multi-thread, yet no one consider it as buggy as far as I can tell.

>Which release/platform do you have installed?

I have 2012a at work and 2012b at home. At work I tell my team not to upgrade to 2012b.

> 
> And, parsing by reading the whole thing as a glob then sub-selecting 
> fixed columns sorta' defeats the whole point, anyways...altho it's 
> another example of where Fortran-like fixed field FORMAT is superior for 
> such cases to the C sscanf() and friends.

It's perfectly fine if you don't like the function because it does work like you expect dpb. But (we are not going over it again) I'm still waiting for an evidence of the so called bug (to me, i.e., a behavior different than what the doc describes).

Bruno
0
b.luong5955 (6401)
2/3/2013 3:23:07 PM
On 2/3/2013 9:23 AM, Bruno Luong wrote:
....

....

> ... I'm still
> waiting for an evidence of the so called bug (to me, i.e., a behavior
> different than what the doc describes).

It's in the official bug report (link provided previously)...

--
0
none1568 (7453)
2/3/2013 4:06:28 PM
On 2/3/2013 9:07 AM, dpb wrote:
....

> TEXTREAD(), while having been relegated to "red-haired stepchld" status,
> is still highly valuable...
>

OBTW, I also checked on old release R12 (prior to textscan) and 
textread() works as expected there as well so it should also work under 
your 12a release...

--

0
none1568 (7453)
2/3/2013 4:24:04 PM
On 2/3/2013 9:23 AM, Bruno Luong wrote:
> dpb <none@non.net> wrote in message <kelu2o$7qj$1@speranza.aioe.org>...
>> On 2/3/2013 3:59 AM, Bruno Luong wrote:
>> ...
>>
>> > % NOTE: textscan is NOT buggy when understand how it works
>> >
>>
>> Then why is it behaving differently between 12a and 12b as far as Stan
>> and I can tell????
>
> Since when behave differently is buggy? SUM() function gives different
> results when it goes to multi-thread, yet no one consider it as buggy as
> far as I can tell.

Well, it's possible it's a bug; w/ multi-thread more probable it's 
simply order-dependent and then a figment of "processor-dependent" 
behavior as language Standards put it...

Either way, what is/isn't a bug in another function isn't germane to 
another particular function.

>> Which release/platform do you have installed?
>
> I have 2012a at work and 2012b at home. At work I tell my team not to
> upgrade to 2012b.
....

Can you parse the three columns in 12a in "one swell foop" or at least 
confirm Stan's behavior w/ the specific format string?

> It's perfectly fine if you don't like the function because it does work
> like you expect dpb. But (we are not going over it again) I'm still
> waiting for an evidence of the so called bug (to me, i.e., a behavior
> different than what the doc describes).

I've never said I "don't like" textscan() -- on the contrary the 
facility is good/needed.  What I have said repeatedly I don't like is 
that TMW has since relegated textread() to 2nd-citizen status which 
removes another very useful facility that isn't available in 
textscan()--namely returning base arrays instead of cells.

As far as this thing about documentation; I defy you to find a reading 
of the documentation that is supplied that indicates that the format 
string Stan used should behave as it does in R2012a.  It appears that 
particular bug underlying that behavior has been fixed in R2012b since 
we get different results between the two.  The previous bug we discussed 
is, as noted, in the TMW official bug database awaiting repair in its 
own time.

--
0
none1568 (7453)
2/3/2013 4:32:50 PM
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message 
> I have 2012a at work and 2012b at home. At work I tell my team not to upgrade to 2012b.
> 

Why? What is the problem with it?
0
2/3/2013 6:02:07 PM
"Stan" wrote in message <kem8mv$mnu$1@newscl01ah.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message 
> > I have 2012a at work and 2012b at home. At work I tell my team not to upgrade to 2012b.
> > 
> 
> Why? What is the problem with it?

The help/document is a step back, hopefully a temporary situation. Try for example finding a list of mx??? functions to  be used in MEX files.

The user interface is inspired by MS office, is not suitable for programmers.

These two factors would reduce the productivity of our group.

Bruno
0
b.luong5955 (6401)
2/3/2013 7:51:07 PM
dpb <none@non.net> wrote in message <kem3f8$psl$1@speranza.aioe.org>...
> 
> As far as this thing about documentation; I defy you to find a reading 
> of the documentation that is supplied that indicates that the format 
> string Stan used should behave as it does in R2012a. 

I just have a little bit of time to take the textscan with Stan's example in 2012A, and indeed the difficulty is clearly due to parsing the "+-" just after a number ("...number+-...").

Don't forget that MATLAB supposes to able to parse complex number such as "1+1i" as well, so the "+-" does not facilitate the parser. The presence of "--" is also not very nice. 

So OK it doesn't handle that case well as it supposes, I admit it's a bug.

But Stan shouldn't be proud to create such nasty string at first.

Bruno
0
b.luong5955 (6401)
2/4/2013 7:45:08 PM
On 2/4/2013 1:45 PM, Bruno Luong wrote:
> dpb <none@non.net> wrote in message <kem3f8$psl$1@speranza.aioe.org>...
>>
>> As far as this thing about documentation; I defy you to find a reading
>> of the documentation that is supplied that indicates that the format
>> string Stan used should behave as it does in R2012a.
>
> I just have a little bit of time to take the textscan with Stan's
> example in 2012A, and indeed the difficulty is clearly due to parsing
> the "+-" just after a number ("...number+-...").
 >
> Don't forget that MATLAB supposes to able to parse complex number such
> as "1+1i" as well, so the "+-" does not facilitate the parser. The
> presence of "--" is also not very nice.
> So OK it doesn't handle that case well as it supposes, I admit it's a bug.

Aha!  Houston, we have liftoff!!!   <VBG>

I'll note that parsing a complex input really is immaterial to the 
bug--the bug is that the string-matching of the explicit string to 
ignore for the conversion that includes the first minus in the repeated 
substring "--" doesn't function correctly in 2012a (but does in 2012b). 
  That is, the fmt string that fails includes the characters up to and 
including the first '-' so that the %f should start processing w/ the 
second one which is a valid portion of the value.  One might specsulate 
that the problem was the location of the end match in the target string 
to the format string was used as the location for the next scan instead 
of incrementing to the next character to start the next field parsing.

textscan() is very complex; it's not surprising given how recently it 
has been introduced it still has warts.  Also not terribly surprising is 
that textscan() handled the same format string correctly since it's had 
a lot longer time to get such nits taken care of...

I wish for two things from TMW that would aid formatted text inputting 
greatly--

a) A set of functions (or an alternate format flag for the existing 
ones, maybe) that use Fortran-like FORMAT expressions vectorized in the 
same manner as are the C Xscanf() formatting strings.  This would solve 
many problems the most common of which is that of fixed-width input 
formats and would have solved our conundrum previous disagreement on 
what textscan() does differently than the scanf() family for a 
fixed-width decimal field that wasn't parsed correctly.

A second major benefit of FORMAT string form over C form is that it 
allows for repeat fields and field reversion that would obviate the need 
for the butt-ugly and pita repmat() foolishness to get multiple fields.

b) Raise textread() back to fully-supported status again including 
keeping its options up to par with those of textscan() and friends.  The 
loss of a way to read data into native arrays instead of cells is a 
major step backwards in functionality even given that the ability to mix 
string and numeric data into cell arrays via textscan() is 
_a_good_thing_ (tm).

I'd like to see an enhancement to textread to also allow it to combine 
like consecutive fields into a single array similar to the 
'collectoutput' for textscan.  Another way would possibly be for 
textscan() to allow for requesting that data be returned as native 
arrays as another optional flag/parameter value.  That may not be wise 
given the complexity that must reside internally already, but it's a 
thought if TMW thinks keeping the two up simultaneously is too much 
effort.  Altho one would think there should be a great deal of 
duplication of function in the two given how similar they are in 
abilities excepting for the mixed string/numeric enhancement to textscan().

> But Stan shouldn't be proud to create such nasty string at first.
....

I give Stan a complete pass on this.  Clearly it's output from another 
program he's reading on which to do further post-processing--not 
something made up as an input string w/ the idea of reading it.

--
0
none1568 (7453)
2/4/2013 9:57:47 PM
On 2/4/2013 3:57 PM, dpb wrote:
....

> textscan() is very complex; it's not surprising given how recently it
> has been introduced it still has warts. Also not terribly surprising is
> that textscan() handled the same format string correctly since it's had
> a lot longer time to get such nits taken care of...

The second textscan() above was intended to be textread(), of course...

....

>> But Stan shouldn't be proud to create such nasty string at first.
> ...
>
> I give Stan a complete pass on this. Clearly it's output from another
> program he's reading on which to do further post-processing--not
> something made up as an input string w/ the idea of reading it.

But, whatever the format, it shouldn't be hard to parse in a 
general-purpose programming language is just a given imo.

The killer w/ C's i/o functions is their complete inability to 
"understand" fix-width fields--it's simply absurd that one can't read 
the equivalent of a Fortran FORMAT(5I1) w/ a record of '101 1' and 
reliably get 1,0,1,0,1 returned in appropriate variables.  In Matlab 
(and C) that's nearly impossible w/o special handling.

--
0
none1568 (7453)
2/5/2013 1:04:46 AM
dpb <none@non.net> wrote in message <keplqs$he2$1@speranza.aioe.org>...

> 
> The killer w/ C's i/o functions is their complete inability to 
> "understand" fix-width fields--it's simply absurd that one can't read 
> the equivalent of a Fortran FORMAT(5I1) w/ a record of '101 1' and 
> reliably get 1,0,1,0,1 returned in appropriate variables.  In Matlab 
> (and C) that's nearly impossible w/o special handling.
> 

What's problem? The fixed format reading is just take the right column of the char matrix. OK you have to count the column, but that's really a big deal?

Writing with fixed-format with MATLAB is another matter (there is simply no easy way of doing it).

Bruno
0
b.luong5955 (6401)
2/5/2013 6:55:08 AM
On 2/5/2013 12:55 AM, Bruno Luong wrote:
> dpb <none@non.net> wrote in message <keplqs$he2$1@speranza.aioe.org>...
>
>>
>> The killer w/ C's i/o functions is their complete inability to
>> "understand" fix-width fields--it's simply absurd that one can't read
>> the equivalent of a Fortran FORMAT(5I1) w/ a record of '101 1' and
>> reliably get 1,0,1,0,1 returned in appropriate variables. In Matlab
>> (and C) that's nearly impossible w/o special handling.
>>
>
> What's problem? The fixed format reading is just take the right column
> of the char matrix. OK you have to count the column, but that's really a
> big deal?

The problem is there's no way to write a format string that will parse 
the above example input string correctly w/o actually doing the 
character manipulation directly.

Yes, that's a big deal for large files in terms of overhead plus the 
necessity of having to write special code to handle it when it should be 
a trivial formatting operation.

It's a remnant of the design of C that didn't really consider i/o to be 
terribly important it appears...

> Writing with fixed-format with MATLAB is another matter (there is simply
> no easy way of doing it).

I keep hearing this, but on output the fixed-width fields do work at 
least reasonably well--there have been several threads on the subject I 
can recall over the last several months or so but I can't remember a one 
that wasn't solvable pretty easily w/ just the proper formatting strings.

Output works reasonably well; fixed-width non-delimited input is just 
broken (by C Library definition which underlies the Matlab formatted i/o 
implementation).

--
0
none1568 (7453)
2/5/2013 2:17:48 PM
dpb <none@non.net> wrote in message <ker49o$r10$1@speranza.aioe.org>...
> On 2/5/2013 12:55 AM, Bruno Luong wrote:
> > dpb <none@non.net> wrote in message <keplqs$he2$1@speranza.aioe.org>...
> >
> >>
> >> The killer w/ C's i/o functions is their complete inability to
> >> "understand" fix-width fields--it's simply absurd that one can't read
> >> the equivalent of a Fortran FORMAT(5I1) w/ a record of '101 1' and
> >> reliably get 1,0,1,0,1 returned in appropriate variables. In Matlab
> >> (and C) that's nearly impossible w/o special handling.
> >>
> >
> > What's problem? The fixed format reading is just take the right column
> > of the char matrix. OK you have to count the column, but that's really a
> > big deal?
> 
> The problem is there's no way to write a format string that will parse 
> the above example input string correctly w/o actually doing the 
> character manipulation directly.
> 
> Yes, that's a big deal for large files in terms of overhead plus the 
> necessity of having to write special code to handle it when it should be 
> a trivial formatting operation.

I consider it is a relative easy task to write the wraparound code that does fixed format, may be a fortran like. May be one of the fortran users might be volunteer to do it and post in the FEX rather than waiting for TMW to do it for you guys (I bet it will never happen).

Bruno
0
b.luong5955 (6401)
2/5/2013 2:50:12 PM
On 2/5/2013 8:50 AM, Bruno Luong wrote:
....

> I consider it is a relative easy task to write the wraparound code that
> does fixed format, may be a fortran like. May be one of the fortran
> users might be volunteer to do it and post in the FEX rather than
> waiting for TMW to do it for you guys (I bet it will never happen).

Well, it is for the experienced (a relatively simple task, that is), but 
the question is "why do you have to do so?" instead of there being the 
facility in the base formatted i/o functions?  Plus, the time taken for 
doing that could be used for other more useful things.

I have had in the past some mex files that did precisely that--pass 
FORMAT strings to Fortran to handle some i/o.  Unfortunately, the source 
seems to have been lost on the machine at a former place of employment 
as I haven't been able to find it here.  The question came up not very 
long ago w/ a poster who had the identical question regarding an input 
string similar to the example.  It is conceptually quite simple; in 
practice as I recall it took some effort to make it general-enough to be 
of much generic use.

At this point in my life I'm not sure I'll ever have the ambition to 
actually do that much "real" coding again--I've simply lost the 
ambition/drive to write code at 2AM like a young'un and am too involved 
in the farming operation and other activities at the local level to have 
the time for more than just poking around at cssm for a little while in 
the mornings to sorta' halfway keep my hand in...

But, that TMW doesn't do it doesn't mean it's not a good idea to include 
in Matlab.  :)

Since TMW has been kind enough to me recently to provide a license for 
R2012b for evaluation/comments, perhaps I will try to build a coherent 
set of enhancement requests, though...

It's just a shame that K&R didn't follow the clearly better path already 
laid out instead of having to reinvent a (slightly out-of-round) wheel 
and so we have to suffer for it...

--
0
none1568 (7453)
2/5/2013 3:43:37 PM
dpb <none@non.net> wrote in message <ker9aj$df0$1@speranza.aioe.org>...

> 
> Since TMW has been kind enough to me recently to provide a license for 
> R2012b for evaluation/comments,

Excellent, very good offer from TMW.

Bruno
0
b.luong5955 (6401)
2/5/2013 4:08:12 PM
On 2/5/2013 10:08 AM, Bruno Luong wrote:
> dpb <none@non.net> wrote in message <ker9aj$df0$1@speranza.aioe.org>...
>
>>
>> Since TMW has been kind enough to me recently to provide a license for
>> R2012b for evaluation/comments,
>
> Excellent, very good offer from TMW.
>

Altho it's turning out not to be the boon I had hoped for...it brings my 
old machine almost completely to its knees so that response time is so 
poor as to make it unusable for any real work... :(

I do the occasional test like Stan's case where I can't in my old R12 
release but it's just not feasible to use it for anything else.  I do 
have some additional memory on order to see if that will help...

--
0
none1568 (7453)
2/5/2013 6:35:32 PM
Update:

Thanks a lot for all the help.

Both dpb and Bruno Lung offered methods that worked. I have to make minor adjustments but their suggestions solved the problem.
0
2/7/2013 10:59:09 PM
Reply:

Similar Artilces:

Is the number of the box that contains all the numbers of the boxes that don't contain their own number in its own box?
Is the number of the box that contains all the numbers of the boxes that don't contain their own number in its own box? AHHH Hyperinfinity!!!! http://en.wikipedia.org/wiki/Cantor%27s_first_uncountability_proof Herc HERC777 wrote: > > Is the number of the box that contains all the numbers of the boxes > that don't contain their own number in its own box? There is no such box. Jim wrote >There is no such box. AHHHH, super duper triple looper hyperinfinty!!! Herc Q: is the Herc777 with a brain ever going to post a sensible article about diagonalization on sci.logic...

equation number, table number, figure number linked to the same paragraph number
I have a paragraph number, example A-XXX Then I want to have equations like: .... Eq A-1 .... Eq A-2 ... liked to this paragraph And also ... fig A-1 .... fig A-2 ...linked only to this paragraph .... At the end. I want to have... A-XXX .... Eq A-1 .... fig A-1 .... fig A-2 .... Eq A-2 .... Eq A-3 .... fig A-3 B-XXX .... Eq B-1 .... fig B-1 .... Eq A-2 .... Eq A-3 .... fig B-2 Thanks for ideas On Sat, 17 Nov 2007 23:22:15 +0100, value <####@wanadoo.fr> wrote: > I have a paragraph number, example > > A-XXX > > T...

how to extract numbers out of a string containing numbers and ","
Hi there, I have a string containing numbers separated by comma ','. The string looks like "1,2,5,10,32". How can I get the output as a series of numbers out of it? My goal is to search for a series of numbers in such strings. I think I have to extract the numbers out first. Thank you very much, Ting On Friday, March 29, 2013 5:07:20 PM UTC-6, Ting wrote: > Hi there, > > > > I have a string containing numbers separated by comma ','. > > The string looks like "1,2,5,10,32". How can I get the > > output as a series of numbers out of it? My goal is to search for > > a series of numbers in such strings. I think I have to > > extract the numbers out first. > > > > Thank you very much, > > > > Ting Look at the scan function for retrieving elements. You can also look at the index or find function to search a text string for a series of numbers. On Saturday, March 30, 2013 4:37:20 AM UTC+5:30, Ting wrote: > Hi there, > > > > I have a string containing numbers separated by comma ','. > > The string looks like "1,2,5,10,32". How can I get the > > output as a series of numbers out of it? My goal is to search for > > a series of numbers in such strings. I think I have to > > extract the numbers out first. > > > > Thank you very much,...

Number of Numbers
Hi! i need help... there is a function that would let me now the number of numbers in a string? Thanks Hi! i need help... is there a function that would let me Know the number of numbers in a string? Thanks On Sep 10, 1:22=A0pm, misschupito <cristinap...@gmail.com> wrote: > =A0Hi! i need help... is there a function that would let me Know the > number of numbers in a string? > > =A0 Thanks Not sure if tehre is an easier way but this would work data test; char=3D'abdj 34 fffk 45fg'; num_of_digits=3Dlength(compress (char,'0''1''2''3''4''5''6''7''8''9','k'); run; ...

Table numbers same as page numbers
Hi, I would like to give a table the same number as the page number it appears on, like in Concrete Mathematics book. How can I achieve this? I am using memoir. Thank you very much in advance. Athale. athale@risc.uni-linz.ac.at (Athale) wrote: > I would like to give a table the same number as the page number it > appears on, like in Concrete Mathematics book. How can I achieve this? \let\thetable\thepage in the preamble of your document should do it. HTH, Axel Hi, > > I would like to give a table the same number as the page number it > > appears on, like in Concrete ...

TextScan in MATLAB: Reading only numbers from a file that contain text
Hi, I have the a file that looks like that: Coordinate dump at phase x Number of particles: a x[cm] bgx y[cm] bgy 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 8.73E+00 -1.29E-04 Coordinate dump at phase x Number of particles: b x[cm] bgx y[cm] bgy 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 8.73E+00 -2.60E-04 Coordinate dump at phase x Number of particles: c x[cm] bgx y[cm] bgy 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 8.73E+00 -3.93E-04 The file has more lines but follows the same pattern as described above. I want my to read only the n...

Text file with numbers and text, want to just read numbers
I have a series of text files I want to read. The files begin with header information. The number of rows of header information changes, there is no commenting symbol such as %%, and the header information sometimes has numbers such as a date or a time. I want to read in the number and only the numbers. This is an example of a file: (Again, the header info changes, different # of lines, different text) Vector Signal [Measurement4]: 09/27/2006, 09:05:24 Units: EU Time Real 0 0.053732 9.6e-005 0.11968 0.000192 0.085483 0.000288 ...

Converting \pageref{} numbers to numbers in text
I have a LaTeX document that ends: \label{lastpage}\end{document} in order that I may set up such as: This question paper consists of \pageref{lastpage} pages. If the last page is, say, page 2, how can I get: This question paper consists of two pages. instead of This question paper consists of 2 pages. ? TIA "Michael Rolfe" <mumble@ANTISPAMmaths.uct.ac.za> wrote: > I have a LaTeX document that ends: > > \label{lastpage}\end{document} It can happen, that this label never goes into the .aux file. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nofm Page numbering ``<n> of <m>'' Other packages: zref, totpages, count1to, ... > in order that I may set up such as: > > This question paper consists of \pageref{lastpage} pages. > > If the last page is, say, page 2, how can I get: > > This question paper consists of two pages. > > instead of > > This question paper consists of 2 pages. \usepackage{zref-totpages} \newcommand*{\NumAsName}[1]{% \ifcase#1% zero% \or one% \or two% \or three% \or four% \else five or more% \fi } (Perhaps a package exists for this purpose.) This question paper consists of \NumAsName{\ztotpages} pages. Yours sincerely Heiko <oberdiek@uni-freiburg.de> ...

find digit length or the number of numbers in number ?
Hi, I am trying to find out how many digits there are in a given number. The macro listed below works fine when applied to an INT, however when doing Doubles with numbers > then a billion ?? It stops working. Anyone any idea's ? Thankx ! Steven. #include <stdio.h> #include <math.h> #define DIGLEN(x) (x ? (int)(log10((double)(abs(x)))) + 1 : 1) int main(int argc, char *argv[]) { int i = 123; double j = 807319385.29; double k = 12258983401.75; printf("%3d: %d\n", DIGLEN(i), i); printf("%3d: %.2f\n", DIGLEN(j), j); printf("%3d: %.2f\n&q...

What is the maximum number of tablespaces that contain data for a table containing tw
What is the maximum number of tablespaces that contain data for a table containing two LOB columns? -- Posted via http://dbforums.com valexena <member43815@dbforums.com> wrote in message news:<3551997.1067847615@dbforums.com>... > What is the maximum number of tablespaces that contain data for a table > containing two LOB columns? The answer depends on several factors such as are you including indexes in your answer or just the table? Is the table and its indexes partitioned? Were the LOB object tables created in different tablespaces from the table? There is no definite answer without more information. I suggest you read the Concepts and DBA Administration manuals. HTH -- Mark D Powell -- ...

Custom/override table (float) number: how to make a top-level table with number "1a"?
Can anyone tell me the easiest way to make a table with a custom number? If I \setcounter{table}{1a} I get a table "2". How do I make it "1a"? (Sadly I only need to do this because the tables are an appendix to someone's non-latex file wihtout dynamic references, and we want to squeeze in a table...) Thanks!! Am Tue, 30 Sep 2008 17:55:12 -0700 (PDT) schrieb Christopher Barrington-Leigh: > Can anyone tell me the easiest way to make a table with a custom > number? > If I \setcounter{table}{1a} I get a table "2". How do I make it > "1a&qu...

Sorting of elements containing letters and numbers as only numbers!
Hi all, I have strings to sort, which contain letters at the left side and numbers at the right side like below: step1 step2 step3 step4 step5 step6 step7 step8 step9 step10 step11 step12 step13 step14 step15 step16 step17 step18 step19 step20 step21 When I try to sort these items in AWK, it sorts them as strings like below: step1 step10 step11 step12 step13 step14 step15 step16 step17 step18 step19 step2 step20 step21 step3 step4 step5 step6 step7 step8 step9 Each time I separate the letters and the numbers and put these numbers in a column left to these strings and sort them via the first...

Extract numbers from text string
Hi folks, Which is the best way to extract the numbers of the following string ? HELP, /MEM, OUTPUT=str PRINT, str I'm trying something like: str_out=STREGEX(str,'[0-9]*',/EXTRACT) But nothing happens... Any suggestions ? Thanks in advance, nata On 2/22/11 12:08 PM, nata wrote: > Hi folks, > > Which is the best way to extract the numbers of the following string ? > HELP, /MEM, OUTPUT=str > PRINT, str > > I'm trying something like: > str_out=STREGEX(str,'[0-9]*',/EXTRACT) > > But nothing happens... >...

reading in file with text and numbers to be able to access numbers
Hi. I am trying to read in a file that was created by another application. The first two lines of this file are composed of text that I don't need. Following are 100 lines of numbers that I do need. Any idea on how to load this file without making an overly specific script? The number of rows of numbers the other application generates varies. Thank you for any tips! Look at the TEXTREAD function. One of the options is 'headerlines', to tell it the number of lines to skip at the beginning of the file. So you would do something like this: n = textread('myfile.txt','...

SELECT WHERE NOT A NUMBER/IS A NUMBER?
Hi Anyone know how to select only values from a row that contain a number or that don't contain a number? Thanks, Ciar=E1n On Jan 30, 7:06=A0pm, Ciaran <cronok...@hotmail.com> wrote: > Hi Anyone know how to select only values from a row that contain a > number or that don't contain a number? > Thanks, > Ciar=E1n Can you provide an example? On Jan 30, 7:36=A0pm, strawberry <zac.ca...@gmail.com> wrote: > On Jan 30, 7:06=A0pm, Ciaran <cronok...@hotmail.com> wrote: > > > Hi Anyone know how to select only values from a row that contain a > >...

Numbers to strings to numbers again
I think I an getting the hang of this language, but I ran into a puzzler. I have a large array of data objects initialized at onLoad() time in an HTML page. I send them in as numbers. I gather that things are strings unless specifically made otherwise. I do a search on the data, which is essentially a loop of string compares. That works fine. So I want to optimize a little bit, and do some basic numeric comparisons before I start the linear search. I did not use parseInt() or parseFloat(), I just used the str - 0 trick to force type conversion. However, something is not working. ...

Extract Number From Text String
Hello, Does xHarbour have a function to extract Number from a text string? Regards Otto Dear Otto Haldi: On Monday, September 17, 2012 11:48:58 AM UTC-7, Otto Haldi wrote: .... > Does xHarbour have a function to extract > Number from a text string? http://www.ousob.com/ng/53guide/nga7e04.php val() David A. Smith On Mon, 17 Sep 2012 12:05:13 -0700 (PDT), dlzc <dlzc1@cox.net> wrote: Hello David, Thanks for your help. Yes, I know the function val() I mean for that kind of string : "abc-2344-2323". Regards Otto >Dear Otto Haldi: > >On Monday, September 17, 2012 11:48:58 AM UTC-7, Otto Haldi wrote: >... >> Does xHarbour have a function to extract >> Number from a text string? > >http://www.ousob.com/ng/53guide/nga7e04.php > >val() > >David A. Smith On Monday, September 17, 2012 4:36:24 PM UTC-3, Otto Haldi wrote: > On Mon, 17 Sep 2012 12:05:13 -0700 (PDT), dlzc wrote: > > > > Hello David, > > > > Thanks for your help. Yes, I know the function val() > > I mean for that kind of string : "abc-2344-2323". > > > > Regards > > Otto > > > > >Dear Otto Haldi: > > > > > >On Monday, September 17, 2012 11:48:58 AM UTC-7, Otto Haldi wrote: > > >... > > >> Does xHarbour have a function to extract > > >> N...

Statistics
Hello, I want to list the User Tables which I have created (I am aware of the Schema Name where the tables are residing). The goal is to achieve the following output with one single command or script: TABLE_NAME NUMBER_OF_ROWS NUMBER_OF_COLS How do I achieve this in one shot? I am aware of writing a program (Stored Proc) and writing a Loop to get this. But I am intersted in any straight way to do this directly (from DB2 command prompt) using single SQL Statement or some kind of Unix Script. I am using IBM DB2 UDB 8.1. Regards, Kamlesh kamlesh2000@yaho...

Table and figure numbers replaced by section and subsection numbers
References to table and figure numbers are being replaced by the corresponding section and subsection numbers, and are thus incorrect. However, they appear correct in the captions and in the table and figure lists. I have tried a lot, without success. Any guess? I am using MiKTeX 2.6 and plain \label {} and \ref {} commands. Thanks in advance. On Wed, 02 Sep 2009 17:34:00 +0200, Marcus Ramos <marcus.univasf@gmail.com> wrote: > References to table and figure numbers are being replaced by the > corresponding section and subsection numbers, and are thus incorrect. > However, t...

NUMBER(0) and NUMBER
Hello, what does the datatype NUMBER(0) mean? Is it the same as NUMBER, which can be seen in turn as FLOAT? Thank you, Norbert On Aug 19, 8:53=A0am, Norbert P=FCrringer <thalio...@graffiti.net> wrote: > Hello, > > what does the datatype NUMBER(0) mean? Is it the same as NUMBER, which > can be seen in turn as FLOAT? > > Thank you, > Norbert SQL> create table numtest( 2 col1 number(0), 3 col2 number 4 ); col1 number(0), * ERROR at line 2: ORA-01727: numeric precision specifier is out of range (1 to 38) SQL> It means, apparently, that someone doesn't understand the NUMBER datatype in Oracle. And NUMBER, absent a precision specifier, is equivalent to using NUMBER(38). David Fitzjarrell On Aug 19, 8:53 am, Norbert P=FCrringer <thalio...@graffiti.net> wrote: > Hello, > > what does the datatype NUMBER(0) mean? Is it the same as NUMBER, which > can be seen in turn as FLOAT? > > Thank you, > Norbert Have you considered TRYING it?? create table ejp (id number(0)) Error at line 1 ORA-01727: numeric precision specifier is out of range (1 to 38) Script Terminated on line 1. HTH, Ed On Aug 19, 10:19=A0am, Ed Prochak <edproc...@gmail.com> wrote: > On Aug 19, 8:53 am, Norbert P=FCrringer <thalio...@graffiti.net> wrote: > > > Hello, > > > what does the datatype NUMBER(0) mean? Is it the same as NUMBE...

Maximum number of Tables
Hello people, I might sound a little bit crazy, but is there any possibility that you can incorporate 4^15 (1,073,741,824) tables into a SQL Database? I mean, is it possible at all? There might be a question of where anyone would want so many tables, but i'm a bioinformatics guy and I'm trying to deal with genomic sequences and was coming up with a new algorithm, where the only limit is the number of tables I can put into a Database. So, can you please advise if its possible to put in so many tables into a SQL database? Or is the Bekerley DB better? (ramraj@gmail.com) writes: >...

How to output text after a number in MATLAB
I'm trying to output a label in this code I'm writing. The thing I'm trying to do is calculate a distance and output the distance with a label (i.e. "cm"). So I want to output something like "x = 5 cm". How can I do this? Thanks. "Adam Glick" wrote in message <mleh4e$4jk$1@newscl01ah.mathworks.com>... > I'm trying to output a label in this code I'm writing. The thing I'm trying to do is calculate a distance and output the distance with a label (i.e. "cm"). So I want to output something like "x = 5 cm". How ca...

How to extract the text,numbers from an image?
Hi all, How to extract the text,numbers from an image?Is there any matlb codes availabe in online? Thaks, Regards, sv ...

extracting numbers from text string
Hello, I am new to Matlab. I have a very long text file with a repeating structure like: ----- Courant Number mean: 0 max: 0.136 Iteration No 1 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.99476e-08, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0 DICPCG: Solving for p, Initial residual = 1, Final residual = 9.41218e-08, No Iterations 737 time step continuity errors : sum local = 7.34978e-12, global = -2.46208e-14, cumulative = -2.46208e-14 DICPCG: Solving for p, Initial residual = 3.59809e-05, Final res...

Web resources about - Extract numbers from table containing text and numbers - comp.soft-sys.matlab

Rubio: “Never discussed dropping out with anyone on Planet Earth”
No one on “Planet Earth,” eh? You know who that leaves , right? In last night’s townhall forum on Fox, Marco Rubio vehemently denied the rumors ...

5 Android N features you’ll want now!
Google delivers Android N Developer Preview, an update to Android that includes several features that won't be delivered to the average Android ...

Facebook Messenger for Windows 10 wants to take up your whole screen
I've used a lot of different instant messaging services over the years to keep in contact with friends online. These days, most people tend to ...

Shooting Near Pittsburgh Kills 5 and Wounds 3 at Party
New York Times Shooting Near Pittsburgh Kills 5 and Wounds 3 at Party New York Times The police in a Pittsburgh suburb on Thursday were searching ...

Apple warns that FBI could monitor cameras and microphones next
If you've been following the case between Apple and the FBI, then you know that Apple has been asked to create a new, insecure version of iOS ...

Kelly Clarkson Clarifies Dr. Luke Blackmail Claims, As His War With Ke$ha Continues
Kelly Clarkson recently joined the chorus of voices against Dr. Luke, who is currently involved in a highly publicized legal fight with Ke$ha. ...


Bette Midler posts a faux nude selfie for charity: like Kim put your selfie to work
. @KimKardashian Put your selfie to work…for a good cause! Donate, RT, I'll match $ 2-1! https://t.co/3tfkNFnPic pic.twitter.com/f5yqqlbjvg ...

President Obama Hails Marriage Equality in Remarks Welcoming Canadian PM Justin Trudeau: WATCH
President Obama welcomes “the quite good-looking” Canadian Prime Minister Justin Trudeau to the White House today in the first state visit for ...

Feds Are Investigating Google's Driverless Car Crash
WASHINGTON, March 10 (Reuters) - The top U.S. auto safety regulator said on Thursday the agency is seeking additional details of a recent crash ...

Resources last updated: 3/10/2016 5:11:37 PM