MATLAB Community

MATLAB, community & more

Just give me a new line!

Typing several commands to run at the command line can be tedious and hard to read. After typing in several long commands, the text scrolls way over and it is hard to see exactly what has been typed. In the example below, I typed several commands to generate the quiver plot.

shiftenter1.jpg

To make the code easier to read and to make MATLAB wait while you type more commands, hit shift-enter as you enter commands. This adds a new line in the Command Window without executing the code that has already been typed. Another advantage of using shift-enter to type commands in the Command Window is that the commands are added to the Command History as separate commands instead of as one big command.

shiftenter2.jpg

This example is from the 3-D Demo, Quiver section.

|
  • print

コメント

コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。