:
30.11.17
?
11.09.17

14.08.17

26.06.17

17.06.17

09.06.17
?
17.05.17
-?
04.05.17
:
29.04.17
:
26.04.17

.2017
.......
    123
45678910
11121314151617
18192021222324
25262728293031
!!!
!!!
.
.
, .

, , , :

! () . , Word, , , ( pic), , , .., .

" "

962 C ..

, ""

1998

. . .

?

, .

, , .

++ - , - . , ++ , . ++ .

++ , .

: .

:

:

1) , ( 10000);

2) 256 ;

3)     ;

4) xi=xi - m;

5) ;

6) ;

7) ;

8) ;

9) 2 - 8 256 ;

:

a) ;

) ;

) ;

) ;

) .

1

2

#include

#include

#include

#include

FILE *f; //

FILE *out; //

int arr[256]; // a

int uolsh[512]; //

int code, to_int; //

int clk2, loop, clk1; //

float sum; //

float stepx, stepy; // y

int delta; //

char ch[10]; //

int gdriver = DETECT, gmode, errorcode; //

int del=40; //

int max() { //

int tmp; //

tmp=0;

for (clk2=0;clk2<256;clk2++)

if (tmp

return tmp;

}

int ffread (FILE *filptr,char st[10]) {

int flg=0; //

size_t err; //

*st--;

do {

*st++;

err=fread (st,1,1,filptr);

if (err!=1) {

flg=1;

break;

}

} while (st[0]!='n');

st[0]=0;

return flg;

}

void main () {

clrscr();

if ((f = fopen("int.dat", "rt"))== NULL) {

fprintf(stderr, " .n");

exit (1);

}

if ((out = fopen("out.dat", "wt"))== NULL) {

fprintf(stderr, " .n");

exit (1);

}

if (ffread (f,ch)==1) { //

fprintf(stderr, " .n");

exit (1);

}

code=atoi(ch); //

if (code<256) {

fprintf(stderr, " n");

exit (1); //

}

for (clk1=0;clk1

clrscr ();

for (clk2=0;clk2<256;clk2++) { //

if (ffread (f,ch)==1) { //

fprintf(stderr, " .n");

exit (1);

}

arr[clk2]=atoi (ch); //

}

//

sum=0;

for (clk2=0;clk2<256;clk2++) sum+=arr[clk2];

printf (" %fn",

sum/256);

//

printf (" ...n");

for (clk2=0;clk2<256;clk2++) arr[clk2]-=int(sum/256);

//

//

// 0 1/2

// C1=-U*ó (Q+1/2)dQ+U*ó (Q+1/2)dQ=U/4

// õ õ

// -1/2 0

//

printf (" ...n");

for (clk2=0;clk2<255;clk2++) {

uolsh[2*clk2]=(arr[clk2+1]-arr[clk2])/4+arr[clk2];

uolsh[2*clk2+1]=(arr[clk2+1]-arr[clk2])*3/4+arr[clk2];

fprintf (out,"%i ",uolsh[2*clk2]);

fprintf (out,"%i n",uolsh[2*clk2+1]);

}

printf (" n");

getch();

initgraph(&gdriver, &gmode, "");

errorcode = graphresult();

if (errorcode != grOk)

{

printf(" : %sn",

grapherrormsg(errorcode));

printf(" n");

getch();

exit(1);

}

stepx=(getmaxx()-del)/256; // x

delta=(getmaxy()/2); //

stepy=(float)delta/max(); // y

line (del,0,del,479); //

line (0,delta,639,delta);

outtextxy(0,delta+20,"0"); //

outtextxy(33,0,"Y");

outtextxy(500,delta+20," ");

moveto(del,delta-arr[1]*stepy);

setcolor(LIGHTBLUE);

for (clk2=0;clk2<256;clk2++) //

lineto (stepx*clk2+del,delta-stepy*arr[clk2]); //]

setcolor (WHITE);

outtextxy (100,0," ");

outtextxy(100,10," ");

getch();

initgraph(&gdriver, &gmode, "");

line (del,0,del,479); //

line (0,delta,639,delta);

outtextxy(0,delta+20,"0"); //

outtextxy(33,0,"Y");

outtextxy(500,delta+20," ");

moveto(del,delta-uolsh[1]*stepy);

setcolor(LIGHTGREEN);

for (clk2=0;clk2<512;clk2++) //

lineto (stepx*clk2/2+del,delta-stepy*uolsh[clk2]); //

setcolor(WHITE);

outtextxy (100,0," ");

outtextxy(100,10," ");

getch();

initgraph(&gdriver, &gmode, "");

line (del,0,del,479); //

line (0,delta,639,delta);

outtextxy(0,delta+20,"0"); //

outtextxy(33,0,"Y");

outtextxy(500,delta+20," ");

moveto(del,delta-arr[1]*stepy);

setcolor(LIGHTBLUE);

for (clk2=0;clk2<256;clk2++) //

lineto (stepx*clk2+del,delta-stepy*arr[clk2]); //

moveto(del,delta-uolsh[1]*stepy);

setcolor(LIGHTGREEN);

for (clk2=0;clk2<512;clk2++) //

lineto (stepx*clk2/2+del,delta-stepy*uolsh[clk2]); //

setcolor(WHITE);

for (clk2=1;clk2<9;clk2++) {

line (32*clk2*stepx+del,delta,32*clk2*stepx+del,delta+5);

itoa (32*clk2,ch,10); //

outtextxy(32*clk2*stepx+del,delta+10,ch); // x

}

to_int=max()/4;

for (clk2=-3;clk2<4;clk2++) { //

if (clk2!=0) {

line (del,delta-stepy*to_int*clk2,del-5,delta-stepy*to_int*clk2);

itoa (to_int*clk2,ch,10);

outtextxy(0,delta-stepy*to_int*clk2,ch); // y

}

}

outtextxy(100,0," ");

getch ();

closegraph();

printf(" :n");

}

clrscr ();

fclose (f);

fclose (out);

}

3

out.dat:

125 164

206 250

207 77

-15 -71

-20 138

129 -51

-141 -140

-79 42

37 -95

-125 -51

-58 -150

-152 -62

-42 -92

-76 6

-17 -147

-212 -212

-167 -75

28 142

167 101

31 -44

-25 89

68 -89

-142 -90

-75 -99

-135 -184

-212 -218

-159 -33

-12 -98

-148 -163

-130 -48

52 170

192 118

64 32

-42 -156

-134 26

27 -135

-131 39

131 147

70 -102

-199 -222

-128 84

98 -88

-161 -120

-12 162

223 169

117 67

-18 -138

-133 -3

18 -72

-124 -138

-155 -175

-83 121

144 -15

-35 86

94 -12

-100 -168

-113 65

109 17

14 101

157 181

159 89

101 197

143 -63

-163 -156

-61 122

152 27

20 134

99 -86

-186 -200

-192 -158

-151 -171

-142 -64

-23 -17

-37 -83

-86 -46

-62 -134

-70 131

215 181

170 184

120 -23

-100 -111

-82 -10

2 -46

-58 -34

-53 -118

-71 90

143 87

58 59

12 -85

-60 88

152 131

152 216

170 14

-54 -33

50 195

174 -16

-134 -181

-180 -129

-78 -28

36 113

144 128

45 -103

-71 141

171 17

-26 42

10 -124

-84 132

243 247

136 -92

-137 5

53 5

-14 -2

14 34

30 -1

-8 11

76 187

140 -68

-103 37

75 9

-25 -27

29 143

149 47

-23 -61

-115 -185

-171 -70

16 88

153 213

140 -67

-93 63

57 -113

-203 -213

-180 -103

-8 104

85 -69

-156 -176

-188 -190

-181 -157

-102 -16

60 126

185 237

183 21

1 125

108 -52

-50 114

211 240

223 157

147 194

180 104

22 -66

-51 70

162 226

262 270

192 26

-45 -20

-62 -172

-206 -162

-73 61

47 -117

-115 53

97 14

-45 -80

-74 -26

-49 -146

-170 -120

-23 120

205 232

228 192

168 156

64 -109

-186 -165

-126 -70

-46 -55

5 135

180 136

128 157

124 26

37 157

145 -1

-19 93

130 92

-3 -155

-202 -143

-129 -162

-112 22

67 21

0 5

48 128

81 -95

-74 148

167 -17

-92 -58

-88 -184

-151 11

42 -58

-125 -159

-178 -184

-96 86

194 228

136 -85

-169 -115

-74 -45

-38 -55

-15 83

139 153

132 76

89 173

116 -83

-131 -25

13 -19

-29 -16

-17 -33

-54 -80

-92 -87

-59 -9

17 17

8 -11

-63 -149

-80 144

147 -71

-191 -211

-116 96

146 33

-56 -120

-151 -147

-105 -27

11 8

33 89

77 -3

-90 -184

-149 17

106 118

94 33

-9 -31

-82 -162

-174 -118

-54 16

19 -49

-47 25

22 -56

-27 110

98 -64

-108 -30

-43 -147

-82 152

192 35

-5 74

95 55

5 -56

-87 -89

-123 -189

-104 132

232 194

190 221

145 -39

-80 24

-45 -155

-173 -97

-60 -62

-10 100

75 -87

-122 -30

-20 -96

-51 117

138 10

-92 -170

-209 -209

-145 -15

82 146

122 8

-6 84

73 -40

-61 12

-24 -171

-228 -193

-169 -155

-59 121

220 239

175 27

-96 -194

-213 -153

-91 -27

49 137

181 181

153 97

79 99

90 49

72 160

133 -11

-76 -62

-14 68

30 -128

-174 -105

2 147

224 232

237 239

236 224

203 173

133 83

19 -60

-35 95

106 -5

-84 -132

-142 -114

-61 15

82 139

182 210

162 36

33 157

163 50

-63 -176

-216 -181

-147 -114

-20 134

198 170

71 -97

-164 -128

-88 -44

-75 -184

-170 -31

67 123

70 -92

-155 -117

-126 -184

-212 -209

-193 -165

-54 141

239 239

199 116

39 -33

-1 137

184 138

116 120

34 -143

-165 -31

23 -5

29 127

185 203

196 162

86 -32

-20 122

115 -42

-134 -160

-169 -159

-62 124

161 49

-23 -57

-86 -112

-142 -178

-154 -70

-34 -46

-89 -162

-129 11

65 31

44 106

126 102

36 -73

-78 24

5 -136

-95 129

161 -1

-50 14

37 16

0 -10

-70 -180

-194 -110

-101 -168

-119 47

108 62

27 3

-65 -175

-170 -46

23 37

13 -51

-96 -123

-126 -104

-42 58

39 -102

-122 -20

4 -54

-95 -119

-147 -179

-179 -145

-109 -72

-6 89

109 51

44 88

127 161

84 -108

-153 -50

59 174

224 208

205 219

110 -122

-181 -63

26 86

27 -153

-148 42

75 -50

-86 -32

23 77

132 187

112 -94

-104 82

103 -41

-62 42

71 24

15 47

39 -11

-17 21

94 200

142 -83

-126 16

49 -27

-54 -30

5 53

70 54

30 -2

21 103

129 99

39 -51

-12 158

235 219

154 38

-12 5

64 164

153 28

-56 -100

-41 121

105 -93

-100 85

110 -28

-37 83

151 166

115 -3

-98 -168

-146 -30

-13 -97

-46 144

244 256

257 246

127 -99

-129 39

143 182

125 -29

-72 -2

-17 -117

-135 -71

-61 -107

-67 59

108 78

16 -78

-38 138

134 -52

-158 -184

-179 -143

-118 -104

-110 -136

-123 -69

-42 -44

-3 82

127 131

142 158

83 -85

-66 144

130 -110

-206 -156

-132 -134

-111 -61

17 123

122 10

-70 -119

-126 -89

-25 65

71 -9

-30 9

72 158

151 51

35 105

118 72

36 8

-63 -179

-126 96

199 181

121 19

-46 -74

-71 -37

6 59

83 76

58 30

-44 -164

-219 -207

-145 -31

16 -6

-13 -5

-18 -55

-100 -152

-128 -24

-24 -129

-170 -144

-126 -116

-99 -77

-66 -69

-15 97

153 149

76 -66

-155 -189

-148 -28

-20 -124

-141 -69

31 159

-32 59

41 -89

-142 -116

-54 46

87 69

27 -38

-40 24

94 171

95 -137

-224 -165

-105 -43

32 121

83 -83

-131 -59

-29 -42

-40 -20

21 83

94 51

22 8

-38 -116

-67 111

161 82

-18 -138

-196 -190

-135 -30

-39 -163

-178 -82

30 158

183 103

-7 -149

-155 -25

-1 -85

-37 145

154 -11

-67 -12

-25 -109

-83 53

73 -27

-118 -202

-240 -230

-225 -224

-181 -95

-61 -79

-45 45

55 -15

-45 -35

-37 -54

-46 -10

50 135

134 45

38 116

89 -44

-90 -48

-53 -107

-69 63

92 18

-63 -151

-162 -93

-31 25

17 -55

-32 88

124 73

89 173

117 -82

-83 115

179 109

31 -57

-35 99

113 6

-68 -108

-47 115

209 235

196 92

63 109

133 132

73 -44

-29 119

153 72

22 4

23 83

54 -66

-32 156

189 66

31 87

88 33

-58 -184

-235 -211

-109 72

70 -118

-215 -223

-203 -155

-47 119

214 238

202 104

31 -17

-66 -117

-57 117

173 111

40 -40

-115 -184

-148 -6

109 199

141 -66

-141 -83

-45 -27

23 104

101 13

30 156

119 -82

-150 -84

-91 -173

-135 23

55 -39

-21 111

83 -108

-110 78

69 -139

-174 -36

61 116

54 -128

-204 -174

-103 9

55 33

9 -17

-29 -24

-55 -124

-82 73

176 226

236 202

79 -135

-195 -101

-33 7

59 123

104 2

-24 26

80 136

160 152

127 87

57 39

7 -39

-30 34

-13 -171

-154 40

89 -9

-93 -164

-200 -202

-204 -208

-219 -238

-207 -124

-64 -27

-53 -143

-88 114

137 -19

-90 -74

-88 -134

-144 -117

-99 -91

-20 114

79 -129

-199 -131

-85 -60

-19 37

15 -87

-46 138

202 144

67 -27

-33 51

87 75

81 108

49 -98

-89 79

63 -137

-157 4

113 169

139 22

-87 -187

-209 -151

-30 154

247 249

218 151

48 -90

-143 -109

-95 -102

-29 126

148 35

-49 -103

-110 -70

-50 -50

-22 33

58 50

26 -16

-47 -68

-24 86

112 54

32 50

-16 -166

-173 -35

39 49

63 81

7 -160

-163 -1

118 194

168 36

25 135

139 36

50 182

149 -53

-150 -140

-152 -187

-101 107

139 -7

-57 -9

37 80

87 56

-13 -120

-149 -97

-16 95

167 201

215 209

124 -40

-124 -130

-60 88

118 30

1 33

82 146

79 -123

-188 -114

-43 27

98 170

206 203

165 93

-19 -173

-249 -245

-211 -147

-130 -160

-141 -71

-72 -146

-110 38

83 25

48 153

164 79

32 24

39 78

16 -148

-187 -101

-15 69

70 -13

-43 -17

13 47

84 125

164 200

222 230

238 248

180 34

30 168

! () . , Word, , , ( pic), , , ..,
: 20.08.10 | [ + ]   [ - ]  
: 140
: 0
20.08.10
20.08.10
20.08.10
20.08.10
20.08.10
{dnmbottom}
70 000 , , , .