Академический Документы
Профессиональный Документы
Культура Документы
10
11
12
13
14
15
16
>> size(A)
ans =
4
>> A(1,3)
ans =
3
>> A(4,2)
ans =
14
FILAS Y COLUMNAS:
>> A(1,:)
ans =
1
OPERACIONES ELEMENTALES:
>> B=A
B=
10
11
12
13
14
15
16
>> A(3,:)=A(3,:)+(-9)*A(1,:)
A=
-8 -16 -24
13
14
15
16
>> A(4,:)=A(4,:)+(-13)*A(1,:)
A=
-8 -16 -24
>> M=[3 4]
M=
>> N=[2 3]
N=
>> B(M,N)=[10 11
14 15]
B=
10
11
12
13
14
15
16
>> M1=[1 4]
M1 =
>> N1=[2 4]
N1 =
>> B(M1,N1)
ans =
14
16
>> B(M1,:)
ans =
13
14
15
>> B(:,N1)
ans =
10
12
4
16
14
16
>> diag(B)
ans =
1
6
11
16
>> triu(B)
ans =
1
11
12
16
>> tril(B)
ans =
1
10
11
13
14
15
16
P=
>> I=eye(3)
I=
1
>> J=eye(3,4)
J=
1
>> K=ones(3,4)
K=
1
>> R=rand(3,4)
R=
0.8147
0.9134
0.2785
0.9649
0.9058
0.6324
0.5469
0.1576
0.1270
0.0975
0.9575
0.9706
S=randn(3,4)
ans =
0.9337
0.1825
1.6039 -0.7342
0.3503 -1.5651
0.0983 -0.0308
-0.0290 -0.0845
0.0414
0.2323
>> G=[randn(2,3),eye(2,2);zeros(3,3),ones(3,2)]
G=
0.7254
0.7147 -0.1241
-0.0631 -0.2050
1.4897
1.0000
0
0
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
>> R1=rand(5*3)
R1 =
Columns 1 through 12
0.6991
0.6160
0.7792
0.6892
0.7749
0.5499
0.8909
0.4733
0.9340
0.7482
0.8173
0.1450
0.9593
0.3517
0.1299
0.4505
0.8687
0.8530
0.5472
0.8308
0.5688
0.0838
0.0844
0.6221
0.1386
0.5853
0.4694
0.2290
0.3998
0.3510
0.1493
0.5497
0.0119
0.9133
0.2599
0.5132
0.2575
0.9172
0.3371
0.1524
0.8001
0.4018
0.8407
0.2858
0.1622
0.8258
0.4314
0.0760
0.2543
0.7572
0.7943
0.5383
0.9106
0.2399
0.8143
0.7537
0.3112
0.9961
0.1818
0.1233
0.2435
0.3804
0.5285
0.0782
0.2638
0.1839
0.9293
0.5678
0.1656
0.4427
0.1455
0.2400
0.3500
0.0759
0.6020
0.1067
0.1361
0.4173
0.1966
0.0540
0.2630
0.9619
0.8693
0.0497
0.2511
0.5308
0.6541
0.0046
0.5797
0.9027
Columns 13 through 15
0.8176
0.2305
0.2581
0.7948
0.8443
0.4087
0.6443
0.1948
0.5949
0.3786
0.2259
0.2622
0.8116
0.1707
0.6028
0.5328
0.2277
0.7112
0.3507
0.4357
0.2217
0.9390
0.3111
0.1174
0.8759
0.9234
0.2967
0.5502
0.4302
0.3188
0.6225
0.1848
0.4242
0.5870
0.9049
0.5079
0.2077
0.9797
0.0855
0.3012
0.4389
0.2625
0.4709
0.1111
0.8010
>> R2=rand
R2 =
0.0292
>> randn(3,4)
ans =
0.9337
0.1825
1.6039 -0.7342
0.3503 -1.5651
0.0983 -0.0308
-0.0290 -0.0845
0.0414
>> R2=randn(5*3)
R2 =
Columns 1 through 12
0.2323
1.0078 -2.1321
0.7477
0.1136 -0.0942
0.3362
0.3275
0.6770
0.6487 -1.4286
0.8577
0.8257 -0.0209
0.0852
0.7847
1.0360
0.8810
0.3086
2.4245
0.4494 -0.4711
2.1778
0.3232 -0.2339
0.9594
0.1006
0.5362
0.3018
0.8979
0.1370
0.4413
1.4790
0.3501
0.4286
0.1034
0.1922
0.9407
0.5632 -0.8223
0.7873
Columns 13 through 15
0.1644
0.5939 -0.4251
-2.1860
0.1992
0.5894 -1.5210
0.4013
1.4702
0.6125
0.9421
-0.3268 -0.0549
0.3005
0.8155
-1.0516
0.2495
0.7989
0.3975 -0.9930
0.1202
-0.7519
0.9750
0.5712
1.5163 -0.6407
0.4128
-0.0326
1.8089 -0.9870
1.6360 -1.0799
>> B=A'
B=
-8 -12
7 -16 -24
8 -24 -36
>> det(A)
0.7596
ans =
>> inv(A)
Warning: Matrix is singular to working precision.
ans =
>> A/B
Warning: Matrix is singular to working precision.
ans =
>> A\B
Warning: Matrix is singular to working precision.
ans =
>> A*B
ans =
30
70
-160
-240
70
174
-352
-528
-160
-352
896
1344
-240
-528
1344
2016
10
10
36
-56
-96
-56
256
576
-96
576
1296
>> A.*B
ans =
>> A./B
ans =
1.0000
0.4000
2.5000
Inf
0 -1.1429
1.0000
1.0000
0 -1.5000
1.0000
1.0000
>> A1=[1 2
3 4]
A1 =
>> B1=[5 6
7 8]
B1 =
>> A1/B1
ans =
Inf
3.0000 -2.0000
2.0000 -1.0000
>> A1\B1
ans =
-3
-4
>> A1*B1
ans =
19
22
43
50
>> A1.*B1
ans =
12
21
32
>> A1./B1
ans =
0.2000
0.3333
0.4286
0.5000
>> inv(A1)
ans =
-2.0000
1.0000
1.5000 -0.5000
>> inv(B1)
ans =
-4.0000
3.0000
3.5000 -2.5000
>> det(A1)
ans =
-2
>> det(B1)
ans =
-2.0000
SISTEMA DE ECUACIONES:
A=
>> b=[17
29]
b=
17
29
>> rank(A)
ans =
>> rank([A,b])
ans =
>> size(A)
ans =
>> rank(A)
ans =
>> X=A\b
X=
5
2
>> A=[4 -1 0 1 0
-1 4 -1 0 1
0 -1 4 -1 0
1 0 1 4 -1
0 1 0 -1 4]
A=
-1
-1
-1
-1
-1
-1
-1
>> b=[100
100
100
100
100]
b=
100
100
100
100
100
>> rank(A)
ans =
>> rank([A,B])
Error using horzcat
CAT arguments dimensions are not consistent.
>> rank([A,b])
ans =
>> size(A)
Subscript indices must either be real positive integers or logicals.
>> size(A)
Subscript indices must either be real positive integers or logicals.
>> rank(A)
ans =
>> X=A\b
X=
31.2500
37.5000
37.5000
12.5000
18.7500