mathnet-numerics
mathnet-numerics copied to clipboard
MatlabWriter does not write into Memorystrem
FileStream works, but MemoryStream is Null.
Matrix<double> m1 = Matrix<double>.Build.Random(3, 4);
Matrix<double> m2 = Matrix<double>.Build.Random(3, 4);
MemoryStream mem = new MemoryStream();
// write a dictionary of matrices:
var dict = new Dictionary<string, Matrix<double>>();
dict.Add("m1", m1);
dict.Add("m2", m2);
MatlabWriter.Write( mem, dict);
...downloaded the sourcecode and noticed, the stream is been flushed to disk and then been closed in a subroutine. I can change that, but it would not be as elegant (quick and dirty) as the rest of the code.
Background is to write matrices to the clipboard and the load it into matlab without doing any filesearch.
wrong button...