File Exchange

image thumbnail

Data scaling

version 1.0 (606 Bytes) by

Program to scale the values of a matrix from a user specified minimum to a user specified maximum

20 Downloads

Updated

No License

Program to scale the values of a matrix from a user specified minimum to a user specified maximum

Usage:
outputData = scaleData(inputData,minVal,maxVal);

Example:
a = [1 2 3 4 5];
a_out = scaledata(a,0,1);

Output obtained:
           0 0.1111 0.2222 0.3333 0.4444
      0.5556 0.6667 0.7778 0.8889 1.0000

Comments and Ratings (16)

Andrew Venzie

Andrew Venzie

Thanks!

Kin Sung Chan

Excellent! Thank you.

Umair

Umair (view profile)

Praveen

it is not working if the matrix is 2x1

??? Undefined function or method 'scaledata' for input arguments of type
'double'.

Steven

Steven (view profile)

Thanks!

Dustin Dorroh

fix usage documentation from scaleData to scaledata

hooman1988

but dont resolve my problem and give me error in matlab 7.11.0.please help me

hooman1988

thanks alot

Mehdi Hassan

thanks

Ravi Kumar

thank you very much

Anna B

Excellent!

MATLAB Release
MATLAB 7.0.1 (R14SP1)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video