Cheatsheet Matlab
Cheatsheet Matlab
System commands Conditionals and loops • Warnings: empty matrices are NOT overwritten ([] + 1 = []).
addpath(string) adds path to workspace for i=1:n Rows/columns are added without warning if you write in a
genpath(string) gets strings for subfolders procedure Iterates over procedure nonexistent row/column. Good practise: Use 3i rather than
pwd Current directory end incrementing i from 1 to n by 1 3*i for imaginary number calculations, because i might have
mkdir Makes new directory been overwritten by earlier. 1/0 returns inf, not NaN. Dont
tempdir Temporary directory use == for comparing doubles, they are floating point
inmem Functions in memory while(criteria) precision for example: 0.01 == (1 − 0.99) = 0.
exit Close matlab procedure Iterates over procedure
dir list folder content end as long as criteria is true(1) Copyright c 2015 Thor Nielsen ([email protected])
ver lists toolboxes http://www.econ.ku.dk/pajhede/