How to assign values with a smooth trend

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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by