Store one vector range inside another

1 visualización (últimos 30 días)
Luccas S.
Luccas S. el 23 de Jul. de 2022
Respondida: Voss el 23 de Jul. de 2022
How to store the values ​​of vector x, say from x(50,1) to x(100,1)?
I tried in the following way, but it didn't work.
RES_BLOCK_C=X(385,1):X(1921.1)
Ans:
RES_BLOCK_C = 0 1

Respuestas (2)

Jonas
Jonas el 23 de Jul. de 2022
put the : range expression in the braces to select a range if a vector:
vec=1:10
part=vec(5:8)

Voss
Voss el 23 de Jul. de 2022
RES_BLOCK_C = X(385:1921,1);

Categorías

Más información sobre Environment and Settings 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