Write a function called quadrants that takes as its input argument a scalar integer named n. The function returns Q, a 2n-by-2n matrix. Q consists of four n-by-n submatrices. 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.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers138
Suggested Problems
-
Increment a number, given its digits
686 Solvers
-
630 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1265 Solvers
-
402 Solvers
-
Test Problem; Create a 5x5 array containing all ones
405 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!