MATLAB: Is it possible to make an image in GUI matlab which is not predefine but define by user input

matlab gui

is it possible to make an image in GUI matlab which is not predefine but define by user input?

Best Answer

n = input('how big a square do you want?');
v = input('how bright do you want, 0-255');
MyImage = zeros(n,n,'uint8');
MyImage(:) = v;
image(MyImage);
colormap(gray(256))
Related Question