void main(){ double **mx; int m,n; printf("Enter m and n "); scanf("%i %i", &m, &n); //get space mx = malloc(m*sizeof(double *)); for(int i=0; i<m; i++) mx[i] = malloc(n*sizeof(double)); scanMatrix(mx, m, n); rref(mx, m, n); printMatrix(mx , m, n); }
//***************************************************************************** //***************************************************************************** int main(void) { //char posArray[40]; PLL_Init(); initPollingUART0(); //initPollingUART1(); UART0_TxPoll("\n\r\n\r\n\r*****Chiposizer V.9****"); UART0_TxPoll("\n\rInitializing GPIO Ports..."); initGPIOPorts(); UART0_TxPoll("\n\rInitializing PWM Modules..."); initPWM(); UART0_TxPoll("\n\rInitializing Timers..."); initTimers(); UART0_TxPoll("\n\rInitializing Effects..."); initPremadeEffects(); UART0_TxPoll("\n\rInitializing Channels..."); initChannels(); setCurrentChannel(ch5); UART0_TxPoll("\n\rEntering Main Loop"); recordLoopNum = 0; configureUART(); while(1){ if (checkMsgs(myMsgBuffer)){ handleLCDinput(myMsgBuffer[2], myMsgBuffer[4], currentCh->note->effects); } if (alertEffect) { alertEffect = false; updateAllEffects(); } if (alertScan) { alertScan = false; /*if (recordLoopNum < 1000) { recordLoopNum++; } else if (!recordLoop) { recordLoop = true; cur = testList.head; UART0_TxPoll("\n\rBegin Record Loop"); } if (!recordLoop) { keyNumber = scanMatrix(scanningMatrix); keyNumberPtr = malloc(sizeof(int8_t)); *keyNumberPtr = keyNumber; add(&testList, keyNumberPtr); } else { keyNumber = *((int8_t*) cur->data); if (cur == testList.tail) { cur = testList.head; } else { cur = cur->next; } }*/ keyNumber = scanMatrix(scanningMatrix); updateKey(currentCh->note, keyNumber); //printMatrix(scanningMatrix); } updateAllTuningWords(); } };