Documente Academic
Documente Profesional
Documente Cultură
in
MATLAB
Ciro
Donalek
Coding...
...experience?
...Matlab?
Python?
C?
Summary
Matlab
as
a
Programming
language
Tips
&
Tricks
Variables,
Matrices,
Arrays
Statements Flow
Toolboxes
Enhance
Matlab
hXp://www.mathworks.com/products/
Database
Toolbox
exchange
data
with
any
rela(onal
databases;
Visual
Query
Builder:
easy
queries
(no
SQL
needed)
Parallel
Toolbox
lets
you
solve
computa(onally
and
data-intensive
problems
using
mul(core
processors,
GPUs,
and
computer
clusters.
Ciro
Donalek
Bi199:
Programming
in
Matlab
-
h5p://www.astro.caltech.edu/~donalek/bi199/
Computer
Programming
Coding:
the
act
of
wri(ng
a
program
in
a
programming
language.
Keep
in
mind:
anything
that
can
go
wrong,
will
go
wrong
Murphys
law
Terminology
loop,
construct,
func(on,
script,
operator,
variable...
Programming
Languages
hXp://en.wikipedia.org/wiki/List_of_programming_languages
portability
eg,
path
symbol:
Windows
uses
\,
Mac/Linux
uses
/
Everything
is
a
Matrix
Matlab:
Matrix
Laboratory
Programming in Matlab
Variables
Allow
to
assign
values
to
symbolic
names
leXer,
followed
by
any
number
of
leXers,
digits,
or
underscores;
naming
conven(ons
are
important.
Matlab
is
case
sensi(ve
a,
A
are
two
dierent
variables
Special Variables
Variables:
types
Data
types
in
Matlab
hXp://www.mathworks.com/help/matlab/
data-types_data-types.html
refers
to
the
way
in
which
a
computer
represents
numbers
in
memory
determines
the
amount
of
storage
allocated
to
a
number;
the
method
used
to
encode
the
number's
value
as
a
paXern
of
binary
digits;
and
the
opera(ons
available
for
manipula(ng
the
type.
Variables: declara(ons
Prealloca(on/Inizializa(on
Entering Matrices
Entering Matrices
Recap