Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Lab PDS 01
Lab PDS 01
CARRERA:
INGENIERA ELECTRNICA Y TEL.
CICLO:
IX
PROFESOR:
PAZ PURIZACA
2015
INTRODUCCION
INTRODUCCION
MATLAB.-
(4 bytes por
PROCEDIMIENTO.-
1. GENERAR MATRICES
A. Generar un vector v ascendente de 1 a 10 (v=[1:1:10])
>> v=[1:1:10]
v=
1
10
10
10
10
10
10
10
10
10
10
10
10
10
>> size(U)
ans =
3
23
36
49
61
74
87 100
10
23
36
49
61
74
87 100
10
23
36
49
61
74
87 100
10
23
36
49
61
74
87 100
10
23
36
49
61
74
87 100
10
23
36
49
61
74
87 100
10
23
36
49
61
74
87 100
10
23
36
49
61
74
87 100
4.7986
15.5810 13.9749
9.5984 16.1098
0.5735
14.3007
9.7980
18.0744
0.6108 12.1973
3.6584
3.3585
19.2539
6.4289
8.4678 15.5375
6.6694
6.2094 10.8397
x1 =
13
18
15
12
10
16
14
14
18
12
18
12
10
17
10
5
18
16
1
10
3
>> y1=round(y)
y1 =
25
19
19
15
15
14
15
22
21
24
6
19
21
14
18
21
18
14
16
13
13
22
21
6
13
18
18
11
14
BASANDOSE
EN
>> y=ones(3,4)
y=
1
>> d=blkdiag(y,0,0)
d=
0.8909
0.1386
0.8407
0.2435
0.1966
0.4733
0.5853
0.2858
0.5060
0.5678
0.9593
0.1493
0.2543
0.9293
0.2511
0.3517
0.5497
0.7572
0.6991
0.0759
0.5472
0.2575
0.8143
0.3500
0.6160
0.8308
0.9172
0.7537
0.5285
0.1839
0.6892
0.9133
0.0782
0.7749
0.2599
0.2638
0.5499
0.5132
0.1656
0.2400
0.7482
0.1524
0.4427
0.8173
0.8001
0.1455
0.1450
0.4018
0.6020
0.4173
0.4505
0.8258
0.1067
0.8687
0.4314
0.1361
0.8530
0.0760
0.2630
0.0497
0.0838
0.5383
0.9619
0.0844
0.9106
0.8693
0.6221
0.2399
0.6541
0.9027
0.2290
0.9961
0.0046
0.3998
0.1818
0.5797
0.3510
0.1233
Columns 11 through 14
0.0540
0.9340
0.4694
0.1622
0.5308
0.1299
0.0119
0.7943
0.7792
0.5688
0.3371
0.3112
0.9448
0.3692
0.4039
0.5752
0.4909
0.1112
0.0965
0.0598
0.4893
0.7803
0.1320
0.2348
0.3377
0.3897
0.9421
0.3532
0.9001
0.2417
0.9561
0.8212
>> f=rand(8,8)
f=
0.0729
0.1175
0.7350
0.7894
0.2290
0.5309
0.9644
0.1875
0.0885
0.6407
0.9706
0.3677
0.6419
0.0915
0.4325
0.2662
0.7984
0.3288
0.8669
0.2060
0.4845
0.4053
0.6948
0.7978
0.9430
0.6538
0.0862
0.0867
0.1518
0.1048
0.7581
0.4876
0.6837
0.7491
0.3664
0.7719
0.7819
0.1123
0.4326
0.7690
0.1321
0.5832
0.3692
0.2057
0.1006
0.7844
0.6555
0.3960
0.7227
0.7400
0.6850
0.3883
0.2941
0.2916
0.1098
0.2729
0.1104
0.2348
0.5979
0.5518
0.2374
0.6035
0.9338
0.0372
>> X=f(1:4,1);Y=f(1:4,2);W=f(1:4,3);Z=f(1:4,4);
>> Q=[X Y W Z]
Q=
0.0729
0.1175
0.7350
0.7894
0.0885
0.6407
0.9706
0.3677
0.7984
0.3288
0.8669
0.2060
0.9430
0.6538
0.0862
0.0867
>> X1=f(1:4,5);Y1=f(1:4,6);W1=f(1:4,7);Z1=f(1:4,8);
>> Q1=[X1 Y1 W1 Z1]
Q1 =
0.2290
0.5309
0.9644
0.1875
0.6419
0.0915
0.4325
0.2662
0.4845
0.4053
0.6948
0.7978
0.1518
0.1048
0.7581
0.4876
>> X2=f(5:8,1);Y2=f(5:8,2);W2=f(5:8,3);Z2=f(5:8,4);
>> U2=[X2 Y2 W2 Z2]
Q2 =
0.6837
0.7491
0.3664
0.7719
0.1321
0.5832
0.3692
0.2057
0.7227
0.7400
0.6850
0.3883
0.1104
0.2348
0.5979
0.5518
>> X3=f(5:8,5);Y3=f(5:8,6);W3=f(5:8,7);Z3=f(5:8,8);
>> U3=[X3 Y3 W3 Z3]
Q3 =
0.7819
0.1123
0.4326
0.7690
0.1006
0.7844
0.6555
0.3960
0.2941
0.2916
0.1098
0.2729
0.2374
0.6035
0.9338
0.0372
>> a1
a1 =
0.4574
0.9436
0.2407
0.6718
0.8754
0.6377
0.6761
0.6951
0.5181
0.9577
0.2891
0.0680
>> b1
b1 =
0.2548
0.7384
0.8444
0.6753
0.3868
0.4624
0.7702
0.4714
0.7218
0.3411
0.2240
0.2428
0.3445
0.0067
0.9160
0.4243
0.3225
0.0358
0.4735
0.6074
0.6678
0.9174
0.7805
0.6022
0.0012
0.4609
0.7847
0.1759
0.1527
0.1917
>> c1
c1 =
0.2691
0.5762
0.6476
0.7093
0.4587
0.4162
0.7655
0.6834
0.6790
0.2362
0.6619
0.8419
0.1887
0.5466
0.6358
0.1194
0.7703
0.8329
0.2875
0.4257
0.9452
0.6073
0.3502
0.2564
0.0911
0.6444
0.2089
0.4501
0.6620
0.6135
0.1192
0.5447
0.9937
0.4046
0.7720
0.6963
>> d1
d1 =
0.5822
0
0.4849
0.5407
0.9398
0.6473
0.2187
0.4484
0.9329
0.0938
0.3935
0.8699
0.6456
0.5439
0.1058
0.3658
0.9727
0.5254
0.6714
0.2648
0.4795
0.7210
0.1097
0.7635
0.1920
0.5303
0.7413
0.3181
0.6393
0.5225
0.0636
0.6279
0.1389
0.8611
0.5201
1.0397
1.0628
0.7854
1.6655
0.4046
0.7720
0.6963
0.4849
1.4161
1.5775
1.3234
0.9138
0.4484
0.9329
0.0938
0.3935
1.3880
1.6032
0.8330
0.1738
0.3658
0.9727
0.5254
0.6714
0.2648
0.4795
0.7210
0.1097
0.7635
0.1920
0.5303
0.7413
0.3181
0.6393
0.5225
0.0636
0.6279
0.1389
0.8611
0.5201
0.5239
0.7384
1.4206
1.3229
1.0961
0.9212
1.1863
0.4714
0.7218
0.3411
0.9895
0.2428
1.0278
0.6857
1.1522
1.0863
1.1644
0.0358
0.4735
0.6074
0.8565
0.9174
1.3271
1.2380
0.1205
1.2312
1.6177
0.1759
0.1527
0.1917
0.2875
0.4257
0.9452
0.6073
0.3502
0.2564
0.0911
0.6444
0.2089
0.4501
0.6620
0.6135
0
>> a1+d1
ans =
0
>> c1+b1
ans =
>> a1-c1
ans =
0.1884
0.3294
>> a1-b1
ans =
0.2026
-0.7384
0.0992 -0.4346
0.6513
-0.2428
0.2932
-0.1498
-0.9174
0.1772 -0.3131
>> 3*b1
ans =
0.7644
2.2153
2.5332
2.0260
1.1603
1.3873
2.3105
1.4141
2.1653
1.0234
0.6721
0.7285
1.0334
0.0201
2.7480
1.2730
0.9674
0.1073
1.4205
1.8222
2.0035
2.7523
2.3416
1.8065
0.0035
1.3827
2.3542
0.5276
0.4582
0.5752
7.3119
>> v=axis
v=
0
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
11
13
14
16
17
19
20
20
22
23
25
27
28
30
31
31
33
35
36
38
40
41
43
43
44
46
48
49
51
53
54
54
56
58
59
61
62
64
66
66
67
69
71
72
74
76
77
77
79
80
82
84
85
87
89
89
90
92
93
95
97
98 100
TAREA
1. Programar las derivadas de las siguientes
funciones en matlab.
A:
>> syms x;
>> f=(exp(-x)-exp(x))^3
f=
(1/exp(x) - exp(x))^3
>> diff(f,x)
ans =
(-3)*(1/exp(x) + exp(x))*(1/exp(x) - exp(x))^2
B:
>> syms x;
>> f=(2/3)*(sin(x)^(3/2))-(2/7)*(sin(x)^(7/2))
f=
(2*sin(x)^(3/2))/3 - (2*sin(x)^(7/2))/7
>> diff(f,x)
ans =
cos(x)*sin(x)^(1/2) - cos(x)*sin(x)^(5/2)
C:
>> syms t;
>> f=sin(cos(t)^-1)
f=
sin(1/cos(t))
>> diff(f,t)
ans =
0
A: >> syms x;
>> y=sin(x)/(1+cos(x)^2)
y=
sin(x)/(cos(x)^2 + 1)
>> iy=int(y)
iy =
-atan(cos(x))
B: >> syms x;
>> y=x*(csch((x^2)/2)^2)
y=
x/sinh(x^2/2)^2
>> iy=int(y)
iy =
-2/(exp(x^2) - 1)
C: >> syms x;
>> y=1/(25-(x^2))
y=
-1/(x^2 - 25)
>> iy=int(y,x,0,4)
iy =
log(3)/5
CONCLUSIONES
A travez de una imagen podemos obtener una matriz para poder modificarla.
Matlab es un programa optimo para efectuar matrices por lo tanto es el mejor para
procesamiento de imgenes.