Suppose we had the following array of type System.Int32[] (returned by your C # function):
arr = NET.createArray('System.Int32',5); for i=1:5 arr.Set(i-1, i); end
Now, to convert to a MATLAB matrix, we can simply do:
M = double(arr)
or more specifically:
M = int32(arr)
Result:
>> whos Name Size Bytes Class Attributes M 1x5 20 int32 arr 1x1 60 System.Int32[]
source share