Create a row matrix with different step size

7 visualizaciones (últimos 30 días)
Lily
Lily el 4 de Mayo de 2015
Comentada: Lily el 4 de Mayo de 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)

Respuesta aceptada

Brendan Hamm
Brendan Hamm el 4 de Mayo de 2015
Just utilize the concatenation operator [ ]
x = [1:4 100:50:200];

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by