Create a row matrix with different step size

조회 수: 13 (최근 30일)
Lily
Lily 2015년 5월 4일
댓글: Lily 2015년 5월 4일
I am looking for something like [1 2 3 4 100 150 200] 1:1:4 (step size 1) and the rest 100:50:200 (step size 50)

채택된 답변

Brendan Hamm
Brendan Hamm 2015년 5월 4일
Just utilize the concatenation operator [ ]
x = [1:4 100:50:200];

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by