I need help with matrix problem!

Hello guys.I am new to matlab.How can i make matrix(7x7) ,main diagonal all zeros, other elements 1?

 Risposta accettata

Stephen23
Stephen23 il 10 Mar 2016
Modificato: Stephen23 il 10 Mar 2016
>> +~eye(7)
ans =
0 1 1 1 1 1 1
1 0 1 1 1 1 1
1 1 0 1 1 1 1
1 1 1 0 1 1 1
1 1 1 1 0 1 1
1 1 1 1 1 0 1
1 1 1 1 1 1 0

Più risposte (0)

Categorie

Scopri di più su Operators and Elementary Operations in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by