Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9094303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:19:09+00:00 2026-06-16T23:19:09+00:00

This should be trivial, but I can’t find the answer in the MATLAB documentation.

  • 0

This should be trivial, but I can’t find the answer in the MATLAB documentation. I have a TSV file consisting of ~60,000 rows and 38 columns. The first row has the names of the columns, and the first column consists entirely of alphanumeric strings. The remaining entries are all floating-point numbers (although, in many cases the value is expressed as just 0, without an explicit decimal point).

How can I read this data into MATLAB?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:19:10+00:00Added an answer on June 16, 2026 at 11:19 pm

    MATLAB provides a function textscan for this purpose. The second argument is the format specifier. In your case, the first field is a string, so we use %s, the remaining fields are float values, so we use %f. You will need 37 repeats of %f – a few more than in this example:

    fid = fopen('yourfile.tsv');
    C = textscan(fid, '%s %f %f %f %f %f %f', 'HeaderLines', 1);
    fclose(fid);
    

    HeaderLines tells textscan how many lines to skip before starting. You mention that the first line in your file contains the column names, so we skip 1 line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be a trivial Task but I can't find how to do it.
This should be trivial and obvious but I can't find any examples of this.
It seems trivial enough but I can't find a valid answer to this problem.
This should be trivial but I can't seem to find it (unless no such
This should be quite simple, but I can't work out the syntax. I have
This should be a simple issue but I can't figure this out. I have
This is a very trivial problem but I can't seem to find a way
I feel like this should be trivial, but I've struggled to find anything useful
This seems fairly trivial but I can't seem to work it out I have
This should be a trivial question. But I am confused. I want to print

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.