curso tartu matlab

Upload: mariana-rocha

Post on 14-Feb-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/23/2019 Curso Tartu Matlab

    1/1

    1. The semicolon can be used to construct arrays, suppress output from a Matlabcommand, or to separate commands entered on the same line.

    2. The percent sig is most commonly used to indicate non executable text withinthe body of a program. This text is normally used to include comments in your code. Some functions also interpret the percent sign as a conversion specifier.

    3. Clc clears all input and output from the command window display, giving you a"clean screen". After using clc, you cannot use the scroll bar to see the history of functions, but you, still can use the up arrow key, to recall statements from the command history.

    4. Clear removes all variables from the current workspace, releasing them from system memory.

    5. o ^ often represents power . For example, the higher the B and A ^ B .

    6. Cosine of argument in degrees.Y=cosd(x) returns the cosine of the elements of X, which are expressed in degree

    s.

    7. Matlab is not completely case sensitive. Matlab is case sensitive for variable names and built-in function. For a scripts and functions stored is a Matlab file which a.m extension, case sensitivity is preserved on unix platforms but notor windows platforms.

    8. A valid variable name starts with a letter, followed by letters, digits, or underscores. MATLAB is case sensitive, so A and a are not the same variable. Themaximum length of a variable name is the value that the namelengthmax command returns.

    9. Because i and j are both functions denoting the imaginary unit:

    http://www.mathworks.co.uk/help/matlab/ref/i.htmlhttp://www.mathworks.co.uk/help/matlab/ref/j.htmlSo a variable called i or j will override them, potentially silently breaking code that does complex maths.Possible solutions include using ii and jj as loop variables instead, or using 1i whenever i is required to represent the imaginary unit