MATLAB: Random sequence Ramp-up/down function?

high power transmitterModulationoptimisingramping functionrandom sequence

I have a random sequence, say length "N". I want the power supply generating this sequence to ramp up initially from Zero to One Amplitude (say between 0-N/5 duration), then stay at 1 (from N/5 to 3N/5 duration), and then ramp down again (from 3N/5 to N).
This is done so there are no sharp edges at start and end of the sequence, meaning it does not have to abruptly jump up from zero to first value at start and jump down from some value to zero value at end. The usual case with high power transmitters.
Now I have this ramp function, and I have the sequence, how do I make the sequence follow this ramp, as in override the amplitude of ramp?? I know Multiplying both the function and the sequence will scale the sequence as per the Ramping Function, but not actually follow the Ramping Function; I basically want to optimise this sequence as per the ramping function, so that all values exceeding this ramp are knocked down…
The ramp sequence is as under:-
%%%%%% ENVELOPE / WINDOWING FUNCTION FOR UPRAMPING AND DOWNRAMPING FUNCTIO x1 = 1/2 + (1/2 * cos ((linspace (0, pi, (length(ab)/5))) + pi)); % figure; hold on; plot (t, x1); axis tight
x2 = 1/2 + (1/2 * cos (linspace (0, pi, (length(ab)*2/5)))); % plot (t1, x2, 'r')
u = [x1 ones(1,(length (ab)*2/5)) x2 ]; figure (); hold on; plot (u)
Thanks

Best Answer

Query solved... Thanks to the community