.


:




:

































 

 

 

 


:

Matlab

 

1. , 6 , . sort MATLAB, help sort.

:

>> sort(A,2)

ans =

2 3 13 16

5 8 10 11

6 7 9 12

1 4 14 15

>> sortrows(A)

ans =

4 14 15 1

5 11 10 8

9 7 6 12

16 2 3 13

>> sort(A,1)

ans =

4 2 3 1

5 7 6 8

9 11 10 12

16 14 15 13

: MATLAB sort. , , .

 

2. sortrows cplxpair MATLAB. PRN , . .

>> [M]=textread('11_2_7_data.prn');

>> sort(M)

ans =

0.1962 0.2962

1.4080 0.7311

3.1120 0.7570

3.3730 1.0340

7.8010 1.1570

8.2190 2.2110

8.4490 2.3750

8.4600 2.4570

8.9880 3.9150

9.4150 4.8760

9.7570 5.1560

10.5900 5.3400

10.9900 5.7830

11.6900 6.2240

12.0600 6.2950

12.8200 6.8100

14.0600 7.0120

14.1800 7.0870

16.0900 7.3420

16.1900 7.8810

16.4600 8.4780

17.3700 8.5910

18.1400 8.9250

19.0900 9.1580

19.4300 9.5670

19.9500 10.0900

21.9800 10.1600

22.1100 10.8800

22.6300 12.0300

23.5500 12.1100

23.8500 12.4700

23.9600 13.1700

24.3600 13.2200

27.9700 13.5400

28.5900 13.9600

29.3000 14.4200

30.7000 15.5200

33.9700 15.6700

34.0100 15.9900

35.1300 16.4300

35.1900 17.8800

35.8300 18.0500

36.0000 18.2500

36.1800 18.6900

36.9700 18.8200

39.5100 18.9600

41.3700 19.0700

42.6300 19.3600

43.0400 20.6300

43.4900 20.8200

43.6500 21.7100

>> sortrows(M)

ans =

0.1962 19.0700

1.4080 1.1570

3.1120 12.1100

3.3730 9.5670

7.8010 10.0900

8.2190 0.2962

8.4490 13.2200

8.4600 17.8800

8.9880 12.4700

9.4150 5.7830

9.7570 6.2950

10.5900 7.0120

10.9900 13.1700

11.6900 0.7311

12.0600 18.0500

12.8200 13.5400

14.0600 14.4200

14.1800 7.3420

16.0900 13.9600

16.1900 6.8100

16.4600 1.0340

17.3700 16.4300

18.1400 9.1580

19.0900 2.4570

19.4300 7.0870

19.9500 10.1600

21.9800 2.3750

22.1100 4.8760

22.6300 5.3400

23.5500 6.2240

23.8500 18.6900

23.9600 8.5910

24.3600 20.6300

27.9700 0.7570

28.5900 8.9250

29.3000 18.2500

30.7000 10.8800

33.9700 21.7100

34.0100 18.8200

35.1300 15.9900

35.1900 5.1560

35.8300 12.0300

36.0000 8.4780

36.1800 15.5200

36.9700 15.6700

39.5100 3.9150

41.3700 18.9600

42.6300 7.8810

43.0400 19.3600

43.4900 20.8200

43.6500 2.2110

>> B=sortrows(M,2)

B =

8.2190 0.2962

11.6900 0.7311

27.9700 0.7570

16.4600 1.0340

1.4080 1.1570

43.6500 2.2110

21.9800 2.3750

19.0900 2.4570

39.5100 3.9150

22.1100 4.8760

35.1900 5.1560

22.6300 5.3400

9.4150 5.7830

23.5500 6.2240

9.7570 6.2950

16.1900 6.8100

10.5900 7.0120

19.4300 7.0870

14.1800 7.3420

42.6300 7.8810

36.0000 8.4780

23.9600 8.5910

28.5900 8.9250

18.1400 9.1580

3.3730 9.5670

7.8010 10.0900

19.9500 10.1600

30.7000 10.8800

35.8300 12.0300

3.1120 12.1100

8.9880 12.4700

10.9900 13.1700

8.4490 13.2200

12.8200 13.5400

16.0900 13.9600

14.0600 14.4200

36.1800 15.5200

36.9700 15.6700

35.1300 15.9900

17.3700 16.4300

8.4600 17.8800

12.0600 18.0500

29.3000 18.2500

23.8500 18.6900

34.0100 18.8200

41.3700 18.9600

0.1962 19.0700

43.0400 19.3600

24.3600 20.6300

43.4900 20.8200

33.9700 21.7100

>> cplxpair(M)

ans =

 

0.1962 0.2962

1.4080 0.7311

3.1120 0.7570

3.3730 1.0340

7.8010 1.1570

8.2190 2.2110

8.4490 2.3750

8.4600 2.4570

8.9880 3.9150

9.4150 4.8760

9.7570 5.1560

10.5900 5.3400

10.9900 5.7830

11.6900 6.2240

12.0600 6.2950

12.8200 6.8100

14.0600 7.0120

14.1800 7.0870

16.0900 7.3420

16.1900 7.8810

16.4600 8.4780

17.3700 8.5910

18.1400 8.9250

19.0900 9.1580

19.4300 9.5670

19.9500 10.0900

21.9800 10.1600

22.1100 10.8800

22.6300 12.0300

23.5500 12.1100

23.8500 12.4700

23.9600 13.1700

24.3600 13.2200

27.9700 13.5400

28.5900 13.9600

29.3000 14.4200

30.7000 15.5200

