Error while generating code using griddedinterpolate in matlab function
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sushma n
il 16 Set 2020
Modificato: Image Analyst
il 16 Mag 2022
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/361612/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/361615/image.png)
2 Commenti
KSSV
il 16 Set 2020
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.
Risposta accettata
Ameer Hamza
il 16 Set 2020
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 Commenti
Ameer Hamza
il 17 Set 2020
interp2 is supported. The complete list is available here: https://www.mathworks.com/help/referencelist.html?type=function&capability=codegen
James
il 16 Mag 2022
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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Coder in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!