creat matrix with specific row element
이전 댓글 표시
Create a matrix of 100 rows and 100 columns. The odd columns should contain values 2, and the even columns, values 0
답변 (1개)
KSSV
2020년 10월 16일
iwant = zeros(100) ;
iwant(:,1:2:end) = 2 ;
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!