clear; clc; close all;

x = linspace(0, 10, 200);
A = sin(x) + 0.5 * (rand(size(x)) - 0.5);
A([1 : 10, randi([1, length(x)], 1, 50)]) = NaN;
F = fillmissing(A, 'movmedian', 10);

figure; hold on; grid on;
plot(x, F, '.-'); plot(x, A, '.-');
legend({'Filled Missing Data', 'Original Data'});