normalize the vector by taking the difference from the first element

1 次查看(过去 30 天)
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?

采纳的回答

Chunru
Chunru 2021-7-28
T = [1; 2; 3];
T1 = T -T(1)
T1 = 3×1
0 1 2

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by