Normalization of a vector
1 次查看(过去 30 天)
显示 更早的评论
How do I normalize an array of double from -1 and +1?
0 个评论
采纳的回答
Stephan
2019-3-18
编辑:Stephan
2019-3-18
result = normalize(v,'range',[-1 1])
where v is your vector
2 个评论
Stephan
2019-3-18
you may also be interested in:
v = [-2 -1 0; 0.5 1.5 2; 0 2 -1]
result = rescale(v,-1, 1)
which works for arrays. Compare the results of both approaches and choose the option that meets your needs.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!