Você está na página 1de 13

Relatrio

1 parte I

>> escalar = 10

escalar =

10

>> vetor_linha1=[1 2 3]

vetor_linha1 =

1 2 3

>> vetor_linha2=[4, 5, 6];
>> vetor_coluna=[10;20;30]

vetor_coluna =

10
20
30

>> matriz_3x3=[0.1 0.2 0.3; 1 2 3; 10 20 30]

matriz_3x3 =

0.1000 0.2000 0.3000
1.0000 2.0000 3.0000
10.0000 20.0000 30.0000

>> matriz_5x2=[1 2 3 4 5; 6 7 8 9 10]

matriz_5x2 =

1 2 3 4 5
6 7 8 9 10

>> -1.23e4

ans =

-12300

>> 5-3i

ans =

5.0000 - 3.0000i

>> x1=-5.1

x1 =

-5.1000

>> mat2= [3 4;53 45]

mat2 =

3 4
53 45

>> Mat1=[1 2 3]

Mat1 =

1 2 3

>> mat1=[10 9 8 7 6]

mat1 =

10 9 8 7 6

>> a=[1 2;3 4]

a =

1 2
3 4

>> b=[5 6;7 8]

b =

5 6
7 8

>> c=a*b

c =

19 22
43 50

>> a+b

ans =

6 8
10 12

>> a-b

ans =

-4 -4
-4 -4

>> a/b

ans =

3.0000 -2.0000
2.0000 -1.0000

>> a\b

ans =

-3 -4
4 5

>> a.*b

ans =

5 12
21 32

>> a./b

ans =

0.2000 0.3333
0.4286 0.5000

>> a^3

ans =

37 54
81 118

>> a.^b

ans =

1 64
2187 65536

>> a'

ans =

1 3
2 4

>> a+b*a

ans =

24 36
34 50

>> (a+b)*a

ans =

30 44
46 68


>> asin(0.4794)

ans =

0.5000

>> x=.5

x =

0.5000

>> sin(x)

ans =

0.4794

>> cos(x)

ans =

0.8776

>> sqrt(x)

ans =

0.7071

>> exp(x)

ans =

1.6487

>> log(x)

ans =

-0.6931

>> log10(x)

ans =

-0.3010

>> a=[2 3; 5 -8]

a =

2 3
5 -8

>> det(a)

ans =

-31

>> inv(a)

ans =

0.2581 0.0968
0.1613 -0.0645

>> (1+3i)*(2-5i)

ans =

17.0000 + 1.0000i

>> m=[23-log(3) sqrt(4); 3+i 1/pi]

m =

21.9014 + 0.0000i 2.0000 + 0.0000i
3.0000 + 1.0000i 0.3183 + 0.0000i

>> a=[1 1; 3 4]

a =

1 1
3 4

>> b=[10 20 30; 40 50 60]

b =

10 20 30
40 50 60

>> c=[a b]

c =

1 1 10 20 30
3 4 40 50 60

>> m=[1 2 3]

m =

1 2 3

>> n=[12 20 30; 40 50 60]

n =

12 20 30
40 50 60

>> p=[m;n]

p =

1 2 3
12 20 30
40 50 60

>> a

a =

1 1
3 4

>> Ma=[a 2*a 3*a; 3*a 2*a a]

Ma =

1 1 2 2 3 3
3 4 6 8 9 12
3 3 2 2 1 1
9 12 6 8 3 4

>> Ma(1,:)

ans =

1 1 2 2 3 3

>> Ma(1,3)

ans =

2

>> Ma(:,2)

ans =

1
4
3
12

>> v1=[0:2:10]

v1 =

0 2 4 6 8 10

>> v2=[30:-3:10]

v2 =

30 27 24 21 18 15 12

>> v=1:5

v =

1 2 3 4 5

>> v2=[10:3:30]

v2 =

10 13 16 19 22 25 28

>> v1=linspace(0,10,5)

v1 =

Columns 1 through 4

0 2.5000 5.0000 7.5000

Column 5

10.0000

>> v=linspace(0,pi)

v =

Columns 1 through 6

0 0.0317 0.0635 0.0952 0.1269 0.1587

Columns 7 through 12

0.1904 0.2221 0.2539 0.2856 0.3173 0.3491

Columns 13 through 18

0.3808 0.4125 0.4443 0.4760 0.5077 0.5395

Columns 19 through 24

0.5712 0.6029 0.6347 0.6664 0.6981 0.7299

Columns 25 through 30

0.7616 0.7933 0.8251 0.8568 0.8885 0.9203

Columns 31 through 36

0.9520 0.9837 1.0155 1.0472 1.0789 1.1107

Columns 37 through 42

1.1424 1.1741 1.2059 1.2376 1.2693 1.3011

Columns 43 through 48

1.3328 1.3645 1.3963 1.4280 1.4597 1.4915

Columns 49 through 54

1.5232 1.5549 1.5867 1.6184 1.6501 1.6819

Columns 55 through 60

1.7136 1.7453 1.7771 1.8088 1.8405 1.8723

Columns 61 through 66

1.9040 1.9357 1.9675 1.9992 2.0309 2.0627

Columns 67 through 72

2.0944 2.1261 2.1579 2.1896 2.2213 2.2531

Columns 73 through 78

2.2848 2.3165 2.3483 2.3800 2.4117 2.4435

Columns 79 through 84

2.4752 2.5069 2.5387 2.5704 2.6021 2.6339

Columns 85 through 90

2.6656 2.6973 2.7291 2.7608 2.7925 2.8243

Columns 91 through 96

2.8560 2.8877 2.9195 2.9512 2.9829 3.0147

Columns 97 through 100

3.0464 3.0781 3.1099 3.1416


>> x=0:0.1:2*pi;
y1=sin(x);
y2=cos(x);
plot(x,y1,x,y2)
plot(x,y1,'g*-',x,y2,'b--s')
title('Grficos da Funo Seno e Coseno')
xlabel('angulo em radianos')
ylabel('funo trigonomtrica')



>> x=0:0.1:2*pi;
y1=sin(x);
y2=cos(x);
plot(x,y1,x,y2)
plot(x,y1,'ms:',x,y2,'c-.d')
title('Grficos da Funo Seno e Coseno')
xlabel('angulo em radianos')
ylabel('funo trigonomtrica')

Grficos:

Você também pode gostar