Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Matlab can support List<List<Integer>> llist =new ArrayList<List<Integer>>();

Subject: Matlab can support List<List<Integer>> llist =new ArrayList<List<Integer>>();

From: SAMEER ahamed

Date: 13 Mar, 2014 02:00:09

Message: 1 of 1

Hi,

     I am new for mat-lab , i want to use Java generic class in mat-lab myList =java.util.ArrayList<List<Integer>>(); instead of mat-lab myList = java.util.ArrayList();

my sample example code :

myList = java.util.ArrayList();
     while(1)
    matrix =[co-ordinatate_x;co-ordinatate_y;co-ordinatate_z;co-ordinatate_xy;co-ordinatate_yy;co-ordinatate_zx;co-ordinatate_zy;co-ordinatate_zz]; %1-by-8 various values
   for k=1:length(matrix)
    list.add(java.lang.Integer.valueOf(matrix(k)));
    end
      end
I would like expected result like : [[264, 171, 212, 173, 238, 152, 238, 198],
[264, 171, 212, 173, 238, 152, 238, 198]] etc. please let me know where i have done mistaken ?

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us