change order called function in the block s-function

조회 수: 4 (최근 30일)
Johanna Carolina Salazar
Johanna Carolina Salazar 2013년 9월 19일
Can be possible to change the way that the block s-function calls mdlInitializeSizes mdlUpdates mdlOutputs? I known that first the block is initialized, and after that comes mdlOutputs and Finally mdlupdates, but it produce a unit delay in my signal. Could I changed it, so that the sequence will be initialized, then mdlupdate and finally mdlOutputs. Without a unit delay?¿

답변 (2개)

Kaustubha Govind
Kaustubha Govind 2013년 9월 19일
No, it is not possible to change the order in which the Simulink Engine calls S-function methods. I'm not sure if I understand your question correctly, but if you don't need a delay, then why implement an mdlUpdate method at all? It looks like you can combine all your calculations in mdlOutputs itself. If this answer doesn't make sense, it might help us understand your question better if you can provide more details about your algorithm.
  댓글 수: 1
Johanna Carolina Salazar
Johanna Carolina Salazar 2013년 9월 19일
It could be possible combine all my calculations in mdlOutputs itself. The main problem with that is that I have inside a fmincon. So when i call this function, it starts to compute the optimal solution, once the solution is founded, instead of continuos, start again to compute the optimal.

댓글을 달려면 로그인하십시오.


Johanna Carolina Salazar
Johanna Carolina Salazar 2013년 9월 19일
It could be possible combine all my calculations in mdlOutputs itself. The main problem with that is that I have inside a fmincon. So when i call this function, it starts to compute the optimal solution, once the solution is founded, instead of continuos, start again to compute the optimal.

카테고리

Help CenterFile Exchange에서 Manual Performance Optimization에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by