User Tools

Site Tools


gibson:teaching:fall-2012:math445:review

Review topics

You should be able to use the following Matlab syntax and functions

   compact scientific notation (e.g. 1.4e-06)
   complex numbers (e.g. 3 + 4*i)
   Inf, NaN

   =           assignment
   - + * / ^   algebraic operations
   \           solve system of equations Ax=b  (x = A\b)

  commas and semicolons
  how to write a row vector
  how to write a col vector
  how to write a matrix
  how to write a complex number
  
  elementwise operations on vectors, matrices
    - + .* ./ .^
 
  conditional expressions (boolean algebra)
    ==
    ~=
    >
    <
    >=
    <=
    ~
    &&  (simple AND)
    ||  (simple OR)
    &   (componentwise AND for vectors)
    |   (componentwise OR  for vectors)
    zero    == false    
    nonzero == true

  control flow 
    for-end
    if-elseif-else-end
    while-end
    switch

    continue 
    break
    pause

  constructing matrices and vectors
    zeros
    ones
    eye
    rand
    randi
    randn
    linspace
    colon syntax

  hugely helpful miscellaneous functions
    ceil
    floor 
    round
    size
    input
    disp
    fprintf (%c, %s, %d, %f, \n)
    save
    load

  plotting functions
    plot
    semilogy
    semilogx
    loglog
    hist
    xlabel
    ylabel
    title 
    legend
    axes
    hold 
    clf
    grid
    color & marker codes
    figure


  user-defined functions
     function name, filename
     arguments
     outputs 
     syntax for using a function as an argument to another function
     
  scripts
 
gibson/teaching/fall-2012/math445/review.txt · Last modified: 2012/09/25 10:20 by gibson