How can I make a mmWave frequency selective channel in matlab?
Your code appears to be summing up amplitudes over all the paths to simulate Rayleigh (flat) fading.  The assumption of flat fading is that the delay spread of the channel is much less than the symbol period, so all the symbols add up roughly at the same time (1). 

To make the leap to frequency-selective fading, you need to account for the pulse shape in your summation, i.e. you need to have some vector of sample indices n, a function p(n) that returns the pulse amplitudes at times n*Ts, and multipath delay ndelay. Something like this (pseudo-MATLAB code):

n = 0:maxn;
Npath = 4;
ndelay = [2, 5, 3, 7]; % length(ndelay) == Npath
sumval = 0;
for i = 1:Npath
    sumval = sumval + otherstuff*p(n - ndelay(i));
end


You must specify ndelay ahead of time manually or generate it according to some probability distribution.

References: 
(1) Goldsmith, Wireless Communications, chapters 2-3, 2005.