How do we create a .mat document

7 ビュー (過去 30 日間)
Hind Aljallaf
Hind Aljallaf 2023 年 3 月 28 日
回答済み: Mayank Sengar 2023 年 4 月 3 日
how do we download and export a matlab code in the form of .mat document?
  2 件のコメント
John D'Errico
John D'Errico 2023 年 3 月 28 日
I'm confused. A .mat file is a container that holds only data, essentially numbers. No code is ever contained in a .mat file. So you cannot download or export code in the form of a .mat file.
Are you asking about an m-file? An m-file is just a text file. It contains code. How you would download it would depend upon where you are downloading it from.
Walter Roberson
Walter Roberson 2023 年 3 月 28 日
Well, you could read in a .m or .mlx file as binary and store the byte stream in a .mat file... but it is not clear why you would want to do that

サインインしてコメントする。

回答 (1 件)

Mayank Sengar
Mayank Sengar 2023 年 4 月 3 日
A MATLAB code file typically has a ".m" extension and cannot be saved as a ".mat" file directly. A ".mat" file is a binary file format used in MATLAB for storing variables, arrays, and structures.However, you can save the output of a MATLAB code as a ".mat" file.

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by