%% Convert Numeric Array
% Create a numeric array.

D = [1023 122 14];

%
% To represent the elements of D as binary values, use the dec2bin function. Each row of binStr corresponds to an element of D.

binStr = dec2bin(D)

%
% Since all rows of a character array must have the same number of characters, dec2bin pads some rows of binStr. For example, the number 14 can be represented by the binary digits '1110'. But to match the length of the first row of binStr, the dec2bin function pads the third row to '0000001110'.
% Copyright 2019-2020 The MathWorks, Inc.