normalize the vector by taking the difference from the first element

조회 수: 1(최근 30일)
alpedhuez
alpedhuez 2021년 7월 28일
댓글: alpedhuez 2021년 7월 28일
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개)

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by