How to assign values with a smooth trend

1 Ansicht (letzte 30 Tage)
SAZZAD HOSSAIN
SAZZAD HOSSAIN am 20 Mai 2013
Hello all
I have a 1by500 array which i have divided into two parts right in the middle (250). Initially its all zeros but i am intending to assign nonzero values in there. The values would look something like this -
N = 500; x = zeros(1,N); d = 25; x(1:N/2-d) = 100; % from 1 to 225 x(N/2+d+1:end) = 10; % from 276 to 500
The problem is that i need the values in between (from 226 to 275) to change smoothly from 100 to 10. The change cannot be linear. I would want a smooth exponential like change and I dont know how i can do that. Can anyone please help me?
Thanks in advance.
Sazzad

Antworten (0)

Kategorien

Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by