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
f3ce5ad469386fa3a09b2b6a2c08c22f34c84f2d
449d555969bfd7befe906877abab098c6e63a0e8
/2381/CH3/EX3.2/ex_2.sce
29d6bdec6cc695e5426156c33df5f5f16546a1b8
[]
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
322
sce
ex_2.sce
//Example 2 // A/Amax clc; clear; close; x1=[0.99;0.98;0.97];// wt=50;// wo=1;//assume fo=1;//assume for i=1:3 a(i)=((fo/((wo^2)*((1-x1(i)^2)^2+((1/wt^2)*x1(i)^2))^(1/2))));// am(i)=fo/((wo^2)*(1/wt^2)^(1/2));// z(i)=a(i)/am(i);// disp("for p/wo "+string(x1(i))+" value of A/Amax is "+string(z(i))+"") end
f55b11f761b7c00f9a875c5dfacdb8993d04b82e
449d555969bfd7befe906877abab098c6e63a0e8
/1073/CH5/EX5.17/5_17.sce
fa3b4376635044a10d4d3ff996aa0c6b74dd03c1
[]
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,166
sce
5_17.sce
clc; clear; //Example 5.17 mb_dot=1.25 //Benzene in [kg/s] Cpb=1.9*10^3 //For benzene in [J/kg.K] Cpw=4.187*10^3 //in [J/kg.K] T1=350 //[K] T2=300 //[K] Q=mb_dot*Cpb*(T1-T2) //[W] t1=290 //[K] t2=320 //[K] dT1=T1-t2 //[K] dT2=T2-t1 //[K] dTlm=(dT1-dT2)/log(dT1/dT2) //[K] mw_dot=Q/(Cpw*(t2-t1)) //Minimum flow rate of water in [kg/s] hi=850 //[W/sq m.K] ho=1700 //[W/sq m.K] Do=0.025 //[m] Di=0.022 //[m] x=(Do-Di) /2 //Thickness in [m] hio=hi*(Di/Do) //[W/sq m.K] Dw=(Do-Di)/log(Do/Di) //[m] k=45 //[W/m.K] Uo=1/((1/ho)+(1/hio)+(x/k)*(Do/Dw)) //[W/sq m.K] Ao=Q/(Uo*dTlm) //[sq m] L=1 //Length in [m] area=%pi*Do*L // Outside surface area of tube per i m length Tl=Ao/area //Total length of tubing required in [m] printf("\nTotal length of tubing required=%d m",round(Tl));
b347853cea754ecd6900c4f63721971c7b35cb19
449d555969bfd7befe906877abab098c6e63a0e8
/1970/CH2/EX2.16/Ch02Exa16.sce
a75a026223cebff4e8cd926ff748da2b0633fbd0
[]
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
814
sce
Ch02Exa16.sce
// Scilab code Exa2.16 : : Page 94 (2011) clc; clear; A_0 = 3.7e+07; // Initial activity, disintegrations per sec T = 12.6; // Half life of I-130, hours t = 24*3600; // time for dose absorbed calculation,sec E = 0.29*1.6e-06; // Average energy of beta rays, ergs m = 2; // Mass of iodine thyroid tissue, gm lambda = 0.693/(T*3600); // Disintegration constant, sec^-1 N_0 = A_0/lambda; // Initial number of atoms N = N_0*[1-%e^(-lambda*t)]; // Number of average atoms disintegrated E_A = N*E; // Energy of beta rays emitted, ergs E_G = E_A/(2*97.00035); // Energy of beta rays emitted per gram of tissue, REP printf("\nThe energy of beta rays emitted per gram of tissue = %6.1f REP", E_G); // Result // The energy of beta rays emitted per gram of tissue = 4245.0 REP
d1f47608ec24d8aed8e21a0f22af2dec96d3557a
449d555969bfd7befe906877abab098c6e63a0e8
/2471/CH5/EX5.3/Ex5_3.sce
b1199e2d44ded9449acece855b5b3becd6891909
[]
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
553
sce
Ex5_3.sce
clear ; clc; // Example 5.3 printf('Example 5.3\n\n'); printf('Page No. 117\n\n'); // given T1 = 25;// in degree celcius T2 = 212;// in degree celcius x = 0.96;// dryness fraction m = 1.25;// Mass flow rate in kg/s //from steam table hL_212 = 907*10^3;// Specific enthalpy at 212 degree celcius in J/kg hL_25 = 105*10^3;// Specific enthalpy at 25 degree celcius in J/kg l_212 = 1890*10^3;// Latent heat of vapourisation at 212 degree celcius in J/kg Q = m*((hL_212+(x*l_212))-hL_25);// in W printf('The required heat is %.0f W',Q)
f9b88e2a0019ca77238c58d749bf843e48fb3ea8
449d555969bfd7befe906877abab098c6e63a0e8
/2258/CH7/EX7.5/7_5.sce
7c5b96d01ee1768ab7821b7403f7f256bd031538
[]
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
602
sce
7_5.sce
clc(); clear; // To calculate the concentration of holes and electrons mew_n=1300*10^-4; //in m^2/Vs mew_p=500*10^-4; //in m^2/Vs sigma=3*10^4; //conductivity in ohm-1 m-1 e=1.6*10^-19; N=sigma/(e*mew_n); ni=1.5*10^16; //per m^3 p=(ni^2)/N; P=sigma/(e*mew_p); n=(ni^2)/P; printf("concentration of electrons in n-type per cubic metre are"); disp(N); printf("concentration of holes in n-type per cubic metre are"); disp(p); printf("concentration of electrons in p-type per cubic metre are"); disp(n); printf("concentration of holes in p-type per cubic metre are"); disp(P);
494abf18bd6d3a6b48006d984f6988436d80a593
449d555969bfd7befe906877abab098c6e63a0e8
/2223/CH18/EX18.46/Ex18_46.sce
b23c1e0203e091de85560d5831437d6f55bb7a22
[]
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,085
sce
Ex18_46.sce
// scilab Code Exa 18.46 Fourneyron Turbine 360 rpm d2=3; // outer diameter of the impeller in m d1=1.5; // inner diameter of the impeller in m H=50; // net head in m rho=1000; // density in kg/m3 g=9.81; // gravitational acceleration in m/s2 N=360; // rotor Speed in RPM n_o=0.785; // overall efficiency P=4; // Power Output in MW u1=%pi*d1*N/60; u2=%pi*d2*N/60; // part(a) Q=P*1e6/(n_o*rho*g*H); disp("m3/s",Q,"(a)the discharge is") c2=9; // velocity of water at exit in m/s // part(b) w_ET=(g*H)-(0.5*(c2^2)); n_h=w_ET/(g*H); disp("%",n_h*1e2,"(b)the hydraulic efficiency is") // part(c) cr2=c2; b=Q/(cr2*%pi*d2); // axial length of the impeller in m disp("cm",b*1e2,"(c)the runner passage width is") // part(d) beta2=atand(cr2/u2); disp("degree",beta2,"(d) the blade air angle at the impeller exit beta2=") c_theta1=w_ET/u1; cr1=Q/(b*%pi*d1); beta1=atand(cr1/(u1-c_theta1)); disp("degree",beta1,"and the blade air angle at the impeller entry beta1=") // part(e) alpha1=atand(cr1/c_theta1); disp("degree",alpha1,"(e)the guide vane exit angle is")
e99052c28e5e35a94a1ad4c02651bad9bdc9d687
127f3a4b49df924522f80739a53cc288d5521807
/tp2/lsolve.sci
02721e8b0993e3d2de724bdda76daacb2d4c5d8b
[]
no_license
iimen/TD-TP-CN
94e90aae917e47b8cc4d6d8b80af803b0dc82986
81da5d066b4ae7f3a2947f2fd4f4e67a88b5863a
refs/heads/master
2023-01-24T16:23:51.161089
2020-12-17T12:29:55
2020-12-17T12:29:55
318,002,785
0
0
null
null
null
null
UTF-8
Scilab
false
false
204
sci
lsolve.sci
function [X] =lsolve(L,b) // L matrice diagonale inf n=size(L,1) x=zeros (n); x(1)=b(1)/L(1,1) for i= 2 : n x(i) =(b(i)-L(i,(i-1)*x(1:(i-1))))/L(i,i) end endfunction
12daa9f5b1215ec0aa00449aca461d38c00ecede
449d555969bfd7befe906877abab098c6e63a0e8
/2414/CH12/EX12.15/Ex12_15.sce
bbc86d6dd414d76dabeea55cd38e660e38b1120e
[]
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
338
sce
Ex12_15.sce
clc; close(); clear(); //page no 418 //prob no. 12.15 //Absolute gains G1=20; G2=15; G3=12; //Temp in K Te1=100; Te2=200; Te3=300; //Noise figures F1=1+Te1/290; F2=1+Te2/290; F3=1+Te3/290; F=F1+(F2-1)/G1+(F3-1)/G1/G2; mprintf('Noise figure ,F=%.4f\n',F); Te=(F-1)*290; mprintf('Noise Temperature ,Te=%.0f K\n',Te);
7f5043421c18f3b8e7374c31bb71699b60f28868
449d555969bfd7befe906877abab098c6e63a0e8
/2708/CH19/EX19.4/ex_19_4.sce
af66e47689736e5a24be7ae639137ba9867df318
[]
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,008
sce
ex_19_4.sce
//Example 19.4 // Hall coefficient Hall voltage clc; clear; //given data : p=4.83D21;//constant a=.428D-9;// unil cell side in m E=.15;// fermi level in eV k=1.38D-23;// Boltzmann constant h=6.626D-34;// plank constant in J-s T=300;// temperature in kelvin me=9.1D-31;// mass of electron in kg me1=.014*me;// effective mass in kg mh=.18*me;// effective mass of hole I=.1;// current in Amp B=.1;// magnetic field in tesla b=1D-3;// width of speciman in m n=2/a^3;// no. of atoms per unit volume d=k*T/1.6D-19;// to convert in eV e=1.6D-19;// charge of electron R=1/(n*e);// Hall constant disp(R,"Hall coefficient for sodium in m3/C") // in second part InSb n1=2*((2*%pi*k*T/h^2)^1.5)*((me1*mh)^(3/4))*exp(-1*.15/(2*d)); // formula for concentration in per m3 R1=1/(n1*e);// Hall coefficient in m3/C V=R*I*B/b;// Hall voltage in V V1=R1*I*B/b// Hall voltage disp(V,"Hall voltage of sodium") disp(R1,"Hall coefficient for Insb in m3/C") disp(V1,"Hall Voltage of Insb")
ac0e123a5f5a616e33bb910a417b18c67e533f7a
0c1b318ef2ea5479e6a4df395006c510efb03896
/TP_3_3.sci
dfe4147a7df5df463d80a65da492488d65d0011b
[]
no_license
Sylfid/ProjetAF
aa731877261eb4a53c0017c70b236e1b685b59cb
d80fef4e15ec611d905f3762666bee103e568625
refs/heads/master
2020-04-08T08:11:03.848479
2018-11-27T13:46:45
2018-11-27T13:46:45
159,168,672
0
0
null
null
null
null
UTF-8
Scilab
false
false
86
sci
TP_3_3.sci
function []= TP_3_3() a = 1/20; convolution(sin(2*%pi*a*(0:39))); endfunction
98d927bf5590c3d4cd1592e4b7ee9da4c17c5940
449d555969bfd7befe906877abab098c6e63a0e8
/1553/CH24/EX24.30/24Ex30.sce
a3e7caf46aa13e67139fef66aaf9efc0cb718eae
[]
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
148
sce
24Ex30.sce
//Chapter 24 Ex 30 clc; clear; close; area=(66/7); deg=120; r=sqrt((area*360)/((%pi)*deg)); mprintf("The radius of the circle is %d cm.",r);
6c75d9fadf3bbc797d38a003e1d1a06ebe3a4cef
449d555969bfd7befe906877abab098c6e63a0e8
/2168/CH11/EX11.6/Chapter11_example6.sce
a3ca85b2f7eec3f0560c8092b8531f6891e6a425
[]
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
785
sce
Chapter11_example6.sce
clc clear //Input data n=6//Number of cylinders P=62//Power in HP N=3000//Speed in r.p.m nv=85//Volumetric efficiency in percent nt=25//Thermal efficiency in percent CV=10500//Calorific value in kcal/kg af=15//Air fuel ratio T=273//Standard atmosphere temperature in K p=1.03//Standard atmosphere pressure in kg/cm^2 R=29.27//Characteristic gas constant in kg.m/kg.K J=427//Mechanical equivalent of heat in kg.m/kcal //Calculations q=(P*4500)/(J*(nt/100))//Heat supplied in kcal/min F=(q/CV)//Fuel supplied per minute in kg Fc=(F/N)*(2/n)//Fuel supplied per cycle per cylinder in kg wt=(af*Fc)//Weight of air supplied per cycle in kg d=((((wt)*R*T)/(p*10^4*(3.14/4)*(nv/100)))^(1/3))*100//Diameter in cm //Output printf('Cylinder bore = stroke = %3.2f cm',d)
beb16895374bf6896393b9b533bdf9fa4d63708d
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set6/s_Electric_Machines_-_I_M._Verma_And_V._Ahuja_695.zip/Electric_Machines_-_I_M._Verma_And_V._Ahuja_695/CH4/EX4.5/Ex4_5.sce
421b99a2d43ef71ccd687513ac5fdfc0f00b0e10
[]
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
420
sce
Ex4_5.sce
errcatch(-1,"stop");mode(2);//Caption:Find the Efficiency //Exa:4.5 ; ; P=1200*1000;//in watts R_1=2;//in ohms R_2=0.03;//in ohms P_iron=20000;//in watts V_1p=6600;//in volts V_2p=1100/sqrt(3);//in volts a=V_1p/V_2p; R_o2=R_2+(R_1/a^2);//in ohms I_2p=P/(sqrt(3)*1100);//in amperes P_cu=3*R_o2*I_2p^2; P_t=P_iron+P_cu; P_o=0.9*P;//in watts Eff=P_o/(P_o+P_t); disp(Eff*100,'Efficiency (in %)=') exit();
388f0f5b8834496c01222f4c7f849062699fe503
449d555969bfd7befe906877abab098c6e63a0e8
/1055/CH9/EX9.5/ch9_5.sce
6aea48e0b4e0e9b41609c3e3ebb63a0ca1216260
[]
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
303
sce
ch9_5.sce
//To dtermine the equivalent star connected capacity and the kVA required. clear clc; V=20;//voltage (kV) w=314; C=2*3.04*10^-6;//capacitance per phase(micro-farad) KVA=V*V*w*C*1000; mprintf("3-phase kVA required =%.0f kVA",KVA); //Answer don't match due to difference in rounding off of digits
3961a5cd1f06eed6586341a7c0c25216e85cea70
449d555969bfd7befe906877abab098c6e63a0e8
/2204/CH5/EX5.24/ex5_24.sce
99d25e3ecaa3627e841ca983087ceada75fda276
[]
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
908
sce
ex5_24.sce
// Exa 5.24 clc; clear; close; // Given data f1 = 5;// in kHz f1 = f1 * 10^3;// in Hz f2 = 15;// in kHz f2 = f2 * 10^3;// in Hz Cdesh = 0.01;// in µF Cdesh= Cdesh * 10^-6;// in F Rdesh = 1/(2*%pi*f2*Cdesh);// in ohm A_F1 = 1.414; A_F2 = A_F1; Rdesh1 = 10;// in k ohm Rdesh_F = (A_F1-1)*Rdesh1;// in k ohm disp("(i) Low pass Filter components : ") disp(Rdesh1,"The value of Rdesh1 in kΩ is : ") disp(Rdesh*10^-3,"The value of Rdesh in kΩ is : ") disp(Rdesh_F,"The value of Rdesh_F in kΩ is : ") disp(Cdesh*10^6,"The value of Cdesh in µF is"); C = 0.05;// in µF C = C * 10^-6;// in F R = 1/(2*%pi*f1*C);//in ohm R1 = 10;// in k ohm R_F = (A_F1-1)*R1;// in k ohm disp("(ii) High pass Filter components : ") disp(R1,"The value of R1 in kΩ is : "); disp(R,"The value of R in Ω is : "); disp(R_F,"The value of R_F in kΩ is : "); disp(C*10^6,"The value of C in µF is : ");
f1eee1f72dde3db78fad593fcdbf1887367a1fc1
793c335f1b908533abaf8a266b47e942ee70b973
/logs/parsed_tree.tst
f82f527b5bbed279005d285a19ee98eddad69e5d
[]
no_license
ani555/E1-246-Assignment3
3d287fac1199986a719843d0629da034f15cd46a
861195a3582e65a5c05bfc1c0c1d0c36956ef727
refs/heads/master
2020-05-15T20:57:09.387733
2019-04-21T19:22:56
2019-04-21T19:22:56
182,490,251
0
0
null
null
null
null
UTF-8
Scilab
false
false
109
tst
parsed_tree.tst
(S (NP (DT the) (NN movie)) (VP (MD will) (VP (VB be) (NP (VBN released) (JJ next) (NN week)))) (. .))
e09f4a7e559dd1ebd1674e49e2ef59d8b0e9cc8f
449d555969bfd7befe906877abab098c6e63a0e8
/215/CH11/EX11.9/ex11_9.sce
e2aad971b93f3b2128690a7bf47e2701ece7cac6
[]
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
958
sce
ex11_9.sce
clc //Example 11.9 printf("Given") disp('Power of induction motor=50kW ,power factor is 0.8 lag,Source voltage is 230V') disp('The wish of the consumer is to raise the power factor to 0.95 lag') //Let S1 be the complex power supplied to the indiction motor V=230;Pmag=50*10^3;pf=0.8; Pang=(acos(pf)*180)/%pi S1mag=Pmag/pf S1ph=Pang x=S1mag * cos (( Pang * %pi ) /180) ; y=S1mag * sin (( Pang * %pi ) /180) ; z= complex (x,y) disp(z ,'S1=') //To achieve a power factor of 0.95 pf1=0.95 //Now the total complex power be S P1ang=(acos(pf1)*180)/%pi Smag=Pmag/pf1 Sph=P1ang a=Smag * cos (( P1ang * %pi ) /180) ; b=Smag * sin (( P1ang * %pi ) /180) ; c= complex (a,b) disp(c,'S=') //Let S2 be the complex power drawn by the corrective load S2=c-z disp(S2,'S2=') disp('Let a phase angle of voltage source selected be 0 degree') //Let I2 be the current I2=-S2/V //Let Z2 be the impedance of corrective load Z2=V/I2 disp(Z2,'Z2=')
25f991294a57751eb397eb59ad3727cd57fd7c20
449d555969bfd7befe906877abab098c6e63a0e8
/1703/CH8/EX8.2/8_2.sce
4457de14ed72b7dfd289b5f4e58f8453eb0ad042
[]
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
451
sce
8_2.sce
clear clc //initialisation of variables W= 20 //tons/hr l= 1000 //ft w= 57 //lb/ft^3 kv= 0.0205 //ft^2/sec d= 6 //in g= 32.2 //ft/sec^2 //CALCULATIONS Q= W*2240/(3600*w) A= %pi*(d/12)^2/4 v= Q/A R= v*(d/12)/kv n= w*kv/g P= 32*v*n*l/((d/12)^2*w) HP= P*2240*W/(3600*500) //RESULTS printf ('Reynolds number = %.1f ',R) printf ('\n H.P required = %.2f hp',HP) //The answer is a bit different due to rounding off error in textbook
e290684991f7c8396bb8b336de7d88faad02135b
cb8badb7b62f46da3dd1b582c4186b5b2829d5af
/ajax-scilab/get_colormap_values.sci
ff18e8e674866e879339d15ffe9f69db82945dbf
[ "MIT" ]
permissive
FOSSEE/xcos_on_cloud
e3cf7ff202a1628a875484774c87936fbd8696cf
e981d77e0c96ab5db0e01755a2531d878864266f
refs/heads/master
2023-05-12T12:12:08.955522
2023-02-16T10:25:15
2023-02-16T10:25:15
99,215,141
12
31
MIT
2023-05-02T00:18:57
2017-08-03T09:24:23
JavaScript
UTF-8
Scilab
false
false
919
sci
get_colormap_values.sci
function getvaluesfromcolormap(filename,colormapstring) f_temp = mopen(filename, 'wt'); // Creating a text file string_to_pass = strcat(["cmp_value_from_script = [",colormapstring,"]"]); //forming string ok = execstr(string_to_pass,'errcatch'); if (ok~=0) then mfprintf(f_temp, '%s', lasterror()); //catch error message if any else cmp_array = cmp_value_from_script(:); //converts to one dimensional array arry_size = size(cmp_array); // gives array of size eg. 96 1 arry_length = arry_size(1); //Get size of array eg. 96 mfprintf(f_temp, '['); for i = 1:arry_length if i == arry_length then mfprintf(f_temp, '%g', cmp_array(i)); //print values of array else mfprintf(f_temp, '%g,', cmp_array(i)); // print values of array end end mfprintf(f_temp, ']'); end endfunction
a82793b9ac06708ec67eac7880aa8cc03ba594e5
449d555969bfd7befe906877abab098c6e63a0e8
/37/CH7/EX7.1/s1.sci
5843c042492b2725f9b5e640723b71f641b7e92c
[]
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
296
sci
s1.sci
function[]=search(a,n,ele) i=1; j=0; for i=1:n if(a(i)==ele) printf("Found %d AT %d\n",ele,i); j=1; end end if(j==0) disp("%d NOT FOUND",ele); end endfunction //Calling Routine: a=[2 33 22 121 23 233 222] disp(a,"Given array"); search(a,7,23)
ae4d6ed63e6ede0787f65079ddb83d8154d468d0
b5a6d0e4c3d84d1a446434b60e55627f017991d7
/algebra_lineal.sce
db47762d15977f7fc6b201ad8b6ff11904bd159f
[]
no_license
mayra-diaz/Scilab-Funciones-Matrices
249cdec506befa4e5e88da9aaf8f6752e401153f
dc89d7dccc7fd22851e6a31867f986cb543b4c50
refs/heads/master
2022-12-10T12:50:48.449166
2020-09-14T01:10:43
2020-09-14T01:10:43
259,477,803
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,052
sce
algebra_lineal.sce
/* ------------------------------------------------------ FROBENIUS ------------------------------------------------------ */ //FROBENIUS function bool = frobenius(A,b) [m,n] = size(A) Au = [A b] ranA = rank(A) ranAu = rank(Au) if ranA == ranAu then if ranA == m then disp("El sistema es compatible determinado") bool = %T else disp("El sistema es compatible indeterminado") bool =%F end else disp("El sistema no tiene solución") bool = %F end end /* ------------------------------------------------------ SUSTITUCIONES ------------------------------------------------------ */ //SUSTITUCIÓN DIRECTA function x=sustidir(L,b) [m,n]=size(L) x=zeros(n,1) for k=1:n x(k)=(b(k)-(sum(L(k,1:k-1)*x(1:k-1))))/L(k,k) end endfunction //SUSTITUCIÓN INVERSA function x =sustinv(U,b) [m,n]=size(U) x=zeros(n,1) for k=n:-1:1 x(k)=(b(k)-(sum(U(k,k+1:n)*x(k+1:n))))/U(k,k) end endfunction /* ------------------------------------------------------ FACTORIZACIÓN LU ------------------------------------------------------ */ //CROUT function[L,U]= crout(A) [m,n]=size(A) L=A U=eye(n,n) for k=1:n-1 pivot=L(k,k) for j=k+1:n U(k,j)=L(k,j)/pivot L(:,j)=L(:,j)-U(k,j)*L(:,k) end end endfunction //DOOLITTLE function[L,U]= doolitle(A) [m,n]=size(A) U=A L=eye(n,n) for k=1:n-1 pivot=U(k,k) for j=k+1:n L(j,k)=U(j,k)/pivot U(j,:)=U(j,:)-L(j,k)*U(k,:) end end endfunction /* ------------------------------------------------------ ELIMINACIÓN GAUSSIANA ------------------------------------------------------ */ //ELIMINACIÓN GAUSSIANA function [M, s] = gauss(A, b) [m,n] = size(A) for i = 1:n-1 for j = i+1:n r = A(j,i)/A(i,i) A(j,:) = A(j,:) - r*A(i,:) b(j,:) = b(j,:) - r*b(i,:) end end s = sustinv(A, b) M = A endfunction //ELIMINACIÓN GAUSSIANA CON PIVOTEO function [M, s] = gaussPiv(A, b) [m,n] = size(A) for i = 1:n-1 // Pivotacion parcial [q,p] = max(A(i:n,i)) p = p+i-1 A = intercambiarFilas(A, i, p) b = intercambiarFilas(b, i, p) // Triangularizacion for j = i+1:n r = A(j,i)/A(i,i) A(j,:) = A(j,:) - r*A(i,:) b(j,:) = b(j,:) - r*b(i,:) end end s = sustinv(A, b) M = A endfunction //PARA EL PIVOTEO function rpta = intercambiarFilas(A, i, j) temp = A(i,:) A(i,:) = A(j,:) A(j,:) = temp rpta = A endfunction // Eliminación gaussiana matriz no cuadrada function M = gauss_no_cuadrada(A) [m,n] = size(A) for i = 1:n for j = i+1:m r = A(j,i)/A(i,i) A(j,:) = A(j,:) - r*A(i,:) end end M = A endfunction
3d12923c37ad029ee760ddaa8f513010a6b890c3
d145a801b8f64afaf9dd0330b93936ca3343cbdb
/test_suite/td_rest.tst
99cf13b7cd2796384d0459c6b9dae16df6f2f871
[]
no_license
ChemCryst/crystals
0fff27ff8576b7c7199e1eaa671407d50132b98e
8087c68d7f05b903473cee1cb131c06f819dc660
refs/heads/master
2023-08-17T16:36:03.675124
2023-06-26T10:54:29
2023-06-26T10:54:29
152,602,292
2
0
null
2023-06-26T10:54:30
2018-10-11T14:09:45
Roff
UTF-8
Scilab
false
false
3,184
tst
td_rest.tst
# # This test takes cyclo and tests symmetric and asymmetric restraints # \set time slow \rele print CROUTPUT: \ \TITLE Cyclo in P 21 21 21 \LIST 1 REAL 4.925 11.035 15.322 90.000 90.000 90.000 \SPACE SYMBOL P 21 21 21 END \ Work get scattering factors and put them into list 3 #COMPOSIT CONTE C 28. H 44. N 4. O 12. SCATT CRYSDIR:script/scatt.dat PROPERTIES CRYSDIR:script/propwin.dat END \LIST 29 READ NELEM = 4 ELEM C .8 1.5 .6 28 9.17 12 BLAC ELEM H .6 1.0 .4 44 .07 1 BLUE ELEM O .77 1.78 1.36 12 3.25 15.9994 RED ELEM N .77 1.78 -0.1 4 1.96 14.0067 LGRE END \LIST 4 END \LIST 13 COND 0.71073 END \LIST 28 END \ HOOK UP THE REFLECTION FILE #OPEN HKLI "cyclo.hkl" #HKLI READ F'S=FSQ NCOEF = 5 TYPE = FIXED CHECK = NO INPUT H K L /FO/ SIGMA(/FO/) FORMAT (3F4.0, 2F8.0) STORE NCOEF=6 OUTPUT INDICES /FO/ SIGMA(/FO/) RATIO/JCODE CORRECTIONS SERIAL END \SYST \SORT \MERGE REFLECTION LIST=LOW \LIST 6 \ STORE REFLECTIONS ON DISC FOR FUTURE USE READ TYPE = COPY END #purg end #list 12 block o(6,u's) c(7,u's) end #use td_rest.l5 #list 16 comp exec u(ij) 0.0,.001 = o(6) to c(7) end #list 26 end #check hi end #sfls ref end #check hi end #use td_rest.l5 #list 16 u(ij) 0.0,.001 = c(7) to o(6) end #list 26 end #check hi end #sfls ref end #check hi end # ------------------------------------- #use td_rest.l5 #list 16 vib 0.0,.001 = o(6) to c(7) end #list 26 end #check hi end #sfls ref end #check hi end #use td_rest.l5 #list 16 vib 0.0,.001 = c(7) to o(6) end #list 26 end #check hi end #sfls ref end #check hi end #purg end #title Now test asymmetric restraints #use td_rest.l5 #list 16 a-u(ij) 0.0,.001 = o(6) to c(7) end #list 26 end #check hi end #sfls ref end #check hi end #use td_rest.l5 #list 16 a-u(ij) 0.0,.001 = c(7) to o(6) end #list 26 end #check hi end #sfls ref end #check hi end # ------------------------------------- #use td_rest.l5 #list 16 a-vib 0.0,.001 = o(6) to c(7) end #list 26 end #check hi end #sfls ref end #check hi end #use td_rest.l5 #list 16 a-vib 0.0,.001 = c(7) to o(6) end #list 26 end #check hi end #sfls ref end #check hi end #list 12 block c(2,x's) c(11,x's) end #list 22 end #use td_rest.l5 #purge end #check hi end #LIST 16 DIST 1.55,.0001 = C(2) TO C(11) END #list 26 end #sfls ref end #check hi end #use td_rest.l5 #purge end #LIST 16 a-DIST 1.55,.0001 = C(2) TO C(11) END #list 26 end #sfls ref end #sfls ref end #check hi end #end
3f655ceb00a511c988fd9e4e2056e896191956ad
449d555969bfd7befe906877abab098c6e63a0e8
/24/CH27/EX27.3/Example27_3.sce
4c89fad77582dd60f1b8bb5841a78d5c1f09d665
[]
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
331
sce
Example27_3.sce
//Given that r = 900*10^-6 //in m i = 17*10^-3 //in A e = 1.6*10^-19 //in C densityCopper = 8.96*10^3 //in kg/m^3 M = 63.54*10^-3 //in kg/mol Na = 6.023*10^23 //Sample Problem 27-3 printf("**Sample Problem 27-3**\n") A = %pi*r^2 J = i/A n = densityCopper/M*Na Vd = J/(n*e) printf("The drift speed is %em/s", Vd)
33ebe862002738bbecc6a87b1e4ac7f863ab32d4
449d555969bfd7befe906877abab098c6e63a0e8
/275/CH3/EX3.3.17/Ch3_3_17.sce
f5eb703ea6b81dd8472b989be93d61beaa1380e4
[]
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
484
sce
Ch3_3_17.sce
clc disp("Example 3.17") printf("\n") disp("calculate the value of beta for transistor. find new collector current when beta of new transistor is 70") printf("Given\n") //old transistor Ic=3*10^-3 Ie=3.03*10^-3 //find Ib Ib=Ie-Ic //value of beta beta=Ic/Ib //for new transistor beta=70 beta1=70 //the value of Ic Ic=beta1*Ib printf("base current \n%f ampere\n",Ib) printf("beta \n%f\n",beta) printf("new value of collector current for beta 70 is \n%f ampere\n",Ic)
303edfca480ba0459bd6edf36874c862c61b3963
449d555969bfd7befe906877abab098c6e63a0e8
/2411/CH5/EX5.13/Ex5_13.sce
fdfc680b6cc84606e8585000fdd525ad5c44b2a6
[]
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,498
sce
Ex5_13.sce
// Scilab Code Ex5.13: Page-289 (2008) clc; clear; c = 3e+008; // Speed of light, m/s e = 1.602e-019; // Energy equivalent of 1 eV, J h = 6.6e-034; // Planck's constant, Js m0 = 9.1e-031; // Rest mass of an electron, kg alpha = [90 60 45 180]; // Different scattering angle for X-ray photon, degrees d_lambda = zeros(4); for i = 1:1:4 d_lambda(i) = h/(m0*c*1e-010)*(1-cosd(alpha(i))); // Wavelength shift after collision, angstrom printf("\nFor alpha = %d degree, d_lambda = %6.4f angstrom", alpha(i), d_lambda(i)); end lambda = 0.2; // Given wavelength of incident X-ray photon, angstrom lambda_prime = lambda + d_lambda(3); // Wavelength of the scattered photon at 45 degree, angstrom printf("\nThe wavelength of the photon scattered at 45 degree = %5.3f angstrom", lambda_prime); lambda_prime = lambda + d_lambda(4); // Maximum wavelength of the photon scattered at 180 degree, angstrom KE_max = h*c*1e+010*(1/lambda - 1/lambda_prime); // Maximum kinetic energy of the recoil electron, J printf("\nThe maximum kinetic energy of the recoil electron = %4.2e J", KE_max); // Result // For alpha = 90 degree, d_lambda = 0.0242 angstrom // For alpha = 60 degree, d_lambda = 0.0121 angstrom // For alpha = 45 degree, d_lambda = 0.0071 angstrom // For alpha = 180 degree, d_lambda = 0.0484 angstrom // The wavelength of the photon scattered at 45 degree = 0.207 angstrom // The maximum kinetic energy of the recoil electron = 1.93e-015 J
9ccda50da1b9ed73fd682502510cf7929c7432cf
449d555969bfd7befe906877abab098c6e63a0e8
/269/CH10/EX10.18/ex18.sce
3287158818dded6d27e46154e2f3def6d80d1d31
[]
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
231
sce
ex18.sce
s=%s p=s^3+2*s^2+2*s+4 h=routh_t(p) disp(h) disp("constant term 4 causes the system to be unstable") disp("so the polynomial formed is") disp("2*s^2+4") disp("applyin RH on this polynomial") q=s^2+2 r=routh_t(q) disp(r)
b8077af66fc21311feca64eb421ad6cf9384abc7
449d555969bfd7befe906877abab098c6e63a0e8
/1994/CH8/EX8.21/Example8_21.sce
0761122c09e2db563a9b0cb6f050dbb1c42374cf
[]
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
341
sce
Example8_21.sce
//Chapter-8,Example8_21,pg 8_64 w=2*%pi*1000 C1=0.2*10^-6 R2=500 R3=300 C3=0.1*10^-6 Z4=(%i*w*C1*R2)/((1/R3)+(%i*w*C3))//from basic balance equaton Zx=Z4//unknown impedance Rx=real(Zx) Xl=imag(Zx) Lx=Xl/w//Xl=w*Lx printf("unknown resistance\n") printf("Rx=%.2f ohm\n",Rx) printf("unknown inductance\n") printf("Lx=%.5f H",Lx)
4018bcc5e407c11a369651029da4b822de687489
0e1b45c07f0938ba9c8a003d6ae1cf2d8315efdb
/uva.onlinejudge.org/112, Tree Summing/test3.tst
1bb478e34f25afc7e2b5e94bcb92a8f2f6866914
[]
no_license
Kot-Angens/acm
c85d8582c3e84f218415321743864b9680e01f2e
05472eaa0fff7abb6679826085da5e0c990df4cb
refs/heads/master
2021-01-24T22:36:05.159612
2012-10-02T13:51:56
2012-10-02T13:51:56
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
564
tst
test3.tst
22 (5(4(11(7()())(2()()))()) (8(13()())(4()(1()())))) 20 (5(4(11(7()())(2()()))()) (8(13()())(4()(1()())))) 10 (3 (2 (4 () () ) (8 () () ) ) (1 (6 () () ) (4 () () ) ) ) 5 () 0 () 5 (5 () ()) 5 ( 5 () () ) 5 (1 (3 () ()) (4 () ())) 5 (18 ( - 13 ( ) ( ))()) 0 (1 ()(-2 () (1()()) ) ) 2 (1 () (1 () (1 () () ) ) ) 10 (5 () (5 () (5 () (5 () (4 () () ) ) ) ) ) 10 (5 () (5 () (5 () (5 ( 3 () () ) (4 () () ) ) ) ) ) 20 (5 () (5 () (5 () (5 () (4 () () ) ) ) ) ) ~~~~~~~~~~~~~~~~~~~~~~~~ yes no yes no no yes yes yes yes yes no no no no
842b0be8fef92f98371435960a21169d1799a27b
449d555969bfd7befe906877abab098c6e63a0e8
/3369/CH2/EX2.5/Ex2_5.sce
e3a24bd96bba66e7493535f24f70655ec7b3c073
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
441
sce
Ex2_5.sce
//Chapter 2, Example 5, page 65 //Calculate the maximum field at the sphere surface clc clear //Calulating Field at surface E based on figure 2.31 and table 2.3 Q1 = 0.25 e0 = 8.85418*10**-12 //Epselon nought RV1= ((1/0.25**2)+(0.067/(0.25-0.067)**2)+(0.0048/(0.25-0.067)**2)) RV2= ((0.25+0.01795+0.00128)/(0.75-0.067)**2) RV= RV1+RV2 E = (Q1*RV)/(4*%pi*e0) printf("Maximum field = %e V/m per volt",E) //Answers vary due to round off error
09d50a5fb2c100d28b1c14500ad93f3e12149bd8
e82d1909ffc4f200b5f6d16cffb9868f3b695f2a
/Lista 1/Quinta.sce
c904d661dde72821eaab67bf0a336778a44dde79
[]
no_license
AugustoCam95/Computational-Linear-Algebra
eb14307dd3b45ccc79617efe74d1faca639c36c5
99b1a1f9499fbc4343bd5c878444e9e281952774
refs/heads/master
2020-03-30T22:26:23.790763
2018-10-05T03:34:06
2018-10-05T03:34:06
151,666,289
0
0
null
null
null
null
UTF-8
Scilab
false
false
251
sce
Quinta.sce
// José Augusto Câmara Filho - Matemática Industrial function Quinta(k) soma=0; for i=1:k soma= (1/((i)^2)+soma); end x=6*soma; x=sqrt(x); a = printf('%.6G',x); //disp(a) endfunction
9415b0f5e4f318e79115aa4846dc423a6c391101
449d555969bfd7befe906877abab098c6e63a0e8
/1802/CH7/EX7.7/Exa7_7.sce
d1d9f3b382bfdece23719f831d2ae8a008eda436
[]
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
411
sce
Exa7_7.sce
//Exa 7.7 clc; clear; close; //Given data : format('v',6); R=0.2;//in ohm/km X=0.1;//in ohm/km ZAM=((R+%i*X)/1000)*200;//in ohm ZMB=((R+%i*X)/1000)*100;//in ohm I1=100*(0.707-0.707*%i);//in A I2=200*(0.8-0.6*%i);//in A IAM=I1+I2;//in Ampere VAM=ZAM*IAM;//in volts VMB=ZMB*I2;//in volts VAB=VAM+VMB;//in volts magVAB=sqrt(real(VAB)^2+imag(VAB)^2); disp(magVAB,"Total voltage drop(in volts) :");
4bf6186b08269bb02289b60a3a8c128e579fbb9f
449d555969bfd7befe906877abab098c6e63a0e8
/3834/CH12/EX12.3.3/Ex12_3_3.sce
5c08c844fe37941c7b098cb577031c6e943bb9b0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
708
sce
Ex12_3_3.sce
//Fiber Optics Communication Technology, by Djafer K. Mynbaev and Lovell L.scheiner //Windows 8 //Scilab version- 6.0.0 //Example 12.3.3 clc; clear; //given x=0.96;//assumed R*Gs value L=500E-4;//assumed length of a typical travelling-wave semiconductor amplifier in cm n=3.6;//refractive index of SOA medium c=3e10//spped of light in vaccum in cm/s v=c/n//speed of light within resonant cavity in cm/s y=asin((1-x)/(2*sqrt(x))); BWfpa=((v/L)*y);//Bandwidth of Fabry-perot semiconductor amplifier mprintf("Bandwidth of Fabry-perot semiconductor amplifier = %.2f *10^9 rad/s.",BWfpa/1e9);//division by 1e9 to convert unit from rad/s to 10^9 rad/sec //the answer given in the book is wrong//
324893f12fc6261ecb44567aa2b9e5ab6f34754a
449d555969bfd7befe906877abab098c6e63a0e8
/2126/CH3/EX3.11/11.sce
1f28411fe65706b8d621fd7b73e726c91f8367bd
[]
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,046
sce
11.sce
clc clear //input data D=0.3 //inner duct diameter in m P1=10 //Static pressure at entrance in bar T1=400 //Static temperature at entry in Kelvin M1=3 //Mach number at entrance M2=1 //Mach number at exit k=1.3 //Adiabatic constant R=287 //Specific Gas constant in J/kg-K, wrong printing in question f=0.002 //frictional factor //calculation p1=0.233 //Pressure ratio from gas tables (M=3,k=1.4,isentropic) Pt=P1/p1 //Static pressure at entrance in bar t1=0.489 //Temperature ratio from gas tables (M=3,k=1.4,isentropic) Tt=T1/t1 //Static temperature at entrance in K X1=0.628 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.3 L1=(X1*D)/(4*f) //Length of the pipe in m d_t=(Pt*10^5)/(R*Tt) //Density at critical state in kg/m^3, Pt in Pa at=sqrt(k*R*Tt) //Sound velocity in m/s, R in J/kg Ct=at //air velocity in m/s At=(%pi*D^2)/4 //Critical area in m^2 m=d_t*At*Ct //Mass flow rate in kg/s //output printf('(A)Length of the pipe is %3.2f m\n (B)Mass flow rate is %3.3f kg/s',L1,m)
0bdd836c29fc5adb8844233cc6ad7c912d80f663
449d555969bfd7befe906877abab098c6e63a0e8
/1658/CH27/EX27.4/Ex27_4.sce
9a5eba1941629e91d665582f4bfa84a8ccfe6d15
[]
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
123
sce
Ex27_4.sce
clc; //e.g 27.4 Vo=12.5; Vin1=1.5; Vin=0.25; AV=Vo/Vin; disp(AV); AV1=Vo/Vin1; beta=((AV/AV1)-1)/AV; disp(beta);
4d9d182341c0a25f5b5713c41e602dca115dad05
449d555969bfd7befe906877abab098c6e63a0e8
/257/CH8/EX8.27/example_8_27.sce
d1a4ff4966d36e01dbc1969f38e34244b251fe57
[]
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
596
sce
example_8_27.sce
s=%s //P=s^4+2*s^3+3*s^2+s+1 s'=%s P=(s'-1)^4+2*(s'-1)^3+3*(s'-1)^2+(s'-1)+1 //putting s=s'-1 routh=routh_t(P) disp(routh) r=coeff(P) n=length(r) c=0; for i=1:n if (routh(i,1)<0) c=c+1; end end if(c>=1) printf("there are 2*%d roots to the right of s=-1",c) //2 terms with negetive signs implies 4 sign changes// else printf("system is stable") end F=(s'-0.5)^4+2*(s'-0.5)^3+3*(s'-0.5)^2+(s'-0.5)+1 disp(routh_t(F)) r=coeff(F) rouths=routh_t(F) n=length(r) printf("there are 2 sign changes.so there are 2 roots to the right of s=-0.5")
75d2130793ed1745cc58b462cc8337590df9aad4
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/1.1/Unix/scilab-1.1/macros/percent/%pdr.sci
6b6f4e93667c5e852e7a34d507f0708a6d9e8eec
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference" ]
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
202
sci
%pdr.sci
//<r>=%pdr(p,r) // %pdr(p,r) calcule le quotient element par element d'une matrice de //polynomes p par une matrice de fractions rationnelles r (operation ./) //! [n,d]=r(2:3) r(2)=d.*p;r(3)=n; //end
66608892454232940382886676eb7b0ec0789786
449d555969bfd7befe906877abab098c6e63a0e8
/2231/CH1/EX1.23/Ex_1_23.sce
12f900afae2698797d53fcab895a0c8ae3abfa96
[]
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
Ex_1_23.sce
//Example 1_23 clc; clear;close; //Given data: P=30;//W T1=125;//degreeC T2=50;//degreeC theta=1;//degree C/W theta_mica=0.3;//degree C/W Rth_total=(T1-T2)/P;//degree C/W Rth_heat_sink=Rth_total-theta-theta_mica;//degree C/W disp(Rth_heat_sink,"Thermal resistance of heat sink in degree C/W ");
8c04727b921e2dc9c34b0067614768cc049e48b6
25033eda4e7cd13f945f94c5dc35f15825066b42
/Inria/2 cohorts/Tinfini/selection gradient.sce
0136bd7047302249cf57fdb57c7cf7d1c47fdc78
[]
no_license
julienguegan/Internships
a26cb9efa2f1715832511a7aa94d25bfc675388b
ad51d5845ed8fd41e29259c95e8beff80bac65cf
refs/heads/master
2020-12-20T21:54:29.099157
2020-01-25T19:20:10
2020-01-25T19:20:10
236,217,889
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,045
sce
selection gradient.sce
exec('C:\Users\Julien Guégan\Documents\Cours\MAM4\STAGE\2 cohorts\Tinfini\PIP - Tinfini.sce',-1) f=scf() f.color_map = rainbowcolormap(32); surf(s) xlabel("$M1σ$") ylabel("$M2σ$") zlabel("$s$") title("$s(r,m) = \lim_{n_2(0) \to 0} \frac{n_2(1)}{n_2(0)}$",'fontsize',3) scf() //affichage de s(x,x*) avec ds/dy=0 X = 1:length(Mσ) snglr = find(Mσ == 1900) plot(Mσ,s(snglr,X)) xlabel("$y$") ylabel("$s$") title("$s(x,x*)$",'fontsize',3) ind = find(s(snglr,X)==max(s(snglr,X))) maxi = Mσ(ind) plot([Mee,Mee],[s(snglr,1),s(snglr,ind)],'r--') xstring(maxi-200,s(snglr,1),"Mmax = "+string(maxi)) plot([maxi,maxi],[s(snglr,1),s(snglr,ind)],'k--') xstring(Mee,s(snglr,1),"M* = "+string(Mee)) gce().font_color = 5; xstring(1900,s(snglr,snglr), "$\frac{\partial s}{\partial y} = 0$") plot([1500 2200],[s(snglr,ind) s(snglr,ind)],'r--') h = step for x = 2:length(Mσ)-1 gradselect(x-1) = (s(x,x+1)-s(x,x-1))/(2*h) //difference centrée end scf() //affichage de ds/dy(x,x) y = 2:length(Mσ)-1 plot(Mσ(y),gradselect) plot([Mσ(1),Mσ(length(y))],[0,0],'r--') xarrows([1400:50:1800;1410:50:1850],zeros(2,9),400) xarrows([2310:-50:1950;2300:-50:1920],zeros(2,8),400) plot([Mee,Mee],[0,0],'k.') plot([Mee,Mee],[gradselect(1),gradselect(length(y))],'r--') xstring(Mee,gradselect(1),"M* = "+string(round(Mee))) gce().font_color = 5; Mmax = interp1(gradselect,Mσ(y),0) plot([Mmax,Mmax],[gradselect(1),gradselect(length(y))],'k--') xstring(Mmax-150,gradselect(length(y)),"M = "+string(round(Mmax))) title("$gradient\ de\ selection : \frac{\partial s}{\partial y}(x,y=x) $",'fontsize',3) xlabel("Mσ") /* title('$canonical\ equation\ :\ \frac{d}{dt}x = \frac{\partial s}{\partial y}(x,x)$','fontsize',3) */ hesselecty = (s(snglr,snglr+1)- 2*s(snglr,snglr)+s(snglr,snglr-1))./(h^2) hesselectx = (s(snglr+1,snglr)- 2*s(snglr,snglr)+s(snglr-1,snglr))./(h^2) if(hesselecty<0) then disp('ESS') end if (hesselecty<hesselectx) then disp('stable par convergence') end if (hesselecty>0)&(hesselectx>0) then disp('mutuellement invasible') end
24ddba0b9a5a2c0127f1b12d1d69f0b6ecfb12fd
449d555969bfd7befe906877abab098c6e63a0e8
/3871/CH3/EX3.24/Ex3_24.sce
e1e96f4243d80f031977e897c60a4da8a7577d6d
[]
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,594
sce
Ex3_24.sce
//=========================================================================== //chapter 3 example 24 clc;clear all; //variable declaration x1 = 1.570; //voltage in V x2 = 1.597; //voltage in V x3 = 1.591; //voltage in V x4 =1.562; //voltage in V x5 =1.577; //voltage in V x6 = 1.580; //voltage in V x7 = 1.564; //voltage in V x8 = 1.586; //voltage in V x9 = 1.550; //voltage in V x10 = 1.575; //voltage in V n =10; //ccalculations x =(x1+x2+x3+x4+x5+x6+x7+x8+x9+x10)/(10); //arthimetic mean d1 =x1-x; //deviation d2 =x2-x; //deviation d3 =x3-x; //deviation d4 =x4-x; //deviation d5 =x5-x; //deviation d6 =x6-x; //deviation d7 =x7-x; //deviation d8 =x8-x; //deviation d9 =x9-x; //deviation d10 =x10-x; //deviation D =(abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8)+abs(d9)+abs(d10))/(n); d = ((d1^2)+(d2^2)+(d3^2)+(d4^2)+(d5^2)+(d6^2)+(d7^2)+(d8^2)+(d9^2)+(d10^2)); sigma = sqrt(d/(n-1)); //standard devation r = 0.6745*sigma; //probable error of one reading v = sigma^2; rm = r/(sqrt(n-1)); //probable error of mean in V //result mprintf("arthimetic mean = %3.3f",x); mprintf("\naverage deviation = %3.3f gramme",D); mprintf("\nstandard deviation = %3.5f gramme*2",sigma); mprintf("\nprobable error of one reading = %3.5f gramme",r); mprintf("\n variance= %3.3e gramme^2",v); mprintf("\nprobable error of mean = %3.4f gramme",rm);
55c714079008af34b35e7d1106b18f9580e50025
449d555969bfd7befe906877abab098c6e63a0e8
/24/CH10/EX10.1/Example10_1.sce
ba9658406f5157b3b7255cc241e0f3de29167679
[]
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
759
sce
Example10_1.sce
exec("degree_rad.sci",-1) //Given that m = 140 * 10^-3 //in kg Vi = -39 //in m/s Vf = 39 //in m/s //Sample Problem 10-1a printf("**Sample Problem 10-1a**\n") //J = Pf - Pi J = m *(Vf - Vi) printf("The magnitude of impulse acted on the ball from bat is equal to %fN-s\n", J) //Sample Problem 10-1b printf("\n**Sample Problem 10-1b**\n") t = 1.20* 10^-3 //in sec Favg = J/t printf("The average force during the collision is %fN\n", Favg) //Sample Problem 10-1c printf("\n**Sample Problem 10-1c**\n") Vf = 45* [cos(dtor(30)), sin(dtor(30))] Vi = [-39, 0] J = m* (Vf - Vi) printf("The magnitude of new inpulse is %fN-s\n", norm(J)) printf("The new impulse makes an angle of %f degress with the horizontal", rtod(atan(J(2)/ J(1))))
28390105d9cc750007f970eeeb51dbb19f4f91cb
7eaf54a78c9e2117247cb2ab6d3a0c20719ba700
/SOFTWARE/A64-TERES/linux-a64/scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst
04f4034ff895a11b3c544bcca4553fe792e708f7
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "Linux-syscall-note", "GPL-2.0-only", "GPL-1.0-or-later" ]
permissive
OLIMEX/DIY-LAPTOP
ae82f4ee79c641d9aee444db9a75f3f6709afa92
a3fafd1309135650bab27f5eafc0c32bc3ca74ee
refs/heads/rel3
2023-08-04T01:54:19.483792
2023-04-03T07:18:12
2023-04-03T07:18:12
80,094,055
507
92
Apache-2.0
2023-04-03T07:05:59
2017-01-26T07:25:50
C
UTF-8
Scilab
false
false
2,931
tst
t5-l4-pi-boost-deboost-setsched.tst
# # rt-mutex test # # Op: C(ommand)/T(est)/W(ait) # | opcode # | | threadid: 0-7 # | | | opcode argument # | | | | # C: lock: 0: 0 # # Commands # # opcode opcode argument # schedother nice value # schedfifo priority # lock lock nr (0-7) # locknowait lock nr (0-7) # lockint lock nr (0-7) # lockintnowait lock nr (0-7) # lockcont lock nr (0-7) # unlock lock nr (0-7) # signal thread to signal (0-7) # reset 0 # resetevent 0 # # Tests / Wait # # opcode opcode argument # # prioeq priority # priolt priority # priogt priority # nprioeq normal priority # npriolt normal priority # npriogt normal priority # locked lock nr (0-7) # blocked lock nr (0-7) # blockedwake lock nr (0-7) # unlocked lock nr (0-7) # opcodeeq command opcode or number # opcodelt number # opcodegt number # eventeq number # eventgt number # eventlt number # # 5 threads 4 lock PI - modify priority of blocked threads # C: resetevent: 0: 0 W: opcodeeq: 0: 0 # Set schedulers C: schedother: 0: 0 C: schedfifo: 1: 81 C: schedfifo: 2: 82 C: schedfifo: 3: 83 C: schedfifo: 4: 84 # T0 lock L0 C: locknowait: 0: 0 W: locked: 0: 0 # T1 lock L1 C: locknowait: 1: 1 W: locked: 1: 1 # T1 lock L0 C: lockintnowait: 1: 0 W: blocked: 1: 0 T: prioeq: 0: 81 # T2 lock L2 C: locknowait: 2: 2 W: locked: 2: 2 # T2 lock L1 C: lockintnowait: 2: 1 W: blocked: 2: 1 T: prioeq: 0: 82 T: prioeq: 1: 82 # T3 lock L3 C: locknowait: 3: 3 W: locked: 3: 3 # T3 lock L2 C: lockintnowait: 3: 2 W: blocked: 3: 2 T: prioeq: 0: 83 T: prioeq: 1: 83 T: prioeq: 2: 83 # T4 lock L3 C: lockintnowait: 4: 3 W: blocked: 4: 3 T: prioeq: 0: 84 T: prioeq: 1: 84 T: prioeq: 2: 84 T: prioeq: 3: 84 # Reduce prio of T4 C: schedfifo: 4: 80 T: prioeq: 0: 83 T: prioeq: 1: 83 T: prioeq: 2: 83 T: prioeq: 3: 83 T: prioeq: 4: 80 # Increase prio of T4 C: schedfifo: 4: 84 T: prioeq: 0: 84 T: prioeq: 1: 84 T: prioeq: 2: 84 T: prioeq: 3: 84 T: prioeq: 4: 84 # Reduce prio of T3 C: schedfifo: 3: 80 T: prioeq: 0: 84 T: prioeq: 1: 84 T: prioeq: 2: 84 T: prioeq: 3: 84 T: prioeq: 4: 84 # Increase prio of T3 C: schedfifo: 3: 85 T: prioeq: 0: 85 T: prioeq: 1: 85 T: prioeq: 2: 85 T: prioeq: 3: 85 T: prioeq: 4: 84 # Reduce prio of T3 C: schedfifo: 3: 83 T: prioeq: 0: 84 T: prioeq: 1: 84 T: prioeq: 2: 84 T: prioeq: 3: 84 T: prioeq: 4: 84 # Signal T4 C: signal: 4: 0 W: unlocked: 4: 3 T: prioeq: 0: 83 T: prioeq: 1: 83 T: prioeq: 2: 83 T: prioeq: 3: 83 # Signal T3 C: signal: 3: 0 W: unlocked: 3: 2 T: prioeq: 0: 82 T: prioeq: 1: 82 T: prioeq: 2: 82 # Signal T2 C: signal: 2: 0 W: unlocked: 2: 1 T: prioeq: 0: 81 T: prioeq: 1: 81 # Signal T1 C: signal: 1: 0 W: unlocked: 1: 0 T: priolt: 0: 1 # Unlock and exit C: unlock: 3: 3 C: unlock: 2: 2 C: unlock: 1: 1 C: unlock: 0: 0 W: unlocked: 3: 3 W: unlocked: 2: 2 W: unlocked: 1: 1 W: unlocked: 0: 0
bf9fc811df3f81761a04a57f1e80f02298bf616f
fbe5bdb3b3ea6f71d29eff0df47cf845a1dbe2f9
/CatEngine/Game files/AssetData/Levels/Test4/Scenario/scenario1 - Copy.sce
38bccc7382b39b8b6f7d3f768c2ff3f93c657a9c
[]
no_license
CatoNator/CatEngine
175c1c9a10842d0a4276bcdd096199d031d3a69f
bc8b4a29c7665152a38deb16abf1adf13d854c3a
refs/heads/master
2021-07-14T09:58:24.509668
2020-05-27T17:02:05
2020-05-27T17:02:05
148,532,596
0
0
null
null
null
null
UTF-8
Scilab
false
false
417
sce
scenario1 - Copy.sce
<scenario name="Test Scenario"> <objective type="Survive"> <timer time="240"/> <enemyspawn type="CAamu" amount="69" x="0" y="0"/> </objective> <objective type="Reach"> <checkpoint x="40" y="40"/> <enemyspawn type="CAamu" amount="69" x="0" y="0"/> </objective> <objective type="Kill"> <target type="CAamuCiv" x="80" y="80"/> <enemyspawn type="CAamu" amount="69" x="0" y="0"/> </objective> </scenario>
d763288a1f1f9ea64e358fa0563f83842a6eb0a2
449d555969bfd7befe906877abab098c6e63a0e8
/3886/CH5/EX5.10/5_10.sce
c1799536df630a945d8c3dda65436c76772971a2
[]
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
375
sce
5_10.sce
//Value of force P //refer fig. 5.14 mu=0.25 //Let fi be the angle of limiting friction fi=atand(0.25) //degree //Consider equilibrium of block C //apply Lami's theorem R1=160*sind(180-16-fi)/sind(2*(fi+16)) //kN //Consider equilibrium of Wedge A //apply Lami's theorem P=R1*sind(180-fi-fi-16)/sind(90+fi) //kN printf("The required value is P=%0.3f kN",P)
ad665fb61039fb384862737b7fbb1ab46766ce79
449d555969bfd7befe906877abab098c6e63a0e8
/779/CH16/EX16.12/16_12.sce
8f4c8fd5b6849c2a8eaa7517b57fab1848caafbf
[]
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,276
sce
16_12.sce
T0 = 298.15; P0 = 1; R = 8.3143; xn2 = 0.7567; xo2 = 0.2035; xh2o = 0.0312; xco2 = 0.0003; // Part (a) g_o2 = 0; g_c = 0; g_co2 = -394380; A = -g_co2 + R*T0*log(xo2/xco2); disp("kJ/k mol",A,"The chemical energy of carbon is") // Part (b) g_h2 = 0; g_h2o_g = -228590; B = g_h2 + g_o2/2 - g_h2o_g + R*T0*log(xo2^0.5/xh2o); disp("kJ/k mol",B,"The chemical energy of hydrogen is") // Part (c) g_ch4 = -50790; C = g_ch4 + 2*g_o2 - g_co2 - 2*g_h2o_g + R*T0*log((xo2^2)/(xco2*xh2o)); disp("kJ/k mol",C,"The chemical energy of methane is") // Part (d) g_co = -137150; D = g_co + g_o2/2 - g_co2 + R*T0*log((xo2^0.5)/xco2); disp("kJ/k mol",D,"The chemical energy of Carbonmonoxide is") // Part (e) g_ch3oh = -166240; E = g_ch3oh + 1.5*g_o2 - g_co2 - 2*g_h2o_g + R*T0*log((xo2^1.5)/(xco2*(xh2o^2))) disp("kJ/k mol",E,"The chemical energy of methanol is") // Part (f) F = R*T0*log(1/xn2); disp("kJ/k mol",F,"The chemical energy of nitrogen is") // Part (g) G = R*T0*log(1/xo2); disp("kJ/k mol",G,"The chemical energy of Oxygen is") // Part (h) H = R*T0*log(1/xco2); disp("kJ/k mol",H,"The chemical energy of carbondioxide is") // Part (i) g_h2o_l = -237180; I = g_h2o_l - g_h2o_g + R*T0*log(1/xh2o); disp("kJ/k mol",I,"The chemical energy of water is")
49293aafd5a06f5ea051bec17b41af4b3dcbc111
449d555969bfd7befe906877abab098c6e63a0e8
/3701/CH4/EX4.3/Ex4_3.sce
57b415d7777f4180c6526682aec69b47d395f2ab
[]
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
352
sce
Ex4_3.sce
////Given m=1.675*10**-27 //mass of neutron in kg v=1.4*10**-10 //de broglie wavelength in m h=6.63*10**-34 //Js //Calculation K=(h**2/(2*m*(v**2)))/(1.6*10**-19) //Result printf("\n Kinetic energy of neutron is %0.2f *10**-2 ev",K*10**2)
c7dcd6544a6e0d2e8b13babda3304310db308453
449d555969bfd7befe906877abab098c6e63a0e8
/3176/CH9/EX9.9/Ex9_9.sce
7630d366429f8a3d3e41bdabeea2e8881fce5dc4
[]
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
3,222
sce
Ex9_9.sce
//Ex9_9 // Illustration of Gray Scale Erosion and Dilation // Version : Scilab 5.4.1 // Operating System : Window-xp, Window-7 //Toolbox: Image Processing Design 8.3.1-1 //Toolbox: SIVP 0.5.3.1-2 //Reference book name : Digital Image Processing //book author: Rafael C. Gonzalez and Richard E. Woods clc; close; clear; xdel(winsid())//to close all currently open figure(s). function [f]=restoration_filter(v,type,m,n,Q,d) if argn(2) ==2 m=7;n=7;Q=1.5;d=10; elseif argn(2)==5 Q=parameter;d=parameter; elseif argn(2)==4 Q=1.5;d=2; else disp('wrong number of inputs'); end select type case'median' f=MedianFilter(v,[m n]); case'MIN' size1=m; [nr,nc]=size(v); temp=zeros(nr+2*floor(size1/2),nc+2*floor(size1/2)); temp(ceil(size1/2):nr+ceil(size1/2)-1,ceil(size1/2):nc+ceil(size1/2)-1)=v(1:$,1:$); for i=ceil(size1/2):nr+ceil(size1/2)-1 for j=ceil(size1/2):nc+ceil(size1/2)-1 t=temp(i-floor(size1/2):1:i+floor(size1/2),j-floor(size1/2):1:j+floor(size1/2)) ; y=gsort(t); temp2(i-floor(size1/2),j-floor(size1/2))=min(y); end end f=mat2gray(temp2); case'MAX' size1=m; [nr,nc]=size(v); temp=zeros(nr+2*floor(size1/2),nc+2*floor(size1/2)); temp(ceil(size1/2):nr+ceil(size1/2)-1,ceil(size1/2):nc+ceil(size1/2)-1)=v(1:$,1:$); for i=ceil(size1/2):nr+ceil(size1/2)-1 for j=ceil(size1/2):nc+ceil(size1/2)-1 t=temp(i-floor(size1/2):1:i+floor(size1/2),j-floor(size1/2):1:j+floor(size1/2)) ; y=gsort(t); temp2(i-floor(size1/2),j-floor(size1/2))=max(y); end end f=mat2gray(temp2); case'Mid_Point' size1=m; [nr,nc]=size(v); temp=zeros(nr+2*floor(size1/2),nc+2*floor(size1/2)); temp(ceil(size1/2):nr+ceil(size1/2)-1,ceil(size1/2):nc+ceil(size1/2)-1)=v(1:$,1:$); for i=ceil(size1/2):nr+ceil(size1/2)-1 for j=ceil(size1/2):nc+ceil(size1/2)-1 t=temp(i-floor(size1/2):1:i+floor(size1/2),j-floor(size1/2):1:j+floor(size1/2)) ; y=gsort(t); temp2(i-floor(size1/2),j-floor(size1/2))=0.5*(min(y)+max(y)); end end f=mat2gray(temp2); else disp('Unknownfiltertype.') end endfunction ///////////////////////////////////// Main Programm //////////////////// a=imread("Ex9_9.png"); gray=rgb2gray(a); //gray=im2double(gray); figure,ShowImage(gray,'Gray Image'); title('Original X-Ray Image','color','blue','fontsize',4); [M,N]=size(gray); //////////////////////////////////// MIN Filter //////////////////// h=restoration_filter(gray,'MIN',3,3); figure,ShowImage(h,'Recovered Image'); title('Erosion using Flat Structuring Element','color','blue','fontsize',4); /////////////////////////////////// MAX Filter //////////////////// h=restoration_filter(gray,'MAX',3,3); figure,ShowImage(h,'Recovered Image'); title('Dilation using Flat Structuring Element','color','blue','fontsize',4);
d13a8e042f54d5e676b549d801640fc8ec3601b6
f8551f1c22ee634be672d893e6755b100f0d1994
/ICP/tf_RT.sci
c460796be9ccadf19587159b61fde3fb65922f98
[]
no_license
yanisdxw/computer-vision
ed605061a632ae0c7536007de6f83e2ff5ee1d51
e9bd0961194f2e4290211296dbe6268ecad8f1c1
refs/heads/master
2021-08-23T05:30:24.864657
2017-12-03T17:05:35
2017-12-03T17:05:35
111,726,798
0
0
null
null
null
null
UTF-8
Scilab
false
false
92
sci
tf_RT.sci
function p = tf_RT(pt,R,T) p = rotation(pt,R); p = translation(p,T) endfunction
786421891fef1346621e17c5d3af113d2f100114
430e7adb489914d378a5b0a27d8d41352fa45f3a
/scilab/example/ボード線図1.sce
652b75b5f5458077f4961f32e7de9f97e944c36f
[]
no_license
ziaddorbuk/Lesson
04906ff94bf8c1f6bbc6971d5692ae011a9b8869
20fe20a6c9c145ef48a35574d885d3952f9ab6ff
refs/heads/master
2021-09-23T11:48:05.958608
2018-04-30T01:54:13
2018-04-30T01:54:13
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
135
sce
ボード線図1.sce
s=%s; G=1/(1+2*s); omg=0:0.01:100; Gj=horner(G,omg*%i); x=real(Gj); y=imag(Gj); plot2d(x,y,axesflag=5,rect=[-0.1,-0.6,1.2,0.1]);
7f63e8c3eb950b7fbef16af6f5fb46e0138c2841
449d555969bfd7befe906877abab098c6e63a0e8
/710/CH6/EX6.9/6_9.sci
fa7ac3a22385c2706b7f2cb50c7e1a906c7cece2
[]
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
566
sci
6_9.sci
clc(); clear; //To determine the phase difference between between O &E rays mew0=1.544; //refractive index of ordinary waves mewE=1.553; //refractive index of extraordinary waves lambda=550; //wavelength in nm t=9; delta=((2*180)/(lambda*(10^-9)))*(mewE-mew0)*t*(10^-6) //mewE>mew0 printf("The phase difference between O and E rays is %f degrees",delta);
5a5c4ff62977f56d2d7f087404a11e488ee6a494
449d555969bfd7befe906877abab098c6e63a0e8
/2282/CH7/EX7.15/ex7_15.sce
520b9f4ff5add70850004eca60d17b89438a16c8
[]
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,067
sce
ex7_15.sce
//Example 7.15, Page no.286 clear clc f=6*10^9 //uplink frequency eirp= 80 //Earth station EIRP in dBW r=35780 //Earth station satellite distance l=2 //attenuation due to atomospheric factors in dB e=0.8 // satellite antenna's aperture efficiency a=0.5 // satellite antenna's aperture area T=190 // Satellite receiver's effective noise temperature bw=20 *10^6 //Satellite receiver's bandwidth cn=25 // received carrier-to-noise ratioin dB c=3*10^8 //speed of light k=1.38*10^-23 lamda=c/f G=e*4*%pi*a/lamda^2 G=ceil(G*100)/100 Gd=10*log10(G) p=10*log10(k*T*bw) pl=20*log10(4*%pi*r*10^3/lamda) rp=eirp-l-pl+Gd rp=floor(rp*100)/100 rc=floor((rp-p)*100)/100 lm=rc-cn printf("Satellite Antenna gain, G = %.2f = %.2f dB \n Receivers Noise Power = %.1f dB\n free-space path loss = %.2f dB \n received power at satellite = %.2f dB \n receiver carrier = %f is stronger than noise.\n It is %.2f dB more than the required threshold value.\n Hence, link margin = %.2f dB",G,Gd,p,pl,rp,rc,lm,lm)
24c92e5b1c40067017fab45024f5b52eb772dd8e
449d555969bfd7befe906877abab098c6e63a0e8
/2939/CH10/EX10.8/Ex10_8.sce
671a4c59049d7c2989df104a545975b20206f841
[]
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
402
sce
Ex10_8.sce
//Ex10_8 clc; // Given: flux=10^12; s=15.9*10^-24; m1=0.5;// weight of ruby in mg //Soluton: a1=35000;// measured activity in c/s a2=350000;// corrected activity in )d/s N=a2/(flux*s*(1-0.5^(1/27.7))); m=50*N/(6.02*10^23); Cr=(100*m)/4.35;// total Cr in in the Ruby crp=(Cr*100)/0.5;// % cr in the ruby printf("The percentage Cr content in the ruby is = %f ",crp)
6169adafa97ff9791d02cec69c1b75f591f4b701
449d555969bfd7befe906877abab098c6e63a0e8
/1106/CH6/EX6.7/ex6_7.sce
0bb3f9ae690491bfb3e0ea1c0b22ade71cd44ea9
[]
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
236
sce
ex6_7.sce
// Example 6.7, Page No-279 clear clc A=2 fL=2*10^3 C=0.01*10^-6 R=1/(2*%pi*fL*C) Rkohm=R/1000 printf('R= %.1f kohm', Rkohm) RfbyRi=A-1 printf('\nRf/Ri= %.3f', RfbyRi) printf('\nHence, take Rf=10 kohm and Ri=10 kohm')
8d81305761667bb67d8b13e16712880b253b373d
449d555969bfd7befe906877abab098c6e63a0e8
/3673/CH16/EX16.14/Ex16_14.sce
5bb08778d6232b5415ebbb8ce3c1980fa9da3c1a
[]
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
232
sce
Ex16_14.sce
//Example 16_14 page no:771 clc; //given Z11=6; Z22=6; Z12=4; Z21=4; Za=Z11-Z12; Zb=Z11+Z12; disp(Za,"the parameter Za of the lattice network is (in ohm)"); disp(Zb,"the parameter Zb of the lattice network is (in ohm)");
201df7d1c7573dc404351327f0706b7ed50aac66
91bba043768342a4e23ee3a4ff1aa52fe67f7826
/cs/142/4/tests/test31.tst
63982f2007cb1d2cfa2164c778368b445b25ebda
[]
no_license
MaxNanasy/old-homework
6beecc3881c953c93b847f1d0d93a64ec991d6de
48b7997a49a8f111344f30787c178e1661db04bd
refs/heads/master
2016-09-08T04:37:44.932977
2010-03-02T00:48:59
2010-03-02T00:48:59
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
141
tst
test31.tst
type t1 = array 10 of short; type t2 = array 10 of t1; type t3 = array 10 of t2; main() { var a : t3; const c = 11; a[1][1][1] = c; }
291a096eeb98983f945987c6c50d228b99d13f5d
0f30a3220883198dd3ff2f25722cf15b1c5ed040
/otimização.sce
5eeb8d3be588c4301122bcba4b1086114f3858e8
[]
no_license
saulocost4/Otimizacao
eccbdef5e7e9022db55724dce811e174a4b381b0
17ac706e6b39cf180fef3455f990cae75e96d917
refs/heads/master
2020-04-29T05:10:58.378105
2019-03-22T23:22:06
2019-03-22T23:22:06
175,873,079
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,521
sce
otimização.sce
clc mc=[ //matriz dos coeficientes 1 -4 -2 -2 0 0 0; 0 1 1 2 1 0 4; 0 4 -5 3 0 1 30; ] x=zeros(1,(size(mc)(2)-2)) disp(mc) /* INICIALIZAÇÃO DA MATRIZ E DO VETOR DE VARIAVEIS*/ var_maximi=2 var_parada=0 mc_original=mc passos=0 //RECURSIVIDADE while var_parada==0 valor_menor=mc(1,2) var_maximi=2 var_parada=1 var_obj=zeros(2) quo=10^9 //ENCONTRANDO AS VARIÁVEIS NÃO BÁSICAS E A VARIÁVEL A SER MAXIMIZADA(QUE VAI ENTRAR NA BASE) contador=1 for i=2:size(mc)(2)-1 if (i~=2 & mc(1,i)<valor_menor) valor_menor=mc(1,i) var_maximi=i end end //ENCONTRANDO A EQUAÇÃO DA VARIÁVEL A SER MAXIMIZADA DE ACORDO COM O MENOR QUOCIENTE for i=2:(size(mc)(1)) if(mc(i,var_maximi)~=0 & ((mc(i,size(mc)(2))/mc(i,var_maximi))<quo) & mc(i,var_maximi)>0) then quo=mc(i,size(mc)(2))/mc(i,var_maximi) num_eq=i end end //MANTENDO O COEFICIENTE DA VÁRIAVEL A SER MAXIMIZADA IGUAL A 1 if mc(num_eq,var_maximi)~=1 then for i=1:(size(mc)(2)) if (i~=var_maximi) then mc(num_eq,i)=mc(num_eq,i)/(mc(num_eq,var_maximi)) end end end mc(num_eq,var_maximi)=1 //FAZENDO AS OPERAÇÕES NAS LINHAS DA MATRIZ PARA ZERAR OS COEFICIENTES DA VARIÁVEL A SER MAXIMIZADA NAS OUTRAS EQUAÇÕES for i=1:(size(mc)(1)) for j=1:(size(mc)(2)) if(i~=num_eq & j~=var_maximi) then mc(i,j)=mc(i,j)-(mc(i,var_maximi)*mc(num_eq,j)) end end end for i=1:(size(mc)(1)) if(i~=num_eq & mc(i,var_maximi)~=0) then mc(i,var_maximi)=0 end end //PARANDO O WHILE AO ENCONTRAR A SOLUÇÃO ÓTIMA for i=2:size(mc)(2)-1 if(mc(1,i)<0) then var_parada=0 end end for i=2:size(mc)(2)-1 if mc(1,i)~=0 then var_obj(contador)=i contador=contador+1 end end passos=passos+1 pause end //ENCONTRANDO OS VALORES DO VETOR DE VARIÁVEIS PARA A SOLUÇÃO ÓTIMA x(1...n) for i=2:size(mc)(1) for j=2:size(mc)(2)-1 if (mc(i,j)~=0 & j~=var_obj(1) & j~=var_obj(2)) then x(j-1)=mc(i,size(mc)(2))/mc(i,j) end end end disp ("Para o sistema:") disp(mc_original) sol_otima=mc(1,size(mc)(2)) disp(sol_otima, "A solução ótima é:") disp(x,"Encontrados a partir do vetor de variáveis abaixo:") disp(x(1),"No qual x1 é igual a:") disp(x(2),"E x2 é igual a:")
d7a18a93e7f52a8fa82e0a74652d5074a925a95d
44f225adc0be4f9ecb45fb9fde03e74f23d7acb2
/macros/modified_if.sci
f4f9c700be09404c9cbefed95e7eed1f88b74892
[]
no_license
harpreetrathore/scilab-IPT
10c4996614f1c59972e59decd1b7171e7d5816e0
db79f1370f3cb0a7716a8afcf1cf5fde9fe70aba
refs/heads/master
2021-01-01T04:06:52.573735
2016-05-26T20:34:33
2016-05-26T20:34:33
59,781,201
0
0
null
null
null
null
UTF-8
Scilab
false
false
313
sci
modified_if.sci
//made to work for mlists (hypermatrices) //Author: Anirudh Katoch //katoch.anirudh(at)gmail.com function res = modified_if(condi) if(type(condi) == 17) res = condi(1); for i=2:size(condi, 3) do res = res & condi(:, :, i); end else if(condi) res = %t; else res = %f; end end endfunction
e04bf328e0ddbbe950a059a8b280563ee80e7e78
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set12/s_High_Voltage_Engineering_C._L._Wadhwa_3487.zip/High_Voltage_Engineering_C._L._Wadhwa_3487/CH7/EX7.5/Ex7_5.sce
c0ecff4798a0747dbf3d51cba3df8cfbcfecde19
[]
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
196
sce
Ex7_5.sce
errcatch(-1,"stop");mode(2);//Chapter 7,Example 7.5 Page 226 E = 500 Z = 350 L = 800 E1 = E*(1-exp(-(2*Z/L)*2)) printf (" E'' = %f kV \n",E1) //Answers may vary due to round off error exit();
f07985de1dc3a4cf4efc6afc22441db7b1fdaa6c
449d555969bfd7befe906877abab098c6e63a0e8
/1862/CH1/EX1.5/C1P5.sce
0d366b9e0cad09a57496474e7191d2b82e8e03f7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
396
sce
C1P5.sce
clear clc //to find value of plank time // GIVEN:: //speed of light c = 3.00e8 //m/s //Newton's gravitational constant G = 6.67e-11 // m^3/s^2.Kg //plank's constant h = 6.63e-34// Kg.m^2/s // SOLUTION: //plank time tp = sqrt((G*h)/c^5)// seconds //answer in the book is slightly different which is printing mistake printf ("\n\n Plank time tp =\n\n %.2e seconds" ,tp);
1fc3c19507da1450ce2fe2043d02e4394178dd44
449d555969bfd7befe906877abab098c6e63a0e8
/2252/CH8/EX8.13/Ex8_13.sce
cb2856476bc0c5105c428d4776fd384bd18ffa2a
[]
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
989
sce
Ex8_13.sce
function[r,theta]=rect2pol(A) x=real(A) y=imag(A) r=sqrt(x^2+y^2) theta=atand(y/x) endfunction function[r]=mag(A) x=real(A) y=imag(A) r=sqrt(x^2+y^2) endfunction j=%i //calculating branch currents Z1=15+12*j//impedance of branch 1 I1=200/Z1 phi1=atand(12/15) Z2=25-17*j//impedance of branch 2 I2=200/Z2 phi2=atand(17/25) mprintf("I1=%f A at angle of %f degrees\nI2=%f A at angle of %f degrees\n",mag(I1),phi1,mag(I2),phi2) //calculating total current I=I1+I2 [I phi]=rect2pol(I) mprintf("Total current drawn by the circuit I=%f A, angle of lag=%f degrees and power factor=%f lagging\n",I,-phi,cos(phi*%pi/180)) //power factor is to be raised to unity-a capacitor has to be connected in parallel //at unity power factor, imaginary part of I must be zero Xc=-200/imag(I1+I2) f=40 C=1/(2*%pi*f*Xc) mprintf("If power factor is to be raised to unity-a capacitor of %f microF has to be connected in parallel to given circuit", C*1D+6)
97209ff48a58b69099216a4aa047f2168168aaa5
449d555969bfd7befe906877abab098c6e63a0e8
/3311/CH2/EX2.3/Ex2_3.sce
81f240984b38573868be51f63b40ef0db43bf768
[]
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
828
sce
Ex2_3.sce
// chapter 2 // example 2.3 // fig. E2.3 // Compute average power loss // page-22-23 clear; clc; // given Beta1=180, Beta2=360; // in degrees (conduction angles) Iav=100; // in A (average current) // calculate // since Iav=Im*Beta/360, therefore Im1=Iav*360/Beta1; // calculation of current during 180 conduction V_T1= 1.8; // in V (given corresponding to value of Im1) Pavg1=V_T1*Im1*(Beta1/360); // calculation of average power loss during 180 conduction printf("\nThe average power loss during %.f conduction is %.f W",Beta1,Pavg1); Im2=Iav*360/Beta2; // calculation of current during 360 conduction V_T2= 1.5; // in V (given corresponding to value of Im2) Pavg2=V_T2*Im2*(Beta2/360); // calculation of average power loss during 360 conduction printf("\n\nThe average power loss during %.f conduction is %.f W",Beta2,Pavg2);
2402b5821ffe72734b9ec4fd9ba3f7968298e65e
3c47dba28e5d43bda9b77dca3b741855c25d4802
/microdaq/demos/real_time/microdaq.dem.gateway.sce
362df242e466487a5c54a70ad4484bdc91868771
[ "BSD-3-Clause" ]
permissive
microdaq/Scilab
78dd3b4a891e39ec20ebc4e9b77572fd12c90947
ce0baa6e6a1b56347c2fda5583fb1ccdb120afaf
refs/heads/master
2021-09-29T11:55:21.963637
2019-10-18T09:47:29
2019-10-18T09:47:29
35,049,912
6
3
BSD-3-Clause
2019-10-18T09:47:30
2015-05-04T17:48:48
Scilab
UTF-8
Scilab
false
false
775
sce
microdaq.dem.gateway.sce
// Copyright (c) 2015, Embedded Solutions // All rights reserved. // This file is released under the 3-clause BSD license. See COPYING-BSD. function subdemolist = demo_gateway() demopath = get_absolute_file_path("microdaq.dem.gateway.sce"); subdemolist = [ "FFT (script + XCOS - external mode)", "fft_demo.dem.sce" ; "DC motor control (XCOS - external mode)", "dc_motor_demo.dem.sce" ; "PID control (script)", "pid_demo.dem.sce" ; "Audio effects (script)", "audio_demo.dem.sce" ; "Audio gain (script)", "audio_gain.dem.sce"; ]; subdemolist(:,2) = demopath + subdemolist(:,2); endfunction subdemolist = demo_gateway(); clear demo_gateway; // remove demo_gateway on stack
e609264c8f79fa240a159b8ee88ffc4b54ad5891
449d555969bfd7befe906877abab098c6e63a0e8
/1092/CH8/EX8.18/Example8_18.sce
f191dd590230d1b906ca7bb54d762a9a3d21f86f
[]
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
3,471
sce
Example8_18.sce
// Electric Machinery and Transformers // Irving L kosow // Prentice Hall of India // 2nd editiom // Chapter 8: AC DYNAMO TORQUE RELATIONS - SYNCHRONOUS MOTORS // Example 8-18 clear; clc; close; // Clear the work space and console. // Given data kW = 40000 ; // Load on a factory in kW PF = 0.8 ; // power factor lagging of the load cos_theta = PF; sin_theta = sqrt( 1 - (cos_theta)^2 ); PF_SM = 0.8 ; // power factor leading of the synchronous motor cos_theta_SM = PF_SM; sin_theta_SM = sqrt( 1 - (cos_theta_SM)^2 ); hp = 7500 ; // power rating of the induction motor in hp PF_IM = 0.75 ; // power factor lagging of the induction motor cos_theta_IM = PF_IM; sin_theta_IM = sqrt( 1 - (cos_theta_IM)^2 ); eta = 91*(1/100) ; // Efficiency of IM // Calculations kVA_original = kW / PF ; // Original kVA kvar_original = kVA_original * sin_theta ; // Original kvar kW_IM = ( hp * 746 ) / ( 1000 * eta ) ; // Induction motor kW kVA_IM = kW_IM / PF_IM ; // Induction motor kVA kvar_IM = kVA_IM * sin_theta_IM ; // Induction motor kvar // case a kW_SM = ( hp * 746 ) / ( 1000 * eta ) ; // Synchronous motor kW kVA_SM = kW_SM / PF_SM ; // Synchronous motor kVA kvar_SM = kVA_SM * sin_theta_SM ; // Synchronous motor kvar kvar_final = kvar_original - kvar_IM - kvar_SM ; // final kvar kVA_final = kW + %i*(abs(kvar_final)); // final kVA kVA_final_m = abs(kVA_final);//kVA_final_m = magnitude of kVA_final in kVA kVA_final_a = atan(imag(kVA_final) /real(kVA_final))*180/%pi; //kVA_final_a=phase angle of kVA_final in degrees PF_final = cosd(kVA_final_a); // Final power factor // Display the result disp("Example 8-18 Solution : "); printf(" \n Original kVA = %d kVA \n ", kVA_original ); printf(" \n Original kvar = \n" );disp(%i*kvar_original); printf(" \n a:"); printf(" \n Synchronous motor kW = %d kW \n ", kW_SM ); printf(" \n Synchronous motor kVA = %.f kVA \n ", kVA_SM ); printf(" \n Synchronous motor kvar = ");disp(-%i*kvar_SM) printf(" \n Final kvar = ");disp(%i*kvar_final); printf(" \n Final kVA = " );disp(kVA_final); printf(" \n Final kVA = %f <%.2f kVA \n ",kVA_final_m,kVA_final_a); printf(" \n Final PF = %.3f lagging \n ", PF_final ); printf(" \n __________________________________________________________________________"); printf(" \n Power tabulation grid : \n "); printf(" \n \t\t P \t\t ±jQ \t\t S* "); printf(" \n \t\t(kW) \t\t(kvar) \t\t(kVA) \t\t cosӨ "); printf(" \n __________________________________________________________________________"); printf(" \n Original : \t%d \t\tj%.f \t\t%.1d \t\t %.1f lag",kW ,kvar_original ,kVA_original,PF); printf(" \n Removed : \t-%.f \t\t-(+j%.f) \t%.f \t\t %.2f lag",kW_IM,kvar_IM,kVA_IM,PF_IM); printf(" \n Added : \t+%.f \t\t-j%.2f \t%.1f \t\t %.1f lead",kW_SM,abs(kvar_SM),kVA_SM,PF_SM); printf(" \n Final : \t%d \t\tj%.2f \t%.1f \t %.3f lag",kW ,kvar_final ,kVA_final_m,PF_final); printf(" \n __________________________________________________________________________\n\n"); printf(" \n b: "); printf(" \n In Ex.8-17, a 6148 kVA, unity PF, 7500 hp synchronous motor is needed."); printf(" \n In Ex.8-18, a 7685 kVA, 0.8 PF leading, 7500 hp synchronous motor is needed.\n"); printf(" \n \t Ex.8-18b shows that a 0.8 PF leading,7500 hp synchronous motor "); printf(" \n must be physically larger than a unity PF,7500 hp synchronous motor "); printf(" \n because of its higher kVA rating.");
eb8a5b4536d493ad4ba40b3eff81a0584345a88f
dda5d36a2d6828d53ca6b78d012a26c0eff50d76
/Meta-heuristics/AG-func-minimizacao.sci
edcb9a64de9f0a3c4bc9acaf0f61996f07d1be19
[]
no_license
jeanmmlima/Artificial-Intelligence
38a2845dfcf21377d650fb34974c4b24b19a7516
5ef9399fb0cd952798075dce7fdeefbc924c8353
refs/heads/master
2021-07-02T07:57:49.424281
2021-05-21T10:53:25
2021-05-21T10:53:25
66,594,869
0
0
null
null
null
null
UTF-8
Scilab
false
false
8,789
sci
AG-func-minimizacao.sci
//UFRN-DCA //Aluno: Jean Mario Moreira de Lima //---ALGORITMO GENETICO--- //1. Funcao de custo que se deseja minimizar w9 function w9 = funcao(x,y) z=-x.*sin(sqrt(abs(x)))-y.*sin(sqrt(abs(y))); x=x/250; y=y/250; // r: Rosenbrock's function r=100*(y-x.^2).^2+(1-x).^2; r1=(y-x.^2).^2+(1-x).^2; rd=1+r1; // x1=25*x; x2=25*y; xs =-10:0.1:10; ys =-10:0.1:10; a=500; b=0.1; c=0.5*%pi; // F10=-a*exp(-b*sqrt((x1.^2+x2.^2)/2))-exp((cos(c*x1)+cos(c*x2))/2)+exp(1); // [n nx]=size(xs); [n ny]=size(ys); for i=1:nx for j=1:ny zsh(i,j)=0.5-((sin(sqrt(xs(i)^2+ys(j)^2)))^2-0.5) ./(1+0.1*(xs(i)^2+ys(j)^2))^2; end end // Fobj=F10.*zsh(1); w2=z-r1; w4=sqrt(r.^2+z.^2)+Fobj; w9 = w2 - w4; endfunction //2. NORMALIZACAO function funNomalizada = normaliza(fun) maximoFun = max(fun); funNomalizada = fun - maximoFun; funNomalizada = (-1)*funNomalizada; funNomalizada = funNomalizada + 0.1*maximoFun; endfunction //3. POPULACAO //Cria vetores de valores X e Y que representam a populacao //Recebe seus valores maximos e minimos possiveis de X e Y e o tamanho //de populacao desejado function[X,Y]=geraPop(minX, maxX, minY, maxY, tamanhoPop) for i=1:1:tamanhoPop X(i)=minX + rand()*(maxX - minX); Y(i)=minY + rand()*(maxY - minY); end endfunction //4. CRUZAMENTO //Realiza o cruzamento entre cromossomos para obter novos individuos function [novoCromo1, novoCromo2]=cruzamento(cromo1, cromo2,taxaCruzamento, maxBits, maxFract) //Um valor aleatorio e gerado e verifica-se //se seu valor e menor que a taxaCruzamento. //Em caso de positivo, acontece o cruzamento. Caso contrario, nao acontece. valorDeCruzamento = rand() if (valorDeCruzamento < taxaCruzamento) then //genesCortados representam a quatidade de genes //por cromossomos que serao cortados //para serem invertidos entre os cromossomos. genesCortados = floor(rand()*maxBits); //Converte os cromossomospara binario bins1 = REAL_TO_BITS(cromo1, maxFract, maxBits) bins2 = REAL_TO_BITS(cromo2, maxFract, maxBits) //cortando o cromossomo 1 - X bins1_parte1 = bins1(1:(maxBits - genesCortados)) bins1_parte2 = bins1((maxBits - genesCortados + 1): maxBits) //cortando o cromossomo 2 - Y bins2_parte1 = bins2(1:(maxBits - genesCortados)) bins2_parte2 = bins2((maxBits - genesCortados + 1): maxBits) //Unindo os cromossomos novoCroBins1 = [bins1_parte1;bins2_parte2] novoCroBins2 = [bins2_parte1;bins1_parte2] //Convertendo para Real novoCromo1 = BITS_TO_REAL(novoCroBins1, maxFract, maxBits) novoCromo2 = BITS_TO_REAL(novoCroBins2, maxFract, maxBits) else novoCromo1 = cromo1; novoCromo2 = cromo2; end endfunction //5. MUTACAO function cromMutante = Mutacao(cromo, taxaMut, maxBits, maxFract) //Gera taxa aleatoria. Se for menor que a taxa de mutacao //utilizada, ocorre a mutacao taxa = rand(); if taxa < taxaMut then bitMut = floor(rand()*(maxBits-1)) + 1; bin = REAL_TO_BITS(cromo, maxFract, maxBits); valor = bin(bitMut); if valor == 0 then valor = 1; else valor = 0; end bin(bitMut) = valor; cromMutante = BITS_TO_REAL(bin, maxFract, maxBits) else cromMutante = cromo; end if cromMutante>500 then cromMutante=500; elseif cromMutante<-500 cromMutante=-500; end endfunction function [minimo] = AlgoritmoGenerico(PopTamanho, MaxGeracao, taxaMut, MutacaoRange, TaxaCross, rangeMinX, rangeMaxX, rangeMinY, rangeMaxY, MaxBits, MaxFract,plotagem) //Gera Populacao [X,Y]=geraPop(PopTamanho, rangeMinX, rangeMaxX, rangeMinY, rangeMaxY) Valores = zeros(PopTamanho,1); Valores = funcao(X,Y); ActualMin = min(Valores); Melhor_Min= ActualMin; for k=1:1:MaxGeracao ValoresAux = normaliza(Valores);//Normaliza a funcao a ser avaliada Soma = sum(ValoresAux); if Soma ==0 then disp(Soma); clf; end Aptidao = ValoresAux/Soma; tamanho = length(Aptidao); //Girando a Roleta for i=1:1:PopTamanho seta = rand(); Soma_Aux = (-1)*seta; Posicao=0; while Soma_Aux<0 Posicao = Posicao + 1; Soma_Aux = Soma_Aux + Aptidao(Posicao); end //Montando um vetor para realizar o cruzamento cross_Over_X(i) = X(Posicao); cross_Over_Y(i) = Y(Posicao); end novoX = []; novoY = []; tamanho = PopTamanho; tamanho_medio = tamanho/2; //Realizando o cruzamento for j=1:1:tamanho_medio //cruzamento em X indice_impar = (2*j-1) indice_par = 2*j; Primeiro = cross_Over_X(indice_impar); Segundo = cross_Over_X(indice_par); [novoX_1,novoX_2] = cruzamento(Primeiro, Segundo, TaxaCross, MaxBits, MaxFract); //verificando a mutacao nos Filhos de X X1_Velho = novoX_1; X2_Velho = novoX_2; novoX_1 = Mutacao(X1_Velho, taxaMut, MaxBits, MaxFract); novoX_2 = Mutacao(X2_Velho, taxaMut, MaxBits, MaxFract); novoX = [novoX novoX_1 novoX_2]; //cruzamento em Y Primeiro_Y = cross_Over_Y(indice_impar); Segundo_Y = cross_Over_Y(indice_par); [novoY_1,novoY_2] = cruzamento(Primeiro_Y, Segundo_Y, TaxaCross , MaxBits, MaxFract); //verificando a mutacao nos filhos de y Y1_Velho = novoY_1; Y2_Velho = novoY_2; novoY_1 = Mutacao(Y1_Velho, taxaMut, MaxBits, MaxFract); novoY_2 = Mutacao(Y2_Velho, taxaMut, MaxBits, MaxFract); novoY = [novoY novoY_1 novoY_2]; end Valores = funcao(novoX,novoY); ActualMin = min(Valores); if ActualMin<Melhor_Min then Melhor_Min=ActualMin; end X = novoX; Y = novoY; minimo = Melhor_Min; ArrayMin(k) = minimo; Actu_Min_Array(k) = ActualMin; end var_Sub = 2*10^2 + 2*10 + plotagem; subplot(var_Sub); xtitle("Minimo por Geracao"); k=1:MaxGeracao; plot(k, ArrayMin,'r',k,Actu_Min_Array, plotagem); xlabel('Geracao'); ylabel('Funcao Custo'); legend('Minimo Global','Minimo Encontrado'); xgrid(); endfunction //Funcao que transforma um numero inteiro em um array binario //trabalha com numeros negativos function binario = real_to_bin_Int(Real, MaxReal) if Real<0 then binario(1)=1; Real = (-1)*Real; else binario(1)=0; end div=Real; new_Div = div; i=1; resto=[]; i=1; //parte real while i<MaxReal resto(MaxReal - i ) = modulo(new_Div , 2) new_Div = floor(new_Div/2) i=i+1 end binario = [binario; resto]; endfunction //funcao que transforma um numero real fracionario em um array de binario //deve-se dizer um valor maximo de bits para representacao function bin_fract = real_to_bin_fract(frac, rep_Max) Representacao_Maximo = rep_Max; i=1; resto = []; valor=frac; Representacao=0; while (Representacao<Representacao_Maximo) valor=2*valor; resto(i)=floor(valor); valor = valor - resto(i); Representacao = Representacao + 1; i = i+1; end bin_fract = resto; endfunction //funcao que transforma um array de binario em numero real //trabalha com numeros negativos //trabalha somente com numero inteiro function realis = bin_to_real_int(binario) tamanho = length(binario); new_Real=0; for i=2:tamanho Real = binario(i)*2^(tamanho-i); new_Real = new_Real + Real; end if binario(1)==1 then new_Real = (-1)*new_Real; end realis = new_Real endfunction //Funcao que converte numero binario para numero real //trabalha apenas com a parte fracionario function realis = bin_to_real_fract(binario) tamanho = length(binario); new_Real=0; for i=1:tamanho Real = binario(i)*2^(-i); new_Real = new_Real + Real; end realis = new_Real endfunction //funcao que separa a parte inteira da parte fracionaria de um numero function [inteira, fracionaria] = separador(Real) if Real>0 then inteira = floor(Real); fracionaria = Real - inteira; else Real_Aux = abs(Real); inteira = floor(Real_Aux); fracionaria = Real_Aux - inteira; inteira = (-1)*inteira; end endfunction function Binario = REAL_TO_BITS(Real, MaxFract, MaxBits) [inteiro, fracionario] = separador(Real); Max_int = MaxBits - MaxFract; inteiro_binario = real_to_bin_Int(inteiro, Max_int); fracionario_binario = real_to_bin_fract(fracionario, MaxFract); Binario = [inteiro_binario; fracionario_binario]; endfunction function numeroReal = BITS_TO_REAL(Binario, MaxFract, MaxBits) MaxInteira = MaxBits - MaxFract; parteInteira = Binario(1:MaxInteira); parteFracionaria = Binario((MaxInteira+1):MaxBits); numInteiro = bin_to_real_int(parteInteira); numFracionario = bin_to_real_fract(parteFracionaria); if numInteiro<0 then numeroReal = (-1)*(abs(numInteiro) + numFracionario); else numeroReal = numInteiro + numFracionario end endfunction //declarando as variaveis necessarias para o trabalho de OTIMIZACAO DE SISTEMAS taxaMut = 0.1; //Taxa de Mutacao MutacaoRange = 10; TaxaCross = 0.80; //Taxa de Cruzamento MaxGeracao = 20; //Maximo de Geracoes a serem avaliadas rangeMaxX=500; //Valor maximo para X rangeMinX=-500; //Valor minimo para X rangeMaxY=500; //Valor maximo para Y rangeMinY=-500; //Valor minimo para Y PopTamanho = 50; //Tamanho da Populacao //tamanho das representacoes em binario MaxFract = 5; MaxInt = 12; MaxBits = MaxInt + MaxFract; for i=1:4 [Resposta(i)] = AlgoritmoGenerico(PopTamanho, MaxGeracao, taxaMut, MutacaoRange, TaxaCross, rangeMinX, rangeMaxX, rangeMinY, rangeMaxY, MaxBits, MaxFract,i); end disp(Resposta);
7c68b23d64337bb6471e8610d61b732de66634c0
1489f5f3f467ff75c3223c5c1defb60ccb55df3d
/tests/test_bundle_1_e.tst
7474a3e9b1abba1481ceb5745b3c4f50ba32d8bc
[ "MIT" ]
permissive
ciyam/ciyam
8e078673340b43f04e7b0d6ac81740b6cf3d78d0
935df95387fb140487d2e0053fabf612b0d3f9e2
refs/heads/master
2023-08-31T11:03:25.835641
2023-08-31T04:31:22
2023-08-31T04:31:22
3,124,021
18
16
null
2017-01-28T16:22:57
2012-01-07T10:55:14
C++
UTF-8
Scilab
false
false
36
tst
test_bundle_1_e.tst
adding "test.jpg" append "test.png"
34702363ffc3c9d36e4579910a03f92f6344abed
449d555969bfd7befe906877abab098c6e63a0e8
/98/CH14/EX14.5/example14_5.sce
ede12f09e123bc3cb3f347d8e93297518dd6b27f
[]
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,413
sce
example14_5.sce
//Chapter 14 //Example 14_5 //Page 363 clear;clc; i1=5; i2=14.08; pf1=0.8; pf2=0.85; l1=600; l2=400; hp=10; n=0.90; vb=400; r=1; x=0.5; z=r+%i*x; Zac=z*l1/1000; Zcb=z*l2/1000; printf("Impedance of distributor/km = %.2f+j(%.2f) ohm \n\n", real(z), imag(z)); printf("Impedance of section AC = Zac = %.2f+j(%.2f) ohm \n", real(Zac), imag(Zac)); printf("Impedance of section CB = Zcb = %.2f+j(%.2f) ohm \n\n\n", real(Zcb), imag(Zcb)); Vb=vb/sqrt(3)+%i*0; printf("Voltage at point B taken as the reference vector = %.0f+j%.0f \n", real(Vb), imag(Vb)); Ib=hp*746/sqrt(3)/vb/n/pf2; I2=i2*(pf2-%i*sin(acos(pf2))); I1=i1*(pf1-%i*sin(acos(pf1))); Iac=I2+I1; Icb=I2; Vcb=Icb*Zcb; Vac=Iac*Zac; Va=Vb+Vcb+Vac; printf("Line current at B = %.2f A \n\n", Ib); printf("Load current at point B = %.2f+j(%.2f) A \n", real(I2), imag(I2)); printf("Load current at point C = %.2f+j(%.2f) A \n\n", real(I1), imag(I1)); printf("Current in section CB = %.2f+j(%.2f) A \n", real(Icb), imag(Icb)); printf("Current in section AC = %.2f+j(%.2f) A \n\n", real(Iac), imag(Iac)); printf("Voltage drop in section CB = %.2f+j(%.2f) A \n", real(Vcb), imag(Vcb)); printf("Voltage drop in section AC = %.2f+j(%.2f) A \n\n", real(Vac), imag(Vac)); printf("Voltage at A/phase = %.2f+j(%.2f) A \n\n", real(Va), imag(Va)); printf("Magnitude of Va/phase = %.2f V \n\n", abs(Va)); printf("Line voltage at A = %.2f V \n\n", abs(Va)*sqrt(3));
ba29c1d03f7171b72337480771ecc32c92b2b5b9
449d555969bfd7befe906877abab098c6e63a0e8
/2072/CH27/EX27.9/EX27_9.sce
fb9a1a60e6e1e3a5d10e3d4728f3043a42f3b44b
[]
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
169
sce
EX27_9.sce
//Chapter 27 clc //Example 9 //given h=6.63*10^-34 //in J.s m=0.145 // in Kg v=40 //in m/s lambda=h/(m*v) disp(lambda,"de Broglie wavelength of the ball in meters is")
78e1461869daa6045463509481f045e1adc1296f
449d555969bfd7befe906877abab098c6e63a0e8
/1439/CH15/EX15.1/15_1.sce
34f3016903c90604dfff122a3de48808b3decdb6
[]
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
195
sce
15_1.sce
clc //initialisation of variables c= 8*10^-5 //molar n= 2 //CALCULATIONS Ksp= c^3*n^2 x= Ksp*10^6 //RESULTS printf ('solubility product = %.1e ',Ksp) printf ('\n solubility = %.1e ',x)
57d838a7268f476b18b2845c5a2891d3ba3ba1eb
449d555969bfd7befe906877abab098c6e63a0e8
/72/CH11/EX11.2.1/11_2-1.sce
481cad6d9f11da5c09fcdac651291b08939276b8
[]
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
954
sce
11_2-1.sce
//CAPTION: Characteristics_of_a_Parallel_Strip_Line //chapter_no.-11, page_no.-505 //Example_no.11-2-1 clc; //(a) Calculate the required width of the conducting strip erd=6;//relative_dielectric_constant d=4*(10^-3);//thickness Z0=50;//characteristic_impedance w=(377*(d))/((sqrt(erd))*Z0); disp(w,'the_required_width_of_the_conducting_strip(in metres)is ='); //(b) Calculate_the_strip_line_capacitance ed=8.854*(10^-12)*erd; d=4*(10^-3);//thickness C=(ed*w)/d; C=C*(10^12); disp(C,'the_strip_line_capacitance(in pF/m)is ='); //(c) Calculate_the_strip_line_inductance uc=4*%pi*(10^-7); d=4*(10^-3);//thickness C=(uc*d)/w; C=C*(10^6); disp(C,'the_strip_line_inductance(in uH/m)is ='); //(d)Calculate_the_phase_velocity_of_the_wave_in_the_parallel_strip_line c=3*(10^8); vp=c/(sqrt(erd)); disp(vp,'the_phase_velocity_of_the_wave_in_the_parallel_strip_line(in m/s)is =');
12575c432ecdbd06eb29b1e6ea1559c87ab32787
449d555969bfd7befe906877abab098c6e63a0e8
/1271/CH17/EX17.4/example17_4.sce
4bfd4137350265f9c0ef5d718920a461690257bd
[]
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
560
sce
example17_4.sce
clc // Given that E = 0.7 // band gap for semiconductor in eV t = 300 // room temperature in K k = 1.38e-23 // Boltzmann's constant in J/K h = 6.62e-34 // Planck constant in J sec e = 1.6e-19 // charge on an electron in C m = 9.1e-31 // mass of electron in kg // Sample Problem 4 on page no. 17.20 printf("\n # PROBLEM 4 # \n") printf("Standard formula used \n") printf("n_c = 2*(2*pi*m*k*T/h^2)^(3/2) * e^(E_f-E_c)/kT \n") n = 2 * ((2 * %pi * k * t * m) / h^2)^(3/2) * exp(-(E * e / (2 * k * t))) printf("\n Density of holes and electron is %e per m^3.",n)
5a88af99c78b8a699c2df84225f5819efafeebfd
b4bbf9b2a475b5cf299b30bf5e0c621e32f6c832
/test/speed8.tst
42710f2f86be4265b6d001277034ddd3b687cc6a
[]
no_license
apetresc/castro
1ec1ac1307542487aa1be14c335170f7a1347bf2
843165af7c946188a2dd772384cd2d579723c99d
refs/heads/master
2022-02-20T14:28:41.962893
2019-10-07T08:41:59
2019-10-07T08:41:59
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
111
tst
speed8.tst
time -g 0 -m 0 -i 30000 boardsize 8 genmove w undo genmove w undo genmove w undo genmove w undo genmove w quit
08f1720c4c5072d64d4f60883b0b656600bb4b91
002b6230874dea6e4d76defafc1ae293b5744918
/solvers/ShallowWaterSolver/Tests/NonlinearSWE_RossbyModon_CG_P9.tst
0f7b7f27ede83aa0fa4c7ffc09f32ef2ed0d0a8d
[ "MIT" ]
permissive
SCOREC/nektar
f3cf3c44106ac7a2dd678366bb53861e2db67a11
add6f04b55fad6ab29d08b5b27eefd9bfec60be3
refs/heads/master
2021-01-22T23:16:16.440068
2015-02-27T17:26:09
2015-02-27T17:26:09
30,382,914
6
7
null
null
null
null
UTF-8
Scilab
false
false
872
tst
NonlinearSWE_RossbyModon_CG_P9.tst
<?xml version="1.0" encoding="utf-8"?> <test> <description>Rossby modon, CG, P=9</description> <executable>ShallowWaterSolver</executable> <parameters>NonlinearSWE_RossbyModon_CG_P9.xml</parameters> <files> <file description="Session File">NonlinearSWE_RossbyModon_CG_P9.xml</file> </files> <metrics> <metric type="L2" id="1"> <value variable="h" tolerance="1e-12">1.00464</value> <value variable="hu" tolerance="1e-12">0.0216812</value> <value variable="hv" tolerance="1e-12">0.00553698</value> </metric> <metric type="Linf" id="2"> <value variable="h" tolerance="1e-12">1.15917</value> <value variable="hu" tolerance="1e-12">0.295374</value> <value variable="hv" tolerance="1e-12">0.0483798</value> </metric> </metrics> </test>
25adc310f9399bbb64dfbb59d55d6f07a14fc642
d01bf962afff16bc1ce292c49da5923ebbe59775
/Maths/lorenz.sce
b959f7a4e5fe694b55a5880403acfeb5737f07e4
[]
no_license
fredkerdraon/Reference-research
71d0af22f84605ed0c53907acd6b248400c47388
1f48fdfebbe766bbd268b4f1853ab98162f57425
refs/heads/master
2023-05-05T12:18:18.655367
2020-02-08T22:08:15
2020-02-08T22:08:15
71,020,179
0
0
null
2023-04-19T18:37:49
2016-10-15T23:49:14
POV-Ray SDL
UTF-8
Scilab
false
false
331
sce
lorenz.sce
//// Plot trajectory of Lorenz system clear; clf; function udot=lorenz_ode(t,u) // odefile for lorenz system udot(1)=a*(u(2)-u(1)); udot(2)=u(1)*(b-u(3))-u(2); udot(3)=u(1)*u(2)-c*u(3); udot=udot'; endfunction a=10; b=28; c=8/3; u0 = zeros(3,1)+0.5; t=(0:0.02:100)'; u=ode(u0,0,t,lorenz_ode); plot(u(1,:),u(3,:))
c144372e33c4a6741586f32ed42eb1e67ac5f9c0
449d555969bfd7befe906877abab098c6e63a0e8
/3492/CH4/EX4.9/Ex4_9.sce
76dafe5357421c138785099629b3ce36474d5b14
[]
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
458
sce
Ex4_9.sce
clc //Chapter4 //Ex_9 //Given e=1.6*10^-19 // in coulombs h=6.626*10^-34 //in Js me=9.1*10^-31 //in Kg d=8.96 // in g/cm Mat=63.5 // g/ mol NA=6.023*10^23 // mol^-1 n=d*NA/Mat //in cm^-3 n=n*10^6 //in m^-3 E_FO=(h^2/(8*me))*(3*n/%pi)^(2/3) //in J E_FO=E_FO/e //in eV disp(E_FO,"Fermi energy at 0 Kelvin in eV is") E_FO=(h^2/(8*me))*(3*n/%pi)^(2/3) //in J v_e=sqrt(6*E_FO/(5*me)) disp(v_e,"Average speed of conduction electrons in m/s is")
d0e7fbdc2cb6ab9e3334f8c133684c976ed642e1
449d555969bfd7befe906877abab098c6e63a0e8
/1871/CH1/EX1.5/Ch01Ex5.sce
995a92968a3e3dad5f4c4998f568d5d9595ad1bf
[]
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
410
sce
Ch01Ex5.sce
// Scilab code Ex1.5: Pg:20 (2008) clc;clear; m = 9.1e-031; // Mass of the electron, kg-m h = 6.62e-034; // Planck's constant, joule-sec Lambda = 3e-002; // de-Broglie wavelength of the electron, m E = h^2/(2*m*Lambda^2); // Energy of the electron wave, joule printf("\nThe energy of the electron wave = %4.2e eV", E/1.6e-019); // Result // The energy of the electron wave = 1.67e-015 eV
ec783dbdd2c5701fb3ca17f28cd141efebc0f962
449d555969bfd7befe906877abab098c6e63a0e8
/2330/CH3/EX3.8/ex3_8.sce
0563dbcb242512033a8169f036139ab72a1bc652
[]
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
491
sce
ex3_8.sce
// Exa 3.8 format('v',5) clc; clear; close; // given data Vz= 12;// in V Vout= Vz;// in V Vin= 25;// in V R_S= 180;// in Ω R_L= 200;// in Ω // The value of I_S I_S= (Vin-Vout)/R_S;// in A // The value of I_L I_L= Vout/R_L;// in A // The value of I_Z I_Z= I_S-I_L;// in A I_S= I_S*10^3;// in mA I_L= I_L*10^3;// in mA I_Z= I_Z*10^3;// in mA disp(I_S,"The value of I_S in mA is : ") disp(I_L,"The value of I_L in mA is : ") disp(I_Z,"The value of I_Z in mA is : ")
5ea7f80dd91761a2c3823c593e67bd353b9a4fa3
d465fcea94a1198464d7f8a912244e8a6dcf41f9
/system/kiks_kiksnet.sci
0454d6722aacdc78fd1d465348de72a264323d1f
[]
no_license
manasdas17/kiks-scilab
4f4064ed7619cad9e2117a6c0040a51056c938ee
37dc68914547c9d0f423008d44e973ba296de67b
refs/heads/master
2021-01-15T14:18:21.918789
2009-05-11T05:43:11
2009-05-11T05:43:11
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
5,884
sci
kiks_kiksnet.sci
function [] = kiks_kiksnet(password) // Number of arguments in function call [%nargout,%nargin] = argn(0) // Display mode mode(0); // Display warning for floating point exception ieee(1); // ----------------------------------------------------- // (c) 2000-2003 Theodor Storm (Theodor.Storm@home.se) // http://www.kiks.net // ----------------------------------------------------- global("KIKS_GUI_KIKSNET_CLIENTS_CNT","KIKS_GUI_HDL","KIKS_MOVLOCK","KIKS_OBJECT_SMALLBALL_RADIUS","KIKS_OBJECT_BALL_RADIUS","KIKS_LIGHTDATA","KIKS_LIGHTARRAY","KIKS_BALLDATA","KIKS_BALLARRAY","KIKSNET_ACTIVE","KIKS_GUI_HDL","KIKS_REMOTE_ARRAY_NEW","KIKS_MMPERPIXEL","KIKS_NET_PASSWORD","KIKS_NET_BUFSIZ","KIKS_FID","KIKS_WALL_WIDTH","KIKS_WALL_RENDER"); if %nargin==1 then KIKS_NET_PASSWORD = password; if isempty(KIKS_NET_PASSWORD) then KIKS_NET_PASSWORD = "[empty_password]"; end; else KIKS_NET_PASSWORD = []; end; KIKS_NET_BUFSIZ = 4096; KIKS_GUI_KIKSNET_CLIENTS = 0; if ~isempty(KIKSNET_ACTIVE) then KIKSNET_ACTIVE = []; return; end; KIKSNET_ACTIVE = 1; // !! L.28: Unknown function kiks_kiksnet_connect not converted, original calling sequence used connection_result = kiks_kiksnet_connect(); if mtlb_logic(mtlb_double(connection_result),"==",-1) then // !! L.30: Unknown function kiks_kiksnet_disconnect not converted, original calling sequence used kiks_kiksnet_disconnect; return; end; %v0 = getdate();%v0(3:5) = [];%v0(6) = %v0(6)+%v0(7)/1000;t0 = %v0(1:6); l = 0; seconds = 0; // !! L.36: Unknown function kiks_status not converted, original calling sequence used kiks_status("Session control transferred to KiKS.",1); %v0_1(3:5) = [];%v13(3:5) = []; while %t // !! L.38: Unknown function tcpip_status not converted, original calling sequence used if KIKSNET_ACTIVE&bool2s(mtlb_logic(mtlb_double(tcpip_status(KIKS_FID)),"~=",0)) then break;end; l = l+1; xpause(1000*0.04); %v0_1 = getdate(); %v0_1(6) = %v0_1(6)+%v0_1(7)/1000; current_seconds = round(etime(%v0_1(1:6),t0)); %v13 = getdate(); %v13(6) = %v13(6)+%v13(7)/1000; if round(etime(%v13(1:6),t0))>seconds then fixed_l = l; l = 0; seconds = current_seconds; //kiks_status(sprintf(''- monitoring KiKSnet server for %d seconds @ %d updates per second -'',seconds,fixed_l)); end; // !! L.48: Unknown function kiks_transmit_string not converted, original calling sequence used kiks_transmit_string(KIKS_FID,"G"); // !! L.49: Unknown function kiks_recieve_string not converted, original calling sequence used res = kiks_recieve_string(KIKS_FID); // !! L.51: Matlab function sscanf not yet converted, original calling sequence used KIKS_REMOTE_ARRAY_NEW = sscanf(mtlb_e(res,4:$),"%f"); // !! L.52: Unknown function kiks_update_remote not converted, original calling sequence used kiks_update_remote; objstr = ""; if pmodulo(l,10)==0 then // !! L.56: Matlab function findobj not yet converted, original calling sequence used // L.56: Name conflict: function name changed from findobj to %findobj // !! L.56: Matlab function set not yet converted, original calling sequence used // L.56: Name conflict: function name changed from set to %set set(findobj("Tag","t_kiksnetserver_scrollup"),"Enable","on"); // !! L.57: Matlab function findobj not yet converted, original calling sequence used // L.57: Name conflict: function name changed from findobj to %findobj // !! L.57: Matlab function set not yet converted, original calling sequence used // L.57: Name conflict: function name changed from set to %set set(findobj("Tag","t_kiksnetserver_scrolldown"),"Enable","on"); // !! L.58: Unknown function kiks_transmit_string not converted, original calling sequence used kiks_transmit_string(KIKS_FID,"S"); // !! L.59: Unknown function kiks_recieve_string not converted, original calling sequence used res = kiks_recieve_string(KIKS_FID); // !! L.60: Matlab function sscanf not yet converted, original calling sequence used num = sscanf(mtlb_e(res,3:$),"%d"); // !! L.61: Matlab function findobj not yet converted, original calling sequence used // L.61: Name conflict: function name changed from findobj to %findobj h = findobj("tag","t_kiksnetserver_text_clients"); // !! L.62: Matlab function sprintf not yet converted, original calling sequence used // !! L.62: Matlab function set not yet converted, original calling sequence used // L.62: Name conflict: function name changed from set to %set set(h,"string",sprintf("%d",num)); if mtlb_logic(KIKS_GUI_KIKSNET_CLIENTS,">=",mtlb_double(num)) then KIKS_GUI_KIKSNET_CLIENTS = mtlb_s(mtlb_double(num),1); end; for i = mtlb_imp(1,mtlb_double(num)) // !! L.67: Unknown function kiks_recieve_string not converted, original calling sequence used st = kiks_recieve_string(KIKS_FID); // L.68: No equivalent for findstr() in Scilab so mtlb_findstr() is called fields = mtlb_findstr(st,";"); id = mtlb_e(st,1:fields(1)-1); ipfourbyte = evstr(mtlb_e(st,fields(1)+1:fields(2)-1)); ip = kiks_fourbyte2ip(ipfourbyte); cde = mtlb_e(st,fields(2)+1:fields(3)-1); score = mtlb_e(st,fields(3)+1:fields(4)-1); fld = mtlb_s(i,KIKS_GUI_KIKSNET_CLIENTS); if bool2s(mtlb_logic(fld,">=",1))&bool2s(mtlb_logic(fld,"<=",4)) then kiks_gui_kiksnet_clients(fld,id,ip,cde,score); end; end; emptbeg = mtlb_a(mtlb_s(mtlb_double(num),KIKS_GUI_KIKSNET_CLIENTS),1); for i = mtlb_imp(emptbeg,4) kiks_gui_kiksnet_clients(i); end; end; end; // !! L.86: Unknown function kiks_status not converted, original calling sequence used kiks_status("Session control returned to Matlab.",1); %v0 = getdate();%v0(3:5) = [];%v0(6) = %v0(6)+%v0(7)/1000;t1 = etime(%v0(1:6),t0); // !! L.88: Unknown function kiks_kiksnet_disconnect not converted, original calling sequence used kiks_kiksnet_disconnect; endfunction
e70f1fa256507760aeac1795c19197a2dd336032
449d555969bfd7befe906877abab098c6e63a0e8
/3648/CH7/EX7.3/Ex7_3.sce
f4e804e63c57b77f0dbb3a11bea3e7e22979a0eb
[]
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
288
sce
Ex7_3.sce
//Example 7_3 clc(); clear; //To find average angular acceleration wf=240 //units in rev/sec w0=0 //units in rev/sec t=2 //units in minutes t=t*60 //units in sec alpha=(wf-w0)/t //units in rev/sec^2 printf("Average angular acceleration is alpha=%d rev/sec^2",alpha)
5344f64fb5f72b9c794b65f5d43690158b2f7939
449d555969bfd7befe906877abab098c6e63a0e8
/22/CH9/EX9.2/ch9ex2.sce
fbb10d839dcf6066b23836f073008b05827b9e71
[]
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
359
sce
ch9ex2.sce
N_0=32; n=(0:N_0-1); x_n= [ones(1,5) zeros(1,23) ones(1,4)]; for r=0:31 X_r(r+1)=sum(x_n.*exp(-sqrt(-1)*r*2*3.14/N_0*n))/32; end subplot(2,1,1); r=n; plot2d3(r,real(X_r)); xlabel('r'); ylabel('X_r'); X_r=fft(x_n)/N_0; subplot(2,1,2); plot2d3(r,phasemag(X_r)); xlabel('r'); ylabel('phase of X_r'); disp(N_0,'period=') disp(2*%pi/N_0,'omega=')
4d626a0d129b8e8f5bc7fa13510e11241dd795d7
449d555969bfd7befe906877abab098c6e63a0e8
/680/CH8/EX8.05/8_05.sce
9a7b2eef9309c0d38eecd17f0cab56c3993c3818
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
549
sce
8_05.sce
//Problem 8.05: //initializing the variables: T1 = 250; // in deg C T2 = 260; // in deg C T3 = 270; // in deg C T4 = 280; // in deg C T5 = 290; // in deg C P1 = 22.01; // in atm P2 = 24.66; // in atm P3 = 27.13; // in atm P4 = 29.79; // in atm P5 = 32.42; // in atm vl3 = 0.0408; // in ft3/lb vg3 = 0.192; // in ft3/lb //calculation: dpdT = (P5 - P1)/(T5 - T1) dpdT13 = (P3 - P1)/(T3 - T1) dpdT35 = (P5 - P3)/(T5 - T3) dpdTav = (dpdT13+dpdT35)/2 printf("\n\nResult\n\n") printf("\n the p` vs T derivative is %.3f",dpdTav)
4d07fc15b680a32b06fbcddb153d1811fb299b93
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.3/macros/util/sysconv.sci
02f7fcd392a95c4fe818c359f412d40e2e870c08
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain" ]
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
2,649
sci
sysconv.sci
function [s1,s2]=sysconv(s1,s2) //Syntax : [s1,s2]=sysconv(s1,s2) // // Converts s1 and s2 into common representation in order that // system interconnexion operations can be applied. // The conversion rules in given in the following table. // 'c' -> continuous time system // 'd' -> discrete time system // n -> sampled system with sampling period n // [] -> system with undefined time domain //For mixed systems s1 and s2 are put in state-space representation. // // // // s1\s2| 'c' | 'd' | n2 | [] | // --------------------------------------------------------------- // 'c' | nothing |uncompatible | c2e(s1,n2) | c(s2) | // --------------------------------------------------------------- // 'd' |uncompatible| nothing | e(s1,n2) | d(s2) | // --------------------------------------------------------------- // n1 | c2e(s2,n1) | e(s2,n1) | n1<>n2 uncomp | e(s2,n1) | // | | | n1=n2 nothing | | // --------------------------------------------------------------- // [] | c(s1) | d(s1) | e(s1,n2) | nothing | // --------------------------------------------------------------- // // Meaning: //n1,n2 -> sampling period //c2e(s,n) -> the continuous-time system s is transformed into // a sampled system with sampling period n. //c(s) -> conversion to continuous (time domain is 'c') //d(s) -> conversion to discrete (time domain is 'd') //e(s,n) -> conversion to samples system with period n //! s11=s1(1);s21=s2(1); if s11(1)<>s21(1) then // conversion ss<-->tf if s11(1)='r' then s1=tf2ss(s1),else s2=tf2ss(s2),end s11=s1(1);s21=s2(1); //if s11(1)='lss' then s1=ss2tf(s1),else s2=tf2ss(s2),end end; if s11(1)=='r' then n1=4;end if s21(1)=='r' then n2=4;end if s11(1)=='lss' then n1=7;end if s21(1)=='lss' then n2=7;end select s1(n1) case 'c' then t1=0 case 'd' then t1=1 case [] then t1=3 else t1=2 end; select s2(n2) case 'c' then t2=0 case 'd' then t2=1 case [] then t2=3 else t2=2 end; select t1+4*t2 case 0 then, case 1 then warning('time domains are not compatible') case 2 then s2=dscr(s2,s1(n1)) case 3 then s1(n1)='c' case 4 then warning('time domains are not compatible') case 5 then, case 6 then s2(n2)=s1(n1) case 7 then s1(n1)='d' case 8 then s1=dscr(s1,s2(n2)) case 9 then s1(n1)=s2(n2) case 10 then if s1(n1)<>s2(n2) then warning('time domains are not compatible') end; case 11 then s1(n1)=s2(n2) case 12 then s2(n2)='c' case 13 then s2(n2)='d' case 14 then s2(n2)=s1(n1) end;
0392a92d6a51344a877b04b7ea07e6311abfaaf4
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set5/s_Digital_Signal_Processing_R._Babu_52.zip/Digital_Signal_Processing_R._Babu_52/CH3/EX3.23.c/Example3_23_c.sce
391700fe12494586c155691a6fb16f751a1ea743
[]
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
215
sce
Example3_23_c.sce
errcatch(-1,"stop");mode(2);//Example 3.23 (c) //MAXIMA SCILAB TOOLBOX REQUIRED FOR THIS PROGRAM //N point DFT of a^n ; syms a n k N; x=a^n; X=symsum(x*exp(-%i*2*%pi*n*k/N),n,0,N-1); disp(X,'X(k)='); exit();
22aa3572a0e08b9d46c8900c50d8745fef1b1174
449d555969bfd7befe906877abab098c6e63a0e8
/2609/CH9/EX9.18/Ex9_18.sce
891a73cf7b9d92f47ec3b32671856efccac11546
[]
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,051
sce
Ex9_18.sce
//Ex 9.18 clc; clear; close; format('v',5); Ap=-10;//Pass band gain Q=22;//Quality factor fc=50;//Hz R=60;//dB/decade(Roll off rate) disp("Roll off rate of single op-amp=20 dB/decade. No. of stages will be 3. Desired design can be obtained by cascading three stages."); n=3;//no. of op-amps(as single op-amp has 20 dB/decade) fc1=fc;//Hz fc2=fc;//Hz fc3=fc;//Hz Q1=Q*sqrt(2^(1/n)-1);//Quality factor of each stage Q2=Q1;//Quality factor Q3=Q1;//Quality factor Ap1=-(-Ap)^(1/n);//Band pass gain of each stage Ap2=Ap1;//Band pass gain Ap3=Ap1;//Band pass gain //Design of a single op-amp C=0.1;//micro F//Chosen for the design disp("Various design parameters for a single stages are :"); disp(C,"Capacitance C(micro F)"); format('v',4); R2=Q1/%pi/(fc)/(C*10^-6)/1000;//kohm disp(R2,"Resistance R2(kohm)"); format('v',5); R1=-R2/(2*Ap1);//kohm disp(R1,"Resistance R1(kohm)"); format('v',4); R3=R1/(4*%pi^2*R1*1000*R2*1000*(C*10^-6)^2*(fc)^2-1);//kohm disp(R3,"Resistance R3(ohm)"); //Answer for R2 is wrong in the book.
a416464207103a1fee1ad5c040599825689a7fe8
449d555969bfd7befe906877abab098c6e63a0e8
/1187/CH6/EX6.2/2.sce
82cee4e5525ab07a3eccc11011837aa6fcd2efee
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
182
sce
2.sce
clc c=0.001; // m p1=15*10^3; // Pa u=0.6; // kg/m/s R=6; // ratio of R2/R1 Q=%pi*c^3*p1/(6*u*log(R)); disp("(b)Rate at which oil must be supplied =") disp(Q) disp("m^3/s")
6e421bfc48f5b3d1df7c323ad922f5045a0b7297
449d555969bfd7befe906877abab098c6e63a0e8
/1898/CH10/EX10.13/Ex10_13.sce
2d4119a06bab4f6adb7538989306129225b79af5
[]
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
482
sce
Ex10_13.sce
clear all; clc; disp("Scilab Code Ex 10.13 : ") //Given: T = 400; //Nm sigma_ult = 150*10^6; //N/m^2 //Calculations: x = T/(%pi/2); r_3 = [x/sigma_ult]; r = nthroot(r_3, 3); r= r*1000; //in mm //Display: printf('\n\nThe smallest radius of the solid cast iron shaft = %1.2fmm ',r); //--------------------------------------------------------------------------END--------------------------------------------------------------------------------------
729cba8f44f9f1190efb96388c87595904971e5a
449d555969bfd7befe906877abab098c6e63a0e8
/2282/CH2/EX2.5/ex2_5.sce
c02a91defb910d0f373a6c673eb584779798b1e9
[]
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
195
sce
ex2_5.sce
// Example 2.5, page no-38 clear clc AP_diff=30000 //difference between apogee and perigee in km AP_sum=62800 //Apogee+perigee E=AP_diff/AP_sum printf("Orbit Eccentricity= %.3f",E)
c5faf974b90516d38241e5174de0303d5dd006db
449d555969bfd7befe906877abab098c6e63a0e8
/3831/CH6/EX6.8/Ex6_8.sce
7118053eb1080c6d8cd7d96ace8e6a648e592b9d
[]
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
319
sce
Ex6_8.sce
// Example 6_8 clc;funcprot(0); // Given data T_in=20.0;// °C p_in=1.40;// MPa k=1.40;// The specific heat ratio // Calculation T_finalfilling=k*(T_in+273.15);// K T_finalfilling=T_finalfilling-273.15;// °C printf("\nThe final temperature of the air in the tank,T_final filling=%3.0f°C",T_finalfilling);
901cf578a76299676308f2fb8764f4ef6ba8ac53
449d555969bfd7befe906877abab098c6e63a0e8
/626/CH2/EX2.9/2_9.sce
e84bb02f4f8b238a7d30b5bbe2f0184386affd7a
[]
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
707
sce
2_9.sce
clear; clc; close; disp("Example2.9") d=0.2 //diameter in meters. l=0.2 //length in meters. Cf=0.005 //average wall friction coefficient. M1=0.24 //inlet mach no. gm=1.4 //gamma. //From FANNO tbale L1cr=(9.3866*d/2)/(4*Cf); L2cr=L1cr-l; //from FANNO table M2=0.3; x=2.4956; y=2.0351; a=4.5383; b=3.6191; i1=2.043; i2=1.698; //% total pressure drop due to friction: dpt=(x-y)/(x)*100; //static pressur drop: dps=(a-b)/a*100; //Loss pf fluid: lf=(i2-i1); disp(L1cr,"(a)The choking length of duct in m:") disp(M2,"(b)The exit Mach no.:") disp(dpt,"(c)% total pressure loss:") disp(dps,"(d)The static pressure drop in %:") disp(lf,"(e)Loss of impulse due to friction(I* times):")
b115756cd471c373e7602b1b233a5b9ebf78ffdc
ab89c2161afc0845367b8e25f534e4f99bd36759
/LAB1/partice3.sce
a6df7052c73141dd4f5fc8ebb7d36829effd8ac9
[]
no_license
PhiTruongCE/Digital_Signal_Processing
22446ebfa65765d1dfcd2c420e05c83dc861ec15
bacaf762f31a333a641ac48f6b5cc18f120c65be
refs/heads/main
2023-06-04T03:38:36.140107
2021-06-17T04:04:49
2021-06-17T04:04:49
377,699,926
0
0
null
null
null
null
UTF-8
Scilab
false
false
162
sce
partice3.sce
clc; clf; clear all; l=5; n=-l:l; x=[zeros(1,l),0:l]; a=gca(); a.y_location='middle'; plot2d3(n,x); xtitle('Unit ramp'); xlabel('n'); ylabel('x(n)');
be9170da0e18b5a2a3ff0bc10546c9c50806bec5
449d555969bfd7befe906877abab098c6e63a0e8
/3401/CH3/EX3.3/Ex3_3.sce
dcb5e60fed01d83574f37b02c99ee61bb12d9136
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
142
sce
Ex3_3.sce
clc m=9.11*10^-31 //kg E=1.6*10^-19 //C h=6.625*10^-34 //J sec N=(4*%pi*(2*m)^(3/2)*2*E^(3/2))/(h^3*3) disp(N,'E2= %f per meter^3\n')
dee2ad080d61d9df8e12e6d3c627de74f00563f8
449d555969bfd7befe906877abab098c6e63a0e8
/2863/CH2/EX2.9/ex2_9.sce
2a27c7906144a002e018fd1be0fba45b95ced4c1
[]
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
303
sce
ex2_9.sce
//chapter 2 //Etheta=60Im/r*(cos(pi/2cos(theta))/sin(theta)); //theta=90 //Pavg=Rrad*Irms^2; //Irms=Im/sqrt(2) printf("\n"); Im=100*10^-3; r=100 Etheta=(60*10^-3); H=(60*10^-3)/(120*(%pi)); Pavg=73*(10^-1/sqrt(2))^2;//Rrad=73ohm for half wave dipole printf("the average power is %gW",Pavg);
0be9046a606ede7660c3836d838efcf5690d8ccc
b9c6de66a61d6f9a57edaa44baf92266ccbab3db
/macros/distfun_hygecdf.sci
f0212b2a3e58dc81d0109d27c9b50eb250178a84
[]
no_license
papriwalprateek/distfun-scilab
81b3edef0af1d1908e05472dfb15b0a55f61571d
82fd34521d1e6ebb6513773264b54a0d48f5f3f9
refs/heads/master
2016-09-03T07:08:47.605240
2013-10-13T05:53:43
2013-10-13T05:53:43
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
4,995
sci
distfun_hygecdf.sci
// Copyright (C) 2012 - Prateek Papriwal // Copyright (C) 2012 - Michael Baudin // // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt // function p = distfun_hygecdf(varargin) // Hypergeometric CDF // // Calling Sequence // p = distfun_hygecdf(x,M,k,N) // p = distfun_hygecdf(x,M,k,N,lowertail) // // Parameters // x : a 1x1 or nxm matrix of doubles, the number of successful draws in the experiment. x belongs to the set [0,min(k,N)] // M : a 1x1 or nxm matrix of doubles, the total size of the population. M belongs to the set {0,1,2,3........} // k : a 1x1 or nxm matrix of doubles, the number of successful states in the population. k belongs to the set {0,1,2,3,.......M-1,M} // N : a 1x1 or nxm matrix of doubles, the total number of draws in the experiment. N belongs to the set {0,1,2,3.......M-1,M} // lowertail : a 1x1 matrix of booleans, the tail (default lowertail=%t). If lowertail is true (the default), then considers P(X<=x) otherwise P(X>x). // p : a nxm matrix of doubles, the probability. // // Description // Computes the cumulative distribution function of // the Hypergeometric distribution function. // // Any scalar input argument is expanded to a matrix of doubles // of the same size as the other input arguments. // // Examples // // Tests with all the arguments scalar // computed = distfun_hygecdf(20,80,50,30) // expected = 0.7974774 // // // Test with x expanded // computed = distfun_hygecdf([20 17],80,50,30) // expected = [0.7974774 0.2746181] // // // Test with M expanded // computed = distfun_hygecdf(20,[80 100],50,30) // expected = [0.7974774 0.9921915] // // // Test with x,N expanded // computed = distfun_hygecdf([20 17],80,[50 60],30) // expected = [0.7974774 0.0041404] // // // Test with all the arguments expanded // copmuted = distfun_hygecdf([20 17 15],[100 80 90],[50 60 70],[30 20 18]) // expected = [0.9921915 0.9375322 0.8279598] // // // See upper tail // p = distfun_hygecdf(20,80,50,30) // lt_expected = 0.7974774 // q = distfun_hygecdf(20,80,50,30,%f) // ut_expected = 0.2025226 // p+q // // // Plot the function // scf(); // x = (0:30)'; // y = distfun_hygecdf(x,80,50,30); // distfun_plotintcdf(x,y); // xtitle("Hypergeometric CDF"); // legend("M=80,k=50,N=30","in_upper_left"); // // Bibliography // http://en.wikipedia.org/wiki/Hypergeometric_distribution // // Authors // Copyright (C) 2012 - Prateek Papriwal // Copyright (C) 2012 - Michael Baudin [lhs,rhs] = argn() apifun_checkrhs("distfun_hygecdf",rhs,4:5) apifun_checklhs("distfun_hygecdf",lhs,0:1) x = varargin(1) M = varargin(2) k = varargin(3) N = varargin(4) lowertail = apifun_argindefault(varargin,5,%t) // // Check type apifun_checktype("distfun_hygecdf",x,"x",1,"constant") apifun_checktype("distfun_hygecdf",M,"M",2,"constant") apifun_checktype("distfun_hygecdf",k,"k",3,"constant") apifun_checktype("distfun_hygecdf",N,"N",4,"constant") apifun_checktype("distfun_hygecdf",lowertail,"lowertail",5,"boolean") // // Check size apifun_checkscalar("distfun_hygecdf",lowertail,"lowertail",5) // // Check content apifun_checkgreq("distfun_hygecdf",x,"x",1,0) apifun_checkgreq("distfun_hygecdf",M,"M",2,0) apifun_checkgreq("distfun_hygecdf",k,"k",3,0) apifun_checkgreq("distfun_hygecdf",N,"N",4,0) // apifun_checkflint("distfun_hygepdf",x,"x",1) apifun_checkflint("distfun_hygepdf",M,"M",2) apifun_checkflint("distfun_hygepdf",k,"k",3) apifun_checkflint("distfun_hygepdf",N,"N",4) // if (x == []) then p=[] return end // [x,M,k,N] = apifun_expandvar(x,M,k,N) // myloweq("distfun_hygepdf",x,"x",1,N) // x<=N myloweq("distfun_hygepdf",x,"x",1,k) // x<=k myloweq("distfun_hygepdf",k,"k",2,M) // k<=M myloweq("distfun_hygepdf",N,"N",4,M) // N<=M // p=distfun_cdfhyge(x,M,k,N,lowertail) endfunction function myloweq( funname , var , varname , ivar , thr ) // Workaround for bug http://forge.scilab.org/index.php/p/apifun/issues/867/ // Caution: // This function assumes that var and thr are matrices with // same size. // Expand the arguments before calling it. if ( or ( var > thr ) ) then k = find ( var > thr ,1) errmsg = msprintf(gettext("%s: Wrong input argument %s at input #%d. Entry %s(%d) is equal to %s but should be lower than %s."),funname,varname,ivar,varname,k,string(var(k)),string(thr(k))); error(errmsg); end endfunction
d0aa8b367faf9f77d6e82603c864628cbc46892e
449d555969bfd7befe906877abab098c6e63a0e8
/572/CH3/EX3.10/c3_10.sce
020e64aec2339562bce47fa74a672b085e6d1318
[]
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
447
sce
c3_10.sce
//(3.10) One kmol of carbon dioxide gas (CO2) in a piston–cylinder assembly undergoes a constant-pressure process at 1 bar from T1 = 300 K to T2. Plot the heat transfer to the gas, in kJ, versus T2 ranging from 300 to 1500 K. Assume the ideal gas model, and determine the specific internal energy change of the gas using. (a)Ubar data from IT.(b) a constant Cv bar evaluated at T1 from IT. printf('This is solved by the referred software ')
533fd2807ca924f6d7ccdf70410898e4f155328a
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.5/macros/util/halt.sci
356bd46af5416232be18058c7635717dd45fc9e9
[ "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
163
sci
halt.sci
function []=halt() //halt() stops execution until something is entered in the keyboard. //! // Copyright INRIA write(%io(2),'halt'),read(%io(1),1,1,'(a1)');
8d4e4f42ac339725947a1a6aebe5108a42fbf78f
449d555969bfd7befe906877abab098c6e63a0e8
/147/CH11/EX11.9/Example11_9.sce
c447e2d2851b8ea9185c6e3109ce4f058024221e
[]
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
325
sce
Example11_9.sce
close(); clear; clc; Vcc = 5; //V Vb = 3.5; //V Rc = 640; //ohm Rb1 = 450; //ohm Rb2 = Rb1; Vcesat = 0.2; //V B = 50; Ibsat = (Vcc-Vcesat)/(B*Rc); //number of gates that can be attached to v n = (Vcc-Vb)/(Rc*Ibsat); mprintf("number of gates that can be attached to v without risk of error in logic, n < %d",n);
9a96059794de1aaf44a24c4337a3b8d93819d345
449d555969bfd7befe906877abab098c6e63a0e8
/3769/CH6/EX6.9/Ex6_9.sce
afc5669828d32aa6db43417fa7a0f557be29fd72
[]
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
187
sce
Ex6_9.sce
clear //Given a=10 b=7.0 c=5 d=4 e=8.0 //Calculation I1=(a+a)/(b+1) I3=(c+(4*I1))/e I2=(-a+(6*I3)+I1)/2.0 //Result printf("\n Current I1= %0.3f A \nI2= %0.3f A \nI3= %0.3f A",I1,I2,I3)
888e28485b336e9b9d00dfea110320c52d386cd3
d3ba33088e5d34eaccff205f30b4515b9f598dcf
/sci2blif/io_info/io_info_rasp30.sce
2acd6f8901286e1fbd7058d51ce62998df217c8d
[]
no_license
woodjamesdee/rasp30
d707e480bf116ce278cf4b37b73de9d076e5ede1
7f9251e3ec8d8a6ef827b09009b08d575254bd2e
refs/heads/master
2020-04-21T14:35:45.199183
2019-05-20T18:58:42
2019-05-20T18:58:42
169,640,192
1
0
null
null
null
null
UTF-8
Scilab
false
false
10,274
sce
io_info_rasp30.sce
//********** 3.0 ********** dac_loc{1,1}(1)= '9 0 1 #int[1]'; dac_loc{1,1}(2)= '2'; //DAC2 dac_loc{1,2}(1)= '9 0 2 #int[2]'; dac_loc{1,2}(2)= '3'; //DAC3 dac_loc{1,3}(1)= '8 0 5 #int[5]'; dac_loc{1,3}(2)= '0'; //DAC0 dac_loc{1,4}(1)= '9 0 3 #int[3]'; dac_loc{1,4}(2)= '4'; //DAC4 dac_loc{1,5}(1)= '9 0 4 #int[4]'; dac_loc{1,5}(2)= '5'; //DAC5 dac_loc{1,6}(1)= '9 0 5 #int[5]'; dac_loc{1,6}(2)= '6'; //DAC6 dac_loc{1,7}(1)= '10 0 0 #int[0]'; dac_loc{1,7}(2)= '7'; //DAC7 dac_loc{1,8}(1)= '10 0 1 #int[1]'; dac_loc{1,8}(2)= '8'; //DAC8 dac_loc{1,9}(1)= '10 0 2 #int[2]'; dac_loc{1,9}(2)= '9'; //DAC9 dac_loc{1,10}(1)= '9 0 0 #int[0]'; dac_loc{1,10}(2)= '1'; //DAC1 dac_loc{1,11}(1)= '10 0 3 #int[3]'; dac_loc{1,11}(2)= '10'; //DAC10 dac_loc{1,12}(1)= '10 0 4 #int[4]'; dac_loc{1,12}(2)= '11'; //DAC11 //********** 3.0 ********** dac_buf_loc{1,1}='10 0 5 #int[5]'; dac_buf_loc{1,2}='11 0 0 #int[0]'; dac_buf_loc{1,3}='11 0 1 #int[1]'; dac_buf_loc{1,4}='11 0 2 #int[2]'; //********** 3.0 ********** gpin_loc{1,1}(1)='13 0 1 #int[1]'; gpin_loc{1,1}(2)='0'; //west GPIO proc to arrat gpin_loc{1,2}(1)='13 0 2 #int[2]'; gpin_loc{1,2}(2)='1'; //west gpin_loc{1,3}(1)='13 0 3 #int[3]'; gpin_loc{1,3}(2)='2'; //west gpin_loc{1,4}(1)='13 0 4 #int[4]'; gpin_loc{1,4}(2)='3'; //west gpin_loc{1,5}(1)='13 0 5 #int[5]'; gpin_loc{1,5}(2)='4'; //west gpin_loc{1,6}(1)='14 0 0 #int[0]'; gpin_loc{1,6}(2)='5'; //west gpin_loc{1,7}(1)='14 0 1 #int[1]'; gpin_loc{1,7}(2)='6'; //west gpin_loc{1,8}(1)='14 0 2 #int[2]'; gpin_loc{1,8}(2)='7'; //west gpin_loc{1,9}(1)='14 0 3 #int[3]'; gpin_loc{1,9}(2)='8'; //west gpin_loc{1,10}(1)='14 0 4 #int[4]'; gpin_loc{1,10}(2)='9'; //west gpin_loc{1,11}(1)='14 0 5 #int[5]'; gpin_loc{1,11}(2)='10'; //west gpin_loc{1,12}(1)='15 1 0 #int[0]'; gpin_loc{1,12}(2)='11'; //west gpin_loc{1,13}(1)='15 1 1 #int[1]'; gpin_loc{1,13}(2)='12'; //west gpin_loc{1,14}(1)='15 1 2 #int[2]'; gpin_loc{1,14}(2)='13'; //west gpin_loc{1,15}(1)='15 1 3 #int[3]'; gpin_loc{1,15}(2)='14'; //west gpin_loc{1,16}(1)='15 1 4 #int[4]'; gpin_loc{1,16}(2)='15'; //west //********** 3.0 ********** adc_locin{1,1}='5 0 5 #int[5]'; //adc in 0 adc_locin{1,2}='6 0 0 #int[0]'; //adc in 1 //********** 3.0 ********** adc_loc{1,1}='7 0 2 #int[2]'; //adc out0 0 adc_loc{1,2}='7 0 1 #int[1]'; //adc out0 1 adc_loc{1,3}='7 0 0 #int[0]'; //adc out0 2 adc_loc{1,4}='6 0 5 #int[5]'; //adc out0 3 adc_loc{1,5}='6 0 4 #int[4]'; //adc out0 4 adc_loc{1,6}='6 0 3 #int[3]'; //adc out0 5 adc_loc{1,7}='6 0 2 #int[2]'; //adc out0 6 adc_loc{1,8}='6 0 1 #int[1]'; //adc out0 7 adc_loc{1,9}='8 0 4 #int[4]'; //adc out1 0 adc_loc{1,10}='8 0 3 #int[3]'; //adc out1 1 adc_loc{1,11}='8 0 2 #int[2]'; //adc out1 2 adc_loc{1,12}='8 0 1 #int[1]'; //adc out1 3 adc_loc{1,13}='8 0 0 #int[0]'; //adc out1 4 adc_loc{1,14}='7 0 5 #int[5]'; //adc out1 5 adc_loc{1,15}='7 0 4 #int[4]'; //adc out1 6 adc_loc{1,16}='7 0 3 #int[3]'; //adc out1 7 //********** 3.0 ********** iopad_loc{1,13}='1 0 3 #'; //west iopad_loc{1,14}='2 0 3 #'; //west iopad_loc{1,9}='3 0 0 #'; //west iopad_loc{1,10}='3 0 3 #'; //west iopad_loc{1,11}='4 0 0 #'; //west iopad_loc{1,12}='4 0 3 #'; //west iopad_loc{1,1}='9 0 0 #'; //west iopad_loc{1,2}='11 0 0 #'; //west iopad_loc{1,3}='12 0 0 #'; //west iopad_loc{1,4}='12 0 3 #'; //west iopad_loc{1,5}='13 0 0 #'; //west iopad_loc{1,6}='13 0 3 #'; //west iopad_loc{1,7}='14 0 0 #'; //west iopad_loc{1,8}='14 0 3 #'; //west iopad_loc{1,15}='1 15 0 #'; //east iopad_loc{1,16}='1 15 3 #'; //east iopad_loc{1,17}='2 15 0 #'; //east iopad_loc{1,18}='2 15 3 #'; //east iopad_loc{1,19}='3 15 0 #'; //east iopad_loc{1,20}='9 15 3 #'; //east iopad_loc{1,21}='9 15 0 #'; //east iopad_loc{1,22}='10 15 3 #'; //east iopad_loc{1,23}='10 15 0 #'; //east iopad_loc{1,24}='11 15 3 #'; //east iopad_loc{1,25}='11 15 0 #'; //east iopad_loc{1,26}='12 15 0 #'; //east iopad_loc{1,27}='15 1 5 #'; //south iopad_loc{1,28}='15 1 2 #'; //south iopad_loc{1,29}='15 2 5 #'; //south iopad_loc{1,30}='15 2 2 #'; //south iopad_loc{1,31}='15 3 5 #'; //south iopad_loc{1,32}='15 4 2 #'; //south iopad_loc{1,33}='15 11 5 #'; //south iopad_loc{1,34}='15 12 2 #'; //south iopad_loc{1,35}='15 12 5 #'; //south iopad_loc{1,36}='15 13 2 #'; //south iopad_loc{1,37}='15 13 5 #'; //south iopad_loc{1,38}='15 14 2 #'; //south iopad_loc{1,39}='15 14 5 #'; //south iopad_loc{1,40}='13 0 1 #int[1]'; //west GPIO proc to arrat iopad_loc{1,41}='13 0 2 #int[2]'; //west iopad_loc{1,42}='13 0 3 #int[3]'; //west iopad_loc{1,43}='13 0 4 #int[4]'; //west iopad_loc{1,44}='13 0 5 #int[5]'; //west iopad_loc{1,45}='14 0 0 #int[0]'; //west iopad_loc{1,46}='14 0 1 #int[1]'; //west iopad_loc{1,47}='14 0 2 #int[2]'; //west iopad_loc{1,48}='14 0 3 #int[3]'; //west iopad_loc{1,49}='14 0 4 #int[4]'; //west iopad_loc{1,50}='14 0 5 #int[5]'; //west iopad_loc{1,51}='15 1 0 #int[0]'; //west iopad_loc{1,52}='15 1 1 #int[1]'; //west iopad_loc{1,53}='15 1 2 #int[2]'; //west iopad_loc{1,54}='15 1 3 #int[3]'; //west iopad_loc{1,55}='15 1 4 #int[4]'; //west iopad_loc{1,56}='15 1 5 #int[5]'; //south GPIO array to proc iopad_loc{1,57}='15 2 0 #int[0]'; //south iopad_loc{1,58}='15 2 1 #int[1]'; //south iopad_loc{1,59}='15 2 2 #int[2]'; //south iopad_loc{1,60}='15 2 3 #int[3]'; //south iopad_loc{1,61}='15 2 4 #int[4]'; //south iopad_loc{1,62}='15 2 5 #int[5]'; //south iopad_loc{1,63}='15 3 0 #int[0]'; //south iopad_loc{1,64}='15 3 1 #int[1]'; //south iopad_loc{1,65}='15 3 2 #int[2]'; //south iopad_loc{1,66}='15 3 3 #int[3]'; //south iopad_loc{1,67}='15 3 4 #int[4]'; //south iopad_loc{1,68}='15 3 5 #int[5]'; //south iopad_loc{1,69}='15 4 0 #int[0]'; //south iopad_loc{1,70}='15 4 1 #int[1]'; //south iopad_loc{1,71}='15 4 2 #int[2]'; //south iopad_loc{1,72}='15 12 5 #int[5]'; //Vg _array_gate sel iopad_loc{1,73}='0 11 2 #int[2]'; //Vg _array_gate sel iopad_loc{1,74}='9 15 3 #int[3]'; //east Analog_memory_Vout<0> iopad_loc{1,75}='0 12 5 #int[5]'; //north Analog_memory_pbias<0> iopad_loc{1,76}='4 15 1 #int[1]'; //east Analog_memory_nbias<0> iopad_loc{1,77}='14 15 5 #int[5]'; //east mem_in<0> iopad_loc{1,78}='15 11 4 #int[4]'; //south am clk iopad_loc{1,79}='0 6 4 #int[4]'; //north barrel_shiftter_out<0> iopad_loc{1,80}='0 6 3 #int[3]'; //north barrel_shiftter_out<0> iopad_loc{1,81}='0 6 2 #int[2]'; //north barrel_shiftter_out<0> iopad_loc{1,82}='0 6 1 #int[1]'; //north barrel_shiftter_out<0> iopad_loc{1,83}='0 6 0 #int[0]'; //north barrel_shiftter_out<0> iopad_loc{1,84}='0 5 5 #int[5]'; //north barrel_shiftter_out<0> iopad_loc{1,85}='0 5 4 #int[4]'; //north barrel_shiftter_out<0> iopad_loc{1,86}='0 5 3 #int[3]'; //north barrel_shiftter_out<0> iopad_loc{1,87}='0 5 2 #int[2]'; //north barrel_shiftter_out<0> iopad_loc{1,88}='0 5 1 #int[1]'; //north barrel_shiftter_out<0> iopad_loc{1,89}='0 5 0 #int[0]'; //north barrel_shiftter_out<0> iopad_loc{1,90}='0 4 5 #int[5]'; //north barrel_shiftter_out<0> iopad_loc{1,91}='0 4 4 #int[4]'; //north barrel_shiftter_out<0> iopad_loc{1,92}='0 4 3 #int[3]'; //north barrel_shiftter_out<0> iopad_loc{1,93}='0 4 2 #int[2]'; //north barrel_shiftter_out<0> iopad_loc{1,94}='0 4 1 #int[1]'; //north barrel_shiftter_out<0> iopad_loc{1,95}='0 4 0 #int[0]'; //north barrel_shiftter_out<0> iopad_loc{1,96}='0 3 5 #int[5]'; //north barrel_shiftter_out<0> iopad_loc{1,97}='0 3 4 #int[4]'; //north barrel_shiftter_out<0> iopad_loc{1,98}='0 3 3 #int[3]'; //north barrel_shiftter_out<0> iopad_loc{1,99}='0 3 2 #int[2]'; //north barrel_shiftter_out<0> iopad_loc{1,100}='0 3 1 #int[1]'; //north barrel_shiftter_out<0> iopad_loc{1,101}='0 3 0 #int[0]'; //north barrel_shiftter_out<0> iopad_loc{1,102}='0 2 5 #int[5]'; //north barrel_shiftter_out<0> iopad_loc{1,103}='0 2 4 #int[4]'; //north barrel_shiftter_out<0> iopad_loc{1,104}='0 2 3 #int[3]'; //north barrel_shiftter_out<0> iopad_loc{1,105}='0 2 2 #int[2]'; //north barrel_shiftter_out<0> iopad_loc{1,106}='0 2 1 #int[1]'; //north barrel_shiftter_out<0> iopad_loc{1,107}='0 2 0 #int[0]'; //north barrel_shiftter_out<0> iopad_loc{1,108}='0 1 5 #int[5]'; //north barrel_shiftter_out<0> iopad_loc{1,109}='0 1 4 #int[4]'; //north barrel_shiftter_out<0> iopad_loc{1,110}='0 1 3 #int[3]'; //north barrel_shiftter_out<31> iopad_loc{1,111}='0 1 2 #int[2]'; //north barrel_shiftter_in<0> iopad_loc{1,112}='0 1 1 #int[1]'; //north barrel_shiftter_in<0> iopad_loc{1,113}='0 1 0 #int[0]'; //north barrel_shiftter_in<0> iopad_loc{1,114}='1 0 0 #int[0]'; //east barrel_shiftter_in<0> iopad_loc{1,115}='1 0 1 #int[1]'; //east barrel_shiftter_in<0> iopad_loc{1,116}='1 0 2 #int[2]'; //east barrel_shiftter_in<0> iopad_loc{1,117}='1 0 3 #int[3]'; //east barrel_shiftter_in<0> iopad_loc{1,118}='1 0 4 #int[4]'; //east barrel_shiftter_in<0> iopad_loc{1,119}='1 0 5 #int[5]'; //east barrel_shiftter_in<0> iopad_loc{1,120}='2 0 0 #int[0]'; //east barrel_shiftter_in<0> iopad_loc{1,121}='2 0 1 #int[1]'; //east barrel_shiftter_in<0> iopad_loc{1,122}='2 0 2 #int[2]'; //east barrel_shiftter_in<0> iopad_loc{1,123}='2 0 3 #int[3]'; //east barrel_shiftter_in<0> iopad_loc{1,124}='2 0 4 #int[4]'; //east barrel_shiftter_in<0> iopad_loc{1,125}='2 0 5 #int[5]'; //east barrel_shiftter_in<0> iopad_loc{1,126}='3 0 0 #int[0]'; //east barrel_shiftter_in<0> iopad_loc{1,127}='3 0 1 #int[1]'; //east barrel_shiftter_in<0> iopad_loc{1,128}='3 0 2 #int[2]'; //east barrel_shiftter_in<0> iopad_loc{1,129}='3 0 3 #int[3]'; //east barrel_shiftter_in<0> iopad_loc{1,130}='3 0 4 #int[4]'; //east barrel_shiftter_in<0> iopad_loc{1,131}='3 0 5 #int[5]'; //east barrel_shiftter_in<0> iopad_loc{1,132}='4 0 0 #int[0]'; //east barrel_shiftter_in<0> iopad_loc{1,133}='4 0 1 #int[1]'; //east barrel_shiftter_in<0> iopad_loc{1,134}='4 0 2 #int[2]'; //east barrel_shiftter_in<0> iopad_loc{1,135}='4 0 3 #int[3]'; //east barrel_shiftter_in<0> iopad_loc{1,136}='4 0 4 #int[4]'; //east barrel_shiftter_in<0> iopad_loc{1,137}='4 0 5 #int[5]'; //east barrel_shiftter_in<0> iopad_loc{1,138}='5 0 0 #int[0]'; //east barrel_shiftter_in<0> iopad_loc{1,139}='5 0 1 #int[1]'; //east barrel_shiftter_in<0> iopad_loc{1,140}='5 0 2 #int[2]'; //east barrel_shiftter_in<0> iopad_loc{1,141}='5 0 3 #int[3]'; //east barrel_shiftter_in<0> iopad_loc{1,142}='5 0 4 #int[4]'; //east barrel_shiftter_in<0> iopad_loc{1,143}='13 0 0 #int[0]'; //east dco_clk
ccd1ce660ebde6cbf4b269bd729086147d5ba7ff
a24c640895f1cfb1e3242099f641df51ee10297e
/example_programs/factorial.tst
5723ccba8d3e396985f5642aee8bd498a2e4fee8
[ "CC-BY-3.0" ]
permissive
supermaximo93/Toast-Prototype-Interpreter
1c3d981a550f6498bb5fcc8952fdd6a5ae4c71b3
13547e96813add755791b33a19a4831f5e338094
refs/heads/master
2021-01-19T10:58:00.401688
2012-03-14T09:18:27
2012-03-14T09:18:27
3,140,649
0
0
null
null
null
null
UTF-8
Scilab
false
false
548
tst
factorial.tst
/////////////////////////////////////////////////////////////////////// /////////////// FACTORIAL /////////////// /////////////////////////////////////////////////////////////////////// let iterative_factorial(x) = if x <= 1, exit(1) let result = x while x > 1, let x = x - 1 let result = result * x end result end let recursive_factorial(x) = if x <= 1, 1 else x * recursive_factorial(x - 1) end end let single_line_factorial(x) = if x <= 1, 1 else x * single_line_factorial(x - 1)
50dd9e29429bd2a161f3f50605a1735db758298c
449d555969bfd7befe906877abab098c6e63a0e8
/2507/CH10/EX10.4/Ex10_4.sce
2a847be2c134d336c0e5159bbe28587833e41a7b
[]
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
766
sce
Ex10_4.sce
clc clear printf("Example 10.4 | Page number 350 \n\n"); //Find temperature and all other specific properties //Given data p1 = 500 //kPa //initial pressure s1 = 1.3625 //initial entropy //Solution //Using Method 2: Ts = 424.28 //K //temperature at 500kPa sf = 1.8606 //kJ/kgK //entropy at 500kPa Cwat = 4.189 //kJ/kgK //specific heat of water T1 = (exp((sf-s1)/Cwat)/Ts)^-1 //K printf("Temperature = %.2f °C\n",T1-273) v1 = 0.001 //m^3/kg //volume per kg water h1 = (640.21 - Cwat*(151.86-T1+273)) // kJ/kg //Enthalpy per kg water u1 = h1 - p1*v1 //kJ/kg //internal energy per kg water printf("Volume per kg water = %.3f m^3/kg\n",v1) printf("Enthalpy per kg water = %.1f kJ/kg\n",h1) printf("Internal energy per kg water = %.1f kJ/kg\n",u1)
455376a89e0844987fa29702f655ec7d812ded55
449d555969bfd7befe906877abab098c6e63a0e8
/2471/CH5/EX5.14/Ex5_14.sce
ab4a15249e3f2fe5bcf413372b1c15446af9d328
[]
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,331
sce
Ex5_14.sce
clear ; clc; // Example 5.14 printf('Example 5.14\n\n'); printf('Page No. 137\n\n'); // given T1 = 25;// Wet-bulb temperature in degree celcius T2 = 40;//Dry-bulb temperature in degree celcius //By using the humidity chart and steam tables for air-water mixtures at the given temperatures, the all following data can be obtained //(a) humidity w = 0.014;// in kg/kg printf('the required humidity is %.3f kg/kg \n',w) //(b) relative humidity R_H = 30;// in percentage printf('the required relative humidity in percentage is %.0f\n\n',R_H) //(c) the dew point T_w = 20;// in degree celcius printf('the required dew-point temperature is %.0f deg C\n',T_w) //(d) the humid heat Cpa = 1.006*10^3;// Heat Capacity of bone dry air in J/kg-K Cpwv = 1.89*10^3;// Heat Capacity of water vapour in J/kg-K S = Cpa + (w*Cpwv);//in J/kg-K printf('the humid heat is %.0f J/kg-K\n\n',S ) //(e) the humid volume V_G = ((1/29)+(w/18))*22.41*((T2 + 273)/273);//in m^3/kg printf('the humid volume is %.3f m^3/kg \n',V_G) //(f) adiabatic process w_A = 0.020;// in kg/kg printf('the humidity of the mixture if saturated adiabatically is %.3f kg/kg \n\n',w_A) // (h) isothermal process w_i = 0.049;// in kg/kg printf('the humidity of the mixture if saturated isothermally is %.3f kg/kg \n',w_i)
974f9ad79322cb1d4df91f0d2e7efc3a83ed392f
449d555969bfd7befe906877abab098c6e63a0e8
/2024/CH8/EX8.13/8_13.sce
8fe9ed49fd4e8b9412097da1551ee3293b754305
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
220
sce
8_13.sce
clc //Initialization of variables Pr=10 n=1.3 T1=900 //R W=50 //Btu/lbm //calculations T2=T1/Pr^((n-1)/n) h1=120.86 h2=30.69 dh=h2-h1 ke=-dh-W //results printf("Change in kinetic energy = %.2f Btu/lbm",ke)