2021-01-13T05:55:48+03:00[Europe/Moscow] en true Command Window, MATLAB command prompt, symbol used to end/suppress a command in MATLAB, symbol used to add a comment in MATLAB, command used to clear the command window in MATLAB, symbol for addition in MATLAB, symbol for subtraction in MATLAB, symbol for multiplication in MATLAB, symbol for division in MATLAB, exponentiation in MATLAB, order of operations in MATLAB, format short:, format long:, format short e:, format long e:, format short g:, format long g:, format bank:, format compact:, sqrt(x):, exp(x):, abs(x):, log(x):, sin(x):, sind(x):, asin(x):, asind(x):, function of "=" in MATLAB, only type of character a variable may begin with, maximum length of a variable name in MATLAB, types of characters a variable name may contain, "clear" command, "clear var1 var2" command, exist ('name') command, "quit" or "exit" command, [space key], "who" command, "whos" command, Ctrl+C, Ctrl+Break commands, "up arrow" commands, "Iskeyword" command, "ans", "eps", "i" or "j", Inf, NaN, pi, Ctrl+C, Ctrl+Break commands, m-file, character an m-file must begin with, maximum length of an m-file name in MATLAB, types of characters an m-file name can contain, type of character an m-file name cannot contain, character string the m-file section headings start with, how to run an entire m-script file, how to run a particular section of an m-script file, simple array, two-dimensional array, characters used to define arrays, term that determines the starting number in a one-dimensional vector, term that determines the spacing in a one-dimensional vector, term that determines the ending point in a one-dimensional vector, assumed spacing if only two terms are entered in a one dimensional vector, command used to call out the kth element in a row or column vector, command used to called out the mth-nth elements in a row or column vector, command used to call out the entire row or column vector, command used to call out the element in row "K" and column "P" of a matrix, command used to call out the elements in column "n" of a matrix, command used to call out the elements in row "n" of a matrix, mean (A) function for arrays, max (A) function for arrays, min (A) function for arrays, [d,n]= max(A) function for arrays, [d,n]=min(A) function for arrays, sum (A) function for arrays, sort (A) function for arrays, how to display an output flashcards

MATLAB (Matrix Laboratory)(from TinyCards)

