Beruflich Dokumente
Kultur Dokumente
x=
>> x={1 2 3}
x=
>> y={1;2;3}
y=
[1]
[2]
[3]
>> d=[1:10]
d=
1 2 3 4 5 6 7 8 9 10
>> d=1:10
d=
1 2 3 4 5 6 7 8 9 10
>> d=[1:0.5:4]
d=
Columns 1 through 6
Column 7
4.0000
>> g=linspace(1,9,5)
g=
1 3 5 7 9
>> g=linspace(1,9,15)
g=
Columns 1 through 6
Columns 7 through 12
Columns 13 through 15
> zeros(3)
ans =
0 0 0
0 0 0
0 0 0
>> zeeros(2,5)
>> zeros(2,5)
ans =
0 0 0 0 0
0 0 0 0 0
>> ones(2,5)
ans =
1 1 1 1 1
1 1 1 1 1
>> ones(4,2)
ans =
1 1
1 1
1 1
1 1
>> eyes(4)
>> eye(4)
ans =
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
>> eye(4,2)
ans =
1 0
0 1
0 0
0 0
>> eye(3,5)
ans =
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
>> rand(2,4)
ans =
ans =
>> 10*rand(4)
ans =
>> round(10*rand(4))
ans =
4 2 7 7
4 5 8 2
8 4 3 1
8 6 7 5
>> M=round(10*rand(4))
M=
10 8 9 1
3 3 10 3
6 5 5 8
2 7 1 3
>> M
M=
10 8 9 1
3 3 10 3
6 5 5 8
2 7 1 3
>>
>> DOT(X,y)
Production Server\R2015a\toolbox\matlab\specfun\dot.m
>> dot(X,y)
ans =
36
>> cross(X,y)
ans =
6 -6 2
>> X*y
Error using *
>> X*y`
X*y`
expressions.
>> X*y
X*y
expressions.
>> X*y'
ans =
36
>> norm(y,1)
ans =
14
>> norma(y,2)
>> norm(y,2)
ans =
9.8995
>> syms x
>> N
N=
[ 1 - x, 2, 3]
[ 4, 5 - x, 6]
[ 7, 8, 9 - x]
>> M1=rand(3)
M1 =
>> det[M1]
det[M1]
>> det(M1)
ans =
0.0086
>> det(N)
ans =
>> p=[-1,15,18,0]
p=
-1 15 18 0
>> roots(p)
ans =
16.1168
-1.1168
>> A=[1 2 -2; 0 -1 7;-3 0 5];B=[6 -1 0;2 -1 1;4 0 0];C=[9 3;5 2;-8 -1]
C=
9 3
5 2
-8 -1
>> (A+2*B)*C
ans =
133 41
-51 -3
5 10
>> A^2-B
ans =
1 1 2
-23 2 27
-22 -6 31
>> round((rand(4,6)-rand(4,6))*100)
ans =
32 31 -8 86 1 23
23 15 -1 46 -66 -9
>> round((rand(4,6)*200-100)
round((rand(4,6)*200-100)
{, or [.
>> round((rand(4,6)*200-100))
ans =
>>
DSVFGRWAGVRZAGWRA
>> A=[6 8 6 5 7 8;1 0 7 3 2 1;2 0 6 7 4 9;4 2 5 2 6 8]; B=[3 2;1 0]; C=[1 0 5 6;0 0 0 1];
>> M=2*ones(3)-3*eye(3)
M=
-1 2 2
2 -1 2
2 2 -1
>> D=[(B;C'),(A(3,3);M)]
D=[(B;C'),(A(3,3);M)]
>> D=[(B;C'),(A;M)]
D=[(B;C'),(A;M)]
>> D=[B;C'][A(1:3,4:end);M]
D=[B;C'][A(1:3,4:end);M]
Error using +
>> D=[B;C']
D=
3 2
1 0
1 0
0 0
5 0
6 1
>> D1=[A(1:3,4:end);M]
D1 =
5 7 8
3 2 1
7 4 9
-1 2 2
2 -1 2
2 2 -1
>> [D D1]
ans =
3 2 5 7 8
1 0 3 2 1
1 0 7 4 9
0 0 -1 2 2
5 0 2 -1 2
6 1 2 2 -1
>> P=[[B;C'][A(1:3,4:end);M]]
P=[[B;C'][A(1:3,4:end);M]]
>> [B;C'][A(1:3,4:end);M]
[B;C'][A(1:3,4:end);M]
>>KJNDSOVFNAWNCEWANC
>> X=[A*,eye(3)]
X=[A*,eye(3)]
{, or [.
>> X=[A,eye(3)]
X=
3 2 1 1 0 0
5 3 4 0 1 0
1 1 -1 0 0 1
>> X(1;:)=X(1;:)-2*X(3;:)
X(1;:)=X(1;:)-2*X(3;:)
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> X(1:)=X(1,:)-2*X(3,:)
X(1:)=X(1,:)-2*X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=x.*(sin(x)).^3
B4 =
>> sem2
x=
B1 =
B2 =
B3 =
B4 =
x=
B1 =
B2 =
B3 =
B4 =
>> sem2
x=
B1 =
B2 =
B3 =
B4 =
>> sem2
x=
B1 =
B3 =
B4 =
>> sem2
x=
B1 =
B2 =
B3 =
B4 =
>> sem2
x=
B1 =
B2 =
B3 =
B4 =
0.5958 -0.0041 -1.9316 7.6251 -1.6101
>> sem2
x=
B1 =
B2 =
B3 =
B4 =
>> sem2
x=
B1 =
B2 =
B3 =
B4 =
>> sem2
x=
B1 =
0 1.1787 1.7047 2.0477 2.3026
B2 =
B3 =
B4 =
>> sem2
x=
B1 =
B2 =
B3 =
B4 =
>> sem2
x=
B1 =
B2 =
B3 =
>>