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!