How to fit data to another data
조회 수: 2 (최근 30일)
이전 댓글 표시
I have two 1000000x1 vectors of data (data1 and data2). data1 is normalized. Now I need to scale data2 to data1.
댓글 수: 2
lazymatlab
2020년 4월 8일
You need to be more specific. What do you mean by 'scale'? Do you want to multiply a scalar to data2? Or each element of data2 needs to scale individually?
답변 (1개)
Ameer Hamza
2020년 4월 8일
You can try something like this
x % the normalized array
y % the unnormalized array
y_norm = normalize(y, 'range')*(max(x)-min(x))+min(x)
It will make the min() and max() values of x and y same.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!