Undefined function 'grayto16' error matlab - java

조회 수: 7 (최근 30일)
luc
luc 2013년 9월 12일
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!

채택된 답변

Image Analyst
Image Analyst 2013년 9월 12일
Just define your own then
function out=grayto16(in)
out=uint16(in);
  댓글 수: 1
luc
luc 2013년 9월 14일
Added grayto16 function to jar and it works! you made my job easy. Thank you :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by