Create a row matrix with different step size

82 views (last 30 days)
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)

Accepted Answer

Brendan Hamm
Brendan Hamm on 4 May 2015
Just utilize the concatenation operator [ ]
x = [1:4 100:50:200];

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!