Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How I can Plots this function

6 vues (au cours des 30 derniers jours)
Mohamed  Hussein
Mohamed Hussein le 16 Fév 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
how can write the code of this function

Réponses (2)

Yasasvi Harish kumar
Yasasvi Harish kumar le 16 Fév 2019
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 le 16 Fév 2019
Another approach:
x = @(t) 3*exp(-2*t) .* (t >= 0);
t = linspace(-10,10);
figure
plot(t, x(t))

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by