필터 지우기
필터 지우기

unable to generate code with 'collisionMesh' function.

조회 수: 21 (최근 30일)
Net Fre
Net Fre 2024년 6월 23일 13:35
답변: Matan Silver 2024년 6월 27일 20:18
Hi.
I am trying to create a .mex file using the coder app. The function I am trying to convert uses the collisionMesh and checkcollision functions.
I have already did it succesfully with another function using the exact same functions, but with a different structure. For some reason, now I am getting an error saying:
'collisionMesh' is not supported as an I/O argument to entry point function as it is a handle class
and to be honest I have no idea what that means and why it hapenned, and I'll be glad for any suggestions.
Thanks!
  댓글 수: 2
Walter Roberson
Walter Roberson 2024년 6월 24일 3:18
My interpretation is that you are trying to compile a function, and the function has an arguements block, and one of the parameters is defined using the name collisionMesh and the associated arguement type for that parameter is a handle class type.
I do not know why handle class type parameters are not permitted.
Net Fre
Net Fre 2024년 6월 24일 10:45
Hi Walter. Thank you for your respond.
The function didn't have an argument block, but the solution was close - one of the inputs was a cell array, where each cell contained a struct, and one of the fields was created with the 'collisionMesh' function. Removing that field (I found a way to avoid using it, mightv'e even made the code better) solved the problem.
Thanks again!

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

채택된 답변

Matan Silver
Matan Silver 2024년 6월 27일 20:18
Hi Net,
It seems like you've found the answer. Handle classes are unsupported for entrypoint I/O, and by removing the handle class from the struct contained in the cell array, you can continue generating code for your entrypoint. Feel free to reach back out if you have any more questions.
Matan

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by