lambda = 2.5;

t = 0:0.1:5;

[prob] = exponential(lambda, t);
plot(t,prob); ylabel('P(t)'); xlabel('t')
grid on
[prob_men] = men_exponential(lambda, t);
plot(t,prob_men); ylabel('P(X<t)'); xlabel('t')
grid on

%

function [prob] = exponential(lambda, t)
prob = lambda .* exp(-lambda.*t);
end

function [prob_men] = men_exponential(lambda, t)
prob_men = 1 - exp(-lambda.*t);
end