MATLAB: Convert Fuzzy model .fis file to Java package using Matlab Bulider JA

convert .fis to javafisfuzzyjavamatlabbuilder ja

My Fuzzy model "myfuztest.fis" is working perfectly with 4 input and one output in fuzzy editor FIS. Also it is working fine when I run as .m file in Matlab.But The following error appears when I convert it into java package with the help of deploytool (Matlab builder JA). The build process is ok without error however when I run built application (that created by convertion) in Netbeans it gives following error
—————————————————————————"
*{Error using readfis (line 52)
No such file or directory*
Error in myfuztest2 (line 2)
}
... Matlab M-code Stack Trace ...
file C:\Users\jian\AppData\Local\Temp\jian\mcrCache7.17\Myfuzt0\toolbox\fuzzy\fuzzy\readfis.m, name readfis, line 52.
file C:\Users\jian\AppData\Local\Temp\jian\mcrCache7.17\Myfuzt0\Myfuztest\myfuztest2.m, name myfuztest2, line 2.
com.mathworks.toolbox.javabuilder.MWException: Error using readfis (line 52)
No such file or directory
at com.mathworks.toolbox.javabuilder.internal.MWMCR.mclFeval(Native Method)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.access$600(MWMCR.java:23)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$6.mclFeval(MWMCR.java:833)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$5.invoke(MWMCR.java:731)
at $Proxy0.mclFeval(Unknown Source)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.invoke(MWMCR.java:406)
at Myfuztest.Myfuztestc.myfuztest2(Myfuztestc.java:197)
at Myfuztestd.main(Myfuztestd.java:25)
BUILD SUCCESSFUL (total time: 5 seconds)"
———————————————————————–"
The Matlab code is as follows
function out = myfuztest2 (x)------%function get four input [0.1 150 3 13.9]
fismat =readfis('myfuztest.fis');-------- %read fuzzy file
out=evalfis (x,fismat);---- %store result after defuzzificztion
I have converted one Matlab tutorial matrix example (makesqr.m) file in java package and it is working fine. but the usage of .fis file in matlab gives error in conversion to java package . Any help would highly be appreciated.

Best Answer

Thank you very much for your kind answer, with the help of your excellent tips, I have fixed the error and now my fuzzy model that I have created in matlab is working fine in java netbeans.
Actually my .fis file was not shipped to java package at the time of deploytool running. I have just attached my .fis file with shared resource and helper file that is underneath of where we attach the .m file.
Once again thank you and appreciate your help.
Related Question