Slow simulation due to extrinsic function.

3 views (last 30 days)
JACOB ETOJU
JACOB ETOJU on 14 Jan 2023
Edited: JACOB ETOJU on 14 Jan 2023
Hello;
Greetings.
I am kindly seeking a solution to my problem of slow simulation in simulink. I have a simulink model consisiting of a created block (PVT) built based on a MATLAB function that calls an extrinsic function (PVT.m) on each execution. My probable solution would be to eliminate the extrinsic function and have it in one MATLAB function. However, some inbuilt functions (like vpasolve and fsolve) that I call to solve the variables can only be accomodated in the extrinsic function since they are not supportd for code generation. That is why I had to create an extrinsic function that is called on each execution. Therefore, any idea or suggestion is highly welcome to solve the problem. Thank you.
Attached is the model and extrinsic function.

Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!