Random sequence Ramp-up/down function??

6 次查看(过去 30 天)
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

采纳的回答

M Salman Rashed
M Salman Rashed 2016-10-31
Query solved... Thanks to the community
  1 个评论
Timilehin Dare
Timilehin Dare 2019-8-9
Could you please share how you were able to achive this, I have a similar challenge

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by