Intention of the program is to take the scalar as the argument names n and to return the matrix of size 2nx2n. Such that the elements of the matrix will be like The elements of the submatrix in the top left corner are all 1s the elements of the submatrix at the top right are 2s the elements in the bottom left are 3s and the elements in the bottom right are 4s.
function [Q] = quadrants(n)
Q = [ones(n) ones(n)+1 ; ones(n)+2 ones(n)+3];
end
function [Q] = quadrants(n)
Q = [ones(n) ones(n)+1 ; ones(n)+2 ones(n)+3];
end
No comments:
Post a Comment