如何将npy导入matlab,如何在Matlab中读取.npy文件(How to read .npy files in Matlab)

如何在Matlab中读取.npy文件(How to read .npy files in Matlab)

我想知道是否有办法在Matlab中读取.npy文件? 我知道我可以使用Python中的scipy.io.savemat将它们转换为Matlab风格的.mat文件; 但我更感兴趣的是在Matlab中为.npy文件提供本地或插件支持。

I was wondering if there is way to read .npy files in Matlab? I know I can convert those to Matlab-style .mat files using scipy.io.savemat in Python; however I'm more interested in a native or plugin support for .npy files in Matlab.

原文:https://stackoverflow.com/questions/21553999

更新时间:2019-11-03 19:55

最满意答案

你可以写一个mex函数来读取数据。 我宁愿将所有内容存储在hdf5中

There is a c++ library available https://github.com/rogersce/cnpy

You could write a mex function to read the data. I would prefer to store everything in hdf5

2014-02-04

相关问答

尽管这个问题接近于完全重复,但@NathanG提供的链接(即使用xlsread )中提出的解决方案只是解决您的问题的一种可能方式。 链接中的作者还建议使用textscan ,但不提供任何关于如何做的信息,所以我想我会在这里添加一个示例&#x

你可能感兴趣的:(如何将npy导入matlab)