Main Content

home

Send cursor home

Syntax

Description

example

homemoves the cursor to the upper-left corner of the Command Window.homealso scrolls all visible text in the Command Window out of view, giving the appearance of clearing the screen without deleting any text. After running thehomecommand, you can use the scroll bar to view the previously displayed text.

Usehomein a MATLAB®code file to always display output in the same starting position on the screen without clearing the Command Window.

Examples

collapse all

Use themagicfunction to create and display a5-by-5integer matrix in the Command Window.

magic(5)
ans =5×517 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9

Run thehome函数来滚动displayed matrix and any other visible text out of view and to move the cursor to the upper-left corner of the Command Window.

home

Use the Command Window scroll bar to scroll back up and see the hidden text.

Version History

Introduced before R2006a

See Also