Attach your image, and give an example of one row and column location that does not have the same values in both programs. Neither imread() nor rgb2gray() gives positions, much less negative positions, so I don't know what you're trying to explain with that statement.
The formula that MATLAB gives for conversion of RGB to gray scale is gray = 0.2989 * R + 0.5870 * G + 0.1140 * B. What is the formula ImageJ uses? Accordint to it's web page, it's this: "RGB images are converted to grayscale using the formula gray=(red+green+blue)/3 or gray=0.299red+0.587green+0.114blue if "Weighted RGB to Grayscale Conversion" is checked in Edit>Options>Conversions." so it's the same formula as MATLAB.
So the only way to resolve this is for you to upload an image that gives different values in each program. Use the paper clip icon.