WUT_Computer_Science/ENUME/projectA/matrix4.m
2021-11-12 09:44:22 +01:00

6 lines
297 B
Matlab

function A = matrix4(n)
A = 10 * rand(n); % rand generates 5x5 matrix filled with random numbers
% we multiply by 10 to get at lest one digit in front of the dot
A = floor(A); % we floor the matrix we got to get nice natural numbers matrix
A = A * A'; % we get symmetric matrix
end