I hope there is a MATLAB function similar to this Arduino function: http://arduino.cc/en/Reference/map
Basically, I have a temporary variable with 67 data points in the range from 0 to 1.15, and I want to match this value from 0 to 100% (for example, 101 data points). In Arduino, which will look something like this:
map(value, fromLow, fromHigh, toLow, toHigh)
I can use interp1 in MATLAB to get 101 data points, but I just get 101 data points between 0 and 1.15. I know that I can simply multiply each value by 100 / 1.15, but this is inaccurate. Is there a more elegant way to do this in MATLAB, which I skip?
(This post looked encouraging, but it's not what I'm looking for: Map function in MATLAB? )
thanks
source share