Undefined function 'grayto16' error matlab - java

8 vues (au cours des 30 derniers jours)
luc
luc le 12 Sep 2013
Hi, I have deployed a list of .m files in matlab to generate a Java class/package. I have imported the generated jar file and matlab JA Builder jar files into a Java project. When I run the java code which calls .m files I am getting the following error:
... Matlab M-code Stack Trace ...
file C:\MCRCache\mcrCache8.1\packag0\toolbox\images\images\im2uint16.m, name im2uint16, line 62. com.mathworks.toolbox.javabuilder.MWException: Undefined function 'grayto16' for input arguments of type 'double'
grayto16 is not a .m file to include in the jar file. Ideas or suggestions please... thank you!

Réponse acceptée

Image Analyst
Image Analyst le 12 Sep 2013
Just define your own then
function out=grayto16(in)
out=uint16(in);
  1 commentaire
luc
luc le 14 Sep 2013
Added grayto16 function to jar and it works! you made my job easy. Thank you :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by