Contents
Ejercicio 1
x=[10 20 40 60 80 100]';
y=[x log(x)];
fprintf('\n Numero log\n')
fprintf('%4i \t %8.3f\n', y')
Numero log
10 2.303
20 2.996
40 3.689
60 4.094
80 4.382
100 4.605
Ejercicio 2
Ejercicio 3
pr_cb
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
16 10000
17 10001
18 10010
19 10011
20 10100
21 10101
22 10110
23 10111
24 11000
25 11001
26 11010
27 11011
28 11100
29 11101
30 11110
31 11111
32 100000
33 100001
34 100010
35 100011
36 100100
37 100101
38 100110
39 100111
40 101000
41 101001
42 101010
43 101011
44 101100
45 101101
46 101110
47 101111
48 110000
49 110001
50 110010
51 110011
52 110100
53 110101
54 110110
55 110111
56 111000
57 111001
58 111010
59 111011
60 111100
61 111101
62 111110
63 111111
64 1000000
65 1000001
66 1000010
67 1000011
68 1000100
69 1000101
70 1000110
71 1000111
72 1001000
73 1001001
74 1001010
75 1001011
76 1001100
77 1001101
78 1001110
79 1001111
80 1010000
81 1010001
82 1010010
83 1010011
84 1010100
85 1010101
86 1010110
87 1010111
88 1011000
89 1011001
90 1011010
91 1011011
92 1011100
93 1011101
94 1011110
95 1011111
96 1100000
97 1100001
98 1100010
99 1100011
100 1100100
101 1100101
102 1100110
103 1100111
104 1101000
105 1101001
106 1101010
107 1101011
108 1101100
109 1101101
110 1101110
111 1101111
112 1110000
113 1110001
114 1110010
115 1110011
116 1110100
117 1110101
118 1110110
119 1110111
120 1111000
121 1111001
122 1111010
123 1111011
124 1111100
125 1111101
126 1111110
127 1111111
128 10000000
Ejercicio 4
Ejercicio 5
A=[100 0 0 0 -1 1 0; 0 200 0 0 0 -1 1; 0 0 50 0 -1 0 0; 0 0 0 100 0 -1 0; 0 300 0 0 0 0 -1; 1 0 1 0 0 0 0; 1 -1 0 -1 0 0 0];
B=[0;0;-50;-50;-50;25;0];
X=A\B
X =
1.0e+03 *
0.0054
0.0009
0.0196
0.0045
1.0321
0.4964
0.3179
ejercicio 6
A=[100 0 0 0 -1 1 0; 0 200 0 0 0 -1 1; 0 0 50 0 -1 0 0; 0 0 0 100 0 -1 0; 0 300 0 0 0 0 -1; 1 0 1 0 0 0 0; 1 -1 0 -1 0 0 0];
B=[0;0;-50;-50;-50;25;0];
[L,U]=lu(A);
X=U^(-1)*L^(-1)*B
X =
1.0e+03 *
0.0054
0.0009
0.0196
0.0045
1.0321
0.4964
0.3179
Ejercicio 7
A=[0 1 -1;-6 -11 6;-6 -11 5];
[X,D]=eig(A)
T1=A*X
T2=X*D
X =
0.7071 -0.2182 -0.0921
0.0000 -0.4364 -0.5523
0.7071 -0.8729 -0.8285
D =
-1.0000 0 0
0 -2.0000 0
0 0 -3.0000
T1 =
-0.7071 0.4364 0.2762
-0.0000 0.8729 1.6570
-0.7071 1.7457 2.4856
T2 =
-0.7071 0.4364 0.2762
-0.0000 0.8729 1.6570
-0.7071 1.7457 2.4856
Ejercicio 8
Y=[1.5-2.0i -0.35+1.2i;-0.35+1.2i 0.9-1.6i];
I=[30+40i; 20+15i];
U=Y\I
S=U.*conj(I)
U =
3.5902 +35.0928i
6.0155 +36.2212i
S =
1.0e+03 *
1.5114 + 0.9092i
0.6636 + 0.6342i
Ejercicio 9
Ejercicio 10
Ejercicio 11
[X, Y]=meshgrid(-4:0.3:4,-4:0.3:4);
Z=sin(X).*cos(Y).*exp(-(X.^2+Y.^2).^0.5);
figure(5)
surf(X,Y,Z)
Ejercicio 12
Ejemploode
Ejercicio 13
figure(7)
k=5;m=10;fo=10;Bo=2.5;N=2^m;T=2^k/fo;
ts=(0:N-1)*T/N;df=(0:N/2-1)/T;
SampledSignal = Bo*sin(2*pi*fo*ts)+Bo/2*sin(2*pi*fo*2*ts);
An=abs(fft(SampledSignal, N))/N;
subplot(2,2,1)
plot(df,2*An(1:N/2))
k=5;m=10;fo=10;N=2^m;T=2^k/fo;
ts=(0:N-1)*T/N;df=(0:N/2-1)/T;
SampledSignal=exp(-2*ts).*sin(2*pi*fo*ts);
An=abs(fft(SampledSignal,N))/N;
subplot(2,2,2)
plot(df,2*An(1:N/2))
k=5;m=10;fo=10;N=2^m;T=2^k/fo;
ts=(0:N-1)*T/N;df=(0:N/2-1)/T;
SampledSignal=sin(2*pi*fo*ts+5*sin(2*pi*(fo/10)*ts));
An=abs(fft(SampledSignal,N))/N;
subplot(2,2,3)
plot(df,2*An(1:N/2))
k=5;m=10;fo=10;N=2^m;T=2^k/fo;
ts=(0:N-1)*T/N;df=(0:N/2-1)/T;
SampledSignal=sin(2*pi*fo*ts-5*exp(-2*ts));
An=abs(fft(SampledSignal,N))/N;
subplot(2,2,4)
plot(df,2*An(1:N/2))
Ejercicio 14
theta=linspace(-pi,pi/10,pi);
r=2-4*cos(theta);
figure(9)
polar(theta,r,'r')
Ejercicio 15