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

New to MATLAB?

saving a csv file as a .mat file

Asked by Lisa Justin

Lisa Justin (view profile)

on 18 Oct 2012

How can i save a csv file as a .mat file

0 Comments

Lisa Justin

Lisa Justin (view profile)

Products

2 Answers

Answer by Pedro Villena

Pedro Villena (view profile)

on 18 Oct 2012
Accepted answer

if columns have equal number of rows

M=csvread('filename.csv')
save('filename.mat','M')

1 Comment

Lisa Justin

Lisa Justin (view profile)

on 19 Oct 2012

Thanks Pedro

Pedro Villena

Pedro Villena (view profile)

Answer by Sachin

Sachin (view profile)

on 18 Oct 2012

2 Comments

Lisa Justin

Lisa Justin (view profile)

on 18 Oct 2012

i have a csv file and want to convert it to a matlab file. how can i do this?

Sachin

Sachin (view profile)

on 18 Oct 2012

Sorry bad link (:

http://www.mathworks.com/matlabcentral/answers/3932

Hope it helps!!!

Sachin

Sachin (view profile)

Contact us