I am trying to call matlab functions from java.
I am using the deploytool which creates a .jar file and when I execute it I get alot of errors saying
com.mathworks.toolbox.javabuilder.MWException
Error using ==> eval
undefined function or variable x
in the matlab code I have an .mfile that has a function for instance
Basically I am getting alot of errors saying undefined varible or function x.
I know at the matlab interpreter I would first have to
declare x
then call the function average(x) with it.
How would I resolve these issues in my deploytool built jar file.
Thanks for any help
I believe this would take somebody experienced in matlab to answer.
I am using the deploytool which creates a .jar file and when I execute it I get alot of errors saying
com.mathworks.toolbox.javabuilder.MWException
Error using ==> eval
undefined function or variable x
in the matlab code I have an .mfile that has a function for instance
Rich (BB code):
function y = average(x)
% AVERAGE Mean of vector elements.
% AVERAGE(X), where X is a vector, is the mean of vector
% elements. Nonvector input results in an error.
[m,n] = size(x);
if (~((m == 1) | (n == 1)) | (m == 1 & n == 1))
error('Input must be a vector')
end
I know at the matlab interpreter I would first have to
declare x
then call the function average(x) with it.
How would I resolve these issues in my deploytool built jar file.
Thanks for any help
I believe this would take somebody experienced in matlab to answer.