Maybe I found it.... :-)
External offset
rng('default')
x = rand(30,1);
y = rand(30,1);
k = boundary(x,y);
polyout1 = polybuffer([x(k),y(k)],'lines',0.05);
a = find(isnan(polyout1.Vertices(:,1)));
% for the external offset you need "polyout1.Vertices(1:a,:)"
figure
hold on
plot(x,y,'.')
plot(x(k),y(k),'Color','r','Linewidth',2);
plot(polyout1.Vertices(1:a,1),polyout1.Vertices(1:a,2),'Color','b','Linewidth',2);
xlim([-0.2 1.2])
ylim([-0.2 1.2])
Internal offset
rng('default')
x = rand(30,1);
y = rand(30,1);
k = boundary(x,y);
polyout1 = polybuffer([x(k),y(k)],'lines',0.05);
a = find(isnan(polyout1.Vertices(:,1)));
% for the internal offset you need both plots, i.e. with "polyout1.Vertices(a:end,:)" and
% with "polyout1.Vertices([a+1, end],:)"
figure
hold on
plot(x,y,'.')
plot(x(k),y(k),'Color','r','Linewidth',2);
plot(polyout1.Vertices(a:end,1),polyout1.Vertices(a:end,2),'Color','g','Linewidth',2);
plot(polyout1.Vertices([a+1, end],1),polyout1.Vertices([a+1, end],2),'Color','g','Linewidth',2);
xlim([-0.2 1.2])
ylim([-0.2 1.2])