I am new in MATLAB, have being searching this but it is probably so simple that I cannot get.
Basically I have to calculate a weighted measure of S(T). Each value of