shannon编码的MATLAB代码function[W,L,q]=shannon(p)