size = 5 a = fill(' ', size, size) for i in 1:size a[i; i] = '*' a[end - i + 1; end - i + 1] = '*' end