[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave/C++ matrix Inv() comparison
From: |
ionone |
Subject: |
Re: Octave/C++ matrix Inv() comparison |
Date: |
Thu, 11 Jul 2013 02:34:04 -0700 (PDT) |
Also to do it simpler, here are the numbers in a 20x20 matrix in Octave and
in C++
the funny thing is that when i take the inverse in octave, ihave the exact
answer, but if i take the inverse with Lapack i have something totally
different...Not even close as before. Dunno...
R=[ 0.100197 0.100187 0.100155 0.100103 0.100030 0.099936 0.099822 0.099687
0.099531 0.099355 0.099158 0.098942 0.098705 0.098448 0.098171 0.097875
0.097559 0.097224 0.096870 0.096496;
0.100187 0.100197 0.100187 0.100155 0.100103 0.100030 0.099936 0.099822
0.099687 0.099531 0.099355 0.099158 0.098942 0.098705 0.098448 0.098171
0.097875 0.097559 0.097224 0.096870;
0.100155 0.100187 0.100197 0.100187 0.100155 0.100103 0.100030 0.099936
0.099822 0.099687 0.099531 0.099355 0.099158 0.098942 0.098705 0.098448
0.098171 0.097875 0.097559 0.097224;
0.100103 0.100155 0.100187 0.100197 0.100187 0.100155 0.100103 0.100030
0.099936 0.099822 0.099687 0.099531 0.099355 0.099158 0.098942 0.098705
0.098448 0.098171 0.097875 0.097559;
0.100030 0.100103 0.100155 0.100187 0.100197 0.100187 0.100155 0.100103
0.100030 0.099936 0.099822 0.099687 0.099531 0.099355 0.099158 0.098942
0.098705 0.098448 0.098171 0.097875;
0.099936 0.100030 0.100103 0.100155 0.100187 0.100197 0.100187 0.100155
0.100103 0.100030 0.099936 0.099822 0.099687 0.099531 0.099355 0.099158
0.098942 0.098705 0.098448 0.098171;
0.099822 0.099936 0.100030 0.100103 0.100155 0.100187 0.100197 0.100187
0.100155 0.100103 0.100030 0.099936 0.099822 0.099687 0.099531 0.099355
0.099158 0.098942 0.098705 0.098448;
0.099687 0.099822 0.099936 0.100030 0.100103 0.100155 0.100187 0.100197
0.100187 0.100155 0.100103 0.100030 0.099936 0.099822 0.099687 0.099531
0.099355 0.099158 0.098942 0.098705;
0.099531 0.099687 0.099822 0.099936 0.100030 0.100103 0.100155 0.100187
0.100197 0.100187 0.100155 0.100103 0.100030 0.099936 0.099822 0.099687
0.099531 0.099355 0.099158 0.098942;
0.099355 0.099531 0.099687 0.099822 0.099936 0.100030 0.100103 0.100155
0.100187 0.100197 0.100187 0.100155 0.100103 0.100030 0.099936 0.099822
0.099687 0.099531 0.099355 0.099158;
0.099158 0.099355 0.099531 0.099687 0.099822 0.099936 0.100030 0.100103
0.100155 0.100187 0.100197 0.100187 0.100155 0.100103 0.100030 0.099936
0.099822 0.099687 0.099531 0.099355;
0.098942 0.099158 0.099355 0.099531 0.099687 0.099822 0.099936 0.100030
0.100103 0.100155 0.100187 0.100197 0.100187 0.100155 0.100103 0.100030
0.099936 0.099822 0.099687 0.099531;
0.098705 0.098942 0.099158 0.099355 0.099531 0.099687 0.099822 0.099936
0.100030 0.100103 0.100155 0.100187 0.100197 0.100187 0.100155 0.100103
0.100030 0.099936 0.099822 0.099687;
0.098448 0.098705 0.098942 0.099158 0.099355 0.099531 0.099687 0.099822
0.099936 0.100030 0.100103 0.100155 0.100187 0.100197 0.100187 0.100155
0.100103 0.100030 0.099936 0.099822;
0.098171 0.098448 0.098705 0.098942 0.099158 0.099355 0.099531 0.099687
0.099822 0.099936 0.100030 0.100103 0.100155 0.100187 0.100197 0.100187
0.100155 0.100103 0.100030 0.099936;
0.097875 0.098171 0.098448 0.098705 0.098942 0.099158 0.099355 0.099531
0.099687 0.099822 0.099936 0.100030 0.100103 0.100155 0.100187 0.100197
0.100187 0.100155 0.100103 0.100030;
0.097559 0.097875 0.098171 0.098448 0.098705 0.098942 0.099158 0.099355
0.099531 0.099687 0.099822 0.099936 0.100030 0.100103 0.100155 0.100187
0.100197 0.100187 0.100155 0.100103;
0.097224 0.097559 0.097875 0.098171 0.098448 0.098705 0.098942 0.099158
0.099355 0.099531 0.099687 0.099822 0.099936 0.100030 0.100103 0.100155
0.100187 0.100197 0.100187 0.100155;
0.096870 0.097224 0.097559 0.097875 0.098171 0.098448 0.098705 0.098942
0.099158 0.099355 0.099531 0.099687 0.099822 0.099936 0.100030 0.100103
0.100155 0.100187 0.100197 0.100187;
0.096496 0.096870 0.097224 0.097559 0.097875 0.098171 0.098448 0.098705
0.098942 0.099158 0.099355 0.099531 0.099687 0.099822 0.099936 0.100030
0.100103 0.100155 0.100187 0.100197]
and here is the same in C++ (i'll save you some time this way)
double R21[20][20]={{0.100197 , 0.100187 , 0.100155 , 0.100103 ,
0.100030 , 0.099936 , 0.099822 , 0.099687 , 0.099531 , 0.099355 ,
0.099158 , 0.098942 , 0.098705 , 0.098448 , 0.098171 , 0.097875 ,
0.097559 , 0.097224 , 0.096870 , 0.096496},
{0.100187 , 0.100197 , 0.100187 , 0.100155 , 0.100103 , 0.100030 ,
0.099936 , 0.099822 , 0.099687 , 0.099531 , 0.099355 , 0.099158 ,
0.098942 , 0.098705 , 0.098448 , 0.098171 , 0.097875 , 0.097559 ,
0.097224 , 0.096870},
{0.100155 , 0.100187 , 0.100197 , 0.100187 , 0.100155 , 0.100103 ,
0.100030 , 0.099936 , 0.099822 , 0.099687 , 0.099531 , 0.099355 ,
0.099158 , 0.098942 , 0.098705 , 0.098448 , 0.098171 , 0.097875 ,
0.097559 , 0.097224},
{0.100103 , 0.100155 , 0.100187 , 0.100197 , 0.100187 , 0.100155 ,
0.100103 , 0.100030 , 0.099936 , 0.099822 , 0.099687 , 0.099531 ,
0.099355 , 0.099158 , 0.098942 , 0.098705 , 0.098448 , 0.098171 ,
0.097875 , 0.097559},
{0.100030 , 0.100103 , 0.100155 , 0.100187 , 0.100197 , 0.100187 ,
0.100155 , 0.100103 , 0.100030 , 0.099936 , 0.099822 , 0.099687 ,
0.099531 , 0.099355 , 0.099158 , 0.098942 , 0.098705 , 0.098448 ,
0.098171 , 0.097875},
{0.099936 , 0.100030 , 0.100103 , 0.100155 , 0.100187 , 0.100197 ,
0.100187 , 0.100155 , 0.100103 , 0.100030 , 0.099936 , 0.099822 ,
0.099687 , 0.099531 , 0.099355 , 0.099158 , 0.098942 , 0.098705 ,
0.098448 , 0.098171},
{0.099822 , 0.099936 , 0.100030 , 0.100103 , 0.100155 , 0.100187 ,
0.100197 , 0.100187 , 0.100155 , 0.100103 , 0.100030 , 0.099936 ,
0.099822 , 0.099687 , 0.099531 , 0.099355 , 0.099158 , 0.098942 ,
0.098705 , 0.098448},
{0.099687 , 0.099822 , 0.099936 , 0.100030 , 0.100103 , 0.100155 ,
0.100187 , 0.100197 , 0.100187 , 0.100155 , 0.100103 , 0.100030 ,
0.099936 , 0.099822 , 0.099687 , 0.099531 , 0.099355 , 0.099158 ,
0.098942 , 0.098705},
{0.099531 , 0.099687 , 0.099822 , 0.099936 , 0.100030 , 0.100103 ,
0.100155 , 0.100187 , 0.100197 , 0.100187 , 0.100155 , 0.100103 ,
0.100030 , 0.099936 , 0.099822 , 0.099687 , 0.099531 , 0.099355 ,
0.099158 , 0.098942},
{0.099355 , 0.099531 , 0.099687 , 0.099822 , 0.099936 , 0.100030 ,
0.100103 , 0.100155 , 0.100187 , 0.100197 , 0.100187 , 0.100155 ,
0.100103 , 0.100030 , 0.099936 , 0.099822 , 0.099687 , 0.099531 ,
0.099355 , 0.099158},
{0.099158 , 0.099355 , 0.099531 , 0.099687 , 0.099822 , 0.099936 ,
0.100030 , 0.100103 , 0.100155 , 0.100187 , 0.100197 , 0.100187 ,
0.100155 , 0.100103 , 0.100030 , 0.099936 , 0.099822 , 0.099687 ,
0.099531 , 0.099355},
{0.098942 , 0.099158 , 0.099355 , 0.099531 , 0.099687 , 0.099822 ,
0.099936 , 0.100030 , 0.100103 , 0.100155 , 0.100187 , 0.100197 ,
0.100187 , 0.100155 , 0.100103 , 0.100030 , 0.099936 , 0.099822 ,
0.099687 , 0.099531},
{0.098705 , 0.098942 , 0.099158 , 0.099355 , 0.099531 , 0.099687 ,
0.099822 , 0.099936 , 0.100030 , 0.100103 , 0.100155 , 0.100187 ,
0.100197 , 0.100187 , 0.100155 , 0.100103 , 0.100030 , 0.099936 ,
0.099822 , 0.099687},
{0.098448 , 0.098705 , 0.098942 , 0.099158 , 0.099355 , 0.099531 ,
0.099687 , 0.099822 , 0.099936 , 0.100030 , 0.100103 , 0.100155 ,
0.100187 , 0.100197 , 0.100187 , 0.100155 , 0.100103 , 0.100030 ,
0.099936 , 0.099822},
{0.098171 , 0.098448 , 0.098705 , 0.098942 , 0.099158 , 0.099355 ,
0.099531 , 0.099687 , 0.099822 , 0.099936 , 0.100030 , 0.100103 ,
0.100155 , 0.100187 , 0.100197 , 0.100187 , 0.100155 , 0.100103 ,
0.100030 , 0.099936},
{0.097875 , 0.098171 , 0.098448 , 0.098705 , 0.098942 , 0.099158 ,
0.099355 , 0.099531 , 0.099687 , 0.099822 , 0.099936 , 0.100030 ,
0.100103 , 0.100155 , 0.100187 , 0.100197 , 0.100187 , 0.100155 ,
0.100103 , 0.100030},
{0.097559 , 0.097875 , 0.098171 , 0.098448 , 0.098705 , 0.098942 ,
0.099158 , 0.099355 , 0.099531 , 0.099687 , 0.099822 , 0.099936 ,
0.100030 , 0.100103 , 0.100155 , 0.100187 , 0.100197 , 0.100187 ,
0.100155 , 0.100103},
{0.097224 , 0.097559 , 0.097875 , 0.098171 , 0.098448 , 0.098705 ,
0.098942 , 0.099158 , 0.099355 , 0.099531 , 0.099687 , 0.099822 ,
0.099936 , 0.100030 , 0.100103 , 0.100155 , 0.100187 , 0.100197 ,
0.100187 , 0.100155},
{0.096870 , 0.097224 , 0.097559 , 0.097875 , 0.098171 , 0.098448 ,
0.098705 , 0.098942 , 0.099158 , 0.099355 , 0.099531 , 0.099687 ,
0.099822 , 0.099936 , 0.100030 , 0.100103 , 0.100155 , 0.100187 ,
0.100197 , 0.100187},
{0.096496 , 0.096870 , 0.097224 , 0.097559 , 0.097875 , 0.098171 ,
0.098448 , 0.098705 , 0.098942 , 0.099158 , 0.099355 , 0.099531 ,
0.099687 , 0.099822 , 0.099936 , 0.100030 , 0.100103 , 0.100155 ,
0.100187 , 0.100197}};
--
View this message in context:
http://octave.1599824.n4.nabble.com/Octave-C-matrix-Inv-comparison-tp4655291p4655512.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.
- Re: Octave/C++ matrix Inv() comparison, (continued)
- Re: Octave/C++ matrix Inv() comparison, CdeMills, 2013/07/09
- Re: Octave/C++ matrix Inv() comparison, ionone, 2013/07/10
- Re: Octave/C++ matrix Inv() comparison, Nir Krakauer, 2013/07/10
- Re: Octave/C++ matrix Inv() comparison, Pascal Dupuis, 2013/07/10
- Re: Octave/C++ matrix Inv() comparison, ionone, 2013/07/10
- Re: Octave/C++ matrix Inv() comparison, CdeMills, 2013/07/10
- Re: Octave/C++ matrix Inv() comparison, ionone, 2013/07/11
- Re: Octave/C++ matrix Inv() comparison,
ionone <=
- Re: Octave/C++ matrix Inv() comparison, CdeMills, 2013/07/11
- Re: Octave/C++ matrix Inv() comparison, ionone, 2013/07/12
- Re: Octave/C++ matrix Inv() comparison, CdeMills, 2013/07/12
- Re: Octave/C++ matrix Inv() comparison, mtall, 2013/07/16
- Re: Octave/C++ matrix Inv() comparison, Jean-François LE BAS, 2013/07/19
- Re: Octave/C++ matrix Inv() comparison, Ed Meyer, 2013/07/17
- Re: Octave/C++ matrix Inv() comparison, Jordi Gutiérrez Hermoso, 2013/07/17