Contents
EJERCICIO 2
A=[4 -2 -10;2 10 -12;-4 -6 16];
B=[-10;32;-16];
x=A\B
x =
2.0000
4.0000
1.0000
EJERCICIO 4
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 5
Y=[1.5-2j -0.35+1.2j;-0.35+1.2j 0.9-1.6j];
I=[30+40j;20+15j];
disp('Solucion:')
V=Y\I
S=V.*conj(I)
Solucion:
V =
3.5902 +35.0928i
6.0155 +36.2212i
S =
1.0e+003 *
1.5114 + 0.9092i
0.6636 + 0.6342i
EJERCICIO 6
hanoi(5,'a','b','c');
mover disco 1 de a a c
mover disco 2 de a a b
mover disco 1 de c a b
mover disco 3 de a a c
mover disco 1 de b a a
mover disco 2 de b a c
mover disco 1 de a a c
mover disco 4 de a a b
mover disco 1 de c a b
mover disco 2 de c a a
mover disco 1 de b a a
mover disco 3 de c a b
mover disco 1 de a a c
mover disco 2 de a a b
mover disco 1 de c a b
mover disco 5 de a a c
mover disco 1 de b a a
mover disco 2 de b a c
mover disco 1 de a a c
mover disco 3 de b a a
mover disco 1 de c a b
mover disco 2 de c a a
mover disco 1 de b a a
mover disco 4 de b a c
mover disco 1 de a a c
mover disco 2 de a a b
mover disco 1 de c a b
mover disco 3 de a a c
mover disco 1 de b a a
mover disco 2 de b a c
mover disco 1 de a a c
EJERCICIO 7
x=[0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5];
y=[10 10 16 24 30 38 52 68 82 96 123];
p=polyfit(x,y,2)
v=polyval(p,x)
p =
4.0233 2.0107 9.6783
v =
Columns 1 through 6
9.6783 11.6895 15.7124 21.7469 29.7930 39.8508
Columns 7 through 11
51.9203 66.0014 82.0942 100.1986 120.3147
EJERCICIO 8
wt=0:0.05:3*pi;
v=120*sin(wt);
subplot(2,2,1),plot(v),grid
hold on
i=100*sin(wt-(pi/4));
plot(i),grid
hold off
p=v.*i;
subplot(2,2,2),plot(p),grid
Fm=3.0;
fa=Fm*sin(wt);
subplot(2,2,3),plot(fa),grid
hold on
fb=Fm*sin(wt-2*(pi/3));
plot(fb),grid
fc=Fm*sin(wt-4*(pi/3));
plot(fc),grid
hold off
fR=3.0;
r=fR*cos(wt);
subplot(2,2,4),polar(wt,r),grid
EJERCICIO 11
f=[1 0 -35 50 24];
r=roots(f)
r =
-6.4910
4.8706
2.0000
-0.3796
EJERCICIO 12
Ejemploode
EJERCICIO 13
figure(6)
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;
plot(df, 2*An(1:N/2))
figure(7)
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;
plot(df, 2*An(1:N/2))
figure(8)
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 = sin((2*pi*fo*ts)+(5*sin(2*pi*(fo/10)*ts)));
An = abs(fft(SampledSignal, N))/N;
plot(df, 2*An(1:N/2))
figure(9)
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 = sin((2*pi*fo*ts)-(5*exp(-2*ts)));
An = abs(fft(SampledSignal, N))/N;
plot(df, 2*An(1:N/2))
EJERCICIO 14
A=imread('WindTunnel.jpg','jpeg');
row=200;
red=A(row,:,1);
gr=A(row,:,2);
bl=A(row,:,3);
subplot(2,1,1)
plot(red,'r');
title('Distribucion de color rojo en la fila 200');
subplot(2,1,2)
hist(red,0:15:255);
title('Histograma del color rojo en la fila 200');