.dat文件如何基于excel文档创建一个
我的 matlab 文件夹中有一个 .csv 文件,其中包含 38 列和大约 48,000 个条目。我希望使用 findcluster gui,但它只接受 .dat 文件。
如何在 matlab 中创建 .dat 文件,或者具体如何将 .csv 文件转换为可由 matlab fcm 聚类工具使用的 .dat 文件?
csv 示例:
我将如何为此类信息创建数据文件?
I have a .csv file in my matlab folder with 38 columns and about 48 thousand entries. I was hoping on using the findcluster gui but it only accepts .dat files.
How do I create a .dat file in matlab or specifically how do I convert the .csv file into a .dat file that can be used by the matlab fcm clustering tool?
example of csv:
how would I go about creating a data file for this kind of information?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我能找到的关于文件格式的唯一 文档 是
我检查了clusterdemo.dat,发现数据是以ASCII格式存储的。因此,尝试
The only documentation I could find about the file format was
I checked clusterdemo.dat and found that the data is stored in ASCII format. Therefore, try
只需将 xxx.csv 重命名为 xxx.dat 即可。这对我有用。
Just rename xxx.csv to xxx.dat. This worked for me.
您应该尝试更改扩展名。要更改扩展名,您可以转到文件夹设置→并查看我们显示隐藏文件的位置...取消选中已知文件的隐藏扩展名,现在您可以通过重命名来更改任何文件的扩展名。
因为
确实不存在“dat”格式这样的东西,“dat”文件只是一个文本文件,理论上它可以具有您想要的任何扩展名。它也可以根据您想要/需要的方式进行分隔,这完全取决于你想要达到的目标。
即你要使用这个文件做什么?
如果它与另一个应用程序一起使用,那么该应用程序的要求可能会决定它的分隔/结构等。
或者您只需将 Excel 中的文件保存为 .csv,然后可以更改扩展名。
这对我有用。
you should try changing extension.For changing extension you can go to folder settingand in view where we show hidden file…uncheck the hide extension for known files and now you can change the extension of any file by renaming it.
Because
There really isn't such a thing as 'dat' format, a 'dat' file is just a text file, it could theoretically have any extension you want.It could also be delimited however you want/need, it all really depends on what you are trying to achieve.
ie what are you going to use this file for?
If it's for use with another application then the requirements of that application will probably dictate how it's delimited/structured etc.
OR simply you can save the file from the excel as .csv and then later can change the extension.
It worked for me.