HDF5中的MATLAB对象表示
是否可以检索用Python中的HDF5中的MATLAB对象表示,matlab,hdf5,Matlab,Hdf5,是否可以检索用Python中的-v7.3保存在MATLAB中的对象属性 例如,以本课程为例: classdef TestClass < handle properties Name = 'Nobody'; Value = 42; end methods function this = TestClass(name, value) if nargin > 0
-v7.3
保存在MATLAB中的对象属性
例如,以本课程为例:
classdef TestClass < handle
properties
Name = 'Nobody';
Value = 42;
end
methods
function this = TestClass(name, value)
if nargin > 0
this.Name = name;
end
if nargin > 1
this.Value = value;
end
end
function doSomething(this)
fprintf('My name is â%sâ and my value is â%dâ.\n', this.Name, this.Value);
end
end
end
在Python中使用hdf5
,我可以看到a
表示为
array([3707764736, 2, 1, 1, 1, 1], dtype=uint32)
而b
是
array([3707764736, 2, 1, 1, 1, 2], dtype=uint32).
进一步挖掘表明,
'#refs#/e'
产生A
的名称
,'#refs#/f'
产生其值
。但是映射发生在哪里?不幸的是,尽管使用了标准HDF5文件,但MATLAB v7.3文件的文档记录却很差。有些人已经成功地对它们进行了反向工程(例如查看hdf5存储
python包),但它们显然不是真正的标准hdf5文件。不幸的是,尽管使用了标准hdf5文件,但MATLAB v7.3文件的文档却很少。有些人已经成功地对它们进行了反向工程(例如查看hdf5storage
python包),但它们显然不是真正的标准hdf5文件。
array([3707764736, 2, 1, 1, 1, 2], dtype=uint32).