This project has moved and is read-only. For the latest updates, please go here.

Error cast matrix

Mar 30, 2011 at 5:21 PM

I'm trying to do the following:

 

var Atmp = new double[4,4] { { 1, 0, 1, 0 }, { 0, 1, 0, 1 }, { 0, 0, 1, 0 }, { 0, 0, 0, 1 } };

var A = new DenseMatrix(Atmp);

 

var XINI = new double[4, 1] { { 3 }, { 1.6 }, { 0 }, { 0 } };

var Xtmp = new DenseMatrix(XINI);

 

var X = new DenseMatrix(4,4);

X=A * Xtmp;

 

And i got this error: 

Error 1 Cannot implicitly convert type 'MathNet.Numerics.LinearAlgebra.Generic.Matrix<double>' to 'MathNet.Numerics.LinearAlgebra.Double.DenseMatrix'. An explicit conversion exists (are you missing a cast?) Z:\Dissertacao\TagLogAnalyse\TagLogAnalyse\Form1.cs 399 15 TagLogAnalyse

Mar 30, 2011 at 5:36 PM
Edited Mar 30, 2011 at 6:01 PM

This was corrected a while ago. Please grab the latest source.

Mar 30, 2011 at 5:38 PM

i usually download from here: http://mathnetnumerics.codeplex.com/releases/view/56448

Mar 30, 2011 at 6:02 PM

Click the "Source Code" tab and then Download under "Latest Version" on the right. You'll have to build the source code. We'll be putting up a new build real soon.

Mar 31, 2011 at 1:52 PM

how can i build it!?

Mar 31, 2011 at 11:12 PM

You should be able to build it by opening src/MathNet.Numerics.sln with Visual Studio 2010 and hitting "Build" ...

Apr 3, 2011 at 12:52 PM

Done :D Thanks