Vous êtes sur la page 1sur 4

Execuo de iniciao:

carregando o ambiente inicial

--> A=[1 3;-3 2]


A =

1. 3.
-3. 2.

--> inv(A)
ans =

0.1818182 -0.2727273
0.2727273 0.0909091

--> inv(A)*A
ans =

1. 0.
0. 1.

--> clean(inv(A)*A)
ans =

1. 0.
0. 1.

--> M=iconvert(A,4)
M =

1 3
-3 2

--> M==A
ans =

T T
T T

--> M^(-1)
ans =

0.1818182 -0.2727273
0.2727273 0.0909091

--> M^(-1)==inv(A)
ans =

T T
T T
--> M^(-1)*M
ans =

0 0
0 0

--> x=0:0.01:10;

--> size(x)
ans =

1. 1001.

--> y=cos(2*%pi*x);

--> size(y);

--> size(y)
ans =

1. 1001.

--> plot(x,y)

--> A=[1 3;-3 2]


A =

1. 3.
-3. 2.

--> b=[2;5]
b =

2.
5.

--> size(b)
ans =

2. 1.

--> //solve AX=b

--> X=inv(A)*b
X =

-1.
1.

--> size(X)
ans =
2. 1.

--> A*X==b
ans =

T
T

--> fact_10=prod(1:10)
fact_10 =

3628800.

--> fact_20=prod(1:20)
fact_20 =

2.433D+18

--> k=1:5
k =

1. 2. 3. 4. 5.

--> k_int=iconvert(k,4)
k_int =

1 2 3 4 5

--> k==k_int
ans =

T T T T T

--> i=[1 0 0 0 0]
i =

1. 0. 0. 0. 0.

--> k-i<k
ans =

T F F F F

--> k-i>k
ans =

F F F F F

--> k-i>=k
ans =

F T T T T

--> t=0:0.01:5;

--> z=exp(2*%pi*%i*t);

--> z(1)
ans =

1.

--> z(100)
ans =

0.9980267 - 0.0627905i

--> z(501)
ans =

1. - 1.225D-15i

--> z=clean(z);

--> z(501)
ans =

1.

--> param3d(real(z),imag(z),2*t)

--> a= 'The facotorial of';

--> b=10;

--> c= 'is';

--> d=prod(1:10);

--> disp(d,c,b,a)

The facotorial of

10.

is

3628800.