MATLAB: Create Matrix with zeros, ones and some numbers.

MATLABMATLAB and Simulink Student Suitematrixmatrix array

I am struggling to create a following matrix in one go (using as few numbers used as possible). Can someone please help me out?
N =
0 0 0 0 0 1
0 0 0 0 0 1
1 2 3 4 5 1
0 2 4 6 8 1
8 7 2 5 9 1

Best Answer

With 2 "numbers" only:
c = ['0 0 0 0 0 1 ', ...
'0 0 0 0 0 1 ', ...
'1 2 3 4 5 1 ', ...
'0 2 4 6 8 1 ', ...
'8 7 2 5 9 1']
sscanf(c, '%g', [6,5]).'
But it depends on the rules if characters are considered as "numbers". But what does "in one go" mean? Is calling functions like dec2base accepted also? Without dec2base:
floor(rem([1; 1; 123451; 24681; 872591] ./ 10.^(5:-1:0), 10))
Or is this "better":
floor(rem([1; 1; 123451; 24681; 872591] ./ flip(10.^(0:5), 10))