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

7 ビュー (過去 30 日間)
Chroma Prime
Chroma Prime 2018 年 10 月 26 日
回答済み: tesarj13 2018 年 10 月 26 日
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 Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by