![]() |
||
---|---|---|
.. | ||
source | ||
test-data | ||
CMakeLists.txt | ||
README.md | ||
copy_deps.py | ||
test.ps1 |
README.md
A MAT File Parser Based on MATLAB APIs
When the version of MAT file update to v7.3, and the MathWorks closed source the file format, there are no libraries that can parse files in this format anymore, so you have to operate the MAT file via m script
or the C/C++ APIs.
Configuration
Configure the user's MATLAB installation environment.
On Linux
# For bash
echo "export MATLAB_ROOT=/usr/local/MATLAB/R2018b" >> ~/.bashrc
source ~/.bashrc
# For zsh
echo "export MATLAB_ROOT=/usr/local/MATLAB/R2018b" >> ~/.zshrc
source ~/.zshrc
On Windows
-
Right-click on
Computer
icon. -
Select
Properties
in the context menu, thenAdvanced system settings
, on theAdvanced
tab, clickEnvironment Variables
. -
Click
New
to create a new environment variable namedMATLAB_ROOT
, the value is the installation root directory of your MATLAB. -
Restart your terminal, then test the setting.
echo %MATLAB_ROOT%
NOTE: On Windows, here we assume that you have installed the MinGW-w64 with correct version and append the required environment variables correctly also.
Here is what we used: MinGW-w64, CMake
The append the environment variables:
MW_MINGW64_LOC
points to the root directory of your MinGW-w64 after extraction.Append
%MW_MINGW64_LOC%\bin
into thePATH
Append
%MATLAB_ROOT%\bin
into thePATH
also, so that you can runmex
directly without change directory to MATLAB's installation directory.Restart your terminal.
In the terminal, run the following commands to setup the compilers for MATLAB:
mex -setup C mex -setup C++
Build
On Linux
# Just run the shell script in the root directory of this project
admake build
cp Debug/dgns test-data
On Windows
# Just run the shell script in the root directory of this project
admake build
cp Debug/dgns.exe test-data
copy_deps.py
cd test-data
dgns.exe EgoSignal.mat