blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 214 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2
values | repo_name stringlengths 6 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 21
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 141k 586M ⌀ | star_events_count int64 0 30.4k | fork_events_count int64 0 9.67k | gha_license_id stringclasses 8
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 50
values | src_encoding stringclasses 23
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 1
class | length_bytes int64 5 10.4M | extension stringclasses 29
values | filename stringlengths 2 96 | content stringlengths 5 10.4M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e52aa96c4a2b5b82b9253359743663172e05736a | 449d555969bfd7befe906877abab098c6e63a0e8 | /608/CH21/EX21.30/21_30.sce | a7007d5c66f20d31e65588f8c86149c5bd84b36e | [] | 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 | 757 | sce | 21_30.sce | //Problem 21.30: A series motor runs at 800 rev/min when the voltag is 400 V and the current is 25 A. The armature resistance is 0.4 ohm and the series field resistance is 0.2 ohm. Determine the resistance to be connected in series to reduce the speed to 600 rev/min with the same current.
//initializing the variables:
Ia1 = 25; // in Amperes
Ra = 0.4; // in ohm
Rse = 0.2; // in ohm
n1 = 800/60; // in rev/sec
n2 = 600/60; // in rev/sec
V = 400; // in Volts
//calculation:
//e.m.f. E1
E1 = V - Ia1*(Ra + Rse)
//At n2, since the current is unchanged, the flux is unchanged.
//E1/E2 = n1/n2
E2 = E1*n2/n1
//and E2 = V - Ia1(Ra + Rse + R)
R = (V - E2)/Ia1 - Ra - Rse
printf("\n\n Result \n\n")
printf("\n Resistance is %.2f ohm", R) |
46606670a2805edd079408e054c73bbc25bfda87 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3250/CH2/EX2.8/Ex2_8.sce | 1f7d45ce6817215ce19ab49eda8be4e8bb29cc56 | [] | 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,236 | sce | Ex2_8.sce | clc
// Given that
A= 60*7.5 // Cross sectional area in cm^2
v=0.05 // Withdrawal rate in m/sec
t = 0.0125 // Thickness in m
thetaF= 1500 // Temperature of mould face in degree centigrate
thetaP = 1550 //
thetaO = 20 // Initial temperature of mould in Degree centigrate
L= 268e3 // Latent heat of molten metal in J/Kg
Dm = 7680 // Density of molten metal in Kg/m^3
Cs = 0.67e+3 //Specific heat of molten metal in J/Kg-K
Cm = 0.755e3 //Specific heat of mould in J/Kg-K
Ks = 76 // Conductivity of molten metal in W/m-K
hF = 1420 // Heat transfer coefficient at the casting-mould interface in W/m^2-°C
Dtheta = 10 // Maximum temperature of cooling water in ° C
// Sample Problem 8 on page no. 77
printf("\n # PROBLEM 2.8 # \n")
L_ = L+Cm*(thetaP-thetaF)
x=L_ / (Cs*(thetaF-thetaO))
y= hF*t/Ks
printf(" L_/(Cs(thetaF-thetaO))=%f,\n hF*t/Ks=%f",x,y)
z=0.11 // Where z=hF^2 * lm / (v*Ks*Dm*Cs)
lm= (z*v*Ks*Dm*Cs)/(hF^2)
Z=0.28 // Where Z=Q/(lm*(thetaF-thetaO)*sqrt(lm*v*Dm*Cs*Ks))
Q = Z*lm*(thetaF-thetaO)*sqrt(lm*v*Dm*Cs*Ks)
m = Q / (4.2e3*Dtheta)
printf("\n The mould length = %f meter,\n The cooling water requirement = %f Kg/sec", lm,m)
// Answer for The cooling water requirement in the book is given as 5.05 Kg/sec, Which is wrong.
|
382595810a24e5fa10deebf4aba020a552773a14 | c815504d758d414cc511e915493f71305768168d | /plot_trajectories.sce | 183b67e1ca0f0e986c047c6310074c44b93bd436 | [] | no_license | Vault-1814/my-somethings | ae0ee491921bf608f1876875a1860d3891851455 | 42e743cae2903c9d707958e2c5ad37fce72ff5c6 | refs/heads/master | 2020-04-27T07:24:24.590344 | 2019-03-07T08:17:16 | 2019-03-07T08:17:16 | 174,134,962 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 373 | sce | plot_trajectories.sce |
r = read('/media/data/evo/my-somethings/trajectories.txt', -1, 21)
for i = 0:4 do
subplot(2,5,1+i);
plot(r(:,1), [r(:,2+i), r(:,12+i), r(:,17+i)])
subplot(2,5,6+i);
[a,b] = size(r);
plot(r(:,1), [r(:,7+i), ones(1,a)' * max(r(:,7+i)), ones(1,a)' * min(r(:,7+i))], 'g')
end
//2 3 4 5 6
//7 8 9 10 11
//12 13 14 15 16
//17 18 19 20 21
|
3fc3dc7216b756f4e9f5825e47001c759c5dde30 | 089894a36ef33cb3d0f697541716c9b6cd8dcc43 | /NLP_Project/test/tweet/bow/bow.12_10.tst | dcb317f93abb96d4ae7122640480273304fb07bf | [] | 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 | 21,336 | tst | bow.12_10.tst | 12 39:0.03225806451612903 48:1.0 55:1.0 56:0.021739130434782608 59:0.1 74:0.3333333333333333 156:0.3333333333333333 216:0.25 358:1.0 463:0.3333333333333333 1774:1.0 2177:1.0 4104:1.0
12 8:0.2 26:0.3333333333333333 30:1.0 39:0.03225806451612903 56:0.021739130434782608 91:0.05 96:1.0 128:1.0 146:1.0 213:0.25 221:0.3333333333333333 290:1.0 338:1.0 438:1.0 463:0.3333333333333333 487:1.0 751:1.0 791:1.0 1081:0.5 1227:1.0 1492:1.0 1711:1.0 2345:1.0 2639:1.0 4208:1.0 4404:1.0 4805:1.0
12 8:0.2 30:2.0 360:0.5 609:0.5 773:1.0 817:1.0 1375:1.0 2908:1.0
12 5:0.2 8:0.2 18:0.2 30:1.0 39:0.03225806451612903 57:1.0 64:0.16666666666666666 66:0.1111111111111111 75:1.0 170:1.0 267:1.0 272:1.0 301:1.0 308:1.0 330:1.0 431:1.0 804:0.25 1017:1.0 1230:1.0 1503:0.5 1645:1.0 2371:1.0 2680:1.0 2929:1.0 3544:1.0 4611:1.0
12 26:0.6666666666666666 30:1.0 39:0.03225806451612903 91:0.05 94:0.3333333333333333 503:0.25 824:1.0 1024:1.0 1390:1.0 1503:0.5 2499:1.0 3196:1.0
12 8:0.2 30:1.0 38:1.0 39:0.06451612903225806 48:1.0 56:0.021739130434782608 85:0.09090909090909091 91:0.05 94:0.3333333333333333 96:1.0 113:1.0 144:0.5 155:0.5 209:0.2 229:0.25 290:1.0 364:1.0 365:0.5 453:0.25 492:0.5 530:0.5 610:1.0 611:1.0 1710:1.0 2348:1.0 4231:1.0 4259:1.0
12 5:0.2 8:0.2 26:0.3333333333333333 38:0.5 52:1.0 56:0.021739130434782608 73:0.14285714285714285 201:0.3333333333333333 690:1.0 752:0.5 824:1.0 1394:1.0 2036:1.0 2299:1.0 3015:1.0
12 38:1.0 48:1.0 59:0.1 62:1.0 75:1.0 193:0.5 204:1.0 209:0.4 291:0.5 448:1.0 460:1.0 461:1.0 463:0.3333333333333333 503:0.25 531:2.0 967:1.0 1496:1.0 1817:1.0 2780:1.0 2992:1.0 4244:1.0 4674:1.0
12 5:0.2 8:0.2 18:0.2 48:1.0 59:0.1 73:0.14285714285714285 88:0.6666666666666666 270:0.5 323:0.2 358:1.0 397:0.09090909090909091 516:1.0 575:1.0 795:1.0 903:1.0 2290:0.5 3431:1.0
12 8:0.2 39:0.0967741935483871 91:0.05 120:0.5 130:0.3333333333333333 201:0.3333333333333333 216:0.25 220:1.0 252:0.3333333333333333 366:0.5 376:0.5 791:1.0 967:1.0 1463:0.5 1817:1.0 1836:1.0 2283:1.0 2674:1.0
12 15:1.0 30:1.0 48:1.0 59:0.1 155:0.5 290:1.0 1235:2.0 3812:1.0
12 18:0.4 26:0.3333333333333333 30:1.0 39:0.06451612903225806 46:0.25 73:0.14285714285714285 81:1.0 90:1.0 220:1.0 291:0.5 334:1.0 503:0.25 1168:1.0 1516:1.0 1893:1.0 1968:1.0
12 4:0.5 5:0.1 8:0.2 26:0.6666666666666666 75:1.0 144:0.5 201:0.3333333333333333 290:1.0 376:0.5 483:1.0 503:0.25 1081:0.5 1628:1.0 1685:1.0 2376:1.0 2674:1.0 2996:1.0
12 36:0.25 38:0.5 39:0.06451612903225806 43:0.5 46:0.25 56:0.021739130434782608 75:1.0 156:0.3333333333333333 205:1.0 288:1.0 330:1.0 453:0.25 603:1.0 620:1.0 685:0.25 827:1.0 1025:1.0 1065:1.0 1433:1.0 1652:1.0 2250:1.0 2348:1.0 2537:1.0 2996:1.0 3030:1.0 3825:1.0 4064:1.0 4700:1.0
12 5:0.1 35:1.0 36:0.25 38:0.5 39:0.06451612903225806 46:0.25 48:1.0 56:0.021739130434782608 85:0.18181818181818182 91:0.05 111:1.0 121:1.0 129:0.5 156:0.3333333333333333 209:0.4 228:0.5 323:0.2 371:0.25 563:1.0 668:0.5 690:1.0 1168:3.0 1443:1.0 1500:1.0 2563:1.0 3231:1.0 3416:1.0
12 5:0.2 8:0.2 38:0.5 72:1.0 91:0.05 213:0.25 252:0.3333333333333333 277:1.0 323:0.2 372:1.0 587:0.1 596:0.5 791:1.0 845:1.0 1474:1.0 1486:0.5 3174:1.0 3265:1.0
12 8:0.2 26:0.3333333333333333 38:1.5 39:0.06451612903225806 45:0.25 48:1.0 56:0.021739130434782608 91:0.05 137:1.0 228:0.5 256:1.0 557:1.0 657:0.5 763:1.0 791:1.0 1012:1.0 1299:1.0 1420:0.5 1567:1.0 2290:0.5 2348:1.0 3153:1.0 3168:1.0
12 5:0.1 14:0.2 18:0.4 38:0.5 48:1.0 56:0.021739130434782608 59:0.1 88:0.3333333333333333 96:1.0 120:0.5 126:1.0 127:1.0 155:0.5 199:0.3333333333333333 290:1.0 324:0.5 434:1.0 1017:1.0 1057:1.0 1081:0.5 1119:1.0 2271:1.0 2787:1.0 3069:1.0 3262:1.0
12 14:0.2 39:0.03225806451612903 72:1.0 219:1.0 268:0.5 657:0.5 1412:1.0 2301:1.0 2406:1.0 2778:1.0 3168:1.0
12 5:0.1 26:0.3333333333333333 38:0.5 39:0.03225806451612903 74:0.3333333333333333 155:0.5 163:1.0 268:0.5 290:1.0 397:0.09090909090909091 530:0.5 751:1.0 1364:1.0 1444:1.0 1496:1.0 1579:0.5 2101:1.0 2665:1.0 4308:0.5
12 26:0.3333333333333333 30:1.0 31:0.3333333333333333 64:0.16666666666666666 291:0.5 610:1.0 1489:1.0 2545:1.0 3739:1.0 4286:1.0 4433:1.0
12 8:0.2 14:0.2 39:0.03225806451612903 46:0.25 48:1.0 53:0.5 62:2.0 88:0.3333333333333333 91:0.05 114:0.16666666666666666 130:0.3333333333333333 284:1.0 291:0.5 799:1.0 1156:1.0 1474:1.0 1489:1.0 1496:1.0 1852:1.0 3002:1.0 4598:1.0
12 5:0.1 8:0.2 14:0.4 31:0.3333333333333333 38:1.0 39:0.06451612903225806 48:1.0 62:1.0 64:0.16666666666666666 88:0.3333333333333333 113:1.0 171:0.5 209:0.2 268:0.5 397:0.09090909090909091 453:0.25 593:1.0 736:1.0 878:1.0 1015:1.0 1176:1.0 1489:1.0 1552:1.0 1866:1.0 3217:1.0 3218:1.0 3712:1.0 4398:1.0 4484:1.0
12 7:0.5 8:0.6 18:0.2 25:1.0 26:0.3333333333333333 31:0.3333333333333333 66:0.1111111111111111 75:1.0 85:0.09090909090909091 176:1.0 180:1.0 201:0.6666666666666666 209:0.2 213:0.25 327:0.3333333333333333 329:0.5 448:1.0 571:1.0 786:0.3333333333333333 824:2.0 854:0.5 1463:0.5 1489:1.0 2805:1.0 2997:1.0 4757:1.0
12 5:0.2 14:0.4 26:0.3333333333333333 38:0.5 39:0.06451612903225806 48:1.0 62:1.0 64:0.16666666666666666 66:0.1111111111111111 81:1.0 96:1.0 156:0.3333333333333333 284:1.0 327:0.3333333333333333 335:0.5 397:0.09090909090909091 439:1.0 816:1.0 1081:0.5 1534:1.0 1624:0.5 4293:1.0 4468:1.0
12 4:0.5 5:0.1 18:0.2 38:1.0 39:0.06451612903225806 48:2.0 155:0.5 238:0.16666666666666666 258:1.0 283:1.0 290:1.0 291:0.5 353:0.06666666666666667 372:1.0 610:1.0 1390:1.0 2324:1.0 2467:1.0 3081:1.0 3103:1.0 4755:1.0
12 26:0.3333333333333333 39:0.06451612903225806 48:1.0 56:0.021739130434782608 59:0.1 74:0.3333333333333333 75:1.0 107:1.0 124:1.0 185:0.5 229:0.25 268:0.5 329:0.5 576:1.0 1496:1.0 2155:1.0 2397:1.0 2674:1.0 2981:1.0 4516:1.0
12 5:0.1 10:0.2 38:0.5 39:0.03225806451612903 43:0.5 46:0.25 73:0.14285714285714285 286:1.0 439:1.0 495:1.0 648:0.3333333333333333 652:1.0 1028:0.3333333333333333 2412:1.0
12 5:0.1 38:0.5 45:0.25 74:0.3333333333333333 156:0.3333333333333333 199:0.3333333333333333 587:0.1 1588:2.0 4598:1.0
12 26:0.6666666666666666 38:0.5 39:0.03225806451612903 66:0.2222222222222222 258:1.0 327:0.3333333333333333 475:1.0 515:0.3333333333333333 544:1.0 795:1.0 1325:1.0 2053:1.0 2751:1.0 2807:1.0 3738:1.0
12 5:0.1 14:0.2 38:0.5 88:0.3333333333333333 201:0.3333333333333333 209:0.2 228:0.5 241:0.2 477:1.0 1245:1.0 1385:1.0 1470:1.0 1500:1.0 1704:1.0 1817:1.0 1864:1.0 3218:1.0 3396:1.0
12 5:0.2 8:0.2 18:0.2 38:0.5 39:0.03225806451612903 48:2.0 66:0.1111111111111111 85:0.09090909090909091 144:0.5 146:1.0 155:0.5 156:0.3333333333333333 171:0.5 185:0.5 209:0.2 250:1.0 290:1.0 330:1.0 615:1.0 745:1.0 854:0.5 1062:1.0 1074:1.0 1081:0.5 1867:1.0 2348:1.0 2438:1.0 2592:1.0 2941:1.0 3407:1.0 3695:1.0 3778:1.0 3867:1.0 4355:1.0
12 26:0.3333333333333333 39:0.03225806451612903 59:0.1 113:1.0 209:0.2 223:0.3333333333333333 224:0.5 327:0.3333333333333333 477:1.0 673:0.5 772:1.0 794:1.0 1703:1.0 1707:1.0 2751:1.0 2992:1.0 3945:1.0 4802:1.0
12 14:0.2 39:0.03225806451612903 161:0.3333333333333333 418:0.5 477:1.0 1390:1.0 1517:1.0 1561:1.0 2995:1.0 3413:1.0
12 14:0.2 18:0.4 38:2.0 56:0.021739130434782608 66:0.2222222222222222 85:0.09090909090909091 88:0.3333333333333333 91:0.05 103:1.0 196:0.3333333333333333 198:0.5 453:0.25 473:0.5 550:0.3333333333333333 869:0.3333333333333333 1081:0.5 1545:1.0 1552:1.0 2460:1.0 2481:1.0 3131:1.0 4155:1.0 4757:1.0
12 5:0.2 26:0.3333333333333333 38:0.5 39:0.03225806451612903 75:1.0 201:0.3333333333333333 229:0.25 551:1.0 668:0.5 1081:0.5 1483:1.0 1642:1.0 2499:1.0 3196:1.0 4433:1.0
12 5:0.3 8:0.2 14:0.2 26:0.3333333333333333 144:1.0 156:0.3333333333333333 204:1.0 284:3.0 332:0.5 371:0.25 453:0.25 620:1.0 649:1.0 695:0.5 845:1.0 1214:1.0 1420:0.5 2097:1.0 2447:1.0 3079:1.0 3217:1.0 3875:1.0
12 18:0.2 39:0.06451612903225806 69:0.125 85:0.09090909090909091 89:0.3333333333333333 201:0.3333333333333333 209:0.2 213:0.25 223:0.3333333333333333 230:1.0 250:1.0 335:0.5 583:1.0 815:0.5 1074:1.0 1699:1.0 1829:1.0 2262:1.0 2353:1.0 2680:1.0 2904:1.0 3945:1.0 4418:1.0
12 7:0.5 8:0.2 18:0.2 38:0.5 39:0.03225806451612903 48:1.0 56:0.021739130434782608 62:1.0 72:1.0 91:0.15 95:0.25 193:0.5 209:0.2 241:0.2 335:0.5 353:0.06666666666666667 453:0.25 483:1.0 563:2.0 815:0.5 1074:1.0 1463:0.5 1500:1.0 1699:1.0 1700:1.0 2256:1.0 2421:1.0 2680:1.0
12 11:1.0 69:0.125 73:0.14285714285714285 88:0.3333333333333333 91:0.05 95:0.25 209:0.4 237:0.14285714285714285 252:0.3333333333333333 286:1.0 339:1.0 353:0.06666666666666667 498:0.2 1349:2.0 1541:1.0 1973:1.0 2992:1.0
12 5:0.1 69:0.125 85:0.09090909090909091 201:0.3333333333333333 224:0.5 233:0.5 291:0.5 306:1.0 330:1.0 371:0.25 636:1.0 1223:1.0 1593:1.0 1594:1.0 1742:1.0 3919:1.0
12 39:0.03225806451612903 69:0.125 75:1.0 201:0.3333333333333333 1101:1.0 1223:1.0 3919:1.0
12 5:0.2 18:0.2 32:1.0 38:0.5 89:0.3333333333333333 241:0.2 353:0.06666666666666667 473:0.5 1030:1.0 1444:1.0 2984:1.0 3812:1.0
12 30:1.0 68:1.0
12 10:0.2 38:1.0 39:0.03225806451612903 85:0.09090909090909091 96:1.0 144:0.5 146:1.0 196:0.3333333333333333 252:0.3333333333333333 324:0.5 353:0.06666666666666667 503:0.25 745:1.0 1339:1.0 1349:1.0 1995:0.3333333333333333 3368:1.0
12 18:0.2 26:0.6666666666666666 38:1.5 39:0.03225806451612903 42:1.0 88:0.3333333333333333 89:0.3333333333333333 95:0.25 114:0.08333333333333333 156:0.3333333333333333 353:0.06666666666666667 594:0.25 666:1.0 1133:1.0 1390:1.0 1407:1.0 1466:1.0 1511:1.0 1589:1.0 1660:0.3333333333333333 2414:1.0 2817:1.0 2849:1.0
12 5:0.1 14:0.2 18:0.2 38:0.5 39:0.06451612903225806 48:1.0 56:0.021739130434782608 66:0.1111111111111111 81:1.0 85:0.09090909090909091 88:0.3333333333333333 101:0.14285714285714285 114:0.08333333333333333 220:1.0 353:0.06666666666666667 366:0.5 593:1.0 618:1.0 671:1.0 824:1.0 1018:1.0 1230:1.0 1299:1.0 1390:1.0 1466:1.0 2290:0.5 2533:1.0 2948:1.0 3020:1.0 4041:1.0 4667:1.0
12 5:0.1 8:0.2 23:0.2 39:0.03225806451612903 85:0.09090909090909091 181:1.0 209:0.2 323:0.2 512:0.25 576:1.0 695:0.5 1094:0.5 1150:1.0 1420:0.5 1798:1.0 2005:1.0 2555:1.0
12 7:0.5 30:2.0 39:0.03225806451612903 64:0.16666666666666666 85:0.18181818181818182 100:1.0 107:1.0 144:0.5 156:0.3333333333333333 209:0.4 216:0.25 330:1.0 397:0.09090909090909091 483:1.0 486:0.3333333333333333 512:0.25 672:1.0 1252:1.0 2010:0.5 2259:1.0 2992:1.0 4139:1.0
12 5:0.1 32:1.0 38:0.5 39:0.06451612903225806 55:1.0 56:0.021739130434782608 72:1.0 156:0.3333333333333333 161:0.6666666666666666 193:0.5 209:0.2 221:0.3333333333333333 233:0.5 330:1.0 457:0.16666666666666666 463:0.3333333333333333 550:0.3333333333333333 563:1.0 596:0.5 721:0.3333333333333333 976:0.5 1390:1.0 1463:0.5 1537:1.0 1577:1.0 1589:1.0 2277:1.0 2781:1.0
12 4:0.5 39:0.03225806451612903 48:3.0 56:0.043478260869565216 57:1.0 199:0.3333333333333333 209:0.2 227:0.5 281:0.5 323:0.2 729:0.5 786:0.3333333333333333 1081:0.5 1463:0.5 1721:1.0 2156:1.0 2533:1.0 2746:1.0 4164:1.0 4790:1.0
12 14:0.2 18:0.6 23:0.2 27:0.5 36:0.25 39:0.03225806451612903 69:0.125 90:1.0 91:0.05 201:0.3333333333333333 252:0.3333333333333333 270:0.5 281:0.5 327:0.3333333333333333 472:0.3333333333333333 740:1.0 1488:1.0 1627:1.0 1829:1.0 1886:1.0 1887:1.0 2053:1.0 2680:1.0 3455:1.0 3778:1.0 4238:2.0
12 5:0.1 10:0.2 14:0.2 22:0.1 38:0.5 39:0.03225806451612903 56:0.021739130434782608 72:1.0 85:0.09090909090909091 89:0.3333333333333333 91:0.05 130:0.3333333333333333 307:1.0 492:0.5 512:0.25 1156:1.0 1531:1.0 1545:1.0 1858:1.0 2156:1.0 3812:1.0
12 4:1.0 5:0.2 18:0.2 34:0.2 48:1.0 56:0.021739130434782608 85:0.09090909090909091 91:0.05 209:0.2 230:1.0 365:0.5 502:1.0 557:1.0 1081:0.5 1420:0.5 1466:1.0 2273:1.0 2692:1.0 3036:1.0 3744:1.0 4212:1.0 4317:1.0
12 5:0.1 38:0.5 39:0.06451612903225806 43:0.5 72:1.0 85:0.09090909090909091 91:0.05 96:1.0 113:1.0 146:1.0 228:0.5 250:1.0 319:0.3333333333333333 323:0.2 371:0.25 386:0.5 593:1.0 1028:0.3333333333333333 1131:1.0 1561:1.0 1690:1.0 2171:1.0 2929:1.0 3778:1.0 4099:1.0
12 5:0.1 18:0.2 30:1.0 48:1.0 64:0.16666666666666666 72:1.0 91:0.05 267:1.0 1699:1.0 2460:1.0
12 8:0.2 22:0.1 39:0.03225806451612903 48:1.0 59:0.1 74:0.3333333333333333 75:1.0 85:0.09090909090909091 86:1.0 146:1.0 209:0.2 353:0.06666666666666667 358:1.0 620:1.0 640:1.0 1420:0.5 2804:1.0 3054:1.0 3213:1.0 3844:1.0
12 18:0.2 26:0.3333333333333333 30:1.0 39:0.03225806451612903 48:1.0 89:0.3333333333333333 95:0.5 156:0.3333333333333333 209:0.2 397:0.09090909090909091 620:1.0 626:1.0 663:1.0 1056:1.0 2348:1.0 3086:1.0
12 5:0.1 14:0.4 22:0.1 43:0.5 46:0.25 91:0.05 483:2.0 508:1.0 637:0.5 657:0.5 1742:1.0 2997:1.0 3718:1.0 4700:1.0
12 6:1.0 26:0.3333333333333333 30:1.0 39:0.03225806451612903 66:0.1111111111111111 91:0.05 161:0.3333333333333333 353:0.06666666666666667 1028:0.3333333333333333 1131:1.0 1164:1.0 1287:1.0
12 5:0.1 10:0.2 32:1.0 34:0.2 38:2.0 39:0.06451612903225806 46:0.25 73:0.14285714285714285 89:0.3333333333333333 91:0.05 156:0.3333333333333333 171:0.5 204:1.0 228:0.5 291:0.5 323:0.2 532:1.0 552:1.0 685:0.25 747:1.0 881:2.0 973:1.0 1325:1.0 1483:1.0 1486:0.5 1696:1.0 2219:1.0 2739:1.0 3002:1.0 4721:1.0
12 5:0.2 8:0.6 10:0.2 30:1.0 32:1.0 38:0.5 46:0.5 64:0.16666666666666666 91:0.05 204:1.0 209:0.2 216:0.25 248:0.5 282:0.5 291:0.5 453:0.25 563:1.0 685:0.25 795:1.0 1428:1.0 1444:1.0 1696:1.0 1711:1.0 2018:1.0 2244:1.0 3174:1.0 3259:1.0 4721:1.0
12 8:0.4 26:0.3333333333333333 30:1.0 38:0.5 39:0.03225806451612903 91:0.05 1012:1.0 1435:1.0 1687:1.0 2592:1.0 2869:1.0 4809:1.0
12 18:0.4 34:0.2 38:1.5 39:0.03225806451612903 69:0.125 88:0.6666666666666666 89:0.3333333333333333 114:0.25 185:0.5 199:0.3333333333333333 203:1.0 204:1.0 209:0.4 299:0.6666666666666666 323:0.2 372:1.0 445:1.0 463:0.3333333333333333 503:0.25 532:1.0 596:0.5 854:0.5 1027:1.0 1081:0.5 2656:1.0 3507:1.0
12 18:0.2 30:1.0 39:0.06451612903225806 48:1.0 74:0.3333333333333333 114:0.08333333333333333 201:0.3333333333333333 258:1.0 335:0.5 353:0.06666666666666667 615:1.0 1390:1.0 1496:1.0 1694:1.0 1907:1.0 2507:1.0 2911:1.0
12 7:0.5 10:0.2 27:0.5 34:0.2 38:1.5 46:0.25 64:0.16666666666666666 85:0.09090909090909091 100:1.0 144:0.5 185:0.5 201:0.3333333333333333 209:0.6 397:0.09090909090909091 453:0.25 463:0.3333333333333333 483:1.0 1094:0.5 1567:1.0 2053:1.0 4350:1.0
12 39:0.03225806451612903 371:0.25 418:0.5 445:1.0 1350:1.0 1561:1.0 1579:0.5 2171:1.0
12 5:0.1 14:0.2 18:0.2 26:0.3333333333333333 38:1.0 39:0.03225806451612903 85:0.09090909090909091 88:0.3333333333333333 209:0.2 426:0.5 652:1.0 685:0.25 723:1.0 824:1.0 1012:1.0 1848:1.0 2171:1.0 2393:1.0 2717:1.0 2971:1.0 3303:1.0 3889:1.0 4463:1.0
12 14:0.2 18:0.2 38:0.5 39:0.03225806451612903 46:0.25 56:0.043478260869565216 89:0.3333333333333333 91:0.05 209:0.4 237:0.2857142857142857 593:1.0 594:0.25 616:1.0 1578:1.0 4632:1.0 4634:1.0
12 49:1.0 69:0.125 85:0.09090909090909091 118:1.0 209:0.2 365:0.5 648:0.3333333333333333 1578:1.0
12 18:0.2 46:0.25 69:0.125 209:0.2 251:1.0 252:0.3333333333333333 353:0.06666666666666667 575:1.0 836:1.0 1390:1.0 1463:0.5 1486:0.5 3323:1.0 3376:1.0
12 69:0.125 81:1.0 88:0.3333333333333333 114:0.08333333333333333 209:0.2 353:0.06666666666666667 376:0.5 457:0.16666666666666666 1353:1.0 1486:0.5 3523:1.0
12 5:0.1 18:0.4 38:0.5 62:1.0 69:0.125 114:0.16666666666666666 144:0.5 180:1.0 198:0.5 209:0.2 282:0.5 291:0.5 323:0.2 418:0.5 759:1.0 799:1.0 854:0.5 1887:1.0 1895:0.5 2941:1.0 3822:1.0
12 5:0.1 18:0.2 69:0.125 85:0.09090909090909091 185:0.5 201:0.3333333333333333 209:0.2 353:0.06666666666666667 450:1.0 610:1.0 1017:1.0 1339:2.0 1538:1.0
12 5:0.1 31:0.3333333333333333 39:0.03225806451612903 69:0.125 73:0.14285714285714285 74:0.3333333333333333 88:0.3333333333333333 120:0.5 185:0.5 199:0.3333333333333333 209:0.6 397:0.09090909090909091 1887:1.0 2477:1.0 2911:1.0
12 39:0.03225806451612903 89:0.3333333333333333 130:0.3333333333333333 209:0.2 228:0.5 331:1.0 397:0.09090909090909091 1275:1.0 1443:1.0
12 3:1.0 4:0.5 8:0.2 26:0.3333333333333333 39:0.03225806451612903 46:0.25 48:1.0 51:1.0 64:0.16666666666666666 66:0.1111111111111111 101:0.14285714285714285 237:0.14285714285714285 284:1.0 302:1.0 353:0.06666666666666667 371:0.25 729:0.5 795:1.0 824:1.0 854:0.5 1463:0.5 1568:1.0 1887:1.0 2533:1.0 2570:1.0 2596:1.0
12 56:0.021739130434782608 72:1.0 185:0.5 327:0.3333333333333333 353:0.06666666666666667 1030:1.0 1949:1.0 2768:1.0 2980:1.0 3841:1.0
12 18:0.2 69:0.125 91:0.05 193:0.5 290:1.0 323:0.2 353:0.06666666666666667 723:1.0 3107:1.0
12 5:0.2 8:0.2 10:0.4 18:0.2 26:0.6666666666666666 30:1.0 31:0.3333333333333333 39:0.0967741935483871 66:0.1111111111111111 85:0.09090909090909091 94:0.3333333333333333 221:0.3333333333333333 290:1.0 353:0.06666666666666667 618:2.0 786:0.3333333333333333 843:1.0 1390:1.0 1435:1.0 1699:1.0 1816:1.0 1817:1.0 1887:1.0 2471:1.0 2656:1.0 2994:1.0 3532:1.0 4809:1.0
12 5:0.1 31:0.3333333333333333 39:0.03225806451612903 56:0.021739130434782608 57:1.0 66:0.1111111111111111 119:1.0 129:0.5 199:0.3333333333333333 209:0.2 252:0.3333333333333333 257:0.5 353:0.06666666666666667 608:1.0 843:1.0 1074:1.0 1390:1.0 1887:1.0 2471:1.0
12 5:0.1 18:0.6 30:1.0 31:0.3333333333333333 39:0.06451612903225806 59:0.1 85:0.18181818181818182 120:0.5 156:0.3333333333333333 176:1.0 201:0.3333333333333333 224:0.5 227:0.5 228:0.5 593:1.0 714:0.3333333333333333 1056:1.0 1443:1.0 1463:0.5 1561:1.0 1823:1.0 1833:1.0 2171:1.0 2281:1.0 2739:1.0 2927:1.0 3542:1.0 3543:1.0 3778:1.0
12 5:0.1 8:0.2 18:0.2 30:1.0 56:0.021739130434782608 91:0.05 119:1.0 124:1.0 155:0.5 156:0.3333333333333333 209:0.2 221:0.3333333333333333 270:0.5 290:2.0 401:1.0 509:1.0 690:1.0 1463:0.5 1511:1.0 1525:1.0 1705:1.0 1759:1.0 2092:1.0 2131:1.0
12 5:0.1 14:0.2 18:0.2 22:0.1 39:0.06451612903225806 91:0.05 172:0.5 221:0.3333333333333333 301:1.0 353:0.06666666666666667 751:1.0 1012:1.0 1228:1.0 1496:1.0 1742:1.0 3537:1.0
12 5:0.1 18:0.2 38:0.5 62:1.0 88:0.3333333333333333 103:1.0 146:2.0 156:0.3333333333333333 201:0.3333333333333333 209:0.2 286:1.0 301:1.0 353:0.06666666666666667 453:0.25 1328:1.0 1503:0.5 1705:1.0 1994:1.0 2155:1.0 4370:1.0 4598:1.0
12 5:0.1 18:0.4 22:0.1 26:0.6666666666666666 39:0.03225806451612903 43:0.5 48:2.0 56:0.021739130434782608 59:0.1 62:1.0 69:0.125 91:0.1 127:1.0 185:0.5 199:0.3333333333333333 201:0.3333333333333333 204:1.0 209:0.4 258:1.0 290:1.0 339:1.0 1302:0.5 1390:1.0 2228:0.5 2700:1.0
12 18:0.2 22:0.1 39:0.03225806451612903 69:0.125 91:0.05 114:0.08333333333333333 169:1.0 209:0.2 2019:1.0 2416:1.0
12 18:0.4 23:0.2 39:0.03225806451612903 56:0.021739130434782608 59:0.1 125:0.16666666666666666 156:0.3333333333333333 239:1.0 353:0.06666666666666667 599:1.0 1056:1.0 1887:1.0 2238:1.0
12 5:0.2 18:0.4 26:0.3333333333333333 30:1.0 36:0.25 38:1.0 48:1.0 95:0.25 96:1.0 146:1.0 185:0.5 201:0.3333333333333333 209:0.2 270:0.5 330:1.0 459:1.0 654:1.0 695:0.5 1045:1.0 2119:1.0 2281:1.0 3778:1.0 3938:1.0 4147:1.0
12 5:0.1 14:0.2 18:0.2 39:0.03225806451612903 172:0.5 211:1.0 301:1.0 353:0.06666666666666667 587:0.1 759:1.0 1496:1.0
12 14:0.2 26:0.3333333333333333 46:0.25 59:0.1 62:1.0 100:1.0 405:0.5 1339:1.0 2171:1.0
12 26:0.3333333333333333 39:0.03225806451612903 46:0.25 48:1.0 59:0.1 100:1.0 290:1.0 405:0.5 1228:1.0 1339:1.0 2171:1.0 3979:1.0
12 4:0.5 5:0.2 18:0.2 26:0.3333333333333333 30:1.0 39:0.03225806451612903 46:0.25 56:0.021739130434782608 62:1.0 67:0.25 95:0.25 114:0.08333333333333333 124:1.0 146:1.0 156:0.3333333333333333 201:0.3333333333333333 371:0.25 453:0.25 503:0.25 509:1.0 803:1.0 1074:1.0 1275:1.0 1987:1.0 2171:1.0 2281:1.0 2592:1.0 2980:1.0 3012:1.0
12 18:0.2 46:0.25 88:0.3333333333333333 192:0.5 238:0.16666666666666666 397:0.09090909090909091 453:0.25 587:0.1 2980:1.0 3683:1.0
12 5:0.1 14:0.2 26:0.3333333333333333 31:0.3333333333333333 39:0.03225806451612903 48:1.0 85:0.09090909090909091 88:0.3333333333333333 95:0.25 146:1.0 201:0.3333333333333333 418:0.5 512:0.25 1353:1.0 1496:1.0 1544:1.0 2281:1.0 2980:1.0
12 26:0.3333333333333333 30:1.0 39:0.03225806451612903 56:0.021739130434782608 89:0.3333333333333333 91:0.1 146:1.0 161:0.3333333333333333 220:1.0 271:1.0 330:1.0 751:1.0 845:1.0 1496:1.0 1641:1.0 2499:1.0 2555:1.0 2817:1.0 4616:1.0
12 5:0.2 8:0.2 39:0.0967741935483871 48:2.0 51:1.0 56:0.06521739130434782 62:1.0 72:1.0 85:0.18181818181818182 130:0.3333333333333333 199:0.3333333333333333 209:0.2 216:0.25 221:0.3333333333333333 237:0.14285714285714285 247:1.0 291:0.5 372:1.0 473:0.5 618:2.0 620:1.0 679:1.0 805:1.0 895:1.0 1420:0.5 1428:1.0 1492:1.0 2520:1.0 2555:1.0
12 5:0.2 8:0.2 26:0.3333333333333333 38:1.5 39:0.03225806451612903 46:0.25 48:1.0 55:1.0 62:1.0 91:0.05 114:0.25 120:0.5 180:1.0 216:0.25 220:1.0 228:0.5 248:0.5 323:0.2 329:0.5 331:1.0 495:1.0 618:1.0 619:1.0 665:1.0 854:0.5 868:1.0 961:1.0 1012:1.0 1579:0.5 1694:1.0 1699:1.0 2356:1.0 2371:1.0 2380:0.5 3217:1.0 3218:1.0
12 4:1.0 5:0.2 10:0.2 22:0.2 23:0.4 34:0.2 35:1.0 38:1.0 39:0.03225806451612903 64:0.16666666666666666 75:1.0 100:1.0 114:0.08333333333333333 129:0.5 180:1.0 193:0.5 199:0.3333333333333333 209:0.2 243:0.5 268:0.5 397:0.09090909090909091 398:0.5 445:1.0 503:0.5 571:1.0 606:1.0 691:1.0 763:1.0 824:2.0 1028:0.3333333333333333 1041:1.0 1390:1.0 2773:1.0 2905:1.0 3085:1.0 3218:1.0 3428:1.0 4592:1.0
12 3:1.0 4:0.5 5:0.2 26:0.6666666666666666 30:1.0 39:0.03225806451612903 48:2.0 66:0.1111111111111111 75:1.0 85:0.09090909090909091 89:0.3333333333333333 156:0.6666666666666666 228:0.5 241:0.2 251:1.0 397:0.09090909090909091 492:0.5 1271:0.5 1425:1.0 1443:1.0 1699:2.0 2109:1.0 2680:1.0 2997:2.0 3217:1.0 3218:1.0 4342:1.0
|
bea620e4b35a2388ee35fe29974a33179423a764 | 449d555969bfd7befe906877abab098c6e63a0e8 | /10/CH10/EX2/cha10_2.sce | 2bd67fa6823c9ea3b0868d9532eea0a0d1e03b45 | [] | 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 | 152 | sce | cha10_2.sce | Vp=120;Angle=60;
t0=%pi/2
t1=t0:0.01:(210/360*2*%pi);
integrate('2^.5*120*sin(t)','t',t0,t1)
Vo=((3*sqrt(6))/(2*%pi))*120*cos(%pi*Angle/180) |
9eaa04cc201597c4d17e6eb45a1b0e249c96b208 | 0cb85cd0c88a9b9f0cca4472742c2bf9febef2d8 | /klava/kernel/ntreelib/tests/open1.tst | 6d9f0e4d773d00a65b65ecaad1b4032bb333d6c6 | [] | no_license | seth1002/antivirus-1 | 9dfbadc68e16e51f141ac8b3bb283c1d25792572 | 3752a3b20e1a8390f0889f6192ee6b851e99e8a4 | refs/heads/master | 2020-07-15T00:30:19.131934 | 2016-07-21T13:59:11 | 2016-07-21T13:59:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 214 | tst | open1.tst |
create bar.td
trace on
add 0x1111 "'foo bar baz qux quux'"
print
commit
dumpb
close
open bar.td
trace on
add 0x2222 "'foo bar abcd efgh'"
print
dumpb
commit
dumpb
close
open bar.td
dumpb
|
1b6130a46a0621b84358a7732209793114722f78 | 449d555969bfd7befe906877abab098c6e63a0e8 | /680/CH12/EX12.09/12_09.sce | 603eec6f45b84aba10a70b77a268e4ab0ee99340 | [] | 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 | 678 | sce | 12_09.sce | //Problem 12.09:
//initializing the variables:
//Antoine Eq Coeff for Methanol
Am = 16.5938;
Bm = 3644.3;
Cm = 239.76;
//Antoine Eq Coeff for water
Aw = 16.262;
Bw = 3799.89;
Cw = 226.35;
p = 101.325; // in kpa
//calculation:
//The saturation temperatures:
Tsat_m = (Bm/(Am - log(p))) - Cm
Tsat_w = (Bw/(Aw - log(p))) - Cw
T = 70
xm = (p - %e^(Aw - (Bw/(T + Cw))))/((%e^(Am - (Bm/(T + Cm)))) - %e^(Aw - (Bw/(T + Cw))))
ym = xm*125.07/p
printf("\n\nResult\n\n")
printf("\n mole fraction at 70 degC xm = %.3f and ym = %0.3f \n To generate a T-x, y diagram, plot the xm and ym data as the ordinate and temperature as the abscissa. See Fig. 12.6.",xm, ym)
|
a42c76e4157931eb730adca3874e72962d79882b | 449d555969bfd7befe906877abab098c6e63a0e8 | /539/CH9/EX9.1/Example_9_1.sce | d1cb4a358ce333c263de6d9e7ff006e7886735e2 | [] | 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 | 297 | sce | Example_9_1.sce | //Lever Rule derivation
clear;
clc;
printf("\tExample 9.1\n");
disp("Since only 2 phases are present");
disp("W_alpha + W_L = 1");
disp("W_alpha*C_alpha + W_L*C_L = C0");
disp("hence");
disp("W_L = (C_alpha-C0)/(C_alpha-C_L)");
disp("W_alpha = (C0-C_L)/(C_alpha-C_L)");
//End |
5c5eca55920f7052207273aa3f0283a23e1534cb | 948c6e0314c1822f872350cf63aaceb3d28fa497 | /tests/test-print-NONE.tst | 4bf4a505dc98913a14467d0814eb1bd050b8eb2f | [
"Apache-2.0"
] | permissive | archiecobbs/bom | 832eb815b40f4955e6551496bdd2598cb4f00442 | 0bab1a015bb5e53345e5422902e16f802bd4c07f | refs/heads/main | 2023-08-25T05:43:51.470221 | 2021-11-04T16:12:49 | 2021-11-04T16:12:49 | 417,213,171 | 1 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 62 | tst | test-print-NONE.tst | FLAGS='--print NONE'
STDIN=''
STDOUT=''
STDERR=''
EXITVAL='0'
|
14d26c4462e547f2e1e09e00424ea6beec4d0269 | 449d555969bfd7befe906877abab098c6e63a0e8 | /69/CH15/EX15.8/15_8.sce | 513687b64f0e4f952fbb2ad490b7f290b7d3d0c3 | [] | 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 | 263 | sce | 15_8.sce | clear; clc; close;
Vz = 12;
Vbe = 0.7;
Vi = 20;
Rl = 5*10^(3);
Ic = 2.26*10^(-3);
Beta = 50;
R = 220;
Vo = Vz-Vbe;
Vce = Vi-Vo;
Ir = (Vi-Vz)/R;
Il = Vo/Rl;
Ib = Ic/Beta;
Iz = Ir-Ib;
disp(Vo,'Output voltage = ');
disp(Iz,'Zener current = ');
|
da5cd6bebe20c1b3d0f3f7f5a6af42a54c43a7db | 584105ff5b87869494a42f632079668e4c3f82de | /Help-files/filterSpeckles.sci | 6a3206fdc55c6ac70b751013bc9d97f4227fd936 | [] | no_license | kevgeo/FOSSEE-Computer-Vision | 0ceb1aafb800580498ea7d79982003714d88fb48 | 9ca5ceae56d11d81a178a9dafddc809238e412ba | refs/heads/master | 2021-01-17T21:11:31.309967 | 2016-08-01T14:45:40 | 2016-08-01T14:45:40 | 63,127,286 | 6 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,701 | sci | filterSpeckles.sci | // Filters off smalll speckles(blobs) in disparity map
//
// Calling Sequence
// img = filterSpeckles(disp,newval,maxSpeckleSize,maxDiff);
//
// Parameters
// Input
// disp: disparity map
// newval: disparity value to paint off the speckles
// maxSpeckleSize: maximum size to consider as speckle
// maxDiff: Maximum difference value between neighbour disparity pixels to put them into same speckle(blob).
// Output
// img: filtered disparity image
//
// Description
// The function filters off smalll speckles(blobs) in the disparity map.
//
// Examples
// //Reading first stereo image
// I1 = imread("stereo1.png");
// //Reading second stereo image
// I2 = imread("stereo2.png");
// //Number of disparities
// numofDisparities = 144;
// //Minimum of disparity value
// minDisparity = 0;
// //Matched blocked size
// sadwindowsize = 3;
// //Get first parameter controlling disparity smoothness
// p1 = 36;
// //Get second parameter controlling disparity smoothness
// p2 = 288;
// //Get maximum allowed difference value
// maxDiff = 1;
// //Get prefilterCap value
// prefilterCap = 10;
// //Get unique ratio value
// uniquenessratio = 10;
// //Get speckle window size value
// speckleWindowSize = 100;
// //Get speckle range value
// SpeckleRange = 32;
// //Get fullDp value
// fullDP = 1;
// disp = disparitySGBM(I1,I2,numofDisparities,minDisparity,sadwindowsize,p1,p2,maxDiff,prefilterCap,uniquenessratio,speckleWindowSize,SpeckleRange,fullDP);
// //Get disparity value to paint off speckles
// newval = 5;
// //Get maximum speckle size
// maxSpeckleSize = 12;
// //Get maxxDiff value
// maxDiff = 3;
// img = filterSpeckles(disp,newval,maxSpeckleSize,maxDiff);
//
// Author
// Kevin George
//
|
e65627fc997b7c838a640264f6f64d890c44ca2b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2240/CH34/EX33.22/EX33_22.sce | 2c8b5db24e741c1d22722bb5c8fdd0cd879e084f | [] | 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 | 673 | sce | EX33_22.sce | // Grob's Basic Electronics 11e
// Chapter No. 33
// Example No. 33_22
clc; clear;
// R1 is 1 kOhms and R2 is 100 kOhms. Calculate UTP, LTP, and VH.
// Given data
R1 = 1*10^3; // Resistance1=1 kOhms
R2 = 100*10^3; // Resistance2=100 kOhms
Vcc = 15; // Applied votage=15 Volts
Vsat = 13; // Assume Saturation voltage=13 Volts
Beta = R1/(R1+R2);
Utp = Beta*Vsat;
disp(Utp,'The Upper Trigger Point in Volts')
disp ('i.e 128.7 mVolts')
Ltp = -Beta*Vsat;
disp(Ltp,'The Lower Trigger Point in Volts')
disp ('i.e -128.7 mVolts')
Vh = Utp-Ltp;
disp (Vh,'The Hysterisis Voltage in Volts')
disp ('i.e 257.4 mVolts')
|
c6d20a4abe7196fba7fc78e368bf6d4f94b095f3 | c2c094e5792a8d99eec660157b9b22bf111f175b | /Hardware/MMux8Way.tst | 4467020ab855d3911f0952266a910e19f7029500 | [] | no_license | z2512690268/nand2teris | 087bfbdb56fee154ee76d7d9e8d75a92a246be04 | 6f190f3d77b7b24fb0f2ae3a56691b2d60a19c33 | refs/heads/main | 2023-04-19T00:21:49.516211 | 2021-05-05T12:10:30 | 2021-05-05T12:10:30 | 364,537,511 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,889 | tst | MMux8Way.tst | load MMux8Way.hdl,
output-file MMux8Way.out,
output-list a b c d e f g h sel%B1.3.1 out%B2.1.2;
set a 1,
set b 1,
set c 1,
set d 0,
set e 0,
set f 1,
set g 0,
set h 1,
set sel %B001,
eval,
output;
set a 0,
set b 1,
set c 0,
set d 1,
set e 0,
set f 0,
set g 1,
set h 1,
set sel %B101,
eval,
output;
set a 1,
set b 1,
set c 0,
set d 1,
set e 1,
set f 0,
set g 0,
set h 0,
set sel %B111,
eval,
output;
set a 0,
set b 0,
set c 0,
set d 0,
set e 1,
set f 1,
set g 0,
set h 1,
set sel %B010,
eval,
output;
set a 1,
set b 1,
set c 1,
set d 0,
set e 0,
set f 0,
set g 1,
set h 1,
set sel %B101,
eval,
output;
set a 0,
set b 0,
set c 0,
set d 0,
set e 1,
set f 1,
set g 0,
set h 0,
set sel %B111,
eval,
output;
set a 0,
set b 0,
set c 0,
set d 1,
set e 0,
set f 0,
set g 1,
set h 0,
set sel %B101,
eval,
output;
set a 0,
set b 1,
set c 1,
set d 0,
set e 0,
set f 0,
set g 1,
set h 1,
set sel %B101,
eval,
output;
set a 0,
set b 1,
set c 0,
set d 1,
set e 1,
set f 0,
set g 1,
set h 1,
set sel %B111,
eval,
output;
set a 0,
set b 0,
set c 0,
set d 1,
set e 0,
set f 1,
set g 1,
set h 0,
set sel %B000,
eval,
output;
set a 1,
set b 1,
set c 1,
set d 1,
set e 1,
set f 1,
set g 0,
set h 1,
set sel %B111,
eval,
output;
set a 0,
set b 0,
set c 0,
set d 1,
set e 0,
set f 1,
set g 0,
set h 0,
set sel %B000,
eval,
output;
set a 1,
set b 1,
set c 1,
set d 1,
set e 1,
set f 1,
set g 0,
set h 0,
set sel %B110,
eval,
output;
set a 1,
set b 0,
set c 0,
set d 1,
set e 0,
set f 0,
set g 1,
set h 1,
set sel %B011,
eval,
output;
set a 0,
set b 0,
set c 0,
set d 0,
set e 1,
set f 0,
set g 0,
set h 1,
set sel %B010,
eval,
output;
set a 1,
set b 1,
set c 0,
set d 1,
set e 1,
set f 1,
set g 0,
set h 0,
set sel %B110,
eval,
output;
|
fdb6d08bdacc9a174395f0975f3306165b471c64 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.3.1/macros/metanet/line_graph.sci | cc0c4a6149a31350182ab1634b5c59d3df141adf | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain",
"MIT"
] | 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 | 608 | sci | line_graph.sci | function [g1]=line_graph(g)
[lhs,rhs]=argn(0)
if rhs<>1 then error(39), end
tta=g('tail');hhe=g('head');
ta=[tta hhe];he=[hhe tta];
ma=prod(size(g('tail')));
ta1=[];he1=[];
for i=1:(2*ma),
ist=ta(i);iar=he(i);
ij=find(ta==ist);ij=ij-int((ij-0.1)/ma)*ma;ij=ij(find(ij>i));
jk=find(he==iar);jk=jk-int((jk-0.1)/ma)*ma;jk=jk(find(jk>i));
ke=[ij jk];ka=i*ones(ke);
ta1=[ta1 ka];he1=[he1 ke];
end;
g1=make_graph('foo',0,ma,ta1,he1);
xi=g('node_x');yi=g('node_y');
if (xi<>[]) then
x1i=0.5*(xi(tta)+xi(hhe));
g1('node_x')=x1i;
end
if (yi<>[]) then
y1i=0.5*(yi(tta)+yi(hhe));
g1('node_y')=y1i;
end
|
7858e1817b8ba80467953d0f7ecc2ae50ed96c35 | 449d555969bfd7befe906877abab098c6e63a0e8 | /964/CH18/EX18.4/18_4.sce | cac5142430bfabfafefb168f3da1f9e52d9fe940 | [] | 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 | 391 | sce | 18_4.sce | //clc()
x = 2;
x0 = 1;
m = 0;
x1 = 4;
n = 1.386294;
x3 = 5;
p = 1.609438;
x2 = 6;
o = 1.791759;
f01 = (m - n)/(x0 - x1);
f12 = (n - o)/(x1 - x2);
f23 = (p - o)/(x3 - x2);
f210 = (f12 - f01)/(x2 - x0);
f321 = (f23 - f12)/(x3 - x1);
f0123 = (f321 - f210) / (x3 - x0);
b0 = m;
b1 = f01;
b2 = f210;
b3 = f0123;
R2 = b3 * (x - x0) * (x - x1)*(x-x2);
disp(R2,"error R2 = ")
|
8af36bf05cfd35e9b04f9d169b7d746dae9d9288 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3836/CH12/EX12.6/Ex12_6.sce | a8ccc8f3f4d9a2044bc50f185145039d423e84cd | [] | 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 | 708 | sce | Ex12_6.sce | clear
//Initialization
r1=10 //Resistance in Ohm
r2=5 //Resistance in Ohm
v2=5 //voltage source
i=2 //current in Amp
//Calculation
//Considering 5 V as a source & replace the current source by its internal resistance,
i1=v2*(r1+r2)**-1 //current using Ohms law
//Considering current source & replace the voltage source by its internal resistance,
r3=(r1*r2)*(r1+r2)**-1 //resistance in parallel
v3=i*r3 //voltage using Ohms law
i2=v3*r2**-1 //current using Ohms law
i3=i1+i2 //total current
//Results
printf("\n Output Current, I = %.2f A",i3)
|
64e142e79e2c9037cf41ab437cbe632f1082a118 | 6eb42df0d9f452fee0d084e0b0058e4e4ac242ef | /Updated_Exercises_March_2015/Miscellaneous/Waves/AnalWaveSol.sce | e2e2d6e8e9ff3c39b6a69aeb0d4f09e93c8f034d | [] | no_license | huangqingze/ocean_modelling_for_beginners | b21c1b398efe91e4a3aa1fa5a1d732e2eb4ec16e | 3e73a511480c73f4e38b41c17b2defebb53133ed | refs/heads/main | 2023-07-03T12:00:01.326399 | 2021-08-14T21:16:12 | 2021-08-14T21:16:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,401 | sce | AnalWaveSol.sce | //*******************************************
// Scilab script for visualisation of the
// dynamics of long surface gravity waves.
//
// Use the help facility for more information
// on individual functions used.
//
// Author: J. Kaempf, 2015 (update)
//********************************************
clf; scf(0); a=gcf(); a.figure_size= [800,400];
len = 500.0; // wavelength of wave
eta0 = 1.0; // amplitude of wave
g = 9.81; // acceleration due to gravity
h = 20.0; // water depth
c = sqrt(g*h); // phase speed
per = len/c; // period of wave
u0 = eta0*sqrt(g/h); // u amplitude
xrange = 2*len; //x-range shown in animation
x=[0:xrange/20:xrange]'; // discrete grid points in x-direction
t = 0.; // start time
trange = 2*per; // simulate 2 wave periods
dt = trange/100.; // time step
ntot=trange/dt; // number of iteration steps
// initial locations of fluid parcels
xpos1 = x; zpos1(1:21) = 1.0; xpos2 = x; zpos2(1:21) = 6.0;
xpos3 = x; zpos3(1:21) = 11.0; xpos4 = x; zpos4(1:21) = 16.0;
for n = 1:ntot // start of iteration
drawlater; clf();
eta = eta0*sin(2*%pi*(x/len-t/per)); // solution for eta
u = u0*sin(2*%pi*(x/len-t/per)); // solution for u
dwdz = -2*%pi*u0/len*cos(2*%pi*(x/len-t/per)); // vertical gradient of w
// new locations
xpos1 = xpos1+dt*u; w = dwdz.*zpos1; zpos1 = zpos1+dt*w;
xpos2 = xpos2+dt*u; w = dwdz.*zpos2; zpos2 = zpos2+dt*w;
xpos3 = xpos3+dt*u; w = dwdz.*zpos3; zpos3 = zpos3+dt*w;
xpos4 = xpos4+dt*u; w = dwdz.*zpos4; zpos4 = zpos4+dt*w;
// draw graphs
xset("thickness",2)
plot2d(xpos1,-h+zpos1,-9);
plot2d(xpos2,-h+zpos2,-9);
plot2d(xpos3,-h+zpos3,-9);
plot2d(xpos4,-h+zpos4,-9);
plot2d(x,eta,2,'000');
b = gca(); b.font_size = 3; b.data_bounds = [0,-20;1000,2];
b.auto_ticks = ["off","off","on"]; b.sub_ticks = [3,3];
b.x_ticks = tlist(["ticks", "locations","labels"],..
[0 200 400 600 800 1000], ["0" "200" "400" "600" "800" "1000"]);
b.y_ticks = tlist(["ticks", "locations","labels"],..
[-20 -15 -10 -5 0], ["-20" "-15" "-10" "-5" "0"]);
xset("thickness",1); xset("font size",3);
drawnow; xpause(2d4);
t = t+dt; // time progresses forward
//if n < 10 then
// xs2gif(0,'ex100'+string(n)+'.gif')
//else
// if n < 100 then
// xs2gif(0,'ex10'+string(n)+'.gif')
// else
// xs2gif(0,'ex1'+string(n)+'.gif')
// end
//end
end; // reference point for iteration loop
|
5f2d139135882bd2a83656f3895f482d7e5ded55 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2372/CH2/EX2.5/ex5.sce | f1255f9a967082d8204c5d5672d1659610572a3b | [] | 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 | 942 | sce | ex5.sce | clc;
clear;
ang1=-5*%pi/180;
v1=complex(120*cos(ang1),120*sin(ang1));
v2=100;
z=complex(1,7);//line impedance
i12=(v1-v2)/z;
i21=(v2-v1)/z;
s12=v1*i12';
s21=v2*i21';
sl=s12+s21;//line loss
mprintf("since p1 is negative and p2 is positive,source1 receives %3.1f W and source 2 generates %4.1f W and the real power loss in the line is %2.1f W. the real power loss in the line can be checked by:\n",abs(real(s12)),real(s21),real(sl));
r=real(z);//resistance of line
x=imag(z);//impedance of line
pl=r*abs(i12)*abs(i12);
mprintf("verifying active power loss in line,pl=%2.1f W\n",pl);
mprintf("also q1 is positive and q2 is negative, source1 delivers %4.1f var and source2 receives %4.1f var, and reactive power loss in line is %3.1f var. the reactive power loss in the line can be checked by :\n",imag(s12),abs(imag(s21)),imag(sl));
ql=x*abs(i12)*abs(i12);
mprintf("verifying reactive power loss in line, ql=%3.1f var\n",ql);
|
e489e1996028184b9d8e1c0045ce25ae8f34b88d | 449d555969bfd7befe906877abab098c6e63a0e8 | /3733/CH34/EX34.7/Ex34_7.sce | 56bd38035df1e012a554fe9ebaaa44dcd98417f2 | [] | 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 | 883 | sce | Ex34_7.sce | // Example 34_7
clc;funcprot(0);
//Given data
L_p=10;// MW
// I=5*10^6(18+12L+0.5L^2)
L_1=5;// MW
L_2=7;// MW
// Calculation
//(a)
// n=(L/I)=(1/(5*10^6((18/L)+12+0.5L)));
// The efficiency will be maximum when ((18/L)+12+0.5L)),differentiating we get
L_m=sqrt((-18)/(-0.5));// MW
L=L_m*10^3*3600;// kJ/hr
I_6=5*10^6*(18+(12*L_m)+(0.5*L_m^2));// kJ/hr
n_max=(L/I_6)*100;// Maximum efficiency in %
printf('\n(a)The load at which the efficiency of the plant will be maximum=%0.0f MW \n The maximum efficiency=%0.0f percentage',L_m,n_max);
//(b)
I_5=5*10^6*(18+(12*L_1)+(0.5*L_1^2));// kJ/hr
I_7=5*10^6*(18+(12*L_2)+(0.5*L_2^2));// kJ/hr
dI=I_7-I_5;// Increase in output to the plant per hour in kJ/hr
L=(L_1+L_2)/2;// MW
IR=5*10^6*(12+L);// kJ/hr
Ti=IR*(L_2-L_1);// Total increase in input in kJ/hr
printf('\n(b)Total increase in input=%0.2e kJ/hr',Ti);
|
b56c1e062fd2c1815fc9619a14d06736dffd7136 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1544/CH1/EX1.8/Ch01Ex8.sce | 85c9d3db5a9d50340aaae67167c13349a273e04b | [] | 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 | 363 | sce | Ch01Ex8.sce | // Scilab code Ex1.8: Pg 14 (2008)
clc; clear;
V = 24; // Potential difference,V
R = 15; // Resistance, ohms
// From Ohm's law, V = I*R, then solving for I
I = V/R; // Electric current, A
printf("\nThe current flowing through the resistor = %3.1f A", I)
// Result
// The current flowing through the resistor = 1.6 A
|
a2fcc41631ba9854c796741d8090b2cda995040e | 449d555969bfd7befe906877abab098c6e63a0e8 | /764/CH10/EX10.14.a/data10_14.sci | c6512d445f8e224c150143f71a5e066555683029 | [] | 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 | 580 | sci | data10_14.sci | //(Springs) Example 10.14
//Diameter of the eccentric cam d (mm)
d = 100
//Eccentricity e (mm)
e = 10
//Minimum force on the spring Pmin (N)
Pmin = 100
//Maximum force on the spring Pmax (N)
Pmax = 350
//The permissible shear stress is r% that of Sut (N/mm2)
r = 30
//Grade of the oil hardened and tempered steel gr
gr = 'SW'
//Modulus of rigidity G (N/mm2)
G = 81370
//Spring index C
C = 6
//For plain ends, endtype = 1
//For plain ends(ground), endtype = 2
//For square ends, endtype = 3
//For square ends(ground), endtype = 4
endtype = 4
//Gap between each turn g (mm)
g = 0.5
|
c58df846ca009c036e71bef8f818b06600450baf | 449d555969bfd7befe906877abab098c6e63a0e8 | /2921/CH13/EX13.7/Ex13_7.sce | beb0e3326625720fd817354c4011b0d4be2d2b03 | [] | 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 | 247 | sce | Ex13_7.sce | clc;
clear;
mprintf('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.7 Page No.296\n');
hpin=5
e=0.73;
Q=(1-e)*hpin*2544;
mprintf('\n Heat generated by system = %f Btu/hr.',Q);
//Note-There is an error in the answer given in textbook
|
82134c4a12eef8fe1389e3536d9113beef5b3f73 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2561/CH5/EX5.3/Ex5_3.sce | d343469f393e3071fb0dbe70103f4dac40d5129f | [] | 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 | 790 | sce | Ex5_3.sce | //Ex5_3
clc
RL=5*10^(3)
disp("RL= "+string(RL)+ " ohm") //Load resistance
RF=5*10^(3)
disp("RF= "+string(RF)+ " ohm") // resistance
Beta_o=50
disp("Beta_o = "+string(Beta_o)) //BJT gain
rbe=1*10^(3)
disp("rbe= "+string(rbe)+ " ohm") //Base-emitter resistance
gm=50*10^(-3)
disp("gm = "+string(gm)+" A/V")// transconductance for BJT
rc=50*10^(3)
disp("rc= "+string(rc)+ " ohm") //collector resistance
Ri=rbe+RF*(1+gm*rbe) // formulae
disp("Ri= rbe+RF*(1+gm*rbe)="+string(Ri)+ " ohm") // BJT input resistance
Av=(-gm*RL)/(1+gm*RF)// formulae
disp("Av=(-gm*RL)/(1+gm*RF)= "+string(Av)) // voltage gain for BJT
AI=Beta_o
disp("AI=(Beta_o)= "+string(AI)) // current gain for BJT
R0=Beta_o*rc
disp("R0= Beta_o*rc="+string(R0)+ " ohm") //output resistance for BJT
|
7be7e10ec0f75550580a91650aa6614c3bcb475c | 449d555969bfd7befe906877abab098c6e63a0e8 | /842/CH3/EX3.4/Example3_4.sce | a058dd87e75b49089632f739ebad419612c8680b | [] | 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,126 | sce | Example3_4.sce | //clear//
//Example3.4:CTFS coefficients of a periodic signal
//x(t) = 1+sin(Wot)+2cos(Wot)+cos(2Wot+%pi/4)
clear;
close;
clc;
t = 0:0.01:1;
T = 1;
Wo = 2*%pi/T;
xt =ones(1,length(t))+sin(Wo*t)+2*cos(Wo*t)+cos(2*Wo*t+%pi/4);
for k =0:5
C(k+1,:) = exp(-sqrt(-1)*Wo*t.*k);
a(k+1) = xt*C(k+1,:)'/length(t);
if(abs(a(k+1))<=0.1)
a(k+1)=0;
end
end
a =a';
a_conj =conj(a);
ak = [a_conj($:-1:1),a(2:$)];
Mag_ak = abs(ak);
for i = 1:length(a)
Phase_ak(i) = atan(imag(ak(i))/(real(ak(i))+0.0001));
end
Phase_ak = Phase_ak'
Phase_ak = [Phase_ak(1:$) -Phase_ak($-1:-1:1)];
figure
subplot(2,1,1)
a = gca();
a.y_location = "origin";
a.x_location = "origin";
plot2d3('gnn',[-k:k],Mag_ak,5)
poly1 = a.children(1).children(1);
poly1.thickness = 3;
title('abs(ak)')
xlabel(' k')
subplot(2,1,2)
a = gca();
a.y_location = "origin";
a.x_location = "origin";
plot2d3('gnn',[-k:k],Phase_ak,5)
poly1 = a.children(1).children(1);
poly1.thickness = 3;
title('<(ak)')
xlabel(' k')
|
cc8484b68013302082d74a7f4da167b80448362c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1970/CH4/EX4.8/Ch04Exa8.sce | cc2e3139813887b5a617dadb9cf05c1d3dad0d7d | [] | 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 | 924 | sce | Ch04Exa8.sce | // Scilab code Exa4.8 : : Page-179 (2011)
clc; clear;
A = 1.5e-4; // Area of capacitor plates, square metre
K = 12; // Dielectric constant
D = K*8.8542e-012; // Electrical permittivity of the medium, per newton-metre-square coulomb square
x = 50e-06; // Width of depletion layer, metre
C = A*D/x*10^12; // Capacitance of the silicon detector, pF
E = 4.5e+06; // Energy produced by the ion pairs, eV
N = E/3.5; // Number of ion pairs
e = 1.60218e-019; // Charge of each ion, coulomb
Q = N*e; // Total charge, coulomb
V = Q/C*10^12; // Potential applied across the capacitor, volt
printf("\nThe capacitance of the detector : %6.2f pF\nThe potential applied across the capacitor : %4.2e volt", C, V);
// Result
// The capacitance of the detector : 318.75 pF
// The potential applied across the capacitor : 6.46e-004 volt
|
354075131221a959124074cfabd1556ad97dd15c | 449d555969bfd7befe906877abab098c6e63a0e8 | /617/CH14/EX14.1/Example14_1.sci | ad5100c43ef297d599e91027017c1a481f9de210 | [] | 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,141 | sci | Example14_1.sci | clc();
clear;
// To calculate the true gas temperature
D1=36/12; // diameter of circular duct in ft
D2=5/96; // diameter of tube in ft
Tl=800; // Temperature of tube in degF
To=500; // Temperature of duct in degF
k=0.02; // Thermal conductivity in lb/ft^-2-hr
u=0.18*(10^-9)*(3600^2); // Viscosity in slug/ft-hr
p=0.04/32.2; // Density in slug/ft^3
n=u/p; // Kinematic viscosity in ft^2/hr
v=15*3600; // Velocity in ft/hr
e=0.8; // Emmisivity
Nre=v*D2/n; // Reynolds number
Nnu=0.3*(Nre^0.57); // Nusselt number
h=Nnu*k/D2; // Heat transfer coefficient
Tg=Tl+0.174*e*((((Tl+460)/100)^4)-((To+460)/100)^4)/h; // Gas temperature in degF
printf("The temperature of gas is %d degF",Tg); |
9563d05ab0be31c2d54df19cdcf24c77cf4eec44 | 796ed6f734bc4c417552a663b72203dd29f81c11 | /q-repr.sci | e946ad037ee15f320bc2c60a4a201dc96618b7bd | [] | no_license | NnataKha/Conflict-Model-for-Q-representation | 269859e01fcb08ec2d9ae0e0be1b977a3f64f7f6 | 1accefcdfc45fe2f058835fb819a3665dac74dd1 | refs/heads/master | 2020-03-16T18:45:30.350490 | 2018-05-10T10:45:52 | 2018-05-10T10:45:52 | 132,885,767 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,419 | sci | q-repr.sci | n = 2;
q = [1, 1];
p = [1, 2];
r = [2, 1];
s = sum(q);
sr = sum(r);
sp = sum(p);
for i=1:n
delta0(i)=q(i)/s;
p0(i) = p(i)/sp;
r0(i) = r(i)/sr;
end
delta = delta0;
d=10;
for l=1:d
i=1;
for j=1:n^l
for k=1:n
delta1(i)=delta(j)*delta0(k);
p1(i)=p(j)*p0(k);
r1(i)=r(j)*r0(k);
i=i+1;
end
end
clear p r delta;
p = p1;
r = r1;
delta = delta1;
end
//conflict
k=10;
new_p = p;
new_r = r;
lnth=length(p);
for j = 1:k
K_pl(j)=j;
for i = 1:lnth
temp_p(i) = new_p(i)*(1-new_r(i));
temp_r(i) = new_r(i)*(1-new_p(i));
end
z1=sum(temp_p);
z2=sum(temp_r);
for i=1:lnth
new_p(i)=temp_p(i)/z1;
new_r(i)=temp_r(i)/z2;
end
end
//building the graph
build(1) = 0;
build(2) = delta(1);
for i=2:lnth
build(i+1) = build(i)+delta(i);
end
T(1) = 0;
p_plot(1) = new_p(1);
r_plot(1) = new_r(1);
for i=1:(lnth-1)
T(i*2)=build(i+1);
T(i*2+1)=build(i+1);
p_plot(i*2) = new_p(i);
p_plot(i*2+1) = new_p(i+1);
r_plot(i*2) = new_r(i);
r_plot(i*2+1) = new_r(i+1);
end
T(lnth*2) = build(lnth+1);
p_plot(lnth*2) = new_p(lnth);
r_plot(lnth*2) = new_r(lnth);
subplot(311);
plot(T, p_plot, 'b');
subplot(312);
plot(T, r_plot, 'g');
subplot(313);
plot(T, r_plot, 'g');
plot(T, p_plot, 'b');
|
cc94e2b47d966eda180e18fe461fad0c493f3f10 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3760/CH1/EX1.66/Ex1_66.sce | 3554b58e8f70a3b8ce4b2a3904fea58bf137d847 | [] | 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,735 | sce | Ex1_66.sce | clc;
// Answer for case c , secondary line voltage is given wrong in book
k=12; // per phase turns ratio
E1=11000; // supply voltage from feeder line
ip=20; // primary line current
disp('case a:star-delta');
vph=E1/sqrt(3); // primary phase voltage
iph=ip; // phase current on primary
sph=vph/k; // secondary phase voltage
vls=sph;
printf('Line voltage on secondary is %f v\n',vls);
isph=k*iph; // phase current on secondary
isl=sqrt(3)*isph;
printf('line current on secondary is %f A\n',isl);
Kv=(3*sph*isph)/1000;
printf('Output KVA is %f KVA\n',Kv);
disp('case b:delta-star');
vph=E1; // primary phase voltage
iph=ip/sqrt(3); // phase current on primary
sph=vph/k; // secondary phase voltage
vls=sqrt(3)*sph;
printf('Line voltage on secondary is %f v\n',vls);
isph=k*iph; // phase current on secondary
isl=isph;
printf('line current on secondary is %f A\n',isl);
Kv=(3*sph*isph)/1000;
printf('Output KVA is %f KVA\n',Kv);
disp('case c:delta-delta');
vph=E1; // primary phase voltage
iph=ip/sqrt(3); // phase current on primary
sph=vph/k; // secondary phase voltage
vls=sph;
printf('Line voltage on secondary is %f v\n',vls);
isph=k*iph; // phase current on secondary
isl=sqrt(3)*isph;
printf('line current on secondary is %f A\n',isl);
Kv=(3*sph*isph)/1000;
printf('Output KVA is %f KVA\n',Kv);
disp('case d:star-star');
vph=E1/sqrt(3); // primary phase voltage
iph=ip; // phase current on primary
sph=vph/k; // secondary phase voltage
vls=sqrt(3)*sph;
printf('Line voltage on secondary is %f v\n',vls);
isph=k*iph; // phase current on secondary
isl=isph;
printf('line current on secondary is %f A\n',isl);
Kv=(3*sph*isph)/1000;
printf('Output KVA is %f KVA\n',Kv);
|
4775973889f76c1992fec1993d5212b5c1818d5b | 8d952a06e3809a06825a3be7b067201f3652f16a | /debug/bin/BackDoor/macros/cleanmacros.sce | 0b2db485b9116e90ad16b5a0c49d81652e091904 | [
"GPL-3.0-only",
"MIT"
] | permissive | andyLaurito92/haikunet | b771eaf6bd91292485f0a49698ce123b9308d676 | db44623b248c56735c28a5f589c3239dc7e9855e | refs/heads/master | 2021-06-14T12:38:38.996450 | 2021-05-05T18:26:02 | 2021-05-05T18:26:02 | 75,564,849 | 2 | 1 | MIT | 2021-05-05T18:26:26 | 2016-12-04T21:12:31 | C++ | UTF-8 | Scilab | false | false | 494 | sce | cleanmacros.sce | // ====================================================================
// Allan CORNET
// DIGITEO 2009
// This file is released into the public domain
// ====================================================================
libpath = get_absolute_file_path('cleanmacros.sce');
binfiles = ls(libpath+'/*.bin');
for i = 1:size(binfiles,'*')
mdelete(binfiles(i));
end
mdelete(libpath+'/names');
mdelete(libpath+'/lib');
// ====================================================================
|
f6c422b30b30f2fb6ac156ed97eb8904eda08d14 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2441/CH1/EX1.18/Ex1_18.sce | f26b26a911f679bac3468a862e0b3eb55e31ac54 | [] | 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 | 173 | sce | Ex1_18.sce | //exa 1.18
clc;clear;close;
format('v',8);
Lmax=100;//MW
LF=40;//%//Load Factor
Lavg=Lmax*LF/100;//MW
E=Lavg*24*365;//MWh
disp(E,"Energy generated in a year(MWh)");
|
a6a0dcb03d9689a39e1c4ac554d94471b170cef6 | 527c41bcbfe7e4743e0e8897b058eaaf206558c7 | /Positive_Negative_test/Netezza-Base-DataMining/SP_SurveySelectStratExact-NZ-01.tst | ee0f6583e7c03594b4dc4f54e96fb2991d05257a | [] | no_license | kamleshm/intern_fuzzy | c2dd079bf08bede6bca79af898036d7a538ab4e2 | aaef3c9dc9edf3759ef0b981597746d411d05d34 | refs/heads/master | 2021-01-23T06:25:46.162332 | 2017-07-12T07:12:25 | 2017-07-12T07:12:25 | 93,021,923 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 13,966 | tst | SP_SurveySelectStratExact-NZ-01.tst | -- Fuzzy Logix, LLC: Functional Testing Script for DB Lytix functions on Netezza
--
-- Copyright (c): 2014 Fuzzy Logix, LLC
--
-- NOTICE: All information contained herein is, and remains the property of Fuzzy Logix, LLC.
-- The intellectual and technical concepts contained herein are proprietary to Fuzzy Logix, LLC.
-- and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
-- secret or copyright law. Dissemination of this information or reproduction of this material is
-- strictly forbidden unless prior written permission is obtained from Fuzzy Logix, LLC.
--
--
-- Functional Test Specifications:
--
-- Test Category: Sampling Techniques
--
-- Test Unit Number: SP_SurveySelectStratExact-NZ-01
--
-- Name(s): SP_SurveySelectStratExact
--
-- Description: SP_SurveySelectStratExact selects samples independently within the
-- specified strata by selecting a specified number of records
-- for each stratum.
--
-- Applications:
--
-- Signature: SP_SurveySelectStratExact ( Population Table Name VARCHAR(100),
-- RecID/ObsID Name VARCHAR(100),
-- StratumID Name VARCHAR(100),
-- Sample Table Name VARCHAR(100),
-- Stratum Information TableName VARCHAR(100),
-- Number of Samples INTEGER,
-- Notes VARCHAR(256))
--
-- Parameters: See Documentation
--
-- Return value: Table
--
-- Last Updated: 25-01-2015
--
-- Author: <Joe.Fan@fuzzyl.com>, <Anurag.Reddy@fuzzyl.com>
-- BEGIN: TEST SCRIPT
--.run file=../PulsarLogOn.sql
-- BEGIN: NEGATIVE TEST(s)
Drop Table OutTable;
---- Case 1: input validation
---- Case 1a: invalid InputTable
CALL SP_SurveySelectStratExact('Dummy',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize',
2,
'StratPerc Test');
-- Result: standard error message
CALL SP_SurveySelectStratExact( NULL,
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize',
2,
'StratPerc Test');
-- Result: standard error message
---- Case 1b: invalid RecIDCol
CALL SP_SurveySelectStratExact('tblPopulation',
'Dummy',
'StratumID',
'OutTable',
'tblStratumSize',
2,
'StratPerc Test');
-- Result: standard error message
CALL SP_SurveySelectStratExact('tblPopulation',
NULL,
'StratumID',
'OutTable',
'tblStratumSize',
2,
'StratPerc Test');
-- Result: standard error message
---- Case 1c: invalid StratumIDCol
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'Dummy',
'OutTable',
'tblStratumSize',
2,
'StratPerc Test');
-- Result: standard error message
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
NULL,
'OutTable',
'tblStratumSize',
2,
'StratPerc Test');
-- Result: standard error message
---- Case 1d: invalid StratumTable
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'Dummy',
2,
'StratPerc Test');
-- Result: standard error message
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
NULL,
2,
'StratPerc Test');
-- Result: standard error message
---- Case 1e: invalid NumOfSamples
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize',
0,
'StratPerc Test');
-- Result: standard error message
---- Case 1f: invalid WithReplacement
--NA for NZ
---- Case 1g: invalid TableOutput
--NA for NZ
---- Case 1h: invalid OutTable
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
NULL,
'tblStratumSize',
2,
'StratPerc Test');
-- Result: standard error message
---- Case 2: WithReplacement = 1 and small fzzlSerial
-- Artificially reduce size of fzzlSerial
DROP TABLE fzzlSerial_Test;
CREATE TABLE fzzlSerial_Test
(
SerialVal BIGINT,
RandVal DOUBLE PRECISION
)
DISTRIBUTE ON(SerialVal);
INSERT INTO fzzlSerial_Test
SELECT *
FROM fzzlSerial;
DELETE FROM fzzlSerial
WHERE SerialVal > 2**2;
---- Case 2a: Length of fzzlSerial is smaller than InputTable
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize',
2,
'StratPerc Test');
-- Result: dubious results
-- insufficient sampling of ObsID and excess SampleNum (why 3 and 4?)
-- Function should check if length of fzzlSerial > length of InputTable
-- and if length of fzzlSerial > NumOfSamples
---- Case 2a:length of fzzlSerial is smaller than InputTable AND NumOfSamples
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize',
6,
'StratPerc Test');
-- Result: dubious results
-- insufficient sampling of ObsID and insufficient number of SampleNum
-- Restore fzzlSerial and drop test table
DELETE FROM fzzlSerial;
INSERT INTO fzzlSerial
SELECT *
FROM fzzlSerial_Test;
DROP TABLE fzzlSerial_Test;
---- Case 3: mess with contents of tblStratumSize
-- Initialization
DROP TABLE tblStratumSize_Test;
CREATE TABLE tblStratumSize_Test
(
StratumID BIGINT,
StratumPerc DOUBLE PRECISION,
StratumSize BIGINT
);
---- Case 3a: Extraneous StratumID
DELETE FROM tblStratumSize_Test;
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc,
a.StratumSize
FROM tblStratumSize a
UNION ALL
SELECT a.StratumID + 5,
a.StratumPerc,
a.StratumSize
FROM tblStratumSize a;
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: standard outputs
---- Case 3b: Missing StratumID
DELETE FROM tblStratumSize_Test;
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc,
a.StratumSize
FROM tblStratumSize a
WHERE a.StratumID <= 3;
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: standard outputs (only StratumID's 1, 2, 3 are returned)
---- Case 3c: Artificially increase tblStratumSize.StratumSize
DELETE FROM tblStratumSize_Test;
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc,
a.StratumSize + 5
FROM tblStratumSize a;
---- Case 3c1: WithReplacement = 0
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: standard outputs (tblStratumSize.StratumSize is not used in this function)
---- Case 3d: Artificially decrease tblStratumSize.StratumSize
DELETE FROM tblStratumSize_Test;
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc,
a.StratumSize - 5
FROM tblStratumSize a;
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: standard outputs (tblStratumSize.StratumSize is not used in this function)
---- Case 3e: Artificially increase tblStratumSize.StratumPerc
DELETE FROM tblStratumSize_Test;
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc * 5,
a.StratumSize
FROM tblStratumSize a;
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: standard outputs (stratum size of the output is limited to stratum size of tblPopulation)
---- Case 3f: Artificially decrease tblStratumSize.StratumPerc
DELETE FROM tblStratumSize_Test;
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc * 0.5,
a.StratumSize
FROM tblStratumSize a;
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: standard output (stratum size of the output is limited to tblStratumSize.StratumPerc * count of stratum size in tblPopulation)
-- Cleanup Case 3
DROP TABLE tblStratumSize_Test;
---- Case 4: mess with schema of tblStratumSize
---- Case 4a: mismatch the column name of tblStratumSize.StratumID vs. tblPopulation.StratumID
-- Initialization
DROP TABLE tblStratumSize_Test;
CREATE TABLE tblStratumSize_Test
(
StratumID_Test BIGINT,
StratumPerc DOUBLE PRECISION,
StratumSize BIGINT
);
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc,
a.StratumSize
FROM tblStratumSize a;
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: syntax error
-- Cleanup Case 4a
DROP TABLE tblStratumSize_Test;
---- Case 4b: mismatch the column name of tblStratumSize.StratumSize <> "StratumSize"
-- Initialization
DROP TABLE tblStratumSize_Test;
CREATE TABLE tblStratumSize_Test
(
StratumID BIGINT,
StratumPerc DOUBLE PRECISION,
StratumSize_Test BIGINT
);
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc,
a.StratumSize
FROM tblStratumSize a;
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: standard outputs (tblStratumSize.StratumSize is not used in this function)
-- Cleanup Case 4b
DROP TABLE tblStratumSize_Test;
---- Case 4c: mismatch the column name of tblStratumSize.StratumPerc <> "StratumPerc"
-- Initialization
DROP TABLE tblStratumSize_Test;
CREATE TABLE tblStratumSize_Test
(
StratumID BIGINT,
StratumPerc_Test DOUBLE PRECISION,
StratumSize BIGINT
);
INSERT INTO tblStratumSize_Test
SELECT a.StratumID,
a.StratumPerc,
a.StratumSize
FROM tblStratumSize a;
Drop Table OutTable;
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize_Test',
2,
'StratPerc Test');
-- Result: syntax error
-- Cleanup Case 4c
DROP TABLE tblStratumSize_Test;
-- END: NEGATIVE TEST(s)
-- BEGIN: POSITIVE TEST(s)
---- Case 1: without replacement
CALL SP_SurveySelectStratExact('tblPopulation',
'ObsID',
'StratumID',
'OutTable',
'tblStratumSize',
2,
'StratPerc Test');
-- Result: standard outputs
-- END: POSITIVE TEST(s)
-- END: TEST SCRIPT
|
d22a8ff8717ef4c95a825fa34f30a23d9f4b3ab2 | efc2fec9dd841d0ca834702c904e00c52762a9f9 | /IDCT/IDCT2.sce | 6a782a40c03942ce86f39eea6216bc84641c5cc8 | [] | no_license | surajch77/Scilab-Computer-Vision-Toolbox-TestCases | 64c8e0382e8b9d416c4c27c1ed4272f49bf45b51 | 969f9bcddefea05b42c623aeebe2e0cdcffd6eeb | refs/heads/master | 2021-01-20T20:24:14.345296 | 2016-06-29T15:16:52 | 2016-06-29T15:16:52 | 61,932,313 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 212 | sce | IDCT2.sce | // read the image ararauna.png
I = imread("ararauna.png");
// convert the image to double
I = double(I);
// find the IDCT of the image
J = IDCT(I);
// output:
// Error : Image doesnot have even number of rows
|
2d6291afa0af6c9141b798ee368a3fdde59758b3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1061/CH7/EX7.8/Ex7_8.sce | 2f86bfb88dde0e9f91ee335b03300984f957d359 | [] | 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 | 257 | sce | Ex7_8.sce | //Ex:7.8
clc;
clear;
close;
L_f=0.036;
n_f=10^(-0.036);
// here we get a quadratic equation in n1 and on solving we get
n1=(2.17+sqrt((-2.17)^2-4*1*1))/2;// refractive index of the fiber core
printf("The refractive index of the fiber core =%f", n1); |
f69db775d905d1c2afe4a6eae1f9e609793eac1b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1757/CH6/EX6.12/EX6_12.sce | 7c027b32317cbd2ee6a74938a496b969833f1974 | [] | 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 | 284 | sce | EX6_12.sce | //Example6.12 // Determine the time constant of the integrator
clc;
clear;
close;
Vo = 10 ;
t = 2*10^-3 ;
VI = -1 ; // at t =0 ;
// The output voltage of an integrator is define as
RC = t/10 ;
disp(' The time constant of the given filter is RC = '+string(RC)+ ' sec ');
|
e77ebd58883aeee9832f6d61569deb4d590b2735 | 573df9bfca39973c9bf2fa36f6e5af2643d7771e | /scilab/lib/substRetro.sci | 86de08e7014379b21bd16f03989fab6b220261d4 | [] | no_license | DCC-CN/152cn | ef92c691edabe211b1a552dbb963f9fd9ceec94a | 4fe0b02f961f37935a1335b5eac22d81400fa609 | refs/heads/master | 2016-08-13T01:34:17.966430 | 2015-04-07T07:31:58 | 2015-04-07T07:31:58 | 44,502,526 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 323 | sci | substRetro.sci | function [x] = substRetro(U, d)
// U= matriz triangular superior
// d= vetor de termos independente
n = size(U, 1);
x(n)=d(n)/U(n,n);
for i = n:-1:1
soma = 0;
for j = (i +1):n
soma = soma + U(i,j)*x(j);
end
x(i) = (d(i) - soma)/U(i,i);
end
endfunction
|
a1b3421de6b0231f203e70ffbabeae2bdac30f53 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.4/Unix-Windows/scilab-2.4/tests/strelm.tst | 4e65a26a310b69965b041de28752745208272cb9 | [
"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 | 4,922 | tst | strelm.tst | // Copyright INRIA
// length
if length('abd')<>3 then pause,end
if length(emptystr())<>0 then pause,end
if or(length(['abd';emptystr()])<>[3;0]) then pause,end
if or(length(string(ones(10,10)))<>1) then pause,end
//part
if part('abc',1)<>'a' then pause,end
if part('abc',[1 1])<>'aa' then pause,end
if part('abc',[1;1])<>'aa' then pause,end
if part('abc',[])<>emptystr() then pause,end
if part('abc',5)<>' ' then pause,end
if part('abc',5:6)<>' ' then pause,end
if or(part(['abc';'x'],1)<>['a';'x']) then pause,end
if or(part(['abc';'x'],[1 1])<>['aa';'xx']) then pause,end
//if or(part(['abc';'x'],[1 2])<>['aa';'x ']) then pause,end
//string
if string(1)<>'1' then pause,end
if string(1.5)<>'1.5' then pause,end
if string([])<>[] then pause,end
if or(string(1:3)<>['1','2','3']) then pause,end
if or(string([1;2;3])<>['1';'2';'3']) then pause,end
if string('foo')<>'foo' then pause,end
deff('y=mymacro(x)','y=x+1');
[out,in,text]=string(mymacro);
if out<>'y'|in<>'x'|text<>[] then pause,end
mymacro=null();deff('y=mymacro(x)','y=x+1','n');
[out,in,text]=string(mymacro);
if out<>'y'|in<>'x'|text<>'y=x+1' then pause,end
//convstr
if convstr('ABC')<>'abc' then pause,end
if convstr('ABC','l')<>'abc' then pause,end
if convstr('ABC','u')<>'ABC' then pause,end
if convstr(['ABC';'x'])<>['abc';'x'] then pause,end
if convstr(['ABC';'x'],'l')<>['abc';'x'] then pause,end
if convstr(['ABC';'x'],'u')<>['ABC';'X'] then pause,end
if convstr('ABC')<>'abc' then pause,end
if convstr('ABC','l')<>'abc' then pause,end
if convstr('ABC','u')<>'ABC' then pause,end
if convstr(['ABC','x'])<>['abc','x'] then pause,end
if convstr(['ABC','x'],'l')<>['abc','x'] then pause,end
if convstr(['ABC','x'],'u')<>['ABC','X'] then pause,end
if convstr(emptystr())<>emptystr() then pause,end
//str2code
if or(str2code('abcdefghijklmnopqrstuvwxyz')<>(10:35)') then pause,end
if or(str2code('ABCDEFGHIJKLMNOPQRSTUVWXYZ')<>-(10:35)') then pause,end
if or(str2code('0123456789')<>(0:9)') then pause,end
if str2code(emptystr())<>[] then pause,end
//code2str
if code2str(10:35)<>'abcdefghijklmnopqrstuvwxyz' then pause,end
if code2str(-(10:35))<>'ABCDEFGHIJKLMNOPQRSTUVWXYZ' then pause,end
if code2str(0:9)<>'0123456789' then pause,end
if code2str([])<>emptystr() then pause,end
//sort
[s]=sort(['abc','abd','aa','bxe']);
if or(s<>['aa','abc','abd','bxe']) then pause,end
[s,k]=sort(['abc','abd','aa','bxe']);
if or(s<>['aa','abc','abd','bxe']) then pause,end
if or(k<>[3 1 2 4]) then pause,end
if sort('abc')<>'abc' then pause,end
//strcat
if strcat(['abc','abd','aa','bxe'])<>'abcabdaabxe' then pause,end
if strcat(['abc','abd','aa','bxe'],',')<>'abc,abd,aa,bxe' then pause,end
if strcat('abc')<>'abc' then pause,end
if strcat('abc','sd')<>'abc' then pause,end
//strindex
if or(strindex('abc,abd,aa,bxe',',')<>[4 8 11]) then pause,end
if or(strindex('abc',',')<>[]) then pause,end
if or(strindex('abc,abd,aa,bxe',',a')<>[4 8]) then pause,end
if or(strindex('abc,abd,aa,bxe','a')<>[1 5 9 10]) then pause,end
//if or(strindex(emptystr(),'a'))<>[] then pause,end
//strsubst
if strsubst('abc,abd,aa,bxe',',',';')<>'abc;abd;aa;bxe' then pause,end
if strsubst('abc,abd,aa,bxe',',',emptystr())<>'abcabdaabxe' then pause,end
if strsubst(',abc,abd,aa,bxe',',',emptystr())<>'abcabdaabxe' then pause,end
if strsubst('abc',',',';')<>'abc' then pause,end
//formal
mode(-1)
if addf('1','1')<>'2' then pause,end
if addf('1','0')<>'1' then pause,end
if addf('0','1')<>'1' then pause,end
if addf('0','0')<>'0' then pause,end
if addf('1','-1')<>'0' then pause,end
if addf('-1','1')<>'0' then pause,end
if addf('-1','0')<>'-1' then pause,end
if addf('0','-1')<>'-1' then pause,end
if addf('1','a')<>'a+1' then pause,end
if addf('a','1')<>'a+1' then pause,end
if addf('a','0')<>'a' then pause,end
if addf('0','a')<>'a' then pause,end
if addf('a','-1')<>'a-1' then pause,end
if addf('-1','a')<>'a-1' then pause,end
if addf('a','b')<>'a+b' then pause,end
if addf('a+b','c')<>'a+b+c' then pause,end
if addf('c','a+b')<>'c+a+b' then pause,end
if addf('a+b','a+b')<>'a+b+a+b' then pause,end
if addf('a+b','a-b')<>'a+a' then pause,end
if addf('2*a+b','a-b')<>'2*a+a' then pause,end
if mulf('1','1')<>'1' then pause,end
if mulf('1','0')<>'0' then pause,end
if mulf('0','1')<>'0' then pause,end
if mulf('0','0')<>'0' then pause,end
if mulf('1','-1')<>'-1' then pause,end
if mulf('-1','1')<>'-1' then pause,end
if mulf('-1','0')<>'0' then pause,end
if mulf('0','-1')<>'0' then pause,end
if mulf('1','a')<>'a' then pause,end
if mulf('a','1')<>'a' then pause,end
if mulf('a','0')<>'0' then pause,end
if mulf('0','a')<>'0' then pause,end
if mulf('a','-1')<>'-a' then pause,end
if mulf('-1','a')<>'-a' then pause,end
if mulf('a','b')<>'a*b' then pause,end
if mulf('a+b','c')<>'(a+b)*c' then pause,end
if mulf('c','a+b')<>'c*(a+b)' then pause,end
if mulf('a+b','a+b')<>'(a+b)*(a+b)' then pause,end
if mulf('2*a+b','a-b')<>'(2*a+b)*(a-b)' then pause,end
|
85a456c6e6e79aac3c49f110d3378733d55b016c | 4e9df66700bcf9688afe22df0009cdf4a17bc61f | /Scilab_Lab/scimage/ch03/gau.sci | 5c7e872bca6b781695b606d8fc92b9b220c1f28d | [] | no_license | vmebus/workspace | e18947a1f967e6a3a7dfbc5cce6f92380d8637fc | f251b8a8e6cec30a77c7ef7b4103c5ee6e6d1393 | refs/heads/master | 2021-01-09T21:53:45.183564 | 2015-10-03T06:42:23 | 2015-10-03T06:42:23 | 36,120,248 | 0 | 0 | null | null | null | null | ISO-8859-1 | Scilab | false | false | 167 | sci | gau.sci | //?½å?gau.m:ML???¨è¨è¨ä¸åæ¯?è¨ç®å¼%
function y=gau(x)
pi=3.14159;
y=1/sqrt(2*pi)*exp(-x.^2/2);
endfunction;
|
00f483c28757000a21067570f7b6b7f93790ff43 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3655/CH4/EX4.6/Ex4_6.sce | f61254ee542c7efb10be651377c6fc5358124462 | [] | 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 | 4,260 | sce | Ex4_6.sce | // Example 4.6
// Computation for concentration of free electrons and holes for case(A),case(B),case(C) and case(D)//
// Page no.98
clc;
clear;
close;
//Given data ;
NA=3*10^14;
ND=2*10^14;
ni=2.5*10^13;
mu_n=3800;//3800cm2/V sec
e=1.60*10^-19;
mu_p=1800;//1800cm2/V sec
NA1=10^15;
ND1=10^15;
T1=400;
T2=300;
EGO=0.785;
kT2=0.0259;
NA2=0;
ND2=10^15;
//.................................(A)......................................//
//Calculation for concentration of electrons//
n=(1/2)*((ND-NA)+(sqrt((NA-ND)^2+(4*ni^2))));
//Calculation for concentration of holes//
p=(ni^2)/n;
//Calculation for conductivity of electrons//
sigma_n=n*mu_n*e;
//Calculation for conductivity of holes//
sigma_p=p*mu_p*e;
//Calculation for P1//
P1=sigma_p/sigma_n;
//Calculation for P2//
P2=mu_p/mu_n;
//Thus P1 is greater than P2 which implies that the conductivity is primarily due to holes in the given sample. Hence the sample is a p-type germanium//
//.................................(B)......................................//
//Calculation for concentration of electrons//
n1=(1/2)*((ND1-NA1)+(sqrt((NA1-ND1)^2+(4*ni^2))));
//Calculation for concentration of holes//
p1=(ni^2)/n1;
//Calculation for conductivity of electrons//
sigma_n1=n1*mu_n*e;
//Calculation for conductivity of holes//
sigma_p1=p1*mu_p*e;
//Calculation for P3//
P3=sigma_p1/sigma_n1;
//Hence the sample is an intrinsic germanium//
//.................................(C)......................................//
//Calculation for ni1 at T=400 degreeK//
ni_400=(((T1/T2)^3)*(exp((EGO/kT2)*(1-(T2/T1)))*(2.5*10^13)^2))^(1/2);
//Calculation for concentration of electrons//
n2=(1/2)*((ND-NA)+(sqrt((NA-ND)^2+(4*ni_400^2))));
//Calculation for concentration of holes//
p2=(ni_400^2)/n2;
//ratio of conductivities due to holes and electrons is given by sigma_P/sigma_n=sigma_pi/sigma_ni, hence the germanium sample under consideration is essentially intrinsic//
//.................................(D)......................................//
//Calculation for concentration of electrons//
n3=(1/2)*((ND2-NA2)+(sqrt((NA2-ND2)^2+(4*ni^2))));
//Calculation for concentration of holes//
p3=(ni^2)/n3;
//ratio of conductivities due to holes and electrons is given by sigma_P/sigma_n=sigma_pi/sigma_ni, hence the coductivity due to holes is almost negligible as compared to that of electrons in the sample, the sample is essentialy n-type//
//Displaying the result in command window
printf(".........................Part (A)..................................");
printf('\n \n Concentration of electrons = %0.2f x 10^12 cm^-3',n*10^-12);
printf('\n \n Concentration of holes = %0.2f x 10^14 cm^-3',p*10^-14);
printf('\n \n Conductivity of electrons = %0.4f (ohm cm)^-1',sigma_n);
printf('\n \n Conductivity of holes = %0.4f (ohm cm)^-1',sigma_p);
printf('\n \n Ratio of Conductivity of holes to the Conductivity of electrons = %0.2f ',P1);
printf('\n \n Ratio of Conductivity of holes to the Conductivity of electrons in an intrinsic germanium = %0.2f ',P2);
printf("\n \n .........................Part (B)..................................");
printf('\n \n Concentration of electrons = %0.1f x 10^13 cm^-3',n1*10^-13);
printf('\n \n Concentration of holes = %0.1f x 10^13 cm^-3',p1*10^-13);
printf('\n \n Conductivity of electrons = %0.4f (ohm cm)^-1',sigma_n1);
printf('\n \n Conductivity of holes = %0.4f (ohm cm)^-1',sigma_p1);
printf('\n \n Ratio of Conductivity of holes to the Conductivity of electrons = Ratio of Conductivity of holes to the Conductivity \n of electrons in an intrinsic germanium = %0.2f ',P3);
printf("\n (Hence the sample is an intrinsic germanium)");
printf("\n \n .........................Part (C)..................................");
printf('\n \n Intrinsic Concentration at T=400 degreeK = %0.1f x 10^15 cm^-3',ni_400*10^-15);
printf('\n \n Concentration of electrons = %0.2f x 10^15 cm^-3',n2*10^-15);
printf('\n \n Concentration of holes = %0.2f x 10^15 cm^-3',p2*10^-15);
printf("\n \n .........................Part (D)..................................");
printf('\n \n Concentration of electrons = %0.4f x 10^15 cm^-3',n3*10^-15);
printf('\n \n Concentration of holes = %0.4f x 10^11 cm^-3',p3*10^-11);
//Answers are varying due to round off error//
|
3f29b66d591dcdafe63fd757ad0e5fab953c087d | 717ddeb7e700373742c617a95e25a2376565112c | /3044/CH6/EX6.3/Ex6_3.sce | 15299a49f9739f73b326a542699e44149ebae884 | [] | 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 | 617 | sce | Ex6_3.sce | // Variable declaration
Mean = 12.40 // Mean( in minutes)
std_dev = 2.48 // Standard deviation ( in minutes)
n = 20 // sample size
x = 10.63 // observes time( in minutes)
// Calculation
t = (x-Mean) / (std_dev/sqrt(n)) // t-value corresponding to observation
v = n-1 // degree of freedom
// corresponding to v = 19 , porbability that t will be below -2.861, is 0.005 (Table-4)
// As 0.005 is very small probability, so data tend to refute manufacturer's claim
// Result
printf ( " The Data tend to refute manufacturers claim")
|
a88745c2e17793ffd8a19f12e1d55c6d982964b7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH6/EX6.8/Ex6_8.sce | 36f3f01e74d59ca1cdbe890f7a6a5a229328021d | [] | 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 | 776 | sce | Ex6_8.sce | //Example 6_8
clc;
clear;
close;
format('v',5);
//given data :
Rf=500;//ohm
RL=2000;//ohm
Vrms=280;//V
Vm=Vrms*sqrt(2);//V
//Part (a)
Idc=2*Vm/%pi/(Rf+RL);//A
Idc=Idc*1000;//mA
disp(Idc,"(a) The dc load current(mA) : ");
//Part (b)
Idc_tube=Idc/2;///mA
disp(Idc_tube,"(b) Direct current in each tube(mA) : ");
//Part (c)
v2=Vm*Rf/(Rf+RL);//V
v1=-2*Vm+v2;//V
Vrms=sqrt(1/2/%pi*integrate('v2^2*(sin(alfa))^2','alfa',0,%pi)+1/2/%pi*integrate('v1^2*(sin(alfa))^2','alfa',%pi,2*%pi));//V
Vrms=floor(Vrms);///V
disp(Vrms,"(c) The ac voltage across each diode(V) : ");
//Part (d)
Pdc=(Idc/1000)^2*RL;//W
disp(Pdc,"(d) The dc output power(W) : ");
//Part(e)
Reg=Rf/RL*100;//%
disp(Reg,"(e) % Regulation : ");
//Answer in the textbook is not accurate.
|
761bc20cc8b00c90f676d29286131be14c156c25 | 194d4cafa290b2fdf3aa87e18ddadcfff70a70d8 | /Delta P.sce | aeb996e90f90366d4805bfacb601b7fdbfb0e6f0 | [] | no_license | KomalT/tryout60 | cc43d4a5d96b5525e691a907c7ad8c7e61004a3c | ef4cc3e641a77c2cea565035cf033536d91e29ea | refs/heads/master | 2016-08-12T19:05:56.548794 | 2016-05-02T06:15:37 | 2016-05-02T06:15:37 | 55,436,025 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 420 | sce | Delta P.sce | clc;clear;
//For Re calc
D=.005//m
v=40//m/s
Ro=1.23//kg/m3
Meu=1.79*10^(-5)//N.s/m2
Re=D*v*Ro/Meu
disp(Re)
if Re<10^5 then
f=.316/Re^.25
end
L=.2//m
deltaP=f*L*Ro*v^2/(2*D)
disp(deltaP)//Pa
E=.0015*10^(-3)
f1=.002//initial guess
function y= Fcole(f)
y=1/f^.5+2*log(E/(3.7*D)+2.51/(Re*f^.5))/2.303
endfunction
f=fsolve(f1,Fcole)
disp(f)
L=.2//m
deltaP=f*L*Ro*v^2/(2*D)
disp(deltaP)//Pa
|
0dca44fdfdcdf8a65b618613d7e8f5d86f4bacbf | 449d555969bfd7befe906877abab098c6e63a0e8 | /1301/CH6/EX6.8/ex6_8.sce | a3a03eedbb0f477f9059331ac4d306bbcf707530 | [] | 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 | 258 | sce | ex6_8.sce | clc;
mm=70; //weight in of man kg
ms=0.5; //weight of snow-ball in kg
v1=20; //man's initial velocity in m/sec
v2=(ms/(mm+ms))*v1; //calculating v2 using law of conservation of momentum
disp(v2,"Mans final velocity in m/sec = "); //displaying result |
26825d5d3fa351d775557693b03498a41cbbe35f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3257/CH5/EX5.3/Ex5_3.sce | 6df2ece5fd57ca41cef696c6d433a7131244d4f7 | [] | 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 | 595 | sce | Ex5_3.sce | // solidification time for various solid shapes
clc
n = 2
v = 1 // let
printf("\n Example 5.3")
A_cube = 6*(v^(1/3))^2// surface area of cube
A_cylinder = 6*%pi*((v/(2*%pi))^(1/3))^2 //surface area of cylinder
A_sphere = 4*%pi*((((3*v)/(4*%pi))^(1/3))^2)
K1 = 1/(A_sphere)^2 // proportional solidification time for sphere
K2 = 1/(A_cube)^2// proportional solidification time for cube
K3 = 1/(A_cylinder)^2// proportional solidification time for cylinder
printf("\n Respective time periods are as:")
printf("\n t_sphere: %.3fC \t t_cube = %.3fC \t t_cylinder = %.3fC",K1,K2,K3 )
|
8e79ef9a5a9efaf233f7ff021aff7281ab07018b | fcd4bce0080771389b4a69338ed6443153942183 | /cores/n64/mupen64plus-rsp-paraLLEl/lightning/check/ldstxr.tst | 14620dc732e20b10aa23455b559494cc5e82c6b2 | [
"GPL-2.0-only",
"MIT",
"LGPL-2.1-only",
"MPL-1.1",
"LicenseRef-scancode-mame",
"GPL-1.0-or-later",
"Zlib",
"LGPL-2.1-or-later",
"MPL-2.0",
"CC-PDDC",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-brian-gladman-3-clause",
"BSD-3-Clause"... | permissive | wulfebw/retro | d4fcf9229b257b3c495f54b1aeb3ea36004ae4aa | dad4b509e99e729e39a2f27e9ee4120e3b607f58 | refs/heads/master | 2022-10-23T07:17:55.320585 | 2020-06-12T01:38:06 | 2020-06-12T01:38:06 | 260,832,205 | 8 | 1 | MIT | 2020-06-12T01:38:08 | 2020-05-03T05:06:17 | C | UTF-8 | Scilab | false | false | 4,581 | tst | ldstxr.tst | #include "ldst.inc"
#if __WORDSIZE == 64
# define LDSTL(N, R0, R1, R2) \
movi %R2 $offui \
stxr_i %R2 %R0 %R1 \
movi %R1 L##N \
movi %R2 $offl \
stxr_l %R2 %R0 %R1
# define SI(C, N, x, X, R0, R1, R2) \
movi %R2 $off##x \
ldxr_##x %R1 %R0 %R2 \
beqi L##x##C %R1 L##X##N \
calli @abort \
L##x##C:
# define LDRL(C, N, R0, R1, R2) \
UI(C, N, i, I, R0, R1, R2) \
SI(C, N, l, L, R0, R1, R2)
#else
# define LDSTL(C, R0, R1, R2)
# define SI(C, N, x, X, R0, R1, R2) \
movi %R2 $off##x \
ldxr_##x %R1 %R0 %R2 \
beqi L##x##C %R1 I##X##N \
calli @abort \
L##x##C:
# define LDRL(C, N, R0, R1, R2)
#endif
#define UI(C, N, x, X, R0, R1, R2) \
movi %R2 $offu##x \
ldxr_u##x %R1 %R0 %R2 \
beqi Lu##x##C %R1 X##N \
calli @abort \
Lu##x##C:
#define FF(C, N, x, X, R0, R1, F0) \
movi %R1 $off##x \
ldxr_##x %F0 %R0 %R1 \
beqi_##x L##x##C %F0 X##N \
L##x##C:
#define LDST1(X, N, R0, R1, R2, F0) \
movi %R0 t0 \
movi %R1 C##N \
movi %R2 $offc \
stxr_c %R2 %R0 %R1 \
movi %R2 $offuc \
stxr_c %R2 %R0 %R1 \
movi %R1 S##N \
movi %R2 $offs \
stxr_s %R2 %R0 %R1 \
movi %R2 $offus \
stxr_s %R2 %R0 %R1 \
movi %R1 I##N \
movi %R2 $offi \
stxr_i %R2 %R0 %R1 \
LDSTL(N, R0, R1, R2) \
movi_f %F0 F##N \
movi %R2 $offf \
stxr_f %R2 %R0 %F0 \
movi_d %F0 D##N \
movi %R2 $offd \
stxr_d %R2 %R0 %F0 \
SI(X, N, c, C, R0, R1, R2) \
UI(X, N, c, C, R0, R1, R2) \
SI(X, N, s, S, R0, R1, R2) \
UI(X, N, s, S, R0, R1, R2) \
SI(X, N, i, I, R0, R1, R2) \
LDRL(X, N, R0, R1, R2) \
FF(X, N, f, F, R0, R1, F0) \
FF(X, N, d, D, R0, R1, F0)
#define LDST0(R0, R1, R2, F0) \
LDST1(0_##R0##_##R1##_##R2##_##F0, 0, R0, R1, R2, F0) \
LDST1(1_##R0##_##R1##_##R2##_##F0, 1, R0, R1, R2, F0) \
LDST1(2_##R0##_##R1##_##R2##_##F0, 2, R0, R1, R2, F0) \
LDST1(3_##R0##_##R1##_##R2##_##F0, 3, R0, R1, R2, F0)
#define LDST(V0, V1, V2, R0, R1, R2, F0, F1, F2, F3, F4, F5) \
LDST0(V0, V1, R0, F0) \
LDST0(V0, V1, R1, F1) \
LDST0(V0, V1, R2, F2) \
LDST0(V0, V2, R0, F3) \
LDST0(V0, V2, R1, F4) \
LDST0(V0, V2, R2, F5) \
LDST0(V0, R0, V1, F0) \
LDST0(V0, R0, V2, F1) \
LDST0(V0, R0, R1, F2) \
LDST0(V0, R0, R2, F3) \
LDST0(V0, R0, V1, F4) \
LDST0(V0, R1, V1, F5) \
LDST0(V0, R1, V2, F0) \
LDST0(V0, R1, R0, F1) \
LDST0(V0, R1, R2, F2) \
LDST0(V0, V1, V2, F3) \
LDST0(V0, R1, R0, F4) \
LDST0(V0, R1, R2, F5) \
LDST0(R0, V1, V0, F0) \
LDST0(R0, V1, R1, F1) \
LDST0(R0, V1, R2, F2) \
LDST0(R0, V2, V0, F3) \
LDST0(R0, V2, R1, F4) \
LDST0(R0, V2, R2, F5) \
LDST0(R0, V0, V1, F0) \
LDST0(R0, V0, V2, F1) \
LDST0(R0, V0, R1, F2) \
LDST0(R0, V0, R2, F3) \
LDST0(R0, V0, V1, F4) \
LDST0(R0, R1, V1, F5) \
LDST0(R0, R1, V2, F0) \
LDST0(R0, R1, V0, F1) \
LDST0(R0, R1, R2, F2) \
LDST0(R0, V1, V2, F3) \
LDST0(R0, R1, V0, F4) \
LDST0(R0, R1, R2, F5)
.code
prolog
/* Simple test to simplify validating encodings before
* brute force tests */
movi %r0 t0
movi %r1 0x81
movi %r2 $offc
stxr_c %r2 %r0 %r1
movi %r2 $offuc
stxr_c %r2 %r0 %r1
movi %r1 0x8001
movi %r2 $offs
stxr_s %r2 %r0 %r1
movi %r2 $offus
stxr_s %r2 %r0 %r1
movi %r1 0x80000001
movi %r2 $offi
stxr_i %r2 %r0 %r1
#if __WORDSIZE == 64
movi %r2 $offui
stxr_i %r2 %r0 %r1
movi %r1 0x8000000000000001
movi %r2 $offl
stxr_l %r2 %r0 %r1
#endif
movi_f %f0 0.5
movi %r2 $offf
stxr_f %r2 %r0 %f0
movi_d %f0 0.25
movi %r2 $offd
stxr_d %r2 %r0 %f0
movi %r2 $offc
ldxr_c %r1 %r0 %r2
beqi Lc %r1 XC
calli @abort
Lc:
movi %r2 $offuc
ldxr_uc %r1 %r0 %r2
beqi Luc %r1 0x81
calli @abort
Luc:
movi %r2 $offs
ldxr_s %r1 %r0 %r2
beqi Ls %r1 XS
calli @abort
Ls:
movi %r2 $offus
ldxr_us %r1 %r0 %r2
beqi Lus %r1 0x8001
calli @abort
Lus:
movi %r2 $offi
ldxr_i %r1 %r0 %r2
beqi Li %r1 XI
calli @abort
Li:
#if __WORDSIZE == 64
movi %r2 $offui
ldxr_ui %r1 %r0 %r2
beqi Lui %r1 0x80000001
calli @abort
Lui:
movi %r2 $offl
ldxr_l %r1 %r0 %r2
beqi Ll %r1 0x8000000000000001
calli @abort
Ll:
#endif
movi %r2 $offf
ldxr_f %f0 %r0 %r2
beqi_f Lf %f0 0.5
calli @abort
Lf:
movi %r2 $offd
ldxr_d %f0 %r0 %r2
beqi_d Ld %f0 0.25
calli @abort
Ld:
LDST(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
// just to know did not abort
prepare
pushargi ok
ellipsis
finishi @printf
ret
epilog
|
277886105d1c25f3a8bd697f074a12dab18132e5 | 94d8b66f6512f2f17f77000729fd8ac999484ed3 | /workspace/Analysis/FastSLAM/Results/TestTrajs.sce | 5cb8c3ee8c547e1c15a7ac8b1644849e3ec508cb | [] | no_license | utctao/reliable-slam | 7885c098574afb5284675a6f022d368f7f303ba6 | 1f00c584d9dacfc17e31e0aa91b0d717998b0310 | refs/heads/master | 2021-01-20T19:49:49.038094 | 2013-07-22T21:50:55 | 2013-07-22T21:50:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 650 | sce | TestTrajs.sce | raw_file=read_csv('/home/jem/reliable-slam/workspace/Analysis/FastSLAM/Results/DeadReckoning3.res',';');
data=evstr(raw_file);
param3d(data(:,1),data(:,2),data(:,3));
h=gce();
h.foreground=color('red');
//param3d(data(:,4),data(:,5),data(:,6));
param3d(data(:,7),data(:,8),data(:,9));
h=gce();
h.foreground=color('blue');
param3d(data(:,10),data(:,11),data(:,12));
h=gce();
h.foreground=color('yellow');
param3d(data(:,13),data(:,14),data(:,15));
h=gce();
h.foreground=color('magenta');
param3d(data(:,16),data(:,17),data(:,18));
h=gce();
h.foreground=color('purple');
param3d(data(:,19),data(:,20),data(:,21));
h=gce();
h.foreground=color('orange'); |
87ab2e4b789cbfe8cbc323eda86b81c109c2a536 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1976/CH5/EX5.1/Ex5_1.sce | c630b7dea742a49db53c38998e243537b48d2af0 | [] | 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,683 | sce | Ex5_1.sce |
//To determine the size and length of the wire
//Page 282
clc;
clear;
r=poly(0,'r'); //Variable Value of radius
A=%pi*(r^2); //Area of cross section of the wire
V=220; //Supply Voltage
P=20*(10^3); //Power input
//Temperatures
T1=1127; //Wire
T2=427; //Charge
R=(V^2)/P; //Resistance of the wire
e=0.9; //emissivity constant
K=0.6; //Radiation Effciency
p=1.09*(10^-6); //Resistivity
l=R*A/p; //Length in term of 'r'
H=5.72*e*K*((((T1+273)/100)^4)-(((T2+273)/100)^4)); //Heat dissipated per sq.m of the surface
CSA=%pi*2*r*l; //Curved surface area
CSAn=P/H; //Numerical Value of Curved suraface area
X=CSA-CSAn; //Polynomial to find 'r'
disp(X);
printf('The real roots of the above equation gives the value of the radius\n')
r=roots(X); //Numerical Value of radius
disp(r);
printf('Choosing the real roots from the list above\n')
r=r(3);
l=CSAn/(2*%pi*r); //Numerical Value of length
//For charge temperature to be cold
Ti=25; //Cold Temperature
T=poly(0,'T'); //Variable value of the element temperature
Hi=5.72*e*K*((((T+273)/100)^4)-(((Ti+273)/100)^4)); //Heat dissipated per sq.m of the surface
CSA=%pi*2*r*l; //Curved surface area
Y=Hi-H; //polynomial to find the temperature of the element
//Roots of T must be real
T=roots(Y); //Numerical Value
disp(Y);
printf('The real roots of the above equation gives the value of the element temperature\n')
disp(T);
printf('Choosing the real roots from the list above\n')
T=T(4);
printf('\n\nThe length and radius of the wire element are %g m and %g mm respectively\n',l,(r*1000))
printf('The Temperature of the element when the charge is cold is %g degree celsius\n',T)
|
8568479655268729400a6cc748eb2e54c2b3ed6b | e0124ace5e8cdd9581e74c4e29f58b56f7f97611 | /3899/CH10/EX10.1/Ex10_1.sci | a01bb9dbf8e42b84fdc0c6583af9671a9dc22f06 | [] | 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 | 169 | sci | Ex10_1.sci | t=-5:5
F=1
rect=1 // for interval -0.5<t<0.5
function y=f(t);
y=rect.*exp(-%i*2*3.14*F.*t)
endfunction
X=intg(-1/2,1/2,f)
disp(X,'the value of CTFS is:')
|
03ba83c30947a19d4e7f5ecfbac0eca368ef1ecf | 449d555969bfd7befe906877abab098c6e63a0e8 | /1385/CH7/EX7.4/7_4.sce | 59e52cabd67bd90afe0609c80d36fee32733da22 | [] | 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 | 142 | sce | 7_4.sce | clc
//initialisation of variables
L= 0.025 //ohms
k= 0.0112 //ohms
//CALCULATIONS
C= k/L
//RESULTS
printf (' cell constant= %.3f ',C)
|
c68278a31a06e915311cc296d492daad80958f63 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1955/CH7/EX7.12/example12.sce | a268efe54d9b670497b7345de75e9f2c55d03a35 | [] | 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 | 881 | sce | example12.sce | clc
clear
//input data
H1=25//The initial head on the turbine in m
N1=200//The initial speed of the turbine in rpm
Q1=9//The initial discharge of the turbine in m^3/s
n0=0.9//Overall efficiency of the turbine
H2=20//The final head on the turbine in m
d=1000//density of the water in kg/m^3
g=9.81//Acceleration due to gravity in m/s^2
//calculations
N2=N1*((H2/H1)^(1/2))//The final speed of the turbine in rpm
Q2=Q1*((H2/H1)^(1/2))//The final discharge of the turbine in m^3/s
P1=n0*d*g*Q1*H1*10^-3//Power produced by the turbine initially in kW
P2=P1*((H2/H1)^(3/2))//Power produced by the turbine finally in kW
//output
printf('(a)The final speed of the turbine is %3.2f rpm\n(b)The final discharge of the turbine is %3.2f m^3/s\n(c)Power produced by the turbine initially is %3.3f kW\n(d)Power produced by the turbine finally is %3.2f kW',N2,Q2,P1,P2)
|
7834601f872a0c8816268180425ef6ec5a3673d0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1859/CH2/EX2.7/exa_2_7.sce | ca207b692af0a192142420aeecb9cd8d9d72a2b2 | [] | 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 | 330 | sce | exa_2_7.sce | // Exa 2.7
clc;
clear;
close;
// Given data
Am= 500;// in watt
epsilon_r= 1.5/100;// in neg and pos
// for positive value of epsilon_r
A1= Am*(1+epsilon_r);// in watt
// for positive value of epsilon_r
A2= Am*(1-epsilon_r);// in watt
disp("Range of reading of wattmeter is "+string(A2)+" watt to "+string(A1)+" watt")
|
f30b6427d94b6aaf5e3115a4ea828b6315f0e2cc | 9fd13e629086d8b97c9f7664a035b70f6f85ea7e | /GUI.sce | b51d5f0b04a02b9880128179316d3e1bcc3d1169 | [] | no_license | azerhounii/Image-Clustering | 0bde10c71a172d9f3067b7da8e61954115db1d68 | 56bf245a986a96e3015396f81acb1c9888b92831 | refs/heads/master | 2020-08-03T10:33:40.206861 | 2019-09-29T20:48:31 | 2019-09-29T20:48:31 | 211,720,933 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,882 | sce | GUI.sce | // This GUI file is generated by guibuilder version 4.2.1
//////////
f=figure('figure_position',[803,431],'figure_size',[640,480],'auto_resize','on','background',[33],'figure_name','Figure n°%d','dockable','off','infobar_visible','off','toolbar_visible','off','menubar_visible','off','default_axes','on','visible','off');
//////////
handles.dummy = 0;
handles.header=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Ubuntu','FontSize',[30],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.0015625,0.8020833,1.06375,0.1958333],'Relief','default','SliderStep',[0.01,0.1],'String','BIRDS IMAGES CLUSTERING','Style','text','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','header','Callback','')
handles.Load=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Ubuntu','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.6265625,0.5354167,0.321875,0.1875],'Relief','default','SliderStep',[0.01,0.1],'String','Load image','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Load image','Callback','Load_callback(handles)')
handles.Cluster=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Ubuntu','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.6265625,0.2895833,0.321875,0.1875],'Relief','default','SliderStep',[0.01,0.1],'String','Cluster','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Cluster','Callback','Cluster_callback(handles)')
handles.axe= newaxes();handles.axe.margins = [ 0 0 0 0];handles.axe.axes_bounds = [0.0140625,0.2291667,0.5875,0.5416667];
footer=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Ubuntu','FontSize',[26],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.0015625,0.0045833,1.06375,0.1958333],'Relief','default','SliderStep',[0.01,0.1],'String','','Style','text','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','footer','Callback','')
f.visible = "on";
function Load_callback(handles)
path = uigetfile("*");
im = imread(path);
imshow(im);
handles.im = im;
handles = resume(handles);
endfunction
function Cluster_callback(handles)
exec('C:\Users\LM\Desktop\L3Info\PjtScilab\ProjetFinal\ImageCluster.sce');
str = cluster(handles.im);
set(footer, 'string', str);
endfunction
|
4b2b1ee555d633054e434801a6291997c0b9804e | 80fc9b7a10b546c9071b974c5328180e74ee1c5d | /TP1/Exercise7.sce | 5ec1f6046f7efed7715c3549d82fb60b854fe47f | [] | no_license | ASokem/TP_MAP101 | a443ddbd656d63918dd5caad3ce89418d02c0123 | b87d45faea6bc793161bae2238bd6489e5d9ede5 | refs/heads/main | 2023-08-10T20:42:07.377878 | 2021-09-29T09:15:34 | 2021-09-29T09:15:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,439 | sce | Exercise7.sce | // Copyright (C) 2021 - UGA - JIANG Yilun
//
// Date of creation: 2021-9-28
//
deff("y = f1(x)", "y = x")
deff("y = f2(x)", "y = x^2")
deff("y = f3(x)", "y = x^3")
deff("y = f4(x)", "y = x^4")
deff("y = f5(x)", "y = x^5")
deff("y = f6(x)", "y = 1 ./ x")
deff("y = f7(x)", "y = abs(x)")
deff("y = f8(x)", "y = exp(x)")
deff("y = f9(x)", "y = log(x)")
deff("y = f10(x)", "y = sqrt(x)")
deff("y = f11(a, x)", "y = a ^ x")
deff("y = f12(x)", "y = cos(x)")
deff("y = f13(x)", "y = sin(x)")
deff("y = f14(x)", "y = tan(x)")
deff("y = f15(x)", "y = cosh(x)")
deff("y = f16(x)", "y = sinh(x)")
deff("y = f17(x)", "y = tanh(x)")
eps = 10 ^ (-2)
scf()
x_1 = -2:eps:2
y_1 = f2(x_1)
plot(x_1, y_1, "b-")
replot([-2, 0, 2, 4])
axes = gca()
xtitle("$f(x) = x^2$")
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
x_2 = -2:eps:2
y_2 = f3(x_2)
plot(x_2, y_2, "b-")
replot([-2, -4, 2, 4])
axes = gca()
xtitle("$f(x) = x^3$")
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
x_3 = 0:eps:1
y_3_1 = f1(x_3)
y_3_2 = f2(x_3)
y_3_3 = f3(x_3)
y_3_4 = f4(x_3)
y_3_5 = f5(x_3)
plot(x_3, y_3_1, "b-")
plot(x_3, y_3_2, "b-")
plot(x_3, y_3_3, "b-")
plot(x_3, y_3_4, "b-")
plot(x_3, y_3_5, "b-")
replot([0, 0, 1, 1])
axes = gca()
xtitle(["$f(x) = x$";"$f(x) = x^2$";"$f(x) = x^3$";"$f(x) = x^4$";"$f(x) = x^5$"])
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
x_4 = -10:eps:10
y_4 = f6(x_4)
plot(x_4, y_4, "b-")
replot([-10, -10, 10, 10])
axes = gca()
xtitle("$f(x) = 1/x$")
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
x_5 = -10:eps:10
y_5 = f7(x_5)
plot(x_5, y_5, "b-")
replot([-10, -10, 10, 10])
axes = gca()
xtitle("$f(x) = |x|$")
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
x_6 = -5:eps:5
y_6_1 = f8(x_6)
y_6_2 = f9(x_6)
plot(x_6, y_6_1, "b-")
plot(x_6, y_6_2, "b-")
replot([-5, -5, 5, 5])
axes = gca()
xtitle(["$f(x) = exp(x)$";"$f(x) = ln(x)$"])
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
x_7 = 0:eps:10
y_7 = f10(x_7)
plot(x_7, y_7, "b-")
axes = gca()
xtitle("$f(x) = sqrt(x)$")
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
a = [1/3 2/5 1/2 2/3 1 3/2 2 5/2 3]
x_8 = -3:eps:3
for i = 1 : length(a)
y_8 = f11(a(i), x_8)
plot(x_8, y_8, "b-")
end
replot([-3, 0, 3, 10])
axes = gca()
xtitle("$f(a) = a^x$")
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
x_9 = -3*%pi/2:eps:3*%pi/2
y_9_1 = f12(x_9)
y_9_2 = f13(x_9)
y_9_3 = f14(x_9)
plot(x_9, y_9_1, "b-")
plot(x_9, y_9_2, "b-")
plot(x_9, y_9_3, "b-")
replot([-3*%pi/2, -4, 3*%pi/2, 4])
axes = gca()
xtitle(["$f(x) = cos(x)$";"$f(x) = sin(x)$"; "$f(x) = tan(x)$"])
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
scf()
x_10 = -3:eps:3
y_10_1 = f15(x_10)
y_10_2 = f16(x_10)
y_10_3 = f17(x_10)
plot(x_10, y_10_1, "b-")
plot(x_10, y_10_2, "b-")
plot(x_10, y_10_3, "b-")
replot([-3, -4, 3, 4])
axes = gca()
xtitle(["$f(x) = cosh(x)$";"$f(x) = sinh(x)$"; "$f(x) = tanh(x)$"])
axes.x_location = "origin"
axes.y_location = "origin"
axes.box = "off"
set(axes, "isoview", "on")
|
50b10c3f3241380205620ee63f1be7d7517bb58f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3311/CH9/EX9.1/Ex9_1.sce | 6c93dc88faa9c605c423c9c8eaafff4082358021 | [] | 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,506 | sce | Ex9_1.sce | // chapter 9
// example 9.1
// Compute rms value of output voltage, fundamental component of the output-voltage waveform, first five harmonics of the output voltage, fundamental power consumed,rms power consumed, rms value by harmonic summation method
// page-544
clear;
clc;
// given
Edc_2=96; // in V (dc source at center tapped)
R=10; // in ohm
// calculate
Edc=2*Edc_2;
E0_rms=Edc/2; // calculation of rms value of output voltage
printf("\nThe rms value of output voltage is \t\t\t E0_rms=%.f V",E0_rms);
E1_fund=sqrt(2)/%pi*Edc; // calculation of fundamental component of the output-voltage waveform
printf("\n\nThe fundamental component of the output voltage is \t E1_fund=%.2f V\n",E1_fund);
P0_fund=E1_fund^2/R; // calculation of fundamental power consumed
P0_rms=E0_rms^2/R; // calculation of rms power consumed
E0_rms_H=E1_fund^2;
for n=3:2:11
E0=E1_fund/n;
printf("\n The %.f harmonic voltage is \t %.2f V",n,E0); // calculation of rms value of voltage by harmonic summation method
E0_rms_H=E0_rms_H+E0^2;
end
E0_rms_H=sqrt(E0_rms_H); // calculation of rms value by harmonic summation method
printf("\n\nThe fundamental power consumed is \t\t\t\t P0_fund=%.2f W",P0_fund);
printf("\nThe rms power consumed is \t\t\t\t\t P0_rms=%.2f W",P0_rms);
printf("\n\nThe rms value determined by harmonic summation method is \t E0_rms=%.2f V",E0_rms_H);
printf("\n\n The two values of rms voltages as determined are almost equal.");
// Note: The answer varies slightly due to precise calculation |
2c5e260f31d59c8e2ba49af268d3946ba3877072 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3472/CH11/EX11.9/Example11_9.sce | 31dac7aa1ce5b28eff79229b5ca4d2604da6a78a | [] | 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 | 946 | sce | Example11_9.sce | // A Texbook on POWER SYSTEM ENGINEERING
// A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar
// DHANPAT RAI & Co.
// SECOND EDITION
// PART II : TRANSMISSION AND DISTRIBUTION
// CHAPTER 4: OVERHEAD LINE INSULATORS
// EXAMPLE : 4.9 :
// Page number 188
clear ; clc ; close ; // Clear the work space and console
// Given data
n = 3.0 // Number of insulators
V = 20.0 // Voltage across each conductor(kV)
c = 1.0/5 // Capacitance ratio
// Calculations
V_2 = 6.0/5.0 // Voltage across middle unit as top unit
V_1 = V/(1+2*V_2) // Voltage across top unit(kV)
V_3 = V_2*V_1 // Voltage across bottom unit(kV)
C_x = c*(1+(1/V_2)) // Capacitance required
// Results
disp("PART II - EXAMPLE : 4.9 : SOLUTION :-")
printf("\nCase(a): Voltage on the line-end unit, V_3 = %.2f kV", V_3)
printf("\nCase(b): Value of capacitance required, Cx = %.3f*C", C_x)
|
6e47298773d4efa8dd385e14646680765d5567df | 6813325b126713766d9778d7665c10b5ba67227b | /Chapter6/Ch_6_Eg_6.21.sce | cad97b9c2d5b3e7218f3068af1282db1779635d0 | [] | 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 | 111 | sce | Ch_6_Eg_6.21.sce | //A program to write strings in a file.
x=[1:3]';
y=x.^2;
s=msprintf("%4d%4d\n",x,y);
mputl(s,"out.dat");
|
a6a65e64cad179202c3c38a64b4e9da3c3e81f05 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3843/CH9/EX9.9/Ex9_9.sce | b98e4e3d6604135185205302f15d004c8c2b8716 | [] | 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 | 511 | sce | Ex9_9.sce | // Example 9_9
clc;funcprot(0);
// Given data
P_1=100;// kPa
T_1=25+273;// K
r_p=5;// The pressure ratio
T_3=850+273;// The maximum temperature in K
k=1.4;// The specific heat ratio
// Calculation
T_2=T_1*(r_p)^((k-1)/k);// K
T_4=T_3*(1/r_p)^((k-1)/k);// K
w_r=(T_2-T_1)/(T_3-T_4);// The back work ratio
n=1-(r_p)^((1-k)/k);// The thermal efficiency
printf("\nThe back work ratio,w_comp/w_turb=%0.3f or %2.0f percentage. \nThe thermal efficiency,n=%0.3f(%2.1f percentage)",w_r,w_r*100,n,n*100);
|
ed15ea30319ffc43fb21053fb83b1b6822ce46ab | 449d555969bfd7befe906877abab098c6e63a0e8 | /593/CH3/EX3.1/ex3_1.sce | 67b3645ca51589b2982ca7ea4b21e5d81de09364 | [] | 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 | 797 | sce | ex3_1.sce | clear;
//clc();
// Example 3.1
// Page: 52
printf("Example-3.1 Page no.-52\n\n");
//***Data***//
T = 20;//[C]
P = 1;//[atm]
// From Raoult's law y_i*P = x_i*p_i
// Rearranging
//y_i = x_i*p_i/P;
// Here we have ternary mixture of nitrogen, oxygen, and water. If we let the subscript i stand for water, we can say that
// x_water = 1-x_N2-x_O2;
// but we know from experience that the mole fractions of dissolved N2 and O2 are quite small, so that we are safe in saying that
x_N2 = 0;
x_O2 = 0;
x_water = 1-x_N2-x_O2;
// From any steam table we may look up the value of the vapour pressure of water at 20C, finding
p_water = 0.023;//[atm]
// So
y_water = x_water*p_water/P;
printf("The mole fraction of water vapour in air in equilibrium with water is %f",y_water); |
ca54f8f34e141982d98c3b558e2f85e94ca55ff1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /291/CH8/EX8.3j/eg8_3j.sce | ba982ee85be123d342cf4f09cbd9d63a9101a5fa | [] | 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 | 389 | sce | eg8_3j.sce | X = [8.6 9.4 5.0 4.4 3.7 11.4 10.0 7.6 14.4 12.2 11.0 14.4 9.3 10.5 10.3 7.7 8.3 6.4 9.2 5.7 7.9 9.4 9.0 13.3 11.6 10.0 9.5 6.6];
n = length(X);
uo = 8;
Xbar=mean(X);
sd = sqrt(variance(X));
T = sqrt(n)*(Xbar - uo)/sd;
disp(T, "The test statistic is ")
p = 1- cdft("PQ", T, n-1);
disp(p, "P-value is")
disp("A small p value indicates that the mean service time exceeds 8 minutes") |
375de61889e6caccfeaab50e03cca551dc33210f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH1/EX1.4/Ex1_4.sce | 0c9c6d4536857ae0e2219e33c4cd54cfc183c0ec | [] | 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 | Ex1_4.sce | //Example 1_4
clc;
clear;
close;
format('v',6);
//given data :
Vs=6;//V
//Point A & C, B & D are shorted
RAB=(4*4/(4+4));//ohm
RDC=(4*4/(4+4));//ohm
Req=RAB*RDC/(RAB+RDC);//ohm
Is=Vs/Req;//A
disp(Is,"Current supplied by the battery(A)");
|
19bc53dd251edc6670c403fb2c3277d0b6ec565f | 2ae858a680a4ccf8a2ec89a45a1e48a0292d8eab | /macros/imfuse.sci | 99042d7e2ef7bc0b7d53cba872c2398fe75060bb | [] | no_license | shreyneil/FOSSEE-Image-Processing-Toolbox | f315a82c325b2d6cbd0611689f3e30071a38490d | dd1cbd0dcbe0c3dd11d6ce1ab205b4b72011ae56 | refs/heads/master | 2020-12-02T16:26:13.755637 | 2017-07-07T19:22:33 | 2017-07-07T19:22:33 | 96,552,147 | 0 | 0 | null | 2017-07-07T15:32:15 | 2017-07-07T15:32:15 | null | UTF-8 | Scilab | false | false | 1,893 | sci | imfuse.sci | // Copyright (C) 2015 - 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: Shreyash Sharma
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
function new_image = imfuse(image1, image2, method, scaling)
// This function is used to calculate Composite of two images.
//
// Calling Sequence
// C = imfuse(A,B,C,D)
//
// Parameters
// A: Image to be combined into a composite image, specified as a grayscale, truecolor, or binary image.
// B: Image to be combined into a composite image, specified as a grayscale, truecolor, or binary image.
// C,D: Name-Value Pair Arguments.Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name and value must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN. eg.'Scaling','joint' scales the intensity values of A and B together as a single data set.
//
// Description
// C = imfuse(A,B) creates a composite image from two images, A and B. If A and B are different sizes, imfuse pads the smaller dimensions with zeros so that both images are the same size before
// creating the composite. The output, C, is a numeric matrix containing a fused version of images A and B.
//
// Examples
// i = imread('lena.jpeg');
// i1 = imread('lena2.jpg');
// i2 = imfuse(i,i1,"blend","joint");
// imshow(i2);
//
image_list1 = mattolist(image1)
image_list2 = mattolist(image2)
out = raw_imfuse(image_list1, image_list2, method, scaling)
sz = size(out)
for i=1:sz
new_image(:, :, i) = out(i)
end
endfunction
|
4d6396fdaae76c134eb9a954169d20d52cfd5449 | 87749481136b7b72a47930f587f27667e0c0f97d | /FIR filter design/cshift.sci | 913b0bb01c4ae8bc7d1f0715308cea36582305ee | [
"MIT"
] | permissive | brooky56/Digital_Signal_Processing | cf15e5ac443a16edcb3efc8d7703cf4746dedcba | f28651e40b0a99b79e9ba27deabc4db8bfc7f08e | refs/heads/master | 2022-06-30T17:59:28.072522 | 2020-05-11T18:58:39 | 2020-05-11T18:58:39 | 242,598,653 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 491 | sci | cshift.sci | function R = cshift(M,d)
Fname = "cshift"
if argn(2)==0
head_comments(Fname)
R = []
return
end
s = size(M)
R = M
for i=1:length(d)
if s(i)>1
D = pmodulo(d(i),s(i))
if D~=0
S = emptystr(1,length(s))+":"
S(i) = "[s(i)-D+1:s(i) 1:s(i)-D]"
S = strcat(S,",")
if typeof(R) ~= "ce"
execstr("R = R("+S+")")
else
execstr("R.entries = R("+S+").entries")
end
end
end
end
endfunction
|
7afd03e43311a9026001941f749fc3618a12db34 | f8069f807511c33c023dd3240987dba02f91c33e | /src/gnu960/src/lib/libfp/build/fpcnvt.tst | 060ae74b42e021077ce4671d4c206be623185dd3 | [
"BSD-2-Clause"
] | permissive | DrItanium/i960 | 37bbbfbd6afff11093d0627cba57fedc9f956e97 | 6736a0ca299fbb59f5813ed22ff7d94fdb8cbdc8 | refs/heads/master | 2021-09-28T10:43:04.057666 | 2021-09-09T16:43:06 | 2021-09-09T16:43:06 | 146,672,649 | 3 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 518 | tst | fpcnvt.tst | m
f12 12 =
f-13 -13 =
f235 235 =
f0 0 =
3.6 a 3.0 =
3.9 a 3.0 =
3.0 a 3.0 =
9.2 a 9.0 =
-3.2 a -4.0 =
-7.9 a -8.0 =
-8.123 a -9.0 =
h7f800000 a h7f800000 =
hff800000 a hff800000 =
hffffffff a hffffffff =
3.6 i 3.0 =
3.9 i 3.0 =
3.0 i 3.0 =
9.2 i 9.0 =
-3.2 i -4.0 =
-7.9 i -8.0 =
-8.123 i -9.0 =
h7f800000 i 2147483646 =
hff800000 i -2147483647 =
hffffffff i 0 =
3.6 z 3.0 =
3.9 z 3.0 =
3.0 z 3.0 =
9.2 z 9.0 =
-3.2 z -3 =
-7.9 z -7 =
-8.123 z -8 =
h7f800000 z 2147483646 =
hff800000 z -2147483647 =
hffffffff z 0 =
q
|
111787cda833a050aabbedc042d7cf26b681309c | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronics_Devices_And_Circuits_G._S._N._Raju_2534.zip/Electronics_Devices_And_Circuits_G._S._N._Raju_2534/CH1/EX1.9/Ex1_9.sce | a08444359885a62a611a165c8173337fddae4f8b | [] | no_license | hohiroki/Scilab_TBC | cb11e171e47a6cf15dad6594726c14443b23d512 | 98e421ab71b2e8be0c70d67cca3ecb53eeef1df6 | refs/heads/master | 2021-01-18T02:07:29.200029 | 2016-04-29T07:01:39 | 2016-04-29T07:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 216 | sce | Ex1_9.sce | errcatch(-1,"stop");mode(2);//Ex1.9
F = 3*(10^-12) //force applied
E = 5*(10^-6) //electric field
disp("F = "+string(F)+"N")
disp("E = "+string(E)+"V/m")
disp("Q= F/E = "+string(F/E)+"C") //chage
exit();
|
adad1e295a8ead1038152ff6c82b06fb3687f7c7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1309/CH3/EX3.4/ch3_4.sce | 6bbd6f5af023e54b14d9956a979b9e0b812c1692 | [] | 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 | 687 | sce | ch3_4.sce | clc;
clear;
printf("\t\t\tChapter3_example4\n\n\n");
// Determination of the conduction shape factor for the underground portion of the configuration
// specifications of 4 nominal, schedule 40 pipe from table F1
OD=4.5/12; // diameter in ft
R=OD/2;
// For pipe A
L_A=4.5; // length in ft
// shape factor number 9 is selected from table 3.1
S_A=(2*%pi*L_A)/(log(2*(L_A)/R));
printf("\nThe Shape Factor of pipe A is %.1f",S_A);
// For pipe B
L_B=18; // length in ft
// shape factor number 9 is selected from table 3.1
S_B=(2*%pi*L_B)/(acosh(L_A/R));
printf("\nThe Shape Factor of pipe B is %.1f",S_B);
S=2*S_A+S_B;
printf("\nThe total conduction shape factor for the system is %.1f",S);
|
0836a83f7ce62990a37f09fdac2c23d1ecdafb5d | d4433dc5a6e90f6a26a4c5d9dee686eade240b25 | /3DTEST8.TST | cec7a07eda803d52a15e4f6f51bce9a88e359624 | [] | no_license | qb40/all | 6e2149ef3c6151717e468ca236840de622cf7d2a | e168acb64fbde09277b04515574507dcbe35161c | refs/heads/master | 2022-02-05T17:58:39.207269 | 2014-01-19T13:28:41 | 2014-01-19T13:28:41 | 106,962,623 | 5 | 0 | null | 2017-10-14T21:02:04 | 2017-10-14T21:02:03 | null | UTF-8 | Scilab | false | false | 4,024 | tst | 3DTEST8.TST | '3d Formula for Coordinate Axes
'perspx=perspective ;declarations
'perspy=(perspx*xres)/yres
'objectx,objecty,objectz
'xpos,ypos,zpos
'camerax,cameray,cameraz
'objanga,objangb,objangc
'camanga,camangb,camangc
'xcentre,ycentre
'x1=xpos-objectx
'y1=ypos-objecty
'z1=zpos-objectz
'y2=y1*cos(objanga)+z1*sin(objanga)
'z2=z1*cos(objanga)-y1*sin(objanga)
'x2=x1*cos(objangb)+z2*sin(objangb)
'z3=z2*cos(objangb)-x1*sin(objangb)
'y3=y2*cos(objangc)+x2*sin(objangc)
'x3=x2*cos(objangc)-y2*sin(objangc)
'x1=x3+objectx-camerax
'y1=y3+objecty-cameray
'z1=z3+objectz-cameraz
'y2=y1*cos(camanga)+z1*sin(camanga)
'z2=z1*cos(camanga)-y1*sin(camanga)
'x2=x1*cos(camangb)+z2*sin(camangb)
'z3=z2*cos(camangb)-x1*sin(camangb)
'y3=y2*cos(camangc)+x2*sin(camangc)
'x3=x2*cos(camangc)-y2*sin(camangc)
'xf=(perspx*x3)/(z3+perspx)
'yf=(perspy*y3)/(z3+perspy)
'xdone=xf+xcentre
'ydone=yf+ycentre
'objectx,objecty,objectz - point of rotation of object
'camerax,cameray,cameraz - point of camera looking at the world you make
'xpos,ypos,zpos - position of pixel in the world coords
'xcentre,ycentre - centre of vision on the screen
'Coordinate Axes
' ^y
' |
' |
' |
' ----->x
' /
'z
'Computer Axes
'----->x
'|\
'| \z
'|
'y
'Sampling Computer Axes ...
'Press a key
DIM sine(359), cosine(359)
FOR i% = 0 TO 359
sine(i%) = SIN((CSNG(i%) / 180) * 3.14)
cosine(i%) = COS((CSNG(i%) / 180) * 3.14)
NEXT
SCREEN 9, 1, 0
TYPE objects
x AS SINGLE
y AS SINGLE
z AS SINGLE
clr AS INTEGER
END TYPE
DIM obj(18) AS objects
FOR i% = 0 TO UBOUND(obj)
RANDOMIZE TIMER
READ obj(i%).x, obj(i%).y, obj(i%).z
obj(i%).clr = i% MOD 256
NEXT
k$ = INPUT$(1)
'Some initializations
perspx = 250
perspy = (perspx * 320) / 200
objectx = 0
objecty = 0
objectz = 0
camerax = -100
cameray = -100
cameraz = -100
xcentre = 150
ycentre = 200
objanga = 0
objangb = 0
objangc = 0
camanga = 0
camangb = 0
camangc = 0
DIM xdone(UBOUND(obj)), ydone(UBOUND(obj))
i% = 1
a1 = TIMER
t = .01
DO
FOR j% = 0 TO UBOUND(obj)
x1 = obj(j%).x - objectx
y1 = (obj(j%).y - objecty)
z1 = (obj(j%).z - objectz)
y2 = y1 * COS(objanga) + z1 * SIN(objanga)
z2 = z1 * COS(objanga) - y1 * SIN(objanga)
x2 = x1 * COS(objangb) + z2 * SIN(objangb)
z3 = z2 * COS(objangb) - x1 * SIN(objangb)
y3 = y2 * COS(objangc) + x2 * SIN(objangc)
x3 = x2 * COS(objangc) - y2 * SIN(objangc)
x1 = x3 + objectx - camerax
y1 = (y3 + objecty - cameray)
z1 = (z3 + objectz - cameraz)
y2 = y1 * COS(camanga) + z1 * SIN(camanga)
z2 = z1 * COS(camanga) - y1 * SIN(camanga)
x2 = x1 * COS(camangb) + z2 * SIN(camangb)
z3 = z2 * COS(camangb) - x1 * SIN(camangb)
y3 = y2 * COS(camangc) + x2 * SIN(camangc)
x3 = x2 * COS(camangc) - y2 * SIN(camangc)
xf = (perspx * x3) / (z3 + perspx)
yf = (perspx * y3) / (z3 + perspx)
xdone(j%) = xf + xcentre
ydone(j%) = yf + ycentre
NEXT
CLS
SELECT CASE i%
CASE 0
FOR k% = 0 TO UBOUND(obj)
LINE (xcentre, ycentre)-(xdone(k%), ydone(k%)), obj(k%).clr
NEXT
CASE 1
LINE (xcentre, ycentre)-(xcentre, ycentre), 0
FOR k% = 0 TO UBOUND(obj)
LINE -(xdone(k%), ydone(k%)), obj(k%).clr
NEXT
CASE ELSE
END SELECT
PCOPY 1, 0
k$ = INKEY$
IF (k$ = "") THEN GOTO cont
k$ = LCASE$(k$)
SELECT CASE k$
CASE CHR$(27)
i% = (i% + 1) MOD 2
CASE "w"
cameray = cameray - 3
CASE "s"
cameray = cameray + 3
CASE "a"
camerax = camerax - 3
CASE "d"
camerax = camerax + 3
CASE "r"
cameraz = cameraz - 10
CASE "f"
cameraz = cameraz + 10
CASE "y"
camanga = camanga + .01
CASE "h"
camanga = camanga - .01
CASE "u"
camangb = camangb + .01
CASE "j"
camangb = camangb - .01
CASE "i"
camangc = camangc + .01
CASE "k"
camangc = camangc - .01
CASE "4"
objanga = objanga + .01
CASE "1"
objangb = objangb - .01
CASE "5"
objangb = objangb + .01
CASE "2"
objanga = objanga - .01
CASE "6"
objangc = objangc + .01
CASE "3"
objangc = objangc - .01
CASE ELSE
END SELECT
cont:
LOOP
'zxy
DATA 0,0,0
DATA 0,50,0
DATA 0,50,50
DATA 0,0,50
DATA 0,0,0
DATA 50,0,0
DATA 50,50,0
DATA 0,50,0
DATA 0,0,0
DATA 50,0,0
DATA 50,0,50
DATA 50,50,50
DATA 50,50,0
DATA 50,0,0
DATA 50,0,50
DATA 0,0,50
DATA 0,50,50
DATA 50,50,50
DATA 50,0,50
|
d138ec624ade6163b28b8c2474e9f4b94748edf9 | 090c4bc08ecd896fc1d76fa3454c03fa0cb805f0 | /SciLab/L13_2.sce | 28a15a54f1192d2b085da23541dc6c84ee6a85e1 | [] | no_license | GennadySX/pLabs | 6c64cd2fdc87a204e9b675ef7cf54f4cae4356c7 | 50810647bcc7a48ce38d51c321b165a48560b5d6 | refs/heads/master | 2020-09-05T17:22:46.474588 | 2019-11-07T06:35:33 | 2019-11-07T06:35:33 | 220,167,548 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 710 | sce | L13_2.sce | //Апроксимация функции 13-2
clc
clf
disp('-----------------Задание 2----------------------------')
xname('Задание 2: Апроксимация функции')
x=[1:0.5:5];
y=[1 2 4 2 3 5 4 6 3];
z=[x;y]
plot(x,y,'r*'),xgrid()
xi=0:0.5:6;
a=gca();
a.x_location = "origin";
a.y_location = "origin";
sleep(1200)
function zr=p(c,z)
zr=z(2)-c(1)-c(2)*z(1)-c(3)*z(1).^2-c(4)*z(1).^3
endfunction
c=[0;0;0;0];
[a,S]=datafit(p,z,c)
disp(S,'S3=')//погрешность
disp(a,'a3=')//коэффициенты
p=poly([a],'x','c')
disp(p,'Q3(x)=')
pxi=a(1)+a(2)*xi+a(3)*xi.^2+a(4)*xi.^3
plot(xi,pxi),xgrid()
|
61c08ef09d06956eee602292d37ff72e901adc3e | 449d555969bfd7befe906877abab098c6e63a0e8 | /710/CH13/EX13.2/13_2.sci | 55924e523672d2373c8fc20e7951f08c4b18b94f | [] | 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 | 389 | sci | 13_2.sci | clc();
clear;
//To determine acceptance angle
NA=0.5; //numerical aperture of fibre
n0=1; //refractive index of the medium (air) from which ray enters the fibre
//NA=n0*sin(i)where i is the acceptance angle.
i=asind(NA/n0) //acceptance angle in degrees
printf("The acceptance angle is %d degrees",i); |
b9eccc24abfc7797ca30ffc2e27771781df81385 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3856/CH4/EX4.6/Ex4_6.sce | 5d17e1375d7a81f6e3c83513347714a96153e137 | [] | 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 | 436 | sce | Ex4_6.sce | //Calculate the Enthalpy Change for heating of 1.46 moles of Oxygen
//Example 4.6
clc;
clear;
n=1.46; //Number of moles of Oxygen
function x=Cp(T) ,x=(25.7+0.0130*T), endfunction //Molar Heat Capacity of Oxygen at Constant Pressure in J K^-1 mol^-1
function y=f(T),y=n*Cp(T),endfunction
delH=intg(298,367,f); //Enthalpy Change in J
printf("Enthalpy Change = %.2f*10^3 J",delH*10^-3)
|
71b4dd670287369f34895c398ae262e1d1598b6c | 449d555969bfd7befe906877abab098c6e63a0e8 | /416/CH10/EX10.7/exp10_7pp.sce | 10e5902838f7ac516a2eacb6fb1b9504469be7e4 | [] | 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,223 | sce | exp10_7pp.sce | clear
clc
disp("example10.7")
za=complex(0.03,0.09)
zb=complex(0.1,0.3)
zc=complex(0.03,0.09)
zd=complex(0.04,0.12)
ze=complex(0.04,0.12)
ia=complex(1.5,-0.4)
ib=complex(0.5,-0.2)
ic=complex(1,-0.1)
id=complex(1,-0.2)
ie=complex(1.5,-0.3)
il1=.4
il2=.6
na1=1;nb1=0.6;nc1=0;nd1=.4;ne1=.6
na2=0;nb2=-0.4;nc2=1;nd2=.4;ne2=.6
vl=1
//some thing is messed
v1=vl+za*ia
v2=vl-zb*ib+zc*ic
a1=atan(imag(ia)/real(ia))
a2=atan(imag(ic)/real(ic))
cosa=cos(a1-a2)
cosph1=cos(atan(imag(v1)/real(v1))-a1)
cosph2=cos(atan(imag(v2)/real(v2))-a2)
b11=(na1^2*real(za)+nb1^2*real(zb)+nc1^2*real(zc)+nd1^2*real(zd)+ne1^2*real(ze))/(abs(v1)^2*cosph1)
b22=(na2^2*real(za)+nb2^2*real(zb)+nc2^2*real(zc)+nd2^2*real(zd)+ne2^2*real(ze))/((abs(v2)^2)*cosph2)
bb12=(abs(v1)*abs(v2)*cosph1*cosph2)
ab12=(na2*na1*real(za)+nb2*nb1*real(zb)+nc1*nc2*real(zc)+nd2*nd1*real(zd)+ne2*ne1*0.03)
b12=cosa*ab12/bb12
printf("bus voltages at 2 buses are \nv1=%1.3f+i%1.3f,\nv2=%1.3f+i%1.3f",real(v1),imag(v1),real(v2),imag(v2))
printf("\nloss coffecients are \nb11=%1.5fp.u\nb22=%1.5fp.u\nb12=%1.5fp.u \n",b11,b22,b12)
printf("loss coffecients in actual values is \nb11=%eM(W)-1\nb22=%eM(W)-1\nb12=%eM(W)-1\n",b11/100,b22/100,b12/100) |
42ff6fbefdd149a3725709817c12c2b11a4fe22b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2144/CH8/EX8.12/ex8_12.sce | 3e76b2f95926672919113f83b307cf6a3246727c | [] | 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,012 | sce | ex8_12.sce | // Exa 8.12
clc;
clear;
close;
// Given data
mC= 0.86;//mass of carbon in kg
mH2= 0.14;//mass of H2 in kg
maBYmf= (2.66*mC + 8*mH2)/0.23;// in kg/kg of fuel
Air_supp_deficiency= maBYmf/10;// in kg/kg of fuel
Air_saved= 16/(12*0.23);// in kg/kg of carbon
m1= Air_supp_deficiency/Air_saved;// mass of coal burns to carbon monoxide
m2= mC-m1;// mass of coal burns to carbon diooxide
CO2_formed= m2*3.66;// in kg
CO_formed= m1*28/12;// in kg
N2_formed= Air_supp_deficiency*0.77*9;// in kg
M_wt_CO2= 44;// molecular weight
M_wt_CO= 28;
M_wt_N2= 28;
CO2_rel_vol= CO2_formed/M_wt_CO2;
CO_rel_vol= CO_formed/M_wt_CO;
N2_rel_vol= N2_formed/M_wt_N2;
total_rel_vol=CO2_rel_vol+CO_rel_vol+N2_rel_vol;
CO2_vol= CO2_rel_vol/total_rel_vol*100;// in %
CO_vol= CO_rel_vol/total_rel_vol*100;// in %
N2_vol= N2_rel_vol/total_rel_vol*100;// in %
disp(CO2_vol,"Volumetric analysis of CO2 in % is : ")
disp(CO_vol,"Volumetric analysis of CO in % is : ")
disp(N2_vol,"Volumetric analysis of N2 in % is : ")
|
7aff708e16dded1df5cde7e56b5c414471b2b6b5 | 08bfc8a1f8e44adc624d1f1c6250a3d9635f99de | /SDKs/swig/Examples/scilab/class/runme.sci | 1303e1d01805530fcab7b8bc41f2c309f1ecaec3 | [] | no_license | Personwithhat/CE_SDKs | cd998a2181fcbc9e3de8c58c7cc7b2156ca21d02 | 7afbd2f7767c9c5e95912a1af42b37c24d57f0d4 | refs/heads/master | 2020-04-09T22:14:56.917176 | 2019-07-04T00:19:11 | 2019-07-04T00:19:11 | 160,623,495 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 129 | sci | runme.sci | version https://git-lfs.github.com/spec/v1
oid sha256:e4f17a20b437ad0380615d976dc9fed8d520706e9de201f324064117bb37ef11
size 1142
|
e9fc76b06f8b3ecb8e0c9c5b9c7b1d16eb221316 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.3.1/macros/percent/%lssip.sci | e69ab241b4f5c25f5cece48b6367dd0e774f6d7d | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain",
"MIT"
] | 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 | 315 | sci | %lssip.sci | function [s]=%lssip(i,j,s1,s2)
//%lssip(i,j,s1,s2) <=> s2(i,j)=s1
//!
// origine s. steer inria 1992
//
if type(i)==10|type(j)==10 then
error(21)
end
[a1,b1,c1,d1,x1,dom1]=s1(2:7)
d2=s2;
[n1,n1]=size(a1);
b2(1:n1,j)=b1
c2(i,1:n1)=c1
d2(i,j)=d1;
s=tlist(['lss','A','B','C','D','X0','dt'],a1,b2,c2,d2,x1,dom1)
|
5dff231b77ca9e9b1d745cdad7e97de4e4c7ad80 | 482cdc3e27e99afe860829eff3e593caa62202e3 | /src/Assignment1_Tests/test13.tst | a99de9a4aefe10d6b01f2bfbbdd15c29f306537b | [] | no_license | abrageddon/DLXCompiler | e153430de4412fe48a34955851352d0fd73ab2d8 | 2d1abd102f723c2e1f0ed5893e86c7d0ceb42914 | refs/heads/master | 2020-12-30T10:50:20.955331 | 2011-12-02T03:34:59 | 2011-12-02T03:34:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 44 | tst | test13.tst | {
if a !=== b then else not b
.
}
main
|
7c8ff4012515af3aa70213f1fc7088660123270e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1868/CH13/EX13.7/Ch13Ex7.sce | b7b9c56cfaf48eff80914339d6b4ecaaa80f05e9 | [] | 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 | 636 | sce | Ch13Ex7.sce | // Scilab code Ex13.7: Pg 484 (2005)
clc; clear;
R0 = 5; // Activity of I-131 isotope at the time of shipment, mCi
R = 4.2; // Activity of I-131 isotope at the time of receipt by the medical laboratory, mCi
T_half = 8.04; // Half life of radioactive nucleus I-131, days
lambda = 0.693/T_half; // Decay constant of C-11, per second
// As log(R/R0) = -lambda*t, solving for t
t = -1/lambda*log(R/R0); // Time that has elapsed between two measurements, days
printf("\nThe time that has elapsed between two measurements = %4.2f days", t);
// Result
// The time that has elapsed between two measurements = 2.02 days
|
d40e8cded7b9e5c0357f90ca74b0ccb09112156b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1895/CH11/EX11.12/EXAMPLE11_12.SCE | 72dbff7ea3ccb49043cf1166709736bc94ff9a6a | [] | 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 | 672 | sce | EXAMPLE11_12.SCE | //ANALOG AND DIGITAL COMMUNICATION
//BY Dr.SANJAY SHARMA
//CHAPTER 11
//Information Theory
clear all;
clc;
printf("EXAMPLE 11.12(PAGENO 495)");
//given
n = 2*10^6//elements od black and white TV picture
m = 16//brightness levels of black and white TV picture
o = 32//repeated rate of pictures per second
//calculations
Px_i = 1/m//probability of brightness levels of picture
H_X = 0;
for i= 1:16
H_Xi = (-1/(1/Px_i))*log2(1/(1/Px_i));
H_X = H_X +H_Xi;
end
r = n*o//rate of symbols generated
R = r*H_X//average rate of information convyed
//results
printf("\n\ni. Average rate of information convyed = %.2f bits/seconds",R)
|
134fedf25cff0d4fe1ac8798e80fb37726a213d2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1325/CH15/EX15.4/15_4.sce | 517438f675154b0b170b5243d2717de9ac48ee71 | [] | 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 | 422 | sce | 15_4.sce | //To find the resistance offered by the dashpot
clc
//given
m=50//lb
k=100//lb/in
g=32.2//ft/s
d=m/k//static deflection
n=(1/(2*%pi))*(g*12/d)^(1/2)
//part 2
b=g*12/d
a=(b/20.79)^(1/2)
nd=(1/(2*%pi))*((b-(a/2)^2))^(1/2)
A=nd/n
printf("\nFrequency of free vibrations = %.3f per sec\nFrequency of damped vibrations = %.3f per sec \nThe ratio of the frequencies of damped and free vibrationsis %.3f \n",n,nd,A)
|
d77b250a2691779404a1696a0bee6564f99192c2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1445/CH2/EX2.35/Ex2_35.sce | c205d94bfe0f77cd2cff9f0215181768a3053d53 | [] | 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,204 | sce | Ex2_35.sce | //CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 35 // read it as example 34 in the book on page 2.88
clc;
disp("CHAPTER 2");
disp("EXAMPLE 35");
//VARIABLE INITIALIZATION
R=100; //in Ω
L=0.2; //in Henry
C=20*10^(-6); //farads
V=240; // volts
f=50; //Hz
//
//SOLUTION
//Solution (a)
XL=2*%pi*f*L;
XC=1/(2*%pi*f*C);
//impedence Z=sqrt(R^2 +XL^2)
X=XL-XC;
Z=sqrt(R^2 +X^2);
disp("SOLUTION (a)");
disp(sprintf("The total impedence is %f Ω", Z));
I=V/Z;
disp("SOLUTION (b)");
disp(sprintf("The total current is %f Amp", I));
Vr=I*R;
Vi=I*XL;
Vc=I*XC;
disp("SOLUTION (c)");
disp(sprintf("The voltage across resistance is %f V",Vr));
disp(sprintf("The voltage across inductance is %f V",Vi));
disp(sprintf("The voltage across capacitance is %f V",Vc));
pf=R/Z;
pc=V*I*pf;
disp("SOLUTION (d)");
disp(sprintf("The Power Factor is %f leading", pf));
disp("SOLUTION (e)");
disp(sprintf("The Power consumed in the circuit is %f W",pc));
//XL=XC
f0=1/(2*%pi*sqrt(L*C));
disp("SOLUTION (f)");
disp(sprintf("Resonance will occur at %f Hz",f0));
disp(" ");
//
//END
|
bbf8a99fefcc75c0c46f64de5dfb7d265e37f667 | e176c804d3e82d065a9c9635dad92da21c1483a9 | /libs/histogramme.sci | c3335dc673ffe01c12397ed27919527d3a67ca96 | [
"MIT"
] | permissive | Exia-Aix-2016/ExoLife | 38f7d5e54a1fd26333f19d99a8b63f0d64cc4c4c | a88d4bc3b852f8a85b6c8cc0979ced29fb28b751 | refs/heads/master | 2021-09-07T01:47:04.742247 | 2018-02-15T11:57:47 | 2018-02-15T11:57:47 | 120,471,380 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 222 | sci | histogramme.sci | function output = histogramme(img)
hist = zeros(1,256)
xmax = size(img,1)
ymax = size(img,2)
for x=1:xmax
for y=1:ymax
hist(double(img(x,y))+1) = hist(double(img(x,y))+1)+1
end
end
output = hist
endfunction |
35dcc3b473f6a31b5c8cd04d1e366c5154b799e9 | 4c59f4da523df5b09b8bcd1a4b390c093a26b9b0 | /Analyse numérique appliqué/SCILAB/TP2.sci | befde2e7c0c826d4f897ad015f148763f3aabe57 | [
"BSD-3-Clause"
] | permissive | ticuss/Mon-parcours | efcb633d5461b9af7a4426e252b5bcde8b676deb | 85e162691feb4008372584b1922dbd0c4c11f18f | refs/heads/master | 2023-03-27T11:05:14.832185 | 2021-03-26T15:59:16 | 2021-03-26T15:59:16 | 274,419,849 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,414 | sci | TP2.sci | //Séance 2 : Exercice 3. Un système proie/prédateur
q=5 //numéro de la question traitée
//Initialiser
C0 = 25
R0 = 5
V0 = [C0;R0]
//la matrice de coefficients
A = [0.5 0.4;-0.104 1.1]
//nombre de mois
n = 20
//
//1ere méthode : utiliser une matrice M pour stoker les résultats
//
M = zeros(2,2)
//
M(1,1) = C0
//
M(2,1) = R0
//
//boucle pour calculer à chaque mois
//
for i = 2:n
//
M(1:2,i) = A*M(1:2,i-1)
//
end
//2e méthode : Dans une matrice V
V=V0
for i = 2:n
V(1:2,i) = A*V(1:2,i-1)
end
//Question 1 :
if q==1 then
//tracer
//1ere facon
scf(0)
clf(0)
//pour que l'origine s'affiche
a=get("current_axes");
a.x_location="origin";
a.y_location="origin";
xtitle("rats et chouettes en cours du temps","mois","effectif")
plot(V(1,:),'bp:')
plot(V(2,:),'gs-')
legend(['chouettes','rats (en milliers)'])
//
//2e façon
//
scf(1)
//
clf(1)
//
b=get("current_axes")
//
b.x_location="origin";
//
b.y_location="origin";
//
plot2d(1:n,V(1,:),color("red"))
//
plot2d(1:n,V(2,:),color("blue"))
end
//Question 2 :
if q==2 then
//on trace le nombre de chouettes par rapport à celui des rats
//au cours du temps.
//on saute les n premiers mois, on compte juqu'à m+n mois
//dans le but d'obtenir une droitem=10
M=[V(1,n);V(2,n)]
for i = 2:m
M(1:2,i) = A*M(1:2,i-1)
end
scf(0)
clf(0)
a=get("current_axes");
a.x_location="origin";
a.y_location="origin";
xtitle("chouettes en fonction de rats","rats(milliers)","chouettes ")
plot(M(2,:),M(1,:))
//
h=a.children(1).children(1);
//
h.thickness=2;
//
h.foreground=2;
//calculer la régression linéaire
[c,d,sig] = reglin(M(1,:),M(2,:));
disp("c = " + string(c)) //ratio chouettes/rats
end
//question 3
if q==3 then
//on a deviné que R_k = t%*R_(k-1) donc on trace R_k en fonction
//de R_(k-1)
m=10000
M=[V(1,n);V(2,n)]
for i = 2:m
M(1:2,i) = A*M(1:2,i-1)
end
scf(0)
clf(0)
//a=get("current_axes");
//a.x_location="origin";
//a.y_location="origin";
plot(M(2,1:m-1),M(2,2:m))
[t,d,sig] = reglin(M(2,1:m-1),M(2,2:m));
disp("t = " + string(t*100-100) +"%") //taux de croissance
end
//même chose pour les chouettes, à vous de terminer
//question 4
if q==4 then
//indication : si l'on a trouvé R_k = t*R_(k-1), alors R_k =
t^k*R_0
//donc, la représentation graphique de log(R_k) en fonction du
temps (k)
//devrait donner une droite de pente log(t)
//c'est la raison pour laquelle on trace log(R_k) en fonction du
temps
m=100
M=V0
for i = 2:m
M(1:2,i) = A*M(1:2,i-1)end
scf(0)
clf(0)
plot(0:m-1,log(M(2,:)))
[lt,d,sig] = reglin(0:m-1,log(M(2,:)));
disp("t = " + string(exp(lt))) //taux de croissance
end
//même chose pour les chouettes, à vous de terminer
//question 5
if q==5 then
m=100 //regarder ce que donne m =10 puis m = 100 puis m = 1000....
M=V0
for i = 2:m
M(1:2,i) = A*M(1:2,i-1)
end
scf(1)
clf(1)
//subplot(mnp) : divise la fenetre en m lignes et n colones et affiche
//le graphe sur la p ième sous-fenetre
subplot(221)
plot(0:m-1,log(M(2,:)))
xtitle("taux de croissance des rats","mois","log(rats)")
subplot(222)
plot(V(1,:),'bp:')
plot(V(2,:),'gs-')
xtitle("rats et chouettes en cours du temps","mois","effectif")
subplot(223)
xtitle("chouettes en fonction de rats","rats
(milliers)","chouettes")
plot(M(2,:),M(1,:))
subplot(224)
plot(M(2,1:m-1),M(2,2:m))
//pour tester le code pour différentes valeurs de C_0 et R_0
//il suffit de changer les valeur de C_0 et R_0 au départ
//à vous de réfléchir pour répondre aux autres parties de la
question 5
end
|
df0540d32f2bb05406f36fc0d6c2d91200bbb8a6 | b12941be3faf1fd1024c2c0437aa3a4ddcbbfd67 | /whatif/fase_1.tst | 559fe37fd545405e186128168d5646e051b5cf52 | [] | no_license | JanWielemaker/optica | 950bd860825ab753236ce1daa399ee7a0b31b3ee | 3a378df314b5a60926b325089edac89c00cc8c6d | refs/heads/master | 2020-06-12T14:22:46.567191 | 2019-06-21T11:24:41 | 2019-06-21T11:24:41 | 194,328,239 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,704 | tst | fase_1.tst | /* Questionaire created by optica toolkit
Date: Thu Feb 27 14:23:04 1997
*/
question(1, '1-1',
'Waar raakt de lichtstraal de hoofdas als we
de lens vervangen door een dubbelbolle?',
[ 'dichterbij de lens',
'verder van de lens vandaan',
'plaats blijft hetzelfde'
],
state(state, '',
[ m2 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(8),
sfere_left(40),
sfere_right(0),
breaking_index(1.51),
pos_x(10.4),
show_gauge(true)),
l1 = lamp1(switch(true),
angle(0),
pos_y(3.55),
pos_x(0.05))
])).
question(2, '1-2',
'Waar raakt de lichtstraal de hoofdas als we
de hoek tussen de lichtstraal en de lens
verkleinen?',
[ 'dichterbij de lens',
'verder van de lens vandaan',
'plaats blijft hetzelfde'
],
state(state, '',
[ m3 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(5),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(9.45),
show_gauge(true)),
l2 = lamp1(switch(true),
angle(25),
pos_y(0),
pos_x(0))
])).
question(3, '1-3',
'Waar raakt de lichtstraal de hoofdas als we
de lens een stukje naar links bewegen?',
[ 'dichterbij de lens',
'verder van de lens vandaan',
'plaats blijft hetzelfde'
],
state(state, '',
[ m3 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(5),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(9.45),
show_gauge(true)),
l2 = lamp1(switch(true),
angle(25),
pos_y(0),
pos_x(0))
])).
question(4, '1-4',
'Hoe schijnt de lichtstraal als we de lens een
stukje naar links bewegen?',
[ rechtuit,
'gebroken naar onder',
'gebroken naar boven'
],
state(state, '',
[ m3 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(5),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(9.45),
show_gauge(true)),
l2 = lamp1(switch(true),
angle(-20.1858),
pos_y(3.45),
pos_x(0))
])).
question(5, '1-5',
'Waar raakt de lichtstraal de hoofdas als we
de lens vervangen door een dubbelholle?',
[ 'dichterbij de lens',
'verder van de lens vandaan',
'plaats blijft hetzelfde'
],
state(state, '',
[ m3 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(8),
sfere_left(-20),
sfere_right(0),
breaking_index(1.51),
pos_x(9.45),
show_gauge(true)),
l2 = lamp1(switch(true),
angle(0),
pos_y(3.45),
pos_x(0))
])).
|
c33073c12fe876203247cee04ba04846a6bc5c78 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3411/CH5/EX5.1/Ex5_1.sce | 39caac475019c608a0ffc04885e136990a756884 | [] | 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 | 573 | sce | Ex5_1.sce | //Example 5_1
clc();
clear;
//To determine the miller indices of the plane
//Given Intercepts are 2a,-3b,6c
a=1
b=1
c=1
intercepts1=2*a
intercepts2=-3*b
intercepts3=6*c
unitcell1=intercepts1/a
unitcell2=intercepts2/b
unitcell3=intercepts3/c
resiprocal1=1/unitcell1
resiprocal2=1/unitcell2
resiprocal3=1/unitcell3
lcms=int32([unitcell1 unitcell2 unitcell3]);
v=lcm(lcms)
lcm1=3
lcm2=-2
lcm3=1
printf("Co-ordinates of A,B,C are (%.2f,0,0),(0,%.1f,0)(0,0,%d)",1/lcm1,1/lcm2,lcm3)
printf("\n Miller indices of the plane are(%d,%d,%d)",lcm1,lcm2,lcm3)
|
d7ff5a91eda2a2b8093c14b9562ce7d1320d5582 | 448b934390596180e5965efadbcbe8e13809ab8c | /macros/pkgCreate.sci | 2c0a42c4999c1df04f9d2ac2ab1ddcd470fd1c0f | [] | no_license | pirpyn/pkg-scilab | 3834d8b5e5e7cbb71e2d2cff14ea763d32259bf0 | b3ac0d499c9b446d02159f29068616fcf2a57f56 | refs/heads/master | 2021-01-19T17:36:20.707736 | 2017-12-11T21:31:23 | 2017-12-11T21:31:23 | 101,072,162 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 10,621 | sci | pkgCreate.sci | function pkgCreate(data)
f = pkgGetRootHandle(gcbo)
data = f.user_data
settings = struct('erase',%t)
data.Path = data.Path + filesep() + data.Toolbox
pkgCreateDir(data.OverWrite,data.Path)
pkgCreateDir(data.OverWrite,data.Path+filesep()+data.Version)
pkgCreateBuilder(data)
pkgCreateEtc(data)
pkgCreateHelp(data)
pkgCreateMacros(data)
pkgCreateDESCRIPTION(data)
pkgCreateLicense(data)
pkgDisplayInfo('Successfully generated the toolbox at '+data.Path,[0,0.7,0])
if data.OpenToolbox
pkgShowToolbox(data.Path+filesep()+data.Version)
end
btn=pkgFindObj('install_tag')
btn.enable='on'
endfunction
function st=pkgCreateDir(OverWrite,path)
st = %t
if ~isdir(path)
st = createdir(path)
else
if ~OverWrite
btn = messagebox(['There is already something at';path],'Warning','warning',['Abort','Overwrite'],'modal')
if btn <> 2 then
st = %f
errmsg='error: pkgCreateDir: dir not empty at '+path
pkgDisplayInfo(errmsg,[0.7,0,0])
error(errmsg)
end
end
end
endfunction
function pkgCreateBuilder(data)
builder_file=[..
pkgHeader(data);..
'mode(-1);'
'lines(0);'
''
'function main_builder()'
' TOOLBOX_NAME = '''+data.Toolbox+''';'
' TOOLBOX_TITLE = '''+data.Title+''';'
' toolbox_dir = get_absolute_file_path(''builder.sce'');'
''
' // Check Scilab''s version'
' // ============================================================================='
''
' try'
' v = getversion(''scilab'');'
' catch'
' error(gettext(''Scilab 5.3 or more is required.''));'
' end'
''
' if v(1) < 5 & v(2) < 3 then'
' // new API in scilab 5.3'
' error(gettext(''Scilab 5.3 or more is required.''));'
' end'
''
' // Check modules_manager module availability'
' // ============================================================================='
''
' if ~isdef(''tbx_build_loader'') then'
' error(msprintf(gettext(''%s module not installed.''), ''modules_manager''));'
' end'
''
' // Action'
' // ============================================================================='
''
' tbx_builder_macros(toolbox_dir);'
' tbx_builder_help(toolbox_dir);'
' if v(1) > 6 then // scilab >= 6.0.0'
' tbx_build_loader(toolbox_dir);'
' tbx_build_cleaner(toolbox_dir);'
' else // scilab <= 5.5.1 and '
' tbx_build_loader(TOOLBOX_NAME,toolbox_dir);'
' tbx_build_cleaner(TOOLBOX_NAME,toolbox_dir);'
' end'
'endfunction'
'// ============================================================================='
'main_builder();'
'clear main_builder; // remove main_builder on stack'
'// ============================================================================='
]
mputl(builder_file,data.Path+filesep()+data.Version+filesep()+'builder.sce')
endfunction
function pkgCreateEtc(data)
s = filesep();
pkgCreateDir(data.OverWrite,data.Path+filesep()+data.Version+s+'etc')
start_file = [..
pkgHeader(data);..
''
'function tbxlib = startModule()'
''
' TOOLBOX_NAME = '''+data.Toolbox+''';'
' TOOLBOX_TITLE = '''+data.Title+''';'
''
' mprintf(''Start '' + TOOLBOX_TITLE + ''\n'');'
''
' if isdef(TOOLBOX_TITLE+''lib'') then'
' warning(TOOLBOX_TILE+'' library is already loaded'');'
' return;'
' end'
''
' etc_tlbx = get_absolute_file_path(TOOLBOX_NAME+''.start'');'
' etc_tlbx = getshortpathname(etc_tlbx);'
' root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length(''\etc\'') );'
''
' //Load functions library'
' // ============================================================================='
' mprintf(''\tLoad macros\n'');'
' pathmacros = pathconvert( root_tlbx ) + ''macros'' + filesep();'
' tbxlib = lib(pathmacros);'
' '
' // Load and add help chapter'
' // ============================================================================='
' if or(getscilabmode() == [''NW'';''STD'']) then'
' mprintf(''\tLoad help\n'');'
' path_addchapter = pathconvert(root_tlbx+''/jar'');'
' if ( isdir(path_addchapter) <> [] ) then'
' add_help_chapter(TOOLBOX_NAME, path_addchapter, %F);'
' end'
' end'
'endfunction'
''
data.Toolbox+'lib = startModule();'
'clear startModule; // remove startModule on stack'
''
]
quit_file = [..
pkgHeader(data);..
]
mputl(start_file,data.Path+filesep()+data.Version+s+'etc'+s+data.Toolbox+'.start')
mputl(quit_file,data.Path+filesep()+data.Version+s+'etc'+s+data.Toolbox+'.quit')
endfunction
function pkgCreateHelp(data)
s = filesep()
builder_help_file=[..
pkgHeader(data);..
'tbx_builder_help_lang(['''+data.HelpLang+'''],get_absolute_file_path(''builder_help.sce''));'
]
cleaner_help_file=[..
pkgHeader(data);
'function cleaner_help()'
' path = get_absolute_file_path(""cleaner_help.sce"");'
' langdirs = dir(path);'
' langdirs = langdirs.name(langdirs.isdir);'
''
' for l = 1:size(langdirs, ""*"")'
' masterfile = fullpath(path + filesep() + langdirs(l) + ""/master_help.xml"");'
' mdelete(masterfile);'
''
' jarfile = fullpath(path + ""/../jar/scilab_"" + langdirs(l) + ""_help.jar"");'
' mdelete(jarfile);'
''
' tmphtmldir = fullpath(path + ""/"" + langdirs(l) + ""/scilab_"" + langdirs(l) + ""_help"");'
' rmdir(tmphtmldir, ""s"");'
' end'
'endfunction'
''
'cleaner_help();'
'clear cleaner_help;'
''
]
pkgCreateDir(data.OverWrite,data.Path+filesep()+data.Version+s+'help')
mputl(builder_help_file,data.Path+filesep()+data.Version+s+'help'+s+'builder_help.sce')
mputl(cleaner_help_file,data.Path+filesep()+data.Version+s+'help'+s+'cleaner_help.sce')
build_help_file=[..
pkgHeader(data);..
'tbx_build_help(TOOLBOX_TITLE,get_absolute_file_path(''build_help.sce''));'
]
pkgCreateDir(data.OverWrite,data.Path+filesep()+data.Version+s+'help'+s+data.HelpLang)
mputl(build_help_file,data.Path+filesep()+data.Version+s+'help'+s+data.HelpLang+s+'build_help.sce')
endfunction
function pkgCreateMacros(data)
s = filesep()
buildmacros_file=[..
pkgHeader(data);..
'function buildmacros()'
' macros_path = get_absolute_file_path(''buildmacros.sce'');'
' tbx_build_macros(TOOLBOX_NAME, macros_path);'
'endfunction'
''
'buildmacros();'
'clear buildmacros; // remove buildmacros on stack'
''
]
cleanmacros_file=[..
pkgHeader(data);..
'function cleanmacros()'
''
' libpath = get_absolute_file_path(''cleanmacros.sce'');'
''
' binfiles = ls(libpath+''/*.bin'');'
' for i = 1:size(binfiles,''*'')'
' mdelete(binfiles(i));'
' end'
''
' mdelete(libpath+''/names'');'
' mdelete(libpath+''/lib'');'
'endfunction'
''
'cleanmacros();'
'clear cleanmacros; // remove cleanmacros on stack'
''
]
macro_file=[..
'function foo()'
'// A dummy function'
'// Calling Sequence'
'// foo()'
'// Description'
'// This function has been generated by Scilab Atoms Package Generator'
''
' mprintf(''This is the foo function. It does nothing\n'')'
'endfunction'
''
]
pkgCreateDir(data.OverWrite,data.Path+filesep()+data.Version+s+'macros')
mputl(buildmacros_file,data.Path+filesep()+data.Version+s+'macros'+s+'buildmacros.sce')
mputl(cleanmacros_file,data.Path+filesep()+data.Version+s+'macros'+s+'cleanmacros.sce')
mputl(macro_file,data.Path+filesep()+data.Version+s+'macros'+s+'foo.sci')
pkgAddMacros(data)
endfunction
function pkgCreateDESCRIPTION(data)
fields=fieldnames(data)
description_file = [..
'Toolbox: '+data.Toolbox
''
'Title: '+data.Title
''
'Summary: '+data.Summary
''
'Version: '+data.Version
''
'Author: '+data.Author
''
'Maintainer: '+data.Maintainer+' '+data.Mail
''
'Category: '+data.Category(1)
' '+matrix(data.Category(2:$),-1,1)
''
'Entity: '+data.Entity
''
'WebSite: '+data.WebSite
''
'License: '+data.License
''
'ScilabVersion: '+data.ScilabVersion
''
'Depends: '+data.Depends(1)
' '+data.Depends(2:$)
''
'Date: '+data.Date
''
'Description: '+data.Description(1)
' '+matrix(data.Description(2:$),-1,1)
''
]
mputl(description_file,data.Path+filesep()+data.Version+filesep()+'DESCRIPTION')
endfunction
function pkgCreateLicense(data)
s = filesep()
if data.LicensePath <> '' then
copyfile(data.LicensePath,data.Path+filesep()+data.Version+s+'license.txt')
else
license_file=[..
'License '+data.License+' Copyright (c) '+data.Date+', '+data.Author+' <'+data.Mail+'>'
'All rights reserved.'
'Redistribution and use in source and binary forms, with or without'
'modification, are permitted provided that the following conditions are met:'
''
'* Redistributions of source code must retain the above copyright'
' notice, this list of conditions and the following disclaimer.'
'* Redistributions in binary form must reproduce the above copyright'
' notice, this list of conditions and the following disclaimer in the'
' documentation and/or other materials provided with the distribution.'
'* Neither the name of the author nor the names of its contributors may'
' be used to endorse or promote products derived from this software '
' without specific prior written permission.'
''
'THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,'
'INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY '
'AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL '
'THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,'
'SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,'
'PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, data, OR PROFITS;'
'OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,'
'WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE '
'OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF '
'ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'
''
]
mputl(license_file,data.Path+filesep()+data.Version+s+'license.txt')
end
endfunction
function str=pkgHeader(data)
str = [..
'// Package '+data.Toolbox+' by '+data.Author+' <'+data.Mail+'>, made with Scilab Atoms Package Creator v1.0'
'// This package is released under the '+data.License+' license. See license.txt'
'// ========================================================================================================'
]
endfunction
|
fc0f65f07679d10374d4eb5712694a8e4d43099e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1583/CH7/EX7.6/Oscillators_Ex_7_6.sce | 4d1d386813b0702500b20e04b656209b99b3f4d6 | [] | 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 | 455 | sce | Oscillators_Ex_7_6.sce | clc
//Chapter 7:Conditions for Oscillation
//example 7.6 page no 265
//given
f=5.7*10^6//given frequency
Xs=4654//shunt reactance for shunt capacitacne of 6pF
r=25//series resistance
Q1=Xs/r//equivalent to crystal Q for easily expressing
C1=21*10^-15
XC1=(C1*2*%pi*f)^-1//capacitive reactance
disp('C1 is much smaller than the shunt capacitance,so the inductive reactance is XL=1.3*10^6')
Q=XC1/r//crystal Q
mprintf('the crystal Q is %d ',Q)
|
7dbbcd57d4cdcb0deba3d2cb044cbbadac6c7295 | 449d555969bfd7befe906877abab098c6e63a0e8 | /608/CH19/EX19.18/19_18.sce | 382591ce66412bf80b41c75d3d302e85af2b758f | [] | 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,562 | sce | 19_18.sce | //Problem 19.18: Three similar coils, each having a resistance of 8 ohm and an inductive reactance of 8 ohm are connected (a) in star and (b) in delta, across a 415 V, 3-phase supply. Calculate for each connection the readings on each of two wattmeters connected to measure the power by the two-wattmeter method.
//initializing the variables:
R = 8; // in ohms
XL = 8; // in ohms
VL = 415; // in Volts
//calculation:
//For a star connection:
//IL = Ip
//VL = Vp*(3^0.5)
VLs = VL
Vps = VLs/(3^0.5)
//Impedance per phase,
Zp = (R*R + XL*XL)^0.5
Ips = Vps/Zp
ILs = Ips
//Power dissipated, P = VL*IL*(3^0.5)*cos(phi) or P = 3*Ip*Ip*Rp)
pf = R/Zp
Ps = VLs*ILs*(3^0.5)*pf
//If wattmeter readings are P1 and P2 then P1 + P2 = Pst
Pst = Ps
// Pid = Pi1 - Pi2
phi = acos(pf)
Psd = Pst*tan(phi)/(3^0.5)
//Hence wattmeter 1 reads
Ps1 = (Psd + Pst)/2
//wattmeter 2 reads
Ps2 = Pst - Ps1
//For a delta connection:
//VL = Vp
//IL = Ip*(3^0.5)
VLd = VL
Vpd = VLd
Ipd = Vpd/Zp
ILd = Ipd*(3^0.5)
//Power dissipated, P = VL*IL*(3^0.5)*cos(phi) or P = 3*Ip*Ip*Rp)
Pd = VLd*ILd*(3^0.5)*pf
//If wattmeter readings are P1 and P2 then P1 + P2 = Pdt
Pdt = Pd
// Pid = Pi1 - Pi2
Pdd = Pdt*tan(phi)/(3^0.5)
//Hence wattmeter 1 reads
Pd1 = (Pdd + Pdt)/2
//wattmeter 2 reads
Pd2 = Pdt - Pd1
printf("\n\n Result \n\n")
printf("\n (a)When the coils are star-connected the wattmeter readings are %.3E W and %.3E W",Ps1,Ps2)
printf("\n (b)When the coils are delta-connected the wattmeter readings are are %.3E W and %.3E W",Pd1,Pd2) |
31aefb28573eaf7b89a76690283f4e39dc9e4152 | 449d555969bfd7befe906877abab098c6e63a0e8 | /98/CH3/EX3.10/example3_10.sce | 0d70636586803beb8a0bcd9665c9cf8be89894d2 | [] | 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 | example3_10.sce | //Chapter 3
//Example 3_10
//Page 53
clear;clc;
time=[6 4 2 4 4 4];
load_mw=[40 50 60 50 70 40];
scf(0);
y=[40 40 40 50 50 60 50 50 70 70 40 40];
bar(y, 2, 'red');
xlabel('Time in hours');
ylabel('Load in kW');
xgrid(0)
md=max(y);
printf("\t (i)Maximum demand = %.0f MW \n\n", md);
area=0;
n=6;
for i=1:n;
area=area+time(i)*load_mw(i);
end;
printf("\t (ii)Units generated per day = %.0f kWh \n\n", area*1000);
al=area*1000/24;
printf("\t (iii)Average load = %.0f kW \n\n", al);
lf=al/md/1000;
printf("\t (iv)Load factor = %.2f %% \n\n", lf*100);
|
0476afc558f1652d5bdfc447058a5d77c724a8fa | 449d555969bfd7befe906877abab098c6e63a0e8 | /1061/CH3/EX3.23/Ex3_23.sce | 420e7ca4e1309c63ae5ffdd4970f0b596477baf1 | [] | 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 | Ex3_23.sce | //Ex:3.23
clc;
clear;
close;
n1=1.46;// core refractive index
a=4.5;// core radius in um
dl=0.0025;// relative index difference
NA=n1*(sqrt(2*dl));// numerical aperture
v=2.405;
y=(2*%pi*a*NA)/(v);// cut off wavelength in um
printf("The cut off wavelength =%f um", y); |
7a61a1cbdc89ab25a31b15d25ad455a314aa65aa | 449d555969bfd7befe906877abab098c6e63a0e8 | /3472/CH44/EX44.5/Example44_5.sce | 89faf730a052dbb30c8fd2c239521ac94f7e1561 | [] | 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 | 2,781 | sce | Example44_5.sce | // A Texbook on POWER SYSTEM ENGINEERING
// A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar
// DHANPAT RAI & Co.
// SECOND EDITION
// PART IV : UTILIZATION AND TRACTION
// CHAPTER 6: MOTORS FOR ELECTRIC TRACTION
// EXAMPLE : 6.5 :
// Page number 792-793
clear ; clc ; close ; // Clear the work space and console
// Given data
I_1 = 100.0 // Current(A)
N_1 = 71.0 // Speed(kmph)
F_t1 = 2225.0 // Tractive effort(N)
I_2 = 150.0 // Current(A)
N_2 = 57.0 // Speed(kmph)
F_t2 = 6675.0 // Tractive effort(N)
I_3 = 200.0 // Current(A)
N_3 = 50.0 // Speed(kmph)
F_t3 = 11600.0 // Tractive effort(N)
I_4 = 250.0 // Current(A)
N_4 = 45.0 // Speed(kmph)
F_t4 = 17350.0 // Tractive effort(N)
I_5 = 300.0 // Current(A)
N_5 = 42.0 // Speed(kmph)
F_t5 = 23200.0 // Tractive effort(N)
D_A = 101.6 // Size of wheels(cm)
ratio_gear = 72.0/23 // Gear ratio
D_B = 106.7 // Size of wheels(cm)
ratio_gear_new = 75.0/20 // Gear ratio
// Calculations
N_B = ratio_gear*D_B/(ratio_gear_new*D_A) // Speed in terms of V(kmph)
F_tB = D_A*ratio_gear_new/(ratio_gear*D_B) // Tractive effort in terms of F_tA(N)
N_B1 = N_B*N_1 // Speed(kmph)
F_tB1 = F_tB*F_t1 // Tractive effort(N)
N_B2 = N_B*N_2 // Speed(kmph)
F_tB2 = F_tB*F_t2 // Tractive effort(N)
N_B3 = N_B*N_3 // Speed(kmph)
F_tB3 = F_tB*F_t3 // Tractive effort(N)
N_B4 = N_B*N_4 // Speed(kmph)
F_tB4 = F_tB*F_t4 // Tractive effort(N)
N_B5 = N_B*N_5 // Speed(kmph)
F_tB5 = F_tB*F_t5 // Tractive effort(N)
// Results
disp("PART IV - EXAMPLE : 6.5 : SOLUTION :-")
printf("\nNew characteristics of motor")
printf("\n_______________________________________")
printf("\n Current(A) : Speed(kmph) : F_t(N)")
printf("\n_______________________________________")
printf("\n %.f : %.1f : %.f ", I_1,N_B1,F_tB1)
printf("\n %.f : %.1f : %.f ", I_2,N_B2,F_tB2)
printf("\n %.f : %.1f : %.f ", I_3,N_B3,F_tB3)
printf("\n %.f : %.1f : %.f ", I_4,N_B4,F_tB4)
printf("\n %.f : %.1f : %.f ", I_5,N_B5,F_tB5)
printf("\n_______________________________________\n")
printf("\nNOTE: Changes in the obtained answer from that of textbook is due to more precision here")
|
c7d8dc939baff1b42d4825b00408982e2016fa6b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1445/CH8/EX8.18/Ex8_18.sce | fb5a399e91f0792bcbe42619db8c64354d25d215 | [] | 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 | 753 | sce | Ex8_18.sce | //CHAPTER 8- DIRECT CURRENT MACHINES
//Example 18
clc;
disp("CHAPTER 8");
disp("EXAMPLE 18");
//VARIABLE INITIALIZATION
v_t=460; //in Volts
p_o=10*736; //in Watts (1 metric H.P=735.5 W)
ratio=85/100; //as given in the question
eff=84/100;
I_f=1.1; //in Amperes
r_a=0.2; //in Ohms
//SOLUTION
p_i=p_o/eff;
I_l=p_i/v_t;
I_a=I_l-I_f;
E1=v_t-(I_a*r_a);
E2=E1*ratio; //E2:E1=N2:N1=ratio
v=v_t-E2; //voltage drop across r_a and r_s (r_s is the series resistance to be inserted)
r_s=(v/I_a)-r_a;
disp(sprintf("The resistance required is %f Ω",r_s));
//The answer is different because ratio equals 85/100 and not 75/100
//END
|
ddebd5f9a12cd889fd7b4a12326b151a2d0c6d21 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1073/CH2/EX2.45/2_45.sce | f762e58a033ea649c5de67bcad99900b61cd92bf | [] | 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,099 | sce | 2_45.sce | clc;
clear;
//Example 2.45
T_inf=390; //[K]
U=600; //[W/sq m.K]
Ac=1; //[sq m]
Av=10 //Vessel area in [sq m]
m=1000; //[kg]
Cp=3.8*10^3; //[J/kg.K]
To=290; //[K]
T=360; //[K]
h=8.5 //[W/sq m.K]
//Heat gained from the steam=Rate of increase of internal energy
//U*A*(T_inf-T)=m*Cp*dT
deff('[x]=f(t)','x=log((T_inf-To)/(T_inf-T))-U*Ac*t/(m*Cp)');
t=fsolve(1,f); //[in s]
t=round(t) //[in s]
Ts=290;
printf("\nTime taken to heat the reactants over the same temperature range is %f h",t);
function t1=g(T),t1=m*Cp/(U*Ac*(T_inf-T)-h*Av*(T-Ts)),endfunction
t1=intg(To,T,g);
deff('[m]=fx(Tmax)','m=U*Ac*(T_inf-Tmax)-h*Av*(Tmax-Ts)')
T_max=fsolve(1,fx)
printf("\nANS: In CASE 1\nTime taken to heat the reactants = %f s .ie %f h \n",t,t/3600);
printf("\nANS: In CASE 2 \n Time taken to heat the reactants = %f s\n",t1);
printf("\nANS.: Maximum temperature at which temperature can be raised is %f K\n",T_max);
|
d395a4c59c9e5025eded22b361ff52b69a442a57 | b29e9715ab76b6f89609c32edd36f81a0dcf6a39 | /ketpicscifiles6/Openpicture.sci | edf043ca4190c505f4ca2b09c3ba27ced182614d | [] | no_license | ketpic/ketcindy-scilab-support | e1646488aa840f86c198818ea518c24a66b71f81 | 3df21192d25809ce980cd036a5ef9f97b53aa918 | refs/heads/master | 2021-05-11T11:40:49.725978 | 2018-01-16T14:02:21 | 2018-01-16T14:02:21 | 117,643,554 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,051 | sci | Openpicture.sci | //
// 09.12.25
// 11.05.25
// 14.03.05 MARKLEN
// 17.03.19 VL=[] => VL="";
function Openpicture(ul)
global Wfile FID XMIN XMAX YMIN YMAX ULEN
global MilliIn MARKLEN MARKLENNow PenThickInit;
Tmp=Doscaling([XMIN,YMIN]);
Xm=Tmp(1);
Ym=Tmp(2);
Tmp=Doscaling([XMAX,YMAX]);
XM=Tmp(1);
YM=Tmp(2);
Dx=XM-Xm;
Dy=YM-Ym;
Sym='.0123456789 +-*/';
Tmp=ascii(Sym);
SL=Sym;
OL='+-*/';
if ul~=''
ULEN=ul;
end
Is=1;
VL=""; // 17.03.19
Ucode=ascii(ULEN);
for I=1:length(Ucode)
C=char(Ucode(I));
if mtlb_findstr(SL,C)~=[]
if mtlb_findstr(OL,C)~=[]
Str=char(Ucode(Is:(I-1)));
VL=VL+Str+C;
Is=I+1;
end
else
Unit=char(Ucode(I:(I+1)));
Str=char(Ucode(Is:(I-1)));
VL=VL+Str;
break;
end;
end;
Valu=evstr(VL);
Str=string(Valu);
ULEN=Str+Unit;
if Unit=='cm'
MilliIn=1000/2.54*Valu;
end
if Unit=='mm'
MilliIn=1000/2.54*Valu/10;
end
if Unit=='in'
MilliIn=1000*Valu;
end
if Unit=='pt'
MilliIn=1000/72.27*Valu;
end
if Unit=='pc'
MilliIn=1000/6.022*Valu;
end
if Unit=='bp'
MilliIn=1000/72*Valu;
end
if Unit=='dd'
MilliIn=1000/1238/1157/72.27*Valu;
end
if Unit=='cc'
MilliIn=1000/1238/1157/72.27*12*Valu;p
end
if Unit=='sp'
MilliIn=1000/72.27/65536*Valu/10;
end
MARKLEN=MARKLENNow*1000/2.54/MilliIn;
if Wfile=='default'
mprintf('%s%s%s\n','{\unitlength=',ULEN,'%');
mprintf('%s\n','\begin{picture}%');
mprintf('%c%10.5f%c%10.5f%2s%10.5f%c%10.5f%2s\n',...
'(',Dx,',',Dy,')(',Xm,',',Ym,')%');
Str='\special{pn '+string(PenThickInit)+'}%';
mprintf('%s\n',Str);
mprintf('%s\n','%');
else
mfprintf(FID,'%s%s%s\n','{\unitlength=',ULEN,'%');
mfprintf(FID,'%s\n','\begin{picture}%');
mfprintf(FID,'%c%10.5f%c%10.5f%2s%10.5f%c%10.5f%2s\n',...
'(',Dx,',',Dy,')(',Xm,',',Ym,')%'); //11.05.25
Str='\special{pn '+string(PenThickInit)+'}%';
mfprintf(FID,'%s\n',Str);
mfprintf(FID,'%s\n','%');
end
endfunction
|
be817bc18ba1daedc86db26f382469a9d8c080a5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1952/CH7/EX7.11/Ex7_11.sce | a73c06520e3944c1311a0198087ce8c63a4728d8 | [] | 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 | 489 | sce | Ex7_11.sce | // chapter 7 , Example 7.11 , pg 214
T=300 //temperature (in K)
e=1.6*10^-19 //charge of electron (in C)
h=6.625*10^-34 //plancks constant (in m^2*Kg*S^-1)
Eg=1.1 //bandgap (in eV)
k=1.38*10^-23 //Boltzmann constant (in J/K)
Me=9.11*10^-31 //mass of electron (in Kg)
Mn=0.31*Me //electron effective mass
ni=2*((2*%pi*k*T*Mn)/h^2)^(3/2)*exp(-(Eg*e)/(2*k*T)) //intrinsic concentration
printf("Intrinsic concentration (in m^-3)")
disp(ni)
|
c99b87650e60ab7c1e58a7c634a451817220efa9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1646/CH13/EX13.12/Ch13Ex12.sce | f26938cc19ec06fe4183b43f6e4fc86a58c231f4 | [] | 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 | 554 | sce | Ch13Ex12.sce | // Scilab Code Ex13.12: Page-653 (2011)
clc;clear;
K_B = 1.38e-23;....// Boltzmann constant, J/mol/K
T = 300;....// Room temperature, K
eps_0 = 8.85e-12;....// Electric permittivity of free space, F/m
N_A = 6.0e+23; // Avogadro's number
n2 = N_A*1000; // Number of molecules of non-polar substance in 1000 cc volume
p_0 = sqrt((9*K_B*T*eps_0*0.023)/n2); // Dipole moment of polar molecules, C-m
printf("\nThe dipole moment of polar molecules = %5.3e C-m", p_0);
// Result
// The dipole moment of polar molecules = 3.555e-030 C-m
|
fff26b47857d9cd17ac4cbe0ec5a8c72af1e0ed2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2840/CH2/EX2.3/Ex2_3.sce | fb23e2f0e0ddb8ce71bcee8208630364a8b97f26 | [] | 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 | 159 | sce | Ex2_3.sce | clc;
clear all;
I1=25.2 //in Wm^-2
I2=0.90 //in Wm^-2
B=10*log10(I1/I2) //Relative loudness of sound in dB
disp(+'dB',B,'Relative loudness of sound = ')
|
831ce8cd0693abfa0085e8a6d5cdff3c30a840f7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /659/CH6/EX6.6/exm6_6.sce | fb682a654a375562731220d5e7186e6429f12d72 | [] | 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 | 625 | sce | exm6_6.sce | // Example 6.6
//Program to evaluate the series i.e.
// 1/1-x = 1+x+x^2+x^3+.....+x^n
x=input("Input value of x:"); //Read value of x
LOOP=100; ACCURACY=0.0001; //Initialization
sum1=0;term=1;flag=0;
//Computation using for loop
for n=1:LOOP
sum1=sum1+term;
if(term<=ACCURACY) then //Test for accuracy
flag=1;
break;
end
term=term*x;
end
//Print the results
if(flag==1) then
printf(" EXIT FROM LOOP\n");
printf(" Sum =%f ; No. of terms =%d",sum1,n);
else
disp("FINAL VALUE OF N IS NOT SUFFICIENT TO ACHIEVE DESIRED ACCURCY");
end |
42733f820c536e2cbe095054b55d7e1e5c695148 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3137/CH18/EX18.19/Ex18_19.sce | 4191eef93b2b8e5d3c32b3571c6a78a688e5c57d | [] | 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 | 676 | sce | Ex18_19.sce | //Initilization of variables
Ws=250 //lb
Wl=500 //lb
W3=161 //lb
W4=64.4 //lb
wo=100 //rpm
wf=300 //rpm
rl=3 //ft
rs=2 //ft
g=32.2 //ft/s^2
//Calculations
//Moment Of Inertia
I=(0.5*(Wl/g)*rl^2+0.5*(Ws/g)*rs^2) //slug-ft^2
//Change in angular Momentum
change1=I*((wf-wo)*2*(%pi/60)) //lb-s-ft
//Change in angular momentum about G for 161lb
change2=2*((W3/g)*(wf-wo)*(4/60)*%pi) //lb-s-ft
//Similarly change in 64lb is
change3=3*((W4/g)*(wf-wo)*(6/60)*%pi) //lb-s-ft
//Change in linear impulse
//Without t term in it
m1=2*W3
m2=-3*W4
//Total angular impulse
t=(change1+change2+change3)/(m1+m2) //s
//Result
clc
printf('The time required is %f s',t)
|
e8cd48e710a2c037137cfd526be10979a535a4cb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2066/CH2/EX2.2/2_2.sce | deb6e559680f0ee5b2fb6ec7485c80a09b90f3c7 | [] | 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 | 304 | sce | 2_2.sce | clc
clear
//Initialization of variables
gam=0.0765 //lb/ft^3
p=14.7 //psia
dz=10560 //ft
n=1.235
//calculations
pg=p*144/gam
p2=p*(1- dz/pg *(n-1)/n)^(n/(n-1))
gam2=(p2/p)^(1/n) *gam
//results
printf("Final pressure = %.2f psia",p2)
printf("\n Final specific weight = %.4f lb/ft^3",gam2)
|
1ef7f363d489f89397afd0698f5417f8fdaca297 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2165/CH8/EX8.3/8_3.sce | 8e0955f0e66edd1e00b6cd265e22a2bff1557a6f | [] | 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 | 321 | sce | 8_3.sce | clc
//initialisation of variables
h=200//r p m
h1=50//i h p
P4=33.4//lb/in^2
W=9000//ft lb
x=33000//ft.lb
p=1728//ft/lb
//CALCULATIONS
w=h1*x/100//ft lb
T=w/W//ft^3
V =13/14*T//ft^3
D=((V*p*8)/(3*%pi))^(1/3)//in
//RESULTS
printf('The diameter of the cylinder of a single acting and swept volume=% f in',D)
|
f1aad4f7eeae7186929a5695ed1282a938d7d11c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3630/CH14/EX14.8/Ex14_8.sce | 43cc4448735a12eead21ad79e30e0a8ec48f882b | [] | 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 | 200 | sce | Ex14_8.sce | clc;
R1=18000;
R2=4700;
Hie=4400;
Req=(R1*R2)/(R1+R2);
Rin=(Req*Hie)/(Req+Hie);
Rs=600;
C=0.000001;
fB1=1/(2*3.14*(Rs+Rin)*C);
disp('Hz',fB1,"fB1=")//The answers vary due to round off error
|
67e274a27f54405687e875674ebf374e362b2f13 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3648/CH12/EX12.3/Ex12_3.sce | 6f8a7eb556d4c6eb166987f65128ef2f3d358456 | [] | 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 | 351 | sce | Ex12_3.sce |
//Example 12_3
clc();
clear;
//To find the final temperature
t1=27 //units in Centigrade
t1=t1+273 //Units in K
gama=1.4 //Units in Constant
p1=1 //units in Pa
v1_v2=15 //Units of in ratio
logT2=log10(t1)-((gama-1)*(log10(p1)-log10(v1_v2)))
T2=10^logT2 //Units in K
printf("The final temperature is T2=%d K",T2)
|
9f4561e1bd0b67a74e94baf50b4f8770e4d221f5 | bae725b750433ba5d58470784eeb87687023da7e | /macros/makenoise.sci | 328a4e20aefc81bb92945962b1e8afe05616b556 | [
"MIT"
] | permissive | aamadou/IsItChaos | eac61da272b4fb22f83bdceaceb5774385f481e5 | def74ddd5710898f876a9a7d39916e5cc1a8b6b5 | refs/heads/master | 2016-08-04T21:00:17.832904 | 2014-03-24T13:18:39 | 2014-03-24T13:18:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,034 | sci | makenoise.sci | function [x]=makenoise(orbit,NoisePerc,NoiseAbs,Gaussian,Creat,Grain)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if isdef('NoisePerc','local')...
then Commandline=Commandline+' -%'+string(NoisePerc),
end;
if isdef('NoiseAbs','local')...
then Commandline=Commandline+' -r'+string(NoiseAbs),
end;
if isdef('Gaussian','local')...
then Commandline=Commandline+' -g',
end;
if isdef('Creat','local')...
then Commandline=Commandline+' -O',
end;
if isdef('Grain','local')...
then Commandline=Commandline+' -I'+string(Grain),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='makenoise'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
x=evstr(x);
endfunction
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.