필터 지우기
필터 지우기

How do i add a zeroes in every raws?

조회 수: 2 (최근 30일)
Ann Lee
Ann Lee 2022년 4월 1일
댓글: Ann Lee 2022년 4월 1일
hi
I started studying matlab since last week
I want to make a matrix (3x6)
0 0 1 3 5 7
0 0 4 6 8 10
0 0 9 7 5 3
I know i have to use 1:2:7 4:2:10 9:-2:3
but i don't know how to make 0 0 in this row...
Is there a easy way to create this matrix?

채택된 답변

KSSV
KSSV 2022년 4월 1일
A = [1:2:7; 4:2:10; 9:-2:3] ;
iwant = [zeros(3,2) A]
iwant = 3×6
0 0 1 3 5 7 0 0 4 6 8 10 0 0 9 7 5 3

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by