fixed spiral matrix and added test cases
Adding test cases for FreqElement.c