mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 21:43:08 +02:00
6 lines
297 B
Matlab
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 |