Ask about generating a sound with smooth ascending or decreasing frequency

Dear all,
With "MakeBeep" i try to generate two sounds with ascending (from 300 Hz to 4300 Hz, duration 400 ms) or decreasing (from 4300 Hz to 300 Hz, 400 ms) frequency. The following is the script i used, the problem is that the sounds i got was not "smooth" enough, if i add more cycles (such i=400 and 1 ms for MakeBeep) to get T1 and T2, then the sounds go wrong.I wonder anyone know better solutions with matlab codes, many thanks!!

T1=[]; %% increasing
T2=[]; %% decreasing
freq = 44100;
for i=1:40
tonein(1,:)= MakeBeep(300+i*100, 0.01, freq);
tonein(2,:)=tonein(1,:);
T1=[T1 tonein];
end

for i=1:40
tonede(1,:)= MakeBeep(4300-i*100, 0.01, freq);
tonede(2,:)=tonede(1,:);
T2=[T2 tonede];
end

Snd('Play', T1, freq, 16);
Snd('Play', T2, freq, 16);