I am new to MATLAB and I want to write a simple program to generate an n x n matrix A such that:
1. a11 = 2
2. a22 = ... = ann = 5
3. 0 everywhere else
Can the program take n as an argument? So that I will have to choose an n every time I run the program.
Thanks!