x = linspace(0,7.999999999,8)
y = exp(-x) + exp(-2*x)
y1 = (exp(x)/6 + exp(-x) + exp(-2*x))
scatter(x,y,'r','filled')
hold on
plot(x,y1,'b')
title('Question 2')
legend('homogeneous','inhomogeneous')
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!