MATLAB Answers


.mat file

Asked by Melvin
on 6 Mar 2012
Accepted Answer by TAB

Hi. How can I edit or make a .mat file? Hope someone will reply thank you.




No products are associated with this question.

2 Answers

Answer by TAB
on 6 Mar 2012
 Accepted answer

You can use MAT-file interface library to read & write MAT files from standalone C or Fortran code.

See Custom Applications to Read and Write MAT-Files


Answer by Walter Roberson
on 6 Mar 2012

.mat files are binary files that cannot be edited with a regular editor. If you knew the exact binary format it would be possible to write in new data.

The ABI documentation describes the binary format and describes a (Mathworks-provided) C library that can be used to create the files.


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!