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

1 次查看(过去 30 天)
is it possible to make an image in GUI matlab which is not predefine but define by user input?

采纳的回答

Walter Roberson
Walter Roberson 2015-11-29
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))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by