Hamming Window LUT function
Your code is correct. 

This can also be implemented by calling the built-in MATLAB function hamming:

WIN_HAM_v = round(4095*hamming(LUT_length));


You can (should) compare the two methods yourself:

win1 = 4095*(0.54-(0.46*cos(2*pi*n/(LUT_length-1)))); 
win2 = 4095*hamming(LUT_length);
maxError = max(abs(win1(:)-win2(:))); 
% result: 2.2737e-12