Matrix class included

Dependencies:   Matrix

Revision:
0:eb69bbfb6486
Child:
1:c74cdf14aea2
diff -r 000000000000 -r eb69bbfb6486 MatrixMath.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MatrixMath.cpp	Fri Oct 21 03:28:28 2011 +0000
@@ -0,0 +1,24 @@
+/**
+ * @brief Still under work  version 0.1
+ * @file   MatrixMath.cpp
+ * @author Erneseto Palacios
+ *
+ *  Develop Under  GPL v3.0 License
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+#include "mbed.h"
+#include "MatrixMath.h"
+
+///Transpose matrix
+Matrix MatrixMath::Transpose(const Matrix& matrix)
+{
+    Matrix result( matrix._nCols, matrix._nRows ); //Transpose Matrix
+
+    for( int i = 0; i < result._nRows; i++ )
+        for( int j = 0; j < result._nCols; j++ )
+            result._matrix[i][j] = matrix._matrix[j][i];
+
+    return result;
+}
+