Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Systems Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

On This Page

[Help]

  

Quick Links

Top Level

Related Links

Ask OLC a question

Athena Consulting Homepage

Helpdesk Stock Answers (for Mac/PC questions)


How to read variables from a TEXT FILE

You can load data into matlab using the "load" command.  The data should be
arranged just as you would want to appear in the matrix; for example, loading
a file which contained:

	1.1   2.2    3.4
	2.2   3.3    2.3

would result in a two row, three column matrix.

The file should end in the extension ".dat".  To load the file into a variable
in matlab, you'd type something of the following form (substituting the path
for your data) at the matlab prompt:

	load filename.dat

The data from the file will be loaded into the variable "filename".

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.