User:Daniela A. Garcia S./Notebook/Modeling 2011 UNAM Genomics-Mexico/2011/05/10

From OpenWetWare
Jump to: navigation, search
Owwnotebook icon.png Project name Report.pngMain project page
Resultset previous.pngPrevious entry      Next entryResultset next.png

MATLAB Tutorial

I decided to take the MatLab Tutorial to get a better understanding of the software. The tutorial is available in the MatLab webpage.


MatLab Desktop

  • Command Window
  • Command History
  • Current Folder Browser
  • Workspace Browser

MatLab Fundamentals

1. Variables

doc. Documentation

format long, Displays all the content of a variable, the size depends on the type of the variable.

format short

  • MatLab variables are arrays
  • Multiple asigments are not allow in MatLab

2.Accesing Data

whos. Show the Workspace Browser in the Comand Window.

3. Creating a Vector

x = i:d:j

  • i, initial value
  • d, interval of numeric values
  • j, last value

4. Creating a Matrix

  • row separator, space | ;
  • colum separator, space | ,


matrix(r,[i j]) | matrix(r,i:j)

matrix([i j], c) | matrix(i:j, c)

All array

matrix (r,:)

matrix (:,c)

Concatenate matrices

matrixes = [matrix;matrix]


  •  ; (semicolon) at the end of a comman line help to save computational time.