matlabruntime-errorlibrariesundefined-function

Demo code from the MVGC Toolbox documentation not working on R2018b


I need help in using the MVGC (Multivariate Granger Causality) Toolbox for MATLAB.

I tried to execute the demo code which is provided here, but the code is not executing properly, since many of the functions (e.g rng_seed(), var5_test()) do not exist in MATLAB.

I searched for those in the MATLAB support but was unable to find any information regarding them.


Solution

  • The short answer is: it's likely not related to the specific MATLAB version, and you should just include the toolbox in your search path.

    The functions aren't identified because they're not part of the MATLAB installation, but are rather included in the toolbox itself (which you should download manually). Then, for them to be recognized, download the toolbox, extract it, and add the contents of the toolbox (including subfolders) to your MATLAB path.

    Specifically regarding the functions you mentioned, they're found here:

    var5_test -> \mvgc_v1.0\demo\var5_test.m
    rng_seed -> \mvgc_v1.0\utils\rng_seed.m