Reputation: 15
I have a python function that I need to call in MATLAB that imports functions from scipy.signal.
However when I attempt to call the function in MATLAB I get an error
Error using arpack><module> (line 45)
Python Error: ImportError: DLL load failed: The specified procedure could not be found.
Error in __init__><module> (line 22)
from .arpack import *
Error in __init__><module> (line 11)
from .arpack import *
Error in __init__><module> (line 117)
from .eigen import *
Error in _minimize><module> (line 21)
from scipy.sparse.linalg import LinearOperator
Error in __init__><module> (line 271)
from ._minimize import *
Error in filter_design><module> (line 18)
from scipy import special, optimize, fftpack
Error in __init__><module> (line 321)
from .filter_design import *
Error in <frozen importlib>_call_with_frames_removed (line 219)
Error in <frozen importlib>exec_module (line 728)
Error in <frozen importlib>_load_unlocked (line 677)
Error in <frozen importlib>_find_and_load_unlocked (line 967)
Error in <frozen importlib>_find_and_load (line 983)
Error in <frozen importlib>_gcd_import (line 1006)
Error in __init__>import_module (line 127)
return _bootstrap._gcd_import(name[level:], package, level)
This occurs when both calling the python function from MATLAB or simply by typing
py.importlib.import_module('scipy.signal')
in the MATLAB command line. Attempting to call a scipy.signal function directly
py.scipy.signal.find_peaks()
throws the error
Undefined variable "py" or class "py.scipy.signal.find_peaks".
Importing (or calling) numpy, scipy, or numpy submodules on the other hand are all successful.
Is the scipy.signal submodule not able to be called in MATLAB, or have I missed something?
Upvotes: 1
Views: 322
Reputation: 311
You should be able to call scipy.signal functions using this syntax e.g.
myButterFilt = py.scipy.signal.butter(1,0.25)
Upvotes: 1