Info

此问题已关闭。 请重新打开它进行编辑或回答。

How I can Plots this function

3 次查看(过去 30 天)
Mohamed  Hussein
Mohamed Hussein 2019-2-16
关闭: MATLAB Answer Bot 2021-8-20
how can write the code of this function

回答(2 个)

Yasasvi Harish kumar
Hey,
This should help you.
function x = question(t)
if t >=0
x = 3*exp(-2*t);
else
x = 0;
end
end
Regards

Star Strider
Star Strider 2019-2-16
Another approach:
x = @(t) 3*exp(-2*t) .* (t >= 0);
t = linspace(-10,10);
figure
plot(t, x(t))

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by