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
Post a Comment