How to Pass Looping Array Cell Values in Java Method List
1 次查看(过去 30 天)
显示 更早的评论
Hi, I am new for matlab ,now i want to pass looping values to java method below i have tried my code , but i got error in matlab reference to be cleared variable ?please let me know where i have made mistake ? Below my Java Code :
if true
% code
public static void recordSample(List<Integer> points){
recordedSample.getMatrix().add(points);//Sample class object Getter Method
}
end
Below I have Matlab Code :
if true
% code
for i=1:20
matrix{1:i}=[33,22,6544,3335,23,544,5,2] %1-by-8 Matrix values
clear java;
import edu.lipreading.*;%Package
training = TrainingPanel;%Java Class
javaMethod('recordSample',training,matrix{1:i}); %Error reference to be cleared variable
end
end
3 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 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!