33.9700 15.6700

34.0100 15.9900

35.1300 16.4300

35.1900 17.8800

35.8300 18.0500

36.0000 18.2500

36.1800 18.6900

36.9700 18.8200

39.5100 18.9600

41.3700 19.0700

42.6300 19.3600

43.0400 20.6300

43.4900 20.8200

43.6500 21.7100

: sortrows ( ), sort cplxpair .

 

3. , ( 2), . .

 

 

>> [M]=textread('11_2_7_data.prn');

>> M=randn([50,2]);

>> normfit(M)

ans =

0.0393 0.0565

>> kurtosis(M)-3

ans =

-0.5369 -0.2553

>> mean(M)

ans =

0.0393 0.0565

>> median(M)

ans =

0.1196 0.1032

>> max(M)

ans =

2.1832 1.6924

>> min(M)

ans =

-2.1707 -1.8740

>> max(M)-min(M)

ans =

4.3539 3.5664

>> range(M)

ans =

4.3539 3.5664

>> std(M)

ans =

0.9760 0.7559

>> std(M,1)

ans =

0.9662 0.7483

>> var(M)

ans =

0.9525 0.5713

: MATLAB . . MATLAB Statistic Toolbox.

 

4. -, , , , , , , . , . , . , Matlab. . .

-:

function Stat(D)

i=length(D);

sum=0;

summ=0;

max=D(1);

min=D(1);

for j=1:i

sum=sum+D(j);

if max<D(j)

max=D(j);

end

if min>D(j)

min=D(j);

end

end

ser=sum/i;

for j=1:i

summ=summ+(D(j)-ser)^2;

end

disp=sqrt(1/(i-1)*summ);

otklon=sqrt(summ/(i-1));

rang=max-min;

median=sum/2;

disp('');disp(median)

disp(' =');disp(ser)

disp(' =');disp(i)

disp(' =');disp(disp)

disp(' =');disp(otklon)

disp(' =');disp(max)

disp(' =');disp(min)

disp(' =');disp(rang);

return

:

19.9500

=

21.8482

=

=

12.4969

=

156.1734

=

43.6500

=

0.1962

=

43.4538

:

>> mean(M)

ans =

21.8482 10.6149

>> median(M)

ans =

19.9500 10.0900

>> var(M)

ans =

156.1734 39.3872

>> std(M)

ans =

12.4969 6.2759

>> normfit(M)

ans =

21.8482 10.6149

>> kurtosis(M)-3

ans =

-1.0933 -1.1435

: - . , , MATLAB.

 

5. , PRN. Matlab , .

, . . .

 

>> [D]=textread('11_5_7_data.prn');

>> S=corrcoef(D) % .%

S =

1.0000 0.8872

0.8872 1.0000

>> cov(D) %.%

ans =

 

1.0e+003 *

2.7515 1.7541

1.7541 1.4208

 

>> [n]=length(D) % %

n =

>> p=sqrt((1-S.^2)/(n-2)) % %

p =

0 0.0659

0.0659 0

: , . , .

 

6. r z PRN, . , . n = 5, 10, 15 20 . r z. . r z n . . .

>> [D]=textread('11_5_7_data.prn');

>> S=corrcoef(D)

S =

0.8872

>> [z]=1/2*log(1+((1+S)/(1-S)))

z =

1.4375

5 n:

f 5=

245.5000 286.9000

221.2000 268.8000

204.9000 278.6000

143.1000 194.9000

126.1000 216.7000

>> [r5]=corrcoef(f5)

r5=

0.9257

>> [z5]=1/2*log(1+((1+r5)/(1-r5)))

z5=

1.6277

 

10 n:

f10 =

227.4000 282.7000

107.3000 186.2000

184.4000 262.8000

239.3000 264.8000

200.9000 271.4000

112.9000 203.4000

122.4000 200.4000

276.4000 289.9000

237.5000 254.2000

249.8000 261.4000

>> [r10]=corrcoef(f10)

r10=

0.9153

>> [z10]=1/2*log(1+((1+r10)/(1-r10)))

z10=

1.5593

 

15 n:

f15 =

 

131.9000 224.0000

132.5000 213.2000

128.0000 206.5000

245.5000 286.9000

149.4000 220.3000

131.9000 224.0000

201.3000 289.1000

282.6000 282.4000

237.5000 254.2000

107.3000 186.2000

198.4000 277.4000

205.3000 235.3000

259.6000 289.4000

128.0000 206.5000

223.8000 288.4000

>> [r15]=corrcoef(f15)

r15=

0.8888

>> [z15]=1/2*log(1+((1+r15)/(1-r15)))

z15=

1.4163

 

20 n:

f20 =

 

186.4000 250.5000

126.1000 216.7000

104.9000 188.6000

107.3000 186.2000

195.4000 243.0000

195.8000 285.4000

268.2000 287.7000

223.8000 288.4000

122.2000 192.5000

223.8000 288.4000

142.4000 197.5000

223.8000 288.4000

102.1000 186.5000

198.4000 277.4000

276.4000 289.9000

223.8000 288.4000

140.3000 231.5000

232.8000 257.8000

198.4000 277.4000

143.1000 194.9000

>> [r20]=corrcoef(f20)

r20=

0.9159

>> [z20]=1/2*log(1+((1+r20)/(1-r20)))

z20=

1.5632

: . .



<== | ==>
ѻ |
:


: 2016-09-06; !; : 293 |


:

:

, , .
==> ...

1812 - | 1493 -


© 2015-2024 lektsii.org - -

: 0.06 .