03 - Matrix Variables 2 - MATLAB Cody - MATLAB Central

Problem 1798. 03 - Matrix Variables 2

Difficulty:Rate

Make the following variable:

A 9x9 matrix of zeros, but with the following values on the main diagonal:

(Hint: use diag)

Solution Stats

64.32% Correct | 35.68% Incorrect
Last Solution submitted on Jun 07, 2025

Problem Comments

Solution Comments

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

Problem Recent Solvers602

Suggested Problems

More from this Author26

Community Treasure Hunt

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

Start Hunting!