Create an anti-identity matrix - MATLAB Cody - MATLAB Central

Problem 2590. Create an anti-identity matrix

Difficulty:Rate

Create an anti-identity matrix of given dimension.

Examples

 n = 2 
 A = [0 1; 1 0]
 n = 3
 A = [0 0 1; 0 1 0; 1 0 0]

Solution Stats

66.02% Correct | 33.98% Incorrect
Last Solution submitted on Jun 16, 2025

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
2
3

Problem Recent Solvers192

Suggested Problems

More from this Author70

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!