%% Create 4-by-5 Java Array
% Create 4-by-5 array of java.lang.Double type.

x1 = 4;
x2 = 5;
dblArray = javaArray('java.lang.Double',x1,x2);

%
% Fill in values.

for m = 1:x1
    for n = 1:x2
        dblArray(m,n) = java.lang.Double((m*10) + n);
    end
end

%
% Display results.

dblArray

% Copyright 2012 The MathWorks, Inc.