필터 지우기
필터 지우기

Output setted from c-mex is sometime right, sometime null

조회 수: 1 (최근 30일)
Marcus
Marcus 2012년 8월 9일
Hi all! I stop my simulation with Stop block, setting from C-mex file the respective output to 1 when a condition is verified. If this condition is valid, before to stop, I set a few values in a second output vector that I want to read externally in a M-file. I don't know why, but some times it give me in output the right values, other times it give me a null output! This problem has to do with the ode solver I use (ode45)?
Thanks in advance!

채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 8월 9일
More likely that there is something wrong with the way your S-function is written. Could you post your mdlOutputs implementation?
  댓글 수: 8
Marcus
Marcus 2012년 8월 11일
편집: Marcus 2012년 8월 11일
Indexing is not the problem (yes is a typo). I don't know what to think :/
Kaustubha Govind
Kaustubha Govind 2012년 8월 13일
Strange. I'm out of ideas - perhaps you should send your S-function to MathWorks Tech Support so they can investigate it more closely?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by