Generating An Exponential Function

10 次查看(过去 30 天)
cikalekli
cikalekli 2021-11-23
评论: Dyuman Joshi 2021-11-24
I am trying to generate an exponential function which grows with factor 0.5
between -20 < t < 20.
Did I find it correct? I was not sure so that is why I just wanted to ask here.
Here is my code which I wrote:
t = -20 : 0.5 : 20;
unit=zeros(size(t));
unit(11:end) = 1;
expf = exp(0.5*t);
expunit = expf.*unit;
stem(t,expunit, '- b',...
'LineWidth',2);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by