Matlab coder and tested mex file

조회 수: 1 (최근 30일)
Maria
Maria 2020년 10월 20일
댓글: Maria 2020년 11월 23일
Hi,
I am trying using Matlab coder to generate a mex file. I get an error during "run mex file with test function".
The strange thing is that the error refers to a function and to a specific line to that function where, however, I have nothing. I tried to delete all files, the prj, running it again, moving lines in the function, but it just get stuck. I checked whether I have duplicates of the function, but nothing. Moreover, this line is in an else branch that is not even executed in the testing function. Specifically, I get the error
Error using integral_Ihp1_I11_subs_TOL_vectorized (line 184)
Sizes mismatch: [0][270] ~= [1][269].
I have no idea where the 270 comes from either. And, at line 184 of that function, I have nothing. Do you think that it can be a bug?! What else am I missing that I should check?
  댓글 수: 2
Prasanth
Prasanth 2020년 11월 23일
It seems like you are generating code for variable-sized arrays. The following link has limitations while generating code for variable-sized arrays and possible workarounds.
Could you check if any of the scenarios matches your case?
Maria
Maria 2020년 11월 23일
Hi Prasanth,
I actually sent a help request directly to Mathworks and they helped me out. It was rather a problem of where I placed a specific part of the code in the loop I had. I could fix it, for now, but I will gladly look into the link that you sent me because now I have a problem with arrays that can skrink without problems but cannot dinamically expand.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Testing Frameworks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by