I was given a data set that is essentially an image, however each pixel in the image is represented as a value from -1 to 1 inclusive. I am writing an application that needs to take these -1 to 1 grayscale values and map them to the associated RGB value for the MATLAB “Jet” color scale (red-green-blue color gradient).
I am curious if anyone knows how to take a linear value (like -1 to 1) and map it to this scale. Note that I am not actually using MATLAB for this (nor can I), I just need to take the grayscale value and put it on the Jet gradient.
Thanks,
Adam
I hope this is what you’re looking for:
I’m not sure if this scale is 100% identical to the image you linked but it should look very similar.
UPDATE
I’ve rewritten the code according to the description of MatLab’s Jet palette found here