From: KS Sirohi on 28 Jul 2010 18:12 Anyone have have experience reading and writing matlab files using the csmatio library for c# created by Mr.Zier. I am trying to create a MLCell type and will store one MLChar type and the MLCell type will be stored in a MLStructure type. And this how I HAVE to proceed. The problem is that once I create a MLCell type, I then save a MLChar type in the MLCell type's first cell...code below //Creating a MLStructure type MLStructure data = new MLStructure("name", new int[] {4,1}); //Saving a MLDouble type to MLStructure type data["first"] = new MLDouble("", new double[] {8},1); //Creating a MLCell type MLCell cell = new MLCell("cell",new int[] {1,1}); //Saving a MLChar type to MLCell type cell.cells[0] = new MLChar("","some info"); //Saving the MLCell type to MLStructure type data["cellstuff"] = cell; MemoryStream ms = new MemoryStream(); MatFileWriter writer = new MatFileWriter(new BinaryWriter(ms), new object[1] {data}, false); The problem now is that I am able to create a MAT file and save it to the file system. However, when I try to open it in MATLAB (using version R14) SP1 I get an error and MATLAB is unable to open the file. Anyone have any idea what I am doin wrong programmatically or maybe not using the right version of MATLAB. Thanks in advance. KS
|
Pages: 1 Prev: I need help with fin. timeseries and tomonthly Next: rescaling for fmincon |