Create a row matrix with different step size

15 Ansichten (letzte 30 Tage)
Lily
Lily am 4 Mai 2015
Kommentiert: Lily am 4 Mai 2015
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)

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by