×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

read a specific part from an ASCII file in matrix format

read a specific part from an ASCII file in matrix format

read a specific part from an ASCII file in matrix format

(OP)
A long file i have. I want to take a specific part of it. I have the following codes. But after restricting the part of the file i want to read I can not take the part as a matrix format.

fid1=fopen('050912.out','r');
str=fread(fid1,'*char').';
boundary=regexp(str,'\s*at\s*obs\s*epoch\s*length\s*(.*)\s*\s*EARTH\s*ORIENTATION\s*PARAMETERS','tokens');
bound=boundary{:}{:};

The preceding code takes the part that i want to use from the file '050912.out' but into a cell not in a matrix format. Help me please.

RE: read a specific part from an ASCII file in matrix format

Try cell2mat


^^

BsK

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources