creat matrix with specific row element
Ältere Kommentare anzeigen
Create a matrix of 100 rows and 100 columns. The odd columns should contain values 2, and the even columns, values 0
Antworten (1)
KSSV
am 16 Okt. 2020
iwant = zeros(100) ;
iwant(:,1:2:end) = 2 ;
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!