Códigos Aula 3

De MediaWiki do Campus São José
Ir para: navegação, pesquisa
%-- 03-09-2019 21:45:05 --%
A = [1:5;6:10;11:15;16:20]
format rat
B = [1/2 1/3;1/4 1/5;1/6 1/7; 1/8 1/9]
C = [-1/12 1/(-3); 0 0; 1 17;2 19]
D = [sqrt(2);pi;exp(1);sqrt(3);42]
format short
D = [sqrt(2);pi;exp(1);sqrt(3);42]
2a = B + C
soma = B + C
clc
mult_mat = A * D
c_2 = C * B' * A
X = B' * C
clc
X^2
mult_elxel = B .* C
v = [1:10]
v = v.^2
clc
v = [1:10]
v = v.^2
v = [1:10]
v .* v
clc
v
q4 = 2.^v
q5 = prod(1:12)
clc
q5 = prod(1:12)
factorial(12)
vetor = 1:10000;
vet_ao_quad = vetor.^2;
fracoes = 1./vet_ao_quad
clc
fracoes = sum(1./vet_ao_quad)
resp7 = sqrt(6*fracoes)