<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: Creating HDF5 input files in Octave</title>
		<link>http://www.k-wave.org/forum/topic/creating-hdf5-input-files-in-octave</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:28:24 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/creating-hdf5-input-files-in-octave" rel="self" type="application/rss+xml" />

		<item>
			<title>Jiri Jaros on "Creating HDF5 input files in Octave"</title>
			<link>http://www.k-wave.org/forum/topic/creating-hdf5-input-files-in-octave#post-6657</link>
			<pubDate>Wed, 21 Nov 2018 14:44:35 +0000</pubDate>
			<dc:creator>Jiri Jaros</dc:creator>
			<guid isPermaLink="false">6657@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks jbishop for sorting this out.&#60;/p&#62;
&#60;p&#62;One thing to mention here. HDF5 versions 1.8.x and 1.10.x are not compatible (has a different data layout under some circumstances). In the actual version of k-Wave, we do not use any features from HDF5 1.10.x, thus it should be possible to read files created with HDF 1.10.x using 1.8.x. However, this may change in the future. The reason I mention it is that Matlab only supports HDF5 1.8.x.&#60;/p&#62;
&#60;p&#62;Best,&#60;br /&#62;
Jiri
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jbishop on "Creating HDF5 input files in Octave"</title>
			<link>http://www.k-wave.org/forum/topic/creating-hdf5-input-files-in-octave#post-6655</link>
			<pubDate>Sat, 17 Nov 2018 18:57:04 +0000</pubDate>
			<dc:creator>jbishop</dc:creator>
			<guid isPermaLink="false">6655@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Forgot to mention, but with the local install  of hdf5, had to add this to the hdf5oct makefile as well:&#60;/p&#62;
&#60;p&#62;-I/usr/local/hdf5/include -L/usr/local/hdf5/lib -L/usr/local/hdf5/lib/libhdf5.a&#60;/p&#62;
&#60;p&#62;and there was a message about -fPIC flag so I added that too.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jbishop on "Creating HDF5 input files in Octave"</title>
			<link>http://www.k-wave.org/forum/topic/creating-hdf5-input-files-in-octave#post-6654</link>
			<pubDate>Sat, 17 Nov 2018 13:41:35 +0000</pubDate>
			<dc:creator>jbishop</dc:creator>
			<guid isPermaLink="false">6654@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;There is now a package hdf5oct available from github that provides the necessary hdf5 read/write functions for octave. There were a few steps to get it to work:&#60;/p&#62;
&#60;p&#62;I have octave 4.4.1 and hdf5 1.10.4 installed. I installed the hdf5 from source, so I specified the location explicitly for building octave ./configure --with-hdf5-libdir='/usr/local/hdf5/lib' --with-hdf5-includedir='/usr/local/hdf5/include'&#60;/p&#62;
&#60;p&#62;The reason the latest octave 4.4.1 was needed is it has support for handle classes, which the octave version available by dpkg/apt-get may or may not.&#60;/p&#62;
&#60;p&#62;hdf5oct had a couple of slight problems. The github code from 4 years ago somehow does not pick up the HDF libraries. There is a modified version of the h5read.cc source here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://raw.githubusercontent.com/tmullins/hdf5oct/2c4b1c412f67cc8b11923054756e001c4161db39/h5read.cc&#34; rel=&#34;nofollow&#34;&#62;https://raw.githubusercontent.com/tmullins/hdf5oct/2c4b1c412f67cc8b11923054756e001c4161db39/h5read.cc&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;which is fixed for this problem. Then a second issue at line 979 of that modified h5read.cc, i edited:&#60;br /&#62;
979 int rank = ov_data.dims ().numel ();&#60;br /&#62;
 to become:&#60;br /&#62;
979 int rank = ov_data.ndims (); &#60;/p&#62;
&#60;p&#62;after that there was only one other edit, at getComputerInfo.m line 54 system_dependent is a matlab command, replace with uname or computer in octave, it is only a text field so anything will do. &#60;/p&#62;
&#60;p&#62;At this point the c++ binaries are running in the example_us_beam_patterns.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Creating HDF5 input files in Octave"</title>
			<link>http://www.k-wave.org/forum/topic/creating-hdf5-input-files-in-octave#post-3910</link>
			<pubDate>Tue, 03 Sep 2013 19:26:52 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3910@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Erik,&#60;/p&#62;
&#60;p&#62;The HDF5 files needed for the C++ code are required to be in a specific format, with particular field names and attributes for each variable (the specifics are detailed in the k-Wave manual). Unfortunately, I don't think using the save command in Octave will allow you this flexibility as it doesn't give you access to the different high-level functions in the HDF5 library.&#60;/p&#62;
&#60;p&#62;If you are comfortable programming in C/C++, one possibility would be to write a mex file that takes your data from MATLAB and writes it to disk using the HDF5 API.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>styxed on "Creating HDF5 input files in Octave"</title>
			<link>http://www.k-wave.org/forum/topic/creating-hdf5-input-files-in-octave#post-3909</link>
			<pubDate>Tue, 03 Sep 2013 15:25:58 +0000</pubDate>
			<dc:creator>styxed</dc:creator>
			<guid isPermaLink="false">3909@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I don't have Matlab and have been doing k-Wave simulations with Octave without any problems. Now I need to create the HDF5 file for running C++ but Octave only seems to support HDF5 via the &#60;code&#62;save&#60;/code&#62; command: &#60;a href=&#34;http://www.gnu.org/software/octave/doc/interpreter/Simple-File-I_002fO.html&#34; rel=&#34;nofollow&#34;&#62;http://www.gnu.org/software/octave/doc/interpreter/Simple-File-I_002fO.html&#60;/a&#62;&#60;br /&#62;
Is it possible to change the code in &#60;code&#62;writeMatrix.m&#60;/code&#62; in such a way that I can make the HDF5 file with the &#60;code&#62;save&#60;/code&#62; command and the &#60;code&#62;-hdf5&#60;/code&#62; option? I am asking because I don't seem to be able to set the attributes of the matrices nor the holder properties manually with the &#60;code&#62;save&#60;/code&#62; command.&#60;/p&#62;
&#60;p&#62;Thanks for your help.&#60;/p&#62;
&#60;p&#62;Erik
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
