0

I've set up a Jupyter Notebook to run MATLAB via the matlab_kernel, following the instructions on this GitHub page. Basic functions like peaks or plot(...) work with no issue on Jupyter.

However, I got an error when executing a function that calls medfilt1.m in the signal toolbox (..\MATLAB\R2020a\toolbox\signal\signal\medfilt1.m):

Invalid MEX-file 'C:\Users\...\mvmedian.mexw64': The specified procedure could not be found.

I noticed that medfilt1.m calls mvmedian() function (y = mvmedian(x,n,dim,'central',missing,padding)) and mvmedian.mexw64 file does exist in ..\MATLAB\R2020a\toolbox\signal\signal\private.

I tried to check the dependencies of mvmedian.mexw64 using Dependency Walker by following the steps explained in here and MATLAB Answers. There are so many dependencies (.dll files), and I am not sure if I need to download all of them (from DLL-FILES.COM) and add their path to Jupyter Notebook...

The function runs without any issue when I run the same script directly in MATLAB. Why does it give an error when I run it on Jupyter Notebook? Is this something to do with matlab_kernel? How can I resolve this issue?

Thanks,


My environment is:

64-bit Windows 10 (x64-based processor)
MATLAB 2023a
VS Code 1.81.0
Python 3.9.17
alpha
  • 173
  • 1
  • 2
  • 12
  • Can you run the function from within MATLAB? If so, then yes, it’s related to `matlab_kernel`. You should not need to download anything. If you installed MATLAB and the Signal Processing Toolbox, you should have everything you need to run those functions. But the kernel might not be able to find some of those installed libraries. – Cris Luengo Aug 06 '23 at 22:57
  • 1
    A note about downloading random DLLs from a random website: don’t. DLLs are executable, which means they can contain all sorts of code that does nasty things to your machine. Don’t ever install software that you don’t know where it comes from. Only download and install software through official channels from reputable companies. – Cris Luengo Aug 06 '23 at 23:00

0 Answers0