Function: 'Ingresa Vector X ' 'Función y F (X) '
Function: 'Ingresa Vector X ' 'Función y F (X) '
M.FILE
function y=funcin(x)
x=input('Ingresa vector x=');
y=(x.^2-1).^(-1);
plot(y,x),grid,title('funcin y=f(x)');
x=-5:0.5:5
x=
Columns 1 through 8
-5.0000 -4.5000 -4.0000 -3.5000 -3.0000 -2.5000 -2.0000 -1.5000
Columns 9 through 16
-1.0000 -0.5000
0.5000
1.0000
1.5000
2.0000
2.5000
Columns 17 through 21
3.0000
3.5000
4.0000
4.5000
5.0000
0.0355
0.0384
0.0417
0.0454
0.0496
0.0744
0.0836
0.0947
0.1082
0.1250
0.2604
0.3333
0.4464
0.6410
1.0417
>> funcion(x)
Ingresa vector x=-6:0.2:6
ans =
Columns 1 through 8
0.0286
0.0306
0.0329
Columns 9 through 16
0.0545
0.0601
0.0667
Columns 17 through 24
0.1462
0.1736
0.2101
Columns 25 through 32
2.2727
Columns 33 through 40
-1.1905 -1.5625 -2.7778
Inf
2.2727
1.0417
0.6410
0.4464
Columns 41 through 48
0.3333
0.2604
0.2101
0.1736
0.1462
0.1250
0.1082
0.0947
0.0601
0.0545
0.0496
0.0454
0.0417
Columns 49 through 56
0.0836
0.0744
0.0667
Columns 57 through 61
0.0384
0.0355
0.0329
0.0306
0.0286
4)
escalon unitario
2
1.8
1.6
1.4
x(t)
1.2
1
0.8
0.6
0.4
0.2
0
10
15
20
25
t
30
35
40
escalon=ones(1,10);
escalon=ones(1,11);
x=input('ingrese su intervalo de x=');
stem(x,escalon)
xlabel('x');ylabel('?');title('PEINE DE DIRAC')
axis([-3 3 0 1.5])
PEINE DE DIRAC
1.5
0.5
0
-3
-2
-1
0
x
45
50