matlab_-_introduction
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
matlab_-_introduction [2012/10/06 02:09] – created jochen | matlab_-_introduction [2012/11/12 16:52] (current) – [Command line] jochen | ||
---|---|---|---|
Line 8: | Line 8: | ||
===== Language features ===== | ===== Language features ===== | ||
* the language is easy to use for prototyping, | * the language is easy to use for prototyping, | ||
- | * variables | + | * variables |
* numeric variables are, by default, all created with a standard datatype of **'' | * numeric variables are, by default, all created with a standard datatype of **'' | ||
- | * identifiers can be overloaded (e.g. built-in functions can be replaced by user defined ones) | + | |
+ | | ||
* array indexing is available in multiple ways to simplify element selection (see [[Matlab - datatypes|datatypes and indexing page]]) | * array indexing is available in multiple ways to simplify element selection (see [[Matlab - datatypes|datatypes and indexing page]]) | ||
* array-based operations are highly optimized for speed and mostly support multiple CPU cores | * array-based operations are highly optimized for speed and mostly support multiple CPU cores | ||
- | * memory management is built-in (garbage collection on variables no longer in use) | + | * memory management is built-in (workspace-related |
* Matlab comes with a vast repository of built-in and built-upon functions for mathematical computations, | * Matlab comes with a vast repository of built-in and built-upon functions for mathematical computations, | ||
* functions can return more than one output value/ | * functions can return more than one output value/ | ||
Line 20: | Line 21: | ||
* with a built-in interface to compiled code (MEX), Matlab allows to translate computationally intensive operations (recursion, etc.) into compiled code for speedup | * with a built-in interface to compiled code (MEX), Matlab allows to translate computationally intensive operations (recursion, etc.) into compiled code for speedup | ||
* built-in file format to store the content of variables in a binary format (incl. compression and platform independence) | * built-in file format to store the content of variables in a binary format (incl. compression and platform independence) | ||
+ | |||
+ | ==== Built-in functionality ==== | ||
+ | On top of these features, Matlab comes with many, many built-in functions from a variety of fields, among them are | ||
+ | * mathematical functions (sum, mean, median, mode, standard deviation/ | ||
+ | * list and set related functions (sort, unique, intersect, setdiff, union, etc.) | ||
+ | * rudimentary statistical functions (histogram, correlation coefficient, | ||
+ | * matrix operations (inverse, pseudo-inverse, | ||
+ | * graphical output functions (line, polygon, shape, surface, and scatter plot, annotations, | ||
+ | * GUI functions (figures, controls, callback handling, etc.) | ||
+ | |||
+ | These features make it usually relatively efficient to create code with complex functionality with just a few lines of code. | ||
+ | |||
+ | ==== User-provided toolboxes ==== | ||
+ | Mathworks additionally provides a user-defined toolbox area on their webserver, [[http:// | ||
===== GUI elements ===== | ===== GUI elements ===== | ||
Line 31: | Line 46: | ||
Additionally, | Additionally, | ||
+ | |||
+ | ==== Command line ==== | ||
+ | The command line allows the user to enter commands and inspect returned values (text output intermixed with input). Matlab shows a prompt (**''< | ||
+ | * pressing the **'' | ||
+ | * the **'' | ||
+ | * when entering expressions with parenthesis (precedence of operations, function arguments, etc.) or brackets/ | ||
+ | * if an expression is incomplete (e.g. a **'' | ||
+ | * whenever an error is encountered while processing a line of input, Matlab indicates the exact position of the problem with a vertical line below the input (pipe character) | ||
+ | * output in the command window supports hyperlinks (in help texts for instance), which gives the user to immediately select a topic of reference for additional information | ||
+ | * the **'' | ||
+ | * to change the current folder or load a MAT-file, drag-and-drop operations can be performed with either Finder (Mac) or Explorer (Windows), by dragging a folder or MAT-file name into the command prompt window | ||
+ | |||
+ | ==== Command history ==== | ||
+ | The history window is particularly useful when a series of commands is to be converted into an M-file (batch of function file grouping a set of commands/ | ||
+ | |||
+ | ==== Workspace ==== | ||
+ | Equally, the workspace window offers a context menu, which allows to rename variables, delete them from the workspace (same as **'' | ||
+ | |||
+ | ==== Current folder ==== | ||
+ | The current folder window is a feature-rich file browser, also with additional functionality in the context menu. |
matlab_-_introduction.1349489383.txt.gz · Last modified: 2012/10/06 02:09 by jochen