converting .mat file to .dat file

조회 수: 16 (최근 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 CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by