This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Send cursor home





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

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


collapse all

Use the magic function to create and display a 5-by-5 integer matrix in the Command Window.

ans = 5×5

    17    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 the home function to scroll the displayed matrix and any other visible text out of view and to move the cursor to the upper-left corner of the Command Window.


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

See Also

Introduced before R2006a