N = 30
% Years
r = 0.12
% yield precentage
power_kwh_per_year = 157680000
c = 0.02:0.01:0.1
cost_per_kwh = 0.02;
CF = power_kwh_per_year.* (c - cost_per_kwh);
% Cash flow after the first year
NPV = -57000000
% The cost on year 0
% NPV = Net Present value
for i = 1:N
NPV = NPV + ((CF) ./ ((1 + r).^i));
end
Im trying to find what the value of c is when NPV = 0, any tips on how i can do that?
We know that the value is between 0.06 and 0.07

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by