Friday, January 25, 2013

Importing data from Excel into Matlab

One of my colleague had asked me on how to import data from excel into Matlab, so she can manipulate the data in matlab worksheet.

This is the way, how I do it:

1) Save your data in Matlab specific folder in your computer. For example: 

C:/Users/Che Mohd Imran/Documents/MATLAB/average_matlab.xls

You need to change (average_matlab) with your own file name. Your data in excel will look like this:

Print screen of data in excel

2) In Matlab worksheet, type the following coding: 


mydata = xlsread('C:/Users/Che Mohd Imran/Documents/MATLAB/average_matlab.xls')



Your data are ready now to be manipulated. Good luck!

No comments:

Post a Comment