diff --git a/dlib/matlab/README.txt b/dlib/matlab/README.txt index 7a0b394ad..d571e2330 100644 --- a/dlib/matlab/README.txt +++ b/dlib/matlab/README.txt @@ -1,6 +1,6 @@ This folder contains a set of tools which make it easy to create MATLAB mex functions. To understand how they work, you should read the -example_mex_function.cpp and example_mex_callback.cpp examples. +example_mex_function.cpp, example_mex_struct.cpp, and example_mex_callback.cpp examples. To compile them, you can use CMake. In particular, from this folder execute these commands: diff --git a/dlib/matlab/example.m b/dlib/matlab/example.m index bbe83c6f8..8ed47346b 100644 --- a/dlib/matlab/example.m +++ b/dlib/matlab/example.m @@ -1,4 +1,4 @@ -% This example calls the two mex functions defined in this folder. As you +% This example calls the three mex functions defined in this folder. As you % can see, you call them just like you would normal MATLAB functions. x = magic(3) @@ -8,3 +8,9 @@ y = 2*magic(3) z = example_mex_callback(x, @(a)a+a) + +input = {} +input.val = 2 +input.stuff = 'some string' +output = example_mex_struct(input) +