renamed fun -> psd
calculating pxx using @psd
part3.m cleaned for appendix
all code inside lstlistings