Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
SAMEER ahamed
SAMEER ahamed am 12 Mär. 2014
Bearbeitet: Walter Roberson am 12 Mär. 2014
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] .

Antworten (0)

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by