Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How I can Plots this function

6 visualizzazioni (ultimi 30 giorni)
Mohamed  Hussein
Mohamed Hussein il 16 Feb 2019
Chiuso: MATLAB Answer Bot il 20 Ago 2021
how can write the code of this function

Risposte (2)

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

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by