Math and Programming with MATLAB (original) (raw)

Using of MatLab in the Mathematical Education

2019

MATLAB is a multi-paradigm numerical computing environment. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages. In the paper, there is an explanation for solving problems in the field of mathematics, solved in the Matlab programming language. The goal is to show that Matlab is a user-friendly programming language, so it is easy to use. Commands are invoked in a very simple way with a simple syntax, where in comparison with other programming languages; they require detailed knowledge of the language itself

A Whirlwind Tour of Matlab

2005

This document is intended as a very brief introduction to the software package MATLAB, for students in the course MACM 316. It contains only just enough to get you started on the assignments, and so I would highly encourage you to explore MATLAB's capabilities on your own. Many other MATLAB tutorials, guides and manuals are available, but (IMHO) most tend to be long-winded and intimidating for the student who requires a knowledge of only a small subset of the language's commands. My aim here is to give you the basics in 20 pages or less. For a more comprehensive treatment, please refer to other books and tutorials. .. a short list is included in the Bibliography. In particular, you may find the online tutorials [2], [3] and [7] quite helpful. Throughout this document, certain standard conventions are used. MATLAB commands, which are intended to be typed at the MATLAB prompt, are displayed in a blue typewriter font. Corresponding output from MATLAB is shown in a black typewriter font. 2 MATLAB fundamentals "MATLAB" stands for "Matrix Laboratory." It is an interactive software program for performing numerical computations. MATLAB was initially designed by Cleve Moler in the 1970s for use as a teaching tool, but it has since become a very successful commercial package. One of MATLAB's best features, from the point of view of the computational scientist, is its large built-in library of numerical routines and graphical visualisation tools. Running MATLAB: To start MATLAB, you simply type the command matlab at your prompt, or if you are using Windows on the SFU Network, then click on the "MATLAB" icon. You will be presented with a text window that contains the MATLAB prompt: >> This is the signal that MATLAB is waiting for you to type a command. Directories and files: MATLAB can only access files that are in its working path or in the "currect working directory." My suggestion is that you save all of your files in the directory f:\macm316\matlab\. 1 Every time you start up MATLAB, it is a good idea to switch into this directory using the command: >> cd 'f:\macm316\matlab\' The single quotes are important! Note: When presented with MATLAB commands in blue, you should type in the command not including the prompt, ">>". After executing the above command, you are ensured that you will have access to all of the files in this directory, and that all of your output and plot files will be saved to the same directory. Two other useful commands are pwd, which prints the current working directory, and dir, which gives a listing of your files. An alternate (and more permanent) way to allow MATLAB access to your files, particularly if they reside in more than one directory, is to modify MATLAB's "search path," which is a list of directories to search for files. You can change the search path either using the path command or, if you are working on a Windows machine, by selecting the 'Options-> Change Path' menu item. Getting help: The most useful command in MATLAB is help. Use it liberally and use it often. For example, typing help plot will display documentation on the plotting command. You will often find that the text window