0
$\begingroup$

I have a two-dimensional array ($569\times30$ double) which should be normalized using this formula:

$x'_{ij} = \dfrac{x_{ij}}{10^h} $

What is the name of this normalization and how can I do that in Matlab?

Edit:

$h$ is depended on array entries, it should be a decimal number to make all data between desired min and max values.

  • 2
    So it's a constant determined by the given array, rather than by the array's entries. You should specify that in your post, as it will make a difference in the implementation.2012-11-26

2 Answers 2

1

Assuming you have a matrix X with a desired minimum and maximum for the entire matrix, then it is not hard to find upper and lower bounds for h:

ratio_max = max(X)/maximum; ratio_min = min(X)/minimum; h_min = log10(ratio_max) h_max = log10(ratio_max) 

Note that depending on your input, h_min might be larger than h_max in which case there is no valid value for which your criteria are met. Also the value might not be finite, in which case this solution might require a manual adjustment.

Now, just pick a value to normalize with, for example somewhere in the middle of the range and perform the operation:

h = (h_min + h_max)/2; X_normalized = X / 10^h; 
  • 0
    I would just call it "normalization": that's the name for dividing all numbers by a certain value such that a given maximum is not exceeded. What I don't see is how at the same time you can make all numbers greater than a given minimum. The two conditions cannot be simultaneously met in the general case2013-11-04
0

Final m-file is:

function [normalized] = p1_normalize_h(dataset) dataset_max = max(max(dataset)); dataset_min = min(min(dataset)); h = max(abs(dataset_min), abs(dataset_max)); h = log10(h); normalized = dataset / 10^h;