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?


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

  • 1
    $\begingroup$ What exactly is $h$? Is it some fixed constant, or does it depend on $i,j$? $\endgroup$ Nov 26, 2012 at 20:02
  • $\begingroup$ its depend on data, it should be a decimal number to make all data between desired min and max $\endgroup$ Nov 26, 2012 at 20:07
  • 2
    $\begingroup$ 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. $\endgroup$ Nov 26, 2012 at 20:09

2 Answers 2


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;
  • $\begingroup$ What is the name of this normalization? has Matlab any implementation for this normalization. $\endgroup$ Nov 27, 2012 at 13:50
  • 1
    $\begingroup$ Unfortunately I can't say that I heard about this before, given this I wonder whether it even has a name. As for an implementation, the code I have provided should allow you to implement it directly. $\endgroup$ Nov 27, 2012 at 13:53
  • $\begingroup$ 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 case $\endgroup$
    – Luis Mendo
    Nov 4, 2013 at 21:26

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;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .