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
d9193bc75790a2d9186aed01d3112962d01ca5fd
449d555969bfd7befe906877abab098c6e63a0e8
/2825/CH19/EX19.21/Ex19_21.sce
37ad01343f6855900fe9496e7e72d68806c4e02c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
256
sce
Ex19_21.sce
//Ex19_21 Pg-965 clc //Integer part hex='F8E6'; //binary input dec_I=hex2dec(hex) //decimal output //Decimal part a=3 b=9 dec=dec_I+a*16^(-1)+b*16^(-2) //decimal output disp("The decimal equivalent of F8E6.39 is") printf("\n %.4f",dec)
ac8c8f9965c700966165ca1003a768cae14c2cdb
449d555969bfd7befe906877abab098c6e63a0e8
/1802/CH11/EX11.10/Exa11_10.sce
d3e405dc7d6fcefe3d76f6312478cb642ea5abe3
[]
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
563
sce
Exa11_10.sce
//Exa 11.10 clc; clear; close; //Given Data : format('v',9); MD=10;//in KW Energy=50000;//in kwh/year(Annual consumption) //(i) Rs. 100/KW/year max demand plus Rs. 0.20 paise per unit //(ii) Simple tarrif 0.30 Rs./unit C1=100;//in Rs.year/KW C2=0.20;//in Rs. /unit //Case (i) AnnualBill1=C1*MD+C2*Energy;//in Rs. disp(AnnualBill1,"Case(i) Annual Bill of tarrif 1 (in Rs.) :"); C=0.30;//in Rs. /unit AnnualBill2=C*Energy;//in Rs. disp(AnnualBill2,"Case(ii) Annual Bill of tarrif 2 (in Rs.) :"); disp("Naturally he will hoose the first tarrif.");
ba56ca9de1dddf431d99c0f73c5fff736a93c910
449d555969bfd7befe906877abab098c6e63a0e8
/1760/CH2/EX2.96/EX2_96.sce
23085baf492a11562e0d33095d69c41e96a510b9
[]
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
119
sce
EX2_96.sce
//EXAMPLE-2.96 PG NO-140 M=0.125; L1=0.2; L2=0.15; K=M/((L1*L2)^0.5) disp('i) K = '+string (K)+' ');
dff5182571261d2a6d54733f6ecac097e8a3b667
449d555969bfd7befe906877abab098c6e63a0e8
/3472/CH2/EX2.2/Example2_2.sce
18ba2b484db786110a87bb8dc23c3bd66cb5b852
[]
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,353
sce
Example2_2.sce
// A Texbook on POWER SYSTEM ENGINEERING // A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar // DHANPAT RAI & Co. // SECOND EDITION // PART I : GENERATION // CHAPTER 2: THERMAL STATIONS // EXAMPLE : 2.2 : // Page number 26 clear ; clc ; close ; // Clear the work space and console //Given data amount = 25.0*10**5 // Amount spent in 1 year(Rs) value_heat = 5000.0 // Heating value(kcal/kg) cost = 500.0 // Cost of coal per ton(Rs) n_ther = 0.35 // Thermal efficiency n_elec = 0.9 // Electrical efficiency //Calculations n = n_ther*n_elec // Overall efficiency consumption = amount/cost*1000 // Coal consumption in 1 year(kg) combustion = consumption*value_heat // Heat of combustion(kcal) output = n*combustion // Heat output(kcal) unit_gen = output/860.0 // Annual heat generated(kWh). 1 kWh = 860 kcal hours_year = 365*24.0 // Total time in a year(hour) load_average = unit_gen/hours_year // Average load on the power plant(kW) //Result disp("PART I - EXAMPLE : 2.2 : SOLUTION :-") printf("\nAverage load on power plant = %.2f kW\n", load_average) printf("\nNOTE: ERROR: Calculation mistake in the final answer in the textbook")
98a5bff88372f4f71fc9bf3ee3565fe6ef785a5f
446aae2100be19be6950fe030959e4ae6ebf75d3
/laboratorios/laboratorio 3/laboratorio3.sce
5390cbd5bf946a8cdc60e0dc984994eb1eb27eb5
[]
no_license
jhont285/metodos-numericos
492dcc5893707393d066ecc53ca6c5f82faaee66
388248e2df5a8c73069dfba53cd439f62bb14476
refs/heads/master
2021-06-07T18:27:18.337510
2016-07-21T22:17:24
2016-07-21T22:17:24
62,011,812
1
0
null
null
null
null
UTF-8
Scilab
false
false
870
sce
laboratorio3.sce
clc // Conjunto de nodos printf("Conjunto de nodos\n") X = -5:5 disp(X) Y = 2.^X disp(Y) // Valores a interpolar o extrapolar printf("\n Valores a interpolar o extrapolar\n") x1 = 1/2 disp(x1) x2 = 1/3 disp(x2) x3 = 1/4 disp(x3) //Interpolación mediante Lagrange printf("\n Interpolación mediante Lagrange\n\n") p1 = UN_Inter_Lagrange(X,Y,x1) printf("\tp(%f) = %.12f\n",x1,p1) p2 = UN_Inter_Lagrange(X,Y,x2) printf("\tp(%f) = %.12f\n",x2,p2) p3 = UN_Inter_Lagrange(X,Y,x3) printf("\tp(%f) = %.12f\n",x3,p3) //Interpolación mediante Newton printf("\n Interpolación mediante Newton\n\n") f1 = UN_Inter_Newton(X,Y,x1) printf("\tp(%f) = %.12f\n",x1,f1) f2 = UN_Inter_Newton(X,Y,x2) printf("\tp(%f) = %.12f\n",x2,f2) f3 = UN_Inter_Newton(X,Y,x3) printf("\tp(%f) = %.12f\n",x3,f3)
8d70dc5e4c6417e1ec44b059f928d536e68ac77e
364fc2bac23ae5482a18e5e9392ff63e68642dae
/TP2/exo_bis_1.sce
e37bf6c16ab5e57aefeeb05581ec85b410f75f82
[]
no_license
Raphael-De-Wang/2M310TP
259e55e9dc931b0a0102ed7a5dbbb31e82b88295
af21ffee07fadeb5b27c5f30d0deb1926972ccee
refs/heads/master
2021-01-11T14:14:21.447623
2017-03-29T20:27:35
2017-03-29T20:27:35
81,227,258
0
0
null
null
null
null
UTF-8
Scilab
false
false
701
sce
exo_bis_1.sce
clear; // Q1 function rst = div7(n) if modulo(n,7) == 0 then, rst = "oui" else, rst = "non" end endfunction // testcase div7(7) div7(10) // Q2 function S = Syracuse(n) S = [n] count = 1 while n <> 1, if modulo(n,2) == 0 then, n = n/2; else, n = n * 3 + 1; end S(count+1) = n; count = count + 1; end endfunction // testcase Syracuse(7) // Q3 function alt = genQ(n) alt = (rand(1,n) > 0.5) * 1; endfunction function alt = genE(n,s) alt = []; for i = (1:10), cnt = 0; x = 0; while x < s, x = rand(); cnt = cnt + 1 end alt(i) = cnt; end endfunction // testcase genQ(10) genE(10,0.9)
765cbf02c29d394993bce17c5763245804fd2357
449d555969bfd7befe906877abab098c6e63a0e8
/226/CH20/EX20.9/example9_sce.sce
453a9cab545d8df8387c59aa2c103fc8470b59c6
[]
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
242
sce
example9_sce.sce
//chapter 20 //example 20.9 //page 933 printf("\n") printf("given") Ip=.6*10^-6;Iv=2*10^-3;Veb1=2.5;Vpmin=19.2;Vpmax=22.2;Vbb=25;C=1*10^-6;R=18*10^3;Vp=20; Vpmin=(Vbb-Vpmax)/Ip Remax=(Vbb-Veb1)/Iv t=C*R*log((Vbb-Veb1)/(Vbb-Vp)) f=1/t
27451fe2d33c1cdafaae41e8ce451467498467b8
449d555969bfd7befe906877abab098c6e63a0e8
/991/CH3/EX3.5/Example3_5.sce
2ec8446fe9f9bba22ecbf4744ef232c65b69e621
[]
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
Example3_5.sce
//Example 3.5. clc format(9) vinitial=1*10^6 q=1.6*10^-19 V=300 m=9.1*10^-31 vfinal=10.33*10^6 sp=8*10^-3 //separation between plates v=sqrt(vinitial^2+(2*q*V/m)) disp("The speed acquired by electron due to the applied voltage is") disp(v,"v(m/s) = sqrt(vinitial^2+(2*q*V/m)) =") format(8) va=(vinitial+vfinal)/2 disp("The average velocity,") disp(va,"vaverage(m/s)= (vinitial + vfinal) / 2 =") time=sp/va disp(time,"Therefore, time for travel(seconds)= seperation between plates / vaverage =")
969a954c9feb939dd03813dccd4d95e2617e9b05
449d555969bfd7befe906877abab098c6e63a0e8
/67/CH8/EX8.3/example8_3.sce
9494b35906bf1ab199212d6e13d1161c4274092d
[]
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
134
sce
example8_3.sce
//Example 8.3 //Compute DFT of x(n)={1,1,0,0} and IDFT of y(n)={1,0,1,0} clc; x=[1,1,0,0]; Y=[1,0,1,0]; X=fft(x,-1); y=fft(Y,1);
ea0166fe47d8082b583aa235176247b90800f286
449d555969bfd7befe906877abab098c6e63a0e8
/599/CH2/EX2.21/example2_21.sce
0d578ec8bf3b5130f42983512abff07271b7ff06
[]
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,456
sce
example2_21.sce
clear; clc; printf("\t Example 2.21\n"); //stefan tube experiment(pseudo steady state diffusion) Ml=92; //molecular weight of toluene T=(303); //temperature in kelvin pt=1*1.013*10^5; //total pressure in pascal R=8314; //universal gas constant t=275*3600; //after 275 hours the level dropped to 80mm from the top zo=20*10^-3; //intially liquid toluene is at 20mm from top zt=77.5*10^-3; //finally liquid toluene is at 80mm from top //air is assumed to be satgnant d=820; //density in kg/m^3 pa=(57/760)*1.0135*10^5; //vapour pressure of toluene in at 39.4degree celcius cal=d/Ml; //conc. at length at disxtance l ca=pt/(R*T); //total conc. xa1=pa/pt; //mole fraction of toluene at pt1 i.e before evaporation xb1=1-xa1; //mole fraction of air before evaporation i.e at pt1 xb2=1; //mole fraction of air after evaporation i.e at pt.2 xa2=0; //mole fraction of toluene at point 2 xbm=(xb2-xb1)/(log(xb2/xb1)); //t/(zt-zt0) = (xbm*cal*(zt+zo))/(2*c*(xa1-xa2)*t); Dab=(xbm*cal*(zt^2-zo^2))/(2*ca*t*(xa1-xa2)); printf("\n the diffusivity of the mixture in stefan tube of toluene in air is :%f*10^-5 m^2/s",Dab/10^-5); //end
c21579a43e25ff2b648d408a7adea158a67206a7
8627886261b3eddf8440c0b470cd9ee25c762d97
/kr.sci
511c8e8ad98d0021ac316268b643d56c879bea16
[]
no_license
timurzotov/pvis
ba75cf86fae91b6adc8dd3fe9cd2672eea561cca
d60e8e241d6ce0ad3a9b2a75c8771f92a9b039ba
refs/heads/master
2020-09-08T07:59:31.719500
2019-11-11T21:14:13
2019-11-11T21:14:13
221,070,925
0
0
null
null
null
null
UTF-8
Scilab
false
false
940
sci
kr.sci
clc; d=figure();//создаем окно set(d,'position',[0,0,720,720]);//местоположение и размеры окна set(d,'figure_name','билет №1');//заголовок окна set(d,'BackgroundColor',[0,0.6,0.6]);//цвет окна button1=uicontrol(d,'style','pushbutton','string','Открыть окно.','position',[10,600,300,60],'BackgroundColor',[0,0.9,0.9],'CallBack','a1'); function a1 button2=uicontrol(f,'style','pushbutton','string','Построить график.','position',[195,175,150,30],'BackgroundColor',[1,0.57,0.57],'CallBack','graf'); function graf x=1:0.1:10; if button2.value == 0 then scf; f=get("current_figure"); f.figure_position=[650,100]; plot(x, (sin(x., '-r'); xgrid(5); xtitle('График функции (sin(x)'); end endfunction endfunction
a2dfbf0f1fca354caf88e5e28829873ff9e12de1
449d555969bfd7befe906877abab098c6e63a0e8
/29/CH1/EX1.6.5/exa1_6_5.sce
254ca960aad7fb98b4a906e5d52649c593052576
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
377
sce
exa1_6_5.sce
//Caption:initial_value // example 1.6.5 //page 11 //I(s)=(C*s/(RCs+1))*E(s) //given: E(s)=100/s,R=2 megaohm ,C=1 uF // so, I(s)=(((1*10^-6)*s)/(2*s+1))*(100/s) syms t p=poly([0 10^-6],'s','coeff'); q=poly([1 2],'s','coeff'); r=poly([0 1],'s','coeff'); F1=p/q; F2=1/r; F=F1*F2 f=ilaplace(F,s,t); z=limit(f,t,0);//initial value theorem z=dbl(z); disp(z,"i(0+)=")
e8e453b5a8dc6e0baf3ec6aff2a1d9cd65caeca0
5bc3a272ac3972765259062ed2c4abd8ac31eb84
/EE 324 controls lab/lab9/q4.sce
6334389da9d0ee26bd8581b4133dd0f9e98be202
[]
no_license
ishan-2404/Duaon-mei-yaad-rakhna-XD
51a268cb15695d78a1bd086d958f402fe6ee093d
bf702ac84c18f7d677a35f9f850e3bfb63a32625
refs/heads/main
2023-07-13T17:10:57.650902
2021-08-14T07:06:22
2021-08-14T07:06:22
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
310
sce
q4.sce
s = poly(0,'s'); G = 1/(s^3+3*s^2+2*s); G = syslin('c',G); // rlocus scf(0); evans(G,25); kpure(G) // Nyquist scf(1); nyquist(G,.05,40); //~.16 // Bode actual scf(2); bode(G) [gm,fr] = g_margin(G) // gm = 15.5dB // bode asymptodic scf(3); bode(G,'rad'); bode_asymp(G)
5396136b11aa81c8ed85c03e68d52ecf4945cc7d
727092dff86e9d034d021bbc56565d9336b988aa
/Códigos CN/trapezio_integração.sci
61e28a504f8d4fb57243002ced0bc9e66853f572
[]
no_license
lucasdksan/Numerical-computing
c54b855bd50f2a06b1970086f2da63c28883f287
a5a5863499bdf46003437140e3fa3123fc4960f8
refs/heads/master
2023-06-24T16:13:01.094230
2021-07-29T15:57:00
2021-07-29T15:57:00
278,514,165
0
0
null
null
null
null
UTF-8
Scilab
false
false
239
sci
trapezio_integração.sci
function I = trapezio(a,b,n) h = (b-a)/n; x = a:h:b; y = f(x); I = y(1); for i = 2:n I = I + 2*y(i); end I = (h/2)*(I + y(n+1)); endfunction function y = f(x) y = sin(x); endfunction
316b4905cb7d0101c45dff41aaec05eac7c31ee8
3ba63edf2b9133e803bbb6533e10276dad0cb500
/kolowkium zad 2.sce
219b9cb210489bfed2ef338ce7cfe39b37888774
[]
no_license
MMaksymow/PU_Kolokwium_2
b84b7ace5f15b1ff167428625efbc6553f82779d
12623d2e519b9362b65ed48ac2b103e0224ecba3
refs/heads/main
2023-02-17T11:18:42.192890
2021-01-20T12:58:28
2021-01-20T12:58:28
331,307,376
0
0
null
null
null
null
UTF-8
Scilab
false
false
319
sce
kolowkium zad 2.sce
--> function r = funkcja_1 ( x ) > r=log( x + 8 ) > endfunction --> function r = funkcja_2 ( x ) > r=(x^3 +4*x)/(x^2+sin(x)) > endfunction xdata = linspace ( 1 , 6 , 50); ydata1 =funkcja_1(xdata); ydata2 =funkcja_2(xdata); plot(xdata,[ydata ydata2],"o-"); xtitle ("Zad_2", "oś X", "oś Y");
b71e20d1f7946ba55ebc271ca8bf37fa3c617c3d
449d555969bfd7befe906877abab098c6e63a0e8
/257/CH12/EX12.13/example_12_13.sce
316902f9fd21d2a3615a0bd4d450cf88ca807899
[]
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
95
sce
example_12_13.sce
s=%s; sys1=syslin('c',100*(1+5*s)/(s^4*(s+1))) nyquist(sys1) show_margins(sys1,'nyquist')
51eb86e9f6c5b56453b2129c6eaf59b16761ce1e
fdc5047b7bf8122bad1e621df236b0481226c36e
/exemplos/xls-link-0.5.0-src/tests/unit_tests/xls_SetSave.tst
a2bf60d8bcba4e0d6d467877301c1925a4043cfe
[]
no_license
jpbevila/virtualHartSci
aea3c6ba23d054670eb193f441ea7de982b531cc
a3f5be6041d230bd9f0fd67e5d7efa71f41cfca5
refs/heads/main
2023-07-26T23:05:28.044194
2021-09-09T11:50:59
2021-09-09T11:50:59
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
544
tst
xls_SetSave.tst
// ==================================================================== // Allan CORNET // DIGITEO 2008 - 2010 // ==================================================================== // <-- CLI SHELL MODE --> // ==================================================================== r = xls_NewExcel(); assert_checktrue(r); r = xls_AddWorkbook(); assert_checktrue(r); r = xls_SetWorksheet(1); assert_checktrue(r); // disable "Save" msg box ==> not saved !!! r = xls_SetSave(%t); assert_checktrue(xls_Close()); assert_checktrue(xls_Quit());
af387ef8657c8c972fbc913bc7d97f91efeea41a
67310b5d7500649b9d53cf62226ec2d23468413c
/tags/archive/TestCaseGenerator-Plugin-OpeningSequenceCoverage/trunk/tests/large-system-tests/inputs/RadioButton/ground_truth/OpeningSequenceCoverage/length-1/max-150/t85.tst
0e327960da6e3d198d09d52b91c0fdfdf057f37f
[]
no_license
csnowleopard/guitar
e09cb77b2fe8b7e38d471be99b79eb7a66a5eb02
1fa5243fcf4de80286d26057db142b5b2357f614
refs/heads/master
2021-01-19T07:53:57.863136
2013-06-06T15:26:25
2013-06-06T15:26:25
10,353,457
1
0
null
null
null
null
UTF-8
Scilab
false
false
661
tst
t85.tst
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <TestCase> <Step> <EventId>e37</EventId> <ReachingStep>false</ReachingStep> </Step> <Step> <EventId>e32</EventId> <ReachingStep>false</ReachingStep> </Step> <Step> <EventId>e50</EventId> <ReachingStep>false</ReachingStep> </Step> <Step> <EventId>e12</EventId> <ReachingStep>false</ReachingStep> </Step> <Step> <EventId>e40</EventId> <ReachingStep>false</ReachingStep> </Step> <Step> <EventId>e31</EventId> <ReachingStep>false</ReachingStep> </Step> </TestCase>
00daf7448dfd54e1073321be87895275650cd7ff
449d555969bfd7befe906877abab098c6e63a0e8
/2780/CH2/EX2.20/Ex2_20.sce
4b13f89cc1119a34a2d036e9f182c5a2ff88ce98
[]
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
332
sce
Ex2_20.sce
clc //to calculate thickness of the film mu=1.33 //refractive index of soap film (unitless) i=45*%pi/180 //the formula is mu=sini/sinr sinr=0.5317 cosr=sqrt(1-(sinr)^2) //for destructive interference lambda=5890*10^-10 //wavelength in m n=1 t=n*lambda/(2*mu*cosr) disp("the thickness of the film is t="+string(t)+"m")
93e40d23d15c4f8c59945fd852a9bfb625508e91
a8592d34f144b71794ebf30f1c2a1b5faf0b053c
/sandbox/scilab/08_countour.sce
b80dba9fa3210878ec50c49a45c6f1f16f6d00c6
[]
no_license
f-fathurrahman/ffr-MetodeNumerik
ee9a6a7153b174b1ba3d714fe61ccbd1cb1dd327
e3a9da224c0fd5b32e671708e890018a3c4104c4
refs/heads/master
2023-07-19T22:29:38.810143
2023-07-07T10:02:34
2023-07-07T10:02:34
107,272,110
2
2
null
null
null
null
UTF-8
Scilab
false
false
766
sce
08_countour.sce
function z = fun1(x, y) z = sin(x)*cos(y) endfunction function z = fun2(x, y) z = x^2 + y^2 endfunction x = linspace(-%pi, %pi, 20) y = linspace(-%pi, %pi, 20) z1 = feval( x, y, fun1 ) z2 = feval( y, y, fun2 ) disp(size(z1)) clf() N_level = 10 contour( x, y, z1, N_level ) // Alternatively: contour( x, y, my_surface, 10) title("A contour plot") xlabel('x') ylabel('y') xs2pdf( gcf(), "images/08_contour_v1.pdf" ) clf() N_level = 10 contour( x, y, z2, N_level ) // Alternatively: contour( x, y, my_surface, 10) title("A contour plot") xlabel('x') ylabel('y') xs2pdf( gcf(), "images/08_contour_v2.pdf" ) clf() plot3d(x, y, z1) contour( x, y, z1, N_level, flag=[0 2 4]) xs2pdf( gcf(), "images/08_contour_v3.pdf" ) if getscilabmode() ~= "STD" quit() end
62e21e17c9c108ad59cd49bdea850f0c787b6ba6
449d555969bfd7befe906877abab098c6e63a0e8
/2384/CH4/EX4.5/ex4_5.sce
a2d6a060eb3aa71f79a59063faf6440f72b5717a
[]
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
543
sce
ex4_5.sce
// Exa 4.5 clc; clear; close; format('v',6) // Given data R = 7;// in ohm L = 31.8;// in mH L = L * 10^-3;// in H V = 230;// in V f = 50;// in Hz X_L = 2*%pi*f*L;// in ohm Z = sqrt( (R^2)+(X_L^2) );// in ohm I = V/Z;// in A disp(I,"The circuit current in A is"); // tand(phi) = X_L/R; phi = atand(X_L/R);// in degree lag disp(phi,"The phase angle in degree is"); // Power factor powerfactor = cosd(phi);// in lag disp(powerfactor,"The power factor is"); P = V*I*cosd(phi);// in W disp(P,"The power consumed in W is");
0c1a6187ea07b36c7fb1beeeca9bff5f842d4483
22ebb77444925f738e01f4ceeae89fac1b2ca711
/Single-phase transformer/harmonic.sci
429038dbb60eb9f266d635469822b69fe2434431
[]
no_license
jacometoss/Transformer
4e4b4d39f370b162afd6364a229efc81a5c4ea8d
d9bd077b3fbc45dca52dd3367f40a4289b812e54
refs/heads/master
2021-06-21T14:57:12.644937
2020-12-03T19:23:20
2020-12-03T19:23:20
146,820,465
1
0
null
null
null
null
UTF-8
Scilab
false
false
2,991
sci
harmonic.sci
function [X,armonicas,amplitud,FFT_50_HARM,FFT_50_HARM_SEC_ZERO,FluxT,FluxTSC,HARM]=harmonic(N,h,Muestra,tk,fhz,Np,lmFlux,SeccionI,Senal,nHarm) w=2*%pi*fhz; tm=(1:N); Muestra=Muestra'; A=Muestra(1:N); X=fft(A',-1); fs=1/(h); f=round(fs*(0:(N/2))/N); //:Asociar Frecuencia a un Vector //*********************************************************************// //... .... .... .... .... .... .... .... .... .... ... .... .... .... .// //....Proporciona modulo y argumento en cada espectro de frecuencia....// //... .... .... .... .... .... .... .... .... .... ... .... .... .... .// //*********************************************************************// for i=1:1:202 ang(i)=atan(imag(X(i)),real(X(i))) //ang(i)=(ang(i)*180)/%pi //disp([i,round(f(i)),abs(X(i)),ang(i)]) if i==1 then // disp([i,abs(X(i))/N,ang(i)]) X(i)=(X(i))/N else // disp([i,abs(X(i))*2/N,ang(i)]) X(i)=(X(i))*2/N end end X=X'; ejeX=nHarm; for i=1:1:ejeX Eje_f(i)=f(i); end armonicas=(0:nHarm-1); amplitud=abs(X(:,1:max(size(Eje_f)))); HARM=zeros(nHarm,4); select Senal case 1 then ConsPi=%pi/2; kPi=1; case 2 then kPi=-1; ConsPi=-%pi/2; end for n=1:nHarm if n==1 then disp([n-1,round(Eje_f(n,1)),abs(X(n)),atan(imag(X(n)),real(X(n)))]) HARM(n,1)=(n-1); HARM(n,2)=round(Eje_f(n,1)); HARM(n,3)=abs(X(1,n)'); HARM(n,4)=kPi*atan(imag(X(n)),real(X(n))) elseif (modulo(n,2)==0) then disp([n-1,round(Eje_f(n,1)),abs(X(n)),atan(imag(X(n)),real(X(n)))-ConsPi]) HARM(n,1)=(n-1); HARM(n,2)=Eje_f(n,1); HARM(n,3)=abs(X(1,n)'); HARM(n,4)=kPi*atan(imag(X(n)),real(X(n)))-ConsPi; elseif (modulo(n,2)==1) then disp([n-1,round(Eje_f(n,1)),abs(X(n)),atan(imag(X(n)),real(X(n)))+ConsPi]) HARM(n,1)=(n-1); HARM(n,2)=round(Eje_f(n)); HARM(n,3)=abs(X(1,n)'); HARM(n,4)=kPi*atan(imag(X(n)),real(X(n)))+ConsPi; end end //*** ***** ***** ****** ****** ***** ***** ****** ****** ****** *****// //... .... .... .... ARMÓNICAS PARES E IMPARES ... .... ..... .... ..// //*** ***** ***** ****** ****** ***** ***** ****** ****** ****** *****// for i=1:1:nHarm for j=1:1:max(size(tk)) FFT_HARM(j,i)=HARM(i,3)*sin(w*tk(j)*HARM(i,1)+HARM(i,4)); end end FFT_50_HARM=zeros(max(size(tk)),1) for i=1:1:nHarm FFT_50_HARM=FFT_50_HARM+FFT_HARM(:,i) end for i=4:3:nHarm for j=1:1:max(size(tk)) HARM_SEC_CERO(j,i)=HARM(i,3)*sin(w*tk(j)*HARM(i,1)+HARM(i,4)); end end FFT_50_HARM_SEC_ZERO=zeros(max(size(tk)),1) for i=1:1:nHarm FFT_50_HARM_SEC_ZERO=FFT_50_HARM_SEC_ZERO+HARM_SEC_CERO(:,i) end [Flux,Fmm]=fluxfmm(MAGCURVE_127_TA(:,1),MAGCURVE_127_TA(:,2),Np,lmFlux,SeccionI) FluxT=interp1(Fmm,Flux,FFT_50_HARM'*Np) FluxTSC=interp1(Fmm,Flux,(FFT_50_HARM'-FFT_50_HARM_SEC_ZERO')*Np) endfunction
5cd3478db473cc98e649ea2c34a064ab2bb3d7fb
449d555969bfd7befe906877abab098c6e63a0e8
/1928/CH1/EX1.5.2/ex1_5_2.sce
4067642d4c3313a35eca44ae9d74f81147535f54
[]
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
559
sce
ex1_5_2.sce
//Chapter-1,Example1_5_2,pg 1-30 //refer diagram from textbook //in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer //join cation anion centres E and B and complete the triangle EBF //in triangle EBF m(angle F)=90 and EF=BF //m(angle B)=m(angle E)=45 //and EB=rc+ra and BF=ra //cos(45)=ra/(rc+ra) //assume rc/ra=r r=(1-cosd(45))/cosd(45) //by arrangimg terms we get value of r printf("critical radius ratio for ligancy 6 =") disp(r)
80eef1408f71d272bee9244cbf0a298343b0bda7
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set5/s_Electrical_And_Electronic_Principles_And_Technology_J._Bird_1529.zip/Electrical_And_Electronic_Principles_And_Technology_J._Bird_1529/CH10/EX10.13/10_13.sce
04d510c0dfc63301c887c9afea361d2d33dfbf18
[]
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
240
sce
10_13.sce
errcatch(-1,"stop");mode(2);//Chapter 10, Problem 13 ; I2=20; //current in amperes I1=5; //current in amperes d=20*log10(I2/I1); //in decibel printf("decibel current ratio = %d dB",d); exit();
9b393fa95e984931ac1e8680eb02faae7418133a
1b969fbb81566edd3ef2887c98b61d98b380afd4
/Rez/bivariate-lcmsr-post_mi/bfi_hp8_vrt_col/~BivLCM-SR-bfi_hp8_vrt_col-PLin-VLin.tst
c08a9370b516684486d15648db20391bf19813ff
[]
no_license
psdlab/life-in-time-values-and-personality
35fbf5bbe4edd54b429a934caf289fbb0edfefee
7f6f8e9a6c24f29faa02ee9baffbe8ae556e227e
refs/heads/master
2020-03-24T22:08:27.964205
2019-03-04T17:03:26
2019-03-04T17:03:26
143,070,821
1
0
null
null
null
null
UTF-8
Scilab
false
false
11,974
tst
~BivLCM-SR-bfi_hp8_vrt_col-PLin-VLin.tst
THE OPTIMIZATION ALGORITHM HAS CHANGED TO THE EM ALGORITHM. ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 1 2 3 4 5 ________ ________ ________ ________ ________ 1 0.243704D+00 2 -0.387558D-02 0.189396D-02 3 0.776666D-01 -0.237239D-02 0.337620D+00 4 -0.250600D-02 0.658319D-03 -0.308660D-02 0.280581D-02 5 -0.245066D-03 -0.276749D-04 -0.427336D-03 0.161147D-04 0.239239D-02 6 0.610981D-03 0.138957D-03 -0.296556D-03 -0.561327D-04 0.778158D-04 7 0.199090D-02 0.139796D-03 -0.151764D-02 0.605755D-04 0.420089D-03 8 0.580523D-03 0.368776D-04 0.679920D-03 -0.285360D-04 0.258462D-04 9 -0.280876D+00 0.311926D-02 -0.644678D-02 0.499275D-02 0.346873D-01 10 -0.212471D+00 -0.254541D-02 -0.118873D+00 0.106786D-01 0.113145D+00 11 -0.309074D+00 0.224221D-01 -0.281388D-01 0.213860D-02 0.353471D-01 12 -0.549845D+00 0.545066D-02 -0.132268D+01 0.586575D-01 0.215390D-01 13 0.638078D-01 0.627788D-02 -0.140294D+00 0.141096D-02 0.223224D-01 14 0.283887D-01 -0.650422D-02 -0.303380D+00 0.307210D-02 0.613278D-02 15 -0.104910D+01 0.192649D-01 -0.102948D+00 -0.470790D-02 -0.612046D-01 16 -0.263691D-01 -0.258546D-02 -0.265956D-01 0.463624D-04 0.283005D-03 17 0.347362D-02 -0.523286D-03 0.147304D-02 -0.338353D-03 -0.577850D-03 18 -0.125676D+00 -0.452013D-01 -0.470217D+00 -0.101436D-01 -0.324096D-02 19 -0.170245D+00 0.321177D-02 -0.171543D-01 0.316493D-02 -0.150963D-02 20 -0.360616D+00 0.262944D-02 -0.342337D+01 -0.186652D-01 -0.463716D-01 21 0.110766D+00 -0.195338D-02 -0.129777D-01 0.460886D-03 0.329867D-02 22 0.209324D-02 -0.206670D-03 0.484553D-02 -0.420353D-04 -0.323384D-03 23 -0.142737D-01 0.116280D-02 -0.154225D-01 -0.137811D-01 0.561478D-03 24 0.308787D-02 -0.154984D-03 0.357186D-02 -0.436587D-03 0.280991D-03 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 6 7 8 9 10 ________ ________ ________ ________ ________ 6 0.947566D-03 7 0.796437D-03 0.320618D-02 8 0.158409D-03 0.774119D-04 0.265824D-02 9 0.587871D-02 0.370581D-01 0.126412D-01 0.394036D+02 10 0.131288D-01 0.204694D-01 0.787175D-03 0.872645D+00 0.157198D+02 11 0.119152D-01 0.291119D-01 -0.201979D-01 0.749463D+01 0.173288D+01 12 0.125810D-01 0.727726D-02 -0.539114D-01 -0.488535D-01 0.261355D+01 13 0.596978D-01 0.108766D+00 0.278752D-01 0.118783D+01 0.327545D+01 14 0.204966D-01 0.544590D-02 0.252834D+00 0.226594D+01 0.278216D+01 15 0.109694D-02 -0.324515D-01 0.394989D-02 -0.605210D+01 -0.772371D+01 16 -0.567489D-03 0.102708D-03 -0.208064D-04 0.636221D+00 -0.975570D-01 17 -0.147321D-03 -0.402796D-03 -0.232390D-03 -0.650081D-01 -0.174253D-01 18 -0.484175D-01 -0.812036D-01 -0.297882D-01 -0.400567D+01 -0.369797D+00 19 -0.137755D-01 0.419645D-02 -0.834461D-02 0.692311D+00 -0.398823D+00 20 -0.321763D-01 -0.191646D-01 -0.153911D+00 -0.180313D+01 0.105913D+01 21 0.134272D-01 -0.421979D-02 0.990580D-02 -0.308840D+00 0.420976D+00 22 -0.762343D-04 -0.285302D-03 0.662427D-04 -0.112349D-01 -0.195179D-01 23 0.129456D-02 -0.120945D-02 0.171996D-02 -0.349550D+00 0.375185D-01 24 -0.101822D-03 0.403520D-04 -0.221092D-03 0.424529D-01 -0.328261D-02 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 11 12 13 14 15 ________ ________ ________ ________ ________ 11 0.278986D+02 12 0.952546D+01 0.890486D+02 13 -0.228249D+01 -0.265716D+00 0.143048D+02 14 -0.221268D+01 -0.440754D+01 0.607187D+01 0.563456D+02 15 -0.105843D+01 0.671885D+01 -0.122434D+01 -0.451233D+00 0.138167D+03 16 0.222327D+00 0.299512D+00 0.710547D-01 -0.274164D-01 0.734564D+00 17 -0.322198D-01 -0.249471D-01 -0.311341D-01 -0.133270D-01 -0.754563D+00 18 -0.390094D+01 0.247598D+01 -0.469461D+01 -0.714148D+01 0.453471D+02 19 -0.748879D-01 0.372989D-01 -0.629444D+00 -0.929816D+00 0.162184D+01 20 -0.278442D+01 -0.130248D+01 -0.175834D+01 -0.208759D+02 0.267162D+02 21 0.366819D+00 0.732049D+00 0.630460D+00 0.973221D+00 -0.575816D+00 22 -0.235711D-01 -0.402661D-01 -0.165195D-01 0.189086D-01 -0.256279D+00 23 0.485337D-01 -0.594640D+00 -0.173017D-01 0.353553D+00 0.557307D+00 24 0.395850D-01 -0.941348D-01 -0.205818D-01 -0.751683D-01 -0.113986D+00 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 16 17 18 19 20 ________ ________ ________ ________ ________ 16 0.216599D+00 17 -0.148839D-01 0.937945D-02 18 0.366371D+00 -0.228048D+00 0.135215D+03 19 0.183225D+00 -0.220672D-01 0.182315D+01 0.406551D+01 20 0.312052D+00 -0.965796D-01 0.854662D+02 0.235105D+01 0.401751D+03 21 -0.123176D-01 0.181067D-02 0.308789D+00 -0.379976D+01 -0.960477D+00 22 -0.839380D-02 0.325985D-02 -0.598787D+00 -0.145708D-01 -0.362582D+00 23 0.145067D-01 -0.567452D-02 0.772696D+00 -0.335253D-01 0.327363D+01 24 -0.331829D-02 0.366131D-03 -0.344353D+00 -0.556827D-02 -0.191753D+01 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 21 22 23 24 ________ ________ ________ ________ 21 0.432532D+01 22 -0.198271D-01 0.604957D-02 23 0.138223D+00 -0.112172D-01 0.559429D+00 24 -0.172997D-01 0.182386D-02 -0.323094D-01 0.206217D-01 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 1 2 3 4 5 ________ ________ ________ ________ ________ 1 1.000 2 -0.180 1.000 3 0.271 -0.094 1.000 4 -0.096 0.286 -0.100 1.000 5 -0.010 -0.013 -0.015 0.006 1.000 6 0.040 0.104 -0.017 -0.034 0.052 7 0.071 0.057 -0.046 0.020 0.152 8 0.023 0.016 0.023 -0.010 0.010 9 -0.091 0.011 -0.002 0.015 0.113 10 -0.109 -0.015 -0.052 0.051 0.583 11 -0.119 0.098 -0.009 0.008 0.137 12 -0.118 0.013 -0.241 0.117 0.047 13 0.034 0.038 -0.064 0.007 0.121 14 0.008 -0.020 -0.070 0.008 0.017 15 -0.181 0.038 -0.015 -0.008 -0.106 16 -0.115 -0.128 -0.098 0.002 0.012 17 0.073 -0.124 0.026 -0.066 -0.122 18 -0.022 -0.089 -0.070 -0.016 -0.006 19 -0.171 0.037 -0.015 0.030 -0.015 20 -0.036 0.003 -0.294 -0.018 -0.047 21 0.108 -0.022 -0.011 0.004 0.032 22 0.055 -0.061 0.107 -0.010 -0.085 23 -0.039 0.036 -0.035 -0.348 0.015 24 0.044 -0.025 0.043 -0.057 0.040 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 6 7 8 9 10 ________ ________ ________ ________ ________ 6 1.000 7 0.457 1.000 8 0.100 0.027 1.000 9 0.030 0.104 0.039 1.000 10 0.108 0.091 0.004 0.035 1.000 11 0.073 0.097 -0.074 0.226 0.083 12 0.043 0.014 -0.111 -0.001 0.070 13 0.513 0.508 0.143 0.050 0.218 14 0.089 0.013 0.653 0.048 0.093 15 0.003 -0.049 0.007 -0.082 -0.166 16 -0.040 0.004 -0.001 0.218 -0.053 17 -0.049 -0.073 -0.047 -0.107 -0.045 18 -0.135 -0.123 -0.050 -0.055 -0.008 19 -0.222 0.037 -0.080 0.055 -0.050 20 -0.052 -0.017 -0.149 -0.014 0.013 21 0.210 -0.036 0.092 -0.024 0.051 22 -0.032 -0.065 0.017 -0.023 -0.063 23 0.056 -0.029 0.045 -0.074 0.013 24 -0.023 0.005 -0.030 0.047 -0.006 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 11 12 13 14 15 ________ ________ ________ ________ ________ 11 1.000 12 0.191 1.000 13 -0.114 -0.007 1.000 14 -0.056 -0.062 0.214 1.000 15 -0.017 0.061 -0.028 -0.005 1.000 16 0.090 0.068 0.040 -0.008 0.134 17 -0.063 -0.027 -0.085 -0.018 -0.663 18 -0.064 0.023 -0.107 -0.082 0.332 19 -0.007 0.002 -0.083 -0.061 0.068 20 -0.026 -0.007 -0.023 -0.139 0.113 21 0.033 0.037 0.080 0.062 -0.024 22 -0.057 -0.055 -0.056 0.032 -0.280 23 0.012 -0.084 -0.006 0.063 0.063 24 0.052 -0.069 -0.038 -0.070 -0.068 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 16 17 18 19 20 ________ ________ ________ ________ ________ 16 1.000 17 -0.330 1.000 18 0.068 -0.202 1.000 19 0.195 -0.113 0.078 1.000 20 0.033 -0.050 0.367 0.058 1.000 21 -0.013 0.009 0.013 -0.906 -0.023 22 -0.232 0.433 -0.662 -0.093 -0.233 23 0.042 -0.078 0.089 -0.022 0.218 24 -0.050 0.026 -0.206 -0.019 -0.666 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 21 22 23 24 ________ ________ ________ ________ 21 1.000 22 -0.123 1.000 23 0.089 -0.193 1.000 24 -0.058 0.163 -0.301 1.000
e8173f235c730c6e5d038d3a4160ebc424033acf
7df66d80cfee8664f45a7ffd8f571279ce0828b8
/Laboratorios/Lab Funciones/1b- test-get_idDepartamento.tst
61ad5977afc2447f67ae3b0eb3f37a88f1323174
[]
no_license
untxi/basesdatos
31154c4dc853368955ad9fd4f54ea77e55aaed54
3ba1ec0d60ef961c70c6824560dab5732ee5dde1
refs/heads/master
2021-08-11T21:13:51.658562
2021-08-10T20:11:06
2021-08-10T20:11:06
122,225,841
0
0
null
null
null
null
UTF-8
Scilab
false
false
199
tst
1b- test-get_idDepartamento.tst
PL/SQL Developer Test script 3.0 9 DECLARE --LOCAL VARIABLES id NUMBER :=1; vDepto VARCHAR2(30); BEGIN vDepto := GET_NOMBRE_DEPARTAMENTO(id); DBMS_OUTPUT.put_line(vDepto); END; 0 0
69df4570c5e68e8b4f653bbaa3c235b1d8e4e93c
56ae453b5537f39dbd832dd0416f3c804aa1b937
/microdaq/macros/microdaq_macros/mdaqDIORead.sci
39d5fabcaee0e517afc4b108bcb413e3e0826000
[ "BSD-3-Clause" ]
permissive
grtwall/Scilab
38bc8bc978e715b770da61482a9ac30e0cb806d3
e44e0dc0d357a6baf875d33ddd435a29e053b7f1
refs/heads/master
2020-07-22T16:48:31.589484
2018-07-31T13:15:40
2018-07-31T13:15:40
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,294
sci
mdaqDIORead.sci
function state = mdaqDIORead(arg1, arg2) state = -1; if argn(2) == 1 then dio = arg1; end if argn(2) == 2 then link_id = arg1; dio = arg2; if link_id < 0 then error("Invalid link ID!") return; end end if argn(2) > 2 | argn(2) < 1 then mprintf("Description:\n"); mprintf("\tReads DIO state\n"); mprintf("Usage:\n"); mprintf("\tstate = mdaqDIORead(linkID, dio)\n") mprintf("\tlinkID - connection id returned by mdaqOpen() (OPTIONAL)\n"); mprintf("\tdio - DIO number\n"); return; end if argn(2) == 1 then link_id = mdaqOpen(); if link_id < 0 then disp("ERROR: Unable to connect to MicroDAQ device!"); return; end end result = []; [state result] = call("sci_mlink_dio_get",.. link_id, 1, "i",.. dio, 2, "i",.. "out",.. [1, 1], 3, "i",.. [1, 1], 4, "i"); if state <> 0 then state = %T; else state = %F; end if argn(2) == 1 then mdaqClose(link_id); end if result < 0 then error(mdaq_error2(result), 10000 + abs(result)); end endfunction
563f9e649c3284dd0e5a9e12e73ff846090f8828
4ebea1be375a38f07d1b8536e25cd91584882389
/src/test/example012.tst
998d9eea4ab3d2e381a2a73e166a2dcecc4553c9
[ "MIT" ]
permissive
robertsmeets/rjhg-pl
f5c2d850ba7a5e3daa0d4147357d37a275c7100a
87721b77f92d5180c34123265fac70dcf54c77a9
refs/heads/master
2021-05-22T06:46:14.395448
2021-02-21T05:54:35
2021-02-21T05:54:35
32,521,807
1
1
MIT
2020-05-17T16:48:51
2015-03-19T13:07:49
C
UTF-8
Scilab
false
false
16
tst
example012.tst
now is the time
e6ce24eb3f2db62e62a28a3a6470e27705517b4b
449d555969bfd7befe906877abab098c6e63a0e8
/3129/CH17/EX17.1/ex17_1.sce
8872889b09b5de4f52bf1c534ee4260a9774b060
[]
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
555
sce
ex17_1.sce
//Finding the Transistor voltage and current with clamping //Example 17.1(Page No-766) clc clear //given data Vcc=100;//in volts Rc=1.5;//in ohms Vd1=2.1;//in volts Vd2=0.9;//in volts Vbe=0.7;// in volts Vb=15;//in volts Rb=2.5;//in ohms B=16; //part(a) I1=(Vb-Vd1-Vbe)/Rb; Ic=B*I1; printf('(a)Collecter current without clamping:%2.2f A\n',Ic) //part(b) Vce=Vbe+Vd1-Vd2; printf(' (b)Clamping voltage:%.1f V\n',Vce) //part(c) IL=(Vcc-Vce)/Rc; Ic=B*(I1+IL)/(B+1); printf(' (c)Collector current with clampingIc:%2.2f A\n',Ic)
97445d5080dff43dbc10f0ee6706556632d20c39
449d555969bfd7befe906877abab098c6e63a0e8
/2015/CH7/EX7.13/7_13.sce
08ae74cd609f456359c82346b554dce9c3bdf851
[]
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,062
sce
7_13.sce
clc //initialisation of variables clear ps1=0.062739 //bar pressure phi1=0.9 //relative humidity td1=37 //temp in degrees td3=10.7 //dew point temparature ps4=0.02366 //bar pressure phi4=0.55 //relative humidity td4=20 //temp in degrees w12=1.5 //work input in kw v4=50 // t4=310 //temp in k r= 1 w2= 1 w3= 1 hf3= 2 p=1.01325 //pressure in bar //CALCULATIONS pv1=phi1*ps1 w1=0.622*(pv1/(p-pv1)) h1=(1.005*td1+w1*(2500+1.86*td1)) pv4=phi4*ps4 w4=0.622*(pv4/(p-pv4)) h4=(1.005*td4+w4*(2500+1.86*td4)) h3=(1.005*td3+w4*(2500+1.86*td3)) pa4=p-pv4 ma=(pa4*v4*100)/(r*t4) q12=(w12*60)/ma h2=h1+q12 q23=((h3+(w2-w3)*hf3)-h2) Q23=-1*q23*ma q34=h4-h3 Q34=q34*ma //RESULTS printf('enthalpy rate 1 is %2fkj/kg of da',h1) printf('\nenthalpy rate 4 is %2fkj/kg of da',h4) printf('\nenthalpy rate 3 is %2fkj/kg of da',h3) printf('\nmass of dry air is %2fkg/min',ma) printf('\nenthalpy rate 2 is %2fkj/kg of da',h2) printf('\ncapacity od cooling coil q23 is %2fkj/min',Q23) printf('\ncapacity od cooling coil q34 is %2fkj/min',Q34)
6d6d52e123aedca04352c61e0510752469e4c50b
449d555969bfd7befe906877abab098c6e63a0e8
/1085/CH11/EX11.1/ex11_1.sce
be07489bf32812d5007a56af5dfcc130e639b2ac
[]
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
714
sce
ex11_1.sce
//Exam:11.1 clc; clear; close; h_1=1; k_1=1; l_1=1; //Miller indices of slip plane h_2=1; k_2=-1; l_2=1; //Miller indices of stress plane h_3=1; k_3=1; l_3=0; //Miller indices of slip direction A=(h_1*h_2+k_1*k_2+l_1*l_2)/(((h_1^2+k_1^2+l_1^2)^(1/2))*((h_2^2+k_2^2+l_2^2)^(1/2)));//Value of cos(x) where x =angle between slip plane and stress plane B=(h_1*h_3+k_1*k_3+l_1*l_3)/(((h_1^2+k_1^2+l_1^2)^(1/2))*((h_3^2+k_3^2+l_3^2)^(1/2)));//Value of cos(y) where y =angle between slip direction and stress direction C=(1-A^2)^(1/2);//Value of sin(x) stress=3.5;//Applied Stress in Mpa T_cr=stress*A*B*C;//Critical resolved shear stress(in MPa) disp(T_cr,'Critical resolved shear stress(in MPa)=');
62ae9c68b921d085280e854d160c12e181a26ad4
42fdf741bf64ea2e63d1546bb08356286f994505
/data_for_calibration_paper/Figure_04_IVconverterRampADC.sce
c442cc5e2868b729c80752503cfaa64e89d52981
[]
no_license
skim819/RASP_Workspace_sihwan
7e3cd403dc3965b8306ec203007490e3ea911e3b
0799e146586595577c8efa05c647b8cb92b962f4
refs/heads/master
2020-12-24T05:22:25.775823
2017-04-01T22:15:18
2017-04-01T22:15:18
41,511,563
1
0
null
null
null
null
UTF-8
Scilab
false
false
4,224
sce
Figure_04_IVconverterRampADC.sce
global file_name path fname extension chip_num board_num hex_1na; cd("/home/ubuntu/RASP_Workspace/data_for_calibration_paper"); path = pwd(); exec('~/rasp30/prog_assembly/libs/scilab_code/diodeADC_v2i.sce',-1); exec('~/rasp30/prog_assembly/libs/scilab_code/diodeADC_i2v.sce',-1); exec('~/rasp30/prog_assembly/libs/scilab_code/diodeADC_v2h.sce',-1); exec('~/rasp30/prog_assembly/libs/scilab_code/diodeADC_h2v.sce',-1); hex_1na=int(diodeADC_v2h(diodeADC_i2v(1e-09,chip_num,brdtype),chip_num,brdtype)); exec('~/rasp30/prog_assembly/libs/scilab_code/linefit.sce',-1); exec('~/rasp30/prog_assembly/libs/scilab_code/ekvfit_diodeADC.sce',-1); diodeADC_iv=csvRead("~/rasp30/prog_assembly/libs/scilab_code/characterization/char_diodeADC/data_diodeADC_chip"+chip_num+brdtype+"_ivdd25V"); Isat=diodeADC_iv(:,2); Vout=diodeADC_iv(:,3); Hex_code=diodeADC_iv(:,4); epsilon=0.004; plotting="off"; //"on_all" or "on_final" or "off" [Is, VT, kappa]=ekvfit_diodeADC(Vout, Isat, epsilon, plotting); //disp('EKV Fit: I_s = '+string(Is)+'A, V_T = '+string(VT)+'V, Kappa = '+string(kappa)); epsilon=1; [WIfirst, WIlast, Slope_v2h, Offset_v2h, WIN]=linefit(Vout, Hex_code, epsilon); csvWrite([Is, VT, kappa, Slope_v2h, Offset_v2h],'EKV_diodeADC'); unix_w("cp EKV_diodeADC ~/rasp30/prog_assembly/libs/chip_parameters/EKV_diodeADC/EKV_diodeADC_chip"+chip_num+brdtype); EKV_diodeADC_para=csvRead("~/rasp30/prog_assembly/libs/chip_parameters/EKV_diodeADC/EKV_diodeADC_chip"+chip_num+brdtype); Is=EKV_diodeADC_para(1); VT=EKV_diodeADC_para(2); kappa=EKV_diodeADC_para(3); Slope_v2h=EKV_diodeADC_para(4); Offset_v2h=EKV_diodeADC_para(5); //Isat2=diodeADC_v2i(Vout, chip_num, brdtype); //Vout2=diodeADC_i2v(Isat2, chip_num, brdtype); vdd=2.5; Vfg=vdd-(Vout/2); scf(2);clf(2); plot2d("nl",Vfg, Isat, style=1);p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 1; p.children.line_mode="off"; plot2d("nl", Vfg, diodeADC_v2i(Vfg, chip_num, brdtype), style=1);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on"; legend("Data","EKV fit","in_lower_left"); xtitle("","Vfg [V]","Iprog [A]"); a=gca();a.data_bounds=[1.3 1e-13; 2.4 5e-4]; title(['EKV Fit: I_s = '+string(Is)+'A, V_T = '+string(VT)+'V, Kappa = '+string(kappa)]); scf(3);clf(3); plot2d("ln",Isat, 2*(vdd-Vfg), style=1);p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 1; p.children.line_mode="off"; //plot2d("ln",Isat, 2*(vdd-diodeADC_v2i(Vfg, chip_num, brdtype), style=1);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on"; legend("Data","EKV fit","in_upper_left"); xtitle("","Iprog [A])","Vprog [V]"); a=gca();a.data_bounds=[1e-12 0.4; 1e-4 2.4]; //title(['EKV Fit: I_s = '+string(Is)+'A, V_T = '+string(VT)+'V, Kappa = '+string(kappa)]); scf(4);clf(4); plot2d("nn", 2*(vdd-Vfg), Hex_code, style=1);p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 1; p.children.line_mode="off"; plot2d("nn", 2*(vdd-Vfg), diodeADC_v2h(Vfg, chip_num, brdtype), style=1);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on"; legend("Data","Data for linefit","linefit","in_lower_right"); a=gca();a.data_bounds=[0.4 1000; 2.4 10000]; xtitle("","Vprog [V]","Hex_code"); //title('Vfg vs. Hex code Fit'); //scf(5);clf(5); //plot2d("nl", diode_ivdd25V(:,4), diode_ivdd25V(:,2), style=1);p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 1; p.children.line_mode="off"; //plot2d("nl", ADC_range_ivdd25V, exp(diode_fit_ivdd25V), style=5);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on"; //plot2d("nl", diodeADC_v2h(Vfg, chip_num, brdtype), diodeADC_v2i(Vfg, chip_num, brdtype), style=2);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on"; //legend("data","Polyfit","EKV_fit","in_lower_right"); //xtitle("","Hex_code","Isat(A)"); //title('Polyfit vs. EKVfit'); // //Current_to_ADC(:,3)=diodeADC_v2h(diodeADC_i2v(Current_to_ADC(:,1), chip_num, brdtype), chip_num, brdtype); // //disp(Current_to_ADC);
7109b7d9b18b0576e16b552e6eef133336f132ce
04ebc1029c20752e734a1d83b49a31329d5283fd
/trust_game_2/trust game 2.sce
0e33095aafc85ef0ff142ab2781a4969f97b764d
[]
no_license
jangwoopark/presentation-trust
a1293e481da417c914534a30b1969f092f08e115
31621ef8b534bca19d4b9d4a5d57792ff8bb058d
refs/heads/master
2020-06-27T14:50:42.294466
2017-09-12T01:51:08
2017-09-12T01:51:08
97,063,115
0
0
null
null
null
null
UTF-8
Scilab
false
false
89,153
sce
trust game 2.sce
scenario = "trust game"; scenario_type = fMRI_emulation; #scenario_type = fMRI; scan_period = 3000; response_matching = simple_matching; no_logfile = false; sequence_interrupt=false; #default active_buttons = 2; button_codes=0,1; default_font="arial"; default_font_size=30; default_text_color=255,255,255; default_background_color=0,0,0; begin; picture { text { caption = "YOU ARE PLAYER 1 PLAYER 2 IS A PERSON"; }; x=0; y=0; } p1person; picture { text { caption = "YOU ARE PLAYER 1 PLAYER 2 IS A COMPUTER"; }; x=0; y=0; } p1computer; picture { text { caption = "YOU ARE PLAYER 2 PLAYER 1 IS A PERSON"; }; x=0; y=0; } p2person; picture { text { caption = "YOU ARE PLAYER 2 PLAYER 1 IS A COMPUTER"; }; x=0; y=0; } p2computer; picture { text { caption = "PLEASE WAIT"; }; x=0; y=0; } wait; picture { text { caption = "COMPUTER DECIDED RETURN"; }; x=0; y=0; } decided; picture { text { caption = "+"; font_size = 50; }; x=0; y=0; } fix; # sending text { caption = "PERSON SENT"; } Person; text { caption = "COMPUTER SENT"; } Comp; text { caption = "_"; } selling; picture { text Comp; x=0; y=0; text selling; x=215; y=0; } Sentco; picture { text Person; x=0; y=0; text selling; x=215; y=0; } Sentpe; trial { picture Sentco; duration = 3000;} Sentcomp; trial { picture Sentpe; duration = 3000;} Sentperson; # selecting text { caption = " "; font_size = 12; } cross; text { caption = "SELECT AMOUNT FROM"; } select; text { caption = "10"; } dollar_10; text { caption = "13"; } dollar_13; text { caption = "16"; } dollar_16; text { caption = "19"; } dollar_19; text { caption = "22"; } dollar_22; text { caption = "25"; } dollar_25; text { caption = "28"; } dollar_28; text { caption = "31"; } dollar_31; text { caption = "34"; } dollar_34; text { caption = "37"; } dollar_37; text { caption = "40"; } dollar_40; text { caption = "SENDING:"; } sending; text { caption = "KEEPING:"; } keeping; text { caption = "_"; } dollar_2; text { caption = "_"; } dollar_3; box { height = 486; width = 2; color = 255,255,255; } vert; box { height = 2; width = 142; color = 255,255,255; } horiz; box { height = 2; width = 4; color = 255,255,255; } divide; box { height = 42; width = 140; color = 0,0,0; } zero; # cursors for 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40 picture { text cross; x=0; y=0; LOOP $i 10; $t='$i+1'; box { height = '440/10-2'; width = 140; color = 0,0,0; }"red10_10_$t"; x=0; y='-220+(440/(2*10))+$i*440/10'; ENDLOOP; LOOP $i 11; box divide; x=68; y='220-$i*(440/10)'; box divide; x=-68; y='220-$i*(440/10)'; ENDLOOP; text select; x = -250; y = 0; text dollar_10; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor10; picture {text cross; x=0; y=0; LOOP $i 13; $t='$i+1'; box { height = '440/13-2'; width = 140; color = 0,0,0; }"red10_13_$t"; x=0; y='-220+(440/(2*13))+$i*440/13'; ENDLOOP; LOOP $i 14; box divide; x=68; y='220-$i*(440/13)'; box divide; x=-68; y='220-$i*(440/13)'; ENDLOOP; text select; x = -250; y = 0; text dollar_13; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor13; picture { text cross; x=0; y=0; LOOP $i 16; $t='$i+1'; box { height = '440/16-2'; width = 140; color = 0,0,0; }"red10_16_$t"; x=0; y='-220+(440/(2*16))+$i*440/16'; ENDLOOP; LOOP $i 17; box divide; x=68; y='220-$i*(440/16)'; box divide; x=-68; y='220-$i*(440/16)'; ENDLOOP; text select; x = -250; y = 0; text dollar_16; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor16; picture { text cross; x=0; y=0; LOOP $i 19; $t='$i+1'; box { height = '440/19-2'; width = 140; color = 0,0,0; }"red10_19_$t"; x=0; y='-220+(440/(2*19))+$i*440/19'; ENDLOOP; LOOP $i 20; box divide; x=68; y='220-$i*(440/19)'; box divide; x=-68; y='220-$i*(440/19)'; ENDLOOP; text select; x = -250; y = 0; text dollar_19; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor19; picture { text cross; x=0; y=0; LOOP $i 22; $t='$i+1'; box { height = '440/22-2'; width = 140; color = 0,0,0; }"red10_22_$t"; x=0; y='-220+(440/(2*22))+$i*440/22'; ENDLOOP; LOOP $i 23; box divide; x=68; y='220-$i*(440/22)'; box divide; x=-68; y='220-$i*(440/22)'; ENDLOOP; text select; x = -250; y = 0; text dollar_22; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor22; picture { text cross; x=0; y=0; LOOP $i 25; $t='$i+1'; box { height = '440/25-2'; width = 140; color = 0,0,0; }"red10_25_$t"; x=0; y='-220+(440/(2*25))+$i*440/25'; ENDLOOP; LOOP $i 26; box divide; x=68; y='220-$i*(440/25)'; box divide; x=-68; y='220-$i*(440/25)'; ENDLOOP; text select; x = -250; y = 0; text dollar_25; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor25; picture { text cross; x=0; y=0; LOOP $i 28; $t='$i+1'; box { height = '440/28-2'; width = 140; color = 0,0,0; }"red10_28_$t"; x=0; y='-220+(440/(2*28))+$i*440/28'; ENDLOOP; LOOP $i 29; box divide; x=68; y='220-$i*(440/28)'; box divide; x=-68; y='220-$i*(440/28)'; ENDLOOP; text select; x = -250; y = 0; text dollar_28; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor28; picture { text cross; x=0; y=0; LOOP $i 31; $t='$i+1'; box { height = '440/31-2'; width = 140; color = 0,0,0; }"red10_31_$t"; x=0; y='-220+(440/(2*31))+$i*440/31'; ENDLOOP; LOOP $i 32; box divide; x=68; y='220-$i*(440/31)'; box divide; x=-68; y='220-$i*(440/31)'; ENDLOOP; text select; x = -250; y = 0; text dollar_31; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor31; picture { text cross; x=0; y=0; LOOP $i 34; $t='$i+1'; box { height = '440/34-2'; width = 140; color = 0,0,0; }"red10_34_$t"; x=0; y='-220+(440/(2*34))+$i*440/34'; ENDLOOP; LOOP $i 35; box divide; x=68; y='220-$i*(440/34)'; box divide; x=-68; y='220-$i*(440/34)'; ENDLOOP; text select; x = -250; y = 0; text dollar_34; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor34; picture { text cross; x=0; y=0; LOOP $i 37; $t='$i+1'; box { height = '440/37-2'; width = 140; color = 0,0,0; }"red10_37_$t"; x=0; y='-220+(440/(2*37))+$i*440/37'; ENDLOOP; LOOP $i 38; box divide; x=68; y='220-$i*(440/37)'; box divide; x=-68; y='220-$i*(440/37)'; ENDLOOP; text select; x = -250; y = 0; text dollar_37; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor37; picture { text cross; x=0; y=0; LOOP $i 40; $t='$i+1'; box { height = '440/40-2'; width = 140; color = 0,0,0; }"red10_40_$t"; x=0; y='-220+(440/(2*40))+$i*440/40'; ENDLOOP; LOOP $i 41; box divide; x=68; y='220-$i*(440/40)'; box divide; x=-68; y='220-$i*(440/40)'; ENDLOOP; text select; x = -250; y = 0; text dollar_40; x = -250; y = -100; text sending; x = 250; y = 23; text dollar_2; x = 400; y = 23; text keeping; x = 250; y = -23; text dollar_3; x = 400; y = -23; box zero; x=0; y=-242; box vert; x=70; y=-22; box vert; x=-70; y=-22; box horiz; x=0; y=220; box horiz; x=0; y=-264; } cursor40; trial { picture p1person; duration = 3000;} p1vsperson; trial { picture p1computer; duration = 3000;} p1vscomputer; trial { picture p2person; duration = 3000;} p2vsperson; trial { picture p2computer; duration = 3000;} p2vscomputer; trial { picture wait; duration = 6000;} waiting; trial { picture decided; duration = 3000;} decision; trial { picture fix; duration = 15000;} fixing; begin_pcl; mouse stick = response_manager.get_mouse( 1 ); #joystick stick = response_manager.get_joystick( 1 ); stick.set_min_max( 1, -1, 1 ); stick.set_min_max( 2, -264, 220 ); #stick.set_saturation( 1, 0.999 ); #stick.set_saturation( 2, 0.999 ); #stick.set_dead_zone( 1, 0.001 ); #stick.set_dead_zone( 2, 0.001 ); sub box10 (int duration10) begin loop int end_time = clock.time() + duration10 until clock.time() >= end_time begin array <int> seq10[10] = {-220, -176, -132, -88, -44, 0, 44, 88, 132, 176}; stick.poll(); cursor10.set_part_x( 1, stick.x() ); cursor10.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_10_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_10_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_10_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_10_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_10_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_10_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_10_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_10_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_10_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_10_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_10_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_10_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_10_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_10_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_10_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_10_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_10_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_10_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_10_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_10_10.set_color(0,0,0); end; dollar_10.set_caption("$10"); dollar_10.redraw(); cursor10.present(); end; end; sub box13 (int duration13) begin loop int end_time = clock.time() + duration13 until clock.time() >= end_time begin array <int> seq10[13] = {-203, -169, -135, -102, -68, -34, 0, 34, 68, 102, 135, 169, 203}; stick.poll(); cursor13.set_part_x( 1, stick.x() ); cursor13.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_13_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_13_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_13_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_13_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_13_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_13_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_13_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_13_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_13_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_13_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_13_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_13_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_13_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_13_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_13_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_13_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_13_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_13_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_13_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_13_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_13_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_13_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_13_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_13_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_13_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_13_13.set_color(0,0,0); end; dollar_13.set_caption("$13"); dollar_13.redraw(); cursor13.present(); end; end; sub box16 (int duration16) begin loop int end_time = clock.time() + duration16 until clock.time() >= end_time begin array <int> seq10[16] = {-206, -179, -151, -124, -96, -69, -41, -14, 14, 41, 69, 96, 124, 151, 179, 206}; stick.poll(); cursor16.set_part_x( 1, stick.x() ); cursor16.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_16_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_16_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_16_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_16_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_16_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_16_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_16_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_16_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_16_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_16_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_16_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_16_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_16_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_16_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_16_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_16_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_16_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_16_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_16_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_16_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_16_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_16_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_16_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_16_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_16_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_16_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_16_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_16_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_16_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_16_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_16_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_16_16.set_color(0,0,0); end; dollar_16.set_caption("$16"); dollar_16.redraw(); cursor16.present(); end; end; sub box19 (int duration19) begin loop int end_time = clock.time() + duration19 until clock.time() >= end_time begin array <int> seq10[19] = {-208, -185, -162, -139, -116, -93, -69, -46, -23, 0, 23, 46, 69, 93, 116, 139, 162, 185, 208}; stick.poll(); cursor19.set_part_x( 1, stick.x() ); cursor19.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$19"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_19_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$18"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_19_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_19_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$17"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_19_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_19_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_19_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_19_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_19_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_19_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_19_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_19_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_19_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_19_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_19_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_19_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_19_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_19_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_19_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_19_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_19_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_19_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_19_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_19_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_19_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_19_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_19_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_19_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_19_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_19_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_19_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_19_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_19_16.set_color(0,0,0); end; if (stick.y()>seq10[17]) then red10_19_17.set_color(255,0,0); dollar_2.set_caption("$17"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[17]) then red10_19_17.set_color(0,0,0); end; if (stick.y()>seq10[18]) then red10_19_18.set_color(255,0,0); dollar_2.set_caption("$18"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[18]) then red10_19_18.set_color(0,0,0); end; if (stick.y()>seq10[19]) then red10_19_19.set_color(255,0,0); dollar_2.set_caption("$19"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[19]) then red10_19_19.set_color(0,0,0); end; dollar_19.set_caption("$19"); dollar_19.redraw(); cursor19.present(); end; end; sub box22 (int duration22) begin loop int end_time = clock.time() + duration22 until clock.time() >= end_time begin array <int> seq10[22] = {-210, -190, -170, -150, -130, -110, -90, -70, -50, -30, -10, 10, 30, 50, 70, 90, 110, 130, 150, 170, 190, 210}; stick.poll(); cursor22.set_part_x( 1, stick.x() ); cursor22.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$22"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_22_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$21"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_22_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_22_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$20"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_22_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_22_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$19"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_22_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_22_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$18"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_22_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_22_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$17"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_22_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_22_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_22_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_22_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_22_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_22_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_22_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_22_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_22_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_22_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_22_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_22_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_22_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_22_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_22_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_22_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_22_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_22_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_22_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_22_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_22_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_22_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_22_16.set_color(0,0,0); end; if (stick.y()>seq10[17]) then red10_22_17.set_color(255,0,0); dollar_2.set_caption("$17"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[17]) then red10_22_17.set_color(0,0,0); end; if (stick.y()>seq10[18]) then red10_22_18.set_color(255,0,0); dollar_2.set_caption("$18"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[18]) then red10_22_18.set_color(0,0,0); end; if (stick.y()>seq10[19]) then red10_22_19.set_color(255,0,0); dollar_2.set_caption("$19"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[19]) then red10_22_19.set_color(0,0,0); end; if (stick.y()>seq10[20]) then red10_22_20.set_color(255,0,0); dollar_2.set_caption("$20"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_22_20.set_color(0,0,0); end; if (stick.y()>seq10[21]) then red10_22_21.set_color(255,0,0); dollar_2.set_caption("$21"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_22_21.set_color(0,0,0); end; if (stick.y()>seq10[22]) then red10_22_22.set_color(255,0,0); dollar_2.set_caption("$22"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[22]) then red10_22_22.set_color(0,0,0); end; dollar_22.set_caption("$22"); dollar_22.redraw(); cursor22.present(); end; end; sub box25 (int duration25) begin loop int end_time = clock.time() + duration25 until clock.time() >= end_time begin array <int> seq10[25] = {-211, -194, -176, -158, -141, -123, -106, -88, -70, -53, -35, -18, 0, 18, 35, 53, 70, 88, 106, 123, 141, 158, 176, 194, 211}; stick.poll(); cursor25.set_part_x( 1, stick.x() ); cursor25.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$25"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_25_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$24"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_25_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_25_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$23"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_25_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_25_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$22"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_25_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_25_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$21"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_25_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_25_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$20"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_25_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_25_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$19"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_25_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_25_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$18"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_25_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_25_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$17"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_25_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_25_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_25_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_25_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_25_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_25_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_25_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_25_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_25_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_25_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_25_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_25_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_25_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_25_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_25_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_25_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_25_16.set_color(0,0,0); end; if (stick.y()>seq10[17]) then red10_25_17.set_color(255,0,0); dollar_2.set_caption("$17"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[17]) then red10_25_17.set_color(0,0,0); end; if (stick.y()>seq10[18]) then red10_25_18.set_color(255,0,0); dollar_2.set_caption("$18"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[18]) then red10_25_18.set_color(0,0,0); end; if (stick.y()>seq10[19]) then red10_25_19.set_color(255,0,0); dollar_2.set_caption("$19"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[19]) then red10_25_19.set_color(0,0,0); end; if (stick.y()>seq10[20]) then red10_25_20.set_color(255,0,0); dollar_2.set_caption("$20"); dollar_2.redraw(); dollar_3.set_caption("$25"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_25_20.set_color(0,0,0); end; if (stick.y()>seq10[21]) then red10_25_21.set_color(255,0,0); dollar_2.set_caption("$21"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_25_21.set_color(0,0,0); end; if (stick.y()>seq10[22]) then red10_25_22.set_color(255,0,0); dollar_2.set_caption("$22"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[22]) then red10_25_22.set_color(0,0,0); end; if (stick.y()>seq10[23]) then red10_25_23.set_color(255,0,0); dollar_2.set_caption("$23"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_25_23.set_color(0,0,0); end; if (stick.y()>seq10[24]) then red10_25_24.set_color(255,0,0); dollar_2.set_caption("$24"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_25_24.set_color(0,0,0); end; if (stick.y()>seq10[25]) then red10_25_25.set_color(255,0,0); dollar_2.set_caption("$25"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[25]) then red10_25_25.set_color(0,0,0); end; dollar_25.set_caption("$25"); dollar_25.redraw(); cursor25.present(); end; end; sub box28 (int duration28) begin loop int end_time = clock.time() + duration28 until clock.time() >= end_time begin array <int> seq10[28] = {-212, -196, -181, -165, -149, -134, -118, -102, -86, -71, -55, -39, -24, -8, 8, 24, 39, 55, 71, 86, 102, 118, 134, 149, 165, 181, 196, 212}; stick.poll(); cursor28.set_part_x( 1, stick.x() ); cursor28.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$28"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_28_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$27"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_28_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_28_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$26"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_28_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_28_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$25"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_28_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_28_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$24"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_28_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_28_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$23"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_28_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_28_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$22"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_28_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_28_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$21"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_28_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_28_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$20"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_28_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_28_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$19"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_28_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_28_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$18"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_28_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_28_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$17"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_28_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_28_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_28_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_28_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_28_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_28_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_28_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_28_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_28_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_28_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_28_16.set_color(0,0,0); end; if (stick.y()>seq10[17]) then red10_28_17.set_color(255,0,0); dollar_2.set_caption("$17"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[17]) then red10_28_17.set_color(0,0,0); end; if (stick.y()>seq10[18]) then red10_28_18.set_color(255,0,0); dollar_2.set_caption("$18"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[18]) then red10_28_18.set_color(0,0,0); end; if (stick.y()>seq10[19]) then red10_28_19.set_color(255,0,0); dollar_2.set_caption("$19"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[19]) then red10_28_19.set_color(0,0,0); end; if (stick.y()>seq10[20]) then red10_28_20.set_color(255,0,0); dollar_2.set_caption("$20"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_28_20.set_color(0,0,0); end; if (stick.y()>seq10[21]) then red10_28_21.set_color(255,0,0); dollar_2.set_caption("$21"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_28_21.set_color(0,0,0); end; if (stick.y()>seq10[22]) then red10_28_22.set_color(255,0,0); dollar_2.set_caption("$22"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[22]) then red10_28_22.set_color(0,0,0); end; if (stick.y()>seq10[23]) then red10_28_23.set_color(255,0,0); dollar_2.set_caption("$23"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[23]) then red10_28_23.set_color(0,0,0); end; if (stick.y()>seq10[24]) then red10_28_24.set_color(255,0,0); dollar_2.set_caption("$24"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[24]) then red10_28_24.set_color(0,0,0); end; if (stick.y()>seq10[25]) then red10_28_25.set_color(255,0,0); dollar_2.set_caption("$25"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[25]) then red10_28_25.set_color(0,0,0); end; if (stick.y()>seq10[26]) then red10_28_26.set_color(255,0,0); dollar_2.set_caption("$26"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[26]) then red10_28_26.set_color(0,0,0); end; if (stick.y()>seq10[27]) then red10_28_27.set_color(255,0,0); dollar_2.set_caption("$27"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[27]) then red10_28_27.set_color(0,0,0); end; if (stick.y()>seq10[28]) then red10_28_28.set_color(255,0,0); dollar_2.set_caption("$28"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[28]) then red10_28_28.set_color(0,0,0); end; dollar_28.set_caption("$28"); dollar_28.redraw(); cursor28.present(); end; end; sub box31 (int duration31) begin loop int end_time = clock.time() + duration31 until clock.time() >= end_time begin array <int> seq10[31] = {-213, -199, -185, -170, -156, -142, -128, -114, -99, -85, -71, -57, -43, -28, -14, 0, 14, 28, 43, 57, 71, 85, 99, 114, 128, 142, 156, 170, 185, 199, 213}; stick.poll(); cursor31.set_part_x( 1, stick.x() ); cursor31.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$31"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_31_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$30"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_31_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_31_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$29"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_31_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_31_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$28"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_31_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_31_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$27"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_31_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_31_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$26"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_31_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_31_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$25"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_31_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_31_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$24"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_31_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_31_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$23"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_31_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_31_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$22"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_31_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_31_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$21"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_31_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_31_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$20"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_31_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_31_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$19"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_31_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_31_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$18"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_31_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_31_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$17"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_31_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_31_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_31_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_31_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_31_16.set_color(0,0,0); end; if (stick.y()>seq10[17]) then red10_31_17.set_color(255,0,0); dollar_2.set_caption("$17"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[17]) then red10_31_17.set_color(0,0,0); end; if (stick.y()>seq10[18]) then red10_31_18.set_color(255,0,0); dollar_2.set_caption("$18"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[18]) then red10_31_18.set_color(0,0,0); end; if (stick.y()>seq10[19]) then red10_31_19.set_color(255,0,0); dollar_2.set_caption("$19"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[19]) then red10_31_19.set_color(0,0,0); end; if (stick.y()>seq10[20]) then red10_31_20.set_color(255,0,0); dollar_2.set_caption("$20"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_31_20.set_color(0,0,0); end; if (stick.y()>seq10[21]) then red10_31_21.set_color(255,0,0); dollar_2.set_caption("$21"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_31_21.set_color(0,0,0); end; if (stick.y()>seq10[22]) then red10_31_22.set_color(255,0,0); dollar_2.set_caption("$22"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[22]) then red10_31_22.set_color(0,0,0); end; if (stick.y()>seq10[23]) then red10_31_23.set_color(255,0,0); dollar_2.set_caption("$23"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_31_23.set_color(0,0,0); end; if (stick.y()>seq10[24]) then red10_31_24.set_color(255,0,0); dollar_2.set_caption("$24"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_31_24.set_color(0,0,0); end; if (stick.y()>seq10[25]) then red10_31_25.set_color(255,0,0); dollar_2.set_caption("$25"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[25]) then red10_31_25.set_color(0,0,0); end; if (stick.y()>seq10[26]) then red10_31_26.set_color(255,0,0); dollar_2.set_caption("$26"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[26]) then red10_31_26.set_color(0,0,0); end; if (stick.y()>seq10[27]) then red10_31_27.set_color(255,0,0); dollar_2.set_caption("$27"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[27]) then red10_31_27.set_color(0,0,0); end; if (stick.y()>seq10[28]) then red10_31_28.set_color(255,0,0); dollar_2.set_caption("$28"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[28]) then red10_31_28.set_color(0,0,0); end; if (stick.y()>seq10[29]) then red10_31_29.set_color(255,0,0); dollar_2.set_caption("$29"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[29]) then red10_31_29.set_color(0,0,0); end; if (stick.y()>seq10[30]) then red10_31_30.set_color(255,0,0); dollar_2.set_caption("$30"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[30]) then red10_31_30.set_color(0,0,0); end; if (stick.y()>seq10[31]) then red10_31_31.set_color(255,0,0); dollar_2.set_caption("$31"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[31]) then red10_31_31.set_color(0,0,0); end; dollar_31.set_caption("$31"); dollar_31.redraw(); cursor31.present(); end; end; sub box34 (int duration34) begin loop int end_time = clock.time() + duration34 until clock.time() >= end_time begin array <int> seq10[34] = {-214, -201, -188, -175, -162, -149, -136, -123, -110, -97, -84, -71, -58, -45, -32, -19, -6 , 6, 19, 32, 45, 58, 71, 84, 97, 110, 123, 136, 149, 162, 175, 188, 201, 214}; stick.poll(); cursor34.set_part_x( 1, stick.x() ); cursor34.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$34"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_34_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$33"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_34_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_34_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$32"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_34_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_34_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$31"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_34_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_34_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$30"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_34_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_34_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$29"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_34_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_34_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$28"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_34_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_34_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$27"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_34_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_34_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$26"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_34_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_34_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$25"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_34_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_34_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$24"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_34_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_34_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$23"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_34_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_34_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$22"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_34_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_34_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$21"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_34_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_34_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$20"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_34_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_34_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$19"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_34_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_34_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$18"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_34_16.set_color(0,0,0); end; if (stick.y()>seq10[17]) then red10_34_17.set_color(255,0,0); dollar_2.set_caption("$17"); dollar_2.redraw(); dollar_3.set_caption("$17"); dollar_3.redraw(); elseif (stick.y()<seq10[17]) then red10_34_17.set_color(0,0,0); end; if (stick.y()>seq10[18]) then red10_34_18.set_color(255,0,0); dollar_2.set_caption("$18"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<seq10[18]) then red10_34_18.set_color(0,0,0); end; if (stick.y()>seq10[19]) then red10_34_19.set_color(255,0,0); dollar_2.set_caption("$19"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[19]) then red10_34_19.set_color(0,0,0); end; if (stick.y()>seq10[20]) then red10_34_20.set_color(255,0,0); dollar_2.set_caption("$20"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_34_20.set_color(0,0,0); end; if (stick.y()>seq10[21]) then red10_34_21.set_color(255,0,0); dollar_2.set_caption("$21"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_34_21.set_color(0,0,0); end; if (stick.y()>seq10[22]) then red10_34_22.set_color(255,0,0); dollar_2.set_caption("$22"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[22]) then red10_34_22.set_color(0,0,0); end; if (stick.y()>seq10[23]) then red10_34_23.set_color(255,0,0); dollar_2.set_caption("$23"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_34_23.set_color(0,0,0); end; if (stick.y()>seq10[24]) then red10_34_24.set_color(255,0,0); dollar_2.set_caption("$24"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_34_24.set_color(0,0,0); end; if (stick.y()>seq10[25]) then red10_34_25.set_color(255,0,0); dollar_2.set_caption("$25"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[25]) then red10_34_25.set_color(0,0,0); end; if (stick.y()>seq10[26]) then red10_34_26.set_color(255,0,0); dollar_2.set_caption("$26"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[26]) then red10_34_26.set_color(0,0,0); end; if (stick.y()>seq10[27]) then red10_34_27.set_color(255,0,0); dollar_2.set_caption("$27"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[27]) then red10_34_27.set_color(0,0,0); end; if (stick.y()>seq10[28]) then red10_34_28.set_color(255,0,0); dollar_2.set_caption("$28"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[28]) then red10_34_28.set_color(0,0,0); end; if (stick.y()>seq10[29]) then red10_34_29.set_color(255,0,0); dollar_2.set_caption("$29"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[29]) then red10_34_29.set_color(0,0,0); end; if (stick.y()>seq10[30]) then red10_34_30.set_color(255,0,0); dollar_2.set_caption("$30"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[30]) then red10_34_30.set_color(0,0,0); end; if (stick.y()>seq10[31]) then red10_34_31.set_color(255,0,0); dollar_2.set_caption("$31"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[31]) then red10_34_31.set_color(0,0,0); end; if (stick.y()>seq10[32]) then red10_34_32.set_color(255,0,0); dollar_2.set_caption("$32"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[32]) then red10_34_32.set_color(0,0,0); end; if (stick.y()>seq10[33]) then red10_34_33.set_color(255,0,0); dollar_2.set_caption("$33"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[33]) then red10_34_33.set_color(0,0,0); end; if (stick.y()>seq10[34]) then red10_34_34.set_color(255,0,0); dollar_2.set_caption("$34"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[34]) then red10_34_34.set_color(0,0,0); end; dollar_34.set_caption("$34"); dollar_34.redraw(); cursor34.present(); end; end; sub box37 (int duration37) begin loop int end_time = clock.time() + duration37 until clock.time() >= end_time begin array <int> seq10[37] = {-214, -202, -190, -178, -166, -155, -143, -131, -119, -107, -95, -83, -71, -59, -48, -36, -24, -12, 0, 12, 24, 36, 48, 59, 71, 83, 95, 107, 119, 131, 143, 155, 166, 178, 190, 202, 214}; stick.poll(); cursor37.set_part_x( 1, stick.x() ); cursor37.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_37_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$36"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_37_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_37_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$35"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_37_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_37_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$34"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_37_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_37_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$33"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_37_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_37_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$32"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_37_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_37_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$31"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_37_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_37_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$30"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_37_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_37_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$29"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_37_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_37_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$28"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_37_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_37_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$27"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_37_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_37_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$26"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_37_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_37_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$25"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_37_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_37_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("24"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_37_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_37_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$23"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_37_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_37_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$22"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_37_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_37_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$21"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_37_16.set_color(0,0,0); end; if (stick.y()>seq10[17]) then red10_37_17.set_color(255,0,0); dollar_2.set_caption("$17"); dollar_2.redraw(); dollar_3.set_caption("$20"); dollar_3.redraw(); elseif (stick.y()<seq10[17]) then red10_37_17.set_color(0,0,0); end; if (stick.y()>seq10[18]) then red10_37_18.set_color(255,0,0); dollar_2.set_caption("$18"); dollar_2.redraw(); dollar_3.set_caption("$19"); dollar_3.redraw(); elseif (stick.y()<seq10[18]) then red10_37_18.set_color(0,0,0); end; if (stick.y()>seq10[19]) then red10_37_19.set_color(255,0,0); dollar_2.set_caption("$19"); dollar_2.redraw(); dollar_3.set_caption("$18"); dollar_3.redraw(); elseif (stick.y()<seq10[19]) then red10_37_19.set_color(0,0,0); end; if (stick.y()>seq10[20]) then red10_37_20.set_color(255,0,0); dollar_2.set_caption("$20"); dollar_2.redraw(); dollar_3.set_caption("$17"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_37_20.set_color(0,0,0); end; if (stick.y()>seq10[21]) then red10_37_21.set_color(255,0,0); dollar_2.set_caption("$21"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_37_21.set_color(0,0,0); end; if (stick.y()>seq10[22]) then red10_37_22.set_color(255,0,0); dollar_2.set_caption("$22"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[22]) then red10_37_22.set_color(0,0,0); end; if (stick.y()>seq10[23]) then red10_37_23.set_color(255,0,0); dollar_2.set_caption("$23"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_37_23.set_color(0,0,0); end; if (stick.y()>seq10[24]) then red10_37_24.set_color(255,0,0); dollar_2.set_caption("$24"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_37_24.set_color(0,0,0); end; if (stick.y()>seq10[25]) then red10_37_25.set_color(255,0,0); dollar_2.set_caption("$25"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[25]) then red10_37_25.set_color(0,0,0); end; if (stick.y()>seq10[26]) then red10_37_26.set_color(255,0,0); dollar_2.set_caption("$26"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[26]) then red10_37_26.set_color(0,0,0); end; if (stick.y()>seq10[27]) then red10_37_27.set_color(255,0,0); dollar_2.set_caption("$27"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[27]) then red10_37_27.set_color(0,0,0); end; if (stick.y()>seq10[28]) then red10_37_28.set_color(255,0,0); dollar_2.set_caption("$28"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[28]) then red10_37_28.set_color(0,0,0); end; if (stick.y()>seq10[29]) then red10_37_29.set_color(255,0,0); dollar_2.set_caption("$29"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[29]) then red10_37_29.set_color(0,0,0); end; if (stick.y()>seq10[30]) then red10_37_30.set_color(255,0,0); dollar_2.set_caption("$30"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[30]) then red10_37_30.set_color(0,0,0); end; if (stick.y()>seq10[31]) then red10_37_31.set_color(255,0,0); dollar_2.set_caption("$31"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[31]) then red10_37_31.set_color(0,0,0); end; if (stick.y()>seq10[32]) then red10_37_32.set_color(255,0,0); dollar_2.set_caption("$32"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[32]) then red10_37_32.set_color(0,0,0); end; if (stick.y()>seq10[33]) then red10_37_33.set_color(255,0,0); dollar_2.set_caption("$33"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[33]) then red10_37_33.set_color(0,0,0); end; if (stick.y()>seq10[34]) then red10_37_34.set_color(255,0,0); dollar_2.set_caption("$34"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[34]) then red10_37_34.set_color(0,0,0); end; if (stick.y()>seq10[35]) then red10_37_35.set_color(255,0,0); dollar_2.set_caption("$35"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[35]) then red10_37_35.set_color(0,0,0); end; if (stick.y()>seq10[36]) then red10_37_36.set_color(255,0,0); dollar_2.set_caption("$36"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[36]) then red10_37_36.set_color(0,0,0); end; if (stick.y()>seq10[37]) then red10_37_37.set_color(255,0,0); dollar_2.set_caption("$37"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[37]) then red10_37_37.set_color(0,0,0); end; dollar_37.set_caption("$37"); dollar_37.redraw(); cursor37.present(); end; end; sub box40 (int duration40) begin loop int end_time = clock.time() + duration40 until clock.time() >= end_time begin array <int> seq10[40] = {-215, -204, -193, -182, -171, -160, -149, -138, -127, -116, -105, -94, -83, -72, -61, -50, -39, -28, -17, -6, 6, 17, 28, 39, 50, 61, 72, 83, 94, 105, 116, 127, 138, 149, 160, 171, 182, 193, 204, 215}; stick.poll(); cursor40.set_part_x( 1, stick.x() ); cursor40.set_part_y( 1, stick.y() ); if (stick.y()==-264) then zero.set_color(0,0,0); dollar_2.set_caption("_"); dollar_2.redraw(); dollar_3.set_caption("_"); dollar_3.redraw(); end; if (stick.y()>-264) then zero.set_color(0,255,0); dollar_2.set_caption("$0"); dollar_2.redraw(); dollar_3.set_caption("$40"); dollar_3.redraw(); elseif (stick.y()<-264) then zero.set_color(0,0,0); end; if (stick.y()>seq10[1]) then red10_40_1.set_color(255,0,0); dollar_2.set_caption("$1"); dollar_2.redraw(); dollar_3.set_caption("$39"); dollar_3.redraw(); elseif (stick.y()<seq10[1]) then red10_40_1.set_color(0,0,0); end; if (stick.y()>seq10[2]) then red10_40_2.set_color(255,0,0); dollar_2.set_caption("$2"); dollar_2.redraw(); dollar_3.set_caption("$38"); dollar_3.redraw(); elseif (stick.y()<seq10[2]) then red10_40_2.set_color(0,0,0); end; if (stick.y()>seq10[3]) then red10_40_3.set_color(255,0,0); dollar_2.set_caption("$3"); dollar_2.redraw(); dollar_3.set_caption("$37"); dollar_3.redraw(); elseif (stick.y()<seq10[3]) then red10_40_3.set_color(0,0,0); end; if (stick.y()>seq10[4]) then red10_40_4.set_color(255,0,0); dollar_2.set_caption("$4"); dollar_2.redraw(); dollar_3.set_caption("$36"); dollar_3.redraw(); elseif (stick.y()<seq10[4]) then red10_40_4.set_color(0,0,0); end; if (stick.y()>seq10[5]) then red10_40_5.set_color(255,0,0); dollar_2.set_caption("$5"); dollar_2.redraw(); dollar_3.set_caption("$35"); dollar_3.redraw(); elseif (stick.y()<seq10[5]) then red10_40_5.set_color(0,0,0); end; if (stick.y()>seq10[6]) then red10_40_6.set_color(255,0,0); dollar_2.set_caption("$6"); dollar_2.redraw(); dollar_3.set_caption("$34"); dollar_3.redraw(); elseif (stick.y()<seq10[6]) then red10_40_6.set_color(0,0,0); end; if (stick.y()>seq10[7]) then red10_40_7.set_color(255,0,0); dollar_2.set_caption("$7"); dollar_2.redraw(); dollar_3.set_caption("$33"); dollar_3.redraw(); elseif (stick.y()<seq10[7]) then red10_40_7.set_color(0,0,0); end; if (stick.y()>seq10[8]) then red10_40_8.set_color(255,0,0); dollar_2.set_caption("$8"); dollar_2.redraw(); dollar_3.set_caption("$32"); dollar_3.redraw(); elseif (stick.y()<seq10[8]) then red10_40_8.set_color(0,0,0); end; if (stick.y()>seq10[9]) then red10_40_9.set_color(255,0,0); dollar_2.set_caption("$9"); dollar_2.redraw(); dollar_3.set_caption("$31"); dollar_3.redraw(); elseif (stick.y()<seq10[9]) then red10_40_9.set_color(0,0,0); end; if (stick.y()>seq10[10]) then red10_40_10.set_color(255,0,0); dollar_2.set_caption("$10"); dollar_2.redraw(); dollar_3.set_caption("$30"); dollar_3.redraw(); elseif (stick.y()<seq10[10]) then red10_40_10.set_color(0,0,0); end; if (stick.y()>seq10[11]) then red10_40_11.set_color(255,0,0); dollar_2.set_caption("$11"); dollar_2.redraw(); dollar_3.set_caption("$29"); dollar_3.redraw(); elseif (stick.y()<seq10[11]) then red10_40_11.set_color(0,0,0); end; if (stick.y()>seq10[12]) then red10_40_12.set_color(255,0,0); dollar_2.set_caption("$12"); dollar_2.redraw(); dollar_3.set_caption("$28"); dollar_3.redraw(); elseif (stick.y()<seq10[12]) then red10_40_12.set_color(0,0,0); end; if (stick.y()>seq10[13]) then red10_40_13.set_color(255,0,0); dollar_2.set_caption("$13"); dollar_2.redraw(); dollar_3.set_caption("$27"); dollar_3.redraw(); elseif (stick.y()<seq10[13]) then red10_40_13.set_color(0,0,0); end; if (stick.y()>seq10[14]) then red10_40_14.set_color(255,0,0); dollar_2.set_caption("$14"); dollar_2.redraw(); dollar_3.set_caption("$26"); dollar_3.redraw(); elseif (stick.y()<seq10[14]) then red10_40_14.set_color(0,0,0); end; if (stick.y()>seq10[15]) then red10_40_15.set_color(255,0,0); dollar_2.set_caption("$15"); dollar_2.redraw(); dollar_3.set_caption("$25"); dollar_3.redraw(); elseif (stick.y()<seq10[15]) then red10_40_15.set_color(0,0,0); end; if (stick.y()>seq10[16]) then red10_40_16.set_color(255,0,0); dollar_2.set_caption("$16"); dollar_2.redraw(); dollar_3.set_caption("$24"); dollar_3.redraw(); elseif (stick.y()<seq10[16]) then red10_40_16.set_color(0,0,0); end; if (stick.y()>seq10[17]) then red10_40_17.set_color(255,0,0); dollar_2.set_caption("$17"); dollar_2.redraw(); dollar_3.set_caption("$23"); dollar_3.redraw(); elseif (stick.y()<seq10[17]) then red10_40_17.set_color(0,0,0); end; if (stick.y()>seq10[18]) then red10_40_18.set_color(255,0,0); dollar_2.set_caption("$18"); dollar_2.redraw(); dollar_3.set_caption("$22"); dollar_3.redraw(); elseif (stick.y()<seq10[18]) then red10_40_18.set_color(0,0,0); end; if (stick.y()>seq10[19]) then red10_40_19.set_color(255,0,0); dollar_2.set_caption("$19"); dollar_2.redraw(); dollar_3.set_caption("$21"); dollar_3.redraw(); elseif (stick.y()<seq10[19]) then red10_40_19.set_color(0,0,0); end; if (stick.y()>seq10[20]) then red10_40_20.set_color(255,0,0); dollar_2.set_caption("$20"); dollar_2.redraw(); dollar_3.set_caption("$20"); dollar_3.redraw(); elseif (stick.y()<seq10[20]) then red10_40_20.set_color(0,0,0); end; if (stick.y()>seq10[21]) then red10_40_21.set_color(255,0,0); dollar_2.set_caption("$21"); dollar_2.redraw(); dollar_3.set_caption("$19"); dollar_3.redraw(); elseif (stick.y()<seq10[21]) then red10_40_21.set_color(0,0,0); end; if (stick.y()>seq10[22]) then red10_40_22.set_color(255,0,0); dollar_2.set_caption("$22"); dollar_2.redraw(); dollar_3.set_caption("$18"); dollar_3.redraw(); elseif (stick.y()<seq10[22]) then red10_40_22.set_color(0,0,0); end; if (stick.y()>seq10[23]) then red10_40_23.set_color(255,0,0); dollar_2.set_caption("$23"); dollar_2.redraw(); dollar_3.set_caption("$17"); dollar_3.redraw(); elseif (stick.y()<seq10[23]) then red10_40_23.set_color(0,0,0); end; if (stick.y()>seq10[24]) then red10_40_24.set_color(255,0,0); dollar_2.set_caption("$24"); dollar_2.redraw(); dollar_3.set_caption("$16"); dollar_3.redraw(); elseif (stick.y()<seq10[24]) then red10_40_24.set_color(0,0,0); end; if (stick.y()>seq10[25]) then red10_40_25.set_color(255,0,0); dollar_2.set_caption("$25"); dollar_2.redraw(); dollar_3.set_caption("$15"); dollar_3.redraw(); elseif (stick.y()<seq10[25]) then red10_40_25.set_color(0,0,0); end; if (stick.y()>seq10[26]) then red10_40_26.set_color(255,0,0); dollar_2.set_caption("$26"); dollar_2.redraw(); dollar_3.set_caption("$14"); dollar_3.redraw(); elseif (stick.y()<seq10[26]) then red10_40_26.set_color(0,0,0); end; if (stick.y()>seq10[27]) then red10_40_27.set_color(255,0,0); dollar_2.set_caption("$27"); dollar_2.redraw(); dollar_3.set_caption("$13"); dollar_3.redraw(); elseif (stick.y()<seq10[27]) then red10_40_27.set_color(0,0,0); end; if (stick.y()>seq10[28]) then red10_40_28.set_color(255,0,0); dollar_2.set_caption("$28"); dollar_2.redraw(); dollar_3.set_caption("$12"); dollar_3.redraw(); elseif (stick.y()<seq10[28]) then red10_40_28.set_color(0,0,0); end; if (stick.y()>seq10[29]) then red10_40_29.set_color(255,0,0); dollar_2.set_caption("$29"); dollar_2.redraw(); dollar_3.set_caption("$11"); dollar_3.redraw(); elseif (stick.y()<seq10[29]) then red10_40_29.set_color(0,0,0); end; if (stick.y()>seq10[30]) then red10_40_30.set_color(255,0,0); dollar_2.set_caption("$30"); dollar_2.redraw(); dollar_3.set_caption("$10"); dollar_3.redraw(); elseif (stick.y()<seq10[30]) then red10_40_30.set_color(0,0,0); end; if (stick.y()>seq10[31]) then red10_40_31.set_color(255,0,0); dollar_2.set_caption("$31"); dollar_2.redraw(); dollar_3.set_caption("$9"); dollar_3.redraw(); elseif (stick.y()<seq10[31]) then red10_40_31.set_color(0,0,0); end; if (stick.y()>seq10[32]) then red10_40_32.set_color(255,0,0); dollar_2.set_caption("$32"); dollar_2.redraw(); dollar_3.set_caption("$8"); dollar_3.redraw(); elseif (stick.y()<seq10[32]) then red10_40_32.set_color(0,0,0); end; if (stick.y()>seq10[33]) then red10_40_33.set_color(255,0,0); dollar_2.set_caption("$33"); dollar_2.redraw(); dollar_3.set_caption("$7"); dollar_3.redraw(); elseif (stick.y()<seq10[33]) then red10_40_33.set_color(0,0,0); end; if (stick.y()>seq10[34]) then red10_40_34.set_color(255,0,0); dollar_2.set_caption("$34"); dollar_2.redraw(); dollar_3.set_caption("$6"); dollar_3.redraw(); elseif (stick.y()<seq10[34]) then red10_40_34.set_color(0,0,0); end; if (stick.y()>seq10[35]) then red10_40_35.set_color(255,0,0); dollar_2.set_caption("$35"); dollar_2.redraw(); dollar_3.set_caption("$5"); dollar_3.redraw(); elseif (stick.y()<seq10[35]) then red10_40_35.set_color(0,0,0); end; if (stick.y()>seq10[36]) then red10_40_36.set_color(255,0,0); dollar_2.set_caption("$36"); dollar_2.redraw(); dollar_3.set_caption("$4"); dollar_3.redraw(); elseif (stick.y()<seq10[36]) then red10_40_36.set_color(0,0,0); end; if (stick.y()>seq10[37]) then red10_40_37.set_color(255,0,0); dollar_2.set_caption("$37"); dollar_2.redraw(); dollar_3.set_caption("$3"); dollar_3.redraw(); elseif (stick.y()<seq10[37]) then red10_40_37.set_color(0,0,0); end; if (stick.y()>seq10[38]) then red10_40_38.set_color(255,0,0); dollar_2.set_caption("$38"); dollar_2.redraw(); dollar_3.set_caption("$2"); dollar_3.redraw(); elseif (stick.y()<seq10[38]) then red10_40_38.set_color(0,0,0); end; if (stick.y()>seq10[39]) then red10_40_39.set_color(255,0,0); dollar_2.set_caption("$39"); dollar_2.redraw(); dollar_3.set_caption("$1"); dollar_3.redraw(); elseif (stick.y()<seq10[39]) then red10_40_39.set_color(0,0,0); end; if (stick.y()>seq10[40]) then red10_40_40.set_color(255,0,0); dollar_2.set_caption("$40"); dollar_2.redraw(); dollar_3.set_caption("$0"); dollar_3.redraw(); elseif (stick.y()<seq10[40]) then red10_40_40.set_color(0,0,0); end; dollar_40.set_caption("$40"); dollar_40.redraw(); cursor40.present(); end; end; sub dm2person (int duration) begin loop int end_time = clock.time() + duration until clock.time() >= end_time begin double b = random(); if (b> 0.0) && (b<=0.149) then selling.set_caption("$0");selling.redraw(); Sentperson.present(); box10(8000); end; if (b>0.149) && (b<=0.190) then selling.set_caption("$1");selling.redraw(); Sentperson.present(); box13(8000); end; if (b>0.190) && (b<=0.352) then selling.set_caption("$2");selling.redraw(); Sentperson.present(); box16(8000); end; if (b>0.352) && (b<=0.447) then selling.set_caption("$3");selling.redraw(); Sentperson.present(); box19(8000); end; if (b>0.447) && (b<=0.555) then selling.set_caption("$4");selling.redraw(); Sentperson.present(); box22(8000); end; if (b>0.555) && (b<=0.636) then selling.set_caption("$5");selling.redraw(); Sentperson.present(); box25(8000); end; if (b>0.636) && (b<=0.690) then selling.set_caption("$6");selling.redraw(); Sentperson.present(); box28(8000); end; if (b>0.690) && (b<=0.731) then selling.set_caption("$7");selling.redraw(); Sentperson.present(); box31(8000); end; if (b>0.731) && (b<=0.799) then selling.set_caption("$8");selling.redraw(); Sentperson.present(); box34(8000); end; if (b>0.799) && (b<=0.840) then selling.set_caption("$9");selling.redraw(); Sentperson.present(); box37(8000); end; if (b>0.840) && (b<=0.999) then selling.set_caption("$10");selling.redraw(); Sentperson.present(); box40(8000); end; end; end; sub dm2comp (int durations) begin int b = random(0,10); loop int end_time = clock.time() + durations until clock.time() >= end_time begin if (b==0) then selling.set_caption("$0"); selling.redraw(); Sentcomp.present(); box10(8000); end; if (b==1) then selling.set_caption("$1"); selling.redraw(); Sentcomp.present(); box13(8000); end; if (b==2) then selling.set_caption("$2"); selling.redraw(); Sentcomp.present(); box16(8000); end; if (b==3) then selling.set_caption("$3"); selling.redraw(); Sentcomp.present(); box19(8000); end; if (b==4) then selling.set_caption("$4"); selling.redraw(); Sentcomp.present(); box22(8000); end; if (b==5) then selling.set_caption("$5"); selling.redraw(); Sentcomp.present(); box25(8000); end; if (b==6) then selling.set_caption("$6"); selling.redraw(); Sentcomp.present(); box28(8000); end; if (b==7) then selling.set_caption("$7"); selling.redraw(); Sentcomp.present(); box31(8000); end; if (b==8) then selling.set_caption("$8"); selling.redraw(); Sentcomp.present(); box34(8000); end; if (b==9) then selling.set_caption("$9"); selling.redraw(); Sentcomp.present(); box37(8000); end; if (b==10) then selling.set_caption("$10"); selling.redraw(); Sentcomp.present(); box40(8000); end; end; end; # Sequence for delivery of stimuli array <int> sequence[12] = {4,3,4,4,2,2,1,3,3,1,1,2}; loop int i=1 until i>12 begin if sequence[i]==1 then p1vsperson.present(); box10(8000); waiting.present(); decision.present(); fixing.present() elseif sequence[i]==2 then p1vscomputer.present(); box10(8000); waiting.present(); decision.present(); fixing.present() elseif sequence[i]==3 then p2vsperson.present(); waiting.present(); dm2person(11000); fixing.present() elseif sequence[i]==4 then p2vscomputer.present(); waiting.present(); dm2comp(11000); fixing.present() end; i=i+1 end;
70c7ed5821268fd50d7e39701c3896c56c4d5b9d
449d555969bfd7befe906877abab098c6e63a0e8
/1952/CH12/EX12.10/Ex10.sce
81f90f63ccfd545f21fb2a7ff34c52e42b677438
[]
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
843
sce
Ex10.sce
// Additional solved examples , Example 10 , pg 335 n1=1.5//core refractive index n2=1.45//cladding refractive index n0=1//refractive index of air NA=sqrt(n1^2-n2^2)//numerical aperture alpha_m =asin(NA/n0)//angle of acceptance (in radian) a=100*10^-6/2 //radius of core phi_m=asin((n0*sin(alpha_m))/n1)// no*sin(alpha_m)=n1*sin(phi_m) (in radian) L=a/tan(phi_m) //(in m) printf("Minimum number of reflections per metre=zero\n") //since rays travelling with alpha=0 suffer no internal reflection //for rays travelling with alpha=alpha_m ,1 internal reflection takes place for a transversed distance of 2*L N=1/(2*L) //Maximum number of reflections per metre disp("Maximum number of reflections per metre(in m^-1)=") printf("N=%.0f",N) //Answer varies as L is restricted to 1.86*10^-4 (m) instead of 1.888*10^-4 (m)
a1cb2b581325035c7dc4c794df674898ea7cd618
4545588c8427debaf17f9dc71b0ace32f4fb5d67
/avr32/services/dsp/dsplib/utils/scripts/twiddle_factors_generator/tf_gen.sce
1835c5651912dfcadf206f9971d6080c39fe09d5
[]
no_license
eewiki/asf
02e06cec0465b28dd689dea801e6be6cbcd47eca
8d0f55bd089f2e68d2b53aa76adbb02c07cdb166
refs/heads/master
2021-01-16T18:20:22.690176
2015-03-09T05:42:50
2015-03-09T05:42:50
18,419,213
34
30
null
2014-12-25T05:13:20
2014-04-03T21:42:46
C
UTF-8
Scilab
false
false
3,867
sce
tf_gen.sce
// Twiddle factor table generation for the AVR32 DSP Lib // Copyright (C) 2006-2008, Atmel Corporation All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. 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. // // 3. The name of ATMEL may not be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY ATMEL ``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 EXPRESSLY AND // SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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. // Parameter N_TWIDDLE_FACTORS // Used for a N_TWIDDLE_FACTORS-Point FFT maximum N_TWIDDLE_FACTORS = 4096; // Parameter BITS // The number of bits of the twiddle factors coefficients BITS = 32; PI = 3.14159265358979323846; QA = 1; QB = (BITS-QA); resolution = int(abs(log10(1/(2^QB)))+2); printf("/*\n"); printf(" * Twiddle factors for a %d-point FFT\n", N_TWIDDLE_FACTORS); printf(" * Minimized twiddle factors table: %d*(%d/4 + 1)*2 = %d bytes\n", BITS/8, N_TWIDDLE_FACTORS, (N_TWIDDLE_FACTORS/4+1)*2*BITS/8); printf(" * Full twiddle factors table: %d*(%d/4)*6 + %d*2 = %d bytes\n", BITS/8, N_TWIDDLE_FACTORS, BITS/8, (N_TWIDDLE_FACTORS/4)*6*BITS/8 + BITS/8*2); printf(" */\n"); printf("#if DSP%d_N_TWIDDLE_FACTORS == %d\n\n", BITS, N_TWIDDLE_FACTORS); printf(" A_ALIGNED TWIDDLE_FACTORS_PREFIX_TAB dsp%d_t dsp%d_twiddle_factors[DSP%d_N_TWIDDLE_FACTORS/2+2] = {\n", BITS, BITS, BITS); printf(" /*Re(w) Im(w) */\n"); for i=0:4:N_TWIDDLE_FACTORS, k = i/(N_TWIDDLE_FACTORS*4); w = exp(-2*PI*%i*k); str_format = sprintf(" DSP%d_Q_CONVERT(%%.%df), DSP%d_Q_CONVERT(%%.%df)", BITS, resolution, BITS, resolution); printf(str_format, w, -w*%i); if i < N_TWIDDLE_FACTORS then printf(",\n"); else printf("\n"); end end; printf(" };\n\n"); printf(" // If we need to speed up the code\n"); printf("# if !(DSP_OPTIMIZATION & DSP_OPTI_SIZE)\n"); printf(" A_ALIGNED TWIDDLE_FACTORS_PREFIX_TAB dsp%d_t dsp%d_twiddle_factors2[DSP%d_N_TWIDDLE_FACTORS] = {\n", BITS, BITS, BITS); printf(" /*Re(w2) Im(w2) Re(w3) Im(w3) */\n"); for i=0:4:N_TWIDDLE_FACTORS-4, k = i/(N_TWIDDLE_FACTORS*4); w2 = exp(-2*PI*%i*k*2); w3 = exp(-2*PI*%i*k*3); str_format = sprintf(" DSP%d_Q_CONVERT(%%.%df), DSP%d_Q_CONVERT(%%.%df),", BITS, resolution, BITS, resolution); printf(str_format, w2, -w2*%i); printf("\n"); str_format = sprintf(" DSP%d_Q_CONVERT(%%.%df), DSP%d_Q_CONVERT(%%.%df)", BITS, resolution, BITS, resolution); printf(str_format, w3, -w3*%i); if i < N_TWIDDLE_FACTORS-4 then printf(",\n"); else printf("\n"); end end; printf(" };\n"); printf("# endif\n\n"); printf("#endif\n");
3fa5843d57de46b58c526e5a1d983eaa704b3b42
897ce6a3fd5b682122c396af7e24fa53014c7cb3
/src_script/scilab/_import/rtsx_10/common/display.sci
76a3af190b74af134a0fe03c45ef147fc7a9ca37
[]
no_license
stub22/glue-ai-v1_friendularity
e66f5ab357eba45de2def6f7900f414e358a4125
74949dc3e9b0d08b39857735aad901915e61322d
refs/heads/master
2022-12-19T18:57:01.336831
2017-08-04T12:55:12
2017-08-04T12:55:12
284,544,364
0
0
null
2020-10-14T00:08:14
2020-08-02T21:24:34
Java
UTF-8
Scilab
false
false
612
sci
display.sci
// display.sci display data // www.controlsystemslab.com Sep 2012 function display(a) if isquaternion(a) then s = q2str(a); // convert to string first ns = size(s,1); if ns==1 then printf("\nQuaternion data\n"); printf(s); else printf("\n"); printf("======= A quaternion array of %d elements =======\n", ns) for i = 1:ns printf("%d -- %s\n",i,s(i)); end end else printf("So far only quaternion display is implemented"); end endfunction
003702f24a6c04f49df8cd1f522d38e03d65dfc3
449d555969bfd7befe906877abab098c6e63a0e8
/569/CH6/EX6.14/6_14.sci
e03fff9b7506d640c462a8d150d9172b5bc8cb8c
[]
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
368
sci
6_14.sci
// calculating minimum, maximum time constants and value of frequencies clc; MXtc= 10^10*1000*10^-12; disp(MXtc,'Maximum time constant (s)'); MNtc= 10^8*10*10^-12; disp(MNtc,'Minimum time constant (s)'); AR=0.95; fmin=(AR)/[2*%pi*MXtc*(1-AR^2)^0.5]; disp(fmin,'minimum frequency (Hz)') fmax=(AR)/[2*%pi*MNtc*(1-AR^2)^0.5]; disp(fmax,'Maximum frequency (Hz)')
0cdb1ce617399f309e1c898de554895dcbd2b590
449d555969bfd7befe906877abab098c6e63a0e8
/1529/CH5/EX5.5/5_05.sce
9d7cdda8c31ae526ef1d895ecb2381973c4e25d7
[]
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
562
sce
5_05.sce
//Chapter 5, Problem 5, Figure 5.8 clc; V=24; I=3; R1=2; T=50; R=V/I; //Calculating total resistance R2=R-R1; //Calculating the value of unknown resistance printf("Value of unknown resistance = %f ohm\n\n\n",R2); V1=I*R1; //Calculating the voltage across 2 ohm resistor printf("Potential difference across 2 ohm resistor = %f V\n\n\n",V1); E=(V*I)*T; printf("Energy used = %f Wh",E);
286b0bc160e3a33cc5847046bb354d12b0547b9e
5ed8234edfa9f877fe2bc6ed926e81ec4d99a182
/Module/Simulation/Trajectory/GSE-001_functions.sce
e3008eb87a72c4b235974c5799743f5a0e31b7a6
[]
no_license
NCKU-AA-IISlab/DOCKing_System
23cb95adc773aeb2b7480f81817a6339bddec881
832d1ef0b1824e76010fe50cf253bcfa93f71c49
refs/heads/master
2021-05-29T19:17:27.929049
2015-09-30T11:57:31
2015-09-30T11:57:31
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
4,349
sce
GSE-001_functions.sce
//========================================================== // GSE-001_functions.sce, v1.3 (BIRDY_TS: Trajectory solver) //========================================================== // date : 24-Jan-2015 // Ref: GSE-001 // CL=1 // by Boris SEGRET from v1.2 // + Audrey PORQUET before v1.2 // // Contains the functions for GSE-001, including the call to the Numerical integrations: // (call to FreeMotion_Engine.sce) // DVLambert(..) // arrivals_Mars(..) // EOD2ICRS(..) // ICRS2BCFSun(..) // ICRS2BCFMars(..) // ICRS2ECFTerre(..) // // Function declarations for the Numerical integration engine // exec('FreeMotion_Engine.sce'); //=============================================================================================== function [datesdepJD, DeltaVLambert, minr_MC, minr_TC] = ... DVLambert(dZcjd, vdep_eme, posCubeSat_eme, vitCubeSat, deltaV) //_bs_ dimensions de datesdepJD ? on dirait que c'est une matrice (1xc) (!!!) [l,c]=size(vdep_eme); // new approach: vdep_eme is a single vector (c=1, but we keep the loop) for i=1:c [X_eclip, V_eclip, datebis, r_SC, r_TC, r_MC, r_ST, r_SM] = ... integrale(dZcjd, position_Z_eme, vdep_eme(:,i)); datesJD = CL_dat_convert("cjd", "jd", datebis'); datesdepJD(:,i) = datesJD(1,1); minr_MC(:,i) = min(r_MC); minr_TC(:,i) = min(r_TC); DeltaVLambert(:,i) = vdep(:,i) - (vitCubeSat+deltaV); DeltaVLambert_norm(:,i) = CL_norm(DeltaVLambert(:,i)); end endfunction //=============================================================================================== function [vdep] = ... arrivals_Mars(datecjdTTd, posCubeSat, datecjdTTa) //_bs_ To be documented // I: datecjdTTd: date of DeltaV to be applied (decimal date) // posCubeSat: position of Birdy at that time (3x1) // datecjdTTa: array of the arrival dates in decimal days (1xN) // O: vdep: 3xN vectors of the required DeltaV for each arrival date in Ecliptic J2000 dt = (datecjdTTa - datecjdTTd)*86400; // array of the transit durations in seconds [pos_mars_eod, vel_mars_eod] = CL_eph_planet("Mars", datecjdTTa, model="full"); [pos_mars_eme, vel_mars_eme] = CL_fr_convert("EOD","EME2000", datecjdTTa, pos_mars_eod, vel_mars_eod); pos_mars_eclip = Meme2eclip*pos_mars_eme; vel_mars_eclip = Meme2eclip*vel_mars_eme; [vdep, varr] = CL_man_lambert(posCubeSat, pos_mars_eclip, dt, mu=muSun); endfunction //=============================================================================================== //_bs_ (comments pendant debug 8/01/2015) // EOD2ICRS // ICRS2BCFSun // ICRS2BCFMars // ICRS2ECFTerre //_bs_ //frame change from EOD to ICRS function [ricrs,vicrs,jeod2icrs,Meod2icrs]=EOD2ICRS(reod,veod,tcjdtt,ttref) [ricrs,vicrs,jeod2icrs]=CL_fr_convert("EOD","ICRS",tcjdtt,reod,veod,tt_tref=ttref); Meod2icrs=jeod2icrs(1:3,1:3); endfunction //frame change from ICRS to equatorial Sun (BCF Sun) function [rbcfSun,vbcfSun,jicrs2bcfSun,Micrs2bcfSun]=ICRS2BCFSun(ricrs,vicrs,tcjdtt,ttref) [rbcfSun,vbcfSun,jicrs2bcfSun]=CL_fr_bodyConvert("Sun","ICRS","BCF",tcjdtt,ricrs,vicrs,tt_tref=ttref); Micrs2bcfSun=jicrs2bcfSun(1:3,1:3); endfunction //frame change from ICRS to equatorial Mars (BCF Mars) function [rbcfMars,vbcfMars,jicrs2bcfMars,Micrs2bcfMars]=ICRS2BCFMars(ricrs,vicrs,posMarsicrs,velMarsicrs,tcjdtt,ttref) ricrs_mars=ricrs-posMarsicrs;//position of the cubesat according to Mars ( MC MarsCubesat = SC-SM SunCubesat-SunMars ) vicrs_mars=vicrs-velMarsicrs;//velocity of the CubeSat according to Mars [rbcfMars,vbcfMars,jicrs2bcfMars]=CL_fr_bodyConvert("Mars","ICRS","BCF",tcjdtt,ricrs_mars,vicrs_mars,tt_tref=ttref); Micrs2bcfMars=jicrs2bcfMars(1:3,1:3); endfunction //frame change from ICRS to equatorial Earth (BCF Earth) function [recfTerre,vecfTerre,jicrs2ecfTerre,Micrs2ecfTerre]=ICRS2ECFTerre(ricrs,vicrs,posTerreicrs,velTerreicrs,tcjdtt,ttref) ricrs_Terre=ricrs-posTerreicrs;//position of the cubesat according to the Earth ( EC EarthCubesat = SC-SE SunCubesat-SunEarth ) vicrs_Terre=vicrs-velTerreicrs;//velocity of the CubeSat according to the Earth [recfTerre,vecfTerre,jicrs2ecfTerre]=CL_fr_convert("ICRS","ECF",tcjdtt,ricrs_Terre,vicrs_Terre,tt_tref=ttref); Micrs2ecfTerre=jicrs2ecfTerre(1:3,1:3); endfunction //===============================================================================================
6ab7d697fa8e30798422a1d8b1b440cbbb531c21
449d555969bfd7befe906877abab098c6e63a0e8
/503/CH5/EX5.2/ch5_2.sci
45b0164d30f0f5042dcfbde7fde52d8c4ea39c12
[]
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
541
sci
ch5_2.sci
// to find the frequency and phase and line voltages clc; n=375; //speed in rpm p=16; //no of poles f=n*p/120; disp(f,'freq(Hz)'); S=144; //no of slots c=10; //no of conductors/slot t=S*c/2; //no of turns ph=3; N_ph=t/ph; //no of turns/ph g=180*p/S; //slots angle m=S/(p*ph); //slots/pole/phase K_b=sind(m*g/2)/(m*sind(g/2)); //breadth factor phi=0.04; //flux per pole E_p=4.44*K_b*f*N_ph*phi; disp(E_p,'phase voltage(V)'); E_l=sqrt(3)*E_p; disp(E_l,'line voltage(V)');
c335f09995e65f40246efe393d5c70acc92a5491
449d555969bfd7befe906877abab098c6e63a0e8
/2384/CH9/EX9.7/ex9_7.sce
116f5f5ded4408d8241d68e3e76409f1b0529578
[]
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
379
sce
ex9_7.sce
// Exa 9.7 clc; clear; close; format('v',6) // Given data Rating = 150000;// in VA phi= acosd(0.8);// in ° Pcu = 1600;// in W Pi = 1400;// in W n = 1/4; // Total loss of 25% load totalloss = Pi + (n^2)*Pcu;// in W // efficiency of transformer of 25% load Eta = n*Rating*cosd(phi)/(n*Rating*cosd(phi)+Pi+n^2*Pcu)*100;// in % disp(Eta,"The efficiency in % is");
e5cc1e9a2ac5a9cdb5e087d3ec83d22e4bb8658a
449d555969bfd7befe906877abab098c6e63a0e8
/530/CH3/EX3.6/example_3_6.sce
1c235469ebbec7f0b961aae02a96cdcdd11c4737
[]
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
example_3_6.sce
clear; clc; // A Textbook on HEAT TRANSFER by S P SUKHATME // Chapter 3 // Thermal Radiation // Example 3.6 // Page 132 printf("Example 3.6, Page 132 \n\n") // This is a theoretical problem with no numerical data printf("This is a theoretical problem with no numerical data \n"); // Considering an elementary ring dA2 of width dr at an arbitary radius r, we have // r = h*tanB1 // dA2 = 2*%pi*r*dr // dA2 = 2*%pi*(h^2)*tan(B1)*sec^2(B1)*dB1 // B2 = B1, since surfaces ate parallel, and // L = h/cos(B1) // Substituting in eqn 3.6.7 // F12 = sin^2(a) printf("Considering an elementary ring dA2 of width dr at an arbitary radius r, we have \n"); printf("r = h*tanB1 \n"); printf("dA2 = 2*pi*r*dr \n"); printf("dA2 = 2*pi*(h^2)*tan(B1)*sec^2(B1)*dB1 \n"); printf("B2 = B1, since surfaces ate parallel, and \n"); printf("L = h/cos(B1) \n"); printf("Substituting in eqn 3.6.7 \n"); printf("F12 = sin^2(a) \n");
e71c2a2355e22b9f6c2beee783a7531b8bf24df2
449d555969bfd7befe906877abab098c6e63a0e8
/1133/CH2/EX2.5/Example2_5.sce
298f84ca9bac4ff9ffe76ca6943545256bd6086f
[]
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
638
sce
Example2_5.sce
//Example 2.5 clc disp("It is necessary to analyze each network to determine the critical frequency of the amplifier") disp("(a) Input RC Network") disp(" fc = 1 / 2*pi*R_in*C1") format(6) rin=(100*100)/(100+100) disp(rin,"where R_in(in M-ohm) = RG || R_in(gate) = RG || |VGS/IGSS| =") format(5) fc1=1/(2*%pi*50*10^6*0.001*10^-6) disp(fc1,"Therefore, fc(in Hz) =") disp("(b) Output RC Network") format(6) fc2=1/(2*%pi*(24.2*10^3)*(1*10^-6)) disp(fc2," fc(in Hz) = 1 / 2*pi*(RD+RL)*C2 =") disp("We have calculated two critical frequencies") disp("(a) fc(input) = 3.18 Hz") disp("(b) fc(output) = 6.577 Hz")
48896dc1668134647418dac60631bc1b36d2bca3
449d555969bfd7befe906877abab098c6e63a0e8
/3850/CH24/EX24.6/Ex24_6.sce
4d023bedd21b034271cf849a92f5f894cf706a70
[]
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
269
sce
Ex24_6.sce
//To calculate the relative humidity //Example 24.6 clear; clc; Pvap=12;//vapour pressure of air at 20 degree celsius SVP=17.5;//saturation vapour pressure at 20 degree celsius RH=Pvap/SVP;//relative humidity printf("Relative Humidity=%.2f",RH);
f51c0f6045e6fa89d080fa2e9027f8020f00648f
449d555969bfd7befe906877abab098c6e63a0e8
/69/CH2/EX2.1/2_1.sce
00acc8a482da006d7d3852931b54071918f757bc
[]
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
310
sce
2_1.sce
clear; clc; close; E = 10; //volts R = 500; //ohms Id = E/R; Vd = E; Vdq = 0.78; //volts Idq = 18.5*10^(-3);//Amperes Vr = Idq*R; diary('C:\Users\DELL\Desktop\intern\chapter_2\2_1.txt'); disp(Vdq,'Voltage at Q-point is :'); disp(Idq,'Current at Q-point is :'); disp(Vr,'Vr = ');
c5218fba1b86858ec059fa1087f5fba07d32c14f
c3a0e2a7a3a32ad4374793a62e548d1d3bedf245
/saReGAMaPa_Tunes.sce
b13c358a45521185558a08dd353b2679e0bf2174
[]
no_license
prachi416/Scilab
824ab1ae62b44b84f151b15b2d4994c4b1928a53
e2bc92cd723d1fe1e7f69fed3e1e4dfa58daaeee
refs/heads/master
2023-01-01T23:08:54.420417
2020-10-26T15:17:30
2020-10-26T15:17:30
294,625,279
0
0
null
null
null
null
UTF-8
Scilab
false
false
166
sce
saReGAMaPa_Tunes.sce
clc clear all freq=[240,254,302,320,358.5,380,451,470] fs=8000 no=8 n=1:4000 temp=[] for i =1:no y=sin(2*%pi*(freq(i)/fs)*n) temp=[temp y] end sound(temp,fs)
f80da3ce42c9e0ff7d7f5ba96442a78ccfb0d29f
449d555969bfd7befe906877abab098c6e63a0e8
/2090/CH9/EX9.9/Chapter9_example9.sce
6cf1cd47b386640914cf2f428007a025f6199d9b
[]
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,263
sce
Chapter9_example9.sce
clc clear //Input data bp=8;//The brake power of the petrol engine in kW nb=30;//The brake thermal efficiency in percent CV=44000;//The calorific value of the fuel in kJ/kg p1=1.013;//The suction condition of engine pressure in bar T1=300;//The temperature at suction condition in K Aj=2.5*10^-6;//The area of jet in m^2 Z=0.008;//The nozzle lip in m g=9.81;//The gravitational force constant in m/s^2 A=15;//The air fuel ratio Cda=0.9;//The coefficient of air flow Cdf=0.7;//The coefficient of fuel flow df=750;//The density of fuel in kg/m^3 pi=3.141;//The mathematical constant of pi va=0.8;//The specific volume of air in m^3/kg //Calculations va1=va*T1/273;//Specific volume of air at atmospheric pressure and 300K in m^3/kg da=1/va;//The density of air at inlet condition in kg/m^3 mf=bp/[(nb/100)*CV];//Mass flow rate of fuel in kg/s Cf=mf/(Cdf*df*Aj);//Velocity of fuel in m/s P=[(Cf^2*df)/2]+(df*g*Z);//The pressure drop in N/m^2 Ca=(2*P/da)^(1/2);//Velocity of air at the throat in m/s ma=mf*A;//The mass flow rate of air in kg/s A2=[ma/(Cda*da*Ca)]*10^4;//The area of the venturi in cm^2 d2=(A2*4/pi)^(1/2);//The diameter of venturi in cm //Output printf('The venturi throat diameter of the carburator = %3.2f cm ',d2)
bdb8a60047779b6b48378c1c49c5823bc60a1fb9
449d555969bfd7befe906877abab098c6e63a0e8
/545/CH3/EX3.9/ch_3_eg_9.sce
f60188e75d351a6d6ef9f2b5c596cbde4f44ea67
[]
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,111
sce
ch_3_eg_9.sce
clc disp("the soln of eg 3.9-->Chemical Reaction Equilibrium-2 Simultaneous Reactions") //let x1 and x2 be the reaction co-ordinate for 1st and 2nd reactions x1new=.9, x2new=.6,r1=1,r2=1 //assumed values Kp=1 //since P=1 atm K1=.574, K2=2.21 //given Kye1=K1, Kye2=K2 //at eqm. while r1>1e-6 & r2>1e-6, x1=x1new,x2=x2new, m_CH4=1-x1,m_H2O=5-x1-x2,m_CO=x1-x2,m_H2=3*x1+x2,m_CO2=x2 //moles of reactants and products at eqm. total=m_CO2+m_H2+m_CO+m_H2O+m_CH4 Ky1=m_CO*m_H2^3/(m_CH4*m_H2O*total^2) Ky2=m_CO2*m_H2/(m_CO*m_H2O) f1=Ky1-.574 //1st function in x1 and x2 f2=Ky2-2.21 //2nd function in x1 and x2 d3=((3*x1+x2)^2*(12*x1-8*x2))/((1-x1)*(5-x1-x2)*(6+2*x1)^2) d4=(3*x1+x2)^3*(x1-x2)*(8*x1^2+6*x1*x2-24*x1+2*x2-16) d5=((1-x1)^2)*((5-x1-x2)^2)*((6+2*x1)^3) df1_dx1=d3-(d4/d5) //df1/dx1- partial derivative of f1 wrt to x1 d6=3*(x1-x2)*((3*x1+x2)^2)-(3*x1+x2)^3 d7=(1-x1)*(5-x1-x2)*((6+x1*2)^2) d8=((x1-x2)*(3*x1+x2)^3)/((1-x1)*((5-x1-x2)^2)*(6+2*x1)^2) df1_dx2=(d6/d7)+d8 //df1/dx2- partial derivative of f1 wrt to x2 d9=(x1-x2)*(5-x1-x2) df2_dx1=3*x2/d9-(x2*(3*x1+x2)*(5-2*x1))/(d9^2) //df1/dx2- partial derivative of f1 wrt to x2 d10=(3*x1+2*x2)/d9 d11=x2*(3*x1+x2)*(2*x2-5)/(d9^2) df2_dx2=d10-d11 //df1/dx2- partial derivative of f1 wrt to x2 dm=df1_dx1*df2_dx2-df1_dx2*df2_dx1 delta_x1=(f2*df1_dx2-f1*df2_dx2)/dm delta_x2=(f1*df2_dx1-f2*df1_dx1)/dm x1new=x1+delta_x1 //updating the values of x1 & x2 x2new=x2+delta_x2 r1=abs(x1-x1new), r2=abs(x2new-x2) end disp(x2,x1,"the value of X1 and X2 respectively is"); m_CH4=1-x1,m_H2O=5-x1-x2,m_CO=x1-x2,m_H2=3*x1+x2,m_CO2=x2 //moles of reactants and products at eqm. total=m_CO2+m_H2+m_CO+m_H2O+m_CH4 disp(m_CO2,m_H2,m_CO,m_H2O,m_CH4,"the moles at eqm of CH4,H2O,CO,H2,CO2 are") disp(total,"total number of moles at eqm. is")
578d04da05186b2eec4a109b1626942084f0d1fc
449d555969bfd7befe906877abab098c6e63a0e8
/2873/CH4/EX4.12/Ex4_12.sce
a6abe5acf59c83f6594dc0e1d36a6697e799a9d8
[]
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,406
sce
Ex4_12.sce
// Display mode mode(0); // Display warning for floating point exception ieee(1); clear; clc; disp("Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12") W=840;//work done by reservoir in KJ disp("let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below") disp("thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1") disp("Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2") disp("Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3") disp("substituting Q1_a and Q1_b in eq 1") disp("4*Q2/3+2*Q3=5000...............eq4") disp("also from total work output,Q1_a+Q1_b-Q2-Q3=W") disp("5000-Q2-Q3=840") disp("so Q2+Q3=5000-840=4160") disp("Q3=4160-Q2") disp("sunstituting Q3 in eq 4") disp("4*Q2/3+2*(4160-Q2)=5000") disp("so Q2=(5000-2*4160)/((4/3)-2) in KJ") Q2=(5000-2*4160)/((4/3)-2) disp("and Q3=4160-Q2 in KJ") Q3=4160-Q2 disp("here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:") disp("Q2=4980 KJ,from heat engine") disp("Q3=820 KJ,to heat engine")
f51fee93b4a458a699f155a1b24b0dec3d52dd3f
6b7b3be3c11fc662ae3f0b3e8880218ce3888a07
/math/SciLab/%ZQuat_r_s.sci
2cd9fb06d632892bcb948e69437ef47da74d25d9
[]
no_license
johnzet/Flight
27cfa7dc8039f6c7b91385d9e204ad4a54248960
2893750df8aaa38311ffc125b1f7dcc9f5019eab
refs/heads/main
2023-02-25T19:51:03.725205
2021-01-31T01:12:09
2021-01-31T01:12:09
334,544,210
0
0
null
null
null
null
UTF-8
Scilab
false
false
180
sci
%ZQuat_r_s.sci
function [q2] = %ZQuat_r_s(q1,a) N1 = size(q1); sa = size(a); if (sa(1) > 1 | (N1 > 1 & sa(2) > 1)) error("Invalid arguments sizes"); end q2 = q1 * (1 ./ a); endfunction
45e52a4ecc2ab90476cc641eaa41f7e35913cb6c
449d555969bfd7befe906877abab098c6e63a0e8
/3472/CH10/EX10.21/Example10_21.sce
61ad2aa03aa63bce7a8a2bcfc358a35bac89394b
[]
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,509
sce
Example10_21.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 3: STEADY STATE CHARACTERISTICS AND PERFORMANCE OF TRANSMISSION LINES // EXAMPLE : 3.21 : // Page number 153 clear ; clc ; close ; // Clear the work space and console // Given data V_r = 132.0*10**3 // Line voltage at receiving end(V) P_L = 45.0*10**6 // Load delivered(VA) PF_r = 0.8 // Lagging power factor A = 0.99*exp(%i*0.3*%pi/180) // Constant B = 70.0*exp(%i*69.0*%pi/180) // Constant(ohms) C = A // Constant D = 4.0*10**-4*exp(%i*90.0*%pi/180) // Constant // Calculations E_r = V_r/3**0.5 // Receiving end phasemag voltage(V) I_r = P_L/(3**0.5*V_r)*exp(%i*-acos(PF_r)) // Line current(A) E_s = A*E_r+B*I_r // Sending end voltage(V) E_s_llkV = 3**0.5*E_s/1000.0 // Sending end line voltage(kV) I_s = C*I_r+D*E_r // Sending end current(A) angle_Er_Es = phasemag(E_s) // Angle between E_r and E_s(°) angle_Er_Is = phasemag(I_s) // Angle between E_r and I_s(°) angle_Es_Is = angle_Er_Es-angle_Er_Is // Angle between E_s and I_s(°) PF_s = cosd(angle_Es_Is) // Sending end power factor P_s = 3*abs(E_s*I_s)*PF_s // Sending end power(W) P_skW = P_s/1000.0 // Sending end power(kW) P_r = P_L*PF_r // Receiving end power(W) n = P_r/P_s*100 // Transmission efficiency(%) // Results disp("PART II - EXAMPLE : 3.21 : SOLUTION :-") printf("\nCase(i) : Sending end voltage, E_s = %.1f∠%.f° kV (line-to-line)", abs(E_s_llkV),phasemag(E_s_llkV)) printf("\nCase(ii) : Sending end current, I_s = %.1f∠%.1f° A", abs(I_s),phasemag(I_s)) printf("\nCase(iii): Sending end power, P_s = %.f kW", P_skW) printf("\nCase(iv) : Efficiency of transmission = %.2f percent \n", n) printf("\nNOTE: Changes in obtained answer from that textbook is due to more precision")
e315c28d972744e8b7e39aaeb1ab3eb385c3a301
449d555969bfd7befe906877abab098c6e63a0e8
/1415/CH1/EX1.2.3/ex3.sce
81c171e8e19823c3f259d709e748a2879ce285b1
[]
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
773
sce
ex3.sce
//Example 3 Page no 60 clc clear //creating function function q=f(p) q=77.8*p^(-0.11) endfunction disp('a)') //plotting demand function disp('the demand curve is as in the graph') p=([200 400 500 800 1200 1600 2000 2200]) y=f(p) plot(2400,50,p,y,'blue')//plotting graph disp('b)') //the demand at tuition costs of $1000 and $1500 disp('the demand at tuition costs of $1000 and $1500') q=f(1000)//funcition calling mprintf("\t%f thousand students\n",q) q=f(1500)//funcition calling mprintf("\t%f thousand students\n",q) //the change in demand is therefore given as disp('the change in demand is therefore given as') change=(f(1500)-f(1000))//funcition calling mprintf("\t%f thousand students\n",change) xtitle('Technology formula','p','q');
457c061eb8fee9665763bd80c260f2aa7b01e6f3
449d555969bfd7befe906877abab098c6e63a0e8
/2252/CH17/EX17.7/Ex17_7.sce
eaac3e66eef29999410e250b72e609139180e4d4
[]
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
468
sce
Ex17_7.sce
//calculating terminal voltage P=10D+3//load supplied Vl=220//voltage at load terminals Il=P/Vl R=.1//resistance of feeders Vd=Il*R//voltage drop on feeders V=Vd+Vl mprintf("Terminal voltage across the armature terminals=%f V\n",V) //Calculating shunt field current Rsh=100//shunt resistance Ish=V/Rsh mprintf("Shunt field current=%f A\n",Ish) //Calculating generated emf Ra=.05//resistance of armature Eg=V+Il*Ra mprintf("Generated emf Eg=%f V",Eg)
aa46ae1ceba62385609a77287e99486645b907e5
449d555969bfd7befe906877abab098c6e63a0e8
/1268/CH8/EX8.2/8_2.sce
607dcee41f27d977a05722834e415c6732e3ba39
[]
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
367
sce
8_2.sce
clc; disp("Example 8.2") U=1.5 // in m/s d=0.025 // in m density= 1000 // in kg/m^3 mew=0.001 // in kg/ms Re=d*density*U/mew f=0.079/(Re^0.25) l=25 // length of the pipe in m delP=2*f*density*U*U*l/d h1=delP/(density*9.81) disp(h1,"Head loss is ") h2=15 h=h1+h2 flow=%pi*d*d*U*density/4 power=flow*h*9.81 disp(power,"Theoretical Power required is ")
08e4b5873aef4a056da9a919c5f2653056d80ad8
449d555969bfd7befe906877abab098c6e63a0e8
/243/CH12/EX12.8/12_08.sce
cc5daf5a79553eb8de27fe0324bb7e30aa0c51ba
[]
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
214
sce
12_08.sce
//Example No. 12_08 //Two Point Gauss -Legedre formula //Pg No. 397 clear ;close ;clc ; deff('F = f(x)','F = exp(x)'); x1 = -1/sqrt(3) x2 = 1/sqrt(3) I = f(x1) + f(x2) disp(I,'I = ',x2,'x2 = ',x1,'x1 = ')
d6fce36b3c8507548daac237f1cfcab6b12217a3
449d555969bfd7befe906877abab098c6e63a0e8
/3753/CH3/EX3.1/Ex3_1.sce
d9c0b21a9b4ea2e71f0b8cc0d2182af37b9981d7
[]
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
465
sce
Ex3_1.sce
//Example number 3.1, Page number 3.32 // importing modules clc;clear;close // Variable declaration V=2265 // m^3 A=92.9 // Coefficient x=2 // The absorption become 2*A of open window // Calculation T=(0.16*V)/A // Sabine's formula T2=(0.16*V)/(x*A) // in s // Result printf("Reverbration time = %0.1f s",T) printf("\nFinal Reverbration time = %0.2f s",T2) printf("\nThus the reverbration time is reduced to one-half of its initial value")
8870163d36028da84ebd3eefc627af8b781c20ba
c13eed281cf8afcd0d9c179cf3e5aa1d18f3209d
/nequest theorem.sce
41f45c903c223cf7fb8733a01f98aecdbfc12559
[]
no_license
diagovi/nequeat-theorem
38b6f3bec5e6585296839c4d4cff0f5e877c4599
3c57359fe09bd525b1d249272d150e4455308341
refs/heads/main
2023-01-06T03:48:00.742402
2020-10-31T06:24:46
2020-10-31T06:24:46
307,386,556
0
1
null
2020-10-31T06:24:47
2020-10-26T13:45:31
Scilab
UTF-8
Scilab
false
false
3,125
sce
nequest theorem.sce
// To verify the sampling theorm //clear variables if any clear //close any graph window close //clear console clc // to get the freq. and amplitude of signals n1 = input('Enter the number of signals = '); //amplitude for j = 1:n1 a(j) = input("Enter amplitude of the "+string(j)+" signal = "); end; //frequency for j = 1:n1 f(j) = input("Enter frequency of the "+string(j)+" signal = "); end; t = 0:0.001:1; // time index // calculating x(t) = a1coswt + a2coswt +........ // w = 2XpiXf xt = 0; for j = 1:n1 xt = xt + a(j)*cos(2*%pi*f(j)*t); end; //control many aspects of displaying Scilab graphics figure //selecting 1 in 4 row 1 column subplot(411) // plotting the x(t) plot(t,xt) //lables for plot xlabel("time in sec"); ylabel("Amplitude"); title("Signal that has to be sampled"); //setting the axis to origin aa1 = gca(); // get the current axes aa1.x_location = 'origin'; //set x axis to origin--0 aa1.y_location = "origin"; //set y axis to origin--0 //Nyquist theorem applicable //sampling frequency: > maxF or 2(maxF) fs = input('Enter sampling frequency greater than twice the maximum frequency of inputs = '); //time period T = 1/fs; //no of divisions n = 0:fs; nT = n*T; //finding and plotting the x(n) xn = 0; for j = 1:n1 xn = xn + a(j)*cos(2*%pi*f(j)*nT); end; subplot(412) plot2d3(n,xn) //lables for plot xlabel("sampling number"); ylabel("Amplitude"); title("sampled signal in discrete form"); //setting the axis to origin aa2 = gca(); // get the current axes aa2.x_location = 'origin'; //set x axis to origin--0 aa2.y_location = "origin"; //set y axis to origin--0 //Nyquist theorem applicable //sampling frequency: = 2(maxF) fs = input('Enter sampling frequency equal to twice the maximum frequency of inputs = '); //time period T = 1/fs; //no of divisions n = 0:fs; nT = n*T; //finding and plotting the x(n) xn = 0; for j = 1:n1 xn = xn + a(j)*cos(2*%pi*f(j)*nT); end; subplot(413) plot2d3(n,xn) //lables for plot xlabel("sampling number"); ylabel("Amplitude"); title("sampled signal in discrete form"); //setting the axis to origin aa3 = gca(); // get the current axes aa3.x_location = 'origin'; //set x axis to origin--0 aa3.y_location = "origin"; //set y axis to origin--0 ////Nyquist theorem not applicable //sampling frequency: < 2(maxF) fs = input('Enter sampling frequency less than twice the maximum frequency of inputs = '); //time period T = 1/fs; //no of divisions n = 0:fs; nT = n*T; //finding and plotting the x(n) xn = 0; for j = 1:n1 xn = xn + a(j)*cos(2*%pi*f(j)*nT); end; subplot(414) plot2d3(n,xn) //lables for plot xlabel("sampling number"); ylabel("Amplitude"); title("sampled signal in discrete form"); //setting the axis to origin aa4 = gca(); // get the current axes aa4.x_location = 'origin'; //set x axis to origin--0 aa4.y_location = "origin"; //set y axis to origin--0 mprintf("a signal can be exactly reproduced if it is sampled at the rate fs which is greater than twice the maximum frequency of inputs")
59b40b91aaf8549940cb948dbef1171ac02b9fc1
449d555969bfd7befe906877abab098c6e63a0e8
/2168/CH23/EX23.9/Chapter23_example9.sce
ef8ef0bd2d13b8a81b64aa5f0feb2038d0f7ef06
[]
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,314
sce
Chapter23_example9.sce
clc clear //Input data d=27//Diameter in cm l=45//Stroke in cm db=1.62//Effective diameter of the brake in m t=(38*60+30)//Test duration in sec CV=4650//Calorific value in kcal/m^3 at N.T.P n=8080//Total no. of revolutions en=3230//Total number of explosions p=5.75//Mean effective pressure in kg/cm^2 V=7.7//Gas used in m^3 T=15+273//Atmospheric temperature in K pg=135//pressure of gas in mm of water above atmospheric pressure hb=750//Height of barometer in mm of Hg L=92//Net load on brake in kg w=183//Weigh of jacket cooling water in kg Tc=47//Cooling water temperature rise in degree C //Calculations ihp=(p*(l/100)*(3.14/4)*d^2*en)/(4500*(t/60))//I.H.P in h.p bhp=(L*3.14*db*n)/(4500*(t/60))//B.H.P in h.p pa=(hb+(pg/13))//Pressure of gas supplied in mm of Hg Vg=(V*(273/T)*(pa/760))//Volume of gas used at N.T.P in m^3 q=(Vg*CV)/(t/60)//Heat supplied per minute in kcal qbhp=(bhp*4500)/427//Heat equivalent of B.H.P in kcal/min qc=(w/(t/60))*Tc//Heat lost to jacket cooling water in kcal/min qra=(q-(qbhp+qc))//Heat lost to exhaust, etc in kcal/min //Output printf('Heat supplied is %3.1f kcal/min \n Heat equivalent of B.H.P is %3.0f kcal/min \n Heat lost to jacket cooling water is %3.1f kcal/min \n Heat lost to exhaust radiation etc. is %3.1f kcal/min',q,qbhp,qc,qra)
76a5f838965300172fced5a29c32e06908abfd05
449d555969bfd7befe906877abab098c6e63a0e8
/409/CH27/EX27.3/Example27_3.sce
b639cb0be38a90dd94c2ae7ab46f27d1a7cd41bf
[]
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
587
sce
Example27_3.sce
clear ; clc; // Example 27.3 printf('Example 27.3\n\n'); //page no. 845 // Solution // Given p_plant = 20 ;// Power generated by plant-[MW] h = 25 ;// Height of water level - [m] V = 100 ;// Flow rate of water -[cubic metre/s] d_water = 1000 ;// Density of water - [ 1000 kg / cubic metre] g = 9.807 ;// Acceleration due to gravity-[m/square second] M_flow = V*d_water ;// Mass flow rate of water -[kg/s] del_PE = M_flow*g*h ;// Potential energy change of water per second -[W] eff = (p_plant*10^6) /(del_PE) ;// Efficiency of plant printf(' Efficiency of plant is %.2f .\n',eff) ;
9134c8546e37b29fe0a44faa9f5f3ce2c1e18764
e806e966b06a53388fb300d89534354b222c2cad
/macros/rotationVectorToMatrix.sci
abe97f9a4c6b1711572fc9583215e11494345b5c
[]
no_license
gursimarsingh/FOSSEE_Image_Processing_Toolbox
76c9d524193ade302c48efe11936fe640f4de200
a6df67e8bcd5159cde27556f4f6a315f8dc2215f
refs/heads/master
2021-01-22T02:08:45.870957
2017-01-15T21:26:17
2017-01-15T21:26:17
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
508
sci
rotationVectorToMatrix.sci
function [ matrix ] = rotationVectorToMatrix(vector) // Returns rotation matrix. // // Calling Sequence // matrix = rotationVectorToMatrix(vector); // // Parameters // matrix: rotation matrix // vector: 3-D rotation vector // // Description // Converts rotation vector to rotation matrix. // // Examples // vector = pi/4 * [1, 2, 3]; // matrix = rotationVectorToMatrix(vector); // // Authors // Tanmay Chaudhari a=opencv_rotationVectorToMatrix(vector); matrix(:,:,1)=a(1); endfunction
48bc5a050a8823c3502e6e2359a60f84cd2b981c
f23cac45e0a1e3e9444fd3bb8e11d56a5be97cf8
/holding.sci
c3bdee38a75c02a1ab9e6e56c2a90186cb884f5e
[]
no_license
paulaperdigaoram/YOGURT
4cd805bfb9a06630fba0d990ad7edbbf3786903b
fc95ba5408e085c91bca2a04084fc36b2ea39f95
refs/heads/master
2020-03-22T07:56:53.718648
2018-08-23T17:31:35
2018-08-23T17:31:35
139,734,779
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,071
sci
holding.sci
function o = holding(i) //Datos de entrada Mini = i(5) T = i(7) // ºC //Parámetros D1211m = 0.05; //s Zm = 10; //ºC //Resolución del modelo xini = Mini; tfin = 300; dt = 0.01; // s t=0:dt:tfin; x = ode(xini,0,t,odeholding); M = x; Mfin = x($) //Graficación scf(3); clf(3); plot2d('nl',t,M,2) xgrid; xtitle('HOLDING','t, s','M') xset('font',2,2); // modificación grosor de las líneas xset('wpos',[300,0]); //fija la posición de la ventana en pantalla f=gcf(); f.children.children(1).children.thickness = 2; a = get('current_axes'); a.y_label.font_size = 2; //Aumento del tamaño de fuente a.x_label.font_size = 2; a.title.font_size = 4; a.y_label.font_style = 8; a.x_label.font_style = 8; a.title.font_style = 4; //Salidas de la función o(1) = i(1) o(2) = i(2) o(3) = i(3) o(4) = i(4) o(5) = Mfin o(6) = i(6) o(7) = i(7) endfunction
f13b8f527942a8e0ac86aa91121511f643654f92
3cbee2296fd6b54f80587eead83813d4c878e06a
/sci2blif/rasp_design_added_blocks/Hyst_diff.sce
2ff4e0a67557ba23314fe7bf4d9a03e192e68a87
[]
no_license
nikhil-soraba/rasp30
872afa4ad0820b8ca3ea4f232c4168193acbd854
936c6438de595f9ac30d5619a887419c5bae2b0f
refs/heads/master
2021-01-12T15:19:09.899590
2016-10-31T03:23:48
2016-10-31T03:23:48
71,756,442
0
0
null
2016-10-24T05:58:57
2016-10-24T05:58:56
null
UTF-8
Scilab
false
false
82
sce
Hyst_diff.sce
style.displayedLabel="Hyst_diff" pal5=xcosPalAddBlock(pal5,"Hyst_diff",[],style);
d17307ab3b29e406ed2226dc4e74fceebc1c5d2a
bd1c6c9cddf020f43e361b17ddf9ecd803d20f82
/BN/code/testes_1/resultado.tst
30fdd065a9544b1933098f4c33db3e8c2261c711
[]
no_license
drohobytskyy/C
04f66acb410f4a044d2d4c4a2c358e0ae19271ee
073ac49322cfca0aa42fa7f7019666dcf5227bef
refs/heads/master
2021-01-22T03:23:39.283301
2017-02-06T19:42:16
2017-02-06T19:42:16
81,118,496
0
0
null
null
null
null
UTF-8
Scilab
false
false
115
tst
resultado.tst
V_01 no V_02 ok V_03 no V_04 ok V_05 no V_06 no V_07 no D_01 no D_02 no e_01 ok l_01 ok E1_01 no E2_01 ok E3_01 no
4cde9f1b151ce6478d1bcaac464ae9d751be80ba
449d555969bfd7befe906877abab098c6e63a0e8
/2273/CH9/EX9.12/ex9_12.sce
2433135171721cd14d42754d2f675a557160ecbb
[]
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
196
sce
ex9_12.sce
//Calculate the charging current clear; clc; //soltion //given C3=(0.4*10^-6)*5;//farad Vph=11*10^3/sqrt(3); f=50;//Hz Cn=2*C3; Ic=2*%pi*f*Vph*Cn; printf("Charging current= %.2f A",Ic)
302cad9126ab435428d70e9dbf2605ac5149ae68
449d555969bfd7befe906877abab098c6e63a0e8
/2195/CH2/EX2.3.2.e/ex_2_3_2_e.sce
2bfa38e646c29e23c634535b4be0ddc95daec291
[]
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
229
sce
ex_2_3_2_e.sce
//Example 2.3.2.e: % error clc; clear; close; //given data : Ae=80;// in V Am=79;// in V e=Ae-Am; f=100;//full scale deflection error1=(e/Ae)*100; A=(1-abs(e/Ae)); accuracy=A*100; P_error=(e/f)*100; disp(P_error,"% error(%) = ")
9bd0201b991fb5f9c956f7bc0f8294394bb79126
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.4/Unix-Windows/scilab-2.4/macros/util/menubar.sci
9d175b0c24e8023b4c910c2b4a79ecee91808913
[ "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
212
sci
menubar.sci
function menubar(win,menus) // Copyright INRIA names=menus(1) for k=size(names,'*'):-1:1 delmenu(win,names(k)) end for k=1:size(names,'*') addmenu(win,names(k),menus(k+1),list(0,names(k))) end datas=[]
1f3da2492720d9e3cdd56e5f2d827f8c72f105f8
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/lpc/lpc3.sce
dea239eb4466dfb6c30d0139b32e7cd19654bda4
[]
no_license
deecube/fosseetesting
ce66f691121021fa2f3474497397cded9d57658c
e353f1c03b0c0ef43abf44873e5e477b6adb6c7e
refs/heads/master
2021-01-20T11:34:43.535019
2016-09-27T05:12:48
2016-09-27T05:12:48
59,456,386
0
0
null
null
null
null
UTF-8
Scilab
false
false
307
sce
lpc3.sce
//i/p arg p has a length greater than the length of i/p arg x x=[1 2 3 4 6 7 89 0]; p=9; [a,g] = lpc(x,p); disp(a); disp(g); //output //!--error 53 //lpc: Wrong value for argument #2 (p): Must be less than the length of the signal vector //at line 106 of function lpc called by : //[a,g] = lpc(x,p);
70c3e12f484adefe6deef14d53cc8c6ff92911ec
449d555969bfd7befe906877abab098c6e63a0e8
/620/CH8/EX8.2/example8_2.sce
710e5d7dc23a7d8fccc88ed0beacbe7e7f69a147
[]
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
291
sce
example8_2.sce
a=3; p1=0.84; p2=0.96; i=50*10^(-3); disp("Part a"); c1=a*p1; t1=c1/i; disp("the length of time (in h) for which the cell can deliver current is"); disp(t1); disp("Part b"); c2=a*p2; t2=c2/i; disp("the length of time (in h) for which the cell can deliver current is"); disp(t2);
e715bbd2aa550c6ea50103f65c995748a27589e6
4e7aac39f36916a964f4664f3198d7c87e762253
/scilab/est_est.sce
f6adefe30eed116526d1d8f831bc5dd90db1165b
[]
no_license
kirillin/manipulator_dynamics
349c01fd5aef8b42734edc497a7d48ee49aced9c
a773091ea5a62493b77885a0e2df6491282faa4c
refs/heads/master
2021-10-22T13:15:09.489858
2019-03-10T23:00:56
2019-03-10T23:00:56
108,987,774
1
0
null
null
null
null
UTF-8
Scilab
false
false
411
sce
est_est.sce
std_dev = stdev(Chi, 'c', mean(Chi,'c')); disp([mean(Chi,'c'), std_dev]); t = Symbol('t') q_1 = Function('q_1')(t) theta_1 = Function('theta_1')(q_1) #q_1 = Symbol('q_1') dq_1 = diff(q_1, t) L = sin(theta_1)**2 * dq_1 dL_Ddq = diff(L, dq_1).doit() dLdq_Dt = diff(dL_Ddq, t).doit() dL_Dq = diff(L, q_1).doit() opL = dLdq_Dt - dL_Dq diff(theta_1, q_1) Subs(Derivative(theta_1(_xi_2), _xi_2), (_xi_2), (q_1(t)))
2da3c9d5e3d22fc2a398d5d7b622be6b2bf4f72e
449d555969bfd7befe906877abab098c6e63a0e8
/273/CH24/EX24.5/ex24_5.sce
6907c4e8b995a98c71f7e34fe0672cc655c7892f
[]
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
ex24_5.sce
clc;clear; //Example 24.5 //calculation of numerical aperture and maximum acceptance angle //given values n=1.480;//core refractive index u=1.47;//index of glass l=850*10^-9;//wavelength of light V=2.405;//V-number //calculation r=V*l/sqrt(n^2-u^2)/%pi/2;//in m disp(r*10^6,'core radius in micrometre is'); N=sqrt(n^2-u^2); disp(N,'numerical aperture is'); alpha=asin(N)*180/%pi; disp(alpha,'max acceptance angle is');
b9e5084d293936f4e84fdbe1b56275e8f3f037e6
d153e998690566a383b3cb700294956d3753b364
/Scilab/piEuller.sce
333f649bfceffdf37bb9a7c361a7b43a9f0143de
[]
no_license
rayssalourrane/TPFINAL-CN
dc2c2211538fb36a7446c3ef0017a104b2375f87
ec7d83a359c4ed85a65cefad0d69472955b467ca
refs/heads/master
2020-06-18T09:25:39.181310
2019-07-11T18:45:14
2019-07-11T18:45:14
196,251,580
1
5
null
2019-07-11T13:29:08
2019-07-10T17:53:28
Java
UTF-8
Scilab
false
false
253
sce
piEuller.sce
tic(); t=100; soma = 0.0; for i=1:1:t soma =0.0; for j=1:1:10000 soma = soma + 1.0/(j * j); end end t = toc(); disp(t); disp(soma,"Pi : "); disp((3.1415^2)/6, "Pi Correto: ");
fc5a872d5c2ed21cdba0ef2660da251ff490fa1f
449d555969bfd7befe906877abab098c6e63a0e8
/2213/CH4/EX4.23/ex_4_23.sce
5e4929b8186b048db73a4a8dae09829ddc9870b7
[]
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
409
sce
ex_4_23.sce
//Example 4.23//average illumination clc; clear; close; format('v',5) dp=1.2;//depreciation factor uf=0.6;//utiliazation factor l=15;// in meters b=6;// in meters n=20;// no. of lamps lw=250;// mscp in watts a=l*b;//arean in m^2 tl=n*lw*4*%pi;///total lumens lwp=((tl*uf)/dp);//lumens reaching on the working plane e=lwp/a;//illumination on working plane in lux disp(e,"illumination on working plane in lux")
99cb286d200296a7796348c6bfd5268aa9c5da0b
449d555969bfd7befe906877abab098c6e63a0e8
/3014/CH3/EX3.2/Ex3_2.sce
94ec1ffef9471de1be99673135c888f5802ad7ef
[]
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
538
sce
Ex3_2.sce
clc //given that lambda = 0.3 // Wavelength in angstrom d = 0.5 // crystal spacing in angstrom n = 2 // order m = 3 // order printf("Example 3.2") theta_n = asin(n*lambda/(2*d))*180/%pi // Calculation of angle for order n theta_m = asin(m*lambda/(2*d))*180/%pi // Calculation of angle for order m printf("\nAngle for %dnd order maxima is %f degree. ",n,theta_n) printf("\nAngle for %drd order maxima is %f degree. \n\n\n",m,theta_m) // Answers in book are 40.97 degree and 72.29 degree which are due to wrong calculation
f28d7767c3ebf259dc8a2c99b6f1e630604fe948
3592fbcb99d08024f46089ba28a6123aeb81ff3c
/src/control/controlHumanWalker.sci
098bdeb66cdffd3e4c56b06702568f50beb8c923
[]
no_license
clairedune/sciGaitanLib
a29ab61206b726c6f0ac36785ea556adc9ef03b9
7498b0d707a24c170fc390f7413359ad1bfefe9f
refs/heads/master
2020-12-11T01:51:13.640472
2015-01-28T13:52:26
2015-01-28T13:52:26
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
10,679
sci
controlHumanWalker.sci
//----------------------------------------------// // ApplyConstraintWalker //----------------------------------------------// function [qnew] = applyConstraintsWalker(q,d,dt,tol, yDes_06) // starting from a set of articular position q // find a new position qnew that garanty that the walker touch // the ground. d1=d(1); d2=d(2); d3=d(3); d4=d(4); d5=d(5); d6=d(6); dh=d(7);dw=d(8); q1=q(1); q2=q(2); q3=q(3); q4=q(4); q5=q(5); q6=q(6); // position courante de l'effecteur [M_01, M_12, M_23, M_34, M_45, M_56, A_0, B_0, C_0, P_0] = computeMGDsagitalMan(d,q); M_06=M_01*M_12*M_23*M_34*M_45*M_56; posEffecteur = pFromHomogeneousMatrix(M_06); pos_06 = [posEffecteur(1);posEffecteur(6)]; // posDes_06 = [dh; yDes_06; %pi/2]; posDes_06 = [dh; %pi/2]; // descente du gradient pour trouver q tel que P=Pdes errPos_06 = pos_06-posDes_06; qprec = q'; lambda = 0.6; errVect = [errPos_06]; i=0; while (norm(errPos_06)>tol) //disp(i) // disp(errPos_06) //disp(norm(errPos_06)); J1 = computeJ06SagMan(d,qprec); J1=[J1(1,:);J1(3,:)]; dotq = -lambda*pinv(J1)*errPos_06; qnew= qprec+dt*dotq; [M_01, M_12, M_23, M_34, M_45, M_56, A_0, B_0, C_0, P_0] = computeMGDsagitalMan(d,qnew); M_06=M_01*M_12*M_23*M_34*M_45*M_56; posEffecteur = pFromHomogeneousMatrix(M_06); pos_06 = [posEffecteur(1);posEffecteur(6)]; //update qprec=qnew; errPos_06 = pos_06-posDes_06; errVect= [errVect errPos_06]; i=i+1; end endfunction //----------------------------------------------// // ApplyConstraintWalker //----------------------------------------------// function [qnew] = applyConsAndLimits(q,d,qlimit,dt,tol) //// starting from a set of articular position q // // find a new position qnew that garanty that the walker touch // // the ground. d1=d(1); d2=d(2); d3=d(3); d4=d(4); d5=d(5); d6=d(6); dh=d(7);dw=d(8); q1=q(1); q2=q(2); q3=q(3); q4=q(4); q5=q(5); q6=q(6); // position courante de l'effecteur [M_01, M_12, M_23, M_34, M_45, M_56, A_0, B_0, C_0, P_0] = computeMGDsagitalMan(d,q); M_06=M_01*M_12*M_23*M_34*M_45*M_56; posEffecteur = pFromHomogeneousMatrix(M_06); //pos_06 = [posEffecteur(1:2);posEffecteur(6)]; // posDes_06 = pos_06; pos_06 = [posEffecteur(1);posEffecteur(6)]; // posDes_06 = [dh; yDes_06; %pi/2]; posDes_06 = [dh; %pi/2]; // descente du gradient pour trouver q tel que P=Pdes er1 = pos_06-posDes_06; qprec = q'; lambda =1; lambda2 = 1; errVect = [er1]; i=0; marge = 10*%pi/180; while (norm(er1)>tol) // ------ Tache 1 hauteur de la main ------ // J1 = computeJ06SagMan(d,qprec); J1=[J1(1,:);J1(3,:)]; dotq1 = -lambda*pinv(J1)*er1; //disp(dotq1) //projecteur Proj1 = (eye(6,6)-pinv(J1)*J1); // ----- Tache 1 eloignement des butees ----// // matrice d'activation de la tache primaire A=zeros(6,6); B=zeros(6,6); for k=1:6 if (qprec(k)<(qlimit(1,k)+marge) )// FIXME Attention angle a remettre entre -pi et pi A(k,k)=1; elseif (qprec(k)>(qlimit(2,k)-marge)) B(k,k)=1; end end // Jacobien J2 = A+B; // Erreur er2 = A*((qprec-qlimit(1,:)')/marge)+B*((qprec-qlimit(2,:)')/marge); // Loi de commande robuste //dotq2 = -lambda2*Proj1*pinv(J2)*er2 //loi de commande exacte dotq2 = -lambda2*pinv(J2*Proj1)*(er2-J2*pinv(J1)*er1); //disp(dotq2) // -------- Synthese tache 1 et 2 ----------// qnew= qprec+dt*(dotq2+dotq1); [M_01, M_12, M_23, M_34, M_45, M_56, A_0, B_0, C_0, P_0] = computeMGDsagitalMan(d,qnew); M_06=M_01*M_12*M_23*M_34*M_45*M_56; posEffecteur = pFromHomogeneousMatrix(M_06); // pos_06 = [posEffecteur(1:2);posEffecteur(6)]; pos_06 = [posEffecteur(1);posEffecteur(6)]; //-----------update-----------// qprec=qnew; er1 = pos_06-posDes_06; errVect= [errVect er1]; i=i+1; //// le robot est un robot plan sur xy //sommets=[zeros(4,1) P_0 A_0 C_0 A_0 P_0(:,$) B_0]; // y = sommets (1,:); // x = sommets (2,:); // plot(x,y,'y-.'); // show_pixmap() // pause end endfunction //----------------------------------------------// // ApplyConstraintWalker //----------------------------------------------// function [qnew] = applyLimitsandConst(q,d,qlimit,dt,tol) //// starting from a set of articular position q // // find a new position qnew that garanty that the walker touch // // the ground. qnew=q; d1=d(1); d2=d(2); d3=d(3); d4=d(4); d5=d(5); d6=d(6); dh=d(7);dw=d(8); q1=q(1); q2=q(2); q3=q(3); q4=q(4); q5=q(5); q6=q(6); // position courante de l'effecteur [M_01, M_12, M_23, M_34, M_45, M_56, A_0, B_0, C_0, P_0] = computeMGDsagitalMan(d,q); M_06=M_01*M_12*M_23*M_34*M_45*M_56; posEffecteur = pFromHomogeneousMatrix(M_06); //pos_06 = [posEffecteur(1:2);posEffecteur(6)]; // posDes_06 = pos_06; pos_06 = [posEffecteur(1);posEffecteur(6)]; // posDes_06 = [dh; yDes_06; %pi/2]; posDes_06 = [dh; %pi/2]; // descente du gradient pour trouver q tel que P=Pdes er2 = pos_06-posDes_06; qprec = q'; lambda =0.5; lambda2 = 0.6; er1=er2; errVect = [er2]; i=0; qdot1Vect=[]; qdot1et2Vect=[]; marge = 10*%pi/180; while (norm(er2)>tol ) //disp('-----') //disp(i) // ----- Tache 1 eloignement des butees ----// // matrice d'activation de la tache primaire A=zeros(6,6); B=zeros(6,6); for k=1:6 if (qprec(k)<(qlimit(1,k)+marge) )// FIXME Attention angle a remettre entre -pi et pi A(k,k)=1; elseif (qprec(k)>(qlimit(2,k)-marge)) B(k,k)=1; end end // Jacobien J1 = A+B; // Erreur er1 = A*((qprec-qlimit(1,:)')/marge)+B*((qprec-qlimit(2,:)')/marge); dotq1 = -lambda*pinv(J1)*er1; //projecteur Proj1 = (eye(6,6)-pinv(J1)*J1); // ------ Tache 2 hauteur de la main ------ // J2 = computeJ06SagMan(d,qprec); J2=[J2(1,:);J2(3,:)]; //dotq2 = -lambda2*Proj1*pinv(J2)* er2; edotref1=-lambda*er1; edotref2=-lambda2*er2; dotq2 = pinv(J2*Proj1)*(edotref2-J2*pinv(J1)*edotref1); //disp(dotq2) // -------- Synthese tache 1 et 2 ----------// qnew= qprec+dt*(dotq2+dotq1); [M_01, M_12, M_23, M_34, M_45, M_56, A_0, B_0, C_0, P_0] = computeMGDsagitalMan(d,qnew); M_06=M_01*M_12*M_23*M_34*M_45*M_56; posEffecteur = pFromHomogeneousMatrix(M_06); // pos_06 = [posEffecteur(1:2);posEffecteur(6)]; pos_06 = [posEffecteur(1);posEffecteur(6)]; //-----------update-----------// qprec=qnew; er2 = pos_06-posDes_06; errVect= [errVect er2]; i=i+1; qdot1Vect=[qdot1Vect dotq1]; qdot1et2Vect=[qdot1et2Vect (dotq1+dotq2)]; // le robot est un robot plan sur xy //sommets=[zeros(4,1) P_0 A_0 C_0 A_0 P_0(:,$) B_0]; // y = sommets (1,:); // x = sommets (2,:); // plot(x,y,'y-.'); // show_pixmap() end ////trac de la figure //xset("window",4); //xset("pixmap",1); //clear_pixmap()//et buffer //h1=scf(4); //h1.figure_name = "Error q1"; //plot(qdot1Vect') // show_pixmap() // ////trac de la figure //xset("window",5); //xset("pixmap",1); //clear_pixmap()//et buffer //h1=scf(5); //h1.figure_name = "Error q1"; //plot(qdot1et2Vect') // show_pixmap() //pause endfunction //----------------------------------------------// // ApplyActiveSet //----------------------------------------------// function [qnew] = applyActivSet(q,d,qlimit,dt,tol) //// starting from a set of articular position q // // find a new position qnew that garanty that the walker touch // // the ground. qnew=q; d1=d(1); d2=d(2); d3=d(3); d4=d(4); d5=d(5); d6=d(6); dh=d(7);dw=d(8); q1=q(1); q2=q(2); q3=q(3); q4=q(4); q5=q(5); q6=q(6); // position courante de l'effecteur [M_01, M_12, M_23, M_34, M_45, M_56, A_0, B_0, C_0, P_0] = computeMGDsagitalMan(d,q); M_06=M_01*M_12*M_23*M_34*M_45*M_56; posEffecteur = pFromHomogeneousMatrix(M_06); //pos_06 = [posEffecteur(1:2);posEffecteur(6)]; // posDes_06 = pos_06; pos_06 = [posEffecteur(1);posEffecteur(6)]; // posDes_06 = [dh; yDes_06; %pi/2]; posDes_06 = [dh; %pi/2]; // descente du gradient pour trouver q tel que P=Pdes er2 = pos_06-posDes_06; qprec = q'; lambda =0.5; lambda2 = 0.6; er1=er2; errVect = [er2]; i=0; qdot1Vect=[]; qdot1et2Vect=[]; marge = 10*%pi/180; DT = 10*dt; while (norm(er2)>tol ) edotref1=-lambda*er1; edotref2=-lambda2*er2; J2 = computeJ06SagMan(d,qprec); J2=[J2(1,:);J2(3,:)]; dotq = pinv(J2)* edotref2; dotqmin = (qlimit(1,:)'-qprec)/DT; dotqmax = (qlimit(2,:)'-qprec)/DT; [value,index]=min([(dotq-dotqmin) ;(dotqmax-dotq)]) A=zeros(6,6); B=zeros(6,6); //tant que la contrainte la plus violee est sous la marge nbdof = 0; while (value <0 & nbdof<=length(q)) // remplir la matrice d'activation if(index<=6) A(index,index)=1; else B(index-6,index-6)=1; end // Jacobien J1 = A+B; // Erreur dotq1 = A*(dotqmin)+B*(dotqmax); //projecteur Proj1 = (eye(6,6)-pinv(J1)*J1); // ------ Tache 2 hauteur de la main ------ // dotq2 = pinv(J2*Proj1)*(edotref2-J2*dotq1); // -------- Synthese tache 1 et 2 ----------// [value,index]=min([(dotq1+dotq2-dotqmin) ;(dotqmax-dotq2-dotq1)]); nbdof=nbdof+1; // pause end qnew = qprec+dt*(dotq2+dotq1); [M_01, M_12, M_23, M_34, M_45, M_56, A_0, B_0, C_0, P_0] = computeMGDsagitalMan(d,qnew); M_06 = M_01*M_12*M_23*M_34*M_45*M_56; posEffecteur = pFromHomogeneousMatrix(M_06); pos_06 = [posEffecteur(1);posEffecteur(6)]; //-----------update-----------// qprec=qnew; er2 = pos_06-posDes_06; errVect= [errVect er2]; i=i+1; qdot1Vect=[qdot1Vect dotq1]; qdot1et2Vect=[qdot1et2Vect (dotq1+dotq2)]; // le robot est un robot plan sur xy //sommets=[zeros(4,1) P_0 A_0 C_0 A_0 P_0(:,$) B_0]; // y = sommets (1,:); // x = sommets (2,:); // plot(x,y,'y-.'); // show_pixmap() end ////trac de la figure //xset("window",4); //xset("pixmap",1); //clear_pixmap()//et buffer //h1=scf(4); //h1.figure_name = "Error q1"; //plot(qdot1Vect') // show_pixmap() // ////trac de la figure //xset("window",5); //xset("pixmap",1); //clear_pixmap()//et buffer //h1=scf(5); //h1.figure_name = "Error q1"; //plot(qdot1et2Vect') // show_pixmap() //pause endfunction
871d9a1254e64b4a7d3e8cadaf8a0fa23800a805
68bc9ed8216a93c9b0bc0a6dbde62a7bb8328383
/param/testcase2.tst
618dc4959d6f011f84bde33f45735e82b4417ddd
[]
no_license
michaelhuang14/AutonomousAgentsGreenhouse
5e305e522c95dfaaebd7e4f148de87572d4185ce
83e4aad142c9ca72ba4ababf58c25bed53428f0c
refs/heads/main
2022-12-20T01:59:27.773408
2020-10-08T03:02:55
2020-10-08T03:02:55
300,742,055
1
0
null
2020-10-08T02:41:49
2020-10-02T21:40:36
Python
UTF-8
Scilab
false
false
602
tst
testcase2.tst
# Simple trace file BASELINE = baseline2.bsl WHENEVER smoist[0] < 450 or smoist[1] < 450 WAIT wpump FOR 86400 # Make sure the water pump was turned on in the next scheduled sessions # Don't let the pump overwater things WHENEVER wpump ENSURE smoist[0] < 600 and smoist[1] < 600 FOR 3600 WHENEVER smoist[0] > 650 or smoist[1] > 650 SET soil = (smoist[0] + smoist[1])/2 WAIT fan FOR 86400 # Make sure fan is turned on in the next scheduled behavior sessions WAIT (smoist[0] + smoist[1])/2 < soil FOR 86400 # after turning on the fan, make sure the avg soil moisture goes down over the day
6565bb97eb8d52b0dab1c70771cb451f1ad370a1
449d555969bfd7befe906877abab098c6e63a0e8
/608/CH44/EX44.12/44_12.sce
c6920783e3248101d2d27764fd684177d8a5ef3b
[]
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,015
sce
44_12.sce
//Problem 44.12: A cable has the following primary constants: resistance R = 80 ohm/loop km, conductance, G = 2 μS/km, and capacitance C = 5 nF/km. Determine, for minimum distortion at a frequency of 1.5 kHz (a) the value of inductance per loop kilometre required, (b) the propagation coefficient, (c) the velocity of propagation of signal, and (d) the wavelength on the line //initializing the variables: R = 80; // in ohm/loop km C = 5E-9; // in F/km G = 2E-6; // in S/km f = 1500; // in Hz //calculation: w = 2*%pi*f //the condition for minimum distortion is given by LG = CR, from which, inductance L = C*R/G //attenuation coefficient, a = (R*G)^0.5 //phase shift coefficient, b = w*(L*C)^0.5 //propagation coefficient, r = a + %i*b //velocity of propagation, u = 1/(L*C)^0.5 //wavelength Y = u/f printf("\n\n Result \n\n") printf("\n inductance is %.2f H",L) printf("\n propagation coefficient is %.4f +(%.4f)i",a,b) printf("\n wavelength Y is %.2f km",Y) printf("\n speed of transmission %.2E km/sec",u)
e848d1bf7c0bf1c80b150c452bcb4a6d65f9577d
449d555969bfd7befe906877abab098c6e63a0e8
/1958/CH7/EX7.2/Chapter7_example2.sce
dbf7f519ed5b870d9723f5a58f8de87446a01e5d
[]
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
559
sce
Chapter7_example2.sce
clc clear //Input data f=15//Focal length of achromatic doublet made up of crown and flint glasses in cm fl=[0.01506,0.02427]//Dispersive power of crown and flint glasses respectively //Calculations //Solving two equations //(1/f)=(1/f1)+(1/f2) //(f1/f2)=(-0.01506/0.02427) fx=(fl(1)/fl(2))//Ratio of focal lengths f2=(-(1/fx)+1)/(1/f)//Focal length of converging lens in cm f1=(-fx*f2)//Focal length of diverging lens in cm //Output printf('Focal length of converging lens is %3.4f cm \n Focal length of diverging lens is %3.1f cm',f2,f1)
67c738c60ab2ff00ab3d7ca18f01db048ec297f1
bacd6919260d728f4316702bbe1edf811810bede
/legacy/38/console/view_out.sce
6bfd478dffa2c2089a3a856d80a3063174b46977
[]
no_license
vopl/sp
332d8c2ff536fc5d8772ff2f3fbeca9b50c47641
a4313f4d7af47cc3132d7546947d4d668c7e487e
refs/heads/master
2020-04-16T02:09:36.036424
2016-10-05T18:08:30
2016-10-05T18:08:30
65,293,458
0
0
null
null
null
null
UTF-8
Scilab
false
false
239
sce
view_out.sce
stacksize('max'); h = 9; w = -1; out = read("out", w, h); clf; t = out(:,1); rr = out(:,2); ri = out(:,3); ir = out(:,4); ii = out(:,5); plot(t,rr,'b'); plot(t,ri,'b'); //plot(t,ir,'r'); //plot(t,ii,'m'); abort;
64832a151d489d7629ed28eef2e7840eec1f1bb2
449d555969bfd7befe906877abab098c6e63a0e8
/615/CH8/EX8.18/8_18.sce
a6edc8737113e3cbf7a6186fec20eefbd024a278
[]
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,390
sce
8_18.sce
//Fuels and Combustion// //Example 8.18// C=624;//weight of carbon in 1kg of coal sample in grams// O=69;//weight of oxygen in 1kg of coal sample in grams// S=8;//weight of Sulphur in 1kg of coal sample in grams// N=12;//weight of nytrogen in 1kg of coal sample in grams// H=41;//weight of hydrogen in 1kg of coal sample in grams// CO2=129;//weight of CO2 in 1kg of coal sample in grams// CO=2;//weight of CO in 1kg of coal sample in grams// MO=C*32/12+H*16/2+S*32/32-O;//minimum weight of oxygen needed in grams// MA=MO*0.1/23;//minimum weight of air needed in kilograms// printf('minimum amount of air needed=MA=%fkg',MA); WC=CO2*(12/44)+CO*(12/28);//weight of C in fuel gas/kg// printf('\nWeight of C in fuel gas/kg=WC=%fg',WC); WF=C/WC;//Weight of fuel gas/kg of coal in g// printf('\nweight of fuel gas/kg of coal=WF=%fg',WF); O2=2*16/28;//O2 needed to convert CO to CO2 in Kg// RWO2=(61-O2)/1000;//remaining weight of O2/kg of fuel gas in Kg// printf('\nRemaining weight of O2/kg of fuel gas=RWO2=%fkg',RWO2); WO2=WF*RWO2;//weight of O2 obtained by burning 1kg coal in kg// printf('\nWeight of O2 obtained by burning coal=WO2=%fkg',WO2); AR=WO2*100/23;//air required in kilograms// printf('\nAir required=AR=%fkg',AR); WAS=MA+AR;//weight of air actually supplied/kg coal burnt in kg// printf('\nWeight of air actually supplied/kg coal burnt=WAS=%fkg',WAS);
08bc0c288485672d9b353160ee39fda55b446d77
449d555969bfd7befe906877abab098c6e63a0e8
/2438/CH3/EX3.12/Ex3_12.sce
354cc9657320856e12145d6bf2327fcf57277561
[]
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
588
sce
Ex3_12.sce
//======================================================================= // chpter 3 example 12 clc; clear; //input data u = 0.126; //permiability in N/A^2 u0 = 4*%pi*10^-7; //calculation ur = u/u0 sighe = ur-1; //magnetic susceptability //result mprintf('relative permiability =%3.5e\n',sighe); mprintf(' Note:Calculation mistake in textbook in calculating sighe by taking ur as 10^5 instead of 100318.4') //======================================================================
39a71dfd6c8312637501b3607144e5c5721ae61b
1bb72df9a084fe4f8c0ec39f778282eb52750801
/test/RT4.prev.tst
44b699f69461e4c06df5a3644ad41e7f88dcde98
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gfis/ramath
498adfc7a6d353d4775b33020fdf992628e3fbff
b09b48639ddd4709ffb1c729e33f6a4b9ef676b5
refs/heads/master
2023-08-17T00:10:37.092379
2023-08-04T07:48:00
2023-08-04T07:48:00
30,116,803
2
0
null
null
null
null
UTF-8
Scilab
false
false
40
tst
RT4.prev.tst
[1/2,2/3,-1/5] - = [[-1/2],[-2/3,1/5]]
36430c50bf837fb2bf54df183b65f15d67fc867e
449d555969bfd7befe906877abab098c6e63a0e8
/1415/CH1/EX1.2.4/ex4.sce
b14bc934535253257a087a52a5af9e9cbfcc0fb9
[]
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
980
sce
ex4.sce
//Example 4 Page 62 clc clear function q1=f(p1) q1=77.8*(p1^(-0.11)) endfunction function q2=g(p2) q2=30.4+0.006*p2 endfunction disp('a)') p1=([200 400 800 1200 1600 2000 2200]) q1=f(p1) plot(2400,50,p1,q1,'blue') p2=([200 400 800 1200 1600 2000 2200]) q2=g(p2) plot(2400,50,p2,q2,'red') disp('the lines cross at $1000 at Equilibrium point') disp(f(1000),'Demand:') disp(g(1000),'Supply:') disp('so 36400 students') disp('b)') disp('If tuition is, say, $1,800, then the supply will be larger thandemand and there will be a surplus of available openings at private schools. Similarly, iftuition is less—say $400—then the supply will be less than the demand, and there willbe a shortage of available openings.') disp('c)') //tuition fee set at &1200 disp(f(1200),'Demand in thousand seats') disp(g(1200),'Supply in thousand seats') disp(g(1200)-f(1200),'Surplus is given in thousand seats as:') xtitle('Demand and Supply','p','q');
32723de722fa36996ab531dfe1dacb4e63172fcc
449d555969bfd7befe906877abab098c6e63a0e8
/3860/CH9/EX9.11/Ex9_11.sce
999421a1c019202981b909c9f7481c2e63e1772b
[]
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
818
sce
Ex9_11.sce
//Example 9.11: Reduction of state table clc // Clears the console disp("Given State Table") disp("q | x=0 x=1 | z") disp('--------------------------------') disp("A | B E | 0") disp("B | D A | 1") disp("C | G A | 0") disp("D | F G | 1") disp("E | B C | 0") disp("F | D G | 1") disp("G | D E | 1") disp('The SP partition is also ouput consistent. The smallest equivalent system is given below') disp(" q | x=0 x=1 | z") disp('------------------------------------') disp(" A | B A | 0") disp(" B | D A | 1") disp(" D | D B | 1") //displays the reduced state table.
1dff6b8a5aa05e0b8403318866514b774e6b036f
449d555969bfd7befe906877abab098c6e63a0e8
/1106/CH10/EX10.2/ex10_2.sce
568a9e90ad48662b9af564aaf58ac92c58ab1edf
[]
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
ex10_2.sce
// Example 10.2, Page No-430 clear clc //Part A R1=15*10^3 R3=15*10^3 R2=2.2*10^3 C1=0.001*10^-6 Vcc=12 Vc=Vcc*(R3/(R2+R3)) printf('\nVc= %.3f V', Vc) fo1=2*(Vcc-Vc)/(C1*R1*Vcc) fo1n=fo1/1000 printf('\nFo= %.2f kHz', fo1n) //Part B Vc1=7 fo2=2*(Vcc-Vc1)/(C1*R1*Vcc) fo2n=fo2/1000 printf('\nFo= %.3f kHz', fo2n) Vc2=8 fo3=2*(Vcc-Vc2)/(C1*R1*Vcc) fo3n=fo3/1000 printf('\nFo= %.3f kHz', fo3n) fch=fo2n-fo3n printf('\nChange in output frequency= %.3f kHz', fch)
0ee84a39fd5a419f361712e7e73a2dce1209df8e
449d555969bfd7befe906877abab098c6e63a0e8
/260/CH7/EX7.1/7_1.sce
a85d8dee2ac5e6d787af9a393840c0264ab68bca
[]
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
74
sce
7_1.sce
//Eg-7.1 //pg-325 clear clc printf('This is a theory question \n')
ae7bfb7c6f6fb3b85e85704a60a688c5350557c8
f708de8b70d2f3c38b5eb963efe5d71de1a0de49
/src/goahead/test/stress/badUrl.tst
57341b4e6328e5185b3339fa7a919935dff53241
[]
no_license
baobao-skl/SmartSDK
7225208110f223f950477f577947dbbe2577f439
7c81b63a66f3c0cf98ff3c2f1330a3a5e226dbe6
refs/heads/master
2020-05-28T01:47:07.809576
2014-08-12T14:20:21
2014-08-12T14:20:21
19,645,700
0
1
null
null
null
null
UTF-8
Scilab
false
false
253
tst
badUrl.tst
/* badUrl.tst - Stress test malformed URLs */ const HTTP = App.config.uris.http || "127.0.0.1:8080" let http: Http = new Http http.get(HTTP + "/index\x01.html") assert(http.status == 404) assert(http.response.contains("Not Found")) http.close()
8aa712c6832aa9fe3c5d3b64b7370e5ddbfa27f4
449d555969bfd7befe906877abab098c6e63a0e8
/3872/CH3/EX3.7/Ex3_7.sce
a64cf057edbca9f193c1cbebf3705b8333e973be
[]
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,391
sce
Ex3_7.sce
//Book - Power system: Analysisi & Design 5th Edition //Authors - J. Duncan Glover, Mulukutla S. Sarma, and Thomas J.Overbye //Chapter-3 ;Example 3.7 //Scilab Version - 6.0.0; OS - Windows clc; clear; Sr=400 //rated power of transformer in MVA VT1p=13.8 // rated voltage of transformer primary side in kV VT1s=199.2 // rated voltage of transformer secondary side in kV Xeq=0.10 // leakage reactance of transformer in Ohms Sa=1000 //High voltage side absorbs power in MVA pf=0.90 // lagging power factor VANH=199.2 Sb=1200 //base power in MVA VbHLL=345 //Hihg volgage side lini to line base voltag in kV IbH=1200/(345*sqrt(3)) //high voltage side base current in Amperes VAN=1.0 //per unit load voltage Theta=acos(0.9) IA=((1000/(345*(sqrt(3))))/2.008)*(exp(%i*(-Theta))) //Per unit load current Van=VAN+(%i*Xeq)*IA // voltage at low voltage bus VbXLN1=13.8 Van1L=Van*VbXLN1 //low voltage wye winding in kV Ean=(exp(%i*(-30)*(%pi/180)))*VAN //source voltage in per unit Ia=(exp(%i*(-30)*(%pi/180)))*IA //source current in per unit Van2=Ean+(%i*Xeq)*Ia VbXLN2=13.8/(sqrt(3)) Van2L=Van2*VbXLN2 //low voltage delta winding in kV printf('The magnitude of voltage at low voltage bus(star) in per unit is %.4f and its angle is %.4f degrees\n',abs(Van),atand(imag(Van),real(Van))); printf('The magnitude of low voltage star winding in kV is %.4f kV and its angle is %.4f degrees\n',abs(Van1L),atand(imag(Van1L),real(Van1L))); printf('The magnitude of voltage at low voltage bus(delta) in per unit is %.4f and its angle is %.4f degrees\n',abs(Van2),atand(imag(Van2),real(Van2))); printf('The magnitude of low voltage delta winding in kV is %.4f kV and its angle is %.4f degrees\n',abs(Van2L),atand(imag(Van2L),real(Van2L)));
0d019f067bbb9e94b2de310add6cc1de031140ed
449d555969bfd7befe906877abab098c6e63a0e8
/1967/CH8/EX8.9/8_9.sce
45eec154d2524e86c4514938206de959944f1ba1
[]
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
317
sce
8_9.sce
clc //initialisation of variables clear Cp= 8.21*0.0413 //lit-atm R= 0.0821 //lit-atm deg^-1 mole^-1 p= 100 //atm T= 20 //C a= 1.39 b= 3.92*10^-2 //lit-atm^2 mole //CALCULATIONS u= (1/Cp)*((2*a/(R*(273+T)))-b-(3*a*b*p/(R^2*(273+T)^2))) //RESULTS printf ('Joule-thomson coefficient = %.3f deg atm^-1',u)
61b754222efbaa91f1a6d69201941b8d84f7cc88
63c8bbe209f7a437f8bcc25dc1b7b1e9a100defa
/test/0030.tst
e7fdd23c43f4885f870fbbc00f42b12a4691121b
[]
no_license
fmeci/nfql-testing
e9e7edb03a7222cd4c5f17b9b4d2a8dd58ea547c
6b7d465b32fa50468e3694f63c803e3630c5187d
refs/heads/master
2021-01-11T04:09:48.579127
2013-05-02T13:30:17
2013-05-02T13:30:17
71,239,280
0
0
null
2016-10-18T11:01:57
2016-10-18T11:01:55
Python
UTF-8
Scilab
false
false
399
tst
0030.tst
SplITtEr hLnhn {} FILtER fjz { bItOR (, ) } FIlTER Ofd {noT Ts NOT p } D -> W -> pI -> rg -> m groUPEr G {MODULe E{ f <= k DelTa 5 qj <= V } mOdUlE iA{ } mOdulE B{ G = Zzfv zKx >= dMVWS DeLta 37M } moDuLE zxQ{ G < y DeltA 27m } mODule x{ k = vCGb rdelta 487 W >= Cd deLta 4 } MOdULe lNH{ } AggReGaTE mX.mz ,SUm(ug.h) aS t } uNGrOuPeR TV { } groupFIlTeR B {} MeRgeR iE { exPorT M }
c2bee4c0e116966f75790b6a6a7df60448d996f8
449d555969bfd7befe906877abab098c6e63a0e8
/2744/CH3/EX3.6/Ex3_6.sce
7aa5da7f64617a92c7866dd8b1df6e2567bb3795
[]
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
789
sce
Ex3_6.sce
clear; clc; l = 12;//feet d1_A = 1;//inch d2_A = 2;//inches l1_A = 4;//inches l2_A = 8;//inches d1_B = 1;//inch d2_B = 2;//inches l1_B = 8;//inches l2_B = 4;//inches p_A = 15/2;// tons/in^2 p_B = sqrt((2/3)*p_A^2);// tons/in^2 r1 = (9*%pi/8)/(3*%pi/4);//ratio of energies if both bars are allowed to reach the proof stress V_A = 0.25*%pi*d1_A^2*l1_A+ 0.25*%pi*d2_A^2*l2_A;// in^3 V_B = 0.25*%pi*d1_B^2*l1_B+ 0.25*%pi*d2_B^2*l2_B;// in^3 r2 = ((3/16)*p_B^2)/((1/12)*p_B^2);//ratio of enrgies printf('Maximum instantaneous stress produced is p_B = %.2f tons/in^2',p_B); printf('\n Ratio of energies stored if both bars are allowed to reach the proof stress is r1 = %.2f ',r1); printf('\n Ratio of energies stored at the same stress per unit volume, is r2 = %.2f ',r2);
d361beb6454b1b079ac4d5ce59f41fa205071581
449d555969bfd7befe906877abab098c6e63a0e8
/2318/CH3/EX3.68.a/ex_3_68_a.sce
e7f30a0faf435aa0fdc8524a5b07d2f4ac4adc51
[]
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
393
sce
ex_3_68_a.sce
//Example 3.68.a:resistance and inductance clc; clear; close; cab=0.01;//micro-F rbc=2.5;//k-ohms cbc=1;//micro-F rda=7.5*10^3;//ohm cda=0.02;//micro-F w=50*10^3;//Hz zab=(-1/(((%i*w*cab*10^-6*1))));//ohms zbc=rbc*10^3;//ohms zda=rda+(1/(((%i*w*cda*10^-6))));//ohms zcd=(zbc*zda)/zab;// r=-real(zcd);//ohms l=-imag(zcd)/w;//H disp(round(r),"resistance is,(ohm)=") disp(l,"inductance is,(H)=")
6c86b56db43d70bb3129da11e1c721471435053f
449d555969bfd7befe906877abab098c6e63a0e8
/1910/CH5/EX5.7/Chapter57.sce
5ed6527844fd62036223af8947c63b36f30ebc86
[]
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,442
sce
Chapter57.sce
// Display mode mode(0); // Display warning for floating point exception ieee(1); clear; clc; disp("Introduction to heat transfer by S.K.Som, Chapter 5, Example 7") //A wall is exposed to nitrogen at one atmospheric pressure and temprature,Tinf=4°C. Tinf=4; //The wall is H=2.0m high and B=2.5m wide and is maintained at temprature,Ts=56°C Ts=56; H=2; B=2.5; A=H*B;//area is(A) //The average nusselt number NuHbar over the height of the plate is given by NuHbar=0.13*(Gr*Pr)^(1/3) //The properties of nitrogen at mean film temprature(Tf) is (56+4)/2=30°C are given as density(rho=1.142kg/m^3) ,conductivity(k=0.026W/(m*K)), //kinematic viscosity(nu=15.630*10^-6 m^2/s) ,Prandtl number(Pr=0.713) rho=1.142; k=0.026; nu=15.630*10^-6; Pr=0.713; Tf=30; //We first have to detrmine the value of Grashoff number,Gr.In consideration of nitrogen as an ideal gas,we can write //Beta(The volumetric coefficient of expansion)=1/T disp("Beta(The volumetric coefficient of expansion in K^-1 is") Beta=1/(273+Tf) //Now Gr=(g*Beta*(Ts-Tinf)*H^3)/nu^2 g=9.81;//acceleration due to gravity disp("Grashoff number is") Gr=(g*Beta*(Ts-Tinf)*H^3)/nu^2 disp("The average nusselt number is") NuHbar=0.13*(Gr*Pr)^(1/3) //hbar is the heat flux disp("Heat flux hbar in W/(m^2*°C)") hbar=NuHbar*k/H //Q is the heat loss from the plate disp("The heat loss from the plate in W is") Q=hbar*A*(Ts-Tinf)
69cf15cbd38819def6919c228cf105edba34df89
449d555969bfd7befe906877abab098c6e63a0e8
/575/DEPENDENCIES/661.sci
17d879e87baf02e51768531bc7ecd79a1909b708
[]
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
111
sci
661.sci
V1=200 //CC Acetone x=0.1 //Wt acetone V2=400 //CC chloroform DA=0.792 //g/cc DC=1.489 //g/cc DW=1 //g/cc
0ef4b1e51829ab7d29d975292c6b9f1dd3f06e8b
78ff3e16a288175ff606f38ee5ee877d4844773e
/4_chapter/4_02_solution.sce
63db299edebcd1353885db28326025b46934b89d
[]
no_license
rngalvan/fluid-mech-cengel
16c12ed8f71f25c812700be4322328c5663b71cf
ee45f924e73cbb8b5716fac43504dac15ffd1f64
refs/heads/master
2021-05-27T20:52:22.586023
2013-04-17T04:25:37
2013-04-17T04:25:37
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
740
sce
4_02_solution.sce
//Soultion 4-02 WD=get_absolute_file_path('4_02_solution.sce'); datafile=WD+filesep()+'4_02_example.sci'; clc; exec(datafile) //unit conversion Vdot = Vdot / 10**3; //[L/s] to [m^3/s] D_inlet = D_inlet / 100; //[cm] to [m] D_outlet = D_outlet / 100; //[cm] to [m] deltax = deltax / 100; //[cm] to [m] //solution u_inlet = 4 * Vdot / (%pi * D_inlet**2); //average inlet velocity u_outlet = 4 * Vdot / (%pi * D_outlet**2); //average outlet velocity a_x = (u_outlet**2 - u_inlet**2) / (2 * deltax); //results printf("\nInlet velocity at the nozzle is %1.3f m/s", u_inlet); printf("\nOutlet velocity at the nozzle is %1.2f m/s", u_outlet) printf("\nThe acceleration of a fluid particle moving down the centerline of nozzle is %1.1f m/s^2",a_x);
d7c442c820905e586b6065cdc95937ef1be8af38
449d555969bfd7befe906877abab098c6e63a0e8
/611/CH3/EX3.3/Chap3_Ex3_R1.sce
7221c5ca803dceba42fda7e63b788fa8a4f9ba90
[]
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
963
sce
Chap3_Ex3_R1.sce
// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India. //Chapter-3,Example 3,Page 49 //Title:Volume ratio //================================================================================================================ clear clc //INPUT T=100;//temperature inside the vessel in degree celsius V=0.00317;//specific volume of water at the critical point in m^3/kg vf=0.0010437;//molar volume of saturated liquid in m^3/kg vg=1.673;//molar volume of saturated vapour in m^3/kg //CALCULATION X=(V-vf)/(vg-vf);//calculation of the quality of wet steam using Eq.(3.3) (no unit) ratio=(X*vg)/((1-X)*vf);//calculation of volume ratio of saturated vapour to the saturated liquid (no unit) //OUTPUT mprintf('\n The volume ratio of saturated vapour to the saturated liquid= %0.2f \n',ratio); //===============================================END OF PROGRAM===================================================
961b431456e3cebbe09eb66a80b668914162c666
449d555969bfd7befe906877abab098c6e63a0e8
/3745/CH1/EX1.51/Ex1_51.sce
c1de12ac1652714283aca0da57e25adaa0b02167
[]
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
Ex1_51.sce
// Ex 51 Page 396 clc;clear;close; // Given ZA=0.15+0.5*%i;//ohm ZB=0.1+0.6*%i;//ohm EA=207;//V EB=205;//V ZL=2+1.5*%i;//ohm IA=(EA*ZB+(EA-EB)*ZL)/(ZA*ZB+ZL*(ZA+ZB));//A IB=(EB*ZA-(EA-EB)*ZL)/(ZA*ZB+ZL*(ZA+ZB));//A V2=(IA+IB)*ZL;//V fi_A=atand(imag(V2)/real(V2))-(atand(imag(IA)/real(IA))) pf_A=cosd(fi_A);//lag printf("pf transformer A = %.2f lag",pf_A) fi_B=atand(imag(V2)/real(V2))-(atand(imag(IB)/real(IB))) pf_B=cosd(fi_B);//lag printf("\n pf transformer B = %.2f lag",pf_B) PA=abs(V2*IA*pf_A);//W printf("\n power output transformer A = %.f W",PA) PB=abs(V2*IB*pf_B);//W printf("\n power output transformer B = %.f W",PB) //Power output ans are wrong in the book.
5e78bdecf92474a2076b8c76115bf5b6fbbbc63e
449d555969bfd7befe906877abab098c6e63a0e8
/1439/CH22/EX23.1/22_1.sce
9f7910879030a539a9162c17af1ed61dc1c0ec16
[]
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
379
sce
22_1.sce
clc //initialisation of variables d= 0.856 //g/cc N= 6*10^23 //molecules M= 39.1 //g mole^-1 n= 2 n1= 4 n2= 12 //CALCULATIONS a= (n*M/(N*d))^(1/3) d= a*10^8/sqrt(n1) d1= a*10^8/sqrt(n) d2= a*10^8/sqrt(n2) //RESULTS printf ('distance between planes = %.2f A',d) printf ('\n distance between planes = %.2f A',d1) printf ('\n distance between planes = %.2f A',d2)
8866a8694f5157ed1d446f20e569df1314991b67
449d555969bfd7befe906877abab098c6e63a0e8
/1664/CH8/EX8.11/Ex8_11.sce
a05737ceb9129ca068687b9fb1d8afd810bf6cef
[]
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
587
sce
Ex8_11.sce
//Example No.8.11. //Page No.235. clc;clear; n = 8.49*10^(28);//Concentration of electrons in copper -[m^-3]. e = 1.6*10^(-19);//Value of electron. Tr = 2.44*10^(-14);//Relaxation time of electron -[s] m = 9.1*10^(-31);//mass of electron. k = 1.38*10^(-23);//Boltzman's constant. T = 293;//Temperature -[K]. d = ((n*e^(2)*Tr)/(m)); printf("\n1)The electrical conductivity is %3.3e per ohm meter",d); K = ((n*(%pi)^(2)*k^(2)*T*Tr)/(3*m)); printf("\n 2)The thermal conductivity is %.2f W m^-1.K^-1",K); L = K/(d*T); printf("\n3)The Lorentz number is %3.3e W ohm K^-2",L);
01c2837cc304dbc89383b15fe4acc79f7aa99467
449d555969bfd7befe906877abab098c6e63a0e8
/1868/CH7/EX7.5/Ch07Ex5.sce
52f7af88c211eb8ffc1567bc80de9200875958b5
[]
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
540
sce
Ch07Ex5.sce
// Scilab code Ex7.5: Pg 241 (2005) clc; clear; epsilon_c = 5.5e+10; // Characteristic field strength, V/m epsilon = 1.0e+09; // Electric field, V/m f = 1.0e+30; // Collision frequency, s(-1)cm(-2) lamda = f*exp(-epsilon_c/epsilon); // Electron emission rate, electrons/sec e = 1.60e-19; // Electrc charge, C I = lamda*e; // Tunelling current, A printf("\nTunelling current in parallel plate capacitor = %4.2f pA", I/1e-12); printf("\n"); // Result // Tunelling current in parallel plate capacitor = 0.21 pA
5ddcd8251d869bf74064ca1da71d81268879afe7
449d555969bfd7befe906877abab098c6e63a0e8
/2135/CH6/EX6.34/Exa_6_34.sce
a765be5fb8db897eeca26df860322b83ae8414e2
[]
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
535
sce
Exa_6_34.sce
//Exa 6.34 clc; clear; close; format('v',7); //Given Data : p1=80;//bar Tsup3=350;//degree C pb=712.5/760*1.01325;//bar mdot=2;//Kg/s //mdot=1;//Kg h3=2964;//KJ/Kg(Molliers diagram) h4=2184;//KJ/Kg(Molliers diagram) WT=h3-h4;//KJ/Kg WTdot=mdot*WT;//KW disp(WTdot,"Total turbine work in KW : "); wp=(p1-pb)/10;//KJ/Kg hf1=411.35;//KJ/Kg(from steam table) h1=hf1;//KJ/Kg h2=h1+wp;//KJ/Kg qi=h3-h2;//KJ/Kg EtaR=(WT-wp)/qi*100;//% disp(EtaR,"Rankine efficiency in % : "); //Steam table is used to get some data.