Creation of a matrix (24,72) with unit lower triangular matrix?

7 vues (au cours des 30 derniers jours)
ET-TAOUSSI mehdi
ET-TAOUSSI mehdi le 2 Fév 2016
Hello. I want to create a matrix M5(24,72) (see fig) using a unit lower triangular matrix.

Réponse acceptée

Matt J
Matt J le 2 Fév 2016
M5 = kron( tril(ones(24)),[1,0,0] )

Plus de réponses (1)

James Tursa
James Tursa le 2 Fév 2016
Modifié(e) : James Tursa le 2 Fév 2016
Try this (caution, untested):
M5 = zeros(24,72);
M5(:,1:3:end) = tril(ones(24,24));

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by