Custom-made for a computing class. (40 people favorited this deck on TinyCards.) (This deck's full version used to be on an amazing spaced-learning service called Tinycards. You can see the original version in all its former glory here: https://web.archive.org/web/20200829094328if_/https://tinycards.duolingo.com/decks/4wAxLC5j/matlab-matrix-laboratory (but you unfortunately can't study it from there).

  • Command Window
    used to communicate with MATLAB through various commands and used for executing commands, running scripts, and opening other windows
    used to communicate with MATLAB through various commands and used for executing commands, running scripts, and opening other windows
  • MATLAB command prompt
    >>
  • symbol used to end/suppress a command in MATLAB
    ;
  • symbol used to add a comment in MATLAB
    %
  • command used to clear the command window in MATLAB
    clc
  • symbol for addition in MATLAB
    +
  • symbol for subtraction in MATLAB
    -
  • symbol for multiplication in MATLAB
    *
  • symbol for division in MATLAB
    /
  • exponentiation in MATLAB
    symbol: ^ ; Used to raise variables/numbers to a power and is not the same as the exponential function.
  • order of operations in MATLAB
    1. parenthesis (innermost first) 2. exponentiation 3. multiplication/division (equal) 4. addition/subtraction (equal)
  • format short:
    fixed point with 4 decimal digits within the range of 0.001 to 1000
  • format long:
    fixed point with 15 decimal digits with the range of 0.001 to 1000
  • format short e:
    Scientific notation with 4 decimal digits
  • format long e:
    Scientific notation with 15 decimal digits
  • format short g:
    best of 5 digit fixed or floating point
  • format long g:
    Best of 15 digit fixed or floating point
  • format bank:
    2 decimal digits (good for analysis that involves currency)
  • format compact:
    removes extra blank lines
  • sqrt(x):
    function that returns the square root of x
  • exp(x):
    returns the exponential of x
  • abs(x):
    returns the absolute value of x
  • log(x):
    returns the natural log of x
  • sin(x):
    returns the sine of angle x (x is in radians)
  • sind(x):
    returns the sine of angle x (x is in degrees)
  • asin(x):
    returns the inverse sine (arcsin) in radians of value x
  • asind(x):
    returns the inverse sine (arcsin) in degrees of value x
  • function of "=" in MATLAB
    assigns a new value to a variable
  • only type of character a variable may begin with
    letter
  • maximum length of a variable name in MATLAB
    63 characters
  • types of characters a variable name may contain
    letters, numbers, and the underscore character
  • "clear" command
    removes all variables from memory
  • "clear var1 var2" command
    removes the specific variables var1 and var2 from memory
  • exist ('name') command
    determines if a file or a variable exists with the name 'name'
  • "quit" or "exit" command
    stops MATLAB
  • [space key]
    ignored in equations by MATLAB
  • "who" command
    lists the variables in current memory
  • "whos" command
    lists the current variables and sizes, and indicates if they have imaginary parts
  • Ctrl+C, Ctrl+Break commands
    stops execution of a program
  • "up arrow" commands
    up arrow at the command prompt recalls previous command
  • "Iskeyword" command
    Lists all keywords used in MATLAB
  • "ans"
    most recent answer; this will be overwritten every time something is evaluated but not assigned to a variable
  • "eps"
    specifies accuracy of floating point precision
  • "i" or "j"
    may be used for the imaginary value "square root of -1"
  • Inf
    infinity
  • NaN
    stands for "Not a Number"; indicates an undefined numerical result
  • pi
    The value of pi
  • Ctrl+C, Ctrl+Break commands
    can be used to unfreeze MATLAB if it locks up
  • m-file
    script/computer program made by MATLAB
  • character an m-file must begin with
    letter
  • maximum length of an m-file name in MATLAB
    63 characters
  • types of characters an m-file name can contain
    letters, numbers, and the underscore character
  • type of character an m-file name cannot contain
    space
  • character string the m-file section headings start with
    %%"space character"
  • how to run an entire m-script file
    click on the "run" icon in the ribbon when the Editor tab is selected
  • how to run a particular section of an m-script file
    click on any code in that section to highlight the section, then click on "run section"
  • simple array
    One-dimensional array; a number list in a row or column; vector
  • two-dimensional array
    numbers in rows and columns; matrix
  • characters used to define arrays
    Square brackets ("[]")
  • term that determines the starting number in a one-dimensional vector
    first term in the vector
  • term that determines the spacing in a one-dimensional vector
    middle term in the vector
  • term that determines the ending point in a one-dimensional vector
    third and final term in the vector
  • assumed spacing if only two terms are entered in a one dimensional vector
    1
  • command used to call out the kth element in a row or column vector
    variable_name (k)
  • command used to called out the mth-nth elements in a row or column vector
    variable_name(m:n)
  • command used to call out the entire row or column vector
    variable_name(:)
  • command used to call out the element in row "K" and column "P" of a matrix
    variable_name (K, P)
  • command used to call out the elements in column "n" of a matrix
    variable_name(:, n)
  • command used to call out the elements in row "n" of a matrix
    variable_name(n,:)
  • mean (A) function for arrays
    returns the mean or average value of the elements in vector A
  • max (A) function for arrays
    returns the largest value of the elements in vector A
  • min (A) function for arrays
    returns the smallest value of the elements in vector A
  • [d,n]= max(A) function for arrays
    returns the largest value of the elements (d) and the position of the element (n) in vector A
  • [d,n]=min(A) function for arrays
    returns the smallest value of the elements (d) and the position of the element (n) in vector A
  • sum (A) function for arrays
    returns the sum of the elements in vector A
  • sort (A) function for arrays
    arranges the elements in vector A in ascending order
  • how to display an output
    type the variable and press "enter"; use one of the disp commands: disp(variable_ name) or disp('string') or disp(' '); use one of the fprint commands: fprintf('string') or fprint('text %f more text', variable_name)