converting .mat file to .dat file

24 ビュー (過去 30 日間)
faryal
faryal 2014 年 6 月 17 日
コメント済み: faryal 2014 年 6 月 17 日
i have to use my data for clustering and it only works on .dat files. My files are in .mat format and i am not able to convert them or use them for clustering. please help
  1 件のコメント
faryal
faryal 2014 年 6 月 17 日
it is giving me this error
?? Error using ==> load Number of columns on line 1 of ASCII file C:\Users\Faryal\Desktop\matlab.data must be the same as previous lines.

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

採用された回答

Julia
Julia 2014 年 6 月 17 日
Load them into the workspace and save them as .dat files:
>> A=[ 1 2 3; 4 5 6]
A =
1 2 3
4 5 6
>> save test.dat A -ascii
Creates the file test.dat containing the data in A.
  1 件のコメント
faryal
faryal 2014 年 6 月 17 日
Thankyou so much Julia. it worked for me :)

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2014 年 6 月 17 日
You'll need to show us the code you used to convert your variable in MATLAB (which you got after calling load()), into your text file calle d "matlab.data". Plus post the error message - ALL THE RED TEXT - don't just snip out a small portion of it like you did.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by