Test_A.m
clc
clear
%Test A-3
D3 = [5,2,9,-2;0,6,2,21;0,0,1,56;0,8,0,1];
DET3 = det(D3)
D3T = D3'
format bank
D3T(2,:)
format short
%Test A-4
D4 = [2,-3,0,2,8;1,5,2,1,2;3,-1,1,-1,7;4,1,2,2,12];
[n4,m4] = size(find(D4 > 4))
F4 = find(D4 > 4)
%Test A-5
A5 = [12,2,2,7;3,5,2,5;7,9,2,0;35,5,3,2];
PA5 = poly(A5)
PA5X = roots(PA5)
DPA5 = polyder(PA5)
%Test A-6
B6 = [4,2,3;1,1,0;6,2,3];
S6 = sum(B6,1);
for i = 1:3
format hex
cos(S6(i))
format short
end
%Test A-7
A7 = [1,9,3;-2,7,0;4,0,1;-1,2,-3];
B7 = [2,4,1;1,0,1;1,0,1;0,0,2];
AND = A7 & B7
OR = A7 | B7
find(AND == 0)
find(OR == 0)
%Test A-8
A8 = [2,-1,3;3,1,0;4,-1,1];
DET8 = det(A8);
AA8 = DET8+A8';
[r,c] = size(AA8);
max8 = AA8(1,1);
for i = 1:r
for j = 1:c
if max8 <= AA8(i,j)
max8 = AA8(i,j);
end
end
end
max8
%Test A-9
B9 = [-1,3;-2,2;2,1];
S9 = sum(B9,2);
for i = 1:3
format rat
sin(S9(i))
format short
end
%Test A-10
f = sym('1/x*sqrt((x+1)/(x-1))')
int(f)
%Test A-11
dsolve('D2y + 4 * Dy + 4 * y = exp(-2 * x)')
%Test A-12
f12num = [1,12,4,7,0,8,1];
f12den = [1,5,0];
deconv(f12num,f12den)
x12 = [-2*pi:0.1:2*pi];
y12 = polyval(deconv(f12num,f12den),x12);
plot(x12,y12)
xlabel('x')
ylabel('y')
grid on