Professional Documents
Culture Documents
Startup execution:
loading initial environment
-->p=[1 -2 5]; q=[2
-->4
-->8];
-->x=p*q
x =
34.
-->y=q*p
y =
2. - 4. 10.
4. - 8. 20.
8. - 16. 40.
-->gsort(p,'g','i')
ans =
- 2.
1.
5.
-->gsort(q,'g','i')
ans =
2.
4.
8.
-->z=5;x=-2;
-->b=[z e^x;log100 sin60]
!--error 4
Undefined variable: e
-->b=[1 2; 3 4]
b =
1.
3.
2.
4.
-->a(1,:)
ans =
2. - 4.
6. - 8.
-->a(2:,3)
!--error 2
Invalid factor.
-->a(2,3)
ans =
5.
-->b=(2 3 4; 3 4 5 ;4 5 6; 5 6 7)
!--error 3
Waiting for right parenthesis.
-->b=(2 3 4; 3 4 5; 5 6 7)
!--error 3
Waiting for right parenthesis.
-->q=(2 3 4; 3 4 5; 4 5 6; 5 6 7)
!--error 3
Waiting for right parenthesis.
-->
-->q=[2 3 4; 3 4 5; 4 5 6; 5 6 7]
q =
2.
3.
4.
5.
3.
4.
5.
6.
4.
5.
6.
7.
-->q(1:2,1:2)
ans =
2.
3.
3.
4.
-->q(2,2)=8
q =
2.
3.
4.
5.
3.
8.
5.
6.
4.
5.
6.
7.
-->p[3 4 5 1; 5 6 7 2; 7 8 9 3]
!--error 276
Missing operator, comma, or semicolon.
-->p=[3 4 5 1; 5 6 7 2; 7 8 9 3]
p =
3.
5.
7.
4.
6.
8.
5.
7.
9.
1.
2.
3.
-->
-->matrix(p,1,4)
!--error 60
Wrong size for argument: Incompatible dimensions.
-->matrix(p,4,3)
ans =
3.
5.
7.
4.
6.
8.
5.
7.
9.
1.
2.
3.
-->matrix(p,:,4
!--error 3
Waiting for right parenthesis.
-->matrix(p,:,4)
!--error 60
Wrong size for argument: Incompatible dimensions.
-->matrix(p,3,:)
!--error 60
Wrong size for argument: Incompatible dimensions.
-->matrix(p,1,:)
!--error 60
Wrong size for argument: Incompatible dimensions.
-->matrix(p,1,4)
!--error 60
Wrong size for argument: Incompatible dimensions.
-->x=[0
-->1
-->2];
-->y[0 2 3 4];
!--error 276
Missing operator, comma, or semicolon.
-->c=[p;x]
!--error 6
Inconsistent row/column dimensions.
-->matrix(p; )
!--error 3
Waiting for right parenthesis.
-->p=[p,y]
p =
3.
5.
7.
4.
6.
8.
5.
7.
9.
1.
2.
3.
2. - 4. 10.
4. - 8. 20.
8. - 16. 40.
-->p=[p;x]
!--error 6
Inconsistent row/column dimensions.
-->p=[p,x]
p =
3.
5.
7.
4.
6.
8.
5.
7.
9.
-->p=p(:)
p =
3.
5.
7.
4.
6.
8.
5.
7.
9.
1.
2.
3.
2.
4.
8.
- 4.
- 8.
- 16.
10.
20.
40.
0.
1.
2.
-->eye(3,3)
ans =
1.
0.
0.
1.
0.
0.
1.
2.
3.
2. - 4. 10. 0.
4. - 8. 20. 1.
8. - 16. 40. 2.
0.
0.
1.
-->A = [ 2 4; 8, -1]
A =
2. 4.
8. - 1.
-->det(A)
ans =
- 34.
-->L = [ 4 3; 7 2; 4 0]; rank(L)
ans =
2.
-->A = [ 5 -8 10 -2; 0 4 3 -4; 2 4 6 8]; C = A.*A; C.*A
ans =
125. - 512. 1000. - 8.
0.
64. 27. - 64.
8.
64. 216. 512.
-->A.^3
ans =
125. - 512. 1000. - 8.
0.
64. 27. - 64.
8.
64. 216. 512.
-->A = [ 1 1 -1; -1 3 -1; 3 -5 -2]; B= [ 2;2;0]; Y = A\B
Y =
0.6666667
0.6666667
- 0.6666667
-->trace(A)
ans =
2.
-->x = [ 1 0 -2]; y = [ 0 -4 8];
-->k = x < y
k =
FFT