clear; clc; close all;

x = linspace(0, 4 * pi, 10);
y = sin(x) .* exp(-x / 5);

xq = linspace(0, 4 * pi, 100);

figure; hold on; grid on;
plot(xq, sin(xq) .* exp(-xq / 5));
plot(x, y, 'o');

yq = interp1(x, y, xq);
plot(xq, yq, '--');

yq = interp1(x, y, xq, 'spline');
plot(xq, yq, '--');

yq = interp1(x, y, xq, 'nearest');
plot(xq, yq, '--');