Matlab code for Simulating of Phase Noise for OFDM systems
Below is a short code to do this for 1024 samples. "phi" array below is the required phase for each samples

N=1024; %number of samples

phi=zeros(1,N);
phi(1,1) = pi/4;. %initial phase, could be set to zero if the phase is set to zero by the front end processing

Phase_snr=10; %snr in phase estimation,equivalent to 1db

for n=1:N-1
phi(1,n+1)=phi(1,n) + (1/sqrt(phase_snr))*randn(1);
end