MATLAB: How to set the range of the minimum and maximum values in a matrix or table data to another range

data importimporting excel datamatrix manipulationtable

I have data in a spreadsheet with a maximum value of over 28 million and lowest of 0, I want to reset the range of the maximum and minimum to -1 to 1 or 0 to 10.

Best Answer

Divide your data by half their maximum value and subtract 1 to get your data in the range [-1:1].
Or divide your data by their maximum value and multiply by 10 to get your data in the range [0:10].
Best wishes
Torsten.