Simulink: how to import external jar file
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Paolo
el 1 de Oct. de 2021
Comentada: Paolo
el 7 de Oct. de 2021
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 comentarios
Respuesta aceptada
Salini S Nair
el 4 de Oct. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Functions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!