Error while generating code using griddedinterpolate in matlab function

조회 수: 7 (최근 30일)
Hello all,
I want to generate code of my model which has a matlab function that performs 2D interpolation using griddedIterpolae command.I'm getting thwe below error.I have also attached the snippet of my code inside the matlab function.Could you please help me with this
  댓글 수: 2
KSSV
KSSV 2020년 9월 16일
You can remove the line
volumetric = 0 ;
Any ways this is not the cause for error. What version you are using? Don't attach code as an image snippet. copy paste the code/ error here.
Sushma n
Sushma n 2020년 9월 17일
편집: Image Analyst 2022년 5월 16일
I'm using Matlab 2018b and griddedInterpolant

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

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 9월 16일
griddedInterpolant is still not supported for code generation: https://www.mathworks.com/help/referencelist.html?type=function&capability=codegen&listtype=alpha. You will need to rely on some alternate methods.
  댓글 수: 3
James
James 2022년 5월 16일
So, I've noticed that interp2/interp3 is supported. But if you look inside interp3, it seems like it re-packages your data into a griddedInterpolant object and then uses it. Does anyone know why griddedInterpolant itself isn't supported?
I would like to make the griddedInterpolant object as a persistent variable and just call it as new data goes through the function.

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by