Changes for my application (Just Ignore)
Diff: Matrix.cpp
- Revision:
- 6:1ade15e369fb
- Parent:
- 5:a4014ab0a8cf
--- a/Matrix.cpp Sun Oct 30 16:29:23 2011 +0000 +++ b/Matrix.cpp Wed Jun 02 20:48:17 2021 +0000 @@ -12,6 +12,7 @@ #include "mbed.h" #include "Matrix.h" +#include "serialCOM.h" /// Rows by Cols Matrix Constructor Matrix::Matrix(int Rows, int Cols): _nRows(Rows), _nCols(Cols) @@ -112,7 +113,7 @@ if( index > Mat._nRows + 1) { - printf("\n\nERROR:\nRow out of Limits @ AddRow()\n"); + printQ("\n\nERROR:\nRow out of Limits @ AddRow()\n"); }else{ @@ -149,7 +150,7 @@ if( index > Mat._nCols + 1 ) { - printf("\n\nERROR:\nRow out of Limits on AddCol()\n"); + printQ("\n\nERROR:\nRow out of Limits on AddCol()\n"); }else{ @@ -186,7 +187,7 @@ if( Col > Mat._nCols ) { - printf("\n\nERROR:\nColumn out of Limits @ DeleteCol()\n"); + printQ("\n\nERROR:\nColumn out of Limits @ DeleteCol()\n"); }else{ @@ -217,7 +218,7 @@ if( Row > Mat._nRows ) { - printf("\n\nERROR:\nColumn out of Limits @ DeleteCol()\n"); + printQ("\n\nERROR:\nColumn out of Limits @ DeleteCol()\n"); }else{ @@ -239,7 +240,7 @@ if( row > Mat._nRows ) { - printf( "\n\nERROR:\nRow out of dimmensions @ GetRow\n" + printQ( "\n\nERROR:\nRow out of dimmensions @ GetRow\n" "Nothing Done.\n\n" ); }else{ @@ -265,7 +266,7 @@ if( col > Mat._nCols ) { - printf( "\n\nERROR:\nColumn out of dimmensions.\n" + printQ( "\n\nERROR:\nColumn out of dimmensions.\n" "Nothing Done.\n\n" ); }else{ @@ -304,15 +305,15 @@ { for(int j = 0; j < _nCols; j++) { - printf( "Position [%u][%u]: ", i, j ); + printQ( "Position [%u][%u]: ", i, j ); float numero; scanf( "%f", &numero ); - printf("%.3f ", numero); + printQ("%.3f ", numero); this->_matrix[i][j] = numero; } - printf("\n"); + printQ("\n"); } - printf("\n"); + printQ("\n"); _pRow = _nRows; _pCol = _nCols; @@ -326,10 +327,10 @@ { for( int j = 0; j < _nCols; j++ ) { - printf( "%.3f, ",_matrix[i][j] ); + printQ( "%.3f, ",_matrix[i][j] ); } - printf( "\n" ); + printQ( "\n" ); } } @@ -355,7 +356,7 @@ if( Row > _nRows || Col > _nCols ) { - printf("\n\nERROR:\nOut of limits of Matrix @ mat.Add()"); + printQ("\n\nERROR:\nOut of limits of Matrix @ mat.Add()"); }else{ _matrix[Row][Col] = number;