-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
42 lines (36 loc) · 1.03 KB
/
main.cpp
File metadata and controls
42 lines (36 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "main.h"
#include <ctime>
int main(int argc, char* argv[]){
/*********************************************************
** Definicion de variables principales
**********************************************************/
float a, b, c;
uint i;
/*********************************************************
** Cargar datos
**********************************************************/
DataSignal ekg;
ekg.loadTXT("limbs.txt",LENGTH,3);
ekg.normalize();
float *mag;
mag = new float[LENGTH];
mag = ekg.fftMag(0);
for(i=0;i<LENGTH;i++){
sig1[i] = ekg.dataC[i][0];
sig2[i] = ekg.dataC[i][1];
sig3[i] = ekg.dataC[i][2];
mag1[i] = mag[i];
}
/*********************************************************
** Plot
**********************************************************/
glutInit(&argc, argv);
glutCreateWindow(100,100,600,400);
glutDisplayFunc( display );
glutReshapeFunc( reshape );
glutMotionFunc( motion );
glutMouseFunc( mouse );
glutMainLoop();
system("pause");
return 0;
}