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 7501061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:24:36+00:00 2026-05-29T20:24:36+00:00

I am trying to read a text file into matlab where the text file

  • 0

I am trying to read a text file into matlab where the text file has been designed so that the columns are right-aligned so that my columns look like,

    3        6      10.5
   13       12       9.5
  104        5    200000

This has given me two situations that I’m not sure how to handle in matlab, the first is the whitespace before the first data and the other is the variable number of whitespace characters in each row which seems to be beyond my knowledge of textscan. I’m tempted to use sed to reformat the text file but I’m sure this is trivial to someone. Is there a way that I can an arbitrary amount of whitespace as the delimeter (and have the line start with the delimeter)?

  • 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-05-29T20:24:38+00:00Added an answer on May 29, 2026 at 8:24 pm

    Use the load command:

     l = load('C:\myFile.txt')
    

    It will work as long as you have only numbers, and same number of columns.

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

Sidebar

Related Questions

I am trying to read a text file in Matlab and convert it into
I'm trying to read a text file that contains integers and store them into
I'm trying to read a text file that looks like this 0,-16,-4,12,10,4,-14,8,44,8,8,12,-4 1,-16,-4,12,10,4,-14,6,43,10,10,12,-4 2,-16,-6,10,11,2,-13,4,43,10,11,12,-4
I am trying to read in a text input file that contains a list
I'm trying to have my application read through a text file and look for
I am trying to read a simple text file into a String. Of course
I have an XmlReader that is trying to read text into a list of
Im trying to read a text file, x bytes at a time into a
I'm trying to parse a text file that has a heading and the body.
I'm trying to read in a text file of a bunch of words that

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.