Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Matrix of mixed types into Matlab

Status
Not open for further replies.

jwbrooks

Aerospace
Dec 7, 2010
1
Hi, I'm new to the community.

I'm trying to import data from a tabulated data file, but the data contains both strings (rows 1 to 23) and a large number of floats (rows 24 and on). What I want to do is be able to load all of the floats (rows 24 and on) into Matlab while ignoring the rest, but I have no idea how to go about doing that. I've played with textscan and textread, but I haven't been able to figure it out. I would really appreciate anyone who could shine some light onto this for me.

I've attached a sample data file.




 
Replies continue below

Recommended for you

Try this

[t,x,y,z] = textread('temp.txt','%f %f %f %f' ,'headerlines',23);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor