MATLAB Answers


save excel data to matfile.....

Asked by Elysi Cochin on 4 Mar 2013

i have an excel sheet with 25 rows and 25 column values.... is it possible to save that 25 rows and 25 columns into a matfile.... if yes how to do.... please do reply.....



No products are associated with this question.

1 Answer

Answer by ChristianW
on 4 Mar 2013
 Accepted answer

Reading excel sheet:

doc xlsread

Saving into matfile

doc save


where do include this.... in m-file?? what is doc "is it the name of the excel sheet....

Type 'doc xlsread' in the Command Window to open the matlab help/documentation for the function xlsread.

The code in your m-file might be something like this:

num = xlsread('MyExcelFileName.xls')
save MyMatFileName.mat num

thank u....

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!