How to create a custom Matrix following a set of parameters
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Razvan Alexandru
am 24 Okt. 2021
Kommentiert: Razvan Alexandru
am 24 Okt. 2021
Hi, i'd like some help creating a matrix following these rules:
The matrix should have "n" number of rows and "n+1" number of colums.
now depending on the elements position in the matrix i'd like certain outputs.
I'll call position in the row "i" and position in column "j"
if i=j, the element should be 2.
if |i-j| = 1, the element should be -1
everything else = 0.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!