Returns weighted percentiles of a sample given the weight vector w
% The idea is to give more emphasis in some examples of data as compared to
% others by giving more weight. For example, we could give lower weights to
% the outliers.
% The motivation to write this function is to compute percentiles for Monte
% Carlos simulations where some simulations are very bad (in terms of goodness
% of fit between simulated and actual value) than the others and to give
% the lower weights based on some goodness of fit criteria.
I wrote this code early this year using ColdFire MCF5213 in codewarrior IDE. The LCD is STN B/W 320x240 dot matrix LCD. The code include 3 different fonts, and basic LCD driver. All original!