Beruflich Dokumente
Kultur Dokumente
Computing
>> a = -9.5
a=
-9.5000
This syntax allows me to Vectors are really just 1xn or nx1 matrices
select part of the matrix as far as Matlab is concerned.
(rows 1 to 2, column 1).
>> v=sin(10*t)
0.8
0.4
Here is the “logical
index”… I am asking for 0.2
the values of v for which
this conditional 0
statement is true. 0 0.2 0.4 0.6 0.8 1
Saving and Loading Data
.mat files
You may save and load data from the workspace into .mat
files, which are Matlab data files, using the “save” and
“load” commands.
>> S=load('test.csv')
S=
1.0000 -1.0000 0
2.0000 -2.0000 0.5000
3.0000 -3.0000 12.0000
The variable
ans is the result
of the last
computation
and can be
used just like
any other
variable, but will
be overwritten.
The
command
clear clears
all defined
variables.
Built in functions:
>> ginput(n)
Displacement (nm)
0
>> f=1/T
f= 5.5641
2D Plotting in Matlab: