Create a variable m as a magic square with the size 6 x 6
Magic squares are defined as square matrices, where the sum of all rows and columns are equal.
(Hint: see help magic)
Replace all the numbers above or equal to 20 with zero.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers468
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15807 Solvers
-
First non-zero element in each column
963 Solvers
-
Matrix indexing with two vectors of indices
781 Solvers
-
Find out missing number from a vector of 9 elements
322 Solvers
-
Calculate distance travelled when given radius and rotations
242 Solvers
More from this Author26
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!