Simulink: how to import external jar file
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I am using the MATLAB fcn block in Simulink for some custom function I've in Matlab. My question is the following:
is it possible to use the same Matlab Fcn block, to create a custom matlab function which uses methods available in an external jar file; for example, in matlab i can import the package available in a jar file and uses the classes and methods available here. Is it possible to do with Simulink..if yes, can you tell me how to do it?
thank you
best regards
Paolo
0 commentaires
Réponse acceptée
Salini S Nair
le 4 Oct 2021
I understand that you want to import a JAR file to Simulink and use the methods available in it. The following MATLAB answer explains how you can achieve this functionality using the Level 2 MATLAB S-function block in Simulink: Is it possible to call JAVA code from within Simulink? - MATLAB Answers - MATLAB Central (mathworks.com). It is not advisable to perform this using the Embedded MATLAB function block since it does not support the use of ‘import’ function as mentioned in the above link.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Simulink Functions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!