MATLAB Answers

Amy
0

How can I save complex data to HDF5 file?

Amy
さんによって質問されました 2014 年 12 月 23 日
最新アクティビティ per isakson
さんによって 編集されました 2015 年 1 月 1 日
I'm looking for a good way to save complex data, having a real and imaginary component, to an HDF5 file. Is there something out there that can help or do I need to create a new data type? And if I do create a new data type, would the data be readable by other programs that load HDF5 or do I need to write a custom loading function?

  0 件のコメント

サインイン to comment.

タグ

製品

1 件の回答

per isakson
回答者: per isakson
2014 年 12 月 23 日
編集済み: per isakson
2015 年 1 月 1 日
 採用された回答

There are two alternatives
  • Use Matlab's high level functions to write the real and the imaginary part to separate datasets
  • Create a compound datatype, which requires Matlab's low level hdf support. The documentation of the low level functions is sparse. See Example 9. A compound datatype for complex numbers
There should be no problems to read either with any languages, which have HDF5-support.
"something out there" &nbsp I don't think so, however, see

  0 件のコメント

サインイン to comment.



Translated by