How I can Plots this function

how can write the code of this function

답변 (2개)

Yasasvi Harish kumar
Yasasvi Harish kumar 2019년 2월 16일

0 개 추천

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일

0 개 추천

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

이 질문은 마감되었습니다.

질문:

2019년 2월 16일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by