blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 6 214 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 6 87 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 15 values | visit_date timestamp[us]date 2016-08-04 09:00:04 2023-09-05 17:18:33 | revision_date timestamp[us]date 1998-12-11 00:15:10 2023-09-02 05:42:40 | committer_date timestamp[us]date 2005-04-26 09:58:02 2023-09-02 05:42:40 | github_id int64 436k 586M ⌀ | star_events_count int64 0 12.3k | fork_events_count int64 0 6.3k | gha_license_id stringclasses 7 values | gha_event_created_at timestamp[us]date 2012-11-16 11:45:07 2023-09-14 20:45:37 ⌀ | gha_created_at timestamp[us]date 2010-03-22 23:34:58 2023-01-07 03:47:44 ⌀ | gha_language stringclasses 36 values | src_encoding stringclasses 17 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 1 class | length_bytes int64 5 10.4M | extension stringclasses 15 values | filename stringlengths 2 96 | content stringlengths 5 10.4M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
78737d72d7fff545fcf96a533cb6e5f62dc9399b | 9e12e4e26437f9b52ce8d8b7fa8c4e9e65be1c62 | /1task_triangles/Tests/100.2.tst | 802a2efe0d815eb038b26018530d0d8871c42708 | [] | no_license | synthMoza/ilab_2course | 6a73fa119ce10eb01a400a29d963cf8c70e4c5c8 | 92638e7fb529265bd93572fef8a6eb9df99799f5 | refs/heads/master | 2023-06-30T19:14:49.667143 | 2021-08-09T15:04:29 | 2021-08-09T15:04:29 | 293,534,227 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,074 | tst | 100.2.tst | 100
-2.5 0 0
0 4.33013 0
2.5 0 0
-2.5 7.88925 0
0 12.2194 0
2.5 7.88925 0
-2.5 0 0.5
0 4.33013 0.5
2.5 0 0.5
-2.5 4.17849 0.5
0 8.50862 0.5
2.5 4.17849 0.5
-2.5 0 1
0 4.33013 1
2.5 0 1
-2.5 1.8691 1
0 6.19923 1
2.5 1.8691 1
-2.5 0 1.5
0 4.33013 1.5
2.5 0 1.5
-2.5 8.22943 1.5
0 12.5596 1.5
2.5 8.22943 1.5
-2.5 0 2
0 4.33013 2
2.5 0 2
-2.5 7.96854 2
0 12.2987 2
2.5 7.96854 2
-2.5 0 2.5
0 4.33013 2.5
2.5 0 2.5
-2.5 1.27877 2.5
0 5.6089 2.5
2.5 1.27877 2.5
-2.5 0 3
0 4.33013 3
2.5 0 3
-2.5 7.63022 3
0 11.9604 3
2.5 7.63022 3
-2.5 0 3.5
0 4.33013 3.5
2.5 0 3.5
-2.5 5.55192 3.5
0 9.88205 3.5
2.5 5.55192 3.5
-2.5 0 4
0 4.33013 4
2.5 0 4
-2.5 3.74083 4
0 8.07095 4
2.5 3.74083 4
-2.5 0 4.5
0 4.33013 4.5
2.5 0 4.5
-2.5 5.36586 4.5
0 9.69599 4.5
2.5 5.36586 4.5
-2.5 0 5
0 4.33013 5
2.5 0 5
-2.5 2.43405 5
0 6.76417 5
2.5 2.43405 5
-2.5 0 5.5
0 4.33013 5.5
2.5 0 5.5
-2.5 6.80698 5.5
0 11.1371 5.5
2.5 6.80698 5.5
-2.5 0 6
0 4.33013 6
2.5 0 6
-2.5 2.66266 6
0 6.99279 6
2.5 2.66266 6
-2.5 0 6.5
0 4.33013 6.5
2.5 0 6.5
-2.5 3.87142 6.5
0 8.20155 6.5
2.5 3.87142 6.5
-2.5 0 7
0 4.33013 7
2.5 0 7
-2.5 1.95814 7
0 6.28827 7
2.5 1.95814 7
-2.5 0 7.5
0 4.33013 7.5
2.5 0 7.5
-2.5 1.62408 7.5
0 5.95421 7.5
2.5 1.62408 7.5
-2.5 0 8
0 4.33013 8
2.5 0 8
-2.5 2.39226 8
0 6.72239 8
2.5 2.39226 8
-2.5 0 8.5
0 4.33013 8.5
2.5 0 8.5
-2.5 4.81894 8.5
0 9.14907 8.5
2.5 4.81894 8.5
-2.5 0 9
0 4.33013 9
2.5 0 9
-2.5 3.60701 9
0 7.93713 9
2.5 3.60701 9
-2.5 0 9.5
0 4.33013 9.5
2.5 0 9.5
-2.5 1.46884 9.5
0 5.79897 9.5
2.5 1.46884 9.5
-2.5 0 10
0 4.33013 10
2.5 0 10
-2.5 7.85315 10
0 12.1833 10
2.5 7.85315 10
-2.5 0 10.5
0 4.33013 10.5
2.5 0 10.5
-2.5 0.893489 10.5
0 5.22362 10.5
2.5 0.893489 10.5
-2.5 0 11
0 4.33013 11
2.5 0 11
-2.5 1.09184 11
0 5.42197 11
2.5 1.09184 11
-2.5 0 11.5
0 4.33013 11.5
2.5 0 11.5
-2.5 4.29067 11.5
0 8.6208 11.5
2.5 4.29067 11.5
-2.5 0 12
0 4.33013 12
2.5 0 12
-2.5 6.58591 12
0 10.916 12
2.5 6.58591 12
-2.5 0 12.5
0 4.33013 12.5
2.5 0 12.5
-2.5 8.5282 12.5
0 12.8583 12.5
2.5 8.5282 12.5
-2.5 0 13
0 4.33013 13
2.5 0 13
-2.5 8.09737 13
0 12.4275 13
2.5 8.09737 13
-2.5 0 13.5
0 4.33013 13.5
2.5 0 13.5
-2.5 5.92747 13.5
0 10.2576 13.5
2.5 5.92747 13.5
-2.5 0 14
0 4.33013 14
2.5 0 14
-2.5 3.31851 14
0 7.64864 14
2.5 3.31851 14
-2.5 0 14.5
0 4.33013 14.5
2.5 0 14.5
-2.5 6.49321 14.5
0 10.8233 14.5
2.5 6.49321 14.5
-2.5 0 15
0 4.33013 15
2.5 0 15
-2.5 3.19272 15
0 7.52285 15
2.5 3.19272 15
-2.5 0 15.5
0 4.33013 15.5
2.5 0 15.5
-2.5 2.5475 15.5
0 6.87763 15.5
2.5 2.5475 15.5
-2.5 0 16
0 4.33013 16
2.5 0 16
-2.5 2.01144 16
0 6.34157 16
2.5 2.01144 16
-2.5 0 16.5
0 4.33013 16.5
2.5 0 16.5
-2.5 5.06182 16.5
0 9.39195 16.5
2.5 5.06182 16.5
-2.5 0 17
0 4.33013 17
2.5 0 17
-2.5 2.11668 17
0 6.4468 17
2.5 2.11668 17
-2.5 0 17.5
0 4.33013 17.5
2.5 0 17.5
-2.5 1.31973 17.5
0 5.64986 17.5
2.5 1.31973 17.5
-2.5 0 18
0 4.33013 18
2.5 0 18
-2.5 6.34059 18
0 10.6707 18
2.5 6.34059 18
-2.5 0 18.5
0 4.33013 18.5
2.5 0 18.5
-2.5 1.08664 18.5
0 5.41677 18.5
2.5 1.08664 18.5
-2.5 0 19
0 4.33013 19
2.5 0 19
-2.5 6.87166 19
0 11.2018 19
2.5 6.87166 19
-2.5 0 19.5
0 4.33013 19.5
2.5 0 19.5
-2.5 1.42116 19.5
0 5.75129 19.5
2.5 1.42116 19.5
-2.5 0 20
0 4.33013 20
2.5 0 20
-2.5 6.45251 20
0 10.7826 20
2.5 6.45251 20
-2.5 0 20.5
0 4.33013 20.5
2.5 0 20.5
-2.5 0.645447 20.5
0 4.97557 20.5
2.5 0.645447 20.5
-2.5 0 21
0 4.33013 21
2.5 0 21
-2.5 8.22814 21
0 12.5583 21
2.5 8.22814 21
-2.5 0 21.5
0 4.33013 21.5
2.5 0 21.5
-2.5 0.454917 21.5
0 4.78504 21.5
2.5 0.454917 21.5
-2.5 0 22
0 4.33013 22
2.5 0 22
-2.5 4.51687 22
0 8.847 22
2.5 4.51687 22
-2.5 0 22.5
0 4.33013 22.5
2.5 0 22.5
-2.5 1.52603 22.5
0 5.85616 22.5
2.5 1.52603 22.5
-2.5 0 23
0 4.33013 23
2.5 0 23
-2.5 2.079 23
0 6.40913 23
2.5 2.079 23
-2.5 0 23.5
0 4.33013 23.5
2.5 0 23.5
-2.5 6.90913 23.5
0 11.2393 23.5
2.5 6.90913 23.5
-2.5 0 24
0 4.33013 24
2.5 0 24
-2.5 6.34497 24
0 10.6751 24
2.5 6.34497 24
-2.5 0 24.5
0 4.33013 24.5
2.5 0 24.5
-2.5 5.68601 24.5
0 10.0161 24.5
2.5 5.68601 24.5
|
c7057282c915d5ec40bc301990ed08fd0bc8bce7 | 089894a36ef33cb3d0f697541716c9b6cd8dcc43 | /NLP_Project/test/tweet/bow/bow.16_1.tst | 922e28862b14b807d7e7ec0615a89425be4bf7e9 | [] | no_license | mandar15/NLP_Project | 3142cda82d49ba0ea30b580c46bdd0e0348fe3ec | 1dcb70a199a0f7ab8c72825bfd5b8146e75b7ec2 | refs/heads/master | 2020-05-20T13:36:05.842840 | 2013-07-31T06:53:59 | 2013-07-31T06:53:59 | 6,534,406 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 35,217 | tst | bow.16_1.tst | 16 12:0.031746031746031744 15:1.0 18:0.25 20:0.05555555555555555 24:1.0 41:0.1111111111111111 45:0.125 58:0.2 67:0.6666666666666666 75:0.08333333333333333 84:0.25 93:0.5 104:0.25 106:1.0 113:1.0 122:0.3333333333333333 226:0.5 259:1.0 398:0.4 451:1.0 454:1.0 504:1.0 531:0.3333333333333333 613:0.3333333333333333 639:0.3333333333333333 732:1.0 743:1.0 758:0.14285714285714285 767:0.5 779:1.0 1086:0.5 1973:1.0 2333:1.0 2979:1.0 3090:1.0 3891:1.0 4144:1.0 4374:0.5 4765:1.0 4818:1.0 5550:1.0 5726:1.0 5809:1.0 6250:1.0 8242:1.0
16 15:1.0 18:0.25 45:0.125 48:0.3333333333333333 52:0.3333333333333333 75:0.16666666666666666 87:1.0 139:1.0 191:0.3333333333333333 210:1.0 226:0.25 230:1.0 332:1.0 568:0.05 619:0.5 742:0.5 902:1.0 958:1.0 2669:1.0 3953:1.0 4150:1.0 4765:2.0 4769:0.1 4775:1.0 4874:0.2 4875:1.0 4877:1.0 4889:1.0 4978:1.0 5187:1.0 6751:1.0 6874:1.0
16 18:0.25 45:0.125 75:0.08333333333333333 128:0.09090909090909091 197:0.2 226:0.25 227:0.5 230:2.0 398:0.2 1210:1.0 4765:1.0 4913:1.0 4978:1.0 5187:1.0 5767:1.0 5925:1.0
16 12:0.015873015873015872 31:1.0 35:0.1 53:1.0 57:0.5 64:0.5 70:0.18181818181818182 75:0.08333333333333333 122:0.3333333333333333 172:0.5 191:0.16666666666666666 230:1.0 235:0.2 255:1.0 257:0.3333333333333333 277:0.16666666666666666 398:0.2 531:0.3333333333333333 568:0.05 732:1.0 1330:1.0 1689:1.0 2336:1.0 3833:1.0 4765:1.0 4769:0.1 4866:1.0 6280:1.0
16 18:0.25 24:1.0 58:0.2 67:0.3333333333333333 75:0.16666666666666666 82:0.1111111111111111 85:0.5 154:0.5 191:0.3333333333333333 210:1.0 230:1.0 268:1.0 322:1.0 361:1.0 387:1.0 398:0.2 419:1.0 454:1.0 476:1.0 499:1.0 688:0.5 772:1.0 1049:1.0 1086:0.5 4748:0.125 4765:2.0 4841:1.0 4858:1.0 5619:0.5 5914:1.0
16 12:0.06349206349206349 20:0.05555555555555555 24:1.0 35:0.1 39:0.25 41:0.1111111111111111 47:0.5 67:0.3333333333333333 75:0.3333333333333333 82:0.1111111111111111 85:1.0 87:1.0 93:0.5 98:0.5 104:0.5 122:0.3333333333333333 172:0.5 197:0.2 198:0.4 230:1.0 237:1.0 270:1.0 277:0.16666666666666666 305:0.3333333333333333 337:1.0 342:1.0 398:0.6 492:0.25 502:0.5 568:0.05 639:0.3333333333333333 739:0.5 799:0.5 853:1.0 939:0.5 1009:1.0 1015:1.0 1049:1.0 1487:1.0 2206:1.0 2277:1.0 2833:1.0 2836:0.14285714285714285 4774:1.0 4780:0.5 4978:1.0 4983:1.0 5065:1.0 5135:0.5 5302:1.0 5467:1.0 5838:1.0 6087:1.0 6098:1.0 6250:1.0 6998:1.0 7558:1.0 8301:1.0
16 12:0.031746031746031744 15:1.0 24:1.0 47:0.5 52:0.3333333333333333 67:0.6666666666666666 75:0.16666666666666666 82:0.1111111111111111 96:1.0 98:0.5 128:0.09090909090909091 191:0.16666666666666666 197:0.2 230:1.0 398:0.6 550:0.25 568:0.15 625:1.0 758:0.14285714285714285 939:0.5 1091:0.5 1486:1.0 1604:1.0 2137:1.0 2198:1.0 4821:1.0 5065:1.0 5306:1.0 5821:1.0 6358:1.0 7784:1.0 8281:1.0
16 1:0.125 12:0.031746031746031744 20:0.05555555555555555 24:1.0 37:1.0 41:0.1111111111111111 52:0.3333333333333333 53:0.5 67:1.0 79:0.25 128:0.09090909090909091 191:0.16666666666666666 197:0.2 305:0.3333333333333333 516:0.5 564:0.5 568:0.05 622:1.0 770:1.0 801:0.5 970:0.5 1754:0.3333333333333333 4927:1.0 5315:1.0 5804:1.0 5892:1.0 6084:1.0 6696:1.0 7063:1.0
16 1:0.125 15:2.0 75:0.16666666666666666 91:1.0 98:0.5 104:0.25 122:0.3333333333333333 197:0.2 226:0.25 230:3.0 398:0.2 492:0.25 639:0.16666666666666666 758:0.14285714285714285 1086:0.5 1402:0.3333333333333333 1488:1.0 1856:1.0 1876:1.0 2428:1.0 2836:0.14285714285714285 4343:1.0 4748:0.125 4769:0.2 4821:1.0 5821:1.0 5838:1.0 5925:1.0 6363:1.0 8277:1.0
16 15:2.0 38:1.0 45:0.125 47:0.5 52:0.3333333333333333 77:0.3333333333333333 79:0.25 85:1.0 96:1.0 104:0.25 136:1.0 277:0.16666666666666666 398:0.2 451:0.5 501:1.0 531:0.3333333333333333 691:1.0 767:0.5 873:1.0 1054:1.0 2346:1.0 4110:1.0 4343:1.0 4821:2.0 5017:1.0 5128:1.0 5724:1.0 5885:1.0
16 27:0.2 41:0.3333333333333333 47:0.5 53:0.5 64:0.5 104:0.25 124:0.3333333333333333 213:1.0 604:1.0 770:1.0 1527:1.0 2124:1.0 2629:1.0 2836:0.14285714285714285 2890:1.0 4533:1.0 4780:0.5 5702:1.0 6197:1.0 6320:2.0 6816:1.0 7119:0.5
16 18:0.5 27:0.2 45:0.125 48:0.3333333333333333 67:0.3333333333333333 74:0.5 75:0.08333333333333333 87:1.0 96:1.0 104:0.25 117:0.5 122:0.6666666666666666 191:0.16666666666666666 230:1.0 252:0.3333333333333333 289:1.0 477:1.0 492:0.25 502:0.5 939:0.5 1049:1.0 1689:1.0 2346:1.0 2515:1.0 2623:1.0 3854:1.0 4757:1.0 4780:0.5 4813:1.0 5037:1.0 5072:1.0 5076:1.0 5108:0.3333333333333333 5227:1.0 5352:0.5 6488:1.0 7572:1.0 8222:1.0 8251:1.0 8252:1.0 8254:1.0
16 24:1.0 41:0.1111111111111111 47:0.5 67:0.6666666666666666 75:0.08333333333333333 79:0.25 98:0.75 104:0.25 122:0.3333333333333333 197:0.2 261:0.3333333333333333 314:1.0 398:0.2 419:1.0 601:1.0 692:1.0 772:1.0 1341:0.5 1343:0.5 1966:0.5 2742:1.0 2836:0.14285714285714285 3085:0.5 3847:1.0 3979:1.0 4245:1.0 4983:1.0 5351:1.0 6396:1.0 7929:1.0
16 12:0.015873015873015872 18:0.25 20:0.05555555555555555 24:2.0 47:0.5 75:0.08333333333333333 87:1.0 104:0.25 122:0.3333333333333333 191:0.16666666666666666 230:1.0 289:1.0 1086:0.5 1341:0.5 1488:1.0 1966:0.5 2346:1.0 2742:1.0 2836:0.14285714285714285 4748:0.125 4765:1.0 5183:1.0 5351:1.0 6552:1.0 7572:1.0 7878:1.0 8222:1.0 8251:1.0 8252:1.0 8254:1.0
16 20:0.05555555555555555 27:0.2 35:0.1 45:0.125 75:0.08333333333333333 87:1.0 98:0.25 252:0.3333333333333333 286:1.0 398:0.2 431:0.5 701:1.0 801:0.25 858:1.0 1086:0.5 2241:1.0 2389:1.0 3315:1.0 4765:1.0 4828:1.0 5135:0.5 6818:1.0 7454:1.0
16 87:1.0 191:0.3333333333333333 196:0.3333333333333333 398:0.2 502:0.5 688:0.5 801:0.25 912:1.0 2919:1.0 3654:1.0 4765:2.0 4769:0.1 4984:0.5 5225:1.0 5619:0.5 6630:1.0 6683:1.0 8096:1.0
16 12:0.015873015873015872 41:0.1111111111111111 47:0.5 87:1.0 104:0.25 167:1.0 234:1.0 451:0.5 492:0.25 758:0.14285714285714285 829:1.0 1086:0.5 1143:1.0 2933:0.5 4813:1.0 4980:1.0 5135:0.5 5266:1.0 5881:1.0 5928:1.0
16 12:0.015873015873015872 18:0.25 35:0.1 41:0.1111111111111111 64:0.5 67:0.6666666666666666 75:0.25 191:0.3333333333333333 441:1.0 454:1.0 477:1.0 502:0.5 545:1.0 758:0.14285714285714285 770:1.0 829:1.0 1086:1.0 1341:0.5 2638:1.0 2836:0.14285714285714285 4343:1.0 4765:1.0 4828:2.0 4846:1.0 5467:1.0 5885:1.0 6041:2.0 6617:1.0 8174:1.0
16 15:1.0 20:0.05555555555555555 27:0.2 35:0.1 53:0.5 67:0.6666666666666666 75:0.16666666666666666 82:0.1111111111111111 87:2.0 122:0.3333333333333333 128:0.09090909090909091 191:0.16666666666666666 192:0.2 196:0.3333333333333333 223:1.0 305:0.3333333333333333 361:1.0 373:1.0 441:1.0 815:1.0 1155:1.0 1255:1.0 1301:1.0 1472:1.0 1583:1.0 1855:1.0 2235:1.0 4765:1.0 4877:1.0 4894:1.0 5128:1.0 5227:1.0 5518:1.0 5928:1.0 7401:1.0 7923:1.0
16 12:0.015873015873015872 15:1.0 18:0.25 41:0.2222222222222222 67:0.6666666666666666 69:0.5 75:0.3333333333333333 85:0.5 94:1.0 104:0.5 115:0.3333333333333333 122:0.3333333333333333 124:0.3333333333333333 139:1.0 172:0.5 191:0.16666666666666666 192:0.2 257:0.6666666666666666 261:0.3333333333333333 398:0.2 568:0.05 672:0.5 939:0.5 958:1.0 1089:1.0 1378:0.5 2371:1.0 3203:1.0 4076:1.0 4898:1.0 4922:1.0 4998:1.0 5065:1.0 5074:1.0 5518:1.0 5746:1.0 7903:1.0 7904:1.0 8052:1.0 8058:1.0
16 3:0.5 18:0.5 45:0.25 53:0.5 67:0.3333333333333333 75:0.16666666666666666 87:1.0 104:0.25 139:1.0 154:0.5 191:0.16666666666666666 196:0.3333333333333333 210:2.0 226:0.25 332:2.0 398:0.6 619:0.5 639:0.16666666666666666 742:1.0 902:1.0 1378:0.5 1854:1.0 1969:1.0 2638:1.0 3640:1.0 4012:0.2222222222222222 4765:1.0 4769:0.1 4874:0.4 4875:2.0 4878:1.0 5032:1.0 6712:1.0
16 12:0.031746031746031744 18:0.25 35:0.1 41:0.2222222222222222 45:0.25 53:0.5 67:0.3333333333333333 75:0.08333333333333333 79:0.25 82:0.1111111111111111 87:1.0 98:0.25 117:0.5 122:0.3333333333333333 128:0.09090909090909091 154:0.5 191:0.16666666666666666 192:0.2 226:0.25 229:1.0 230:2.0 252:0.3333333333333333 257:0.3333333333333333 305:0.3333333333333333 441:1.0 516:0.5 619:0.5 712:0.5 739:0.5 743:1.0 758:0.14285714285714285 774:1.0 837:1.0 902:1.0 1049:1.0 1850:1.0 2336:1.0 2569:1.0 3491:1.0 4208:1.0 4343:1.0 4757:1.0 4774:1.0 4889:1.0 4979:1.0 5631:0.5 5885:1.0 6055:1.0 6714:1.0 7732:1.0
16 12:0.031746031746031744 15:1.0 17:1.0 27:0.2 35:0.1 41:0.1111111111111111 48:0.3333333333333333 67:0.3333333333333333 74:0.5 93:0.5 122:0.3333333333333333 124:1.0 140:1.0 261:0.6666666666666666 277:0.3333333333333333 305:0.3333333333333333 344:1.0 353:1.0 398:0.4 451:0.5 492:0.25 568:0.05 765:1.0 898:1.0 958:1.0 1079:1.0 1097:0.5 4674:1.0 5167:1.0 5523:1.0 5700:1.0 5701:1.0 5702:1.0 5972:2.0 6008:1.0 6084:1.0 6157:1.0 6968:1.0 7263:1.0 8024:1.0
16 15:1.0 17:1.0 18:0.25 24:1.0 41:0.2222222222222222 53:0.5 67:0.3333333333333333 104:0.25 128:0.09090909090909091 154:0.5 191:0.16666666666666666 230:2.0 236:1.0 261:0.6666666666666666 671:1.0 798:1.0 879:1.0 1014:1.0 1049:1.0 1069:0.5 1443:1.0 1801:0.5 3437:1.0 3987:0.5 4769:0.1 4815:0.5 4816:0.3333333333333333 4828:1.0 4831:1.0 5017:1.0 5046:1.0 5342:1.0 5810:0.5 5811:1.0 5863:1.0 6570:1.0 6654:1.0 7263:1.0 7446:1.0 7611:1.0 7756:1.0
16 12:0.015873015873015872 18:0.5 53:0.5 75:0.16666666666666666 79:0.25 98:0.25 104:0.25 128:0.09090909090909091 162:1.0 167:1.0 172:1.0 191:0.16666666666666666 226:0.5 230:1.0 305:0.3333333333333333 398:0.2 441:1.0 568:0.05 615:1.0 774:1.0 871:1.0 910:0.3333333333333333 1018:1.0 1086:0.5 1689:1.0 1730:1.0 2054:1.0 2137:1.0 2463:1.0 4343:1.0 4748:0.125 4765:1.0 4979:1.0 4980:1.0 4983:1.0 5286:0.3333333333333333 5313:1.0 5405:1.0 5773:1.0 5885:1.0 6175:1.0 7713:1.0 7792:1.0
16 75:0.16666666666666666 96:1.0 126:0.5 531:0.3333333333333333 613:0.3333333333333333 758:0.14285714285714285 866:1.0 3203:1.0 4433:1.0 7886:1.0 7896:1.0
16 12:0.015873015873015872 18:0.25 24:2.0 47:0.5 67:0.6666666666666666 68:0.3333333333333333 69:0.5 74:0.5 75:0.08333333333333333 98:0.25 130:1.0 136:1.0 191:0.16666666666666666 224:1.0 363:1.0 398:0.2 502:1.5 531:0.3333333333333333 604:1.0 912:1.0 1026:1.0 2438:1.0 2687:1.0 2836:0.14285714285714285 2933:0.5 3074:1.0 4227:0.3333333333333333 4765:2.0 4769:0.1 4890:1.0 5061:1.0 5076:1.0 5158:0.5 5670:1.0 5949:0.5 6012:1.0 6150:1.0 6403:1.0 6767:1.0
16 15:1.0 18:0.25 27:0.2 28:1.0 39:0.25 41:0.2222222222222222 45:0.25 52:0.3333333333333333 75:0.08333333333333333 87:1.0 122:0.3333333333333333 136:1.0 139:1.0 154:0.5 177:0.25 191:0.16666666666666666 213:1.0 216:0.5 230:1.0 252:0.3333333333333333 277:0.16666666666666666 398:0.2 568:0.05 619:0.5 742:0.5 902:1.0 1047:1.0 1086:0.5 2430:0.5 2613:1.0 2677:1.0 2836:0.14285714285714285 4774:2.0 4780:0.5 4874:0.2 4875:1.0 4877:1.0 4889:1.0 5645:1.0 6101:1.0 7078:1.0 7287:1.0 7839:1.0 8092:1.0
16 24:1.0 27:0.2 41:0.1111111111111111 45:0.25 53:0.5 67:0.3333333333333333 74:0.5 75:0.08333333333333333 87:3.0 117:0.5 191:0.5 226:0.25 277:0.3333333333333333 289:2.0 305:1.0 363:1.0 441:1.0 451:0.5 494:1.0 692:1.0 770:1.0 798:1.0 799:0.5 840:1.0 877:0.5 911:1.0 1049:1.0 1086:0.5 1094:1.0 1155:1.0 1336:1.0 1415:1.0 1499:1.0 1663:1.0 2430:0.5 3060:1.0 4065:1.0 4760:1.0 4765:1.0 4769:0.1 4780:0.5 5076:1.0 5358:1.0 5440:1.0 5560:1.0 5597:1.0 5839:1.0 5921:1.0 6250:1.0 6898:1.0 7206:2.0
16 39:0.25 41:0.2222222222222222 47:0.5 64:0.5 74:0.5 75:0.08333333333333333 98:0.25 116:1.0 122:0.6666666666666666 230:1.0 398:0.2 451:0.5 568:0.05 625:1.0 692:1.0 996:1.0 1149:1.0 1304:1.0 1343:0.5 1499:1.0 1876:1.0 2836:0.2857142857142857 3686:1.0 4442:1.0 4765:1.0 5367:1.0 5451:1.0 6363:1.0 6669:1.0 6689:1.0 6692:1.0 7459:2.0
16 12:0.015873015873015872 41:0.1111111111111111 47:1.0 67:0.6666666666666666 74:0.5 75:0.08333333333333333 79:0.25 96:1.0 98:0.25 99:1.0 139:1.0 230:2.0 277:0.16666666666666666 326:0.5 398:0.4 451:0.5 484:0.5 502:0.5 535:1.0 568:0.1 692:1.0 732:1.0 801:0.5 1054:1.0 1086:0.5 2833:1.0 4267:1.0 4828:1.0 4858:1.0 4889:1.0 5226:2.0 5990:1.0 6145:1.0 6686:1.0 7037:1.0
16 12:0.015873015873015872 20:0.05555555555555555 24:2.0 36:0.09090909090909091 41:0.1111111111111111 45:0.25 47:0.5 58:0.4 67:0.3333333333333333 75:0.25 79:0.5 82:0.1111111111111111 87:2.0 122:0.3333333333333333 128:0.18181818181818182 177:0.25 191:0.5 277:0.16666666666666666 287:0.2 305:0.3333333333333333 322:2.0 434:1.0 474:1.0 501:1.0 557:1.0 568:0.05 688:1.0 692:1.0 707:1.0 758:0.14285714285714285 1086:1.0 1143:1.0 1343:0.5 1402:0.3333333333333333 3170:1.0 4343:2.0 4765:1.0 4769:0.1 4828:1.0 4892:1.0 5021:1.0 5032:1.0 5925:1.0 6592:1.0 6698:1.0 8114:1.0
16 12:0.015873015873015872 18:0.25 41:0.1111111111111111 67:0.6666666666666666 75:0.08333333333333333 96:1.0 98:0.25 117:0.5 191:0.16666666666666666 230:1.0 289:1.0 713:1.0 799:0.5 915:1.0 1086:1.0 1801:0.5 4765:2.0 4769:0.1 4885:1.0 4927:1.0 5269:1.0 5809:1.0 7002:1.0 7628:1.0
16 1:0.125 18:0.25 24:2.0 41:0.2222222222222222 47:1.0 53:0.5 67:0.3333333333333333 75:0.25 98:0.25 139:1.0 172:0.5 226:0.25 236:1.0 277:0.16666666666666666 342:1.0 398:0.2 765:1.0 798:1.0 1027:1.0 1049:1.0 1263:1.0 1312:1.0 1453:1.0 1980:1.0 2608:1.0 2704:1.0 4084:1.0 4717:1.0 4983:1.0 5235:1.0 5313:1.0 5726:1.0 6175:1.0 6834:1.0 6861:1.0 7377:1.0 8054:1.0
16 18:0.5 41:0.1111111111111111 53:0.5 75:0.08333333333333333 128:0.18181818181818182 172:1.0 226:0.5 236:1.0 348:0.25 368:1.0 451:0.5 492:0.25 765:1.0 801:0.25 911:1.0 1049:1.0 1086:0.5 1402:0.3333333333333333 2137:1.0 4343:1.0 4748:0.25 4765:1.0 4859:1.0 5061:1.0 5313:1.0 5314:1.0 5731:1.0 5950:1.0 6838:1.0
16 18:0.5 20:0.1111111111111111 36:0.09090909090909091 41:0.1111111111111111 47:0.5 53:0.5 67:0.3333333333333333 79:0.25 93:0.5 124:0.3333333333333333 128:0.09090909090909091 226:0.25 252:0.3333333333333333 289:1.0 388:1.0 767:0.5 783:1.0 878:1.0 970:0.5 1047:1.0 1529:1.0 1561:1.0 1572:1.0 1702:1.0 1891:1.0 2389:1.0 3404:1.0 4757:1.0 4780:0.5 5108:0.6666666666666666 5352:0.5 6339:1.0 6380:1.0 6543:1.0 7976:1.0
16 18:0.5 41:0.1111111111111111 45:0.25 53:1.0 67:0.3333333333333333 75:0.25 87:1.0 104:0.5 128:0.18181818181818182 172:0.5 191:0.3333333333333333 210:2.0 226:0.75 287:0.2 289:1.0 332:1.0 348:0.25 368:1.0 492:0.25 619:0.5 742:0.5 765:1.0 801:0.25 902:1.0 911:1.0 1385:1.0 2953:0.5 3640:1.0 4012:0.1111111111111111 4859:1.0 4874:0.2 4875:1.0 4892:1.0 5032:1.0 5153:1.0 5208:1.0 5825:1.0 6838:1.0
16 24:1.0 41:0.6666666666666666 45:0.125 47:0.5 75:0.08333333333333333 128:0.09090909090909091 172:0.5 191:0.16666666666666666 192:0.2 215:1.0 226:0.25 230:3.0 252:0.6666666666666666 305:0.6666666666666666 347:0.5 363:1.0 398:0.2 409:0.3333333333333333 451:0.5 477:1.0 531:0.3333333333333333 758:0.14285714285714285 798:1.0 981:1.0 990:1.0 1086:0.5 1142:1.0 1488:1.0 1553:1.0 1689:1.0 2676:1.0 2849:1.0 3286:1.0 4433:1.0 4775:1.0 4780:0.5 4816:0.3333333333333333 4971:0.5 4984:0.5 5041:0.5 5225:1.0 5385:1.0 5439:1.0 5542:1.0 7029:1.0
16 12:0.031746031746031744 18:0.5 20:0.05555555555555555 24:1.0 35:0.1 41:0.2222222222222222 58:0.2 75:0.08333333333333333 82:0.1111111111111111 122:0.3333333333333333 128:0.18181818181818182 191:0.3333333333333333 226:1.0 257:0.3333333333333333 261:0.3333333333333333 277:0.16666666666666666 348:0.25 451:0.5 535:1.0 557:1.0 651:1.0 746:1.0 765:1.0 774:1.0 898:1.0 911:1.0 1086:0.5 1522:1.0 1550:1.0 1923:1.0 2137:1.0 2765:1.0 4374:0.5 4748:0.125 4765:1.0 4768:1.0 4769:0.2 4924:1.0 5700:1.0 5766:1.0 5810:0.5 6674:1.0 6675:1.0 7684:1.0
16 12:0.015873015873015872 18:0.25 24:1.0 45:0.125 52:0.3333333333333333 58:0.2 75:0.3333333333333333 84:0.25 87:1.0 98:0.5 113:2.0 122:0.6666666666666666 136:1.0 164:0.5 191:0.3333333333333333 226:0.25 257:0.3333333333333333 261:0.3333333333333333 289:1.0 305:0.3333333333333333 398:0.4 619:0.5 636:1.0 648:1.0 742:0.5 767:0.5 902:1.0 958:1.0 1322:1.0 1336:1.0 1440:0.5 1612:1.0 1657:0.5 3284:1.0 3693:1.0 4874:0.2 4875:1.0 4889:1.0 5343:1.0 6835:1.0 7684:1.0 8054:1.0
16 12:0.031746031746031744 13:0.2 15:2.0 18:0.25 27:0.4 41:0.2222222222222222 45:0.125 52:0.3333333333333333 53:0.5 75:0.08333333333333333 87:2.0 122:0.3333333333333333 124:0.3333333333333333 191:0.5 226:0.25 322:1.0 332:1.0 477:1.0 564:0.5 619:0.5 742:0.5 813:0.5 902:1.0 912:1.0 1054:1.0 1069:1.0 1556:1.0 2836:0.14285714285714285 2933:0.5 3386:1.0 3640:1.0 4343:1.0 4774:1.0 4808:1.0 4858:1.0 4874:0.2 4875:1.0 4876:1.0 4877:1.0 4878:1.0 4889:1.0 4982:1.0 4983:1.0 5135:0.5 5339:1.0 5477:1.0 5700:1.0 5806:0.5 5885:1.0 6070:1.0 7197:1.0 7673:1.0 7834:1.0 7965:1.0
16 18:0.25 24:1.0 41:0.1111111111111111 45:0.125 47:0.5 52:0.3333333333333333 67:0.3333333333333333 75:0.16666666666666666 96:1.0 98:0.5 99:1.0 122:0.3333333333333333 139:1.0 191:0.5 347:0.5 363:1.0 531:0.3333333333333333 564:0.5 779:1.0 1027:1.0 1049:2.0 1091:0.5 1402:0.3333333333333333 4765:2.0 4769:0.1 4813:1.0 4828:1.0 4892:1.0 4978:1.0 5098:1.0 5405:1.0 6176:1.0 6215:1.0 6232:1.0 7781:1.0
16 12:0.015873015873015872 20:0.05555555555555555 41:0.1111111111111111 67:0.6666666666666666 75:0.25 79:0.25 85:0.5 87:1.0 147:1.0 172:0.5 191:0.16666666666666666 226:0.25 230:2.0 252:0.3333333333333333 305:0.6666666666666666 398:0.2 574:1.0 691:1.0 701:1.0 748:0.5 758:0.14285714285714285 878:1.0 1047:1.0 1263:1.0 1330:1.0 1341:0.5 3038:1.0 3654:1.0 4343:1.0 4748:0.125 4769:0.1 4780:0.5 4803:1.0 4931:1.0 5257:1.0 5299:1.0 5565:1.0 5637:1.0 5814:1.0 6061:1.0 6154:1.0 6437:1.0
16 12:0.031746031746031744 18:0.25 20:0.05555555555555555 39:0.25 75:0.3333333333333333 122:0.3333333333333333 172:0.5 210:1.0 230:1.0 261:0.3333333333333333 326:0.5 398:0.2 494:2.0 688:0.5 813:0.5 912:1.0 958:1.0 1086:0.5 1564:1.0 1671:1.0 2211:1.0 2343:1.0 3163:1.0 4125:1.0 4703:1.0 5405:1.0 5677:1.0 5722:1.0 7172:1.0 7563:1.0
16 3:0.5 15:1.0 18:0.25 24:1.0 39:0.5 41:0.1111111111111111 54:0.5 67:0.3333333333333333 75:0.25 93:0.5 117:0.5 122:0.3333333333333333 147:1.0 191:0.3333333333333333 197:0.2 360:1.0 363:1.0 398:0.2 455:1.0 473:1.0 479:0.5 615:1.0 688:0.5 739:0.5 813:0.5 828:1.0 837:1.0 1049:1.0 1402:0.3333333333333333 1464:0.5 1980:1.0 2054:1.0 3235:1.0 3836:1.0 3969:1.0 4513:1.0 4765:1.0 4769:0.1 4813:1.0 5076:1.0 5108:0.3333333333333333 5154:1.0 5343:1.0 5660:1.0 5722:1.0 5776:1.0 5903:1.0 6550:1.0 8060:1.0
16 12:0.015873015873015872 27:0.2 75:0.08333333333333333 93:0.5 136:1.0 191:0.16666666666666666 252:0.3333333333333333 579:1.0 767:0.5 777:1.0 801:0.25 813:0.5 958:1.0 1079:1.0 2033:1.0 2389:1.0 2836:0.14285714285714285 3071:1.0 3163:1.0 3733:1.0 4703:1.0 4769:0.1 5233:1.0 5405:1.0 5767:1.0
16 1:0.125 47:0.5 85:0.5 98:0.25 122:0.3333333333333333 130:1.0 172:0.5 191:0.3333333333333333 454:1.0 568:0.05 910:0.3333333333333333 1049:1.0 1295:1.0 1402:0.3333333333333333 1667:1.0 1980:1.0 2198:1.0 2477:1.0 4343:1.0 4774:1.0 4848:1.0 4913:1.0 4983:1.0 5135:0.5 5263:1.0 5269:1.0 6170:1.0 6303:1.0 7189:1.0
16 1:0.125 12:0.015873015873015872 20:0.1111111111111111 24:1.0 41:0.1111111111111111 47:0.5 75:0.08333333333333333 79:0.25 172:0.5 191:0.16666666666666666 192:0.2 226:0.25 230:1.0 305:0.3333333333333333 348:0.25 770:1.0 871:1.0 965:1.0 1081:1.0 1341:0.5 2137:1.0 2623:1.0 4748:0.125 5313:1.0 5900:1.0 6898:1.0
16 15:1.0 18:0.25 24:1.0 39:0.25 45:0.125 52:0.3333333333333333 69:0.5 75:0.3333333333333333 87:1.0 98:0.25 139:3.0 154:0.5 191:0.3333333333333333 192:0.2 210:1.0 226:0.5 230:1.0 332:1.0 502:0.5 619:0.5 742:0.5 801:0.25 866:1.0 902:1.0 958:1.0 965:1.0 1027:1.0 1081:1.0 1086:0.5 1149:1.0 1341:1.0 1344:1.0 2485:1.0 2600:1.0 3405:1.0 3513:0.5 4012:0.1111111111111111 4828:1.0 4874:0.2 4875:1.0 4877:1.0 4889:1.0 4989:1.0 7161:1.0 7426:1.0
16 18:0.25 82:0.1111111111111111 128:0.09090909090909091 130:1.0 226:0.5 230:1.0 277:0.16666666666666666 348:0.25 492:0.25 550:0.25 765:1.0 1049:1.0 1086:0.5 4752:1.0 4753:1.0 4765:1.0 4769:0.3 4831:1.0 4924:1.0 5154:1.0 5190:1.0 6550:1.0
16 15:1.0 41:0.1111111111111111 61:0.5 75:0.25 85:1.0 98:0.25 122:0.3333333333333333 172:0.5 176:0.5 177:0.25 191:0.3333333333333333 304:1.0 344:1.0 398:0.4 409:0.3333333333333333 568:0.05 615:1.0 639:0.16666666666666666 774:1.0 910:0.3333333333333333 912:1.0 1047:1.0 1527:1.0 2004:1.0 2446:1.0 2737:1.0 3841:1.0 3895:1.0 4780:1.0 4828:1.0 5032:1.0 5072:1.0 5299:1.0 5798:1.0 5929:1.0 6013:1.0 6444:1.0 7355:1.0 7400:1.0
16 15:2.0 18:0.25 27:0.2 41:0.3333333333333333 47:0.5 67:0.3333333333333333 84:0.25 98:0.25 172:1.0 191:0.16666666666666666 230:1.0 398:0.4 425:1.0 568:0.05 840:1.0 910:0.3333333333333333 911:1.0 1341:0.5 1443:1.0 1511:0.2 2137:1.0 4210:1.0 4748:0.125 4780:0.5 4877:1.0 5158:1.0 5313:1.0 5670:1.0 6363:1.0 7221:1.0 8247:1.0
16 12:0.047619047619047616 15:1.0 24:1.0 41:0.4444444444444444 53:0.5 57:0.5 67:0.3333333333333333 75:0.08333333333333333 82:0.1111111111111111 98:0.25 99:1.0 192:0.2 226:0.25 257:0.3333333333333333 261:0.3333333333333333 398:0.4 472:1.0 568:0.05 626:1.0 965:1.0 1095:0.5 1344:1.0 1437:1.0 1445:1.0 1856:1.0 2742:1.0 3203:1.0 4343:1.0 4927:1.0 4984:0.5 4998:1.0 5065:1.0 5084:1.0 5093:1.0 5703:1.0 6290:1.0 6391:1.0 8281:1.0
16 20:0.05555555555555555 24:1.0 41:0.2222222222222222 47:1.0 69:0.5 75:0.08333333333333333 85:0.5 98:0.25 122:0.3333333333333333 194:1.0 210:1.0 236:1.0 398:0.2 1014:1.0 1049:2.0 1435:1.0 4374:0.5 6347:1.0
16 12:0.06349206349206349 20:0.2222222222222222 24:1.0 27:0.2 67:0.3333333333333333 75:0.08333333333333333 79:0.25 85:0.5 93:0.5 94:1.0 122:0.6666666666666666 226:0.25 337:1.0 550:0.25 557:1.0 619:1.0 684:1.0 739:0.5 900:1.0 1079:1.0 1402:0.3333333333333333 2103:0.5 2335:1.0 2656:1.0 3654:1.0 4343:1.0 4765:1.0 4839:1.0 5423:1.0 6191:1.0 6642:1.0 8274:1.0
16 3:0.5 12:0.015873015873015872 18:0.25 27:0.2 45:0.125 52:0.3333333333333333 67:0.6666666666666666 75:0.08333333333333333 79:0.75 85:0.5 87:1.0 98:0.25 104:0.25 122:0.3333333333333333 154:0.5 191:0.3333333333333333 192:0.2 305:0.3333333333333333 314:1.0 332:1.0 398:0.4 619:0.5 742:0.5 902:1.0 1545:1.0 2005:1.0 2015:1.0 3175:1.0 3841:2.0 4774:1.0 4874:0.2 4875:1.0 4877:1.0 4889:1.0 4956:1.0 5131:1.0 7558:1.0 7806:1.0 7807:1.0 8114:1.0
16 18:0.25 20:0.05555555555555555 24:1.0 75:0.08333333333333333 96:1.0 140:1.0 172:0.5 235:0.2 2076:1.0 2137:1.0 3074:1.0 4748:0.125 4765:1.0 4996:1.0 5153:1.0 5257:1.0 5429:1.0 5430:1.0 5433:1.0
16 191:0.16666666666666666 409:0.3333333333333333 1402:0.3333333333333333 4748:0.125 5085:1.0
16 18:0.25 24:1.0 75:0.08333333333333333 85:0.5 104:0.25 115:0.3333333333333333 122:0.6666666666666666 128:0.09090909090909091 191:0.16666666666666666 226:0.5 304:1.0 348:0.25 531:0.3333333333333333 765:1.0 2730:1.0 2933:0.5 4768:1.0 4769:0.1 4831:1.0 4924:1.0 5991:1.0
16 18:0.5 24:1.0 41:0.2222222222222222 45:0.125 67:0.3333333333333333 75:0.16666666666666666 77:0.3333333333333333 87:1.0 98:0.25 115:0.3333333333333333 122:0.6666666666666666 128:0.09090909090909091 140:1.0 191:0.16666666666666666 210:1.0 213:1.0 226:0.5 304:1.0 326:0.5 398:0.2 531:0.3333333333333333 619:0.5 639:0.16666666666666666 767:1.0 837:1.0 902:1.0 905:1.0 1091:0.5 1344:1.0 1988:1.0 2137:1.0 3140:1.0 4012:0.1111111111111111 4874:0.2 4875:1.0 4889:1.0 6040:1.0 6406:1.0
16 20:0.05555555555555555 41:0.1111111111111111 98:0.25 115:0.3333333333333333 191:0.16666666666666666 192:0.2 360:1.0 513:1.0 2933:0.5 2945:1.0 3053:1.0 3480:1.0 4765:1.0 4828:2.0 5098:1.0 7687:1.0
16 12:0.031746031746031744 20:0.1111111111111111 47:1.0 53:0.5 79:0.25 122:0.3333333333333333 130:1.0 331:0.3333333333333333 398:0.2 513:1.0 568:0.05 660:1.0 1089:1.0 1371:1.0 2103:0.5 2582:1.0 4667:1.0 5202:1.0 6084:1.0
16 15:1.0 24:1.0 41:0.2222222222222222 47:0.5 48:0.3333333333333333 75:0.25 79:0.25 98:0.25 104:0.25 126:0.5 128:0.09090909090909091 172:0.5 191:0.16666666666666666 197:0.2 230:3.0 235:0.2 305:0.3333333333333333 398:0.2 573:1.0 639:0.16666666666666666 774:1.0 911:1.0 1049:1.0 1957:1.0 2137:1.0 2742:1.0 2833:1.0 3135:1.0 3287:1.0 4521:1.0 4769:0.1 4780:1.0 4841:1.0 5061:1.0 5313:1.0 5464:1.0 6046:1.0 7260:1.0 7261:1.0 8301:1.0
16 18:0.25 41:0.1111111111111111 47:0.5 52:0.3333333333333333 63:1.0 67:0.3333333333333333 75:0.16666666666666666 191:0.16666666666666666 197:0.2 472:1.0 733:0.5 767:0.5 911:1.0 917:1.0 1016:1.0 1019:1.0 1143:1.0 1739:1.0 1980:1.0 2069:0.3333333333333333 2274:1.0 3024:1.0 3693:1.0 4500:1.0 4780:1.0 5542:1.0 5676:1.0 5798:1.0 6629:1.0
16 18:0.25 24:2.0 41:0.2222222222222222 67:0.3333333333333333 75:0.16666666666666666 79:0.25 85:0.5 128:0.09090909090909091 177:0.25 191:0.16666666666666666 192:0.2 213:1.0 230:1.0 235:0.2 252:0.3333333333333333 287:0.2 305:0.3333333333333333 502:0.5 821:1.0 1289:1.0 1341:0.5 1402:0.3333333333333333 1845:1.0 2438:1.0 3490:1.0 4150:1.0 4343:1.0 4920:0.25 4978:1.0 5110:1.0 5176:1.0 5806:0.5 7161:1.0
16 12:0.047619047619047616 15:1.0 45:0.125 47:0.5 48:0.3333333333333333 69:0.5 74:0.5 75:0.16666666666666666 84:0.25 115:0.3333333333333333 122:0.6666666666666666 191:0.16666666666666666 226:0.25 398:0.4 441:1.0 692:1.0 722:1.0 774:1.0 1069:0.5 1453:0.5 2582:1.0 2600:1.0 4769:0.1 4816:0.3333333333333333 4892:1.0 4893:1.0 4894:1.0 4895:1.0 4984:0.5 5429:1.0 5430:1.0 6290:1.0 7419:1.0 7611:1.0
16 3:0.5 20:0.05555555555555555 39:0.25 41:0.1111111111111111 67:0.3333333333333333 68:0.3333333333333333 75:0.08333333333333333 191:0.16666666666666666 220:1.0 226:0.25 1130:1.0 1962:2.0 4846:1.0 5059:1.0 5069:1.0 6690:1.0 6691:1.0 6692:1.0 7684:1.0 7691:1.0
16 1:0.125 67:0.3333333333333333 75:0.08333333333333333 94:1.0 98:0.25 122:0.3333333333333333 454:1.0 643:1.0 1657:0.5 2600:1.0 2836:0.14285714285714285 5767:1.0 6087:1.0
16 18:0.25 41:0.1111111111111111 45:0.125 52:0.3333333333333333 75:0.16666666666666666 87:1.0 98:0.25 139:1.0 154:0.5 191:0.3333333333333333 210:1.0 226:0.25 398:0.4 564:0.5 619:0.5 722:1.0 742:0.5 902:1.0 976:0.3333333333333333 1086:0.5 4012:0.1111111111111111 4765:1.0 4828:2.0 4874:0.2 4875:1.0 4889:1.0 4994:1.0 5098:1.0 5866:1.0
16 18:0.5 24:2.0 75:0.16666666666666666 191:0.16666666666666666 230:1.0 451:0.5 535:1.0 1086:0.5 1801:0.5 2186:1.0 4978:1.0 5806:0.5 5809:1.0 6007:1.0 6743:1.0 7127:1.0
16 75:0.08333333333333333 79:0.5 305:0.3333333333333333 398:0.2 1081:1.0 1402:0.3333333333333333 2836:0.14285714285714285 4343:1.0 4887:1.0 5225:1.0 5328:1.0 5863:1.0 6191:1.0 6396:1.0 6490:1.0
16 12:0.015873015873015872 18:0.25 20:0.05555555555555555 35:0.1 41:0.1111111111111111 47:1.0 67:0.3333333333333333 75:0.08333333333333333 87:1.0 123:1.0 172:0.5 198:0.2 240:1.0 441:1.0 494:1.0 1212:1.0 1330:1.0 1344:1.0 1488:1.0 1969:1.0 3216:1.0 4513:1.0 4639:0.5 4765:1.0 4828:1.0 4956:1.0 4994:1.0 5079:1.0 5162:1.0 5806:1.0 6150:1.0 6665:1.0
16 12:0.047619047619047616 13:0.2 24:1.0 41:0.1111111111111111 53:0.5 61:0.5 65:1.0 75:0.16666666666666666 82:0.1111111111111111 96:1.0 110:1.0 122:0.3333333333333333 197:0.2 226:0.25 230:1.0 451:0.5 492:0.25 613:0.3333333333333333 713:1.0 767:0.5 1086:0.5 1702:1.0 2144:1.0 4765:1.0 4769:0.1
16 15:1.0 24:1.0 45:0.125 47:0.5 130:1.0 191:0.3333333333333333 222:0.5 636:1.0 701:1.0 799:0.5 801:0.25 3203:1.0 4765:1.0 4803:1.0 4892:1.0 4894:1.0 5108:0.3333333333333333 5174:0.5 5543:1.0 5776:1.0 5863:1.0 5866:1.0 6232:1.0 7202:1.0
16 35:0.1 41:0.3333333333333333 82:0.1111111111111111 98:0.5 172:0.5 191:0.16666666666666666 192:0.2 398:0.2 564:0.5 748:0.5 758:0.2857142857142857 801:0.25 1341:0.5 1453:0.5 1556:1.0 2054:1.0 2718:1.0 4755:1.0 4765:1.0 4828:1.0 5193:1.0 5275:1.0 5316:1.0 5866:1.0 7258:1.0
16 12:0.015873015873015872 24:1.0 75:0.08333333333333333 79:0.25 96:1.0 98:0.25 191:0.16666666666666666 229:1.0 277:0.16666666666666666 398:0.4 531:0.3333333333333333 826:1.0 1048:1.0 1081:1.0 1402:0.3333333333333333 1440:0.5 1988:1.0 4765:1.0 4767:1.0 4769:0.1 4813:1.0 5225:1.0 5328:1.0 5776:1.0 5866:1.0 6931:1.0 7002:1.0 7785:1.0
16 20:0.05555555555555555 104:0.25 191:0.16666666666666666 291:1.0 398:0.2 568:0.05 774:1.0 4769:0.1 5004:1.0 5315:1.0 5773:1.0 5863:1.0 5866:1.0 7851:1.0
16 12:0.015873015873015872 18:0.5 41:0.2222222222222222 47:0.5 53:0.5 67:0.3333333333333333 75:0.3333333333333333 87:1.0 122:0.6666666666666666 128:0.09090909090909091 137:1.0 172:0.5 191:0.16666666666666666 236:1.0 622:1.0 779:1.0 877:0.5 966:1.0 1671:1.0 1720:1.0 2601:1.0 2799:1.0 4163:1.0 4748:0.125 4757:1.0 4765:1.0 4774:1.0 4780:1.0 4887:1.0 4927:1.0 4998:1.0 5041:0.5 5352:1.0 5827:1.0 6176:1.0 6339:1.0 6746:0.5 7536:1.0 7975:1.0 8022:1.0
16 1:0.125 24:2.0 41:0.2222222222222222 47:1.0 48:0.6666666666666666 67:0.3333333333333333 75:0.08333333333333333 87:1.0 192:0.2 214:1.0 484:0.5 758:0.14285714285714285 898:1.0 1302:2.0 1720:1.0 2836:0.14285714285714285 4032:1.0 4442:1.0 4780:0.5 4887:1.0 5041:0.5 5676:1.0
16 24:1.0 41:0.1111111111111111 47:0.5 75:0.16666666666666666 98:0.25 191:0.3333333333333333 222:0.5 230:1.0 236:1.0 388:1.0 774:1.0 990:1.0 1344:1.0 4897:1.0 5021:1.0 5041:0.5 5352:0.5 5543:1.0 7614:1.0
16 24:1.0 75:0.08333333333333333 98:0.25 191:0.16666666666666666 192:0.2 214:1.0 898:1.0 1402:0.3333333333333333 4765:1.0 4836:1.0 5543:1.0 5798:1.0 5929:1.0
16 12:0.031746031746031744 18:0.25 20:0.05555555555555555 41:0.1111111111111111 67:0.3333333333333333 75:0.16666666666666666 84:0.5 85:1.0 113:1.0 130:1.0 136:1.0 172:0.5 176:0.5 191:0.16666666666666666 200:1.0 226:0.25 305:0.3333333333333333 398:0.2 441:1.0 472:1.0 492:0.25 495:1.0 620:0.5 732:1.0 1089:1.0 1171:1.0 1189:1.0 1437:1.0 1678:1.0 1969:1.0 2137:1.0 2553:1.0 2836:0.14285714285714285 2892:1.0 3569:1.0 4748:0.125 4775:2.0 5013:1.0 5015:1.0 5061:1.0 5076:1.0 5491:1.0 5616:1.0 5724:1.0 6280:1.0 7338:1.0
16 12:0.047619047619047616 15:1.0 18:0.5 41:0.1111111111111111 45:0.125 47:0.5 53:0.5 75:0.08333333333333333 79:0.25 85:0.5 191:0.16666666666666666 197:0.2 305:0.3333333333333333 472:1.0 501:1.0 748:0.5 801:0.5 957:0.3333333333333333 958:1.0 1014:1.0 1068:1.0 1086:0.5 1089:1.0 1415:1.0 1720:1.0 1962:1.0 2246:1.0 2623:1.0 3203:1.0 3211:1.0 5565:1.0 7429:1.0 7510:1.0 7603:1.0 7958:1.0 8011:1.0
16 20:0.1111111111111111 24:1.0 35:0.1 41:0.1111111111111111 42:1.0 64:0.5 75:0.25 104:0.25 122:0.3333333333333333 133:1.0 139:1.0 166:0.25 172:0.5 191:0.16666666666666666 209:0.25 226:0.25 348:0.25 398:0.4 550:0.25 619:0.5 765:1.0 767:0.5 1049:1.0 1094:1.0 1220:1.0 1980:1.0 2517:1.0 2638:1.0 2981:1.0 3841:1.0 4533:2.0 4780:0.5 4831:1.0 4924:1.0 5158:0.5 5900:1.0
16 20:0.05555555555555555 41:0.4444444444444444 42:1.0 47:0.5 53:1.0 67:0.3333333333333333 69:0.5 74:0.5 75:0.08333333333333333 108:0.3333333333333333 113:1.0 124:0.3333333333333333 137:1.0 139:1.0 172:0.5 191:0.16666666666666666 305:0.3333333333333333 348:0.25 387:1.0 398:0.2 436:1.0 1049:1.0 1582:1.0 2071:1.0 4374:0.5 4666:1.0 4765:1.0 5319:1.0 5320:1.0 5321:1.0 5322:1.0 5323:1.0 6457:1.0 6799:1.0 7218:1.0
16 18:0.25 20:0.05555555555555555 45:0.125 52:0.3333333333333333 53:0.5 65:1.0 67:0.6666666666666666 87:2.0 136:1.0 154:0.5 164:0.5 191:0.16666666666666666 226:0.25 230:1.0 261:0.3333333333333333 332:1.0 368:1.0 398:0.2 492:0.25 522:0.3333333333333333 619:0.5 742:0.5 902:1.0 966:1.0 981:1.0 1086:0.5 1526:1.0 1582:1.0 3286:1.0 4765:1.0 4769:0.1 4874:0.2 4875:1.0 4877:1.0 4889:1.0 5961:1.0
16 18:0.25 20:0.05555555555555555 24:2.0 41:0.2222222222222222 45:0.25 48:0.3333333333333333 52:0.3333333333333333 69:1.0 75:0.16666666666666666 85:0.5 87:1.0 139:1.0 172:0.5 191:0.3333333333333333 210:1.0 230:1.0 374:1.0 398:0.2 499:1.0 550:0.25 619:0.5 742:0.5 871:1.0 902:1.0 910:0.3333333333333333 1079:1.0 1086:0.5 1341:0.5 2137:1.0 4012:0.1111111111111111 4343:1.0 4748:0.125 4765:1.0 4774:1.0 4811:1.0 4874:0.2 4875:1.0 4876:1.0 4878:1.0 4889:1.0 4994:1.0 5032:1.0 5061:1.0 6152:1.0
16 18:0.25 24:1.0 41:0.2222222222222222 45:0.125 47:1.0 74:0.5 75:0.08333333333333333 98:0.25 492:0.25 707:1.0 1049:1.0 1341:0.5 1344:2.0 1402:0.3333333333333333 2176:1.0 2933:0.5 4757:1.0 4769:0.1 5032:1.0 8297:1.0
16 18:0.25 24:1.0 45:0.125 117:0.5 128:0.18181818181818182 191:0.3333333333333333 230:1.0 398:0.2 774:1.0 1344:1.0 1402:0.3333333333333333 4343:1.0 4765:1.0 4769:0.2 4828:1.0 4983:1.0 5322:1.0 5383:1.0 5543:1.0 5612:1.0 5773:1.0 6413:0.5 7112:1.0 7995:1.0
16 12:0.015873015873015872 24:2.0 27:0.2 35:0.1 41:0.1111111111111111 53:0.5 67:0.3333333333333333 75:0.08333333333333333 77:0.3333333333333333 104:0.25 122:0.3333333333333333 136:1.0 139:1.0 191:0.16666666666666666 257:0.3333333333333333 277:0.16666666666666666 398:0.2 425:1.0 560:1.0 1049:2.0 1440:0.5 1966:0.5 2124:1.0 2335:1.0 4815:0.5 4816:0.3333333333333333 4898:1.0 5767:1.0 6065:1.0 6145:1.0 7679:1.0
16 35:0.1 41:0.1111111111111111 67:0.3333333333333333 75:0.08333333333333333 124:0.3333333333333333 191:0.3333333333333333 210:1.0 243:1.0 322:1.0 398:0.4 441:1.0 454:1.0 568:0.05 688:0.5 877:0.5 911:1.0 1086:0.5 1375:1.0 1628:1.0 1856:1.0 2650:1.0 4815:0.5 4828:1.0 4831:1.0 5464:1.0 6007:1.0 6008:1.0 6887:1.0 7080:1.0 7193:1.0
16 12:0.031746031746031744 27:0.4 35:0.1 36:0.09090909090909091 52:0.3333333333333333 53:0.5 57:0.5 63:1.0 69:0.5 75:0.08333333333333333 98:0.25 122:0.3333333333333333 133:1.0 348:0.25 361:1.0 398:0.2 568:0.05 610:1.0 718:1.0 774:1.0 801:0.25 871:1.0 939:0.5 1202:1.0 1754:0.3333333333333333 1774:1.0 2054:1.0 2103:0.5 3189:1.0 4780:0.5 4931:1.0 5814:1.0 5839:1.0 5881:1.0 7956:1.0
16 18:0.25 45:0.125 67:0.3333333333333333 113:1.0 128:0.09090909090909091 172:0.5 191:0.3333333333333333 192:0.2 230:1.0 398:0.2 501:1.0 1086:0.5 1549:1.0 1980:1.0 2137:1.0 4769:0.1 4828:1.0 4984:0.5 6133:1.0
16 20:0.05555555555555555 24:2.0 39:0.25 47:0.5 67:0.3333333333333333 69:1.0 75:0.5833333333333334 85:0.5 99:1.0 122:0.3333333333333333 152:0.3333333333333333 192:0.2 277:0.3333333333333333 368:2.0 409:0.3333333333333333 500:1.0 510:1.0 564:0.5 601:1.0 647:1.0 774:1.0 788:1.0 911:1.0 1385:1.0 1529:1.0 1607:1.0 1720:1.0 3287:1.0 4307:1.0 4757:1.0 4761:1.0 4830:1.0 4953:1.0 5330:1.0 5592:1.0 7627:1.0 7693:1.0
16 12:0.015873015873015872 20:0.05555555555555555 58:0.2 64:0.5 67:0.3333333333333333 75:0.16666666666666666 87:1.0 122:0.3333333333333333 191:0.16666666666666666 277:0.16666666666666666 473:1.0 492:0.25 531:0.6666666666666666 615:1.0 779:1.0 1508:1.0 3203:1.0 4761:1.0 6215:1.0
16 4:0.3333333333333333 12:0.015873015873015872 27:0.2 35:0.1 41:0.1111111111111111 67:0.3333333333333333 69:0.5 226:0.25 2235:1.0 2430:0.5 2669:1.0 3187:1.0 4343:1.0 5434:1.0 5806:0.5 5866:1.0 6221:1.0 6391:1.0 6575:1.0 7180:1.0
16 12:0.015873015873015872 18:0.25 24:2.0 27:0.4 41:0.2222222222222222 52:0.3333333333333333 53:0.5 63:1.0 67:0.6666666666666666 75:0.16666666666666666 96:1.0 98:0.25 128:0.09090909090909091 209:0.25 270:1.0 303:1.0 451:0.5 698:1.0 799:0.5 1143:1.0 1218:1.0 1344:1.0 1535:0.3333333333333333 1636:1.0 2933:1.0 4500:1.0 4761:1.0 4780:0.5 4813:1.0 4957:1.0 5041:0.5 5289:1.0 5352:0.5 5355:2.0 5625:1.0 5767:1.0 7015:1.0
16 18:0.25 24:1.0 39:0.25 41:0.1111111111111111 47:0.5 65:1.0 67:0.3333333333333333 75:0.16666666666666666 122:0.3333333333333333 368:1.0 398:0.2 502:0.5 956:1.0 2004:1.0 2836:0.14285714285714285 4761:1.0 4769:0.1 4995:1.0 5030:1.0 5697:1.0 5752:1.0 5908:1.0
16 12:0.015873015873015872 15:1.0 24:1.0 41:0.1111111111111111 67:0.3333333333333333 75:0.25 87:1.0 98:0.25 122:0.3333333333333333 172:0.5 191:0.3333333333333333 344:1.0 619:0.5 1086:0.5 1095:0.5 2137:1.0 3074:1.0 3180:0.5 4100:1.0 4748:0.125 4765:1.0 4769:0.1 4813:1.0 4874:0.2 4915:1.0 5015:1.0 5061:1.0 5347:1.0 5908:1.0 5915:1.0 7634:1.0
16 18:0.5 20:0.05555555555555555 39:0.25 41:0.2222222222222222 67:0.6666666666666666 87:2.0 98:0.5 104:0.25 113:1.0 124:0.3333333333333333 191:0.16666666666666666 198:0.2 226:0.25 348:0.25 398:0.4 502:0.5 531:0.3333333333333333 545:1.0 564:0.5 568:0.05 758:0.14285714285714285 801:0.25 837:1.0 858:1.0 976:0.3333333333333333 1049:1.0 1079:1.0 1086:0.5 1343:0.5 2797:1.0 2974:0.3333333333333333 3797:1.0 3993:1.0 4801:1.0 4802:1.0 4828:1.0 5135:0.5 5619:0.5 6218:1.0 7676:1.0
|
267aaba2ffe6d65c004e19669406487895e2760a | 449d555969bfd7befe906877abab098c6e63a0e8 | /98/CH7/EX7.8/example7_8.sce | b82dbe4ace0fedf04b74e16f8e103b93b1a9f878 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 663 | sce | example7_8.sce | //Chapter 7
//Example 7_8
//Page 153
clear;clc;
mw=5;
kv=33;
pf=0.8;
cost=4;
id=0.1;
p=1e-6;
//cost = Rs (25000*a + 2500)
ra=p*1e5;
i=mw*1e6/sqrt(3)/kv/1000/pf;
e=3*i^2*ra*8760/1000;
ac=cost*e/100;
cc=25000;
vac=id*cc;
a=sqrt(ac/vac);
printf("Resistance of one conductor = %.3f/a ohm \n\n", ra);
printf("Line current = %.2f A \n\n", i);
printf("Energy lost per annum = %.1f/a kWh \n\n", e);
printf("Annual cost of energy lost = Rs. %d/a \n\n", ac);
printf("Capital cost is given to be Rs.20*a per metre. Threfore for 1km cable = Rs. %d*a \n\n", cc);
printf("Variable annual charge = Rs. %d*a \n\n", vac);
printf("Area of cross section = %.2f cm^2 \n\n", a);
|
5b8f447b698da3a8fda0e5dcf239d91fa75d9058 | 449d555969bfd7befe906877abab098c6e63a0e8 | /773/CH2/EX2.05.02/2_05_02.sci | 590bae7a55b4d28d9d3b3cd448f287d1134d4242 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 75 | sci | 2_05_02.sci | //laplace//
syms t s;
y=laplace('5+6*t^2+3*%e^(-2*t)',t,s);
disp(y,"ans=")
|
c21d7c2a18b2ba6cf843d6227f1417fb7230c4f7 | a24c640895f1cfb1e3242099f641df51ee10297e | /example_programs/if_statements.tst | 109082e764b38bee2f35cd763dbb81231bf84ae4 | [
"CC-BY-3.0"
] | permissive | supermaximo93/Toast-Prototype-Interpreter | 1c3d981a550f6498bb5fcc8952fdd6a5ae4c71b3 | 13547e96813add755791b33a19a4831f5e338094 | refs/heads/master | 2021-01-19T10:58:00.401688 | 2012-03-14T09:18:27 | 2012-03-14T09:18:27 | 3,140,649 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 544 | tst | if_statements.tst | ///////////////////////////////////////////////////////////////////////
/////////////// IF STATEMENTS ///////////////
///////////////////////////////////////////////////////////////////////
let condition = yes
// all examples print yes
if condition, print(yes) else print(no)
if condition,
print("Block of code")
print(yes)
else
print("Block of code")
print(no)
end
if condition,
print("Block of code")
print(yes)
else print(no)
if condition, print(yes) else
print("Block of code")
print(no)
end
|
3b7894af28e7d8f0eea17a9bc06dc830f589ecbd | 382c4ab7bd77fd8ea5a28d44133032bf3c657e66 | /Resolucion-Scilab/Helmholtz/HelmholtzDN.sce.txt | e212874ada88ac2edf383a896915da1b02a82e4e | [] | no_license | antoniocarrillo69/MDF | 647de12c74c7cbd40ee7ff79e18cb33595e0ab53 | bbafd03fd5c65bdbff61e5c7aa519a397c86597e | refs/heads/master | 2020-03-18T09:47:41.774616 | 2018-05-30T18:28:45 | 2018-05-30T18:28:45 | 134,580,287 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 1,929 | txt | HelmholtzDN.sce.txt | // Ejemplo de una ecuaci�n diferencial parcial en 1D
// Autor: Antonio Carrillo Ledesma
// -Uxx-k^2U=0
// 0<=U<=1
// U(0)=1 y Ux(1)=ikU(1)
TEST = 1; // (0) Diferencias finitas, (1) Diferencias finitas exactas segun Yau Shu Wong y Guangrui Li
function y=LadoDerecho(x)
y=0.0;
endfunction
function y=SolucionAnalitica(x, k)
//y=cos(k*x)+%i*sin(k*x);
y=exp(%i*k*x);
endfunction
K = 150;
KK = K*K;
a=0; // Inicio dominio
c=1; // Fin dominio
M=300; // Partici�n
N=M-1; // Nodos interiores
h=(c-a)/(M-1); // Incremento en la malla
Y0=1; // Condici�n Dirchlet inicial en el inicio del dominio
Y1=%i*K; // Condici�n Neumann inicial en el fin del dominio
A=zeros(N,N); // Matriz A
b=zeros(N); // Vector b
if TEST = 0 then
R=-1/(h^2);
P=2/(h^2)-KK;
Q=-1/(h^2);
else
R=-1/(h^2);
P=(2*cos(K*h)+(K*h)^2)/(h^2) - KK;
Q=-1/(h^2);
end
// Primer renglon de la matriz A y vector b
A(1,1)=P;
A(1,2)=Q;
b(1)=LadoDerecho(a)-Y0*R; // Frontera dirichlet
// Renglones intermedios de la matriz A y vector b
for i=2:N-1
A(i,i-1)=R;
A(i,i)=P;
A(i,i+1)=Q;
b(i)=LadoDerecho(a+h*(i-1));
end
// Relglon final de la matriz A y vector b
if TEST = 0 then
A(N,N-1)=1/(h^2);
A(N,N)=-1/(h^2)+ Y1/h;
b(N)=LadoDerecho(c)/2;
else
A(N,N-1)=1/(h^2);
A(N,N)=-1/(h^2)+ %i*sin(K*h)/(h^2);
b(N)=LadoDerecho(c)/2;
end
// Resuleve el sistema lineal Ax=b
x=inv(A)*b;
ESC = 5;
xxx=zeros(M*ESC,1);
zzz=zeros(M*ESC,1);
for i=1:M*ESC
xxx(i)=a+h/ESC*(i-1);
zzz(i)=SolucionAnalitica(xxx(i),K);
end
// Prepara la graficaci�n
xx=zeros(M,1);
zz=zeros(M,1);
for i=1:M
xx(i)=a+h*(i-1);
zz(i)=SolucionAnalitica(xx(i),K);
end
yy=zeros(M,1);
yy(1)=Y0; // Condici�n inicial
for i=1:N
yy(i+1)=x(i);
end
// Grafica la soluci�n de la Ecuaci�n Diferencial Parcial en 1D
plot2d(xx,yy,15)
plot2d(xxx,zzz)
|
d79f3ea6dd24be24681fa3957707ed643d8bf264 | 0e1b45c07f0938ba9c8a003d6ae1cf2d8315efdb | /acmp.ru/335, Tri-prime numbers/c++/test-04.tst | beee1d8bdc96f35c992ddbb11036692c75f27ab7 | [] | no_license | Kot-Angens/acm | c85d8582c3e84f218415321743864b9680e01f2e | 05472eaa0fff7abb6679826085da5e0c990df4cb | refs/heads/master | 2021-01-24T22:36:05.159612 | 2012-10-02T13:51:56 | 2012-10-02T13:51:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 43 | tst | test-04.tst | 10000
~~~~~~~~~~~~~~~~~~~~~~~~~~
104715764
|
6fe3278b6bd75d1affe464ce25da148081a615d8 | 4ed576b765859807d6c29665521e0697d6f9bae7 | /archive/06/ex6.3.sce | c6667d944d4c5e84abaa7c91b62cf420e30ecad7 | [] | no_license | sbednarz/scilab | 96b9182730fa48d11f27840fc197d151adb01e2c | 28f81c58bc4972eeb41f403cb157fb989e809f41 | refs/heads/master | 2021-07-11T04:42:04.289126 | 2021-05-17T20:55:19 | 2021-05-17T20:55:19 | 100,467,366 | 3 | 1 | null | 2020-06-19T06:49:18 | 2017-08-16T08:37:06 | Scilab | UTF-8 | Scilab | false | false | 993 | sce | ex6.3.sce |
// ex.6.3
// solvent enters to the tank with flow of 0.1 L/s
// A + B -> C, k
// accu = in - out + prod
function dy = model(t, y)
// instantaneous values:
V = y(1)
nA = y(2)
nB = y(3)
nC = y(4)
// instant concentrations
A = nA/V
B = nB/V
C = nC/V
//rates:
dVdt = 0.1 // 0.1 L/s
dnAdt = -k*A*B*V
dnBdt = -k*A*B*V
dnCdt = k*A*B*V
dy=[dVdt, dnAdt, dnBdt, dnCdt]
endfunction
// initial conditions
V0 = 10 //L
nA0 = 2.0 // mol
nB0 = 1.5 // mol
nC0 = 0 // mol
k = 1e-2
y0 = [V0; nA0; nB0; nC0]
t0 = 0
t = linspace(0,3600) // time in seconds
y = ode(y0, t0, t, model)
//V(t) total profile
V=y(1,:)
nA=y(2,:)
nB=y(3,:)
nC=y(4,:)
A = nA ./ V // ./ ==> element-by-element division
B = nB ./ V // ./ ==> element-by-element division
C = nC ./ V // ./ ==> element-by-element division
clf
plot(t, nA, '-or')
plot(t, nB, '-ob')
plot(t, nC, '-og')
legend(['A'])
xlabel('Time, s')
ylabel('Concentration, mol/L')
|
0f17f503acc3edff49c3c879acdb0f2a1fa7b58a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1760/CH9/EX9.38/EX9_38.sce | baef19ffc09c35479214fb693ad7e1c30eb99640 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 211 | sce | EX9_38.sce | //EXAMPLE 9-38 PG NO=624-625
C=1/9; //CAPACITOR
X=2; //R/L=X
Y=6-X; //G/C
G=4*C;
disp('i) G (G) = '+string (G)+' ohm')
L=0.9;
R=1.8;
|
01846c26f273ce787060323bfe42f9799459ec9b | 449d555969bfd7befe906877abab098c6e63a0e8 | /534/CH3/EX3.1/3_1_Human_Heat_Loss_part2.sce | 7043393fc825c791480368402b69900afd34b18f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,720 | sce | 3_1_Human_Heat_Loss_part2.sce | clear;
clc;
printf('FUNDAMENTALS OF HEAT AND MASS TRANSFER \n Incropera / Dewitt / Bergman / Lavine \n EXAMPLE 3.1 Page 104 \n') //Example 3.1
// Find Skin Temperature & Aerogel Insulation Thickness
A=1.8; // [m^2] Area for Heat transfer i.e. both surfaces
Ti = 35+273; //[K] - Inside Surface Temperature of Body
Tsurr = 10+273; //[K] - Temperature of surrounding
Tf = 283; //[K] - Temperature of Fluid Flow
e=.95; // Emissivity of Surface
Lst=.003; //[m] - Thickness of Skin
kst=.3; // [W/m.K] Effective Thermal Conductivity of Body
kins = .014; // [W/m.K] Effective Thermal Conductivity of Aerogel Insulation
hr = 5.9; //[W/m^2.k] - Natural Thermal Convectivity from body to air
stfncnstt=5.67*10^(-8); // [W/m^2.K^4] - Stefan Boltzmann Constant
q = 100; //[W] Given Heat rate
//Using Conducion Basic Eq 3.19
Rtot = (Ti-Tsurr)/q;
//Also
//Rtot=Lst/(kst*A) + Lins/(kins*A)+(h*A + hr*A)^-1
//Rtot = 1/A*(Lst/kst + Lins/kins +(1/(h+hr)))
//Thus
//For Air,
h=2; //[W/m^2.k] - Natural Thermal Convectivity from body to air
Lins1 = kins * (A*Rtot - Lst/kst - 1/(h+hr));
//For Water,
h=200; //[W/m^2.k] - Natural Thermal Convectivity from body to air
Lins2 = kins * (A*Rtot - Lst/kst - 1/(h+hr));
Tsa=305; //[K] Body Temperature Assumed
//Temperature of Skin is same in both cases as Heat Rate is same
//q=(kst*A*(Ti-Ts))/Lst
Ts = Ti - q*Lst/(kst*A);
//Also from eqn of effective resistance Rtot F
printf("\n\n (I) In presence of Air, Insulation Thickness = %.1f mm",Lins1*1000)
printf("\n (II) In presence of Water, Insulation Thickness = %.1f mm",Lins2*1000);
printf("\n\n Temperature of Skin = %.2f degC",Ts-273);
//END |
f09411c699dd87cce6a0795312368e8b6c0f4836 | b6b875fb04ec6df2c0fb0d28f36962fa9aebb2bf | /TD5/Scripts/inv_expo.sce | 6cfc6d32b37fb2d8a01ea07881631c5e65b80a1a | [] | no_license | MFrizzy/Modelisation | 51794b2edf421f9d2206cb73972d8d8d7b1e9759 | 0ca819afbcbe00f58f3bbaa8fc97164ae2c1d3cb | refs/heads/master | 2021-08-29T12:02:20.042037 | 2017-12-13T22:39:21 | 2017-12-13T22:39:21 | 106,943,303 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 264 | sce | inv_expo.sce | function t = expo(l,n)
u = rand(n, 1);
t = u
t = -log(1-t)/l
endfunction
histplot(20,expo(1,100000))
a=0:0.01:12;
lambda=1;
b=lambda*exp(-lambda*a);
plot2d2(a,b,style=1)
legend("Simulation de la loi exponentielle","Densité de la loi exponentielle")
|
2d176a43c58369c8fecc03186735b917f4b481b6 | 6813325b126713766d9778d7665c10b5ba67227b | /Chapter6/Ch_6_Eg_6.13.sce | fbb9cd30aa693ac29e6f3b17182269194930f444 | [] | no_license | arvindrachna/Introduction_to_Scilab | 955b2063b3faa33a855d18ac41ed7e0e3ab6bd1f | 9ca5d6be99e0536ba1c08a7a1bf4ba64620ec140 | refs/heads/master | 2020-03-15T19:26:52.964755 | 2018-05-31T04:49:57 | 2018-05-31T04:49:57 | 132,308,878 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 484 | sce | Ch_6_Eg_6.13.sce | //Simple if-else-end
flag=input ("Enter the value of flag:");
if flag then
disp("True");
else
disp("False");
end
//Ladder if-elseif-else-end example
a=input ("Enter marks:")
if a >=75 then
disp("Honors");
elseif a>=60, //then replaced by a comma
disp ("First division");
elseif a>=45 // then replaced by a space
disp ("Second division");
elseif a>=35; // then replaced by a semicolon
disp ("Third division");
else
disp("Fail");
end
|
d903e5edd5db35180dce13351c958426d16f1704 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1445/CH8/EX8.38/Ex8_38.sce | 15802d568330fa4d3f5b72c9a074710efb8d7a02 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 629 | sce | Ex8_38.sce | //CHAPTER 8- DIRECT CURRENT MACHINES
//Example 38
clc;
disp("CHAPTER 8");
disp("EXAMPLE 38");
//VARIABLE INITIALIZATION
v_t=215; //in Volts
r_a=0.4; //in Ohms
p=5*1000; //in Watts
N_g=1000; //speed as generator in rpm
ratio=1.1; //according to the solution, Φ_b:Φ_a=1.1
//SOLUTION
//As generator
I_ag=p/v_t;
E_a=v_t+(I_ag*r_a);
//As motor
I_am=p/v_t;
E_b=v_t-(I_am*r_a);
N_m=(1/ratio)*N_g*(E_b/E_a);
N_m=round(N_m); //to round off the value
disp(sprintf("The speed of the machine as motor is %d rpm",N_m));
//END
|
62194b71c4a3a396c4282678c760e95d446ce883 | 717ddeb7e700373742c617a95e25a2376565112c | /22/CH3/EX3.9/ch3ex9.sce | b651f07e0cbb2cdb4330bbfe05c3cd654587d565 | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 306 | sce | ch3ex9.sce | //signals and systems
//time domain analysis of discreet time systems
//iterative solution
clear;
close;
clc;
n=(-2:10)';
y=[1;2;zeros(length(n)-2,1)];
x=[0;0;n(3:length(n))];
for k=1:length(n)-2
y(k+2)=y(k+1)-0.24*y(k)+x(k+2)-2*x(k+1);
end;
clf;
plot2d3(n,y);
disp([msprintf([n,y])]);
|
65c551f69c45c73203433b46baff7b6a9df8a02a | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH16/EX16.5/5.sce | 9f7f4b2a4f10f0841c938a73ba4fa087c6dab2aa | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 164 | sce | 5.sce | clc
a=40*%pi/180; //Mach angle in radians
y=1.4;
R=287; //J/kg K
T=288; //K
C=sqrt(y*R*T);
V=C/sin(a);
disp("Velocity of bullet =")
disp(V)
disp("m/s") |
5227f644782397f3d9289a553effa1e5ebdc9a74 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH13/EX13.14/Ex13_14.sce | d5e73f3f8f2bca8a4c7373a7bbe0c38deeba5f5b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 220 | sce | Ex13_14.sce | clear
//Given
Ev=200 //V
I0=0.9 //A
f=50 //Hz
//Calculation
//
E0=sqrt(2)*Ev
Xl=E0/I0
L=Xl/(2*%pi*f)
//Result
printf("\n The value of inductance is %0.0f H",L)
|
0bc1c436e70d54b600ad8634b895937d5adede28 | 449d555969bfd7befe906877abab098c6e63a0e8 | /965/CH7/EX7.8/8.sci | 9ae514d950ab70f522f9ebfce3aaa0a7448aad2e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 816 | sci | 8.sci | clc;
clear all;
disp("Laminar flow over plate")
L=5;//m plate length
w=2.5;//m plate width
x=1.2;//m distance from the leading edge of plate
v=15.4*10^(-6);//m^2/s kinematic viscocity
U=4;//m/s velocity of air
rho=1.208;//kg/m^3 density of air
v=1.47*10^(-5);//m^2/s kinematic viscosity of air
Re=5*10^5;// Reynold's number
x=Re*v/U;// length of plste over which boundary layer is laminar
disp("m",x,"length of plste over which boundary layer is laminar =")
delta=5*x*1000/(Re)^0.5;//mm
disp("mm",delta,"thickness of boundary layer =")
Cfx=0.664/(Re)^0.5;
disp(Cfx,"drag coefficient =")
tau=Cfx*0.5*rho*U^2;// shear stress
disp("N/m^2",tau,"Shear stress =")
Cf=1.328/(Re)^0.5;
A=x*w;//m^2 area of plate
Fd=2*Cf*0.5*rho*A*U^2;
disp("N",Fd,"Total drag force on both sides of plate, =")
|
cd110d6f84bb7d8d12c42d03ec64f01e9a8d93fb | 449d555969bfd7befe906877abab098c6e63a0e8 | /3785/CH4/EX4.9/Ex4_9.sce | 3142398d7e0392697c7651857e4b7c10e6482a70 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 343 | sce | Ex4_9.sce | // Example 4_9
clc;funcprot(0);
// Given data
R=5;// The radius of a jar in cm
n=33;// tThe turntable has been revolving at a steady speed in rpm
g=9.807;// The acceleration due to gravity in m/s^2
// Calculation
omega=(2*%pi*n)/60;// Acceleration
h=(omega*R*10^-2)^2/(2*g);// The height h in m
printf("\nThe height,h=%1.3e m",h);
|
52e72886d28f1411bceff154b6db19da9c3d0b1f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3733/CH4/EX4.4/Ex4_4.sce | 27cabd01c560f5eeab1a04bb2b58c901f5579d5e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 557 | sce | Ex4_4.sce | //Example 4_4
clc;funcprot(0);
//Given data
P=40000;//kW
N=500;//r.p.m
H=240;// m
h=30;// m
SG=1.1;// Specific gravity of water
q=150;// litres/sec
q=q*SG;// kg/sec
n_m=0.88;// The over all efficiency
//Calculation
w=1000*9.81;// N
p=(q*w*h*n_m)/(1000*1000);// kW
//d_r=D/d;
d_r=sqrt(P/p)*(h/H)^0.75;
n=N*d_r*sqrt(h/H);// r.p.m
n_s=(n*sqrt(p))/h^(5/4);
N_s=(N*sqrt(P))/(H)^(5/4);
printf('\n(a)The design speed for a turbie,n=%0.0f r.p.m',n);
printf('\nThe runner is of Francis type');
// The answer provided in the textbook is wrong
|
5ff028b9e1db6307e99f0afa52cdf1685dc64635 | 449d555969bfd7befe906877abab098c6e63a0e8 | /599/CH2/EX2.5.a/example2_5_a.sce | f9a67c3f4c2c3ad967043a28cdd9c4c41e7ade67 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 838 | sce | example2_5_a.sce |
clear;
clc;
printf("\t Example 2.5.a\n");
//position 1 moles molefraction
// air 80 0.8
// water 20 0.2
//position 2 moles molefraction
// air 10 0.1
// water 90 0.9
ya1=0.8;
ya2=0.1;
T=(273+35); //temperature in kelvin
pt=1*1.013*10^5; //total pressure in pascal
z=0.3*10^-3; //gas film thickness in m
Dab=.18*10^-4; //diffusion coefficient in m^2/s
R=8314; //universal gas constant
Na=Dab*pt*(ya1-ya2)/(z*R*T) //diffusion flux in kmol/m^2*s
rate=Na*100*10^-4*3600*46; //since molecular weight of mixture is 46
printf("\n rate of diffusion of alcohol-water vapour :%f kg/hr ",rate);
//end |
8ebd8b89ca3acb4f20dc41c1cb29bb211f5a373e | 449d555969bfd7befe906877abab098c6e63a0e8 | /343/CH4/EX4.14/ex4_14.sce | bae71d041634e3a3747119a22f9e2a4799881fd3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 383 | sce | ex4_14.sce | clc
r1=2 //Assigning values to parameters
r2=0.02
wi=412
pf=0.8
x=1
kva=50
e1=2300
e2=230
i2=kva*1000/e2
i1=kva*1000/e1
wcf=(i1*i1*r1)+(i2*i2*r2)
n1=x*kva*pf*100/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))
x=0.5
n2=x*kva*pf*100/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))
disp("Percent",n1,"Efficiency at full node 0.8pf is")
disp("Percent",n2,"Efficiency at half full node 0.8pf is") |
7b65ea0065ac3cc58b9f2923ddbdfa18c5474468 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1466/CH5/EX5.2/5_2.sce | 32e52678271c4e6f7724c9be2bccb7dc1c146576 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 184 | sce | 5_2.sce | clc
//initialisation of variables
k= 1.667
L= 0.5 //ft
g= 32.2 //ft/sec^2
//CALCULATIONS
Cd= (k/L)/(sqrt(2*g)*(2/3))
//RESULTS
printf (' Coefficiant of discharge = %.3f ',Cd)
|
e803d7b2bb63dbbb69e24fdfdcf19056d375e104 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1652/CH13/EX13.4/13_4.sce | 1478c4661d0484e2d9b732145589beb6569b2f2c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 194 | sce | 13_4.sce | clc
//Initialization of variables
T1=77.32 //K
P=1 //atm
T2=126 //K
Pc=33.5 //atm
//calculations
dS=27/32 *1.987*P/Pc *(T2/T1)^3
//results
printf("Change in entropy = %.2f eu/mol",dS)
|
5babf9434bea434d9fe49224b19f31b8cb199718 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1388/CH7/EX7.3/7_3.sce | e249b1832b307f2351eccc8ac5b648f9541e3e3b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 256 | sce | 7_3.sce | clc
//initialisation of variables
M= 25.01 //gms
n= 1.0053 //moles
n1= 6.6*10^-5 //moles
e= 1.350*10^-3 //coloumbs
//CALCULATIONS
x= M/n
y= n1*x
nm= y*10^3+e*10^3-(x/10)
t= nm/(e*10^3)
//CALCULATIONS
printf (' transference number = %.3f ',t)
|
598acd10c7bb926eb7a350f4253b4028f5eaa94d | eb7eeb04a23a477e06f3c0e3d099889caee468b4 | /src/tools/scilab/iome_toolbox/macros/setparammmat3d.sci | f5e1500ce12dad304c9f9c8aa66b60ebe51387c5 | [] | no_license | mikeg64/iome | 55699b7d7b3d5c1b006d9c82efe5136b8c909dfd | cc1c94433133e32776dcf16704ec4ec337b1b4a0 | refs/heads/master | 2020-03-30T15:57:33.056341 | 2016-04-13T09:24:27 | 2016-04-13T09:24:27 | 151,387,236 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,159 | sci | setparammmat3d.sci | function [vec]=setparammmat3d(name, var, ni,nj,nk,nr,nc,elist)
//AddMetadata(name, property, port)
nargin=length(elist);
if nargin>0 then
server=elist(1);
if nargin>1 then
port=elist(2);
if nargin>2 then
id=elist(3);
else
id=0;
end
else
port=8080;
end
else
server='localhost';
port=8080;
id=0;
end
try
ind=1;
for i1=1:ni
for i2=1:nj
for i3=1:nk
for i=1:nr
for j=1:nc
tmat(ind)=var(i1,i2,i3,i,j);
ind=ind+1;
end
end
end
end
end
mstring=vectostring(tmat, ni*nj*nk*nr*nc,',');
//put double quotes around the vec string so that it is
//passed into unix shell script as a single variable
umstring=sprintf('""%s""',mstring);
scommand=sprintf("iogs setparam mmat3d %s %s %d %d %d %d %d %d %d %s", name, umstring, ni,nj,nk,nr,nc, id,port,server);
vec=unix_g(scommand);
catch
disp('Setmmat3dParam Error!');
vec=-1;
end
endfunction
|
c57f76185bf8c811d17cb05f284cd60653003aab | 676ffceabdfe022b6381807def2ea401302430ac | /library/Demos/StdRegions/Tests/StdProject1D_Seg_Mod_P6_Q7.tst | 9eea693908455457947e11d3f6b5b20bb8350603 | [
"MIT"
] | permissive | mathLab/ITHACA-SEM | 3adf7a49567040398d758f4ee258276fee80065e | 065a269e3f18f2fc9d9f4abd9d47abba14d0933b | refs/heads/master | 2022-07-06T23:42:51.869689 | 2022-06-21T13:27:18 | 2022-06-21T13:27:18 | 136,485,665 | 10 | 5 | MIT | 2019-05-15T08:31:40 | 2018-06-07T14:01:54 | Makefile | UTF-8 | Scilab | false | false | 484 | tst | StdProject1D_Seg_Mod_P6_Q7.tst | <?xml version="1.0" encoding="utf-8"?>
<test>
<description>StdProject1D Segment Modified basis P=6 Q=7</description>
<executable>StdProject</executable>
<parameters>-s segment -b Modified_A -o 6 -p 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">5.07435e-15</value>
</metric>
<metric type="Linf" id="2">
<value tolerance="1e-12">5.10703e-15</value>
</metric>
</metrics>
</test>
|
73336f316e32a765fe2b8aa5c66d9a8d5ae538d0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2858/CH12/EX12.2/Ex12_2.sce | 6d21e86c2fc02c52d88ad421c2245beccf4a33f8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 182 | sce | Ex12_2.sce | //example 12.2
clc; funcprot(0);
Ap=%pi/4*1.75^2;
q=135.6;
w=0.83;
FS=4;
phi=36;
Nq=0.21*exp(0.17*phi);
Qp=Ap*q*(w*Nq-1);
Qpall=Qp/FS;
disp(Qpall,"allowed load in kN");
|
3350319fa2199feb61106282138e24f55c472460 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.0/macros/signal/convol.sci | 0a302dccb7f7e8a604969d8dadd27c77adf5817f | [
"MIT",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 1,125 | sci | convol.sci | function [y,y1]=convol(h,x,y0)
// convol - convolution (overlap add method)
//%CALLING SEQUENCE
// [y,y1]=convol(h,x,y0)
// [y]=convol(h,x)
//%PARAMETERS
// x,h :input sequences (h is a "short" sequence, x a "long" one)
// y0 : old piece to overlap add
// y : output of convolution
// y1 : new piece to overlap add
//%DESCRIPTION
// calculates the convolution y= h*x of two discrete sequences by the overlap
// add method (fft).
//%EXAMPLE
// For x=[x1,x2,...,]
// First call : [y,y1]=convol(h,x1)
// Subsequent calls : [y,y1]=convol(h,xk,y1).
//!
[lhs,rhs]=argn(0)
n=prod(size(x))
m=prod(size(h))
m1=n+m-1
x(m1)=0;h(m1)=0
if norm(imag(x))==0&norm(imag(h))==0 then
y=real(fft(fft(matrix(x,1,m1),-1).*fft(matrix(h,1,m1),-1),1))
else
y=fft(fft(matrix(x,1,m1),-1).*fft(matrix(h,1,m1),-1),1)
end
if lhs+rhs=5 then,
y0(n)=0;//update carried from left to right
y1=y(n+1:n+m-1)
y=y(1:n)+y0
elseif lhs+rhs=4 then
if rhs=2 then
y1=y(n+1:n+m-1)
y=y(1:n) //initial update
else
y0(n+m-1)=0 //final update
y=y(1:n+m-1)+y0
end,
else
y=y(1:n+m-1) //no update
end
|
6f8a76d3555a3371c49e202f79d841104b775c18 | 449d555969bfd7befe906877abab098c6e63a0e8 | /557/CH5/EX5.7/7.sce | af1739a612a2be7a49a0fce617b84eec3d78d7cf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 737 | sce | 7.sce | clc;funcprot(0);
//Example 5.7
//Initializing the variables
Vj = 5*10^6; //Velocity of Jet
Mr = 150000; // Mass of Rocket
Mf0 = 300000; // Mass of initial fuel
Vr = 3000; //Velocity of jet relative to rocket
g = 9.81; // Acceleration due to gravity
//Calculations
m = Vj/Vr; //Rate of fuel consumption
T = Mf0/m; // Burning time
function[DVt]=f(t)
DVt = m*Vr /(Mr + Mf0 - m*t) - g;
endfunction
function[V]=h(t)
V = -g*t - Vr*log(1 - t/269.95);
endfunction
Vt = intg(0, 180 ,f);
Z1=intg(0,180,h);
Z2 = Vt^2/(2*g);
disp(T, "(a)Burning time (s): ");
disp(Vt,"(b)Speed of rocket when all fuel is burned (m/s):");
disp((Z2+Z1)/1000,"(c)Maximum height reached (km):"); |
9bb8acc9bd0da2dc4c401e9158d1573e623444b0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1223/CH17/EX17.4/Ex17_4.sce | 9d1110fa67aeb02098e9fe729fef4496253cc7ee | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 336 | sce | Ex17_4.sce | clear;
clc;
//Example 17.4
Vx=-0.7;
Vy=-0.7;
iCxy=3.22;//(mA)
iCR=0;
i5=1.40;
i1=1.40;
Vor=-0.7;
R4=1.500;
Vnor=-1.4;
V2=-5.2;
R3=1.500;
i3=(Vor-V2)/R3;
printf('\ncurrent i3=%.2f mA\n',i3)
i4=(Vnor-V2)/R4;
printf('\ncurrent i4 =%.2fmA\',i4)
P=(iCxy+iCR+i5+i1+i3+i4)*(0-V2);
printf('\npower dissipation=%.2f mW\n',P)
|
4a209473d5076d992f9268082c49580aedb86358 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1991/CH11/EX11.3/3.sce | 1b0e9d8ccaed40e4d6ba3fc54dee75df77050397 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 208 | sce | 3.sce | clc
clear
//input
v1=7.5//initial voltag
v2=11.5//final voltage
ic=18*10^-6//collector current
//calculation
r=(v2-v1)/ic//output resistance
//output
printf("the output resistance is %2.2e ohm ",r)
|
aef42afe76d32542fd9e4ecaf86c20a20cc9ca4a | 449d555969bfd7befe906877abab098c6e63a0e8 | /581/CH10/EX10.12/Example10_12.sce | 4fe726d6d218785aa5bbace6623628f607edf6a8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 880 | sce | Example10_12.sce |
clear ;
clc;
printf("\t Example 10.12\n");
T1=291; //temp.of sky,K
T2=308; //temp of air,K
e1=0.9; //emissivity 0f black paint
h=8; //heat transfer coefficient,W/(m^2*K)
P=600 ; //heat flux,W/m^2
//heat loss from the roof to the inside of the barn will lower the roof temp., since we dont have enough information to evaluate the loss, we can make an upper bound on roof temp. by assuming that no heat is transferred to the interior.
x=poly([0],'x');
x=roots(8*(e1*5.67*10^-8*(x^4-T1^4)+(x-T2)-e1*P));
//for white acrylic paint, by using table, e=0.9 and absorptivity is 0.26,Troof
T=poly([0],'T');
T=roots(8*(e1*5.67*10^-8*(T^4-T1^4)+(T-T2)-0.26*P));
Tn=T(2)+0.6
printf("\t temp. of the root is :%.1f C or 312 K ,the white painted roof is only a few degrees warmer than the air.\n",Tn);
//end
|
fbbe98955a3f9e0937c91f6726ed4f66f800d4bc | 185111a2cc05b48988df6de8df2cdf4ac07f94be | /ADC_onchip.sce | 0d5ff8278537e6d82cf0da312aacd2e40f7607ad | [] | no_license | ssshah389/Class | 426fceec8f81ec1152ef266304883f9835bdb7ae | 3f519521cf1e7e7d652bdbe205b97761401bb5d2 | refs/heads/master | 2021-07-10T08:39:13.955398 | 2017-01-19T01:24:51 | 2017-01-19T01:24:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,075 | sce | ADC_onchip.sce | function [Out,out_volt] = ADC(samples)
//samples is actually number of shifts
[path,fname,extension] = fileparts(file_name);
hid_dir = path + '.' + fname;
select board_num
case 2 then brdtype = '';
case 3 then brdtype = '_30a';
case 4 then brdtype = '_30n';
case 5 then brdtype = '_30h';
else messagebox('Please select the FPAA board that you are using.', "No Selected FPAA Board", "error"); abort;
end
//exec("~/rasp30/prog_assembly/libs/scilab_code/characterization/char_miteADC.sce",-1);
[a1,b1]=unix_g("sudo ~/rasp30/prog_assembly/libs/sh/asm2ihex.sh ./sftreg_miteADC ./Ramp_ADC_DAC.s43 16384 16384 16384")
if b1==1
disp('There is an error in your assembly file')
abort;
end
[a1,b1]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x4300 -input_file_name "+hid_dir+"/input_vector");
[a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x4200 -input_file_name "+hid_dir+"/output_info");
err=1;
while err==1
[y,err]=unix_g('sudo tclsh ~/rasp30/prog_assembly/libs/tcl/run.tcl '+path+'sftreg_miteADC.elf');
end
//*************************
unix_w("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 1 -output_file_name "+path+"output_vector.txt");
y = mopen(path+'output_vector.txt','rt')
Output=mgetl(y);
New_output(1,1) = part(Output(1,1),3:7);
Output_dec(1,:) = msscanf(New_output(1,:),'%x'); //scan with hexadecimal format
length_out= Output_dec(1) - 24576;
length_out=length_out/2;
disp(length_out)
unix_w("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x6000 -length "+string(length_out)+" -output_file_name "+path+"output_vector.txt");
y = mopen(path+"output_vector.txt','rt')
Output=mgetl(y);
m=1
i=3
while m<length_out+1
New_output(m,1) = part(Output(1,1),i:i+3);
m=m+1;
i=i+7;
end
clear Output_dec
m=1
while m<length_out+1
Output_dec(m,:) = msscanf(New_output(m,:),'%x'); //scan with hexadecimal format
m=m+1;
end
m=1
Out=Output_dec;
out_volt=Out
endfunction
|
62ee235046ffecf7838ac5858d23d20a135e9b44 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1757/CH12/EX12.2/EX12_2.sce | 445af563bece77912c0071ce91c84e700632ffaf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,418 | sce | EX12_2.sce | //Examle12.2 // Determine the following parameter of 8-bit A/D converter a) Normalized step size b) Actual step size c) Normalized maximum quantization level d) Actual maximum quantization e) Normalized peak quantization error f) Actual peak quantization error g) Percentage of quantization error
clc;
clear;
close;
N = 8 ;
Vin = 12 ;
//a) Normalized step size of A/D converter
Ns = 2^-N ;
disp('Normalized step size of A/D converter is = '+string(Ns)+ ' ');
// b) Actual step size of A/D converter
As = Vin*Ns ;
disp('Actual step size of A/D converter is = '+string(As)+ ' ');
// c) Normalized maximum quantization level of A/D converter
Qmax = 1-2^-N ;
disp('Normalized maximum quantization level of A/D converter is = '+string(Qmax)+ ' ');
// d) Actual maximum quantization level of A/D converter
QAmax = Qmax*Vin ;
disp('Actual maximum quantization level of A/D converter is = '+string(QAmax)+ ' ');
// e) Normalized peak quantization error of A/D converter
Qp = 2^-(N+1);
disp('Normalized peak quantization error of A/D converter is = '+string(Qp)+ ' ' );
// f) Actual peak quantization error of A/D converter
Qe = Qp*Vin ;
disp('Actual peak quantization error of A/D converter is = '+string(Qe)+ ' V ');
// g) Percentage of quantization error of A/D converter
%Qp = 2^-(N+1)*100 ;
disp('Percentage of quantization error of A/D converter is = '+string(%Qp)+ ' ') ;
|
2f8ccb655259a7a35d5b16a396bcc651c73b78d2 | b5a6d0e4c3d84d1a446434b60e55627f017991d7 | /aproximacion_derivada.sce | 7efecee143f19d56289bafe73a449a4b28abffbd | [] | no_license | mayra-diaz/Scilab-Funciones-Matrices | 249cdec506befa4e5e88da9aaf8f6752e401153f | dc89d7dccc7fd22851e6a31867f986cb543b4c50 | refs/heads/master | 2022-12-10T12:50:48.449166 | 2020-09-14T01:10:43 | 2020-09-14T01:10:43 | 259,477,803 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 139 | sce | aproximacion_derivada.sce | // deff('y=g(x)', 'y=1/x')
// Derivada:
// d = numderivative(g, numero)
// p = poly([coef...], 'x', 'c')
// Derivada:
// d = derivat(p)
|
1334df4789f80c1cca24d4a655eac3737a9ecbc5 | e8bcf3f9ffdfb367940fb9ed498b1c598ce92e65 | /champ.sce | 3db2f9bf8966e05f9e5eb779a2237ed393af493d | [] | no_license | yoddha24/Intro-to-Scilab | 1fe25aee3ebd319bc2c9e2cf7c25d7050b09890e | 4c458c1bea6880839ebae07adfd39dea0eac4e2c | refs/heads/master | 2021-01-20T18:24:05.191473 | 2016-08-08T13:45:16 | 2016-08-08T13:45:16 | 65,207,356 | 1 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 267 | sce | champ.sce | // Program to plot using champ function for plotting a vector field
x = linspace(-1,1,10);
y = linspace(-1,1,10);
[X,Y] = meshgrid(x,y);
fy = 3.*Y;
fx = 0.5.*X;
champ(x,y,fx',fy')
xtitle('Using champ function to plot vector field')
xlabel('x')
ylabel('y')
|
c0a8210c5beea53744c0337fad5486d52ab40018 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2175/CH8/EX8.2/8_2.sce | 1fe3e8173c1a3ea5ac19f6f95f160a8bd7062413 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 423 | sce | 8_2.sce | clc;
h1=3442.6;
s1=7.066;
s2=s1;
sf2=0.391;
sfg2=8.13;
x2=(s2-sf2)/sfg2
hf2=112;
hfg2=2438;
h2=hf2+x2*hfg2;
h3=112;
W12_=h1-h2;
Q=h1-h3;
Ceff=(h1-h2)/(h1-h3);
disp(Ceff,"cycle efficiency is:");
ssc=1/(h1-h2);
disp("kg/kW h",ssc,"specific steam consumption is:");
disp("cycle efficiency has increased due to superheating and the improvement in specific steam consumption is even more marked:")
|
6a19fbec3f021905d2b6b79b6401542748f84af1 | 6613f2185ff14cbcc91627ae4073f1e3a69aae60 | /11g_emplu.tst | 60e70a295470ccdc460b76dc8c6f8c53cc6408c4 | [] | no_license | akylKerimbekov/oracle_pl_sql_programming | cdd28df7a98a2331038f5835970e2fbe4e943006 | 573969a17a9ac15751aca2406021424ec3f54c4c | refs/heads/master | 2020-04-29T11:09:23.540999 | 2014-10-10T18:18:58 | 2014-10-10T18:18:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,225 | tst | 11g_emplu.tst | /*
Compare performance of repeated querying of data to
caching in the PGA (packaged collection) and the
new Oracle 11g Result Cache.
To compile and run this test script, you will first need to
run the following script.
Note that to compile the my_session package and display PGA
usage statistics, you will need SELECT authority on:
sys.v_$session
sys.v_$sesstat
sys.v_$statname
Author: Steven Feuerstein
*/
@@plvtmr.pkg
@@mysess.pkg
@@11g_emplu.pkg
@@11g_emplu_compare.sp
SET SERVEROUTPUT ON
BEGIN
test_emplu (100000);
/*
With 100000 iterations:
PGA before tests are run:
session PGA: 2057168
Execute query each time Elapsed: 5.65 seconds. Factored: .00006 seconds.
session PGA: 1139664
Oracle 11g result cache Elapsed: .3 seconds. Factored: 0 seconds.
session PGA: 1139664
Cache table in PGA memory Elapsed: .12 seconds. Factored: 0 seconds.
session PGA: 1336272
*/
END;
/
/*======================================================================
| Supplement to the fifth edition of Oracle PL/SQL Programming by Steven
| Feuerstein with Bill Pribyl, Copyright (c) 1997-2009 O'Reilly Media, Inc.
| To submit corrections or find more code samples visit
| http://oreilly.com/catalog/9780596514464/
*/
|
423c917f5892a58731b2bd52c356f9566682fc71 | 1d7cb1dbfad2558a4145c06cbe3f5fa3fc6d2c08 | /Scilab/BypassCapImpedance/SingleCapImpedance.sce | c1c14566b3cc8034d8fef0f1dd1dd2d067715d95 | [] | no_license | lrayzman/SI-Scripts | 5b5f6a8e4ae19ccff53b8dab7b5773e0acde710d | 9ab161c6deff2a27c9da906e37aa68964fabb036 | refs/heads/master | 2020-09-25T16:23:23.389526 | 2020-02-09T02:13:46 | 2020-02-09T02:13:46 | 66,975,754 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,024 | sce | SingleCapImpedance.sce | // Impedance profile of a single capacitor (simplified LRC model)
// Output being a csv file that can be used to drive SPICE simulations
stacksize(64*1024*1024);
clear; //Clear user variables
//////////////////////////////////////////////////SPECIFY//////////////////////////////////////////////////////
C1 = 100e-9; //Series capacitance
L1 = 1e-9; //Series inductance
R1 = 0.01; //Series resistance
NumOfCaps=2; //Number of parallel caps
FreqRange=1e6:1e6:10e9; //Frequency range
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
C1=C1*NumOfCaps;
L1=L1/NumOfCaps;
R1=R1/NumOfCaps
//Plot single cap
Z_freq=sqrt(R1^2+FreqRange^2*L1^2-2*L1/C1+(FreqRange^2*C1^2)^(-1));
plot2d(FreqRange, Z_freq , logflag="ll", style=5);
|
b2b8456706ea449caef58c3c4713790abef042b7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1076/CH16/EX16.10/16_10.sce | 07bd6e9f30f79a25fe9328d62209d3d038141a41 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 550 | sce | 16_10.sce | clear
clc
I=200
r1=.05
r2=.06
r3=.02
r4=.04
r5=.03
r6=.01
ra=.02
rb=.03
I1=100
I3=30
I4=50
I5=20
//(a)
dv=0
A=[
(ra) (-rb) (r6+r5 +r4+r3)
1 1 0
(ra+r1+r2) (-rb) -(r1+r2)
]
B=[
dv+ (r5*(I5) +r4*(I5+I4)+r3*(I5+I4+I3))
I
dv+(r2*I1)
]
i=inv(A)*B
mprintf("\n(a) Ia = %.0f A, Ib= %.0f A", i(1), i(2))
//(b)
dv=-5
A=[
(ra) (-rb) (r6+r5 +r4+r3)
1 1 0
(ra+r1+r2) (-rb) -(r1+r2)
]
B=[
dv+(r5*(I5) +r4*(I5+I4)+r3*(I5+I4+I3))
I
dv+(r2*I1)
]
i=inv(A)*B
mprintf("\n(b) Ia = %d A, Ib= %d A", i(1), i(2))
|
02f26353e217902598f8a2b73048da2b0997bfd7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2414/CH6/EX6.17/Ex6_17.sce | ce0757a3354fa0816444674fa0a30775fa7e527c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 377 | sce | Ex6_17.sce | clc;
close();
//page no 210
//prob no. 6.17
//All power in Watts
//All voltage in volts
//All current in ampere
R=50;
m=0.5;
P=1125; //for m=0.5
Vrms=sqrt(R*P);
Irms=sqrt(P/R);
disp('A',Irms,'V',Vrms,'(a) For m=0.5, Vrms and Irms are:');
m=1;
P=1500; //For m=1
Vrms=sqrt(R*P);
Irms=sqrt(P/R);
disp('A',Irms,'V',Vrms,'(b) For m=1, Vrms and Irms are:');
|
7088fe8231f1017ef8aa4bc0903156d46885b56d | f4d3c7f7e8954cdeb6eb0c7b54a056242b07da22 | /Uppsala Biomodel/Project1/stochastic_SIR.sce | f2b3593983900593a8c3e412609546553b361f3e | [] | no_license | ThibaultLatrille/Slides-Sciencework | bfdf959dbbe4a94e621a3a9a71ccbcd06c5fc338 | 84b53f3901cbdb10fab930e832dc75431a7dce05 | refs/heads/master | 2020-04-27T07:53:52.313720 | 2019-03-06T16:17:57 | 2019-03-06T16:17:57 | 174,151,758 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 683 | sce | stochastic_SIR.sce | N=100
s=floor(rand()*100)
i=N-s
r=0
mu=0.01
b=0.05
g=0.09
steps=5000
S=zeros(1,steps)
I=zeros(1,steps)
R=zeros(1,steps)
for j=1:steps do
if rand() < mu then
s=s+1, N=N+1;
end,
if rand() <mu then
a=rand()
if a<s/N then
s=s-1;
elseif s/N<a & a<(s+i)/N then
i=i-1;
else r=r-1;
end,
N=N-1
end
if rand() < b*s*i/(N**2) then
s=s-1, i=i+1;
end
if rand() < g*i/N then
i=i-1, r=r+1;
end
S(j)=s;
I(j)=i;
R(j)=r;
end
clf()
plot(1:steps,S,"blue")
plot(1:steps,I,"green")
plot(1:steps,R,"red")
|
9cfa2344a8715e219decc48143d642e8277d9d99 | 23573b967e8324d44226379d70559b8f0ea34905 | /code/intfmincon/Pressure vessel design.sce | 2fe9d00a48bdbbe2c14f1a1a3b24e75f8c632957 | [] | no_license | FOSSEE/FOT_Examples | 91c8b8e9dc58545604b2c2af41a7e22f702b78f3 | 75947a7aa5a3955fe5a72e09f55bbdc05e3b8751 | refs/heads/master | 2020-03-22T09:00:48.306061 | 2018-07-24T04:49:25 | 2018-07-24T04:49:25 | 139,807,736 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,959 | sce | Pressure vessel design.sce | // Reference: E. Sandgren,Nonlinear Integer and Discrete Programming in Mechanical I Design Optimization,Journal of Mechanical Design,JUNE 1990, Vol. 112/223
//A cylindrical pressure vessel is capped at both ends by hemispherical heads.The total cost,
//including the cost of material, cost of forming and welding,is to be minimized. The design variables are Ts and Th are the thicknesses of the shell and head, and R and L, the inner radius and length of the cylindrical section.These variables are denoted by X1 x2 , x3, and x4, respectively, and units for each are inches. The variables are such that R and L are continuous while Ts and Th are integer multiples of 0.0625 inch, the available thicknesses of rolled steel plates.
// Min f = 0.6224*X(1)*X(3)*X(4) + 1.7781*X(2)*X(3)^2 + 3.1661*X(1)^2*X(4) + 19.84*X(1)^2*X(3)
// subject to
// g1(X) - X1 + 0.0193 X3 < = 0
// g2(X) - x2 + 0.00954X3 <= 0
// g3(X) -%pi*X3^2*X4 - (4/3)*%pi*X3^3 + 1296000 <= 0
// g4(X) X4 - 240 <= 0
//======================================================================
// Copyright (C) 2018 - IIT Bombay - FOSSEE
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Author: Remya Kommadath
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
//======================================================================
clc;
// Onjective fucntion
function f = ObjectiveFunction (X)
X(1:2) = X(1:2)*0.0625;
f = 0.6224*X(1)*X(3)*X(4) + 1.7781*X(2)*X(3)^2 + 3.1661*X(1)^2*X(4) + 19.84*X(1)^2*X(3);
endfunction
// Non linear equality and inequality constraints
function [C,Ceq] = NLconstraints(X)
X(1:2) = (X(1:2))*0.0625;
C = -%pi*X(3)^2*X(4) - (4/3)*%pi*X(3)^3 + 1296000;
Ceq = [];
endfunction
// Linear inequality constraints
A = [-0.0625 0 0.0193 0;0 -0.0625 0.00954 0;0 0 0 1];
b = [0 0 240]';
// Bounds of the variables
lb = [1 1 10 10];
ub = [99 99 200 200];
nVar = length(lb);
// Initial guess given to the solver
x0 = [20 10 58.291 43.69];
// indices of the integer decision variables
int = [1 2];
// Calling the solver
[xopt,fopt,exitflag,output,lambda] = intfmincon(ObjectiveFunction,x0,int,A,b,[],[],lb,ub,NLconstraints)
// Result representation
// Converting the integer variables to the discrete variable
x0(1:2) = x0(1:2)*0.0625;
clc;
disp(x0,"Initial guess given to the solver")
select exitflag
case 0
disp("Optimal Solution Found")
disp(xopt',"The optimum solution obtained")
disp(fopt,"The optimum value of the objective function")
case 1
disp("Converged to a point of local infeasibility")
case 2
disp("Objective Function is Continuous Unbounded")
case 3
disp("Limit Exceeded")
case 4
disp("User Interupt")
case 5
disp("MINLP Errors")
end
|
cc58df6cabe05b93d1a09663187f604149c795c2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3784/CH4/EX4.46/Ex4_46.sce | e575169f3d25d4102cd89cd48ac99d68802cc5da | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 523 | sce | Ex4_46.sce | clc
//Variable Initialisation
Ea=230//Input Voltage of motor in volts
d1=0.8//Duty Ratio
d2=0.75//Duty Ratio
Ia1=80//Armature Current in Ampere
Ra=0.25//Armature resistance in ohm
N2=750//Rated Speed of Motor in rpm
N3=600//Rated Speed of Motor in rpm
Ia2=70
Eb2=210//Average Value of Back EMF
//Solution
E01=d1*Ea
Eb1=E01-(Ia1*Ra)
N1=(Eb1/Eb2)*N2
Ia2=86
E02=d2*Ea
Eb3=E02-(Ia2*Ra)
Wm=2*%pi*N3/60
T=Eb3*Ia2/Wm
printf('\n\n Motor Speed=%0.1f rpm\n\n',N1)
printf('\n\n Torque produced=%0.1f N-m\n\n',T)
|
ed9f76f2ae63c9008a55167474c798bc60877ddb | 04236ab1161ec860ab3b1d0c3225fcbdc54923a3 | /2012.d/3-remez.d/algofin_remez.sci | 66b03b4c6efecff955283bc609be8a1399815580 | [
"MIT"
] | permissive | homeostasie/petits-pedestres | 957695cdb8a7823ed2e3fe79f7b441410928cba9 | 557c810e26412bc34ebe063dcd904affe5a27855 | refs/heads/master | 2023-05-31T03:35:13.365160 | 2023-04-26T21:47:56 | 2023-04-26T21:47:56 | 163,504,589 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 834 | sci | algofin_remez.sci | function [X_n]=F_alog_remez(Cprime,X_n)
l=0
if X_n(1)<=Cprime & Cprime<X_n(2)
if sign(fmoinsp(X_n(2))) == sign(fmoinsp(Cprime))
X_n(2)=Cprime
disp('display',10)
else
[X_n]=F_permut(X_n,Cprime,1)
disp('display',20)
end
l=1
end
if l==0
if X_n(n)< Cprime & Cprime <=X_n(n+1)
if sign(fmoinsp(X_n(n))) == sign(fmoinsp(Cprime))
X_n(n)=Cprime
disp('display',30)
else
[X_n]=F_permut(X_n,Cprime,-1)
disp('display',40)
end
l=1
end
end
if l==0
k=3
while (X_n(k)<Cprime)
k=k+1
end
if sign(fmoinsp(X_n(k)))== -sign(fmoinsp(Cprime))
X_n(k-1)=Cprime
disp('display',50)
l=1
else
X_n(k)=Cprime
disp('display',60)
l=1
end
end
endfunction |
df700faf3541a721edd9ce509a77094d165409a4 | 51635684d03e47ebad12b8872ff469b83f36aa52 | /external/gcc-12.1.0/gcc/testsuite/ada/acats/tests/ce/ce3107a.tst | 96646fb71b1907f38877d037fbd57884b881ef42 | [
"LGPL-2.1-only",
"GPL-3.0-only",
"GCC-exception-3.1",
"GPL-2.0-only",
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"FSFAP",
"Zlib",
"LicenseRef-scancode-public-domain"
] | permissive | zhmu/ananas | 8fb48ddfe3582f85ff39184fc7a3c58725fe731a | 30850c1639f03bccbfb2f2b03361792cc8fae52e | refs/heads/master | 2022-06-25T10:44:46.256604 | 2022-06-12T17:04:40 | 2022-06-12T17:04:40 | 30,108,381 | 59 | 8 | Zlib | 2021-09-26T17:30:30 | 2015-01-31T09:44:33 | C | UTF-8 | Scilab | false | false | 4,351 | tst | ce3107a.tst | -- CE3107A.TST
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT IS_OPEN RETURNS THE PROPER VALUES FOR FILES OF
-- TYPE TEXT_IO.
-- HISTORY:
-- DLD 08/10/82
-- SPS 11/09/82
-- JBG 03/24/83
-- EG 05/29/85
-- DWC 08/17/87 SPLIT OUT CASES WHICH DEPEND ON A TEXT FILE
-- BEING CREATED OR SUCCESSFULLY OPENED. PLACED
-- CASES INTO CE3107B.ADA.
-- PWB 03/07/97 ADDED CHECK FOR FILE SUPPORT.
WITH REPORT; USE REPORT;
WITH TEXT_IO; USE TEXT_IO;
PROCEDURE CE3107A IS
TEST_FILE_ZERO : FILE_TYPE;
TEST_FILE_ONE : FILE_TYPE;
TEST_FILE_TWO : FILE_TYPE;
TEST_FILE_THREE : FILE_TYPE;
VAL : BOOLEAN;
INCOMPLETE : EXCEPTION;
BEGIN
TEST("CE3107A", "CHECK THAT IS_OPEN RETURNS THE PROPER " &
"VALUES FOR UNOPENED FILES OF TYPE TEXT_IO");
-- FIRST TEST WHETHER IMPLEMENTATION SUPPORTS TEXT FILES AT ALL
BEGIN
TEXT_IO.CREATE ( TEST_FILE_ZERO,
TEXT_IO.OUT_FILE,
REPORT.LEGAL_FILE_NAME );
EXCEPTION
WHEN TEXT_IO.USE_ERROR | TEXT_IO.NAME_ERROR =>
REPORT.NOT_APPLICABLE
( "TEXT FILES NOT SUPPORTED -- CREATE OUT-FILE" );
RAISE INCOMPLETE;
END;
TEXT_IO.DELETE ( TEST_FILE_ZERO );
-- WHEN FILE IS DECLARED BUT NOT OPEN
VAL := TRUE;
VAL := IS_OPEN(TEST_FILE_ONE);
IF VAL = TRUE THEN
FAILED("FILE NOT OPEN BUT IS_OPEN RETURNS TRUE");
END IF;
-- FOLLOWING UNSUCCESSFUL CREATE
BEGIN
VAL := TRUE;
CREATE(TEST_FILE_TWO, OUT_FILE,
"$ILLEGAL_EXTERNAL_FILE_NAME1");
FAILED("NAME_ERROR NOT RAISED - UNSUCCESSFUL CREATE");
EXCEPTION
WHEN NAME_ERROR =>
VAL := IS_OPEN(TEST_FILE_TWO);
IF VAL = TRUE THEN
FAILED("IS_OPEN GIVES TRUE AFTER AN " &
"UNSUCCESSFUL CREATE");
END IF;
END;
-- FOLLOWING UNSUCCESSFUL OPEN
BEGIN
VAL := FALSE;
OPEN(TEST_FILE_TWO, IN_FILE, LEGAL_FILE_NAME);
FAILED("NAME_ERROR NOT RAISED - " &
"UNSUCCESSFUL OPEN");
EXCEPTION
WHEN NAME_ERROR =>
VAL := IS_OPEN(TEST_FILE_TWO);
IF VAL = TRUE THEN
FAILED("IS_OPEN GIVES TRUE - " &
"UNSUCCESSFUL OPEN");
END IF;
END;
-- CLOSE FILE WHILE NOT OPEN
BEGIN
VAL := TRUE;
CLOSE(TEST_FILE_THREE); -- STATUS ERROR
FAILED("STATUS_ERROR NOT RAISED - UNSUCCESSFUL CLOSE");
EXCEPTION
WHEN OTHERS =>
VAL := IS_OPEN(TEST_FILE_THREE);
IF VAL = TRUE THEN
FAILED("IS_OPEN GIVES TRUE - UNSUCCESSFUL " &
"CLOSE");
END IF;
END;
RESULT;
EXCEPTION
WHEN INCOMPLETE =>
NULL;
REPORT.RESULT;
WHEN OTHERS =>
REPORT.FAILED ( "UNEXPECTED EXCEPTION" );
REPORT.RESULT;
END CE3107A;
|
1b89c97171d1f9d99a5f9ee16065914077edc558 | 449d555969bfd7befe906877abab098c6e63a0e8 | /839/CH4/EX4.1/Example_4_1.sce | fb784fd1e1cbf7708a2bef72821cc054f14692bd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,280 | sce | Example_4_1.sce | //clear//
clear;
clc;
//Example 4.1
// (a)
// density of the fluid
rho = 0.887*62.37;// [lb/ft^3]
// total volumetric flow rate
q = 30*60/7.48; //[ft^3/hr]
// mass flow rate in pipe A and pipe B is same
mdot = rho*q //[lb/hr]
// mass flow rate in each pipe of C is half of the total flow
mdot_C = mdot/2 //[lb/hr]
disp('lb/hr',mdot,'mass flow rate pipe A = ')
disp('lb/hr',mdot,'mass flow rate pipe B = ')
disp('lb/hr',mdot_C,'mass flow rate pipe C = ')
// (b)
// Using Eq.(4.4),
// velocity through pipe A
V_Abar = 240.7/(3600*0.0233) //[ft/s]
// velocity through pipe B
V_Bbar = 240.7/(3600*0.0513) //[ft/s]
// velocity through each pipe of C
V_Cbar = 240.7/(2*3600*0.01414) //[ft/s]
disp('ft/s',V_Abar,'velocity through pipe A = ')
disp('ft/s',V_Bbar,'velocity through pipe B = ')
disp('ft/s',V_Cbar,'velocity through pipe C = ')
// (c)
// Using Eq.(4.8),
// mass velocity through pipe A
GA = mdot/0.0233 // [kg/m^2-s]
// mass velocity through pipe B
GB = mdot/0.0513 //[kg/m^2-s]
// mass velocity through each pipe of C
GC = mdot/(2*0.01414) //[kg/m^2-s]
disp('kg/m^2-s',GA,'mass velocity through pipe A = ')
disp('kg/m^2-s',GB,'mass velocity through pipe B = ')
disp('kg/m^2-s',GC,'mass velocity through pipe C = ')
|
1025b66d76c8dfe5be675df3fd4ccc1339315276 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3841/CH7/EX7.4/Ex7_4.sce | b0d45893abfc2a3ea530ebd0bd9b4652f0c9ef3d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 268 | sce | Ex7_4.sce | clear
//compute brake mean effective pressure
//given
T=350.
D=4**0.25
L=5
M=4
//bmep for 4-cycle engine=192*t
bmep=192*(T/(D**2)*L*M)
//bmep for 2-cycle engine
bmep2=bmep/2
printf("\n \n bmep for 4-cycle %.2f psi",bmep)
printf("\n \n bmep for 2-cycle %.2f psi",bmep)
|
9ef45d4e55e90fa8ad20592b446552fcfddab63e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1073/CH3/EX3.11/3_11.sce | adf37571b8e63329b8a6d43311d2f7a4bd956117 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 466 | sce | 3_11.sce | clc;
clear;
//Example 3.11
mu=1.906*10^-5 //[kg/(m.s)]
k=0.02723 //W/m.K
Cp=1.007 //[kJ/(kg.K)]
rho=1.129 //[kg/cubic m]
Npr=0.70
Mavg=29
u_inf=35 //[m/s]
L=0.75 //[m]
Tm=313 //[K]
P=101.325 //[kPa]
Nre_l=rho*u_inf*L/mu //Reynold's number >5*10^5
Nnu=0.0366*Nre_l^(0.8)*Npr^(1.0/3.0);
h=Nnu*k/L //[W/s m.K]
A=1*L //[sq m]
Tw=333 //[K]
T_inf=293 //[K]
Q=h*A*(Tw-T_inf); //[W]
printf("Heat transfer from the plate is %f W",Q); |
6959bbd9f0d02e579b64804356105580b6874851 | 449d555969bfd7befe906877abab098c6e63a0e8 | /51/CH1/EX2/1_2.sce | 758d7c02a91a89b8abf0e0cdb653cc79c9dee910 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 177 | sce | 1_2.sce | clc;
clear;
exec ("C:\Program Files\scilab-5.3.0\bin\TCP\1.2data.sci");
W=m*9.81;
disp("W=")
disp(W)
//F=W+m*acc
//1 ft= 0.3048 m
F=W+(m*acc*0.3048);
disp("N",F,"F=")
|
e6159e310204026a20a985a4d76d275ad7fbf4d6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1379/CH13/EX13.1.1/example13_1.sce | 10805776a8f2cd7860d22806e412b8fd5ebaf7c7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 487 | sce | example13_1.sce |
//exapple 13.1
clc; funcprot(0);
// Initialization of Variable
rho=998;
g=9.81;
pi=3.1428;
omega=2*pi*1055/60;//angular rotation
r=2.55/100//radius outer
ld=1.55/100;//liq. depth
l=10.25/100;
//calculation
//part1
a=r*omega^2/g;
disp(a,"ratio of cetrifugal force & gravitational force is:");
//part2
ri=r-ld;//radius internal
V=pi*(r^2-ri^2)*l;
sigma=(omega^2*V)/(g*log(r/ri));
disp(sigma,"equivalent to gravity settling tank of crossectional area of in (m^2):")
|
fb00d782ddd1c0c62d0adfbe4e89d7136c3acd68 | 25ec4bae7c1d991a8b4f36a96650a07061417648 | /Exemplos/exemplo05AjusteMotores/datalog2.sce | 3d68a540e1e92488c43c287c5d9c77eb1c079b54 | [] | no_license | OtacilioNeto/EV3MicroPythonExamples | 716f76e4179d98157577d68b116a33a078aed085 | 037af9585402fe294d3c82d3b7d88cb49bc26bcf | refs/heads/master | 2023-06-08T19:34:49.916922 | 2023-06-02T13:24:10 | 2023-06-02T13:24:10 | 226,492,496 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,254 | sce | datalog2.sce | // potencia (%), giro esquerdo (graus/%s), giro direito (graus/%s)
datalog = [
0 0 0;
1 0 0;
2 0 0;
3 8 0;
4 0 0;
5 7 13;
6 27 30;
// 7 0 10;
8 53 43;
9 59 58;
// 10 15 0;
11 72 86;
12 92 91;
13 95 96;
14 99 97;
15 112 111;
16 116 118;
17 116 115;
18 132 131;
19 134 136;
20 142 139;
21 152 154;
22 147 147;
23 167 167;
24 163 164;
25 183 184;
26 179 180;
27 195 197;
28 194 193;
29 208 211;
30 217 214;
31 222 224;
32 262 269;
33 270 271;
34 269 269;
35 294 273;
36 285 280;
37 287 288;
38 291 293;
39 298 300;
40 305 304;
41 307 307;
42 315 314;
43 319 319;
44 327 327;
45 362 364;
46 359 358;
47 361 362;
48 395 396;
49 365 391;
50 412 412;
51 404 405;
52 428 411;
53 429 426;
54 419 420;
55 424 425;
56 429 428;
57 432 434;
58 463 472;
59 456 458;
60 461 464;
61 465 468;
62 502 504;
63 495 497;
64 498 496;
65 498 501;
66 537 534;
67 521 526;
68 529 533;
69 527 531;
70 571 572;
71 556 556;
72 560 563;
73 595 595;
74 580 581;
75 583 585;
76 594 598;
77 608 610;
78 629 644;
// 79 27 461;
80 627 620;
81 649 652;
// 82 30 483;
83 660 661;
84 662 664;
85 670 674;
86 689 688;
87 680 684;
88 688 690;
89 696 700;
90 707 707;
91 717 720;
92 719 723;
93 728 731;
94 729 730;
//95 565 35;
//96 28 617;
97 769 764;
98 763 764;
99 764 769;
100 766 769;
];
|
87da45f82a8f2855dd51a6ec898666f35f2d3c67 | 62e6605ab494919b6833bf1a1b158bcb6f9b79df | /inverse.sci | f6b2decdfe566d2a42d31186aa150280e57df0bd | [] | no_license | mani1250/system-identification | c597c26d10bb5dd62b1b4db650b3945afc336e37 | 5db0536c792dfaa4a8f01561315263503ff34d3d | refs/heads/master | 2021-01-12T06:56:00.703593 | 2017-03-07T12:18:15 | 2017-03-07T12:18:15 | 76,865,655 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 106 | sci | inverse.sci | function X = inverse(y,k)
X = [];
for(i=1:k-1)
X = [X y.^(i-1)]
end
endfunction
|
d0fade3884d52afc0d6d396ee55c01a136235bbe | 449d555969bfd7befe906877abab098c6e63a0e8 | /25/CH5/EX5.5/5_5.sce | ca8cb54572a898a43a1b2aea3787fdc34caae9ea | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 581 | sce | 5_5.sce | //example:-5.5,page no.-226.
//program to determine the reciprccity and lossless of two port network and find return loss.
syms S Rl tao;
S=[0.1 0.8*%i;0.8*%i 0.2]; // s-parameter matrix.
if (S(1,2)==S(2,1))
disp("the network is reciprocal.")
else
disp("the network is not reciprocal.")
end
if (S(1,1)^2+S(1,2)^2==1)
disp("the network is lossless.")
else
disp("the network is lossy.")
end
tao=S(1,1)-(S(1,2)*S(2,1))/(1+S(2,2)); //input reflection coefficient.
Rl=-20*log10(abs(tao)); // return loss in dB.
//result
disp(Rl,'return loss at port 1 in dB=') |
00cb6cb8730018751799bc3166083f0acd32ac4e | 449d555969bfd7befe906877abab098c6e63a0e8 | /965/CH2/EX2.34/34.sci | 6dd6c1fa17e5f07aea589e9dac36e7fa27c032f9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 661 | sci | 34.sci | clc;
clear all;
disp("heat transfer rate")
La=0.22;//m
Lb=0.22;//m
kA=3.5;// W/(m*C)
kB=0.65;// W/(m*C)
thf=1300;// degree C
tcf=40;// degree C
hconvi=16.4;//W/(m^2*C)
hconvo=11.5;//W/(m^2*C)
hradi=17.5;//W/(m^2*C)
hrado=7.2;//W/(m^2*C)
//q= qconvi+qradi=qA+qB=qconvo+qrado
//q=delT/Rtotal=(thf-tcf)/Rtotal
hi=hconvi+hradi;
ho=hconvo+hrado;
Rtotal=1/hi+1/ho+La/kA+Lb/kB;
q=(thf-tcf)/Rtotal;// W
disp("W/m^2",q,"rate of heat transfer through wall are unit area =")
//q=hi*(thf-t1)=(t1-t2)/(La/kA)
t1=thf-q/hi;// degree C
t2=t1-q*(La/kA);// degree C
disp ("degree C",t2,"maximum temperature to which common brick is subjected t2 =")
|
95a1a30bc760582e6331a30c7d379e755471b996 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2465/CH5/EX5.4/Example_4.sce | 9f7f895e603ee63914fda74a8d903e1e413147f4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 224 | sce | Example_4.sce | //Chapter-5,Example 4,Page 123
clc();
close();
t= 30 //time in minutes
a=100
x= 25
k=(2.303/t)*log10(a/(a-x))
t_half=0.693/k
printf('the time of 50 percent completion of reaction is %.2f mins',t_half)
|
f18177ce1234eb0433ba5379bd40643ed57a9b12 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3843/CH7/EX7.6/Ex7_6.sce | fe577761504bd512acfc5192a4d3c65b80ba752c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 833 | sce | Ex7_6.sce | // Example 7_6
clc;funcprot(0);
// Given data
T_1=1000;// K
P_1=0.5;// The inlet pressure in MPa
P_2=0.1;// The exit pressure in MPa
T_0=298;// K
R=0.286;// kJ/kg.K
// Calculation
// From the air tables
phi_1=2.968;// kJ/kg.K
phi_2=phi_1-(R*log(P_1/P_2));// kJ/kg.K
// Thus
T_2=657.5;// K
h_2=667.8;// kJ/kg
h_1=1046.1;// kJ/kg
h_0=298.2;// kJ/kg
V_2=sqrt(2)*((h_1-h_2)*10^3)^(0.5);// m/s
P_0=P_2;// MPa
phi_0=1.695;// kJ/kg.K
X_2=(h_2-h_0)+((V_2)^2/(2*1000))-(T_0*(phi_2-phi_0-(R*log(P_2/P_0))));// kJ/kg
X_1=h_1-h_0-(T_0*(phi_1-phi_0-(R*log(P_1/P_0))));// The availability supplied in kJ/kg
e_II=X_2/X_1;// The second law effectiveness for an ideal isentropic nozzle
printf("\nThe second law effectiveness for an ideal isentropic nozzle,e_II=%1.2f",e_II);
// The answer provided in the textbook is wrong
|
01baa7e0e1993bc638d0d456daeddc062c971dd5 | 8781912fe931b72e88f06cb03f2a6e1e617f37fe | /scilab/solar-coupling1/generalhl_shootingmethod/shootall_120_3200.sci | ad4eda939e848ff1e4c6fbcab786bbccbf986e32 | [] | no_license | mikeg2105/matlab-old | fe216267968984e9fb0a0bdc4b9ab5a7dd6e306e | eac168097f9060b4787ee17e3a97f2099f8182c1 | refs/heads/master | 2021-05-01T07:58:19.274277 | 2018-02-11T22:09:18 | 2018-02-11T22:09:18 | 121,167,118 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,846 | sci | shootall_120_3200.sci |
exec('myfunc.sci');
//y=ode("rk",y0,t0,t,f)
//initial condition at r=0
//chidashi
//chii
//final condition at tub wal r=R (tube radius)
//chidashf
//chif
n=120;
tchi(1:n)=zeros(n);
tpi(1:n)=zeros(n);
rw(1:4)=zeros(4);
dchi(1:4)=zeros(4);
dpi(1:4)=zeros(4);
delta=0.01;
rtube=4.2e6; //4.2Mm 4.2e6
params.m=1;
params.k=0.8e-6;
params.om=5e-4; //s^-1rad
params.p=2.4e4;
params.rpi=1e-6; //Uuse initial bc
params.rchi=1e-6; //use initial bc
params.b0=1.0e4;
params.a=rtube;
params.b=1.1*rtube;
params.beta=2*params.p/(params.b0^2);
params.mu1hat=mu1(params);
tchi(1)=params.rchi;
tpi(1)=params.rpi;
maxits=3200;
//oma=.00115;
//omb=.00118;
oma=0.00001;
omb=0.2;
ka=1.0e-10;
kb=5.0e-6;
nkval=60;
params.om=oma;
deltaom=(omb-oma)/10;
chiopia= -%inf ;
chiopib= %inf;
h=(rtube)/n;
for ki=1:nkval
params.k=ka+ki*(kb-ka)/nkval;
kval(ki)=params.k;
soln=pionchi(params,params.m,params.k);
fx=10*soln;
nits(ki)=0;
tol=0.000001;
while abs(soln-fx)>=tol
//while abs(omb-oma)>(%eps*omb)
//for iom=1:10
//params.om=(oma+omb)/2;
oldom=params.om;
params.om=params.om+deltaom;
for i=2:n
rt=(i-1)*h;
for j=1:4
rrt=rt+rw(j).*h;
dchi(j)=h*myfuncchi(params,tchi(i-1),tpi(i-1),rrt);
dpi(j)=h*myfuncpi(params,tchi(i-1),tpi(i-1),rrt);
end
tpi(i)=tpi(i-1)+(dpi(1)+dpi(4)+2*(dpi(2)+dpi(3)))/6.0;
tchi(i)=tchi(i-1)+(dchi(1)+dchi(4)+2*(dchi(2)+dchi(3)))/6.0;
params.rpi=tpi(i);
params.rchi=tchi(i);
end
nits(ki)=nits(ki)+1;
fx=params.rpi/params.rchi;
if fx>soln then
params.om=oldom;
deltaom=deltaom/2;
else
deltaom=deltaom*2;
end
omval(ki)=params.om;
// disp(params.om);
// disp( params.rpi/params.rchi);
// disp(soln);
// disp('next');
if nits(ki)>maxits then
tol=%inf;
end
solnval(ki)=soln;
fxval(ki)=fx;
end //while loop
//disp(params.om);
//disp(params.k);
//disp(nits(ki));
//disp(soln);
//disp(fx);
//disp('next');
save('m_1_120_3200its.mat',nits,omval,kval,solnval,fxval);
end // loop over kvalues
|
bc8e5d91dbde2741bace1a35a8198a9c87f1f371 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2969/CH4/EX4.20/Ex4_20.sce | 568cdb387cbb03fec02186aef1d07bcadcfcf659 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 549 | sce | Ex4_20.sce | clc
clear
//DATA GIVEN
m=1; //mass of wet steam in kg
p=6; //pressure of steam in bar
x=0.8; //dryness fraction
//At 6 bar, from steam tables
Ts=158.8+273; //in K
hfg=2085; //kJ/kg
swet=4.18*log(Ts/273)+x*hfg/Ts; //entropy of wet steam in kJ/kgK
printf('The Entropy of wet steam is: %1.4f kJ/kgK.',swet);
//NOTE;
//the exact ans is 5.7794, while in TB it is given as 5.7865 kJ/kgK
|
d974715fe30d73dd3e22d4a38608a1d7ed2a7f17 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2951/CH8/EX8.8.A/additional_ex_8.sce | fa68d39b7a598b371253664e527a860377b37677 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 300 | sce | additional_ex_8.sce | clc;
clear;
P0=2/3; //P(X=0)
P1=2/3; //P(Y=0)
H_x=0.919;
H_y=0.919;
H_b=0.919; //Hb(2/3)
//since X,Y pair is uniformly distributed on three values
H_xy=log2(3); // H(X,Y)
H_xdivy=H_xy-H_y; //H(X/Y)=H(X,Y)-H(Y)
I_xdivy=H_x-H_xdivy; //I(X,Y)=H(X)-H(X/Y)
disp(I_xdivy,"I(X,Y)=");
|
e49d848eae978890910538d64f48bed02f93abfc | 449d555969bfd7befe906877abab098c6e63a0e8 | /1415/CH1/EX1.2.2/ex2.sce | d2daea230e36ab9810a057e00ee80fcb875daef2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,069 | sce | ex2.sce | //Example 2 Page 59
clc
clear
//creating C(x) function
function y=C(x)
y=100000+160*x-0.2*x^2
endfunction
//the variable cost is the part of the cost function that depends on x
VariableCost=poly([0 160 -0.2],'x','c')//variablecost polynomial
disp(VariableCost,'VariableCost in dollars=')
FixedCost=100000
disp(FixedCost,'FixedCost in dollars=')
x=poly(0,'x')//x polynomial creation
Rx=800*x//annual revence of x members
//for the profit we use the formula
Px=Rx-C(x)//displaying the P(x) value by subtracting C(x) from Rx
disp('P(x)=R(x)-C(x)')
disp(Px)
r=roots(Px)//finding the roots of the quadratic equation obtained in P(x)
disp(r)
disp('since members cannot be in negative value we consider the positive value')
x=[0 250]//taking random variables of x for graph
y=C(x)//function calling
plot(400,350000,x,y,'red')//plotting graph
//creating the P(x) function
function y=P(x)
y=-100000+640*x+0.2*x^2
endfunction
x=([0 150 350])//taking values of x for graph
y=P(x)
plot(x,y,'blue')//plotting graph
xtitle(' ','x','y');
|
3939256a28cdc366c9a9dfc5c70cbf97e8b4c39e | ca0ea3139875f786caa2df8ef9ada885b326dd6f | /scilab/trabalho7.sce | a1e788dccdddb2c33a306351e24966b2f4edf9c0 | [] | no_license | hitokey/exemplo-machine-learning | f0186a4e7acced7de16af6c96f3337129159225b | 2635ef2c88765b58267691a45a4b53f8d7207f2d | refs/heads/master | 2023-03-13T15:43:34.970552 | 2021-03-06T07:57:25 | 2021-03-06T07:57:25 | 289,837,645 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 5,047 | sce | trabalho7.sce |
clear;
clc;
csv = csvRead("observacoes.csv",' ')
pontos = [3.6118 2.9033
1.7140 1.7016
2.6102 2.3943
3.5217 1.1030
2.1144 2.8743
3.1330 3.4240
5.3695 2.6703
2.8835 2.4096
4.6215 2.9022
5.0193 2.8179
3.1008 3.2167
2.3034 1.4748
3.6472 2.6745
4.6394 5.2640
2.8566 4.1702
3.8175 2.6147
2.2934 4.2012
2.5310 3.7031
3.7229 1.8605
3.5397 3.8148
2.6236 1.3864
3.1297 4.0862
5.3783 2.5705
2.6732 2.0909
2.3348 2.4896
2.7638 2.3800
0.6342 3.4446
3.3705 3.2042
3.2886 3.5406
3.3370 4.8267
3.4636 3.6535
3.4020 2.5565
4.4431 3.9920
1.6055 3.6936
2.4774 3.3368
0.7867 0.8749
2.6352 4.1560
3.2858 1.5949
3.7392 2.8120
2.3117 1.1348
4.1271 2.7336
2.8331 3.8487
3.9682 2.8423
3.1162 3.6531
4.0666 1.4985
2.8107 3.5702
4.6343 2.2260
3.8566 2.9034
-0.5429 2.3434
3.7257 2.1756
7.3158 6.8513
4.4364 4.9454
7.2912 6.0339
7.2389 6.2518
6.4749 5.5465
6.2102 6.4830
7.6684 5.1612
3.9020 3.6581
6.3501 3.3559
6.5372 6.3260
6.9188 5.6233
4.2438 7.6421
5.0076 5.1970
7.5322 6.7750
4.8007 5.6805
7.0233 5.7450
6.1705 5.9890
7.1068 6.6353
5.8883 5.3207
5.9186 5.9272
4.8481 5.9914
5.2151 4.5259
5.0553 6.1791
5.9917 8.0680
5.7569 6.0470
5.7304 6.3432
5.6364 6.1037
4.9605 4.8067
6.2229 5.5165
6.5714 6.2241
7.6794 6.6357
6.6964 5.5870
7.9882 8.0092
6.1868 5.3676
6.2800 4.2854
4.7845 7.8715
5.6212 6.2646
6.7731 5.7555
5.6720 6.0163
5.2168 7.6996
7.3287 6.4373
5.1401 7.2426
6.6416 4.6958
5.8749 5.7205
6.4459 6.1071
6.3143 6.4245
7.0774 6.2737
6.2029 5.5610
4.8296 7.3827
3.7052 6.7945
1.7929 6.7778
4.2065 5.2426
3.5766 6.1978
4.2324 6.6047
1.4872 4.6725
4.4523 4.9796
1.5541 5.5445
3.0522 6.1081
3.4205 6.9626
3.8244 7.1447
3.7479 6.7558
3.3164 4.3651
2.7089 6.2450
2.2006 4.6953
2.7406 5.2457
1.6868 4.9766
1.7925 8.1089
2.2501 8.2444
2.2835 5.9420
1.4198 7.3276
4.2358 4.2813
1.9965 9.3107
4.0336 5.5681
4.3984 5.8426
2.3934 6.7423
3.4478 7.4134
2.7141 8.3087
2.3565 5.3853
2.7511 6.8783
4.7119 6.0405
3.7889 5.5342
2.1840 6.0321
3.3701 5.3050
3.0671 5.7734
2.9267 7.3887
3.5408 6.8923
2.3032 5.2765
2.5115 7.5541
3.0926 6.4991
4.0144 5.2921
1.8681 6.1830
3.3216 6.5363
3.1158 6.0099
2.8416 5.6921
2.9440 8.9717
4.1624 5.5926
3.5246 6.8471
2.2795 5.1525
2.5550 6.2115
3.9852 6.3222
5.7991 3.7095
5.8397 2.6598
4.6287 5.1226
5.5106 2.9931
7.5461 2.5471
4.8117 4.0446
6.3646 2.9572
5.8535 1.5515
7.8161 1.9857
7.4761 2.9690
7.9240 2.1706
4.2917 3.2975
5.8123 2.0199
5.9155 3.2743
5.3924 4.1475
4.0223 3.0908
7.1925 3.8504
6.6647 2.5534
4.9922 3.6519
5.9101 3.7208
5.8788 2.4348
6.9995 3.0777
6.3702 3.2633
7.2753 3.1483
6.4220 2.5780
3.9440 2.8523
9.4274 5.2018
4.3413 4.8142
7.5378 3.4213
6.8213 3.3570
6.1389 2.9317
6.1057 2.6351
5.7291 4.3498
6.5174 3.4393
6.4982 3.7073
6.0232 3.0007
5.7020 3.1841
5.9035 3.0020
5.2193 4.0240
7.1192 2.0947
6.8281 2.3275
5.3324 1.2517
6.2047 3.7529
6.4696 2.8792
3.9511 1.1018
6.1152 1.4202
7.8509 3.2019
6.0825 3.3396
6.4342 3.5129
6.4441 2.6522 ]
clf();
xlabel('x');
ylabel('y');
plot(pontos(:,1),pontos(:,2),'r*');
k = input("k-means: ")
b=zeros(200,1);
bnovo=ones(200,1);
numcentroides=2
for j=1:k
cluster(j,:)=pontos(round(200*rand(1,1,'uniform')),:);
end
xlabel('Ciclos');
ylabel('Disp.');
cor = input("INPUT COR: ")
iteracao=0;
while ~isequal(b, bnovo) && (iteracao<1000)
b=bnovo;
iteracao=iteracao+1;
disp(iteracao);
for entrada=1:200
maisproximo=1000;
for j=1:k
distancia=sqrt((cluster(j,1)-pontos(entrada,1))^2 + (cluster(j,2)-pontos(entrada,2))^2);
disp(distancia);
if distancia<maisproximo
maisproximo=distancia;
centroide_maisproximo=j;
end
bnovo(entrada)=centroide_maisproximo;
end
end
for j=1:k
soma=[0 0];
elementos=0;
for entrada=1:200
if b(entrada)==j
soma=soma+pontos(entrada,:)
elementos=elementos+1;
end
end
if elementos ~=0
cluster(j,:)=soma/elementos;
end
end
plot(iteracao,distancia,cor');
end
timestep = input("Precione qualquer tecla.");
for entrada=1:200
if bnovo(entrada)==1
plot(pontos(entrada, 1), pontos(entrada,2), 'k*');
elseif bnovo(entrada)==2
plot(pontos(entrada, 1), pontos(entrada,2), 'r*');
elseif bnovo(entrada)==3
plot(pontos(entrada, 1), pontos(entrada,2), 'b*');
else
bnovo(entrada)==4
plot(pontos(entrada, 1), pontos(entrada,2), 'm*');
end
end
xlabel('x');
ylabel('y');
ts = input("Precione qualquer tecla.")
for j=1:k
plot(cluster(j,1),cluster(j,2), 'g+');
end
|
e6f506d7baf67a720804a533f5ca7c17b451db67 | 449d555969bfd7befe906877abab098c6e63a0e8 | /409/CH2/EX2.7/Example2_7.sce | d51e030afd5d17ea83cc6e24289c539f79adc025 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 361 | sce | Example2_7.sce | clear ;
clc;
// Example 2.7
printf('Example 2.7\n\n');
//Page no.58
// Solution
// Basis 500 L solution containing 35g/L
// (NH4)2SO4 is the only nitrogen source
cn = 35 ;//[g/L]
wt = 9 ;//[wt % N]
m_wt1 = 132 ;//[g]
m_wt2 = 14 ;//[g]
amt = (500*(35)*.09*1*1*m_wt1)/(1*m_wt2*1*1);
printf('Total amount of (NH4)2SO4 consumed is %.1f g.',amt); |
7e5b3ea9dcc015b4fbba7eb511e3b718acabda0f | 1341c21c7030fe752bcfc96a6b72967872afd0ee | /solvers/IncNavierStokesSolver/Tests/KovaFlow_3DH1D_adaptive_16modes_FFTW_Mapping.tst | 69195ea37349870fc6b06fa5b2600bb8c8611b3d | [] | no_license | siddarthc/nektar_INSTransport | 41ecfd1d9f64245c6b8fd2c568ac8667294e4f8d | c65f90de710b04a994482739ab9eccd2102faca7 | refs/heads/master | 2016-09-13T14:50:36.516189 | 2016-05-16T20:13:29 | 2016-05-16T20:13:29 | 58,153,506 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,096 | tst | KovaFlow_3DH1D_adaptive_16modes_FFTW_Mapping.tst | <?xml version="1.0" encoding="utf-8"?>
<test>
<description>Kovasznay Flow 3D homogeneous 1D, adaptive P, 16 Fourier modes, using explicit mapping</description>
<executable>IncNavierStokesSolver</executable>
<parameters>KovaFlow_3DH1D_adaptive_16modes_FFTW_Mapping.xml</parameters>
<files>
<file description="Session File">KovaFlow_3DH1D_adaptive_16modes_FFTW_Mapping.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-9">4.33062e-05</value>
<value variable="v" tolerance="1e-9">1.16121e-05</value>
<value variable="w" tolerance="1e-9">1.29819e-05</value>
<value variable="p" tolerance="1e-9">0.000260747</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-9">8.96493e-05</value>
<value variable="v" tolerance="1e-9">2.47788e-05</value>
<value variable="w" tolerance="1e-9">2.85904e-05</value>
<value variable="p" tolerance="1e-9">0.000805358</value>
</metric>
</metrics>
</test>
|
a39acc6695b40bff5ebb324807b0416d5e975f26 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3428/CH10/EX5.10.8/Ex5_10_8.sce | 4922ab0a8118a506861ca9309c6442d82e671891 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 441 | sce | Ex5_10_8.sce | //Section-5,Example-1,Page no.-D.11
//To show that the given reaction is a 2nd order reaction and calculate the fraction of ester decomposed in 30 minutes.
clc;
k_5=(1/5)*((1/10.2)-(1/16))
kbar_5=k_5*10^2
k_25=(1/25)*((1/4.3)-(1/16))
kbar_25=k_25*10^2
k_55=(1/55)*((1/2.3)-(1/16))
kbar_55=k_55*10^2
k_120=(1/120)*((1/1.1)-(1/16))
kbar_120=k_120*10^2
//Constant value of kbar shows that the given reaction is a 2nd order reaction
|
74a145dc8a0d360f9e9e7a128e5961c0668b0816 | 006a2b1bdbcab37127ae402052015521febc527b | /elitism.sci | 3954ed2cb2c9cd777aebd9e941aa0949009f4a05 | [] | no_license | andrerodrig/GeneticAlgorithms | 55f3bdfb8e17f05539136861c1c7af17a59d6262 | bc4724584788893b4cd0780d0b2f79b0455940cd | refs/heads/main | 2023-03-31T20:02:17.147452 | 2021-04-03T17:55:48 | 2021-04-03T17:55:48 | 354,190,959 | 1 | 0 | null | 2021-04-03T17:55:49 | 2021-04-03T03:35:48 | Scilab | UTF-8 | Scilab | false | false | 722 | sci | elitism.sci | function [new_generation, new_eval] = elitism(parent_pop, descend_pop, parent_eval, descend_eval, percentage)
[prows, pcols] = size(parent_pop);
new_pop = zeros(prows, pcols);
new_evaluated_pop = zeros(prows, 1);
[psorted_eval, pindex] = gsort(parent_eval);
[dsorted_eval, dindex] = gsort(descend_eval);
new_prows = ceil(percentage*prows)
new_pop(1:new_prows,:) = parent_pop(1:new_prows,:);
new_evaluated_pop(1:new_prows,:) = parent_eval(1:new_prows,:);
new_pop((new_prows + 1):$,:) = descend_pop(1:(prows - new_prows),:);
new_evaluated_pop((new_prows + 1):$,:) = descend_eval(1:(prows - new_prows),:)
new_generation = new_pop;
new_eval = new_evaluated_pop;
endfunction |
e0c657fa336974e90405a888ceb1733ebe97c4a7 | 91bba043768342a4e23ee3a4ff1aa52fe67f7826 | /cs/142/4/tests/test30.tst | 351eb0c47d18ee1f96018338a7b9db9861dc1528 | [] | no_license | MaxNanasy/old-homework | 6beecc3881c953c93b847f1d0d93a64ec991d6de | 48b7997a49a8f111344f30787c178e1661db04bd | refs/heads/master | 2016-09-08T04:37:44.932977 | 2010-03-02T00:48:59 | 2010-03-02T00:48:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 199 | tst | test30.tst | type newType = short;
var b : int;
void sym1() {
type newType = int;
var a : newType;
const c = 11;
b = c;
a = b + c;
}
main()
{
var a : newType;
const c = 11;
b = c;
a = b + 1;
}
|
d345f4c87c978cb8e933b039ba3bd89e0097dd4f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3446/CH17/EX17.15/Ex17_15.sce | 929600291267314f849d8a73ee453a48dc8ebba3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,288 | sce | Ex17_15.sce | // Exa 17.15
// To calculate No of RNC required.
clc;
clear all;
BTS=800;//No of BTS sites
Sec=3;//No of sectors per BTS
freq_sec=2;//No of frequencies used per sector
cellsRNC=1152;//Maximum capacity of cellRNC
btsRNC=384;//One RNC can support btsRNC(BTSs)
VE=25;//Voice service(mErl/subscriber)
BRV=16;// bitrate Voice
CS1=10;//CS data service 1(mErl/subscriber)
BRC1=32;//bit rate for CS1 in kbps
CS2=5;//CS data service 2(mErl/subscriber)
BRC2=64;////bit rate for CS2 in kbps
PSdata=0.2;//PS data service(kbps per subscriber)
PSoverhead=0.15;
SHO=0.4;//40%
Totalsub=350000;//Total subsribers
Maxcap=196;//Maximum Iub capacity of tpRNC (in Mbps)
FR1=0.9;FR2=0.9;FR3=0.9;//Filler rates
//solution
RNCreqd=(BTS*Sec*freq_sec)/(cellsRNC*FR1);//from eqn 17.28
printf('using equation 17.28,Number of RNC required are %d \n ',round(RNCreqd));
RNC_reqd=BTS/(btsRNC*FR2);//from eqn 17.29
printf('using equation 17.29,Number of RNC required are %d \n ',round(RNC_reqd));
RNCrequired=((VE/1000*BRV+CS1/1000*BRC1+CS2/1000*BRC2+(PSdata/(1-PSoverhead)))*(1+SHO)*Totalsub)/(Maxcap*1000*FR3);//from eqn 17.30
printf('using equation 17.30,Number of RNC required are %d \n ',round(RNCrequired));
printf(' We select first value which is %d RNCs \n ',round(RNCreqd));
|
cdc53f0c8f3d1ea0a33729291d8a3d0c3a4fef8c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1922/CH8/EX8.7/8_7.sce | 696a760d00dea3a238f205c0d28ee59a7dd6e398 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 234 | sce | 8_7.sce | clc
clear
//Initialization of variables
m1=121
m2=18
p1=0.0042
p2=0.0858
//calculations
massfrac= (p1*m1)/(p1*m1+p2*m2)
//results
printf("mass fractions of DMA and water are %.3f and %.3f respectively",massfrac,1-massfrac)
|
71082bd57f736359796fa8379c1866bed93f6783 | c90039f74887835096a93884110d643c4823e530 | /doc/oficial/dados para treinamento RNA/RNA_ANALISE_TECNICA/Indicador/Momento/IFR/RNA_IFR.sce | aa6c978b4ef1711e35a0acd6d83af010c0930257 | [] | no_license | igorlima/CellInvest | da991366b329b5d8021e9b949d7b726023489ec8 | c5411247e504b8a8d0ad77d32d41bbd2aee39930 | refs/heads/master | 2020-04-06T03:40:05.614164 | 2012-10-23T12:58:20 | 2012-10-23T12:58:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 241 | sce | RNA_IFR.sce | path_rna_ifr = get_absolute_file_path('RNA_IFR.sce');
N_IFR = getN( path_rna_ifr + "\N_IFR.txt" );
W_IFR = getW( path_rna_ifr, "IFR" );
function saida_da_rna = rna_ifr( ifr )
saida_da_rna = ann_FF_run( [ifr], N_IFR, W_IFR );
endfunction
|
44d1d336362b6b3589d9f33695030e15d91cc7df | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH23/EX23.20/Ex23_20.sce | 198efd6e719f8354c4631344db3742f861c5f30a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 252 | sce | Ex23_20.sce | clear
//Given
l=1.4*10**-10 //m
h=6.63*10**-34
l1=2.0*10**-10
c=3*10**8 //m/s
//Calculation
E=h*c*(1/l-1/l1)
//Result
printf("\n Energy of the scattered electron is %0.2f *10**-16 J",E*10**16)
|
63a2d0e1eae67f0dcd4c4c6b373ebe1bef55e9c5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /135/CH10/EX10.7/EX7.sce | da9728d66f63f2ab0f31381c413525f286760eac | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 977 | sce | EX7.sce | // Example 10.7: (a) Midband gain, Upper half-power frequency
// (b) Zi
clc, clear
ICQ=1e-3; // in amperes
RS=300; // in ohms
RC=1.2e3; // in ohms
bta=125;
fT=300e6; // in hertz
C_mu=0.5e-12; // in farads
VT=25e-3; // Voltage equivalent to temperatue at room temperature in volts
disp("Part (a)");
gm=ICQ/VT; // in mho
r_pi=bta/gm; // in ohms
// To find C_pi
C_pi=gm/(2*%pi*fT)-C_mu; // in farads
AVo=-bta*RC/(RS+r_pi); // Midband gain
disp(AVo,"Midband gain =");
R_pi0=RS*r_pi/(RS+r_pi);
a1=R_pi0*C_pi+(R_pi0+RC*(1+gm*R_pi0))*C_mu; // in seconds
a2=R_pi0*RC*C_pi*C_mu; // in seconds
p1=1/a1; // in rad/sec
p2=a1/a2; // in rad/sec
disp(p2/p1,"p2/p1 =");
disp("Since p2/p1 >> 8, therefore dominant-pole approximation holds good.");
wH=p1*1e-6; // in M rad/sec
disp(wH,"Upper half-power frequency (M rad/sec) =");
disp("Part (b)");
CM=C_pi+C_mu*(1+gm*RC); // in farads
Zi=r_pi/(1+%i*wH*1e6*CM*r_pi); // in ohms
disp(Zi,"Zi (Ω) ="); |
0d60a509d8bc2e6509ec151ff6d1b18ad319bbbc | 449d555969bfd7befe906877abab098c6e63a0e8 | /2048/CH9/EX9.21/motor_pd.sce | 8408bc3d057e034df7e156b9e3e352481673d133 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,769 | sce | motor_pd.sce | // DC motor with PID control, tuned through pole placement technique, as in Example 9.18.
// 9.21
exec('desired.sci',-1);
exec('pp_pid.sci',-1);
exec('cosfil_ip.sci',-1);
exec('pd.sci',-1);
exec('polyno.sci',-1);
exec('myc2d.sci',-1);
exec('zpowk.sci',-1);
exec('polmul.sci',-1);
exec('polsize.sci',-1);
exec('xdync.sci',-1);
exec('rowjoin.sci',-1);
exec('left_prm.sci',-1);
exec('t1calc.sci',-1);
exec('indep.sci',-1);
exec('seshft.sci',-1);
exec('makezero.sci',-1);
exec('move_sci.sci',-1);
exec('colsplit.sci',-1);
exec('clcoef.sci',-1);
exec('cindep.sci',-1);
// Motor control problem
// Transfer function
a = [-1 0; 1 0]; b = [1; 0]; c = [0 1]; d = 0;
G = syslin('c',a,b,c,d); Ts = 0.25;
[B,A,k] = myc2d(G,Ts);
[Ds,num,den] = ss2tf(G);
// Transient specifications
rise = 3; epsilon = 0.05;
phi = desired(Ts,rise,epsilon);
// Controller design
Delta = 1; //No internal model of step used
[Rc,Sc] = pp_pid(B,A,k,phi,Delta);
// continuous time controller
[K,taud,N] = pd(Rc,Sc,Ts);
numb = K*[1 taud*(1+1/N)]; denb = [1 taud/N];
numf = 1; denf = 1;
// simulation parameters
st = 1; // desired change in position
t_init = 0; // simulation start time
t_final = 20; // simulation end time
st1 = 0;
// continuous controller simulation: g_s_cl3.xcos
num1 = 0; den1 = 1;
// discrete controller simulation: g_s_cl2.xcos
// u1: -0.1 to 0.8
// y1: 0 to 1.4
C = 0; D = 1; N = 1; gamm = 1; Tc = Sc;
[Tcp1,Tcp2] = cosfil_ip(Tc,1); // Tc/1
[Np,Rcp] = cosfil_ip(N,Rc); // N/Rc
[Scp1,Scp2] = cosfil_ip(Sc,1); // Sc/1
[Cp,Dp] = cosfil_ip(C,D); // C/D
Numb = polyno(numb,'s');
Denb = polyno(denb,'s');
Numf = polyno(numf,'s');
Denf = polyno(denf,'s');
Num1 = polyno(num1,'s');
Den1 = polyno(den1,'s');
|
7207eecc03ebcec5d888f97b4bc3d04366b8d9d5 | 76cd50cd5e5d8e4afa2af9b79740e2cff65ab2c8 | /newtondd.sce | b1358d179fd1c91ed530d34b8cfc4e4cb7e5dee7 | [] | no_license | ankitparekh21698/Numerical-Techniques-Lab | 60de11c65db0be65acc14a055cb5b57ca3158e26 | c3ba81f085f22dab8a3f93e6f86ea956a886e410 | refs/heads/master | 2022-12-17T21:32:04.681008 | 2020-09-10T16:07:17 | 2020-09-10T16:07:17 | 280,810,961 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 634 | sce | newtondd.sce | clc()
n=input("Enter the no. of terms:");
for a=1:n
M(a)=input("Enter value of x"+string(a)+" :");
end
for b=1:n
N(b)=input("Enter value of y"+string(b)+" :");
end
X=input("Enter the value of X ");
for o=1:n
for p=1:n
DD(o,p)=0;
end
end
p=1;
for k=1:n
DD(1,k)=N(k);
end
for j=2:n
for i = 1:n+1-j
DD(j,i)=(DD(j-1,i+1)-DD(j-1,i))/(M(i+j-1)-M(i));
end
end
disp("The Divided differences Table is");
disp(DD);
Ans=DD(1,1);
p=X-M(1);
for q=2:n
Ans=Ans+(p*DD(q,1));
p=p*(X-M(q));
end
disp("The value of corresponding Y for the given X is :");
disp(Ans);
|
50f7b8cad025654bf836f54c04e71b0d79a4f92c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2579/CH5/EX5.1/Ex5_1.sce | 74c63c65345bbec419deef258725d4bfe19b4dcf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 619 | sce | Ex5_1.sce | //Ex:5.1
clc;
clear;
close;
ht=100;// transmitter height in m
hr=9;// receiver height in m
D=3550*(sqrt(ht)+sqrt(hr));// distance to horizon in m
f=60;// frequency in MHz
y=300/f;// wavelength in m
p=10*1000;// power in watt
d=10*1000;// distance in m
h=5;
Et=(88*sqrt(p)*hr*ht)/(h*d^2);// the field strength in V/m
et=10^-3;// field strength in V/m
d2=(88*sqrt(p)*hr*ht)/(h*et);
d1=sqrt(d2);// distance at which the field strength reuces to 1 mV/meter
printf("The field strength = %f mV/m", Et*1000);
printf("\n The distance at which the field strength reuces to 1 mV/meter = %f*10^3 meter", d1/1000); |
72f11544ad01b885b1c94b892851cfd6e468e660 | c5dca1e85a0756295bfe253a855ee4653da5a6ce | /U1/flutuante.sci | 72a57dcf929056510be9a355d7249b6b563bc1d3 | [
"MIT"
] | permissive | JohnVict0r/ComputacaoNumerica | 084e201a67fbbb6e069551c20df85ea5855c8f9f | 1da95936f625eafb217880cf24a6ae9b213a05b0 | refs/heads/master | 2020-03-25T07:43:39.947459 | 2018-08-13T13:13:54 | 2018-08-13T13:13:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 965 | sci | flutuante.sci | function f = flutuante(v,b,e,m,M)
f = 0
cont=0
decimal=0
if b ==2
while (v~=0)
if (v>1)&(decimal==0)
rd=modulo(v,2)
f = f+(rd*(10^cont))
v=int(v/2)
cont=cont +1
else
decimal=1
if v>0
cont=cont-1
v=v*2
if (int(v)==1)
f=f+(1*10^(cont))
v=v-1
end
end
if abs(cont)==e
v=0
end
end
end
end
endfunction
|
67390d9e49b99c1394ac2894f5cc168611b6e7c4 | e0124ace5e8cdd9581e74c4e29f58b56f7f97611 | /3913/CH12/EX12.8/Ex12_8.sce | 8a95bbd39ddf6c86dcf711e778d1d095df2c9d4c | [] | no_license | psinalkar1988/Scilab-TBC-Uploads-1 | 159b750ddf97aad1119598b124c8ea6508966e40 | ae4c2ff8cbc3acc5033a9904425bc362472e09a3 | refs/heads/master | 2021-09-25T22:44:08.781062 | 2018-10-26T06:57:45 | 2018-10-26T06:57:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 264 | sce | Ex12_8.sce | //Chapter 12 : Solutions to the Exercises
//Scilab 6.0.1
//Windows 10
clear;
clc;
//Solution for 1.14
//(a)
mat_prod=[1;2;3;4;]*[1 2 3 4]
disp(mat_prod,'(a)Matrix product=')
//(b)
mat_prod=[1 2 3 4]*[1;2;3;4;]
disp(mat_prod,'(b)Matrix product=')
|
39828126c4fb5e7fc67c947f911da46f73154904 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2072/CH21/EX21.2/Ex21_2.sce | f8dc2b6a8596ab75122a17dfae9a59c81b550814 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 120 | sce | Ex21_2.sce | //Example 21.2
clc;
C=8*10^-6
X_c=1/(377*C)
disp(X_c,"Resistance in ohm=")
I_rms=150/X_c
disp(I_rms,"Current in Amps=")
|
ee1bbf47b50bf7a8e6ce7acd35309ebc8171cf14 | 449d555969bfd7befe906877abab098c6e63a0e8 | /965/CH4/EX4.10/10.sci | ee6e65c77ecf688b124028c64971560ceb4bfa89 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 396 | sci | 10.sci | clc;
clear all;
disp("temperature and time")
R=40/2000;//m
ti=20;// degree C
tau=4*60;//s
ta=100;// degree C
k=10;// W/m.C
rho=1200;// kg/m^3
c=2000;// J/kg.C
h=100;//W/m^2.C
Lc=R/3;// for sphere
Bi=h*Lc/k
t=ta+(ti-ta)*exp(-h*3*tau/(R*rho*c))
disp("degree C")
ti=5;// degree C
X=(t-ta)/(ti-ta);
Y=-h*3/(R*rho*c)
tau=(log (X))/Y;// sec
disp("min",tau/60,"time taken tau =")
|
75aa27f48783ac66677280abc6803ef7932ce4af | 449d555969bfd7befe906877abab098c6e63a0e8 | /1280/CH8/EX8.3/8_3.sce | a45569f7b6d8ccde89d921b64a066dea5015674d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 289 | sce | 8_3.sce | clc
//initialisation of variables
d= 3 //in
P= 2000 //psi
s= 20 //strokes
//CALCULATIONS
Cl= s*d/2
F= P*%pi*d^2/4
stl= (Cl-40)/10
//RESULTS
printf ('length of the stop tube= %.f in',Cl)
printf (' \n thrust on the rod= %.f lb',F+3)
printf (' \n Stop Tube length= %.f stl',stl)
|
60b5deea87e98c821262e91160f3acde83eb8262 | 417f69e36190edf7e19a030d2bb6aa4f15bb390c | /SMTTests/tests/ok_push_zero.tst | 654cbac1598edfcec4830b049ed47cca3d2d6181 | [] | no_license | IETS3/jSMTLIB | aeaa7ad19be88117c7454d807a944e8581184a66 | c724ac63056101bfeeb39cc3f366c8719aa23f7b | refs/heads/master | 2020-12-24T12:41:17.664907 | 2019-01-04T10:47:43 | 2019-01-04T10:47:43 | 76,446,229 | 1 | 0 | null | 2016-12-14T09:46:41 | 2016-12-14T09:46:41 | null | UTF-8 | Scilab | false | false | 27 | tst | ok_push_zero.tst | (set-logic QF_UF)
(push 0)
|
6c3a0f0b623b7c9218e9896bf6e669c817d0484e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH3/EX3.14/Ex3_14.sce | 7524ff0e3cc84b5341d7967ae5300b4662b6a453 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 416 | sce | Ex3_14.sce | //Example 3_14
clc;
clear;
close;
format('v',5);
//given data :
V=230;//V
f=50;//Hz
V1=120*expm(%i*30*%pi/180);//V
Z1=15*expm(%i*40*%pi/180);//ohm
V2=V-V1;//V
I=V1/Z1;//A
Z2=V2/I;//ohm
R=real(Z2);//ohm
XC=imag(Z2);//ohm
C=-1/2/%pi/f/XC*10^6;//micro F
disp(Z2,"Value of Z2(ohm) : ");
disp(R,"Resistance(ohm)");
format('v',7);
disp(C,"Capacitance(micro F)");
//Answer is not accurate in the book.
|
7a58f67f3efed9bf0085940c18a604cc32520194 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2102/CH2/EX2.18/exa_2_18.sce | 48c2e1c62351fea4b690b6d2283908eb61af8340 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 803 | sce | exa_2_18.sce | // Exa 2.18
clc;
clear;
close;
// Given data
miu_n= 0.13;// in m^2/Vs
miu_p= 0.05;// in m^2/Vs
q=1.6*10^-19;// in C
ni=1.5*10^16;// per m^3
sigma_intrinsic= q*ni*(miu_n+miu_p);// in (Ωm)^-1
disp(sigma_intrinsic,"The conductivity of silicon in Intrinsic condition in (Ωm)^-1 is : ")
// Part (b)
n= 5*10^28/10^9;
sigma= q*n*miu_n;// in (Ωm)^-1
disp(sigma,"The conductivity with donar impurity in (Ωm)^-1 is : ")
// Part (c)
p= 5*10^28/10^8;
sigma= q*p*miu_p;// in (Ωm)^-1
disp(sigma,"The conductivity with acceptor impurity in (Ωm)^-1 is : ")
// Part (d)
p_desh= p-n;// in /m^3
sigma= q*p_desh*miu_p;// in (Ωm)^-1
disp(sigma,"The conductivity with donar and acceptor impurity in (Ωm)^-1 is : ")
// Note : Answer in the book of part (a) may be miss printed or wrong
|
06e4e92a1f7f1accbc7e184ee20091f227f0d21c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3784/CH5/EX5.4/Ex5_4.sce | fa2505604999672d8a5989503f62df3c3e48c579 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 593 | sce | Ex5_4.sce | clc
//variable initialisation
Vm=400 //Input Voltage in volt
F=50 //supply frequency in Hz
P1=4 //number of poles
R1=0.15 //resistance of stator in ohm
R2=0.12 //resistance of rotor in ohm
X1=0.45 //reactance of Motor in ohm
X2=0.45 //reactance of Motor in ohm
Xm=28.5 //reactance of Motor in ohm
S=0.04 //Slip Of Motor
//Solution
Rl=R2*((1/S)-1)
Vph=Vm/sqrt(3)
I2=Vph/((R1+R2+Rl)+%i*(X1+X2))
I0=Vph/(%i*Xm)
I1=I0+I2
y=imag(I1)
x=real(I1)
phi=atand(y/x)
pf=cosd(phi)
printf('\n\n The Stator Current=%0.1f Amp\n\n',I1)
printf('\n\n The Power Factor=%0.1f lag\n\n',pf)
|
a56d81864c9c11ed071a56bddbe12f78ca73f11f | 19499d51e6cb102cb79dfaac1988c6d08b5e8403 | /src/Maple/GeoProver.tst | 2d51ed48c242feb6cb0952ea6c8b130dcbff3ba0 | [] | no_license | hg-graebe/GeoProver | d9a5858a4c26dd2720ca6542bd409623d979ab4f | 94adbfdd0308d92fbfca8c88698c226bfe1fa662 | refs/heads/master | 2021-01-16T18:45:21.145047 | 2018-04-02T08:08:11 | 2018-04-02T08:08:11 | 10,639,777 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 9,437 | tst | GeoProver.tst | # GeoProver test file for Maple, created on Jan 18 2003
read("GeoProver.mpl"):
read("supp.mpl"):
with(geoprover):
interface(prettyprint=0):
# Example Arnon
#
# The problem:
# Let $ABCD$ be a square and $P$ a point on the line parallel to $BD$
# through $C$ such that $l(BD)=l(BP)$, where $l(BD)$ denotes the
# distance between $B$ and $D$. Let $Q$ be the intersection point of
# $BF$ and $CD$. Show that $l(DP)=l(DQ)$.
#
# The solution:
vars_:=List(x1, x2, x3);
# Points
A_:=Point(0,0); B_:=Point(1,0); P_:=Point(x1,x2);
# coordinates
D_:=rotate(A_,B_,1/2);
C_:=par_point(D_,A_,B_);
Q_:=varpoint(D_,C_,x3);
# polynomials
polys_:=List(on_line(P_,par_line(C_,pp_line(B_,D_))),
eq_dist(B_,D_,B_,P_), on_line(Q_,pp_line(B_,P_)));
# conclusion
con_:=eq_dist(D_,P_,D_,Q_);
# solution
gb_:=geo_gbasis(polys_,vars_);
result_:=geo_normalf(con_,gb_,vars_);
# Example CircumCenter_1
#
# The problem:
# The intersection point of the midpoint perpendiculars is the
# center of the circumscribed circle.
#
# The solution:
parameters_:=List(a1, a2, b1, b2, c1, c2);
# Points
A_:=Point(a1,a2);
B_:=Point(b1,b2);
C_:=Point(c1,c2);
# coordinates
M_:=intersection_point(p_bisector(A_,B_),
p_bisector(B_,C_));
# conclusion
result_:=List( eq_dist(M_,A_,M_,B_), eq_dist(M_,A_,M_,C_) );
# Example EulerLine_1
#
# The problem:
# Euler's line: The center $M$ of the circumscribed circle,
# the orthocenter $H$ and the barycenter $S$ are collinear and $S$
# divides $MH$ with ratio 1:2.
#
# The solution:
parameters_:=List(a1, a2, b1, b2, c1, c2);
# Points
A_:=Point(a1,a2);
B_:=Point(b1,b2);
C_:=Point(c1,c2);
# coordinates
S_:=intersection_point(median(A_,B_,C_),median(B_,C_,A_));
M_:=intersection_point(p_bisector(A_,B_),
p_bisector(B_,C_));
H_:=intersection_point(altitude(A_,B_,C_),altitude(B_,C_,A_));
# conclusion
result_:=List(is_collinear(M_,H_,S_), sqrdist(S_,fixedpoint(M_,H_,1/3)));
# Example Brocard_3
#
# The problem:
# Theorem about the Brocard points:
# Let $\Delta\,ABC$ be a triangle. The circles $c_1$ through $A,B$ and
# tangent to $g(AC)$, $c_2$ through $B,C$ and tangent to $g(AB)$, and
# $c_3$ through $A,C$ and tangent to $g(BC)$ pass through a common
# point.
#
# The solution:
parameters_:=List(u1, u2);
# Points
A_:=Point(0,0);
B_:=Point(1,0);
C_:=Point(u1,u2);
# coordinates
M1_:=intersection_point(altitude(A_,A_,C_),p_bisector(A_,B_));
M2_:=intersection_point(altitude(B_,B_,A_),p_bisector(B_,C_));
M3_:=intersection_point(altitude(C_,C_,B_),p_bisector(A_,C_));
c1_:=pc_circle(M1_,A_);
c2_:=pc_circle(M2_,B_);
c3_:=pc_circle(M3_,C_);
P_:=other_cc_point(B_,c1_,c2_);
# conclusion
result_:= on_circle(P_,c3_);
# Example Feuerbach_1
#
# The problem:
# Feuerbach's circle or nine-point circle: The midpoint $N$ of $MH$ is
# the center of a circle that passes through nine special points, the
# three pedal points of the altitudes, the midpoints of the sides of the
# triangle and the midpoints of the upper parts of the three altitudes.
#
# The solution:
parameters_:=List(u1, u2, u3);
# Points
A_:=Point(0,0);
B_:=Point(u1,0);
C_:=Point(u2,u3);
# coordinates
H_:=intersection_point(altitude(A_,B_,C_),altitude(B_,C_,A_));
D_:=intersection_point(pp_line(A_,B_),pp_line(H_,C_));
M_:=intersection_point(p_bisector(A_,B_),
p_bisector(B_,C_));
N_:=midpoint(M_,H_);
# conclusion
result_:=List( eq_dist(N_,midpoint(A_,B_),N_,midpoint(B_,C_)),
eq_dist(N_,midpoint(A_,B_),N_,midpoint(H_,C_)),
eq_dist(N_,midpoint(A_,B_),N_,D_) );
# Example FeuerbachTangency_1
#
# The problem:
# For an arbitrary triangle $\Delta\,ABC$ Feuerbach's circle (nine-point
# circle) is tangent to its 4 tangent circles.
#
# The solution:
vars_:=List(x1, x2);
parameters_:=List(u1, u2);
# Points
A_:=Point(0,0);
B_:=Point(2,0);
C_:=Point(u1,u2);
P_:=Point(x1,x2);
# coordinates
M_:=intersection_point(p_bisector(A_,B_), p_bisector(B_,C_));
H_:=intersection_point(altitude(A_,B_,C_),altitude(B_,C_,A_));
N_:=midpoint(M_,H_);
c1_:=pc_circle(N_,midpoint(A_,B_));
Q_:=pedalpoint(P_,pp_line(A_,B_));
# polynomials
polys_:=List(on_bisector(P_,A_,B_,C_), on_bisector(P_,B_,C_,A_));
# conclusion
con_:=is_cc_tangent(pc_circle(P_,Q_),c1_);
# solution
gb_:=geo_gbasis(polys_,vars_);
result_:=geo_normalf(con_,gb_,vars_);
# Example GeneralizedFermatPoint_1
#
# The problem:
# A generalized theorem about Napoleon triangles:
# Let $\Delta\,ABC$ be an arbitrary triangle and $P,Q$ and $R$ the third
# vertex of isosceles triangles with equal base angles erected
# externally on the sides $BC, AC$ and $AB$ of the triangle. Then the
# lines $g(AP), g(BQ)$ and $g(CR)$ pass through a common point.
#
# The solution:
vars_:=List(x1, x2, x3, x4, x5);
parameters_:=List(u1, u2, u3);
# Points
A_:=Point(0,0);
B_:=Point(2,0);
C_:=Point(u1,u2);
P_:=Point(x1,x2);
Q_:=Point(x3,x4);
R_:=Point(x5,u3);
# polynomials
polys_:=List(eq_dist(P_,B_,P_,C_),
eq_dist(Q_,A_,Q_,C_),
eq_dist(R_,A_,R_,B_),
eq_angle(R_,A_,B_,P_,B_,C_),
eq_angle(Q_,C_,A_,P_,B_,C_));
# conclusion
con_:=is_concurrent(pp_line(A_,P_), pp_line(B_,Q_), pp_line(C_,R_));
# solution
sol_:=geo_solve(polys_,vars_);
result_:=geo_eval(con_,sol_);
# Example TaylorCircle_1
#
# The problem:
# Let $\Delta\,ABC$ be an arbitrary triangle. Consider the three
# altitude pedal points and the pedal points of the perpendiculars from
# these points onto the the opposite sides of the triangle. Show that
# these 6 points are on a common circle, the {\em Taylor circle}.
#
# The solution:
parameters_:=List(u1, u2, u3);
# Points
A_:=Point(u1,0);
B_:=Point(u2,0);
C_:=Point(0,u3);
# coordinates
P_:=pedalpoint(A_,pp_line(B_,C_));
Q_:=pedalpoint(B_,pp_line(A_,C_));
R_:=pedalpoint(C_,pp_line(A_,B_));
P1_:=pedalpoint(P_,pp_line(A_,B_));
P2_:=pedalpoint(P_,pp_line(A_,C_));
Q1_:=pedalpoint(Q_,pp_line(A_,B_));
Q2_:=pedalpoint(Q_,pp_line(B_,C_));
R1_:=pedalpoint(R_,pp_line(A_,C_));
R2_:=pedalpoint(R_,pp_line(B_,C_));
# conclusion
result_:=List( is_concyclic(P1_,P2_,Q1_,Q2_),
is_concyclic(P1_,P2_,Q1_,R1_),
is_concyclic(P1_,P2_,Q1_,R2_));
# Example Miquel_1
#
# The problem:
# Miquels theorem: Let $\Delta\,ABC$ be a triangle. Fix arbitrary points
# $P,Q,R$ on the sides $AB, BC, AC$. Then the three circles through each
# vertex and the chosen points on adjacent sides pass through a common
# point.
#
# The solution:
parameters_:=List(c1, c2, u1, u2, u3);
# Points
A_:=Point(0,0);
B_:=Point(1,0);
C_:=Point(c1,c2);
# coordinates
P_:=varpoint(A_,B_,u1);
Q_:=varpoint(B_,C_,u2);
R_:=varpoint(A_,C_,u3);
X_:=other_cc_point(P_,p3_circle(A_,P_,R_),p3_circle(B_,P_,Q_));
# conclusion
result_:=on_circle(X_,p3_circle(C_,Q_,R_));
# Example PappusPoint_1
#
# The problem:
# Let $A,B,C$ and $P,Q,R$ be two triples of collinear points. Then by
# the Theorem of Pappus the intersection points $g(AQ)\wedge g(BP),
# g(AR)\wedge g(CP)$ and $g(BR)\wedge g(CQ)$ are collinear.
#
# Permuting $P,Q,R$ we get six such {\em Pappus lines}. Those
# corresponding to even resp. odd permutations are concurrent.
#
# The solution:
parameters_:=List(u1, u2, u3, u4, u5, u6, u7, u8);
# Points
A_:=Point(u1,0);
B_:=Point(u2,0);
P_:=Point(u4,u5);
Q_:=Point(u6,u7);
# coordinates
C_:=varpoint(A_,B_,u3);
R_:=varpoint(P_,Q_,u8);
# conclusion
result_:=is_concurrent(pappus_line(A_,B_,C_,P_,Q_,R_),
pappus_line(A_,B_,C_,Q_,R_,P_),
pappus_line(A_,B_,C_,R_,P_,Q_));
# Example IMO/36_1
#
# The problem:
# Let $A,B,C,D$ be four distinct points on a line, in that order. The
# circles with diameters $AC$ and $BD$ intersect at the points $X$ and
# $Y$. The line $XY$ meets $BC$ at the point $Z$. Let $P$ be a point on
# the line $XY$ different from $Z$. The line $CP$ intersects the circle
# with diameter $AC$ at the points $C$ and $M$, and the line $BP$
# intersects the circle with diameter $BD$ at the points $B$ and
# $N$. Prove that the lines $AM, DN$ and $XY$ are concurrent.
#
# The solution:
vars_:=List(x1, x2, x3, x4, x5, x6);
parameters_:=List(u1, u2, u3);
# Points
X_:=Point(0,1);
Y_:=Point(0,-1);
M_:=Point(x1,x2);
N_:=Point(x3,x4);
# coordinates
P_:=varpoint(X_,Y_,u3);
Z_:=midpoint(X_,Y_);
l_:=p_bisector(X_,Y_);
B_:=line_slider(l_,u1);
C_:=line_slider(l_,u2);
A_:=line_slider(l_,x5);
D_:=line_slider(l_,x6);
# polynomials
polys_:=List(is_concyclic(X_,Y_,B_,N_), is_concyclic(X_,Y_,C_,M_),
is_concyclic(X_,Y_,B_,D_), is_concyclic(X_,Y_,C_,A_),
is_collinear(B_,P_,N_), is_collinear(C_,P_,M_));
# constraints
nondeg_:=List(x5-u2,x1-u2,x6-u1,x3-u1);
# conclusion
con_:=is_concurrent(pp_line(A_,M_),pp_line(D_,N_),pp_line(X_,Y_));
# solution
sol_:=geo_solveconstrained(polys_,vars_,nondeg_);
result_:=geo_eval(con_,sol_);
# Example IMO/43_2
#
# The problem:
#
# No verbal problem description available
#
# The solution:
vars_:=List(x1, x2);
parameters_:=List(u1);
# Points
B_:=Point(-1,0);
C_:=Point(1,0);
# coordinates
O_:=midpoint(B_,C_);
gamma_:=pc_circle(O_,B_);
D_:=circle_slider(O_,B_,u1);
E_:=circle_slider(O_,B_,x1);
F_:=circle_slider(O_,B_,x2);
A_:=sym_point(B_,pp_line(O_,D_));
J_:=intersection_point(pp_line(A_,C_), par_line(O_, pp_line(A_,D_)));
m_:=p_bisector(O_,A_);
P1_:=pedalpoint(J_,m_);
P2_:=pedalpoint(J_,pp_line(C_,E_));
P3_:=pedalpoint(J_,pp_line(C_,F_));
# polynomials
polys_:=List(on_line(E_,m_), on_line(F_,m_));
# constraints
nondegs_:=List(x1-x2);
# conclusion
con_:=List(eq_dist(J_,P1_,J_,P2_), eq_dist(J_,P1_,J_,P3_));
# solution
sol_:=geo_solveconstrained(polys_,vars_,nondegs_);
result_:=geo_simplify(geo_eval(con_,sol_));
quit;
|
b0c6a9eeae943a43a66deefbd49256d30c2ab447 | 449d555969bfd7befe906877abab098c6e63a0e8 | /671/CH10/EX10.3/10_3.sce | e44d8e5471a47c793b1e1e105f42aee932834a54 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 101 | sce | 10_3.sce | P=5000
Vt=215
n=1000
Ra=0.4
Ia=P/Vt
Eag=Vt+Ra*Ia
Eam=Vt-Ra*Ia
newn=Eam/Eag*n/1.1
disp(newn)
|
bbc75619a9b82cde8de6e5b4b115d6fd56f80a3f | 449d555969bfd7befe906877abab098c6e63a0e8 | /671/CH4/EX4.45/4_45.sce | 588e661cb114368baf7a12e6d25bc4659f2e9069 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 287 | sce | 4_45.sce | I=20
w=2000
R=200
L=0.25
Xl=w*L*%i
Ir=I*Xl/(Xl+R)
Il=I-Ir
Vl=Xl*Il
t=1E-3
ir=sqrt(2)*real(Ir*exp(%i*w*t))
il=sqrt(2)*real(Il*exp(%i*w*t))
vl=sqrt(2)*real(Vl*exp(%i*w*t))
is=sqrt(2)*real(I*exp(%i*w*t))
vs=vl
Pr=ir*ir*R
Pl=vl*il
Ps=is*ir*R
Pr=ir*vl
disp(Ps,Pl,Pr) |
a6b0907d99446a23974c2f09296865ebcc5226a7 | 7b7be9b58f50415293def4aa99ef5795e6394954 | /sim/scripts/00_recycleIdeal.tst | f6913b2a81528aca1ad93c438b4837715a0cecc2 | [] | no_license | sabualkaz/sim42 | 80d1174e4bc6ae14122f70c65e259a9a2472ad47 | 27b5afe75723c4e5414904710fa6425d5f27e13c | refs/heads/master | 2022-07-30T06:23:20.119353 | 2020-05-23T16:30:01 | 2020-05-23T16:30:01 | 265,842,394 | 0 | 0 | null | 2020-05-21T12:26:00 | 2020-05-21T12:26:00 | null | UTF-8 | Scilab | false | false | 2,396 | tst | 00_recycleIdeal.tst | # A simple recycle test
# set up thermo - the name can be anything, I just use
# 'thermo' for convenience. Essentially the rhs causes
# a thermo package to be created and assigned to the unit op
# owning the name thermo - in the case the base flowsheet
# Also note that for now spaces are needed around the operators (= + etc)
# A further also is that case is always significant
$thermo = VirtualMaterials.IdealLiquid/Ideal/HC
/ -> $thermo
thermo + METHANOL ETHANOL
units SI
# Add a stream
# for now creating a unit op requires module.class(), but this
# will be stream lined in the future
stream = Stream.Stream_Material()
# Make the stream In port current to save typing
# You can use cd (named because it is similar to change directory in
# Unix and DOS) to sub objects in this case first to the unit op stream
# and then to its port In. This is just a typing convenience as everything
# could be done from the top level with full names i.e. stream.In.T = 360.15
cd stream.In
# Mole fractions can be enter indivually (Fraction.METHANOL = .25) or all
# together as below.
Fraction = .5 .5
VapFrac = 0.4
T = 300 K
MoleFlow = 3000
# Now create a recycle stream
cd / # return to top level - only place a slash is used
recycle = Stream.Stream_Material()
cd recycle.In
# Estimate the values in the stream
# Estimates use the ~= operator in place of the normal = which
# fixes values
T ~= 460.15 K
P ~= 715
MoleFlow ~= 300
Fraction # any object without an operator displays itself - here to get order
Fraction ~= 0 .5
. # a dot represents the current obj for display purposes
# add a mixer to combine the first stream with the recycle
cd /
mixer = Mixer.Mixer()
# ports are connected with the -> operator. They would be disconnected
# by having an empty rhs. Similarly "stream.In.T =" would remove any value
# for the stream In port Temperature
stream.Out -> mixer.In0
recycle.Out -> mixer.In1
mixer.Out
# add a separator
flash = Flash.SimpleFlash()
mixer.Out -> flash.In
# split the liquid from the flash
splitter = Split.Splitter()
flash.Liq0 -> splitter.In
# set the flow in one of the splitter outlets
splitter.Out1.MoleFlow = 200
# close the recycle
splitter.Out1 -> recycle.In
# All done - check some streams
recycle.Out
splitter.Liq0
#splitter.Liq0.Out
splitter.Out0
flash.In
|
15eb37ff7e58cf1aceea3f223ef61144b42138f6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3821/CH7/EX7.17/Example7_17.sce | 4720ff7173c9fbf3609c9010c0426b28eacf6939 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 929 | sce | Example7_17.sce | ///Chapter No 7 Fluid Mechanics
///Example 7.17 Page No:128
/// Find bernoulli's equation for discharge
//input data
//refer figure 12
clc;
clear;
Q1=0.04; //Water flows at rate in m**2/s
DA=0.22; //Pipe diameter at section A in m
DB=0.12; //Pipe diameter at section B in m
PA=400*10^3; //Intensity of pressure at setion A in kPa
PB=150*10^3; //Intensity of pressure at setion B in kPa
pi1=3.14; //Pi constant
g1=9.81; //Gravity constant
rho=1000;
///Calculation
VA=Q1/(pi1/4*(DA)^2); //contuity equation for discharge
VB=Q1/(pi1/4*(DB)^2); //bernoulli's equation for discharge
///Z=ZB-ZA
Z=(PA/(rho*g1))+(VA^2/(2*g1))-(PB/(rho*g1))-(VB^2/(2*g1));
///Output
printf('Contuity equation for discharge= %f m63 \n ',VA);
printf('Contuity equation for discharge= %f m^3 \n ',VB);
printf('Bernoullis equation for discharge=%f m \n',Z);
|
0e7d9712eba11e632c01b12fc0ab7b02f64ed115 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2414/CH15/EX15.7/Ex15_7.sce | 11c0129bf421b68c50027163ddcd3c7c0f3949e1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 161 | sce | Ex15_7.sce | clc;
close();
clear();
//page no 506
//prob no. 15.7
Pt=2000; //W
Irms=5;
Rrad=Pt/Irms^2;
mprintf('The radiation resistance is ,Rrad= %i ohm',Rrad);
|
d9e7511e78bfd1fd2ec997b74059fed1555dedbe | 449d555969bfd7befe906877abab098c6e63a0e8 | /1628/CH2/EX2.3/Ex2_3.sce | f7504a05f9b3e4005c43137210584768a0b194ab | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 223 | sce | Ex2_3.sce |
// Example 2.3
// Rp=(4+4)||(8+4)
Rp=(8*12)/(8+12); // By Voltage divider rule
disp(' voltage Across Foue resisrance = '+string(Rp)+' Ohm');
// p 20 2.3
|
b1eb7d571109c7bc20b2bc29b9cefe0ced74543e | d465fcea94a1198464d7f8a912244e8a6dcf41f9 | /kMatlab/kProximity.sci | 74532db6534d7dc2193746932592517684b6739a | [] | no_license | manasdas17/kiks-scilab | 4f4064ed7619cad9e2117a6c0040a51056c938ee | 37dc68914547c9d0f423008d44e973ba296de67b | refs/heads/master | 2021-01-15T14:18:21.918789 | 2009-05-11T05:43:11 | 2009-05-11T05:43:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 881 | sci | kProximity.sci | function [r] = kProximity(ref)
// Ouput variables initialisation (not found in input variables)
r=[];
// Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
//KPROXIMITY Get the value of the proximity sensors of Khepera
//
//value = kProximity(ref)
// Return a vector of 8 values corresponding to the 8
// proximity sensors of Khepera.
// Use the reference obtained with kopen.
// Written by Skye Legon, 2/99
retries = 3;
retry = 1;
errmsg = "none yet";
while asciimat(errmsg)&bool2s(retry<=retries)
reply = kcmd(ref,"N");
// !! L.16: Matlab function sscanf not yet converted, original calling sequence used
[r,count,errmsg] = sscanf(reply,"n,%d,%d,%d,%d,%d,%d,%d,%d");
if errmsg then
disp("Error reading sensors. Retrying...")
retry = retry+1;
end;
end;
if errmsg then
disp("Sensors failed.")
r = -1;
end;
endfunction
|
73a5ed8884b5316ca9504209f7abc5b6bfb0d969 | 449d555969bfd7befe906877abab098c6e63a0e8 | /45/CH8/EX8.7/example_8_7.sce | d8c1b36d789c1f0ca7966131f6f504d0726a4396 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 180 | sce | example_8_7.sce | //example 8.7
clc;
clear;
close;
printf("For input J and K = 0 otput Qn+1 = Qn i.e output does not change its state And for J = K = 1, The Output Qn+1 = Qn` i.e output toggles " ); |
2888144523a19d57d18b77d751d15f70902bbee8 | 25033eda4e7cd13f945f94c5dc35f15825066b42 | /ExactCure/mu lambda ES/avec contraintes 1D.sce | e9996135e3d0e8e4c7d77b65370ff3344b078eee | [] | no_license | julienguegan/Internships | a26cb9efa2f1715832511a7aa94d25bfc675388b | ad51d5845ed8fd41e29259c95e8beff80bac65cf | refs/heads/master | 2020-12-20T21:54:29.099157 | 2020-01-25T19:20:10 | 2020-01-25T19:20:10 | 236,217,889 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,773 | sce | avec contraintes 1D.sce | exec('C:\Users\Julien Guégan\Desktop\PFE\fonctions test.sce',-1)
function [xm,n] = evolutionstrategie(f,population,lambda,mu,itermax,tol,C) // μ < λ
rand("normal")
xm0 = sum(population)./length(population)//barycentre
sm0 = sqrt(1/length(population)*sum((population-xm0)^2))//xm0 - max(population) //ecart type moyen
// ou utiliser la fonction nanstdev(x) de scilab
tau = 1 //facteur d'apprentissage
n = 1 //nbr iteration
xmp1 = xm0
xm = xm0
smp1 = sm0
while (((n<itermax)&(norm(xm-xmp1)>tol))| (n == 1)) then
xm = xmp1
sm = smp1
/////* AFFICHAGE */////
clf()
domaine=-20:0.1:20
for i=-20:0.1:20
ind_i=i*10+201
z(ind_i) = f(i)
end
plot(domaine,z')
///////////////////////////////
for i = 1:lambda //creation
s(i) = sm * exp(tau*rand())
x(i) = xm + s(i)*rand()
if (-20<x(i)&x(i)<20)
plot(x(i),f(x(i)),'k.','markersize',4)
end
end
plot([2.9 2.9], [0 300],'g-')
//disp('xm0 = '+string(xm)+' ; sm0 = '+string(sm))
Z = 0
for i = 1:length(x) //Une matrice Z = [x f(x) σ]
Z(i,1) = x(i)
Z(i,2) = f(x(i))
Z(i,3) = s(i)
end
xp = 0 //vecteur des x parents
sp = 0 // les ecarts types associés
slct = find(0 < C(Z(:,1)))// ceux qui respectent la contraintes
W = 0
for i = 1:length(slct)
W(i,1) = Z(slct(i),1)
W(i,2) = Z(slct(i),2)
W(i,3) = Z(slct(i),3)
end
mu2 = mu
if length(slct) < mu
mu2 = length(slct)
end
for j = 1:mu2 //selection
mini = find(W(:,2) == min(W(:,2)))// indice de minf(x)
xp(j) = W(mini,1)//vecteur des mu minimum
sp(j) = W(mini,3)
W(mini,:) = []//on l'enleve pour la prochaine iteration
end
xmp1 = sum(xp)/mu2 //recombinaison
smp1 = sum(sp)/mu2 //autoadaptation
plot(xmp1,f(xmp1),'r*')
xs2png(gcf(),"image"+string(n))
n = n+1
end
endfunction
function C = contraintes(x)
C = x-3
endfunction
//population = -10:10//;-25:0.1:-10]'
lambda = 15
mu = 5
fonction = rastr
itermax = 200
tol = 0.001
//population initiale
rand("uniform")
for i = 1:10
population(i) = 28*rand()-14
end
plot(population,fonction(population),'k.','markersize',5)
[sol n] = evolutionstrategie(fonction,population,lambda,mu,itermax,tol,contraintes)
disp('le minimum est x = ')
disp(sol)
disp(' au bout de '+string(n)+' iterations')
/*
x=-15:0.1:15
for i=-15:0.1:15
ind_i = i*10+151
z(ind_i) = fonction(i)
end
plot(x',z,'b-')
|
fea7e2105c42a890037ea4ed2a724a81c8c5ebf7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /746/DEPENDENCIES/4_01.sci | fee4e0aa4cbe200c008be46e660204a5654093ee | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 327 | sci | 4_01.sci | //Area of 1 (in ft^2):
A1=0.2;
//Area of 2 (in ft^2):
A2=0.5;
//Area of 3 (in ft^2):
A3=0.4;
//Area of 4 (in ft^2):
A4=0.4;
//Density of water (in slug/ft^3):
d=1.94;
//Mass flow rate out of section 3(in slug/sec):
m3=3.88;
//Volme flow rate in section 4 (in ft^3/sec):
Q4=1;
//Velocity at 1(in ft/sec):
V1=10;
|
c16b75f2d085b502c23bd135542f110adb8b47b6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1427/CH5/EX5.31/5_31.sce | 00bfedb6926ab48978915592a16add3f13a16384 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 278 | sce | 5_31.sce | //ques-5.31
//Calculating dissociation constant of HCN
clc
c=0.02//molarity of KCN
h=4.9;//percentage of hydrolysis
Kw=10^-14;
Kh=(h/100)^2*c;//hydrolysis constant
Ka=Kw/Kh;//dissociation constant
printf("Dissociation constant for HCN is %.2f*10^-10.",Ka*10000000000);
|
8b37607f1df4557180ef3f81694f2fdcde7072de | 36e31f6a275624818b955c7fcacad9f89597084c | /projects/05/CPU-external.tst | e86cf179fbbf2b5fd4fe87fb847bf3674dbc101b | [] | no_license | AshwinTC/nand2tetris | ba938a4bd38199b98350421444ace967fae0926b | 8fc7976c35956c07ebb1eb5f1da9d2e7ff343b89 | refs/heads/master | 2020-03-11T14:48:57.685514 | 2018-04-18T13:25:28 | 2018-04-18T13:25:28 | 130,065,952 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,909 | tst | CPU-external.tst | |time| inM | instruction |reset| outM |writeM |addre| pc |
|0+ | 0|0011000000111001| 0 |*******| 0 | 0| 0|
|1 | 0|0011000000111001| 0 |*******| 0 |12345| 1|
|1+ | 0|1110110000010000| 0 |*******| 0 |12345| 1|
|2 | 0|1110110000010000| 0 |*******| 0 |12345| 2|
|2+ | 0|0101101110100000| 0 |*******| 0 |12345| 2|
|3 | 0|0101101110100000| 0 |*******| 0 |23456| 3|
|3+ | 0|1110000111010000| 0 |*******| 0 |23456| 3|
|4 | 0|1110000111010000| 0 |*******| 0 |23456| 4|
|4+ | 0|0000001111101000| 0 |*******| 0 |23456| 4|
|5 | 0|0000001111101000| 0 |*******| 0 | 1000| 5|
|5+ | 0|1110001100001000| 0 | 11111| 1 | 1000| 5|
|6 | 0|1110001100001000| 0 | 11111| 1 | 1000| 6|
|6+ | 0|0000001111101001| 0 |*******| 0 | 1000| 6|
|7 | 0|0000001111101001| 0 |*******| 0 | 1001| 7|
|7+ | 0|1110001110011000| 0 | 11110| 1 | 1001| 7|
|8 | 0|1110001110011000| 0 | 11109| 1 | 1001| 8|
|8+ | 0|0000001111101000| 0 |*******| 0 | 1001| 8|
|9 | 0|0000001111101000| 0 |*******| 0 | 1000| 9|
|9+ | 11111|1111010011010000| 0 |*******| 0 | 1000| 9|
|10 | 11111|1111010011010000| 0 |*******| 0 | 1000| 10|
|10+ | 11111|0000000000001110| 0 |*******| 0 | 1000| 10|
|11 | 11111|0000000000001110| 0 |*******| 0 | 14| 11|
|11+ | 11111|1110001100000100| 0 |*******| 0 | 14| 11|
|12 | 11111|1110001100000100| 0 |*******| 0 | 14| 14|
|12+ | 11111|0000001111100111| 0 |*******| 0 | 14| 14|
|13 | 11111|0000001111100111| 0 |*******| 0 | 999| 15|
|13+ | 11111|1110110111100000| 0 |*******| 0 | 999| 15|
|14 | 11111|1110110111100000| 0 |*******| 0 | 1000| 16|
|14+ | 11111|1110001100001000| 0 | -1| 1 | 1000| 16|
|15 | 11111|1110001100001000| 0 | -1| 1 | 1000| 17|
|15+ | 11111|0000000000010101| 0 |*******| 0 | 1000| 17|
|16 | 11111|0000000000010101| 0 |*******| 0 | 21| 18|
|16+ | 11111|1110011111000010| 0 |*******| 0 | 21| 18|
|17 | 11111|1110011111000010| 0 |*******| 0 | 21| 21|
|17+ | 11111|0000000000000010| 0 |*******| 0 | 21| 21|
|18 | 11111|0000000000000010| 0 |*******| 0 | 2| 22|
|18+ | 11111|1110000010010000| 0 |*******| 0 | 2| 22|
|19 | 11111|1110000010010000| 0 |*******| 0 | 2| 23|
|19+ | 11111|0000001111101000| 0 |*******| 0 | 2| 23|
|20 | 11111|0000001111101000| 0 |*******| 0 | 1000| 24|
|20+ | 11111|1110111010010000| 0 |*******| 0 | 1000| 24|
|21 | 11111|1110111010010000| 0 |*******| 0 | 1000| 25|
|21+ | 11111|1110001100000001| 0 |*******| 0 | 1000| 25|
|22 | 11111|1110001100000001| 0 |*******| 0 | 1000| 26|
|22+ | 11111|1110001100000010| 0 |*******| 0 | 1000| 26|
|23 | 11111|1110001100000010| 0 |*******| 0 | 1000| 27|
|23+ | 11111|1110001100000011| 0 |*******| 0 | 1000| 27|
|24 | 11111|1110001100000011| 0 |*******| 0 | 1000| 28|
|24+ | 11111|1110001100000100| 0 |*******| 0 | 1000| 28|
|25 | 11111|1110001100000100| 0 |*******| 0 | 1000| 1000|
|25+ | 11111|1110001100000101| 0 |*******| 0 | 1000| 1000|
|26 | 11111|1110001100000101| 0 |*******| 0 | 1000| 1000|
|26+ | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000|
|27 | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000|
|27+ | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000|
|28 | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000|
|28+ | 11111|1110101010010000| 0 |*******| 0 | 1000| 1000|
|29 | 11111|1110101010010000| 0 |*******| 0 | 1000| 1001|
|29+ | 11111|11 |
c77064426dbaba88501d70b0f8422cc6e578918e | e806e966b06a53388fb300d89534354b222c2cad | /macros/binaryFeatures.sci | bd009c93fe6a5353a2b1be344cbd108cd7287bed | [] | no_license | gursimarsingh/FOSSEE_Image_Processing_Toolbox | 76c9d524193ade302c48efe11936fe640f4de200 | a6df67e8bcd5159cde27556f4f6a315f8dc2215f | refs/heads/master | 2021-01-22T02:08:45.870957 | 2017-01-15T21:26:17 | 2017-01-15T21:26:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,146 | sci | binaryFeatures.sci | function [features]=binaryFeatures(featureVectors)
// Object for storing Feature Vectors
//
// Calling Sequence
// features = binaryFeatures(featureVector);
//
// Parameters
// featureVector: M-by-N matrix consisting of M features stored in N uint8 containers
// features: Binary Feature object for the extracted Features
//
// Description
// This object provides the ability to pass data between extractFeatures and matchFeatures function
//
// Examples
// image_1 = imread('sample1.jpg');
// points_1 = detectFASTFeatures(image_1);
// [ f1 vpts_1 ] = extractFeatures(image_1, points_1);
// features1 = binaryFeatures(f1);
//
// Authors
// Umang Agrawal
// Sridhar Reddy
[lhs rhs]=argn(0);
if lhs>1
error(msprintf(" Too many output arguments"));
elseif rhs>1
error(msprintf(" Too many input arguments"));
elseif inttype(featureVectors) <> 11 then
error(msprintf("wrong argument #%d: FeatureVectors must be uint8",1));
end
[rows cols]=size(featureVectors);
features=struct('Type','binaryFeatures','Features',featureVectors,'NumBits',cols*8,'NumFeatures',rows);
endfunction
|
1c4083814c9afe6d0310b7afcefde64fa1212600 | de14a6897d4397228a52bacb8905b8807370ef4b | /PMC_non_lineaire.sce | cd3ec8a6209b660f6de0b29ac0b8baff19c09401 | [] | no_license | JustineMarlow/MT94-RapportLaTeX | 20b670965a47ce85beecc15865d14ec9cc4d305b | 3dfaa665b5691621410f8eafdf76ecaf081b92d1 | refs/heads/master | 2021-09-06T17:54:58.174773 | 2018-02-09T09:57:52 | 2018-02-09T09:57:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,426 | sce | PMC_non_lineaire.sce | data=[...]; //ici les donnees
[data_tri]=gsort(data,'lr','i'); //permet de trier les donnees
t=data_tri(:,1);
y=data_tri(:,2);
clf;
plot(t,y,'ko');
//Levenberg-Marquardt
function r=res(theta,n)
r=exp(theta(1)+t*theta(2)+t.^2*theta(3))-y;
endfunction
function J=jac(theta,n)
J=ones(n,3);
for i=1:n
for k=1:3
J(i,k)=t(i)^(k-1)*exp(theta(1)+t(i)*theta(2)+t(i)^2*theta(3));
end
end
endfunction
//Logtrick
function return=constrA(t,y,d)
n=length(t);
A=ones(n,d+1);
for i=1:d
A(:,i+1)=t.^i;
end
return=A;
endfunction
function [theta,reg]=reglin(t,y,d)
A=constrA(t,y,d);
theta=A\y;
reg=A*theta;
endfunction
//Levenberg-Marquardt
n=length(t);
theta=[1;-1;-1]; //theta_0 proche de la solution
lambda=1;
for i=1:50
Jr=jac(theta,n);
newtheta=theta-(Jr'*Jr+lambda*eye(3,3))\(Jr'*res(theta,n))
theta=newtheta;
end
plot(t,exp(theta(1)+t*theta(2)+t.^2*theta(3)),"b");
//Logtrick
[theta_bis,reg]=reglin(t,log(y),2);
plot(t,exp(reg),"r");
//A la place de Levenberg-Marquardt, on aurait pu utiliser lsqrsolve
//theta_0=[1;-1;-1]; //theta_0 proche de la solution
//theta_second=lsqrsolve(theta_0,res,length(t),jac);
//plot(t,exp(theta_second(1)+t*theta_second(2)+t.^2*theta_second(3)),"m");
title("Approximations par le log-trick et par Levenberg-Marquardt",
'fontsize',3);
legend(["Donnees";"Levenberg-Marquardt";"Log-trick"],opt=1);
|
9fb0708ec9cb8692a2650a10f7e97c90853e666b | 464ce6326e71577dfbaa32e2c881306849780844 | /macros/berawgn.sci | 2082010d9af880eeec791f9073574f0a2cfe1f12 | [] | no_license | tripathiaishwarya/itpp_module | 43bfd0fea477eb6c687dc7468c25140102096d72 | f701b8e0fe065dbdf55da14b821aa45a56499135 | refs/heads/master | 2021-01-10T21:54:18.914097 | 2015-07-06T10:19:02 | 2015-07-06T10:19:02 | 38,388,403 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 259 | sci | berawgn.sci | function [matrix] = berawgn(EbNo,scheme)
funcprot(0);
if (string(scheme) == "bpsk") then
[nr, nc]= size (EbNo)
matrix = zeros(1, nc);
for i = 1 : nc
var = sqrt(EbNo(1,i));
errorfunc = erfc(var);
matrix(1,i) = 1/2*errorfunc;
end
end
endfunction
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.