How to create a matrix?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
jack star
el 2 de Abr. de 2016
Comentada: jack star
el 2 de Abr. de 2016
Hi all, I am trying to create a matrix (101x101) like this :

Can anyone help me with the code please?
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 2 de Abr. de 2016
Editada: Azzi Abdelmalek
el 2 de Abr. de 2016
n=4 % in your case use n=101
out=tril(2*ones(n),-1)
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!