Filter löschen
Filter löschen

Write a function drawBox which draws boxes on the screen

1 Ansicht (letzte 30 Tage)
rim
rim am 2 Dez. 2016
Kommentiert: rim am 2 Dez. 2016
Write a function drawBox which draws boxes on the screen. The function is called with a character (ch) as the first argument and two positive integers which represent the width and the height of the box to be drawn. It automatically draws a box with the character (ch) by the specified width and height.
for example : drawbox('A';10;6)
  11 Kommentare
Adam
Adam am 2 Dez. 2016
['A' repmat( ' ', [1 8] ) 'A']
can produce one of the central lines. The top and bottom lines are even simpler. Then you just have to work out how to put it on the screen and use the input arguments rather than hard-coding numbers in.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KSSV
KSSV am 2 Dez. 2016

Weitere Antworten (0)

Kategorien

Mehr zu Time Series Objects finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by