Your code overwrites H in each iteration. So the final PLOT command outside the loop draws 1 point only. Because single points are not visible, but only lines, you do not see a graphic object.
You did not explain in detail, what you want to do instead. Remember that posting the code does not allow to understand, what you want to achieve. I guess:
H(m) = abs(f(m))^2;
This line must fail also:
phi is not defined anywhere. So I guess, it might work to replace all occurrences of "pshi(phi)" by simply "psi".
B= (2*n*pi/6)<= phi <(2*(n+1)*pi/6)
will not do, what you expect. The left part is evaluated at first:
This is TRUE or FALSE. The next comaprison is:
false < (2*(n+1)*pi/6)
true < (2*(n+1)*pi/6)
whereby FALSE is onverted to 0 and TRUE to 1.
But B is not used anywhere in your code, such that this detail does not matter.
In this line:
beside the already mentioned problem with "psi(phi)" and the undefined "phi", you define a value. INTEGRAL expects a function handle. So maybe you mean:
fun = @(phi) (exp(-1i*m*phi)).*(exp(1i*psi))