Normalize a Cell Array between 0 and 1 with the same scale

조회 수: 16 (최근 30일)
Jonas Lipka
Jonas Lipka 2021년 5월 19일
답변: Jonas 2021년 5월 19일
I have a Cell array of 64 cells, each cell contains a Matrix 44x44 with positive values very small values. Now I want the absolute maximum from all cells to be replaced with a 1 and the absolute minimum with a 0. The other values should be scaled accordingly. I tried using
A{1}= normalize(A{1},'range')
but if I normalize the individual cells, the data is distorted because the maximum from cell 5, for example, is not the same as the maximum from cell 10.
Thanks for your help!

답변 (1개)

Jonas
Jonas 2021년 5월 19일
convert your cells to an array, scale the values and convert the array back to cells

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by