Error during sample generation of java pacakage using library compiler
显示 更早的评论
I am trying to use the library compiler to generate a java package for matlab functions. And I select all the functions with an existing sample.
But I am facing the below error in the PackagingLog.html and no files are generated in xxxx/for_redistribution_files_only\samples.
Packaging...
Failed to generate sample for "xxxx\sample script.m": All inputs must be assigned to a variable.
回答(1 个)
Kojiro Saito
2021-7-8
Please confirm that all inputs are defined in the sample script.
For example,
addmatrix.m (to be compiled as Java package)
function out = addmatrix(in1, in2)
out = in1 + in2;
end
addmatrixWithClearSample2.m (sample m file which calls addmatrix) should contain all inputs variables (in1 and in2, in this case).
in1 = 0; % Initialize in1 here
in2 = 0; % Initialize in2 here
out = addmatrix(in1, in2);
4 个评论
CHV
2021-7-8
Kojiro Saito
2021-7-8
How about trying "Create New Sample" and compare it to the existing sample m file?
CHV
2021-7-8
Kojiro Saito
2021-7-8
Sounds great!
类别
在 帮助中心 和 File Exchange 中查找有关 Deploy to Java Applications Using MWArray Data API 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!