필터 지우기
필터 지우기

Get Interpreted Function error line from sim command

조회 수: 2 (최근 30일)
Lore DT
Lore DT 2019년 9월 30일
답변: Lore DT 2019년 10월 1일
Hi! I’ve already searched for possible solutions to my problem, but I didn’t find one that seems to fit to my situation. It’s quite complex, I try to explain it in a more general way.
I have a Simulink scheme with 2 blocks in it, let’s call them BLOCK_A and BLOCK_B. These 2 blocks are Interpreted Matlab Functions: BLOCK_A communicate its outputs to BLOCK_B and they respectively contain 2 very long functions that must be evaluated (always the same) for each (discrete) time of simulation.
It’s convenient for me to run this Simulink scheme from a script, with the sim command. Here is what happens: when I run it, the scheme runs correctly without any problem for a while (approximately for the first 5 seconds of the whole simulation time). After that, probably due to a modification of vectors' dimensions inside the function of BLOCK_B, it returns to me an error message.
And here is the problem I’d like to solve: the line returned by this error message is NOT the line in which the error really occurs (i.e. inside the function evaluated by BLOCK_B), but it’s always the line of the script file in which I use the sim command. So: how can I get what is the number of line inside the function (of BLOCK_B) in which the errror occurs, after some iterations?
Hope I explained the question in a comprehensible way. Thanks in advance for your help.
  댓글 수: 2
Walter Roberson
Walter Roberson 2019년 10월 1일
Interpreted MATLAB Function Blocks only have one line of MATLAB code.
Lore DT
Lore DT 2019년 10월 1일
Sorry, can you explain me what do you mean with "one line of MATLAB code"? I use the Interpreted MATLAB Function block inside Simulink and this block calls for a MATLAB function. This function has many lines of code in it, used to obtain some results.

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

답변 (1개)

Lore DT
Lore DT 2019년 10월 1일
Ok, probably I found a possible SOLUTION, someone else asked for a very similar problem.
Sorry if I asked for a problem already solved, I didn't find it before...

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by