Look at this code and let me know what you think. I modified the 2x2LDA, 2 class code to do 4x4LDA, 7 class code. I haven't tested it yet, so if you have data I can use that for testing. If not, I'll try to make something up.
Created 2 programs, one to do the LDA pre-work (to determine the pooled covariance matrix) and one to do the testing on the new sample. Take a look and let me know what you think. This works on the 2x2 matrix. Some of the code needs to change if there are more/less # of samples.
Looked at code again. Ran LDA program with 20 input points, and didn't get good results (before I just extended it to 20 data points and check for compiler errors).
Issue with input data I'm assuming; my input data was duplication of the example LDA data, to reach 20 data points. This duplication caused the program to crash (could not take the inverse of the covariance matrix). Perturbed some data from its original values, then was able to get a probability function result from it. Did not pursue the code further once I realized it was a data problem & not a software issue.
Found looping error, now LDA discriminant function calculates correctly. Getting results as expected, using one of the calibration points as the sample point. Will now look at using "real" data, not sample data from tutorial
Time domain statistics funtions acsept arrays and vareables consolodated. So arrays can be passed into the time domain statistics functions They all use a single for loop so that loop could be when the data is taken in. Taking the mean is done at the end of the for loop. Vareables are replaced with constants or macros where possible.