Borrar filtros
Borrar filtros

Unable to called a function

32 visualizaciones (últimos 30 días)
kim
kim el 15 de Jul. de 2024 a las 18:55
Respondida: Steven Lord el 15 de Jul. de 2024 a las 19:58
I have an Integrators and Deriivatives function, which when I called the integrators, it would said "Unrecognized function or variable 'rk78_mex'.". I have ran this program before but for some reason it is not working now.
  2 comentarios
Cris LaPierre
Cris LaPierre el 15 de Jul. de 2024 a las 19:16
Where is the function rk78_mex located?
  • a local function - check your spelling
  • a function file - is it in your current folder? If not, is it in a folder that has been added to your MATLAB path?
kim
kim el 15 de Jul. de 2024 a las 19:33
The function rk78_mex, is a c file which I am calling to intergrated kinda like ode45. the integrator is apart of another folder which is in my documents which is on my path. it part of a github, my groups has.

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 15 de Jul. de 2024 a las 19:31
You are using a third-party package that implements some of its functionality through mex code. The package is calling upon rk78_mex . However, the system is unable to find a dll named rk78_mex .
You may need to use the mex command to regenerate rk78_mex

Steven Lord
Steven Lord el 15 de Jul. de 2024 a las 19:58
If you're using release R2021b or later, consider using the ode78 function that is part of MATLAB as of that release.
If that is not an option, does the folder containing the rk78_mex MEX file contain an rk78_mex file that has the appropriate extension (as listed by mexext) for your computer's architecture? Often when a MEX-file is not found when a user expects it to be available (perhaps because it works on a colleague's machine) it is because it has not been built for their computer's architecture. A Windows MEX-file (with extension .mexw64) won't run on a Linux machine (which would require a MEX-file compiled for Linux, with the extension .mexa64.)
struct2table(mexext('all'))
ans = 4x2 table
ext arch _____________ ___________ {'mexa64' } {'glnxa64'} {'mexmaca64'} {'maca64' } {'mexmaci64'} {'maci64' } {'mexw64' } {'win64' }
I've seen this commonly in the past few years with older MEX-files that the authors have not built on Apple Silicon.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by