Access Keys:
Skip to content (Access Key - 0)
 
More about this article
Created: 11/07/2008 10:33
Modified: 02/18/2009 01:20

How can I load data into MATLAB 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".

Your Rating: Results: PatheticBadOKGoodOutstanding! 1 rates

Adaptavist Theme Builder Powered by Atlassian Confluence