You must create a n-by-n symmetric matrix such that A(row,col) = row/col for col >= row.
Example if n =3 :
output is :
1.0000 0.5000 0.3333
0.5000 1.0000 0.6667
0.3333 0.6667 1.0000
since A(2,1) = A(1,2) = 1/2
or A(3,1)= A(1,3) = 1/3
Faulty solution that passes the test suite due to ill-defined test criterium in tests 3 and 4: obviously, the function output and A_correct are not the same.
Finding Perfect Squares
Least common multiple of many numbers
Multiply 2 numbers
Magic is simple (for beginners)
Colon operator of two vectors
Cody Computer Part 3 - Detect the graphic card used on Cody Computer
Cody Computer Part 4 : Are you a morning Cody player Addicted ?
Wind outward from the center ...
Get the elements of diagonal and antidiagonal for any m-by-n matrix
Convert a numerical matrix into a cell array of strings
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office