Random sequence Ramp-up/down function??

6 views (last 30 days)
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

Accepted Answer

M Salman Rashed
M Salman Rashed on 31 Oct 2016
Query solved... Thanks to the community
  1 Comment
Timilehin Dare
Timilehin Dare on 9 Aug 2019
Could you please share how you were able to achive this, I have a similar challenge

Sign in to comment.

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!