Code cant locate java code files

I am currently using this package (https://www.mathworks.com/matlabcentral/fileexchange/52210-vectorial-ray-based-diffraction-integral-vrbdi?s_tid=prof_contriblnk) which I unziped and is my current directory in matlab. I added a path to the java file with the addpath command, but am still getting the same errors as the other person who commented on the orginal posting. Below is a screenshot as well as the error messages, if you anyone has a suggestion please let me know. Thanks in advance.
Error using javaaddpath (line 48)
Too many input arguments.
Error in pctRunOnAll (line 50)
evalin('base', command);
Error in VRBDIpw (line 175)
eval(['pctRunOnAll javaaddpath ' folder '/java']);
Error in Example1 (line 90)
[E2x,E2y,E2z,H2x,H2y,H2z,I2,Xg,Yg,Zg,N2]=VRBDIpw(K,E,System,...

1 个评论

Hi, probably you have found a solution to your problem. I have just replaced
eval(['pctRunOnAll javaaddpath ' folder '/java']);
with
eval(['pctRunOnAll javaaddpath(pwd)' ]);
for both VRDI and VDI and copy paste all the files inside java folder to current project directory.It seems like working for me.

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Call Java from MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by