How to add elements to a C# list from MATLAB? -


i have created list 5 int32 integers in matlab:

gentype = net.genericclass('system.collections.generic.list',...                                                       'system.int32');  arr = net.createarray(gentype, 5) 

now don't know how add elements list.

i tried , failed using:

arr.setvalue(1) arr.setvalue(1,1) arr.setvalue(1,1,1,1) arr(1)=1 

...etc.

try out following code, should started:

list = net.creategeneric('system.collections.generic.list',...   {'system.int32'},100); list.add(5) list.add(6)  = 0:list.count - 1    disp(list.item(i)) end 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -