In the example given in Matlab Built-In Functions section, the Matlab showed the answers
A=2.7987e+03 for part-a and
A=3.0237e+03 in part-b. This is the default display format of Matlab. And with the command,
>> format long g
>> P=2000; r=0.08; t=4.2;
The Matlab will display the answer in this way. The next Table lists the different display formats.
NOTE: This is the default format.
By using the command
>> help format we can find every information about different formats in Matlab. Similarly, we can use the help command to display help text in command window. Try the following commands:
>> help who
>> help sqrt
>> help clc
If you wish to clear the command window, just type
>> clc and press Enter. And if you wish to use or edit the previous commands, just press the up-arrow and the earlier used commands will be displayed. For example,
>> I (cursor) Press the up-arrow button.
The next table lists some more useful Matlab commands.
||Clear the command window.|
||Remove all variables from the memory.|
||Remove only x, y, z variables from the memory.|
||Display a list of variables currently in the memory.|
||Display variables currently in memory with detailed information.|
||List the help topics.|