clc;
clear;
close all;

x = chebfun('x');
f = sin(20*x);
g = exp(x-1);
h = max(f,g);

r = roots(h - 0.9);

figure;
plot(f, 'r:');
hold on;
plot(g, 'b:');
plot(h, 'k');
plot(r, h(r), '.m', 'MarkerSize', 12);
grid on;
ylim([-1.5 1.5]);


