/**
	Program: 		Convolution
	Course: 		Artificial Intelligence
	Laboratory:		#1
	@author:		André Perez
	Contact: 		2221166p@student.gla.ac.uk
	Last Modified: 	18 October 2015
*/

public class Convolution {
		
	public static void main(String[] args){
		
		// # INPUT #

		DataProcessing data = new DataProcessing();
		data.GetDataParameters();
		data.GetDataFromFile();
		
		// # DATA PROCESSING #
		
			// - Convolution
		
		int windowLength = 10;
		for(int i=0 ; i<data.GetDataCounter() ; i++){
			
			data.modifiedData[i] = 0;
			for(int k=0 ; k<windowLength*data.GetSamplingRate() ; k++){
				
				if((i-k) >= 0){
					
					data.modifiedData[i] += data.originalData[i-k];
				}
			}
		}
		
		// # OUTPUT #
		
		data.modifiedData = data.NormalizeData(data.modifiedData, data.originalData);
		data.PutDataFile(data.modifiedData, "normalizedModifiedData.txt");
		
		data.originalData = data.NormalizeData(data.originalData, data.originalData);
		data.PutDataFile(data.originalData, "normalizedOriginalData.txt");
	}
}

@@ -8,17 +8,16 @@
 ogram: %09
-%09
 Convolut
@@ -30,17 +30,16 @@
 ourse: %09
-%09
 Artifici
@@ -66,17 +66,16 @@
 oratory:
-%09
 %09#1%0A%09@au
@@ -79,17 +79,16 @@
 @author:
-%09
 %09Andr%C3%A9 P
@@ -103,17 +103,16 @@
 ntact: %09
-%09
 2221166p

Update Convolution.java