Perform a program that graphs the letter "x inside a box" of size n

1 次查看(过去 30 天)
Perform a program that graphs the letter "x inside a box" of size n

回答(1 个)

tesarj13
tesarj13 2018-10-26
box_size = 100;
box = zeros(box_size);
v = 1:box_size+1;
box(1:box_size+1:end) =1;
box(box_size:box_size-1:end) =1;
imshow(box)
Is that what you want?

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by