1

How can I store .NET arrays in a matrix without converting them to another data type?

If I have

A = NET.createArray('System.Int16', n);
B = NET.createArray('System.Int16', n);

How to do I store these in the same matrix without first converting them to another data type such as double or int16 etc

So I can access them by

data(1) outputs A
data(2) outputs B

This is a more specific question relating to my original question: Preallocating a Matrix of .NET Arrays

JCW
  • 43
  • 7
  • Storing a .NET array in a structure works, but I do not know how to extract the .NET array for later use – JCW Sep 05 '17 at 10:25

1 Answers1

1

It seems that storing the .NET array in a cell means you can later extract it and index as such

data{1} = NET.createArray('System.Int16', n);
data{2} = NET.createArray('System.Int16', n);

data{i} returns a .NET array which can be converted to another data type and plotted

JCW
  • 43
  • 7