<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">

Exported from Notepad++
clear all; close all; clc; a=[1 2 3;5 7 6; 4 5 6]; b=padarray(a,[1 1],'replicate'); disp(b);