Matlab Tricks

Matlab Tricks thumbnail
Streamline your MATLAB experience with shortcuts.

MATLAB is a computer software package used for a variety of purposes, including programming, graphical modelling and mathematical problem solving. In MATLAB, you enter commands into a Command Window and compile them into a sequence that carries out a certain procedure for you. Although MATLAB takes some time to get used to, and even longer to master, there are a few tricks, such as getting help with commands that new and old users may find useful.

  1. Help

    • New users may be overwhelmed by the sheer number of built-in functions and commands that can be entered into MATLAB. This is made all the more difficult because the commands must be formatted perfectly -- a single comma or bracket out of place will cause the whole command to fail. Luckily, you can type “>> help commandname” (without quotations) to get help on any command. You can even type “help help” to get assistance with the help feature itself.

    Demo

    • Because there are so many commands in MATLAB, and because each one is associated with its own learning curve, the “Demo” feature is included, which provides demos of many of the options available to you in MATLAB. This brings up the help files associated with the particular command from the help browser, assuming there is a demo available for it. Use the following format to access this preview feature: >>demo subtopic category.

    Customization and Personalization

    • The following commands are useful in customizing and personalizing the MATLAB experience: “>>matlab –nosplash” will stop the splash screen from appearing every time you load up the program; “>>matlab –nodesktop” takes you to text-only mode, which some users prefer. Typing “>>format compact” at the start of a session makes the output area smaller, and “>>info” returns information on the version of MATLAB you’re running. Another very useful command is round(VAR), which rounds the value or variable in parentheses to the nearest integer.

    Startup Commands

    • You might have preferences over how you like MATLAB to be displayed or certain commands you know you’ll need to run when you start up MATLAB, at least for the foreseeable future. It can be annoying to type these commands out every time you load the program, but you can get around this by creating a file called “startup.m” in the MATLAB folder, and placing any commands you want in it. These will run automatically on startup.

Related Searches:

References

  • Photo Credit Thinkstock/Comstock/Getty Images

Comments

Related Ads

Featured