Hi
I have triangle signal starting from different negative values go to positive values and comeback to negative values. I want them to normalize between 0 and 1 so that there starting values will be same Itried to use this formula.
" normalized_data = data-min(data)/max(data)-min(data)"
by using above values I can align maximum values and ending points but I want to allign its starting point and its maximum point. Can any one help me what should I do.
Regrads,
Haziq

 채택된 답변

Akira Agata
Akira Agata 2020년 2월 25일

0 개 추천

To normalize data to [0 1], you need to add ( ) correctly, like:
normalized_data = (data-min(data))/(max(data)-min(data));
Another (and more easy) way is to use rescale function.
normalized_data = rescale(data);

추가 답변 (1개)

Steven Lord
Steven Lord 2020년 2월 26일

1 개 추천

Use the normalize function.

댓글 수: 1

Hi,
Thanks for replying. I use the normalize function I am unable to allign starting points of the signals.
regards,
Haziq

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

질문:

2020년 2월 25일

댓글:

2020년 2월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by