Here is my .h file. I'm creating a 12x1860 2-D array, which I would like to fill inside of my .c file.
/*
* spectrogramMatrices.h
*/
#ifndef SPECTROGRAMMATRICES_H_
#define SPECTROGRAMMATRICES_H_
//global variables
extern int binaryFingerprint[12][1860];
void makeBinFingerprint(int shortBinSpectrum[12][186], int count);
#endif /* SPECTROGRAMMATRICES_H_ */
In my .c file, I want to create the makeBinFingerprint()
function, which fills a 12x1860 2d array with 10 different segments of 12x186 2d data. I'd really like to store this in that extern int binaryFingerprint[12][1860]
2d array. This is shown below
void makeBinFingerprint(int shortBinSpectrum[12][186], int count){
int i;
int j;
for (i = 0; i<12; i++){
for (j = 0; j<186; j++){
binaryFingerprint[i][(j+(186*count))] = shortBinSpectrum[i][j]; // we're going to be storing a lot of zeros, which may be a problem!
}
}
}
Do you see any issues with me attempting it this way? Thanks