Hello,
you can convert your Matlab files to Acoular readable .H5 files in python. For files until matlab file version 7 use the
scipy.io package, for matlab file version 7.3 the pytables package. A minimal example for both version is shown below:
#import
import tables
import numpy
from
scipy.io import loadmat ,savemat
#insert working folder and data
folder='./Data/' #that contains the matlab data
filename='three_sources.h5'
N_channels = 64 #microphone channels
fs= 51200.0 #sample frequency
###################################
#matlab until 7.0 with scipy loadmat
matfile7 = loadmat(folder+'three_sourcesv7.mat')
tmp = matfile7['ans']
data_matlab7= numpy.zeros(tmp.shape, dtype='float32')
data_matlab7[:,:] = tmp
savename = 'acoular_from_matlab_7_'+filename
#save_to acoular h5 format
acoularh5 = tables.open_file(folder+savename, mode = "w", title = filename)
acoularh5.create_earray('/','time_data', atom=None, title='', filters=None, expectedrows=100000, chunkshape=[256,64], \
byteorder=None, createparents=False, obj=data_matlab7)
acoularh5.set_node_attr('/time_data','sample_freq', fs)
acoularh5.close()
###################################
#matlab 7.3 is in hdf5
#can be importet with pytables
matfile73 = tables.open_file(folder+'three_sourcesv73.mat', mode = 'r')
tmp=matfile73.get_node("/ans")
read_signals = numpy.zeros(tmp.shape, dtype='float32')
read_signals[:,:] = tmp
#matlab transposes eArrays
data_matlab73 = read_signals.T
savename = 'acoular_from_matlab_73_'+filename
#save_to acoular h5 format
acoularh5 = tables.open_file(folder+savename, mode = "w", title = filename)
acoularh5.create_earray('/','time_data', atom=None, title='', filters=None, expectedrows=100000, chunkshape=[256,64], \
byteorder=None, createparents=False, obj=data_matlab73)
acoularh5.set_node_attr('/time_data','sample_freq', fs)
acoularh5.close()
cheers,
Simon