`x= 1:150;y=1:150;[p,q]=freqspace(150);[X,Y]=meshgrid(p,q);R=(X.^2 + Y.^2);Lambda=633*10^-9;dis=10*10^-3;F = (exp(i.*pi.*R))./(Lambda.*dis);mesh(imag(F));there is an ouput which i have to convert into gray image.HOW to convert into gray image...i have an error Map myst be m*3 matrix?how will i do this?`

# MATLAB: RGB TO GRAY ERROR

image processingImage Processing Toolbox

## Best Answer