normalize the vector by taking the difference from the first element

1 visualización (últimos 30 días)
Suppose I have a vector
T
1
2
3
Then I want to normallize T by taking the difference from the first element
T1
0 (=1-1)
1 (=2-1)
2 (=3-1)
How can I simplify the calculation?

Respuesta aceptada

Chunru
Chunru el 28 de Jul. de 2021
T = [1; 2; 3];
T1 = T -T(1)
T1 = 3×1
0 1 2

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by