MATLAB: How to write a range of values from minimum to maximum in black and white image display

transfer function

i write:
figure;
imshow(image);
caxis;
[min(min(image)); max(max(image)))];
colorbar %black&white
and the Error is: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched
delimiters.

Best Answer

I = imread(image) ; % give your image name
imshow(I) ;
I0 = min(I(:)) ; % min value
I1 = max(I(:)) ; % max value