Beruflich Dokumente
Kultur Dokumente
>> A = [1,2,3
4,5,6
7,8,9]
A=
1 2 3
4 5 6
7 8 9
>> A(1,2)
ans =
VECTOR =
1 2 3
MATRIZ =
1 2 3
4 5 6
7 8 9
ans =
1 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 1
ans =
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
>> MATRIZ2 = [1 2 3
123
1 2 3]
MATRIZ2 =
1 2 3
1 2 3
1 2 3
C=
6 12 18
15 30 45
24 48 72
D=
1 4 9
4 10 18
7 16 27
>> det(MATRIZ)
ans =
6.6613e-16
>> det (C)
ans =
ans =
>> inv(C)
Warning: Matrix is singular to working precision.
ans =
>> C(:,2)
ans =
12
30
48
VECTOR2 =
2 4 6
>> VECTOR2(:,2)
ans =
>> P=[1,3,-2,0,1]
P=
1 3 -2 0 1
>> roots(P)
ans =
-3.5421 + 0.0000i
0.5446 + 0.4685i
0.5446 - 0.4685i
-0.5470 + 0.0000i
raices =
-3.5421 + 0.0000i
0.5446 + 0.4685i
0.5446 - 0.4685i
-0.5470 + 0.0000i
ans =
1.0e-12 *
-0.2807 + 0.0000i
0.0011 + 0.0003i
0.0011 - 0.0003i
0.0002 + 0.0000i
>> P2 = [3 4 5]
P2 =
3 4 5
>> P3 = [2 1 2]
P3 =
2 1 2
>> PP = conv(P2,P3)
PP =
6 11 20 13 10
Q=
1.5000
R=
0 2.5000 2.0000
>>
>> a=[2, 3; 5, -2]
a=
2 3
5 -2
>> b=[4; 6]
b=
4
6
>> s=inv(a)*b
s=
1.3684
0.4211
>> t=solve('2*x^2+3*x-2')
t=
-2
1/2
a=
-1
- 2*2^(1/2) - 1
2*2^(1/2) - 1
b=
-1
2^(1/2) + 1
1 - 2^(1/2)
y=
2*exp(x) - x - 1
>> int(sym('x*sin(x)'))
ans =
sin(x) - x*cos(x)
>> s=int(sym('x*sin(x)'),0,pi)
s=
pi
>> syms x
>> y=x^3-8
y=
x^3 - 8
>> t=factor(y)
t=
(x - 2)*(x^2 + 2*x + 4)
>> e=taylor(exp(x),x, 5)
e=
>> e=taylor(exp(x),x, 5)
e=
t=
>> y=eval(f)
y=
>> f=3*x^2+5*x
f=
3*x^2 + 5*x
>> t=factor(f)
s=expand(t)
t=
x*(3*x + 5)
s=
3*x^2 + 5*x
>>
>> limit(sin(x)/x)
ans =
>> mesh(eye(10))
>> xx=-2:.2:2;
yy=xx
yy =
Columns 1 through 11
-2.0000 -1.8000 -1.6000 -1.4000 -1.2000 -1.0000 -0.8000 -0.6000 -0.4000 -0.2000 0
Columns 12 through 21
0.2000 0.4000 0.6000 0.8000 1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
>> [x,y]=meshgrid(xx,yy);
z=exp(-x.^2-y.^2);
mesh(z)
>> colormap(cool)