//Extrakce Ramanova spektra #include #include const int MAX_SAMPLES = 1024; using namespace std; int main (int argc, char* argv[]) { FILE * pFile; FILE * qFile; if (argc>1) { pFile = fopen ( argv[1] , "rb" ); qFile = fopen ( argv[2] , "r" ); char w[MAX_SAMPLES][100]; fgets(w[0],100,qFile); int i = 0; int j; char* pozice; while (!feof(qFile)) { fgets (w[i], 100, qFile); pozice = strchr(w[i], 9); if (pozice != NULL) {pozice[0] = 0;} i++; } fclose(qFile); fseek ( pFile , 4+8+4*MAX_SAMPLES , SEEK_SET); //hlavicka 4B, sekce 8B, ROA spec 4*1024 B float Raman[MAX_SAMPLES]; fread(Raman, 4*MAX_SAMPLES, 1, pFile); fclose(pFile); j = atoi(argv[3]); for (int i=0; i