Created
April 2, 2016 02:33
-
-
Save dmyersturnbull/6bf12be28e7f815bd3664d850094d664 to your computer and use it in GitHub Desktop.
Convert a proprietary .mat file to a more modern HDF5-compatible version 7 .mat file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MAT | |
using Lumberjack | |
@doc """ | |
Using MAT.jl, converts any MATLAB version >=5 .mat file to an HDF5-compatible MATLAB version 7 .mat file. | |
Warns if the file already exists. | |
""" -> | |
function convert_to_matlab7(input_file:: AbstractString, output_file:: AbstractString) | |
if ispath(output_file) | |
warn("File $output_file already exists") | |
else | |
data = matread(input_file) | |
matwrite(output_file, data) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment