annotate general/numerical/rescale.m @ 6:0ce3c2070089
Removed duplicate code and fixed doc in timed_action.
author |
samer |
date |
Mon, 14 Jan 2013 14:33:37 +0000 |
parents |
e44f49929e56 |
children |
8476b3d9d295 |
rev |
line source |
samer@4
|
1 function B=rescale(A,mx), B=A/max(A(isfinite(A)));
|
samer@4
|
2 % rescale - rescale array values so maximum value is MX
|
samer@4
|
3 %
|
samer@4
|
4 % rescale :: [DIM->real], real -> [DIM->real]
|
samer@4
|
5 %
|
samer@4
|
6 % eg, B=rescale(A,10)
|
samer@4
|
7 % returns matrix K*A such that maximum finite value is 10
|
samer@4
|
8
|