필터 지우기
필터 지우기

Error:unexpected MATLAB operator ArrayList<​List<Integ​er>>()?

조회 수: 2 (최근 30일)
SAMEER ahamed
SAMEER ahamed 2014년 3월 12일
편집: Walter Roberson 2014년 3월 12일
Hi,
On Mat-lab Part Side can i have use generic class:
I want to add array list of list integer in mat-lab ? can i have used like java Array List of List?
Can I have used this Java Array List Syntax :
List<List<Integer>> last=new ArrayList<List<Integer>>();
Example :
list = java.util.ArrayList();
while(1)
matrix =[22,3,2,2,2,2,2,222]; % I have various values like 1-by-8 vector matrix
for k=1:length(matrix)
list.add(java.lang.Integer.valueOf(matrix(k)));end
end
I got result like
[69, 29, 12, 29, 48, 9, 48, 42, 117, 36, 16, 36, 69, 9, 69, 89, 153, 47, 38, 47, 85, 1, 85, 80]etc..
But i would like expected result like
[69, 29, 12, 29, 48, 9, 48, 42],[117, 36, 16, 36, 69, 9, 69, 89],[153, 47, 38, 47, 85, 1, 85, 80] .

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by