フィルターのクリア

what should be the format of .mat file

1 回表示 (過去 30 日間)
sheetal sharma
sheetal sharma 2013 年 7 月 1 日
iam new to matlab.Iam not getting how to import .mat file which is in string form.pl help
  1 件のコメント
Jan
Jan 2013 年 7 月 1 日
What does "in string form" exactly mean? Is this the file name or the file format, such that you can edit the file in any editor?

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

採用された回答

Guru
Guru 2013 年 7 月 6 日
A .MAT file in MATLAB is a binary file format that MATLAB uses which is a direct copy of its workspace. The recommended way to create a MAT file is using the SAVE command, as in:
A = rand(1,10)
B = 'Hello World'
save mymat.mat
You would then read A and B back to the MATLAB workspace from the MAT file by LOAD
clear % remove any variables from the workspace
load mymat.mat
While load can read in text files through the syntax that per isakson refers to, there are better ways MATLAB can read in text files to its workspace.
HTH
  2 件のコメント
sheetal sharma
sheetal sharma 2013 年 7 月 26 日
thanku
Hariharan Balasubramanian
Hariharan Balasubramanian 2020 年 5 月 19 日
thx

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

その他の回答 (1 件)

per isakson
per isakson 2013 年 7 月 6 日
編集済み: per isakson 2013 年 7 月 6 日
Try this:
S = load( filename, '-ascii' );
See load

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by