% % @file h5Complex_ll.m % % @brief % % @copyright % Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne) % SPC (Swiss Plasma Center) % % spclibs is free software: you can redistribute it and/or modify it under % the terms of the GNU Lesser General Public License as published by the Free % Software Foundation, either version 3 of the License, or (at your option) % any later version. % % spclibs is distributed in the hope that it will be useful, but WITHOUT ANY % WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS % FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. % % You should have received a copy of the GNU Lesser General Public License % along with this program. If not, see . % % @authors % (in alphabetical order) % @author Trach-Minh Tran % function z = h5Complex_ll(file, dset) fid=H5F.open(file, 'H5F_ACC_RDONLY', 'H5P_DEFAULT'); dset_id=H5D.open(fid, dset); dxpl = 'H5P_DEFAULT'; data = H5D.read(dset_id,'H5ML_DEFAULT','H5S_ALL','H5S_ALL', dxpl); z = complex(data.real, data.imaginary); H5D.close(dset_id); H5F.close(fid);