How can I generate time-variant Rayleigh channel in MATLAB One of known models for channel simulation is called Rayleigh Fading channel, it's usually used to simulate wireless channel in time variant/invariant. 

As I know, Rayleigh fading channel can be considered as sum of two Gaussian random variables, we can use the below command to generate that channel: 

h = 1/sqrt(2)*[randn(1,M+1) + 1i*randn(1,M+1)];   


Where M is channel length and h will be the channel.

But what's about if I want to generate Rayleigh channel in time-variant environment?   is that possible?  Please correct me if the above command generates Rayleigh channel or there is another command.  

thank you
Yes, you can have time variant channel in MATLAB either by using comm.RayleighChannel()  , you can read about it in help of matlab. 

or the other way you use the same command you have mentioned but with each symbol the channel should be changed. so it will be like you will generate a channel which is Quasi-static. You above command will become: 

h = 1/sqrt(2)*[randn(n_symbol,M+1) + 1i*randn(n_symbol,M+1)];    


where n_symbol represents the number of symbols you have. then to do the convolution, must be use the loop of for.  

for jj = 1:nSym

  new_signal(jj,:) = conv(h(jj,:),x(jj,:));   %% x is your signal


end 

good luck