Mex Unknown Function Definition

10 vues (au cours des 30 derniers jours)
Charles Ross
Charles Ross le 7 Fév 2022
Based on https://antennalab.upc.edu/en/acasolver-software
I have four files: ACA.m, user_impedance.m, user_impedance.c, and user_impedance.mexw64. Within user_impedance.m, the only computation is a function
Z = oper_3d_2_free(m,n,[ ],OG_data,field,k,eta,Rint_s,Ranal_s,Rint_f,corr_solid,flag);
that is not defined in user_impedance.c. I want ultimately to convert another function that calls user_impedance.m, ACA.m to a cpp source file. Using codgen results in an error where oper_3d_2_free is not defined whenever user_impedance.m is called.
Alternatively, if I could call the C version of oper_3d_2_free and get the returned impedance, I could complete the task.

Réponse acceptée

Benjamin Thompson
Benjamin Thompson le 8 Fév 2022
Can you write a C function with your desired name and argument list, and pass that function to mex? See the documentation on mex, there are examples and you can probably easily change yprime.c so it does what you want.
  1 commentaire
Benjamin Thompson
Benjamin Thompson le 10 Fév 2022
If your question has been answered please mark it as accepted.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by