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

1 visualizzazione (ultimi 30 giorni)
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] .

Risposte (0)

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

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

Start Hunting!

Translated by