MATLAB Answers

Could anyone help me how to make the values to be repeated again after 800 iterations for a total of 1000 iterations.

1 view (last 30 days)
jaah navi
jaah navi on 25 Feb 2020
Edited: Sindar on 25 Feb 2020
I am having the values to be executed for 1000 iterations
Columns 1 through 12
0.8138 0.9390 0.9505 1.0641 1.0725 1.0743 1.0797 1.0870 1.0947 1.0948 1.0948 1.1103
Columns 13 through 24
1.1160 1.1250 1.1312 1.1438 1.1465 1.1566 1.1579 1.1682 1.1703 1.1776 1.1827 1.1842
Columns 25 through 36
1.1979 1.2023 1.2043 1.2047 1.2075 1.2178 1.2187 1.2258 1.2275 1.2292 1.2301 1.2324
Columns 37 through 48
1.2327 1.2346 1.2348 1.2367 1.2369 1.2406 1.2416 1.2483 1.2495 1.2496 1.2498 1.2507
Columns 49 through 60
1.2568 1.2573 1.2626 1.2653 1.2672 1.2712 1.2722 1.2751 1.2761 1.2826 1.2841 1.2860
Columns 61 through 72
1.2865 1.2890 1.2894 1.2906 1.2931 1.2937 1.2956 1.2975 1.3003 1.3022 1.3049 1.3063
Columns 73 through 84
1.3118 1.3135 1.3143 1.3160 1.3161 1.3185 1.3217 1.3221 1.3237 1.3248 1.3252 1.3258
Columns 85 through 96
1.3263 1.3276 1.3279 1.3291 1.3316 1.3334 1.3346 1.3375 1.3386 1.3392 1.3397 1.3397
Columns 97 through 108
1.3423 1.3424 1.3431 1.3433 1.3461 1.3468 1.3478 1.3491 1.3495 1.3499 1.3514 1.3525
Columns 109 through 120
1.3531 1.3533 1.3537 1.3570 1.3599 1.3600 1.3604 1.3609 1.3611 1.3618 1.3618 1.3621
Columns 121 through 132
1.3621 1.3621 1.3622 1.3633 1.3652 1.3661 1.3678 1.3708 1.3711 1.3712 1.3717 1.3723
Columns 133 through 144
1.3731 1.3734 1.3736 1.3736 1.3769 1.3793 1.3799 1.3799 1.3818 1.3826 1.3828 1.3849
Columns 145 through 156
1.3857 1.3881 1.3882 1.3888 1.3889 1.3904 1.3906 1.3926 1.3954 1.3965 1.3968 1.3972
Columns 157 through 168
1.3973 1.3982 1.3983 1.3984 1.3988 1.3989 1.3994 1.4002 1.4002 1.4007 1.4009 1.4014
Columns 169 through 180
1.4029 1.4031 1.4038 1.4059 1.4082 1.4087 1.4109 1.4113 1.4150 1.4153 1.4164 1.4173
Columns 181 through 192
1.4182 1.4185 1.4187 1.4195 1.4242 1.4254 1.4259 1.4260 1.4260 1.4261 1.4273 1.4277
Columns 193 through 204
1.4290 1.4320 1.4330 1.4344 1.4344 1.4350 1.4363 1.4364 1.4369 1.4371 1.4381 1.4389
Columns 205 through 216
1.4391 1.4403 1.4412 1.4427 1.4433 1.4436 1.4438 1.4439 1.4440 1.4443 1.4448 1.4448
Columns 217 through 228
1.4450 1.4459 1.4482 1.4504 1.4509 1.4513 1.4514 1.4531 1.4532 1.4544 1.4545 1.4573
Columns 229 through 240
1.4577 1.4584 1.4594 1.4597 1.4597 1.4642 1.4649 1.4672 1.4679 1.4680 1.4680 1.4696
Columns 241 through 252
1.4697 1.4702 1.4706 1.4725 1.4725 1.4750 1.4754 1.4759 1.4763 1.4764 1.4777 1.4788
Columns 253 through 264
1.4791 1.4803 1.4804 1.4811 1.4812 1.4817 1.4824 1.4824 1.4826 1.4830 1.4832 1.4836
Columns 265 through 276
1.4839 1.4840 1.4846 1.4850 1.4861 1.4861 1.4867 1.4871 1.4871 1.4874 1.4881 1.4888
Columns 277 through 288
1.4907 1.4908 1.4914 1.4915 1.4927 1.4933 1.4936 1.4941 1.4941 1.4945 1.4960 1.5004
Columns 289 through 300
1.5011 1.5015 1.5022 1.5023 1.5037 1.5039 1.5048 1.5050 1.5061 1.5062 1.5074 1.5081
Columns 301 through 312
1.5089 1.5096 1.5130 1.5131 1.5140 1.5157 1.5161 1.5175 1.5185 1.5194 1.5199 1.5202
Columns 313 through 324
1.5203 1.5204 1.5207 1.5222 1.5232 1.5234 1.5238 1.5241 1.5247 1.5251 1.5252 1.5261
Columns 325 through 336
1.5262 1.5280 1.5282 1.5304 1.5325 1.5325 1.5328 1.5333 1.5341 1.5341 1.5355 1.5359
Columns 337 through 348
1.5362 1.5375 1.5376 1.5376 1.5376 1.5382 1.5391 1.5401 1.5402 1.5405 1.5411 1.5412
Columns 349 through 360
1.5413 1.5422 1.5428 1.5442 1.5475 1.5479 1.5481 1.5491 1.5491 1.5511 1.5518 1.5522
Columns 361 through 372
1.5538 1.5542 1.5547 1.5555 1.5563 1.5566 1.5568 1.5571 1.5574 1.5582 1.5591 1.5595
Columns 373 through 384
1.5607 1.5614 1.5615 1.5627 1.5635 1.5643 1.5664 1.5678 1.5680 1.5685 1.5688 1.5690
Columns 385 through 396
1.5697 1.5699 1.5705 1.5706 1.5713 1.5723 1.5737 1.5753 1.5755 1.5758 1.5768 1.5783
Columns 397 through 408
1.5794 1.5803 1.5808 1.5808 1.5811 1.5813 1.5819 1.5823 1.5829 1.5829 1.5848 1.5850
Columns 409 through 420
1.5853 1.5856 1.5866 1.5870 1.5871 1.5877 1.5879 1.5887 1.5904 1.5905 1.5918 1.5928
Columns 421 through 432
1.5951 1.5963 1.5969 1.6000 1.6001 1.6005 1.6005 1.6016 1.6041 1.6042 1.6049 1.6049
Columns 433 through 444
1.6050 1.6058 1.6066 1.6077 1.6079 1.6081 1.6115 1.6130 1.6134 1.6143 1.6144 1.6157
Columns 445 through 456
1.6164 1.6169 1.6178 1.6183 1.6190 1.6197 1.6200 1.6203 1.6214 1.6215 1.6215 1.6221
Columns 457 through 468
1.6223 1.6225 1.6225 1.6229 1.6237 1.6237 1.6247 1.6247 1.6256 1.6257 1.6259 1.6259
Columns 469 through 480
1.6261 1.6278 1.6288 1.6288 1.6292 1.6296 1.6300 1.6301 1.6304 1.6312 1.6315 1.6315
Columns 481 through 492
1.6317 1.6319 1.6327 1.6333 1.6355 1.6366 1.6389 1.6393 1.6398 1.6400 1.6408 1.6409
Columns 493 through 504
1.6421 1.6428 1.6437 1.6439 1.6451 1.6465 1.6469 1.6482 1.6488 1.6508 1.6511 1.6513
Columns 505 through 516
1.6514 1.6522 1.6539 1.6555 1.6561 1.6564 1.6565 1.6582 1.6592 1.6595 1.6602 1.6602
Columns 517 through 528
1.6623 1.6630 1.6633 1.6674 1.6676 1.6679 1.6683 1.6686 1.6692 1.6692 1.6697 1.6697
Columns 529 through 540
1.6715 1.6718 1.6721 1.6726 1.6726 1.6732 1.6735 1.6739 1.6772 1.6796 1.6797 1.6799
Columns 541 through 552
1.6800 1.6809 1.6823 1.6831 1.6837 1.6838 1.6842 1.6844 1.6850 1.6851 1.6854 1.6862
Columns 553 through 564
1.6862 1.6876 1.6879 1.6926 1.6930 1.6957 1.6963 1.6974 1.6981 1.6990 1.6994 1.6996
Columns 565 through 576
1.7019 1.7032 1.7035 1.7050 1.7056 1.7064 1.7072 1.7092 1.7098 1.7114 1.7127 1.7148
Columns 577 through 588
1.7148 1.7151 1.7158 1.7164 1.7170 1.7182 1.7185 1.7194 1.7197 1.7201 1.7221 1.7222
Columns 589 through 600
1.7227 1.7228 1.7235 1.7236 1.7238 1.7257 1.7271 1.7280 1.7280 1.7281 1.7283 1.7286
Columns 601 through 612
1.7297 1.7314 1.7317 1.7322 1.7331 1.7334 1.7350 1.7354 1.7362 1.7370 1.7377 1.7384
Columns 613 through 624
1.7384 1.7388 1.7389 1.7390 1.7402 1.7429 1.7439 1.7471 1.7478 1.7479 1.7493 1.7495
Columns 625 through 636
1.7498 1.7520 1.7525 1.7529 1.7532 1.7546 1.7562 1.7562 1.7568 1.7570 1.7581 1.7589
Columns 637 through 648
1.7601 1.7608 1.7611 1.7628 1.7637 1.7644 1.7648 1.7655 1.7665 1.7670 1.7703 1.7704
Columns 649 through 660
1.7708 1.7722 1.7724 1.7730 1.7741 1.7752 1.7776 1.7781 1.7803 1.7805 1.7812 1.7817
Columns 661 through 672
1.7825 1.7830 1.7830 1.7841 1.7845 1.7856 1.7865 1.7870 1.7872 1.7875 1.7887 1.7902
Columns 673 through 684
1.7938 1.7960 1.7965 1.7967 1.7982 1.7984 1.7985 1.7985 1.8001 1.8006 1.8013 1.8023
Columns 685 through 696
1.8031 1.8037 1.8045 1.8050 1.8066 1.8069 1.8071 1.8073 1.8091 1.8134 1.8135 1.8139
Columns 697 through 708
1.8139 1.8150 1.8154 1.8167 1.8186 1.8196 1.8204 1.8237 1.8240 1.8242 1.8246 1.8253
Columns 709 through 720
1.8273 1.8280 1.8294 1.8296 1.8305 1.8321 1.8324 1.8338 1.8339 1.8339 1.8341 1.8347
Columns 721 through 732
1.8349 1.8353 1.8368 1.8369 1.8380 1.8403 1.8409 1.8440 1.8455 1.8488 1.8510 1.8515
Columns 733 through 744
1.8526 1.8530 1.8547 1.8564 1.8566 1.8578 1.8585 1.8604 1.8611 1.8616 1.8627 1.8631
Columns 745 through 756
1.8673 1.8685 1.8700 1.8710 1.8718 1.8722 1.8739 1.8755 1.8764 1.8768 1.8778 1.8784
Columns 757 through 768
1.8790 1.8798 1.8799 1.8803 1.8808 1.8821 1.8832 1.8855 1.8867 1.8896 1.8908 1.8923
Columns 769 through 780
1.8923 1.8932 1.8959 1.8973 1.8976 1.8977 1.8988 1.9012 1.9043 1.9049 1.9063 1.9076
Columns 781 through 792
1.9084 1.9092 1.9100 1.9109 1.9124 1.9132 1.9177 1.9204 1.9205 1.9211 1.9230 1.9246
Columns 793 through 804
1.9253 1.9254 1.9257 1.9293 1.9297 1.9310 1.9319 1.9323 1.9327 1.9338 1.9338 1.9351
Columns 805 through 816
1.9353 1.9367 1.9376 1.9394 1.9395 1.9404 1.9414 1.9420 1.9458 1.9464 1.9493 1.9496
Columns 817 through 828
1.9524 1.9537 1.9540 1.9542 1.9549 1.9570 1.9572 1.9595 1.9606 1.9608 1.9642 1.9648
Columns 829 through 840
1.9752 1.9760 1.9779 1.9806 1.9812 1.9842 1.9848 1.9885 1.9911 1.9927 1.9934 1.9938
Columns 841 through 852
1.9965 1.9966 2.0024 2.0029 2.0036 2.0060 2.0061 2.0061 2.0066 2.0100 2.0127 2.0160
Columns 853 through 864
2.0170 2.0188 2.0236 2.0247 2.0262 2.0290 2.0307 2.0323 2.0328 2.0331 2.0337 2.0339
Columns 865 through 876
2.0378 2.0395 2.0396 2.0427 2.0446 2.0452 2.0457 2.0477 2.0496 2.0523 2.0544 2.0648
Columns 877 through 888
2.0651 2.0715 2.0726 2.0743 2.0795 2.0798 2.0830 2.0831 2.0834 2.0844 2.0871 2.0900
Columns 889 through 900
2.0912 2.0922 2.0958 2.0981 2.0992 2.1034 2.1063 2.1108 2.1168 2.1278 2.1343 2.1382
Columns 901 through 912
2.1390 2.1421 2.1435 2.1502 2.1514 2.1549 2.1564 2.1610 2.1614 2.1621 2.1623 2.1737
Columns 913 through 924
2.1822 2.1831 2.1837 2.1839 2.1861 2.1926 2.1962 2.1966 2.1968 2.2045 2.2134 2.2271
Columns 925 through 936
2.2271 2.2294 2.2309 2.2470 2.2585 2.2636 2.2638 2.2685 2.2696 2.2739 2.2756 2.2762
Columns 937 through 948
2.2796 2.2876 2.2950 2.2998 2.3042 2.3058 2.3085 2.3244 2.3314 2.3398 2.3517 2.3532
Columns 949 through 960
2.3669 2.3678 2.3686 2.3731 2.3756 2.3780 2.3849 2.3949 2.4202 2.4255 2.4267 2.4337
Columns 961 through 972
2.4391 2.4419 2.4462 2.4475 2.4499 2.4607 2.4631 2.4796 2.4893 2.4925 2.4998 2.5006
Columns 973 through 984
2.5101 2.5105 2.5172 2.5173 2.5197 2.5282 2.5406 2.5500 2.5655 2.5677 2.5812 2.6042
Columns 985 through 996
2.6156 2.6188 2.6561 2.6694 2.6802 2.6904 2.6942 2.6953 2.7041 2.7117 2.7195 2.7963
Columns 997 through 1000
3.1808 3.2884 3.4817 3.4903
Could anyone help me how to make the values to be repeated after 800 iterations.

  3 Comments

jaah navi
jaah navi on 25 Feb 2020
These are the certain amount of data.
With respect to the data i want to have the same number of values to be repeated after 800.
For example
A=[1 2 3 4 5 6 7 8 9 10]
I want to have the same values after 5
which means A=[1 2 3 4 5 5 5 5 5 5].
Could you please help me on this.

Sign in to comment.

Answers (1)

Sindar
Sindar on 25 Feb 2020
Edited: Sindar on 25 Feb 2020
If I understand you correctly, you have data in, let's say, x. You want to set elements 801-1000 of x equal to element 800:
x(801:1000) = x(800);

  0 Comments

Sign in to comment.

Sign in to answer this question.