How to manipulate data between two numbers?

I have multiple vectors and numbers in all of them lie between 0 and 1, I want to do 'normalize' the data such that the maximum point in each vector now definitely touches 1 and minimum point definitely touches 0 and numbers in between gets manipulated accordingly.
How can I do this?

 채택된 답변

dpb
dpb 2018년 7월 7일

0 개 추천

Any number of ways; a couple...
z=interp1([min(x) max(x)],[0 1],x);
b=polyfit([min(x) max(x)],[0 1],1);
z=polyval(x);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

릴리스

R2017a

질문:

2018년 7월 7일

답변:

dpb
2018년 7월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by