You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
create intervals of equal length but sequential
3 views (last 30 days)
Show older comments
Hi, I would like to create intervals of equal length but sequential. Let me explain better with an example:
I have a duration of 630 seconds, punctuated by every 90 seconds. I have already created a vector indicating the instants [90,180,270,360,450,540,630]. at this point I would like to create a container of intervals, therefore of the type: [0,90], [90, 180] etc. Then put them in a for loop and perform operations inside each of them. in practice I should generate a value through other orperations from the first for within the interval [0.90] to pass to the second interval [90.180] and so on. How can this be done? Thank you all
8 Comments
Marco Carapellese
on 12 Feb 2022
my code at the moment is as follows.
p = 0:630;
ti = (0:p(end)/90)*90
for i = 1:duration
traci.simulation.step();
for ii = 1:numel(ti)-1
% idx = ti(ii+1)-ti(ii);
idx=ti(ii):ti(ii+1);
% result(idx) = ti(ii);
for x=1:length(idx)
for n = 1: length(inductionID)
macchine(n,x,ii)= traci.inductionloop.getLastStepVehicleNumber(inductionID{n});
somme=sum(macchine,2); %I want to sum for each ii, the values contained in the whole considered interval, so for example for ii = 1 I would like the sum of all the values calculated in [0,1 ... 90] and so on for the other ii
end
In practice I can add the "macchine" calculation on all the elements of the interval [540,541 ... 630] and then do the sum. The only problem is idx does not update together with ii, so idx remains fixed to me at [540,541 ... 630], not passing through [0,1 ... 90] [91,92..180] etc, and therefore all the following code is always calculated on the same interval
Voss
on 12 Feb 2022
idx updates with ii:
p = 0:630;
ti = (0:p(end)/90)*90
ti = 1×8
0 90 180 270 360 450 540 630
for i = 1:1%duration
% traci.simulation.step();
for ii = 1:numel(ti)-1
% idx = ti(ii+1)-ti(ii);
idx=ti(ii):ti(ii+1);
disp(sprintf('ii = %d',ii));
disp(sprintf('idx = %s',sprintf('%d ',idx)));
% result(idx) = ti(ii);
% for x=1:length(idx)
% for n = 1: length(inductionID)
% macchine(n,x,ii)= traci.inductionloop.getLastStepVehicleNumber(inductionID{n});
% somme=sum(macchine,2); %I want to sum for each ii, the values contained in the whole considered interval, so for example for ii = 1 I would like the sum of all the values calculated in [0,1 ... 90] and so on for the other ii
% end
% end
end
end
ii = 1
idx = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
ii = 2
idx = 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
ii = 3
idx = 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
ii = 4
idx = 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
ii = 5
idx = 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
ii = 6
idx = 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540
ii = 7
idx = 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630
Marco Carapellese
on 12 Feb 2022
Edited: Marco Carapellese
on 12 Feb 2022
first of all thanks for your availability.
yes, but then when it goes to calculate "macchine" it does it only on the last ids that is [540,541 ... 630] since all the others are not stored. How can I make the first line of a vector contain ids from 0 to 90, the second line to contain those from 90 to 180 and what goes for all 7 ranges? so that it can then index that vector in x and use it to compute "macchine"
Voss
on 12 Feb 2022
I see what you mean.
for i = 1:1%duration
% traci.simulation.step();
for ii = 1:numel(ti)-1
% idx = ti(ii+1)-ti(ii);
idx=ti(ii):ti(ii+1);
% result(idx) = ti(ii);
for x=1:length(idx)
for n = 1: length(inductionID)
macchine(n,x,ii)= traci.inductionloop.getLastStepVehicleNumber(inductionID{n});
% somme=sum(macchine,2); %I want to sum for each ii, the values contained in the whole considered interval, so for example for ii = 1 I would like the sum of all the values calculated in [0,1 ... 90] and so on for the other ii
end
end
end
end
In that case, macchine is calculated based on x, which always goes from 1 to length(idx). Instead macchine should be based on idx(x), like this:
for i = 1:1%duration
% traci.simulation.step();
for ii = 1:numel(ti)-1
% idx = ti(ii+1)-ti(ii);
idx=ti(ii):ti(ii+1);
% result(idx) = ti(ii);
for x=1:length(idx)
for n = 1: length(inductionID)
macchine(n,idx(x),ii)= traci.inductionloop.getLastStepVehicleNumber(inductionID{n});
% somme=sum(macchine,2); %I want to sum for each ii, the values contained in the whole considered interval, so for example for ii = 1 I would like the sum of all the values calculated in [0,1 ... 90] and so on for the other ii
end
end
end
end
But that only works when idx are positive integers, which they are not in this case since ti(1) == 0. (Notice how idx(1) == 0 in the first line output in my previous comment.) So you can increment idx(x) by 1 to make positive integers you can use as indexes:
p = 0:630;
ti = (0:p(end)/90)*90;
inductionID = {'ID1' 'ID2' 'ID3' 'ID4'};
for i = 1:1%duration
% traci.simulation.step();
for ii = 1:numel(ti)-1
% idx = ti(ii+1)-ti(ii);
idx=ti(ii):ti(ii+1);
% result(idx) = ti(ii);
for x=1:length(idx)
for n = 1: length(inductionID)
macchine(n,idx(x)+1,ii) = randn(); % some random number for demonstration
% macchine(n,idx(x)+1,ii)= traci.inductionloop.getLastStepVehicleNumber(inductionID{n});
% somme=sum(macchine,2); %I want to sum for each ii, the values contained in the whole considered interval, so for example for ii = 1 I would like the sum of all the values calculated in [0,1 ... 90] and so on for the other ii
end
end
end
end
disp(macchine(:,:,1)); % scroll to see the whole thing
Columns 1 through 22
0.4029 -1.1310 0.5691 0.4782 -1.9517 -0.8796 0.2554 -1.3030 -0.8467 -0.4827 0.6648 -0.6753 -0.6921 0.8075 2.1117 -1.2827 -0.8634 -0.9011 0.3757 1.1385 0.6638 0.0416
1.0337 0.6250 1.3640 -0.2452 -0.6671 1.2604 0.3506 0.8643 -0.9294 -0.0309 -0.5136 -1.1384 0.8573 1.3740 1.1334 -0.2593 -1.1761 0.9761 -0.4883 -0.2354 0.2776 -0.4506
0.1757 0.4979 1.2770 -0.1906 -1.5582 -0.6104 -2.4015 -0.0339 0.2384 -0.2610 0.9147 -0.1105 0.8456 0.4475 -1.2294 -0.7875 -0.6009 1.3979 1.1532 -1.5350 0.5443 -2.1818
-0.6507 -0.0916 -0.5371 0.4824 0.7014 -0.5385 0.6509 -1.7952 -1.5368 0.9241 -0.3082 -0.5902 1.3226 1.2224 -1.5964 0.3576 -0.1412 0.2378 -0.1168 0.0985 -0.5298 0.9989
Columns 23 through 44
-1.6284 -0.0016 -0.3054 1.0215 -1.4516 -0.1749 0.7952 -0.3506 -0.8599 -2.0965 -0.1563 -0.1735 1.5042 2.6392 2.6145 0.3791 -1.0309 0.8479 -0.3798 -0.4295 -1.6933 -0.6438
0.4538 0.7285 -0.2390 -0.0292 -0.7595 -0.9973 -0.4505 -0.0727 0.4063 0.4900 1.0100 2.9447 1.8107 -1.0183 0.5946 0.2249 -0.3962 -0.1439 -0.0142 -1.3635 -0.8358 0.4222
0.6974 -1.3556 -1.6623 -0.8024 1.2131 0.1058 -0.6034 0.4977 -0.9132 -1.3458 0.2084 1.7265 -0.7772 0.7620 1.1746 -0.8298 -1.4743 -0.8423 1.1619 0.1972 -1.0848 -0.9041
-1.5579 -0.2106 -0.1537 0.1530 1.0541 0.5147 -0.1814 -1.2558 -1.0726 -0.1255 -0.8430 -0.4287 1.4903 -1.0891 0.2958 -0.1895 1.0863 -0.2513 0.9098 -1.6859 1.5958 -1.2217
Columns 45 through 66
-0.3268 1.0734 1.5344 0.4181 1.1953 0.4835 -1.5362 -1.4575 -1.0349 -1.4824 -0.7975 -0.8601 -0.0691 0.8038 0.7681 -1.1327 -1.5957 1.6548 -2.2085 -0.5299 -0.8068 -0.7876
-1.1623 -0.2700 -0.5762 0.0094 2.8127 0.1214 -1.7115 -2.5478 -1.2013 -1.4861 0.8510 -1.9193 -3.1157 1.4563 -0.2813 0.2367 0.2276 -1.8115 -1.3783 -1.2285 0.8111 0.0532
-0.5780 0.5721 0.0326 -0.2567 0.6929 0.5263 2.5751 -0.2572 -1.5883 -0.4499 1.1254 -0.4598 -1.1534 -1.9212 -0.2468 -0.5400 -0.6489 -0.6344 1.3453 0.4257 0.0389 2.4579
-1.8004 1.0403 -0.4590 1.0016 -1.2920 0.0026 -0.4644 1.8377 -2.3611 -0.7709 -0.6899 1.0016 0.4009 -0.2434 0.3665 -0.9008 0.1552 1.0262 -0.7329 0.4824 1.6986 0.2978
Columns 67 through 88
0.8231 -0.6906 1.5663 0.8809 -0.6001 -0.6141 -0.1748 -0.6428 0.9257 1.8741 -0.2301 -0.9807 0.9485 0.0447 1.1074 0.7735 -0.4220 0.5401 -1.4281 1.3174 0.2476 -2.4477
0.0157 0.6217 0.9801 -1.7609 -0.6286 -1.7262 -1.3000 1.7842 -0.0596 -1.7452 0.7083 -1.0446 0.8961 -1.0743 -0.9052 -1.2724 -0.3032 1.1907 -0.1533 0.2230 0.9605 0.7926
-0.0495 -0.9262 0.7888 0.0326 -0.7063 0.1272 -1.0455 1.7829 0.6318 1.3207 -1.4909 0.9457 0.7805 1.1322 0.0231 -1.4632 0.1169 -0.0181 -1.7021 -0.8681 0.1858 -0.6462
0.0393 0.2542 -0.4441 -0.8087 -0.3805 -0.5970 1.8247 -0.0751 -0.2073 1.9665 -0.5997 -0.6286 -1.0527 -0.7760 -0.5044 0.6284 1.4635 -0.8767 -0.0961 -0.2254 -1.3766 -0.3039
Columns 89 through 110
1.7464 -0.5546 0.4311 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.1952 0.2966 -0.2779 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.9233 -0.8362 0.0279 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.1148 -0.3969 1.2376 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 111 through 132
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 133 through 154
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0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ll to see the whole thing
Columns 1 through 22
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 23 through 44
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 45 through 66
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 67 through 88
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 89 through 110
0 0 -0.9804 1.3251 -1.8448 -0.4467 0.3009 -0.8670 1.0478 -0.6406 0.1853 -0.0297 0.0226 -0.3377 0.0714 -1.4636 -0.7278 -1.0884 -2.0344 0.4674 -1.0391 0.9509
0 0 -1.1866 -0.1638 1.6812 -0.5473 -0.4168 -0.1521 0.3705 -0.7206 0.1766 -1.9321 0.8930 -0.4038 -0.6081 0.6667 1.7444 -1.0130 -0.1385 0.4083 -1.3685 1.8127
0 0 0.9303 -0.4986 1.7776 -0.1231 -0.4963 0.1047 0.2230 -1.2302 0.0634 0.7178 -0.2310 -1.1793 -1.7849 -0.6509 -0.8898 0.1964 1.4567 -0.8823 0.8011 -0.3872
0 0 -0.6217 -1.6112 -0.1135 -1.4495 1.3927 -0.9661 1.0256 0.6473 -1.0956 -0.9159 0.1911 1.5513 0.9425 0.2141 -0.6434 -2.1171 -0.2534 0.9998 -0.6152 0.4932
Columns 111 through 132
0.2952 -0.0863 0.2584 0.2710 -0.2900 0.3299 0.9084 0.6043 -0.3392 -1.5037 0.3387 -1.6608 0.2111 0.6243 0.5700 -0.4979 0.9062 -0.6227 0.7993 -1.3619 -1.3186 -0.7941
-0.6791 0.0567 0.3870 0.7510 -0.4573 1.7929 -0.2697 -1.8327 -0.0418 -1.7678 -1.8794 0.1390 -1.0604 -0.7416 -0.8445 -0.7467 1.9126 0.1925 -0.3223 0.1606 -0.2538 -0.9951
2.1691 -0.2785 0.8996 0.9876 1.1765 -0.4041 -0.5874 -0.2236 0.9332 -1.4157 0.8632 -0.6684 0.4674 -0.9709 -2.0341 0.7827 0.9028 0.6156 -0.7260 0.7165 -0.5001 -0.6372
1.6550 0.0441 0.6417 0.6926 -0.8813 -0.0614 -0.7798 -0.3425 0.7737 0.9896 -0.7324 -0.5217 2.1679 1.2594 0.6933 0.4048 0.4664 -1.2397 0.3114 0.6828 -0.4804 1.7632
Columns 133 through 154
-0.6203 0.3346 1.4737 1.2820 0.8647 -0.8705 1.4177 -0.0468 1.2377 0.9875 -0.9635 1.3570 -0.2649 2.0592 -0.8430 2.5573 -0.7560 0.2131 0.0635 0.0762 0.2580 -2.4003
0.8411 0.6227 1.7140 0.6542 0.8925 1.6847 0.5147 -1.1213 -1.4869 -0.7367 0.6863 -1.6456 0.9458 0.9940 0.1891 -0.7672 0.0351 -1.0673 1.8344 -0.0130 0.6191 -2.7327
0.1981 -0.2471 -3.8852 0.6530 1.6779 -1.1305 -0.3110 -1.0305 0.1930 2.2046 1.0591 -0.6494 -1.3554 -1.1569 0.2354 -0.1242 0.2130 -0.8300 0.7033 -1.3189 -0.0808 -1.1846
-0.9072 1.3144 1.6756 -1.1439 -0.5499 -1.1591 -0.7906 -0.4244 -0.8894 -0.9608 0.4170 1.4801 -0.6459 0.6384 -0.1698 -0.0804 -1.5317 0.7619 -1.1744 -1.4523 -1.3791 1.2049
Columns 155 through 176
-0.7739 -0.9532 -0.2213 0.7902 0.9474 0.0151 0.3476 0.8807 1.2999 1.1077 0.7205 0.5060 0.3398 1.0568 0.5298 -0.1761 1.0052 0.3822 -0.8445 -0.5479 -0.9479 1.0169
0.6358 -0.7035 -0.5749 0.1621 1.2151 1.8694 0.9003 1.0517 -0.5400 0.8627 2.6161 0.4616 1.0106 0.4267 -1.0474 0.3864 0.0482 1.2754 0.6208 0.0915 -1.7636 0.2086
-1.3121 1.2763 -0.8175 0.2160 -1.5490 -1.0500 0.5632 1.4089 -0.5199 0.9608 -1.3567 -2.1098 -1.3716 0.5149 0.2755 1.3330 -0.6313 0.9027 -1.1368 0.9371 -0.1333 -0.2251
1.0817 3.1912 -1.2190 -0.0868 -0.8913 0.0988 0.1798 -0.1750 0.4891 -0.3737 -0.2603 2.2139 0.3543 1.8935 -1.5501 2.3031 -0.4353 0.2936 0.9056 -0.9818 -1.1865 -1.4858
Columns 177 through 198
0.5252 -0.7116 0.6872 -1.4653 -0.7466 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1.3021 0.6830 0.5089 0.4071 0.8320 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.5157 1.1070 -0.7594 -0.9906 0.0664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-1.6896 -0.0359 0.6740 -1.5811 -1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 199 through 220
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 595 through 616
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 617 through 631
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
But now macchine has non-zero values only at locations (:,1:91,1), (:,91:181,2), (:,181:271,3), etc. because the indexes in the second and third dimension are changing together, since ii and idx change together. To make it simpler you can revert to 2D macchine (if that is ok for your purposes) which will be completely filled:
p = 0:630;
ti = (0:p(end)/90)*90;
inductionID = {'ID1' 'ID2' 'ID3' 'ID4'};
macchine = zeros(numel(inductionID),numel(p));
for i = 1:1%duration
% traci.simulation.step();
for ii = 1:numel(ti)-1
% idx = ti(ii+1)-ti(ii);
idx=ti(ii):ti(ii+1);
% result(idx) = ti(ii);
for x=1:length(idx)
for n = 1: length(inductionID)
macchine(n,idx(x)+1) = randn(); % some random number for demonstration
% macchine(n,idx(x)+1)= traci.inductionloop.getLastStepVehicleNumber(inductionID{n});
% somme=sum(macchine,2); %I want to sum for each ii, the values contained in the whole considered interval, so for example for ii = 1 I would like the sum of all the values calculated in [0,1 ... 90] and so on for the other ii
end
end
end
end
disp(macchine)
Columns 1 through 22
0.1872 -0.5341 -0.0175 0.0233 -0.1267 -0.3267 0.1167 -0.0951 0.0630 -0.3018 0.5830 -1.3141 -1.5435 -0.0314 0.3755 -0.8784 -0.3787 0.7466 -0.5039 -0.6473 0.7506 0.2322
-1.4320 0.7097 -0.9014 0.4100 -0.1756 0.3693 2.7511 -2.1641 0.3598 0.2551 -1.8419 -0.7172 0.1619 0.0782 0.2579 0.2360 -1.1671 -1.3065 -0.1131 0.8059 -0.6203 0.1822
0.2774 0.2515 0.0744 0.9761 -0.6684 1.0842 0.6692 0.5893 -0.4782 -1.0852 -1.3674 -1.3299 0.2255 0.7234 0.2713 0.9791 -2.2308 -1.1474 -0.9343 -0.9026 0.7495 1.1926
-1.2886 -1.0795 -0.8142 1.3888 0.4479 0.5920 0.0278 -1.3711 1.7580 1.1507 -1.0052 -1.0642 0.0767 2.0881 0.1830 -0.1378 -1.6464 -0.1198 -0.2769 -0.0772 -0.2916 -0.9255
Columns 23 through 44
-0.0595 1.6427 -0.8047 1.0416 -0.2766 -1.2798 1.8987 -0.6255 0.5157 0.7471 -0.0094 -2.0048 0.9982 -0.5194 -0.9279 -0.6473 -0.5818 -0.2122 0.5410 0.7705 -0.8144 -0.3602
-0.7753 0.3805 -0.8277 -0.5057 0.9894 0.2594 -0.4790 1.2351 -1.0994 1.1586 -0.5106 -1.2149 -0.0680 0.1421 0.8348 0.1958 1.2740 0.8154 1.6704 1.0774 1.9662 -0.2602
-0.2867 -0.4160 1.4852 1.0748 1.3666 0.8191 0.5147 -0.0477 0.4164 0.2446 -1.2747 0.5801 0.5418 -0.6173 -0.0120 -1.3066 -1.9865 0.6891 0.5337 0.1510 -0.3280 1.7892
0.4943 -0.6093 1.1948 0.1979 0.2667 1.7756 -1.1222 1.1254 -0.5843 0.2402 0.9963 0.6550 0.3553 -2.5679 -0.2712 -1.9213 0.6769 0.8201 0.9736 -0.9670 -1.3100 -0.9047
Columns 45 through 66
-0.6315 -1.3432 0.6532 -0.1148 -1.7405 -0.8172 -0.1347 0.0419 -0.4865 -0.1789 -0.2009 0.4940 0.0181 -0.4361 -0.4841 -0.7546 0.5078 -0.4729 1.0536 0.4623 0.0468 1.8993
-1.6180 1.0491 0.4500 -0.5818 -1.3801 -1.1374 -0.1023 0.7657 0.4596 -0.4037 0.1143 1.0511 0.6173 -0.0999 -0.5326 0.2640 -1.0537 -0.9013 -1.1833 -0.1954 1.3251 0.7661
-1.0437 -1.8708 -0.5889 0.2535 0.0351 0.2402 0.0443 -0.3587 -0.6384 0.1914 -0.6728 -0.2859 -1.7801 -0.3393 -0.8489 1.3014 -0.2853 0.3776 0.0030 0.9302 2.0557 0.5581
0.1799 -0.8080 -1.0992 -0.9787 0.7737 -1.6676 0.2181 -0.5438 0.6978 0.3412 0.4286 0.1229 1.0389 0.8130 -0.2937 -1.5912 1.2689 0.1115 0.1201 0.5354 1.1359 0.6035
Columns 67 through 88
-0.2153 0.7693 0.0434 -0.7444 0.5556 0.1829 -0.1181 1.4888 0.3720 -0.6310 -0.4877 1.3420 -0.1585 0.1968 0.7672 -0.7846 1.8323 -0.1069 0.3453 -0.5746 0.0141 -1.6800
0.3292 -0.4981 -0.0419 2.3320 0.2884 1.1115 1.0363 -0.6118 0.0882 -1.2390 -0.9868 -1.2083 1.2942 -0.3154 -0.2091 -0.4391 -0.8004 -0.9651 -0.5706 0.2990 -0.0296 0.2299
0.9647 0.3181 0.9630 1.9537 1.0654 0.7745 0.8610 -0.0622 0.7627 0.5460 -0.2030 0.7552 -0.2043 -0.4314 0.1149 -1.4742 0.3374 -0.4314 0.0603 -0.5863 -0.2933 0.0023
0.4136 -2.2372 0.2823 0.2198 -2.0180 -1.2841 -0.9228 -0.3302 0.3030 -0.5419 -2.3363 -0.5133 -0.1105 0.7508 0.4878 0.6987 1.0862 0.9364 -0.5612 -0.6289 0.7552 -0.4581
Columns 89 through 110
0.4833 0.6640 0.3783 -0.4251 0.5967 -1.1079 0.7059 0.6272 0.3017 0.8773 0.9362 0.7300 -1.3370 -0.1072 0.2887 -0.1026 0.9551 -0.6726 0.2529 0.3240 -0.9159 -0.7651
-0.5140 -0.2060 1.0991 -1.3591 0.4108 0.8840 -0.4716 -0.9979 -1.2185 -0.7441 0.9722 -0.8102 0.1291 1.2165 -1.1912 1.5202 0.3133 0.0250 0.8262 0.5266 1.4417 0.3133
-0.2556 -0.1531 -0.4871 0.2332 0.3969 1.2956 -0.5643 -1.2026 1.0887 2.9790 -0.4063 -0.7781 0.8586 0.8288 1.0576 -0.8775 0.6505 0.1044 -0.0104 0.1060 -0.1792 0.3450
-0.3413 -0.7082 -0.4702 1.5267 0.3641 -1.7374 -0.7277 0.9906 0.7109 0.0710 -0.2608 -0.6195 0.2931 1.3502 0.9170 -0.7618 -0.3152 -0.2736 -0.4501 0.0869 0.7153 0.1604
Columns 111 through 132
-1.3631 0.5679 1.6402 -0.4327 0.1312 0.3832 1.9918 1.3394 -0.1626 -0.7038 -1.1764 0.5619 -0.8660 0.9132 0.8035 0.2994 -1.1533 -0.7927 -0.2533 0.0832 -0.3698 -1.2776
-1.7446 -0.3649 -2.0830 0.2044 1.0331 -0.9354 -1.9273 -1.0153 0.5757 -0.6272 0.1178 -1.3937 -0.5435 -0.1702 -0.7091 1.1426 1.5479 -0.3024 -0.6318 -0.4671 1.1264 2.4734
0.0940 -0.7774 -0.3363 -1.1186 -0.4021 -1.1767 2.2192 -0.4470 1.9097 -0.7262 -0.2724 1.7550 -0.7060 1.1647 -0.6289 0.5872 0.8063 0.3031 0.0889 0.3000 0.1142 -1.4728
-0.7825 -2.9680 -0.6291 -0.7979 0.5067 -0.4833 0.5342 -0.0493 -1.8576 -0.3453 0.3273 -1.4859 0.7760 -2.0411 -0.7635 0.3680 -2.0296 -0.6632 1.2944 -2.0779 0.9482 1.2428
Columns 133 through 154
-0.4558 1.1260 -1.0409 -1.4493 1.2767 -1.3425 -0.5073 0.6261 -1.4903 -0.2810 1.1524 -0.8804 0.1190 0.8907 -1.1137 -0.8947 -1.6330 -0.5618 0.7114 -0.4957 0.0551 0.8614
0.4846 -2.1615 -0.1129 -0.5991 -0.6820 0.1780 -0.7353 -0.0692 -0.7630 -0.3428 -0.6258 2.4520 -0.3432 -1.4128 0.7074 1.6063 -0.6981 1.0864 -0.9250 0.4239 0.3239 -0.8691
-0.9227 1.8435 0.6624 1.1272 1.3384 0.5840 1.4265 0.6433 0.7622 0.2096 -1.2391 0.0795 0.0279 0.1098 0.7644 -0.7137 -0.9947 0.3153 0.4113 0.6791 0.5026 0.9948
0.5325 0.7033 -0.3122 -0.4303 -0.6960 1.6232 -0.1658 -1.5085 -0.1191 -1.0113 0.6570 1.1391 -1.5551 0.2296 0.0411 0.3098 -0.5301 -0.0560 0.5262 0.3003 -0.0411 0.8310
Columns 155 through 176
0.4616 0.4165 -1.2335 -0.5525 0.9975 0.0693 0.0446 2.5979 -0.8806 0.0182 0.1838 0.8989 1.0994 1.0769 1.4749 -1.7416 -0.5528 0.7377 -2.1485 -0.9765 0.9821 0.1932
-1.2728 0.5526 -0.5451 -1.1217 2.1308 0.2739 0.2038 0.6137 -0.7411 -0.2287 -1.7702 -0.4864 0.7417 -0.3695 -2.0988 -0.8834 -1.1514 -0.5776 -1.0036 -1.0837 1.4551 -0.3423
0.1817 1.2552 -0.2900 -1.4944 -0.7181 0.3247 -2.0642 -1.4782 0.3173 -2.8421 0.2262 0.3723 -1.4177 -1.2740 -1.2484 -0.6390 -0.1351 0.9386 0.1976 0.2965 0.7507 -0.8434
-0.3369 -2.0218 -0.5818 -0.1096 -0.1537 -0.7383 -0.1182 0.5397 -0.4334 1.5056 0.1744 -0.0871 -0.7697 0.0481 -1.2737 -1.0092 -0.3476 0.5948 -0.9585 -2.4834 0.1694 -0.8110
Columns 177 through 198
0.1272 0.2927 -0.5602 -0.6570 -1.3606 -0.4236 1.7303 -0.3220 0.0892 -0.7217 0.7749 0.3929 -1.5704 1.1201 -0.3083 0.3392 -1.8133 0.9629 0.0170 -1.1269 1.1914 0.7982
0.8134 -0.9773 0.8232 -1.7779 1.0561 1.2132 -0.6156 0.6250 -1.3808 -0.1125 0.1430 -1.0672 -1.2008 0.2778 0.4073 -0.8112 -0.5339 0.5907 -0.6140 -0.0993 -0.3641 0.3673
-0.2552 0.5849 -0.2907 1.0962 1.1255 -1.3572 1.2153 0.8980 -0.9860 0.3102 0.7640 0.7570 0.8831 -0.5998 -1.5160 0.4745 1.8543 0.5071 1.5473 0.9499 -0.8394 0.1302
0.2861 -0.4787 -0.1457 0.0321 0.4528 1.1098 1.1412 -0.2807 1.0186 -1.1349 -0.5774 -0.9477 -0.3716 -0.4094 0.2559 -0.6493 -0.6295 -0.9780 -1.4871 0.5888 1.3434 0.4337
Columns 199 through 220
0.9652 0.1000 -0.6949 -0.8256 0.1841 -1.5192 0.0514 -0.2319 -0.3127 0.2230 2.4059 -0.6073 0.1009 -0.2829 1.8428 2.2293 0.0177 0.2650 0.1273 -0.8050 1.0767 0.1832
-0.1810 -0.2291 -0.6863 -1.3296 0.0653 0.9437 2.0194 0.9174 0.4897 1.6496 0.2299 0.3082 0.5540 -0.9266 1.7265 -0.5599 0.9147 -0.9953 -0.5266 0.8309 -1.2702 -0.0276
-2.0867 -0.9482 0.0816 1.3289 -0.6126 1.2834 0.7363 1.3895 -1.9898 -0.2207 1.5446 1.2684 -0.2295 0.6134 -0.2373 -0.8660 -0.1444 1.5375 -1.0033 0.7446 0.9203 -0.4829
-0.0346 -0.0773 -0.2972 0.0914 -0.5486 0.1785 0.7428 1.6039 0.5424 -0.6488 0.3690 0.7207 -0.3874 0.7512 -0.2349 -1.3495 0.6150 0.4088 -0.1599 -1.2108 0.8770 -0.3202
Columns 221 through 242
0.5298 1.0790 -0.2001 0.0624 0.1744 0.2216 -0.2154 0.3591 0.4271 1.2395 -1.5924 -0.0270 -0.1475 0.4525 0.4569 0.5521 -0.7438 0.7368 0.5497 -1.2394 0.5194 0.0362
-0.0075 -1.9085 0.4394 -0.1966 1.0427 -0.7772 -0.1292 0.5599 -0.6383 -0.8087 -1.2319 0.5402 -0.9619 0.5979 0.4392 -0.8501 -1.0330 1.0977 0.6294 -0.0766 0.0855 0.0526
-1.2512 -1.1985 1.4657 0.6735 1.4087 -0.2542 -0.3754 0.2452 -1.3815 -0.8404 0.5828 -0.3676 0.2910 -1.9883 0.3162 0.0861 -0.3793 1.3367 0.1484 -1.4234 -1.4254 0.7409
0.2805 -0.2562 -0.0317 -0.5640 1.2075 1.0719 -0.9875 2.5060 -0.2971 0.5466 -0.8114 1.4701 0.6165 0.3797 2.5978 -0.3916 -1.3007 -0.8484 -0.0006 0.9844 0.3941 -1.2400
Columns 243 through 264
0.0176 -0.5962 3.0806 0.2537 -0.1953 -1.0302 -0.9090 0.8185 -1.2259 0.1204 0.5470 1.5874 -0.5546 1.3577 -0.2853 0.4240 3.4118 -1.1490 -1.7025 0.6232 -1.0375 -0.3764
-1.4316 0.8204 0.0136 -0.8869 -0.4510 1.6627 0.3452 -1.1490 -0.4574 1.0855 0.8833 1.2189 1.5478 -1.4656 -1.4686 0.7827 -0.2735 -1.4741 -1.5361 -0.6528 2.2024 0.8283
-0.3441 -0.3849 0.0528 -0.6542 0.7646 -0.8825 1.2668 1.1310 0.0884 1.5220 -0.8450 0.7258 -0.5859 -1.3600 -0.5044 -0.9299 2.9175 -0.7256 1.1904 -0.1652 0.1881 1.1661
-1.4090 -0.1426 -1.2833 -0.8358 1.5710 0.0876 -0.0358 -0.2655 -1.0400 1.8750 0.2802 0.1630 -1.0238 -0.5231 -0.7210 -1.4187 1.5070 -0.4998 -0.9779 0.1486 -0.3566 -0.3637
Columns 265 through 286
0.8821 1.3143 -2.0015 1.9518 -0.6888 -0.6949 -0.9737 1.1348 0.4644 0.0545 0.7202 -0.1391 0.4605 0.0982 -0.4526 1.5266 -1.9781 0.9640 0.2800 1.4246 0.0738 -0.0272
1.3712 1.7941 0.8899 -0.0671 1.7027 0.1277 0.2660 1.7063 -1.2514 0.9613 0.1010 -0.4399 1.8058 -1.5114 0.1204 -0.1357 0.4987 0.1087 -1.3722 1.2400 -0.9547 0.1083
2.2308 -0.0319 0.1157 -0.0954 -0.9161 -1.5834 1.5998 -0.0079 -0.4651 1.2395 -0.7842 1.3057 -0.9264 0.6424 2.0547 -0.8228 -1.6321 -0.5020 0.5393 0.1081 -0.4961 0.3986
-0.4691 -0.0952 -1.6354 -0.7248 1.2981 0.7450 0.5087 -0.2507 -0.4721 0.6364 0.4073 0.0050 0.0233 0.4721 -2.1873 -1.3997 0.4843 0.1290 0.8249 0.0611 -0.3969 -0.7013
Columns 287 through 308
-0.3456 0.8903 -2.4415 -0.4965 0.8370 0.6513 0.1666 1.6733 0.2831 -0.3788 -0.0156 2.5946 -0.2697 -0.4750 -0.4408 -0.0601 0.7440 -0.1907 1.0614 0.2428 1.1399 -0.4318
1.6204 1.2190 1.6416 -0.3966 0.3634 -1.6824 -0.7629 0.5696 -0.8220 -0.3175 -0.9051 -0.7383 -0.0464 0.1577 -0.0881 0.1070 -0.3510 -0.0083 -0.2858 -0.3062 0.6357 0.2836
0.7833 0.0447 -1.3933 -0.7082 0.1795 -1.0051 0.3647 -1.3680 0.4874 1.0329 2.1962 0.0373 0.8452 -1.0943 -1.9768 -0.1558 -0.7397 1.7047 -0.1208 0.8858 -0.9235 2.0497
0.8461 -1.4289 1.0914 0.4918 0.2015 -2.1421 -1.3758 -0.6548 1.6305 0.2442 -0.9611 -1.6343 0.5203 -0.8055 -0.3770 0.3877 0.5680 -0.2379 0.3915 -1.2771 0.7882 1.3328
Columns 309 through 330
-0.4013 0.2753 0.2462 0.6941 1.1309 0.6465 0.2911 -0.8834 -0.7729 -1.3803 1.6407 2.0776 0.4197 -0.8597 0.9391 -0.0215 0.0223 -0.9909 0.4838 0.6525 -1.3982 2.2123
-0.5252 -0.7447 0.9955 -1.0592 -1.2758 0.3617 0.3595 -0.8210 -0.2364 0.6611 1.1277 1.2037 0.9621 -1.1657 1.0781 1.3074 -1.6576 0.3761 0.6652 -1.1176 0.4649 -0.6848
-0.8361 0.6011 -0.3047 0.5150 -0.2510 1.5420 -0.2933 -0.0677 -0.8536 1.0597 0.2895 -0.3879 0.2783 0.9074 0.7569 -1.3689 -0.7669 -1.5870 0.7234 1.1376 -0.4502 -0.1711
-0.6617 -0.6028 -1.6388 -0.8489 0.7506 0.3298 -1.2053 0.6176 0.5172 0.2591 -0.9328 -0.5603 0.1245 -0.5224 -1.4837 -0.7387 0.6955 0.1651 -1.2849 0.9000 -2.3746 0.5152
Columns 331 through 352
1.5786 -0.0428 -0.6556 -0.7151 0.6993 0.8654 0.8672 0.6423 -0.8655 1.4432 0.2326 0.4592 0.3455 -0.2642 1.1538 -0.3032 0.1657 -0.0074 -0.0910 0.6447 0.8562 -0.2226
1.8047 -2.0845 1.2732 -1.5221 -0.3596 0.2523 1.2949 0.5075 -1.1719 0.2124 -0.6531 -0.3355 -0.0499 -0.2688 1.6479 0.9963 0.4801 1.0872 0.7295 -0.1866 -0.3490 0.4044
-0.6211 -1.8495 0.0669 0.3772 -1.5482 1.0518 0.3686 -0.7982 0.1104 -0.7349 -0.7681 -1.7734 -1.3972 -0.4477 -1.0163 -0.8635 0.3296 0.8866 -1.3420 1.2110 -0.0902 1.9085
-0.0566 -0.8403 -0.8891 1.2051 0.8016 -1.1040 -0.2967 -0.2322 1.3253 0.9789 -0.5476 -1.1669 0.7531 0.4623 -1.1607 0.5510 -0.5414 -0.6363 0.9196 -0.9595 -0.7587 0.2519
Columns 353 through 374
-1.2156 -0.7682 -1.2978 -0.4343 0.0471 -0.8771 0.9156 0.1676 0.1189 1.0155 -0.5824 1.1667 -0.1713 0.9510 0.9179 -0.0305 0.9182 -1.2960 0.5137 0.9450 -2.5742 0.5081
-0.0327 -0.8202 -0.6427 0.2989 -2.0040 -0.4714 0.3908 -0.1299 -0.2674 -0.3244 0.0050 -0.6507 0.6916 0.0818 1.6720 0.0523 0.2523 0.7891 -0.1053 -1.2488 1.2594 1.1144
-0.9006 -0.2231 -0.3421 0.5102 -0.1612 0.2033 -0.9567 -0.3688 0.6810 0.2158 0.6098 -0.1862 0.8022 0.6720 0.7959 -0.6297 0.3801 0.2880 0.2377 1.1443 -1.2501 -0.8533
-1.1615 -0.5591 0.0552 0.0646 0.7685 1.1977 1.0585 -1.1026 -1.7321 -0.8760 1.2865 1.3626 -0.5864 -1.4485 2.0071 -0.2212 -0.4606 0.7171 0.4125 -0.2013 0.2449 -0.3555
Columns 375 through 396
-1.0333 0.7443 0.0381 1.8490 -0.5005 1.4844 1.0642 1.2320 0.1404 -0.9854 -0.4109 0.3219 0.8125 -0.9099 -0.3846 -0.5828 0.3497 0.9268 1.6474 0.3307 0.7027 -0.0159
-2.1618 0.4862 -0.0770 -0.2514 1.3578 0.0451 -0.8459 0.0546 0.4250 -1.3948 0.8598 1.1795 0.0662 0.0529 0.6180 -0.2484 -1.5139 0.7079 -0.1938 0.0584 0.7849 -0.7063
-0.0172 1.1703 0.0062 0.5526 1.1447 0.1654 -0.9068 0.0582 -0.0130 -0.4711 -1.7436 0.4181 1.6077 -0.8219 -1.3708 1.1193 0.0913 0.6133 -1.0011 0.1538 -0.5876 0.6358
-0.0484 -1.9808 0.2570 0.8829 0.5818 -0.0413 -1.0036 0.4299 -0.7128 -1.0946 1.0638 0.9961 -1.3143 -0.7521 -0.4820 -0.6945 -0.9479 0.3013 -0.7444 -0.9168 -1.1240 0.5189
Columns 397 through 418
-0.7673 2.0395 -0.7219 0.7936 -1.7906 0.6325 -0.9156 -0.2272 0.0561 0.5909 0.7530 -0.1058 -0.5100 -1.1566 -0.3268 -0.7985 0.4517 0.8754 -0.4863 -0.2820 0.2203 -1.6458
-0.3828 0.0897 1.2430 -0.4268 -0.5208 0.7171 -0.0397 0.2521 -0.6948 -0.4007 -1.1051 -1.8079 -0.5166 -0.9064 -1.6828 0.4349 0.1018 -0.2319 0.3698 1.6847 -0.3346 1.0375
0.6612 -0.8581 -0.9401 0.9385 -0.9163 0.5033 -0.4539 -1.1305 -0.1089 -0.5812 -0.9366 -0.6274 0.9542 -0.5530 -0.2074 -1.9162 1.4456 -0.6254 0.0799 -1.4334 -1.2660 -0.0236
-0.1527 1.6190 -0.3173 0.6544 1.2817 0.3024 -0.6604 0.5806 -1.3228 1.6015 0.6925 -0.8108 -0.2032 0.3644 -1.5486 -0.9240 0.8226 -0.1488 1.2814 1.1519 -0.8948 0.0785
Columns 419 through 440
-1.8858 2.8137 -1.3931 0.6304 -0.0204 1.3229 -0.8123 -1.0923 -0.0217 -0.3049 0.0584 -0.5560 -0.8999 1.4846 -1.6222 -2.0442 -1.2155 -0.8070 -1.2967 -0.1118 -0.0421 1.3527
1.7105 1.2191 -0.0410 0.2258 0.2741 -1.5299 -0.6081 0.9141 -0.3533 0.6107 -0.2615 -1.2679 0.5908 1.4963 0.3564 -1.0439 -0.0340 0.3473 -1.4545 -0.1824 0.8368 1.0950
-0.8715 0.7796 -0.3564 -0.8245 0.5976 0.6513 -1.2655 0.4611 0.1916 -0.9574 -0.5929 -0.8232 0.5492 1.5313 -0.1872 -0.0522 0.2995 0.2490 -0.1567 0.9732 -1.3771 -0.2109
-2.0062 -0.3481 -0.6008 -0.7934 -0.3204 -0.5619 -0.3204 -0.8412 -1.9229 0.0368 0.6085 0.0925 0.5822 -1.2271 -0.8147 0.1576 -0.6574 0.6169 -0.1698 2.0503 -1.8129 -1.0963
Columns 441 through 462
0.2115 0.3829 1.8025 0.4824 -0.2777 -0.3808 -0.8028 -0.4559 -0.3104 0.7399 -0.1743 0.1429 0.1207 0.7015 -1.1859 -1.2247 -1.3297 -0.0752 -0.3759 -1.2608 0.0507 2.3134
-1.2893 0.3196 -0.8409 -2.4340 0.0143 0.1746 0.0860 -0.7715 1.6411 0.1670 0.1505 -1.7168 -0.0852 0.8967 -0.6385 1.4094 -0.4728 3.7333 -0.5572 -0.7909 -0.3687 -0.1130
0.5294 -0.9879 -0.3243 1.5340 -0.9576 -1.3013 -0.2128 1.3914 -2.1414 0.6538 -0.4638 -0.3252 -0.2446 -0.3960 1.9788 2.8058 1.6654 -0.5086 1.4342 -0.5387 2.3220 -1.6324
-1.1665 1.2198 2.2585 -1.9637 -0.5200 -3.1328 -0.7560 0.1341 0.7636 -0.3852 0.4597 -1.1366 -0.9551 0.2312 -0.4596 -2.3647 -0.4654 1.8585 0.6574 -0.2222 0.3036 -0.8865
Columns 463 through 484
1.1997 -0.2172 -0.9615 -0.0305 1.6006 1.4134 0.1042 1.3526 -0.1854 -0.5720 -0.2224 0.0915 1.1467 1.2728 1.4030 1.6863 1.2318 -0.2046 -0.4985 2.3744 -0.8219 0.9629
-1.0280 1.4668 0.8220 -0.3011 0.4761 0.6008 -0.4944 1.1595 -0.8774 -0.8875 -0.1763 0.7555 1.0111 3.0113 -0.3070 2.0995 0.3928 0.5229 0.2453 -0.0032 -0.3808 0.6525
0.6497 0.5745 -1.9639 -0.1068 0.4491 0.1230 -0.0248 0.5911 0.6721 1.7170 -0.3707 -0.0098 -0.9886 -0.8252 -0.7877 -0.4815 0.0754 -0.6022 0.1318 1.6705 0.7530 -0.9579
0.5205 0.8932 -0.3338 0.6950 -0.2076 0.5514 0.1307 1.3832 0.3967 1.0857 -0.0543 -0.4015 -0.5404 -0.0431 -0.2415 0.5486 0.1780 0.7605 -1.4321 1.6698 1.0153 0.6435
Columns 485 through 506
0.4245 0.5737 -0.2397 -0.4897 -0.3608 -1.4074 -1.2211 0.9888 -0.1332 0.5920 0.6617 1.8406 -0.0978 0.2320 0.3211 0.2466 -0.8581 -1.6097 0.7596 0.6805 0.1909 -1.2125
-1.5675 -0.5847 -0.7153 0.2992 1.9479 -0.0078 1.0515 0.0061 -0.6596 -0.4650 0.4817 -0.9631 -0.0750 -0.2625 -0.1957 1.2033 -0.2622 -0.2371 -0.4727 -2.2488 -0.2239 0.3341
0.0634 -0.3355 1.6856 -0.7098 -1.3058 -1.4996 -0.3067 1.3696 1.4113 1.2335 0.2546 -0.0537 0.0046 2.2360 1.6643 -1.3355 1.0713 -0.6829 0.1727 -0.7857 -0.5331 -0.4147
-0.0595 -0.2966 -0.0225 -0.3527 -0.0409 -0.6326 -0.8014 0.1311 0.4380 0.4101 0.2939 0.1838 0.2535 -0.7237 0.5827 1.2795 -0.3405 1.1571 0.8278 0.7665 0.8302 0.2540
Columns 507 through 528
0.0351 1.6430 -1.3796 -0.9090 0.0321 0.1809 -0.4846 -0.5592 0.0456 -1.4136 0.1077 -1.2022 -1.5666 0.6044 -0.2508 0.2057 0.7374 1.9565 1.8270 -0.6470 -0.7864 0.4799
-0.0049 -0.5428 1.0312 0.3703 -1.8745 0.6677 -0.6613 -0.5139 0.6926 -0.4800 1.5648 -0.1452 -1.4319 -1.0885 1.1296 0.8226 -0.7735 0.5590 -0.7505 1.6072 -0.9073 0.5782
-1.1532 1.3585 -1.8229 0.9787 0.2832 0.7438 0.9436 -1.8415 -0.4849 -0.6072 0.1083 1.1984 -0.7353 -0.5501 1.9271 -1.7992 -1.5557 -0.0360 0.4596 0.2445 -1.2509 1.0150
-1.8851 1.4651 0.0405 0.6240 -0.2407 -1.1555 0.8617 1.8975 0.2625 0.6462 0.6775 0.8553 0.4685 0.7137 1.5871 0.0673 -0.4981 0.4783 -0.7438 -0.4125 0.7239 -1.0260
Columns 529 through 550
-2.4517 -1.9758 0.5601 -0.6555 -0.7839 1.0042 -1.7823 -0.5514 -0.3238 1.0289 0.1716 0.5959 -0.3895 -0.9931 0.4660 1.3892 -0.6690 -0.6200 0.5866 -1.1654 1.6419 1.0492
0.1792 -0.2229 -2.1358 -0.2029 1.1833 1.4931 0.8883 1.3999 0.8802 0.4318 -0.9620 1.0358 0.6096 0.7682 0.1763 -0.2465 0.2227 -0.8505 1.7215 2.1193 0.0348 -0.3266
-0.6514 -0.0057 0.2707 0.8439 -1.4894 -0.5229 -1.3825 -0.7211 -0.3720 0.0749 0.4547 0.1531 -1.6566 0.3139 -0.8458 -0.9251 -1.7279 -0.5286 2.4807 0.8531 -0.8820 2.4260
-0.8718 0.6579 -2.1779 1.1174 0.3914 -1.3412 0.0510 -0.9930 2.4308 1.3049 -0.2211 0.2128 1.0988 -0.3527 0.5370 0.1493 1.8627 -0.1418 1.6303 -1.0006 -0.8073 -1.1326
Columns 551 through 572
1.1301 -0.4886 1.2521 0.3434 -1.1908 -0.0113 -0.0385 1.1292 -0.6799 0.2969 0.4883 0.3511 0.7074 1.5082 0.6265 -0.6827 0.2546 -0.5114 -0.4989 0.2178 -1.7204 1.3287
-1.4774 1.4921 1.4563 -1.2738 -0.7085 1.6802 -1.9918 -0.1761 -1.3530 0.3751 1.2857 -0.5950 1.2290 1.2583 -1.9435 -0.7706 0.3354 -0.2414 0.7687 0.2148 1.2707 -0.4692
-1.5535 -0.2883 0.6866 -1.4615 0.9121 -1.1825 0.7592 -2.0504 -2.6144 1.0825 -1.2333 -0.4723 2.4836 0.7763 0.6424 -1.5807 1.7948 -0.5754 -2.0942 0.0977 -0.8041 -0.1441
0.0774 0.8512 1.5561 0.2983 2.7145 -0.1253 0.1567 1.1054 0.9427 0.1717 -0.7972 -1.0797 0.5813 -0.8822 -0.8298 -0.7504 0.1975 0.7669 -1.1575 0.6032 0.3367 -1.8508
Columns 573 through 594
-1.7579 -1.6340 -0.2411 1.0111 -0.8315 1.3702 -1.0981 -1.3489 -0.0367 -0.6752 -0.2863 1.2864 -0.1752 -0.6780 1.0400 0.7787 1.3381 -2.0200 -0.5242 -1.4934 -1.0100 -0.3862
1.5691 2.0652 -0.3237 0.7209 0.9980 0.8076 0.6504 0.5411 1.1261 1.0638 0.4810 0.9563 0.2720 1.0893 -0.0880 -0.7999 -0.3373 0.6698 -0.3818 -1.9684 -1.3243 0.0118
0.5178 -0.3989 1.4938 0.1108 1.1232 1.2588 1.5778 1.7703 -0.9479 1.7274 -1.3025 1.4026 -2.2326 0.3743 -0.0240 -1.5030 -0.0094 0.9642 -0.5630 -0.7667 0.1047 1.0238
-0.4848 0.5007 -0.6572 -2.4240 0.7300 1.7055 -1.0794 -1.0335 1.2489 -0.9004 -0.6401 -0.3508 -1.7106 -1.0724 -0.7776 0.1331 -1.5806 1.0480 -0.3472 0.8263 1.2748 -0.1418
Columns 595 through 616
0.0105 1.6005 -0.7447 0.7078 1.4884 -1.1374 -0.6222 -0.3742 0.1006 -0.0513 0.9232 1.8396 0.1844 -0.5324 -0.4693 0.5871 -0.4957 -0.8279 -1.2911 -0.6522 -1.1314 0.5868
0.6003 1.4389 0.1019 -1.6718 3.0107 -0.0222 1.9500 -2.3711 -0.8294 -1.1488 -1.0193 -1.2550 -0.4153 -0.8617 -0.0120 1.4279 0.7991 -0.5541 1.3528 -1.6162 0.8456 -0.5439
-0.6813 -1.5663 0.7607 1.3107 -0.3303 0.1412 0.1749 -0.3488 1.4382 -1.2040 -1.1637 -0.4521 0.3805 -0.9473 0.7829 -0.4729 1.0732 1.9500 0.1520 -0.3104 2.2911 0.0183
0.9034 -0.7791 -0.9588 0.4974 2.0794 0.5558 0.9991 -0.2407 1.3294 -0.5812 -2.3425 -0.3032 0.4819 0.3935 1.4691 -1.0009 -1.5212 0.9927 -1.5482 0.0618 1.0808 1.3272
Columns 617 through 631
0.7308 -0.4782 0.7567 -0.6386 1.3416 0.1128 -0.8782 1.6896 -1.3659 0.2130 -1.0345 0.6936 -0.4724 -1.2653 0.6168
-0.1397 0.8455 0.0623 -0.9790 -0.5811 0.2652 -1.0616 0.3462 0.2407 -1.4310 -1.2456 1.8142 -0.9565 -0.3251 0.0263
-1.1565 0.9811 0.6912 0.8051 0.5799 -0.6244 -0.5663 0.4828 -0.3301 1.4298 0.2896 -1.5635 0.0398 0.9391 -1.2302
-0.0106 -0.4434 0.3071 0.4650 0.2701 -1.7728 -0.0075 -0.4849 0.6782 0.2076 -1.9213 -0.1463 0.0152 -0.4597 -0.0768
(But now notice that elements at the boundaries (at ti == 90, 180, ..., which is index 91, 181, ...) are used twice. I think your intent is to use the boundary indexes both times, but it is the reason idx has 91 elements each time instead of 90. So in my code here I'm setting macchine(:,91), macchine (:,181), etc., each two times, once when it is the end of a time interval (when ii is 1,2, ...) and once when it is the beginning of a time interval (when ii is 2,3, ...). Maybe that is ok for what you are doing.)
Voss
on 12 Feb 2022
"How can I make the first line of a vector contain ids from 0 to 90, the second line to contain those from 90 to 180 and what goes for all 7 ranges? so that it can then index that vector in x and use it to compute "macchine""
This creates a matrix of indexes (-1) with 7 rows:
p = 0:630;
ti = (0:p(end)/90)*90;
inductionID = {'ID1' 'ID2' 'ID3' 'ID4'};
idx = zeros(numel(ti)-1,91);
for ii = 1:numel(ti)-1
idx(ii,:) = ti(ii):ti(ii+1);
end
disp(idx);
Columns 1 through 37
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576
Columns 38 through 74
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613
Columns 75 through 91
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630
But you want a matrix of IDs with the same size as that, right? It's not clear to me how the traci function inductionloop.getLastStepVehicleNumber() will "know" which iteration of the ii loop the code is in when the function is called, but maybe this?
p = 0:630;
ti = (0:p(end)/90)*90;
inductionID = {'ID1' 'ID2' 'ID3' 'ID4'};
% can pre-compute matrix idx like above:
idx = zeros(numel(ti)-1,91);
for ii = 1:numel(ti)-1
idx(ii,:) = ti(ii):ti(ii+1);
end
% or you can compute each row of idx in the ii loop below
% (and idx doesn't need to be a matrix if you only need one
% row at a time)
for i = 1:1%duration
% traci.simulation.step();
macchine = zeros(numel(inductionID),numel(p));
somme = zeros(numel(inductionID),numel(ti)-1);
for ii = 1:numel(ti)-1
for n = 1: length(inductionID)
% this assumes that the function
% traci.inductionloop.getLastStepVehicleNumber(inductionID{n})
% returns a single (scalar) value, which is then assigned to
% the 91 columns idx(ii,:)+1 of the nth row of macchine:
% macchine(n,idx(ii,:)+1) = traci.inductionloop.getLastStepVehicleNumber(inductionID{n});
% demonstration with random number:
macchine(n,idx(ii,:)+1) = randn();
end
somme(:,ii) = sum(macchine(:,idx(ii,:)+1),2); %I want to sum for each ii, the values contained in the whole considered interval, so for example for ii = 1 I would like the sum of all the values calculated in [0,1 ... 90] and so on for the other ii
end
disp('macchine:');
disp(macchine);
disp('somme:');
disp(somme);
disp(' ');
disp('now each element of somme is the same as 91 times the corresponding element of macchine');
disp('(from column 91, 181, etc.), since each element of macchine is repeated 91 times');
disp('(ignoring the overlapping at the interval boundaries):');
disp(' ');
disp('91*macchine(:,1:90:end-1)');
disp(91*macchine(:,1:90:end-1));
disp(' ');
disp('max difference is very close to 0 (not exactly 0 due to floating-point precision):');
disp('max(abs(91*macchine(:,1:90:end-1) - somme))');
disp(max(abs(91*macchine(:,1:90:end-1) - somme)));
end
macchine:
Columns 1 through 22
-0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613
3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607
-0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146
0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140
Columns 23 through 44
-0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613
3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607
-0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146
0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140
Columns 45 through 66
-0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613
3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607
-0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146
0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140
Columns 67 through 88
-0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613 -0.3613
3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607 3.1607
-0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146 -0.1146
0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140 0.9140
Columns 89 through 110
-0.3613 -0.3613 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072
3.1607 3.1607 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826
-0.1146 -0.1146 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423
0.9140 0.9140 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801
Columns 111 through 132
1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072
0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826
1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423
-0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801
Columns 133 through 154
1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072
0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826
1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423
-0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801
Columns 155 through 176
1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072 1.6072
0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826 0.9826
1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423 1.4423
-0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801 -0.3801
Columns 177 through 198
1.6072 1.6072 1.6072 1.6072 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227
0.9826 0.9826 0.9826 0.9826 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097
1.4423 1.4423 1.4423 1.4423 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498
-0.3801 -0.3801 -0.3801 -0.3801 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819
Columns 199 through 220
-1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227
-0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097
0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498
-0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819
Columns 221 through 242
-1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227
-0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097
0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498
-0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819
Columns 243 through 264
-1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227
-0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097
0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.6498
-0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819
Columns 265 through 286
-1.6227 -1.6227 -1.6227 -1.6227 -1.6227 -1.6227 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823
-0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -0.2097 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502
0.6498 0.6498 0.6498 0.6498 0.6498 0.6498 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920
-0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.6819 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619
Columns 287 through 308
0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823
-1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502
0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920
-0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619
Columns 309 through 330
0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823
-1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502
0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920
-0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619
Columns 331 through 352
0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823
-1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502
0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920
-0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619
Columns 353 through 374
0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 0.0823 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439
-1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.2502 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587
0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 0.8920 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606
-0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -0.4619 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382
Columns 375 through 396
-1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439
-1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587
1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606
-2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382
Columns 397 through 418
-1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439
-1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587
1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606
-2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382
Columns 419 through 440
-1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439
-1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587
1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606
-2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382
Columns 441 through 462
-1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 -1.2439 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061
-1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -1.6587 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676
1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 1.2606 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983
-2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 -2.8382 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261
Columns 463 through 484
0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061
-0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676
-3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983
0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261
Columns 485 through 506
0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061
-0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676
-3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983
0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261
Columns 507 through 528
0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061
-0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676
-3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983
0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261
Columns 529 through 550
0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.2061 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447
-0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 -0.0676 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747
-3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 -3.2983 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409
0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.9261 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025
Columns 551 through 572
0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447
0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747
0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409
0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025
Columns 573 through 594
0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447
0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747
0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409
0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025
Columns 595 through 616
0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447
0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747
0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409
0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025
Columns 617 through 631
0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447 0.5447
0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747 0.4747
0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409 0.5409
0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025 0.0025
somme:
-32.8765 146.2533 -147.6612 7.4889 -113.1987 18.7519 49.5670
287.6273 89.4122 -19.0834 -113.7681 -150.9387 -6.1539 43.2006
-10.4270 131.2497 59.1327 81.1716 114.7163 -300.1472 49.2251
83.1714 -34.5846 -62.0526 -42.0324 -258.2753 84.2730 0.2238
now each element of somme is the same as 91 times the corresponding element of macchine
(from column 91, 181, etc.), since each element of macchine is repeated 91 times
(ignoring the overlapping at the interval boundaries):
91*macchine(:,1:90:end-1)
-32.8765 146.2533 -147.6612 7.4889 -113.1987 18.7519 49.5670
287.6273 89.4122 -19.0834 -113.7681 -150.9387 -6.1539 43.2006
-10.4270 131.2497 59.1327 81.1716 114.7163 -300.1472 49.2251
83.1714 -34.5846 -62.0526 -42.0324 -258.2753 84.2730 0.2238
max difference is very close to 0 (not exactly 0 due to floating-point precision):
max(abs(91*macchine(:,1:90:end-1) - somme))
1.0e-12 *
0.1279 0.1563 0.1705 0.2700 0.4547 0.7390 0.0355
But again, notice column 91 of macchine gets the values from the second time it is used (when ii == 2) and the value set the first time (when ii == 1) was overwritten and is lost. Same for 181, etc.
Marco Carapellese
on 13 Feb 2022
"But you want a matrix of IDs with the same size as that, right? It's not clear to me how the traci function inductionloop.getLastStepVehicleNumber() will "know" which iteration of the ii loop the code is in when the function is called, but maybe this?"
practically the inductionloop.getLastStepVehicleNumber () function calculates the number of vehicles in each instant of time (which is the one to set) on each induction id. This is why I wanted to calculate it for all 630 instances, but divided by intervals of 90 which I would like to add together to finish.
Answers (2)
Steven Lord
on 11 Feb 2022
So into which interval should a value of exactly 90 fall? Interval 1, interval 2, or both?
I think that depending on what operations you want to perform the discretize, groupsummary, and/or grouptransform functions may be of use to you.
1 Comment
Marco Carapellese
on 11 Feb 2022
So, the instant 90 would serve me in the first interval, that is [0.90], while I would also like to perform a sudden action that however starts for example from the interval [180.270] in addition to all the other operations that I tried to indicate before . Thanks again
Image Analyst
on 12 Feb 2022
You can process the array in chunks of 7 elements. I assume that the first chunk will be times less than or equal to 90, the second chunk will correspond to times in the 90.0000001 to 180 range, and so on
for k = 1 : length(vec)
index1 = k;
index2 = min(k, k+6);
thisData = vec(index1 : index2);
% Now do something with thisData
end
If that's not the situation, like maybe you have both a time vector and a signal vector that corresponds to a measurement made at the corresponding time, then try this
for k = 1 : length(timeVector)
indexes = timeVector >= (k-1) * 90 & timeVector <= k * 90;
thisData = signalVector(indexes);
% Now do something with thisData
end
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)