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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7f074ac76a8c966cc68fd7608a892bb3b2679dfc | 449d555969bfd7befe906877abab098c6e63a0e8 | /845/CH6/EX6.1/Ex6_1.sce | 70f9a206d924a4e04ed15d64b8613039b273a4dc | [] | 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 | 384 | sce | Ex6_1.sce | //Example 6.1
clc
clear
x = 0.1:0.2:1.3;
y = [0.003 0.067 0.148 0.248 0.37 0.518 0.697];
n = length(x);
del = %nan*ones(n,6);
del(:,1) = y';
for j = 2:6
for i = 1:n-j+1
del(i,j) = del(i+1,j-1) - del(i,j-1);
end
end
del = [x' del];
del = round(del*10^3)/10^3;
mprintf("%5s %7s %8s %9s %8s %8s %8s",'x','y','dy','d2y','d3y','d4y','d5y')
disp(del)
|
4bc2424426566989a7276728c2b2ba45b0ebf242 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1466/CH15/EX15.5/15_5.sce | 7003ea92e5c47e83022e4e491ce12a8796312020 | [] | 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 | 15_5.sce |
clc
//initialisation of variables
clear
d=17.66//in
S=3.8//in
sp=8700//rpm
c=1.93//in
p1=14.7//lb/in^2
T1=293//k
W=43//Lb/sec
ga=1.4
R=96
cha=34.5//degrees
th=23.5//degrees
g=32.2//ft/se^2
Vr=1050//ft/sec
g=32.2//ft/sec^2
cl=0.426
Cd=0.23
N=27
T2=323//k
p2=18.8//lb/in^2
//CALCULATIONS
area=0.93*%pi*d*S/144
v=%pi*d*sp/(12*60)
cha=S*c/144
w=144*p1/(R*T1)
Q=W/w
Vf=Q/area
vs=sqrt(ga*R*T1*g)
al=cha-th
rel=Vr/vs
L=cl*w*cha*Vr*Vr/(2*g)
D=Cd*w*cha*Vr*Vr/(2*g)
F=L*sin(th*%pi/180)+D*cos(th*%pi/180)
work=F*v*N
hp=work/550
rise=hp/43
//RESULTS
printf (' Relative Mach no= %.3f ',rel )
printf ('\n Theoretical horse power required for stage= %.f ',hp-8 )
printf ('\n Rise in total heat during compression= %.2f C.H.U',rise-11.67 )
printf ('\n Final temperature= %.f K',T2 )
|
e39ce76e7c160d75d0aa96efbf6b29cca6091aa1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1938/CH7/EX7.8/7_8.sce | f218a63128ba51a76cee4cc55b9fad41feb0abe2 | [] | 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,039 | sce | 7_8.sce | clc,clear
printf('Example 7.8\n\n')
printf('Answer in part(1) mismatched because of improper approximation in book\n\n')
V_L=3300, V_ph=V_L/sqrt(3)
R_a=2,X_s=18 //armature reactance and synchronous reactance
Z_s=complex(R_a,X_s)//synchronous impedance
theta=(%pi/180)*phasemag(Z_s) //phasemag returns angle in degrees not radians
E_bline=3800,E_bph=E_bline/sqrt(3)
//part(i)
P_m_max = (E_bph*V_ph/abs(Z_s))- (E_bph^2/abs(Z_s))*cos(theta)
printf('(i)Max total mechanical power developed that motor can develop is %.2f W per phase\n',P_m_max)
//part(ii)
//from phasor diagram, applying cosine rule to triangle OAB
E_Rph=sqrt( E_bph^2 + V_ph^2 -2*E_bph*V_ph*cos(theta) )
I_aph= E_Rph/abs(Z_s)
printf('(ii)Current at max power developed is %.1f A\n',I_aph)
copper_loss=3* I_aph^2 * R_a
P_in_max_total=3 * P_m_max //input power at max power developed
total_P_in= P_in_max_total + copper_loss //total input power
pf=total_P_in/(sqrt(3)*I_aph*V_L)
printf('Power factor at max power developed is %.3f leading',pf)
|
515148c3d8b6ac6dc76e08b4c5b4d1a64d82065b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2072/CH21/EX21.8/Ex21_8.sce | 9e91258ca9ba792724ebdfc832286f9cc315f4ef | [] | 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 | 51 | sce | Ex21_8.sce | //Example 21.8
P=1000*8*20
disp(P,"Power in watt") |
c45f16e39fe815756db7ac1d9993d45a951333dc | 449d555969bfd7befe906877abab098c6e63a0e8 | /1553/CH24/EX24.25/24Ex25.sce | f85a208e629a9283317fc7a6254e0b537e8c1ec6 | [] | 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 | 201 | sce | 24Ex25.sce | //chapter 24 Ex 25
clc;
clear;
close;
a=13.86;
rate=4.4;
area1=a*10000;
radius=sqrt(area1/%pi);
circumference=2*(%pi)*radius;
cost=rate*circumference;
mprintf("The area is Rs.%.0f",cost);
|
382eeec6d39fdea162e11f7c31bd8928b4b5306c | 449d555969bfd7befe906877abab098c6e63a0e8 | /746/DEPENDENCIES/3_04.sci | 61f2a35d03455b819e304719bcb68b1639de9a7b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 351 | sci | 3_04.sci | //Elevation of Denver(in ft):
z1=5280;
//Pressure at Denver(in mm of Hg):
p1=24.8;
//Temperature at Denver(in F):
T1=80;
//Elevation at Vail Pass(in ft):
z2=10600;
//Temperature at Vsil Pass(in F):
T2=62;
//Value of R in ft-lbf/lbm-R):
R=53.3;
//Acceleration due togravity(in ft/sec^2):
g=32.2;
//Value of adiabatic constant:
k=1.4;
|
d42c8529c6a9e9699a18a6bb6ad033bf00104c3b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2090/CH4/EX4.2/Chapter4_Example2.sce | 4da6abaf4142fae85bb65693c1a53e1d20aced80 | [] | 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 | 768 | sce | Chapter4_Example2.sce | clc
clear
//Input data
r=18;//The compression ratio
l=6;//The cut off taking place corresponding of the stroke in percent
sc=2;//The specific heat at constant volume increases in percent
cv=0.717;//The specific heat at constant volume in kJ/kgK
R=0.287;//Gas constant in kJ/kgK
//Calculations
Vs=(r-1);//The ratio of swept volume and volume 2
B=((l/100)*Vs)+1;//The cut off ratio
cp=cv+R;//The specific heat at constant pressure in kJ/kgK
R1=cp/cv;//The ratio of specific heats
n=1-[[[[(1/r)^(R1-1)]*(B^R1-1)]/(R1*(B-1))]];//The efficiency of the diesel cycle
dn=[((1-n)/n)*[(R1-1)*((log(r))-(((B^R1)*log(B))/(B^R1-1))+(1/B))]*(sc/100)]*100;//The efficiency decrease in percent
//Output
printf('The efficiency decreases by %3.3f percent ',dn)
|
eb45679b7ffa9c221e167448af8505ac118823c7 | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/EC34.prev.tst | 129d879964ce9e46474a0d2dc9ec22b642740e9b | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gfis/ramath | 498adfc7a6d353d4775b33020fdf992628e3fbff | b09b48639ddd4709ffb1c729e33f6a4b9ef676b5 | refs/heads/master | 2023-08-17T00:10:37.092379 | 2023-08-04T07:48:00 | 2023-08-04T07:48:00 | 30,116,803 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 9,331 | tst | EC34.prev.tst | [[0,-2,-3,-2],[0,1,2,2],[-1,1,1,1],[0,2,2,1]],det=1 [6,-3,-4,-5], chain 8 => [28,-21,-18,-19] => [134,-95,-86,-97] => [642,-461,-412,-459] => [3076,-2203,-1974,-2205] => [14738,-10561,-9458,-10559] => [70614,-50595,-45316,-50597] => [338332,-242421,-217122,-242419] => [1621046,-1161503,-1040294,-1161505]
[[0,-2,-3,-2],[0,2,2,1],[-1,1,1,1],[0,1,2,2]],det=-1 [6,-3,-4,-5], chain 8 => [28,-19,-18,-21] => [134,-95,-86,-97] => [642,-459,-412,-461] => [3076,-2203,-1974,-2205] => [14738,-10559,-9458,-10561] => [70614,-50595,-45316,-50597] => [338332,-242419,-217122,-242421] => [1621046,-1161503,-1040294,-1161505]
[[0,-2,-2,1],[-2,0,1,-2],[-2,-1,1,-1],[-1,-2,-1,1]],det=-3 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[0,-2,-2,1],[-2,0,1,-2],[-2,-1,1,-1],[2,1,0,2]],det=-2 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[0,-2,-2,1],[-2,0,1,-2],[1,2,2,0],[-1,-2,-1,1]],det=-2 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[0,-2,-2,1],[-2,0,1,-2],[1,2,2,0],[2,1,0,2]],det=-1 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[0,-2,-2,1],[1,3,2,-1],[-2,-1,1,-1],[-1,-2,-1,1]],det=0 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[0,-2,-2,1],[1,3,2,-1],[-2,-1,1,-1],[2,1,0,2]],det=1 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[0,-2,-2,1],[1,3,2,-1],[1,2,2,0],[-1,-2,-1,1]],det=1 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[0,-2,-2,1],[1,3,2,-1],[1,2,2,0],[2,1,0,2]],det=2 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[0,-2,1,-2],[-2,0,-2,1],[-1,-2,1,-1],[-2,-1,-1,1]],det=-3 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[0,-2,1,-2],[-2,0,-2,1],[-1,-2,1,-1],[1,2,0,2]],det=-2 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[0,-2,1,-2],[-2,0,-2,1],[2,1,2,0],[-2,-1,-1,1]],det=-2 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[0,-2,1,-2],[-2,0,-2,1],[2,1,2,0],[1,2,0,2]],det=-1 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[0,-2,1,-2],[1,3,-1,2],[-1,-2,1,-1],[-2,-1,-1,1]],det=0 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[0,-2,1,-2],[1,3,-1,2],[-1,-2,1,-1],[1,2,0,2]],det=1 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[0,-2,1,-2],[1,3,-1,2],[2,1,2,0],[-2,-1,-1,1]],det=1 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[0,-2,1,-2],[1,3,-1,2],[2,1,2,0],[1,2,0,2]],det=2 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[3,1,-1,2],[-2,0,1,-2],[-2,-1,1,-1],[-1,-2,-1,1]],det=0 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[3,1,-1,2],[-2,0,1,-2],[-2,-1,1,-1],[2,1,0,2]],det=1 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[3,1,-1,2],[-2,0,1,-2],[1,2,2,0],[-1,-2,-1,1]],det=1 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[3,1,-1,2],[-2,0,1,-2],[1,2,2,0],[2,1,0,2]],det=2 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[3,1,-1,2],[1,3,2,-1],[-2,-1,1,-1],[-1,-2,-1,1]],det=3 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[3,1,-1,2],[1,3,2,-1],[-2,-1,1,-1],[2,1,0,2]],det=4 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[3,1,-1,2],[1,3,2,-1],[1,2,2,0],[-1,-2,-1,1]],det=4 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[3,1,-1,2],[1,3,2,-1],[1,2,2,0],[2,1,0,2]],det=5 [6,-3,-4,-5], chain 8 => [9,-6,-8,-1] => [27,-24,-19,10] => [96,-93,-59,50] => [354,-351,-208,199] => [1317,-1314,-764,755] => [4911,-4908,-2839,2830] => [18324,-18321,-10583,10574] => [68382,-68379,-39484,39475]
[[3,1,2,-1],[-2,0,-2,1],[-1,-2,1,-1],[-2,-1,-1,1]],det=0 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[3,1,2,-1],[-2,0,-2,1],[-1,-2,1,-1],[1,2,0,2]],det=1 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[3,1,2,-1],[-2,0,-2,1],[2,1,2,0],[-2,-1,-1,1]],det=1 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[3,1,2,-1],[-2,0,-2,1],[2,1,2,0],[1,2,0,2]],det=2 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[3,1,2,-1],[1,3,-1,2],[-1,-2,1,-1],[-2,-1,-1,1]],det=3 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[3,1,2,-1],[1,3,-1,2],[-1,-2,1,-1],[1,2,0,2]],det=4 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[3,1,2,-1],[1,3,-1,2],[2,1,2,0],[-2,-1,-1,1]],det=4 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
[[3,1,2,-1],[1,3,-1,2],[2,1,2,0],[1,2,0,2]],det=5 [6,-3,-4,-5], chain 8 => [12,-9,1,-10] => [39,-36,17,-26] => [141,-138,76,-85] => [522,-519,296,-305] => [1944,-1941,1117,-1126] => [7251,-7248,4181,-4190] => [27057,-27054,15616,-15625] => [100974,-100971,58292,-58301]
elapsed time: 73 s
|
750244d67d8aada8509fe176d73636c40d949ba8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /196/CH8/EX8.1/example_8_1.sce | a3e07da0fa33be4e8b901d18adc4d80f6cfba879 | [] | 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 | 421 | sce | example_8_1.sce | //Chapter 8
//Example 8-1
//ProbOnOutputVoltage
//Page 216, Figure 8-1
clear;clc;
//Given
m = 100 ; //Differential Gain
E1 = 10*10^-3; E2 = 10*10^-3;//input voltages
E3 = 0*10^-3; E4 = -20*10^-3;//input voltages
Vout1 = (m*E1)-(m*E2);//example 8-1(a)
Vout2 = (m*E1)-(m*E3);//example 8-1(b)
Vout3 = (m*E1)-(m*E4);//example 8-1(c)
printf ( "\n\n Output Voltages are %.4f V, %.4f V, %.4f V ", Vout1,Vout2,Vout3) |
a4d41a415562caf02b725d6063f4b4652b6aefff | 449d555969bfd7befe906877abab098c6e63a0e8 | /812/CH12/EX12.07/12_07.sce | 44177a095c95e806e85389665d45c2d6def453db | [] | 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 | 941 | sce | 12_07.sce | //length//
pathname=get_absolute_file_path('12.07.sce')
filename=pathname+filesep()+'12.07-data.sci'
exec(filename)
//Mach number at section 1:
M1= sqrt(2/(k-1)*((p0/(p0+p1))^((k-1)/k)-1))
//Temperature at section 1(in K):
T1=T0/(1+(k-1)/2*(M1)^2)
V1=M1*sqrt(k*R*T1)
//Pressure at section 1(in kPa):
p1=g*dHg*(760-18.9)*10^-3
//Density at section 1(in kg/m^3):
d1=p1/R/T1
//At M1=0.190,
//(p/p*)1:
P1=5.745
// (fLmax/Dh)1:
F1=16.38
//Value of L13(in m):
L13=F1*D/f
//Value of (p/p*)2:
P2=p2/p1*P1
//For this value, Value of M2 is obtained as 0.4
M2=0.4;
//For M=0.4, fLmX/D=2.309
F2=2.309
//Value of L23(in m):
L23=F2*D/f
//Length of duct between section 1 and 2(in m):
L12=L13-L23
printf("\n\nRESULTS\n\n")
printf("\n\nLength of duct required for choking from section 1: %3f m\n\n",L13)
printf("\n\nMach number section 2: %.3f \n\n",M2)
printf("\n\Length of duct between section 1 and 2: %.3f m\n\n",L12)
|
86233a39987a90b126901ee44d6b893b37e1de4d | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/risetime/risetime15.sce | 04302305f1ac3dedb9f6a8fbd0f08488be2bae5c | [] | no_license | deecube/fosseetesting | ce66f691121021fa2f3474497397cded9d57658c | e353f1c03b0c0ef43abf44873e5e477b6adb6c7e | refs/heads/master | 2021-01-20T11:34:43.535019 | 2016-09-27T05:12:48 | 2016-09-27T05:12:48 | 59,456,386 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 253 | sce | risetime15.sce | x=[0;
0.0112910099304681;
0.0375437844553138;
-0.0502505723940154;
0.0237536810920502;
0.00286337692936232;
-0.0268585407773543;
-0.00670100836859748;
0.00681025234400021;
0.0743232780915911];
F=risetime(x,'Statelevels',[0 3]);
disp(F);
//output
// []
|
016deeece903a58b2368578751447d691e3f5133 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2231/CH4/EX4.10/Ex_4_10.sce | 1b9c00601341472454e923461acd1fe21a0f5fa3 | [] | 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 | Ex_4_10.sce | //Example 4_10
clc;
clear;close;
//Given data:
V=230;//V
Ton=25/1000;//s
Toff=10/1000;//s
//Solution :
Vavg=V*Ton/(Ton+Toff);//V
disp(Vavg,"Average load voltage(V)");
|
f16dcc9e803508c373bf39de842669ae983cf1a9 | 9b3a82b71b55170a9d272048e2f4dc6858ff106c | /control-system/step_response.sce | b5e382e86b6b8ac6750028d0e6af4c879e514f78 | [] | no_license | omrastogi/Digital-Signal-Processing | afcee58a1decbd9949e0bfcda47b62bbf19c935f | 68b4f85ec5b9dbf7840a0857ee388f9d660bbb2e | refs/heads/main | 2023-01-03T13:54:45.554127 | 2020-11-02T05:40:13 | 2020-11-02T05:40:13 | 309,267,769 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 216 | sce | step_response.sce | clc;
s = poly(0,'s');
num = (s^2+2*s+4);
den = (s^2+4*s+10);
s1 = syslin('c',num,den);
disp(s1);
t = 0:0.01:50;
s2 = csim('step',t,s1);
plot(t,s2);
xlabel("Time");
ylabel("Response");
title("response plot by Om");
|
6e2ecad8af2fbbc4635a17231c5e8af8b1ea7db9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3204/CH14/EX14.15/Ex14_15.sce | 42e8aac3a2424c2e1114c84d618b8c403544b6e7 | [] | 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 | 239 | sce | Ex14_15.sce | // Initilization of variables
F=250 // N // Force acting on a body
m=100 // kg // mass of the body
// Calculations
// Using the eq'n of motion
a=F/m // m/s^2
// Results
clc
printf('The acceleration of the body is %f m/s^2 \n',a)
|
9deb4bff60f5db4d472a205153b8132015279873 | 1988df91caa448a35bbf274a6d2698fe434571b1 | /tst/proof/reason.tst | 8910fa8e5053fb21d171a7da4880b002aa8af27d | [] | no_license | namin/GETFOL | bd60e9a2d9f0905c50ff5c0cff4b6bf57a2049e2 | bf42caf61799578eb82e9f17b3342bc2ee638a22 | refs/heads/master | 2021-10-25T08:08:20.142137 | 2021-10-22T16:16:40 | 2021-10-22T16:16:40 | 204,234,318 | 4 | 1 | null | 2019-08-25T02:05:54 | 2019-08-25T02:05:54 | null | UTF-8 | Scilab | false | false | 6,232 | tst | reason.tst | COMMENT | ************************************************************* |
COMMENT | * AUTHOR: Lorenzo Galvagni DATE: january 1992 |
COMMENT | * |
COMMENT | * SUBJECT: REASON AND SHOWPREMISES TEST |
COMMENT | * |
COMMENT | * NOTES: |
COMMENT | * |
COMMENT | * |
COMMENT | * TECHNICAL NOTES: |
COMMENT | * |
COMMENT | * GETFOL VERSION: january 1992 |
COMMENT | * |
COMMENT | ************************************************************* |
probe all;
COMMENT | NATURAL DEDUCTION |
reset;
declare sentconst A;
assume A;
show premises 1;
reset;
declare sentconst A B C D E;
assume A B;
andi 1 2;
assume C D E;
andi 1 conj 2 3;
show premises 7;
andi 1 conj 2 3 conj 4;
show premises 8;
andi 1 conj 2 conj 3 4;
show premises 9;
andi 9 conj 4 8;
show premises 10;
show premises 10 2;
show premises 10 all;
reset;
declare sentconst A B C D;
assume A and ((B and C) and D);
ande 1 1;
show premises 2;
reset;
declare sentconst A;
assume A;
impi 1 1;
show premises 2;
reset;
declare sentconst A B;
assume A;
assume A imp B;
impe 1 2;
show premises 3;
reset;
declare sentconst A B;
assume A;
ori 1 B;
show premises 2;
reset;
declare sentconst A B C;
assume B imp A;
assume C imp A;
assume B;
assume C;
impe 3 1;
impe 4 2;
assume B or C;
ore 7 5 6;
show premises 8 all;
reset;
declare sentconst A;
assume not A not not A;
falsei 1 2;
note 3 not A;
impi 2 4;
show premises 5 all;
reset;
declare sentconst A;
assume FALSE;
falsee 1 A and not A;
show premises 2;
reset;
declare sentconst A;
assume A not A;
falsei 1 2;
noti 3 not A;
impi 1 4;
show premises 5 all;
reset;
declare sentconst A B;
assume A imp B B imp A;
iffi 1 2;
iffi 2 1;
show premises 3;
show premises 4;
reset;
declare sentconst A;
assume A iff not not A;
iffe 1 1;
iffe 1 2;
show premises 3;
reset;
declare predconst P 1;
declare indvar x;
declare indpar a;
assume P(a);
impi 1 1;
alli 2 a:x;
alli 2 x;
show premises 3 all;
show premises 4 all;
reset;
declare predconst P 2;
declare indvar x y;
declare indconst c1 c2;
assume forall x y. P(x,y);
alle 1 c1;
alle 1 x c1;
alle 1 c1 c2;
show premises 2;
show premises 3;
show premises 4;
reset;
declare predconst P 2;
declare indvar x y;
declare indconst c1 c2;
assume P(c1,c2);
existi 1 c1:x c2:y;
show premises 2;
reset;
declare indvar x y;
declare indpar a b;
declare predconst P 2;
assume exists y. P(a,y);
existe 1 b;
show premises 2;
reset;
declare sentconst A B;
declare sentpar alpha beta;
axiom axA: A;
impi axA axA;
axiom Hil1: alpha imp (beta imp alpha);
impe 1 Hil1 alpha: A imp A, beta: B;
show premises 2;
reset;
declare sentconst A B C;
theory hilbert :
hilbert1: A imp (B imp C)
hilbert2: (A imp (B imp C)) imp ((A imp B) imp (A imp C));
mp hilbert1 hilbert2;
andi hilbert hilbert;
theory tautologies:
IMP: A imp A
OR: A or not A;
show premises 2;
COMMENT | EQUALITY RULES |
reset;
declare predconst P Q 2;
declare funconst f 1;
declare indvar x y;
assume P(x,y) imp Q(y,x);
assume x = f(x);
subst 1 2;
subst 3 2 right;
subst 1 2 occ 1;
show premises 4 all;
show premises 5;
COMMENT | CONDITIONAL RULES |
reset;
declare sentconst A;
assume A;
assume not A;
wffifi A 1 2;
show premises 3 all;
reset;
declare sentconst A B C;
assume A;
assume wffif A then B else C;
wffife 2 1;
show premises 3;
COMMENT | OTHER RULES |
reset;
declare sentconst A B C;
assume A A A B C;
axiom AAA: A;
ori 3 4;
ori 5 6;
wk 7 by 6 2 1 3;
show premises 8 all;
reset;
declare sentconst A B C D E F;
assume A A A A B B C D;
wk 8 by 1 2 3 4 5 6 7;
ctc 9 by 1 5;
show premises 10 all;
reset;
declare sentconst A B C;
axiom AAA: A;
assume A A A A B C;
wk 5 by 1 2 3 4;
wk AAA by 6;
cut 8 7;
show premises 9 all;
COMMENT | DECIDERS |
reset;
declare sentconst A B;
ptaut (A imp (B imp A));
show premises 1;
reset;
declare sentconst A B;
assume A B;
ptaut (A and B) by 1 2;
show premises 3;
reset;
declare sentconst A;
declare predconst P 1;
declare indconst c;
taut (A imp (P(c) imp A));
show premises 1;
reset;
declare indvar x y;
declare indvar z;
tauteq x=x;
tauteq x=y imp y=x;
show premises 2;
reset;
declare predconst P 1;
declare indvar x y;
monad forall x. exists y. (P(x) imp P(y));
monad exists y. forall x. (P(x) imp P(y));
andi 1 2;
show premises 3 all;
COMMENT | SEMANTIC SIMPLIFICATION |
reset;
declare indconst a b c;
declare funconst F 1;
decrep REP;
attach a dar [REP] a;
attach b dar [REP] b;
attach c dar [REP] c;
DEFLAM F(x) (IF (EQ x (QUOTE a)) (QUOTE b)
(IF (EQ x (QUOTE b)) (QUOTE c)
(QUOTE UNDEF&)));
attach F to [REP=REP]F;
simplify F(a);
show premises 1;
COMMENT | SYNTACTIC SIMPLIFICATION |
reset;
declare indconst a b;
declare predconst q r 1;
declare indvar x;
setbasicsimp s1 at wffs {q(a), forall x. (q(x) iff r(x))};
assertsimp s1;
show premises 2 all;
reset;
declare indconst A;
declare indvar X Y;
declare funconst F 2;
axiom F3: forall X Y. F(X,Y) = Y;
setbasicsimp S6 at facts {F3};
rewrite F(A,A) by S6;
show premises 1;
COMMENT | SYNTACTIC AND SEMANTIC SIMPLIFICATION |
reset;
declare indconst a b c;
decrep REP;
attach a dar [REP]a;
attach b dar [REP]b;
attach c dar [REP]c;
declare funconst G 2;
declare indvar x y;
setbasicsimp S at wffs {forall x y.G(x,y)=x};
declare predconst P 1;
DEFLAM P(x) (IF(EQ x (QUOTE a))
TRUE
(IF (EQ x (QUOTE b))
FALSE
(QUOTE UNDEF&)));
attach P to [REP]P;
eval P(G(a,G(b,c))) by S;
show premises 1;
reset;
declare indconst a b c;
attach b to b;
attach c to c;
declare funconst h 2;
DEFLAM h(x y) (QUOTE d);
attach h to h;
let a dar h(b c);
show premises 1;
COMMENT | METAREASONING |
reset;
namecontext META;
declare sort TERM WFF;
declare predconst THEOREM 1;
declare funconst mkequal (indvar, indvar) = wff;
declare indvar x [TERM];
axiom m1: forall x. THEOREM(mkequal(x,x));
decrep TERM;
decrep WFF;
represent {TERM} as TERM;
represent {WFF} as WFF;
attach mkequal to [TERM,TERM = WFF] mkequ;
makecontext obj;
switchcontext obj;
declare indconst c;
declare indvar x;
declare funconst f 2;
reflect m1 c;
reflect m1 f(x,f(c,c));
show premises 2;
|
22b96ffeceb0a2600371200ed0d8b079a8b6c1c3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1478/CH2/EX2.18.25/2_18_25.sce | 5d8c5ac54707ff03a5d7054d00a13ab13cc093da | [] | 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,151 | sce | 2_18_25.sce | //water and its treatment//
//example 2.18.25//
clc
Purity_Lime=.90
Purity_soda=.90
Rate_lime=7//Rs.per kg//
Rate_soda=35//Rs.per kg//
W1=30;//amount of Ca++ in ppm//
W2=21.6;//amount of Mg++ in ppm//
W3=12.2;//amount of HCO3- in ppm//
W4=4.4;//amount of CO2 in ppm//
W5=4.9;//amount of H2SO4 in ppm//
M1=100/40;//multiplication factor of Ca++//
M2=100/24;//multiplication factor of Mg++//
M3=100/(61*2);//multiplication factor of HCO3-//
M4=100/44;//multiplication factor of CO2//
M5=100/98;//multiplication factor of H2SO4//
P1=W1*M1;//in terms of CaCO3//S
P2=W2*M2;//in terms of CaCO3//L+S
P3=W3*M3;//in terms of CaCO3//+L and -S
P4=W4*M4;//in terms of CaCO3//L
P5=W5*M5;//in terms of CaCO3//L+S
V=25000;//volume of water in litres//
L=0.74*(P2+P3+P4+P5)*V/Purity_Lime;//lime required in mg//
L=L/10^6;
printf("Quantity of Lime required is %.4f kg",L);
S=1.06*(P1+P2-P3+P5)*V/Purity_soda;//soda required in mg//
S=S/10^6;
printf("\nQuantity of Soda required is %.4f kg",S)
Cost_lime=L*Rate_lime
Cost_soda=S*Rate_soda
printf("\nCost of lime is Rs. %.2f",Cost_lime);
printf("\nCost of soda is Rs. %.2f",Cost_soda) |
cf3c0c8be85f4d12578149c1adbedd9f9d3849b3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1928/CH4/EX4.15.16/ex_4_15_16.sce | 031c675ae6fccb078b324a8114fdcfd719e5b066 | [] | 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 | ex_4_15_16.sce | //Chapter-4,Example4_15_16,pg 4-34
S=10 //salinity
t=2 //time
T=20 //temperature
v=1510+1.14*S+4.21*T-0.037*T^2 //velocity of ultrasound in sea
d=v*t/2 //depth of sea bed
printf("depth of sea bed =")
disp(d)
printf("meter")
|
8ed86f0f29c3892dd3535dac00543920fc626b6b | 449d555969bfd7befe906877abab098c6e63a0e8 | /104/CH9/EX9.14/9_14.sce | 21fd8dc558cb455bdfc871e98c158e488e396152 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 208 | sce | 9_14.sce | //gain margin and phase margin
s=%s;
sys=syslin('c',(2500)/(s*(s+5)*(s+50)))
nyquist(sys)
show_margins(sys,'nyquist')
gm=g_margin(sys)
pm=p_margin(sys)
disp(gm,"gain margin=")
disp(pm,"phase margin=") |
94ef5e343501f77c57daf38cddce91381c36b6c5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1979/CH10/EX10.13/Ex10_13.sce | bf7d8e4a56d245729223c6f7a8ade25b61a4d202 | [] | 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 | 516 | sce | Ex10_13.sce | //chapter-10 page 490 example 10.13
//==============================================================================
clc;
clear;
l=1;//(Assume)-dimension(wavelength) in cm
//CALCULATION
x=5*l;//given square aperture of an optimum horn antenna as a side dimension in cm
A=x*x;//Area in sq.cm
Gp=4.5*(A/l^2);//Power gain of an optimum horn antenna
//OUTPUT
mprintf('\nPower gain of an optimum horn antenna is Gp=%3.1f ',Gp);
//=========================END OF PROGRAM===============================
|
0c180d719a9fb82ba6b720b48078a518322dc9ee | 449d555969bfd7befe906877abab098c6e63a0e8 | /2489/CH1/EX1.1/1_1.sce | d6548c133025deaf3471b4d9b1ae135a35470cbd | [] | 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 | 204 | sce | 1_1.sce | clc
//Intitalisation of variables
clear
dco= 1.9635 //gms/lit
do= 1.4277 //gms/lit
mo= 32 //gms
//CALCULATIONS
mwt= dco*mo/do
//RESULTS
printf ('Molecular weight of carbon dioxide = %.3f ',mwt)
|
f7b6a44007578b40899c8b7e01a60c28d2095c3b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2855/CH12/EX12.17/Ex12_17.sce | 2767c696aa3e86ec5278c895bccdb2a6691dc483 | [] | 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 | 198 | sce | Ex12_17.sce | //Chapter 12
//page no 486
//given
clc;
clear all;
Ncso=50;
a=3.6*10^-3;
m=0.05;
CSO=10*log10(Ncso*(a*m)^2);
printf("\n CSO distortion for 50 channel optical system = %0.1f dB\n",CSO);
|
3ef511cb49ef503fb4136da91d92e05c8f751eef | 3b9a879e67cbab4a5a4a5081e2e9c38b3e27a8cc | /Pack/Exame comentado/q5.sci | b57211acc97cff2aabd46058050912ba048979e8 | [
"MIT"
] | permissive | JPedroSilveira/numerical-calculus-with-scilab | 32e04e9b1234a0a82275f86aa2d6416198fa6c81 | 190bc816dfaa73ec2efe289c34baf21191944a53 | refs/heads/master | 2023-05-10T22:39:02.550321 | 2021-05-11T17:17:09 | 2021-05-11T17:17:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 352 | sci | q5.sci | //Fx(xn+0.8h) = [C1Fn-1 + C2Fn + C3Fn+1] / H
x =[0 1/6 2] // corresponde a f (n+0),f (h/6) e f (n+2)
xc= 0 // onde eh calculada a derivada. (xn+0.8h) seria 0.8, aqui temos xn+0
b(1)=0
b(2)=1
b(3)=2*xc //tem que usar aqui xc e não x*n
for i=1:3
M(1,i)=1
M(2,i)=x(i)
M(3,i)=x(i)^2
end
c=inv(M)*b
disp('Coeficientes')
disp(c)
|
24f72d93c05c88515fddb7879d9b234a67aa77fa | ad6dfdda667ace738c35e5b68986a792213c5a55 | /make-tests/.svn/text-base/make03.tst.svn-base | 85d4ac0939803382e7107d847f12cc94ec9a8bde | [] | no_license | kombuchafox/API | 0fd8417c0f93e7883b99c7ed7bd2001447f0e249 | f964dc287bca40bde60427e92a8d73ef1adf1d3c | refs/heads/master | 2021-09-18T18:16:36.609858 | 2018-07-18T05:19:44 | 2018-07-18T05:19:44 | 15,957,824 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 63 | make03.tst.svn-base | java -ea make.Main -f make-tests/make03.mk -D make-tests/file01 | |
44711f162e9b2f5e62f842b12e5509fcf96a5cbe | b667735486117d0c7bb30d616ee6ed37032e947d | /online/labca3_7/documentation/xmlhelp/en_US/lcaDebugOn.sci | 9aabacc12213ba2975448e14ac20f263cc019cd2 | [
"EPICS",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | KIT-IBPT/MML | 6b8093aec421162c56ada56daa2d43a1b6977e62 | 4ad8cbb61a36a8b145cc6b17e0b5a3a6b4213c26 | refs/heads/master | 2021-08-28T07:39:45.693497 | 2021-08-04T13:14:01 | 2021-08-04T13:14:01 | 226,303,582 | 0 | 0 | null | 2019-12-06T10:28:11 | 2019-12-06T10:28:11 | null | UTF-8 | Scilab | false | false | 304 | sci | lcaDebugOn.sci | function lcaDebugOn
// Switch the ezca library's debugging facility on.
//
// Calling Sequence
//
//lcaDebugOn()
//
// Description
//
// Switch the ezca library's debugging facility on.
// __________________________________________________________________
//
//
// till 2018-02-28
endfunction
|
06d49fa2baec13c9a437ba7f42cac36dcf1816e4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /671/CH4/EX4.42/4_42.sce | 6a0371b54e7f96a5a7bc394caf6f9bf7e2bdee9b | [] | 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 | 121 | sce | 4_42.sce | w=400
R=5
L=25E-3
C=1.25E-3
Xl=w*L*%i
Xc=1/(w*C*%i)
Z=R+Xl+Xc
Y=1/Z
C=-imag(Y)/w
Yn=real(Y)
Rn=1/Y
disp(C) |
c17238b5b285157927b3288d9ba226ebe47ab480 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2912/CH1/EX1.6/Ex1_6.sce | d0e94165b72778666aba6b6376c462aee8cf179a | [] | 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 | Ex1_6.sce | //chapter 1
//example 1.6
//calculate ionic cohesive energy and atomic cohesive energy
//page 16
clear;
clc;
//given
r_0=3.56; // in Angstrom
e=1.6E-19; // in C (charge of electron)
IE=3.89; //in eV (ionisation energy of Cs)
EA=-3.61; // in eV (electron affinity of Cl)
n=10.5; // Born constant
E_o= 8.85E-12;// absolute premittivity
alpha=1.763; // Madelung constant
pi=3.14; // value of pi used in the solution
//calculate
r_0=r_0*1E-10; // since r is in nanometer
U=-alpha*(e^2/(4*pi*E_o*r_0))*(1-1/n); // calculate potential energy
U=U/e; //changing unit from J to eV
printf('\nThe ionic cohesive energy is\t%.2f eV',U);
ACE=U+EA+IE; // calculation of atomic cohesive energy
printf('\nThe atomic cohesive energy is\t%.2f eV',ACE);
|
28bbad82ebf12d65727148df6fffc1c480ebcf4b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1994/CH3/EX3.10/Example3_10.sce | 0e129a1079228aaeaada08785af944b9c5a7148e | [] | 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 | 301 | sce | Example3_10.sce | //Chapter-3,Example3_10,pg 3_39
n=4
R=1/(10^n)
//for 10V range
R=10*R
printf("12.98 would be displayed as 12.980 for 10V range\n")
//for 1V range
R=1*R
printf("0.6973 would be displayed as 0.6973 for 1V range\n")
//for 10V range
printf("0.6973 would be displayed as 0.697 for 10V range\n")
|
2076ea413abc0ae6fd1139b19acde519af6e9722 | 449d555969bfd7befe906877abab098c6e63a0e8 | /539/CH6/EX6.5/Example_6_5.sce | ab8fbc82d060f36f5a8833325fcde8500a633d97 | [] | 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 | 281 | sce | Example_6_5.sce | //Calculation of Strain-Hardening Exponent
clear;
clc;
printf("\tExample 6.5\n");
sig_t=415; //True stress in MPa
et=0.1; //True strain
K=1035; // In MPa
n=log(sig_t/K)/log(et);
printf("\nStrain - hardening coefficient is %.2f",n);
//End |
3e0b6429b2e9cf48a9ad325577f4f523015d01c6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2276/CH1/EX1.12/chapter1_ex12.sce | 133f7fbc7a89fd45722f72e514bd4e246571f636 | [] | 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 | 763 | sce | chapter1_ex12.sce | clc
clear
//input
// a battery consists of 10cells connected in series
v=1.5;//e.m.f. of each cell in volts
r=0.2;// internal resistance of each cell in ohms
n=10;//number of cells in the battery
//calculations
//for maximum power load resistance=internal resistance
R=n*r;//total internal resistance of hte battery in ohms
Rl=R;//load resistance in ohms
e=n*v;//total e.m.f. of battery in volts
I=e/(R+Rl);//current from battery in amperes
P=(I^2)*R;//heating loss in the battery in watts
V=e-(I*R);//terminal voltage in volts
//output
mprintf('The maximum value of power which the battery may transfer is %3.1f W and an equal quantity of power is dissipated in the battery. \n under these conditions the terminal p.d. is %3.1f V',P,V)
|
6c6fd02459a3b864cc08bbb591b33cc72d350bb0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH10/EX10.7/7.sce | b225b57b03fd7591308cef13162fa622b089559c | [] | 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 | 727 | sce | 7.sce | clc
//For air at 35 0C DBT and 50% RH
p_vs=0.0563; //bar; At 35 0C, from steam tables
phi=0.5;
p_t=1.0132;
t_db1=35; //0C
t_dp1=23; //0C
cp=1.005;
R=287;
p_v=phi*p_vs;
W1=0.622*p_v/(p_t-p_v);
h_g1=2565.3; //kJ/kg
h_vapour=h_g1 + 1.88*(t_db1 - t_dp1);
h1=cp*t_db1+W1*h_vapour;
disp("(i) R.H. of cooled air")
p_vs=0.0317;
phi=p_v/p_vs;
disp("RH of cooled air=")
disp(phi*100)
disp("%")
disp("(ii) Heat removed from air")
h_g2=2547.2; //kJ/kg
t_db2=25; //0C
t_dp2=23; //0C
W2=W1;
T=308; //K
V=40; //m^3
h_vapour=h_g2 + 1.88*(t_db2 - t_dp2);
h2=cp*t_db2+W2*h_vapour;
m=(p_t-p_v)*10^5*V/R/T;
//Let Heat removed be denoted by H
H=m*(h1-h2);
disp("Heat removed =")
disp(H)
disp("kJ") |
6eb00d29c9fba9d8ff4865c085bce3b2fb8b1bd8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1862/CH7/EX7.3/C7P3.sce | 605580344b57dc1f622bfc6561b7dedcdf7ece5f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,720 | sce | C7P3.sce |
clc
//to find location of second fragment
// GIVEN::
//refer to figure 7-11 fron page no. 145
//consider +ve x direction as our reference axis
//mass of projectile
M = 9.6//in kg
//initial velocity of projectile
v0 = 12.4//in m/s
//angle of projectile above horizontal
fi0 = 54//in degrees
//mass of first piece after explosion
m1 = 6.5//in kg
//time after which first piece id observed
t = 1.42//in seconds
//vertical distance at which first piece is observed
y1 = 5.9//in meters
//horizontal distance at which first piece is observed
x1 = 13.6//in meters
//acceleration due to gravity
g = 9.80//in m/s^2
// SOLUTION:
//refer to figure 7-11 from page no. 145
//mass of second piece
//by mass conservation
m2 = M-m1//in kg
//velocity of projectile in +ve x direction
v0x = v0*cosd(fi0)//in m/s
//velocity of projectile in +ve y direction
v0y = v0*sind(fi0)//in m/s
//using kinematic equation of motion
//x coordinate of position of original projectile
x = v0x*t//in m
//y coordinate of position of original projectile
y = (v0y*t)-(0.5*g*t^2)//in m
//applying center of mass formula
//x coordinate of posion of second piece
x2 = (M*x - m1*x1)/m2//in meters
//y coordinate of posion of second piece
y2 = (M*y - m1*y1)/m2//in meters
x = nearfloat("succ",10.4)
y = nearfloat("pred",4.3)
x2 = nearfloat("succ",3.7)
y2 = nearfloat("pred",0.9)
printf ("\n\n x coordinate of position of original projectile x = \n\n %.1f m",x);
printf ("\n\n y coordinate of position of original projectile y = \n\n %.1f m",y);
printf ("\n\n x coordinate of posion of second piece x2 = \n\n %.1f m",x2);
printf ("\n\n y coordinate of posion of second piece y2 = \n\n %.1f m",y2);
|
63aa7fe107c47654404ed6b69a2cc67022fb6e09 | 449d555969bfd7befe906877abab098c6e63a0e8 | /260/DEPENDENCIES/quicksort.sci | eb3119d862989308606d2c9cfcb78e1b26be6300 | [] | 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 | 836 | sci | quicksort.sci | function xsort = quicksort(x)
n= length(x)
pivot = x(1)
if n == 0 then
xsort = []
elseif n == 1 then
xsort = x(1)
else
j = n
for i = 2:n
if pivot < x(i) then
for j = j:-1:i
if pivot > x(j) then
t = x(i)
x(i) = x(j)
x(j) = t
break
end
end
end
if j == i then
if i == n & pivot > x(i) then
xsort = [ quicksort( x(2:i) ) pivot]
else
xsort = [ quicksort( x(2:i-1) ) pivot quicksort( x(i:n) )]
break ;
end
end
end
end
endfunction |
31d31719c985ec232d5ed09b25cc2cd8ab7a27d7 | bf63c70e054c641e89a6f7a4623a7634ce9a8a9d | /test/EP1.prev.tst | 0384b7afd34d1eba000f97f21a155ed2b2c2d47e | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | gfis/jextra | 9c8c030faf35f0834843ed8f07cc061ca9d65a64 | bdad8fd33fdf633cf2ff4c1879e1f61935c3d636 | refs/heads/master | 2022-03-13T21:31:56.132450 | 2022-02-12T21:27:40 | 2022-02-12T21:27:40 | 30,127,957 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 34,581 | tst | EP1.prev.tst | <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EmptyParser>
<scan state="10"><sym id="30" cat="24">/*------------------------------------------------------*/</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="32" cat="26">EOF</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="34" cat="26">IDENTIFIER</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="35" cat="26">NUMBER</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="36" cat="26">STRING</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="14" cat="14">;</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="37" cat="24">/* Meta Grammar for Parsing of Transformation Grammars \n Georg Fischer 1980-08-01 */</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="38" cat="24">/*------------------------------------------------------*/</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="6" cat="6">[</sym></scan>
<scan state="10"><sym id="39" cat="26">AXIOM</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="40" cat="26">EXTRA_INPUT</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="40" cat="26">EXTRA_INPUT</sym></scan>
<scan state="10"><sym id="41" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="42" cat="28">[</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="43" cat="26">GRAMMAR</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="44" cat="28">]</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="43" cat="26">GRAMMAR</sym></scan>
<scan state="10"><sym id="45" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="46" cat="26">RULES</sym></scan>
<scan state="10"><sym id="47" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="48" cat="27">2</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="46" cat="26">RULES</sym></scan>
<scan state="10"><sym id="49" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="50" cat="26">RULE</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="46" cat="26">RULES</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="52" cat="28">.</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="50" cat="26">RULE</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="50" cat="26">RULE</sym></scan>
<scan state="10"><sym id="53" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="54" cat="26">LEFT_SIDE</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="55" cat="28">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="56" cat="26">RIGHT_SIDES</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="54" cat="26">LEFT_SIDE</sym></scan>
<scan state="10"><sym id="57" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="34" cat="26">IDENTIFIER</sym></scan>
<scan state="10"><sym id="58" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="59" cat="27">3</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="56" cat="26">RIGHT_SIDES</sym></scan>
<scan state="10"><sym id="41" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="60" cat="26">RIGHT_SIDE</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="56" cat="26">RIGHT_SIDES</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="61" cat="28">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="60" cat="26">RIGHT_SIDE</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="60" cat="26">RIGHT_SIDE</sym></scan>
<scan state="10"><sym id="62" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="63" cat="26">SYNTAX_PART</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="64" cat="26">SEMANTIC_PART</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="63" cat="26">SYNTAX_PART</sym></scan>
<scan state="10"><sym id="41" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="65" cat="26">MEMBERETIES</sym></scan>
<scan state="10"><sym id="66" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="67" cat="27">6</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="65" cat="26">MEMBERETIES</sym></scan>
<scan state="10"><sym id="41" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="68" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="69" cat="27">7</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="65" cat="26">MEMBERETIES</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="70" cat="26">MEMBER</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="70" cat="26">MEMBER</sym></scan>
<scan state="10"><sym id="71" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="72" cat="26">PRIMARY</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="72" cat="26">PRIMARY</sym></scan>
<scan state="10"><sym id="45" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="34" cat="26">IDENTIFIER</sym></scan>
<scan state="10"><sym id="58" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="73" cat="27">8</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="36" cat="26">STRING</sym></scan>
<scan state="10"><sym id="74" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="75" cat="27">9</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="35" cat="26">NUMBER</sym></scan>
<scan state="10"><sym id="74" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="73" cat="27">8</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="64" cat="26">SEMANTIC_PART</sym></scan>
<scan state="10"><sym id="76" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="77" cat="26">TRANSFORMATIONS</sym></scan>
<scan state="10"><sym id="78" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="79" cat="27">11</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="77" cat="26">TRANSFORMATIONS</sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="68" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="80" cat="27">12</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="81" cat="28">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="82" cat="26">TRANSFORMATION</sym></scan>
<scan state="10"><sym id="53" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="83" cat="27">13</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="77" cat="26">TRANSFORMATIONS</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="84" cat="28">-></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="82" cat="26">TRANSFORMATION</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="85" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="86" cat="27">14</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="82" cat="26">TRANSFORMATION</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="87" cat="26">DESTINATION</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="82" cat="26">TRANSFORMATION</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="88" cat="26">ELEMENT</sym></scan>
<scan state="10"><sym id="45" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="89" cat="27">16</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="87" cat="26">DESTINATION</sym></scan>
<scan state="10"><sym id="41" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="55" cat="28">=</sym></scan>
<scan state="10"><sym id="90" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="91" cat="27">17</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="88" cat="26">ELEMENT</sym></scan>
<scan state="10"><sym id="92" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="93" cat="27">18</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="94" cat="26">SYMBOL</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="55" cat="28">=</sym></scan>
<scan state="10"><sym id="58" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="95" cat="27">19</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="88" cat="26">ELEMENT</sym></scan>
<scan state="10"><sym id="45" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="94" cat="26">SYMBOL</sym></scan>
<scan state="10"><sym id="74" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="96" cat="27">20</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="97" cat="28">#</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="35" cat="26">NUMBER</sym></scan>
<scan state="10"><sym id="58" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="98" cat="27">21</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="35" cat="26">NUMBER</sym></scan>
<scan state="10"><sym id="74" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="99" cat="27">22</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="36" cat="26">STRING</sym></scan>
<scan state="10"><sym id="74" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="100" cat="27">23</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="101" cat="28">@</sym></scan>
<scan state="10"><sym id="90" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="102" cat="27">24</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="94" cat="26">SYMBOL</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="103" cat="28">(</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="104" cat="26">COMBINED_LIST</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="105" cat="28">)</sym></scan>
<scan state="10"><sym id="76" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="106" cat="27">25</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="94" cat="26">SYMBOL</sym></scan>
<scan state="10"><sym id="71" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="107" cat="26">INCARNATION</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="107" cat="26">INCARNATION</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="108" cat="28">$</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="34" cat="26">IDENTIFIER</sym></scan>
<scan state="10"><sym id="41" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="109" cat="27">27</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="107" cat="26">INCARNATION</sym></scan>
<scan state="10"><sym id="41" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="34" cat="26">IDENTIFIER</sym></scan>
<scan state="10"><sym id="58" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="110" cat="27">28</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="34" cat="26">IDENTIFIER</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="111" cat="28">:</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="35" cat="26">NUMBER</sym></scan>
<scan state="10"><sym id="71" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="112" cat="27">29</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="5" cat="5">.</sym></scan>
<scan state="10"><sym id="104" cat="26">COMBINED_LIST</sym></scan>
<scan state="10"><sym id="76" cat="23"> </sym></scan>
<scan state="10"><sym id="3" cat="3">=</sym></scan>
<scan state="10"><sym id="68" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="113" cat="27">30</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="104" cat="26">COMBINED_LIST</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="94" cat="26">SYMBOL</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="104" cat="26">COMBINED_LIST</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="35" cat="26">NUMBER</sym></scan>
<scan state="10"><sym id="49" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="114" cat="27">32</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="104" cat="26">COMBINED_LIST</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="36" cat="26">STRING</sym></scan>
<scan state="10"><sym id="49" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="115" cat="27">33</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="51" cat="23"> </sym></scan>
<scan state="10"><sym id="2" cat="2">|</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="104" cat="26">COMBINED_LIST</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="97" cat="28">#</sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="35" cat="26">NUMBER</sym></scan>
<scan state="10"><sym id="57" cat="23"> </sym></scan>
<scan state="10"><sym id="1" cat="1">=></sym></scan>
<scan state="10"><sym id="33" cat="23"> </sym></scan>
<scan state="10"><sym id="8" cat="8">#</sym></scan>
<scan state="10"><sym id="116" cat="27">34</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<scan state="10"><sym id="7" cat="7">]</sym></scan>
<scan state="10"><sym id="31" cat="22">\n</sym></scan>
<grammar axiom="axiom">
<symbolList>
<sym id="0" cat="0" type="EOP">EOP</sym>
<sym id="1" cat="1">=></sym>
<sym id="2" cat="2">|</sym>
<sym id="3" cat="3">=</sym>
<sym id="4" cat="4">-</sym>
<sym id="5" cat="5">.</sym>
<sym id="6" cat="6">[</sym>
<sym id="7" cat="7">]</sym>
<sym id="8" cat="8">#</sym>
<sym id="9" cat="9">(</sym>
<sym id="10" cat="10">)</sym>
<sym id="11" cat="11">+</sym>
<sym id="12" cat="12">*</sym>
<sym id="13" cat="13">/</sym>
<sym id="14" cat="14">;</sym>
<sym id="15" cat="15">@</sym>
<sym id="16" cat="16">:</sym>
<sym id="17" cat="17">$</sym>
<sym id="18" cat="18">/*</sym>
<sym id="19" cat="19">*/</sym>
<sym id="20" cat="20">//</sym>
<sym id="21" cat="21" type="EOF">EOF</sym>
<sym id="22" cat="22" type="EOL">EOL</sym>
<sym id="23" cat="23" type="SPACE">SPACE</sym>
<sym id="24" cat="24" type="NESTCOM">NESTCOM</sym>
<sym id="25" cat="25" type="EOLCOM">EOLCOM</sym>
<sym id="26" cat="26" type="IDENTIFIER">IDENTIFIER</sym>
<sym id="27" cat="27" type="NUMBER">NUMBER</sym>
<sym id="28" cat="28" type="STRING">STRING</sym>
<sym id="29" cat="29" type="axiom">axiom</sym>
<sym id="30" cat="24" type="NESTCOM">/*------------------------------------------------------*/</sym>
<sym id="31" cat="22" type="EOL">\n</sym>
<sym id="32" cat="26" type="IDENTIFIER">EOF</sym>
<sym id="33" cat="23" type="SPACE"> </sym>
<sym id="34" cat="26" type="IDENTIFIER">IDENTIFIER</sym>
<sym id="35" cat="26" type="IDENTIFIER">NUMBER</sym>
<sym id="36" cat="26" type="IDENTIFIER">STRING</sym>
<sym id="37" cat="24" type="NESTCOM">/* Meta Grammar for Parsing of Transformation Grammars \n Georg Fischer 1980-08-01 */</sym>
<sym id="38" cat="24" type="NESTCOM">/*------------------------------------------------------*/</sym>
<sym id="39" cat="26" type="IDENTIFIER">AXIOM</sym>
<sym id="40" cat="26" type="IDENTIFIER">EXTRA_INPUT</sym>
<sym id="41" cat="23" type="SPACE"> </sym>
<sym id="42" cat="28" type="STRING">[</sym>
<sym id="43" cat="26" type="IDENTIFIER">GRAMMAR</sym>
<sym id="44" cat="28" type="STRING">]</sym>
<sym id="45" cat="23" type="SPACE"> </sym>
<sym id="46" cat="26" type="IDENTIFIER">RULES</sym>
<sym id="47" cat="23" type="SPACE"> </sym>
<sym id="48" cat="27" type="NUMBER">2</sym>
<sym id="49" cat="23" type="SPACE"> </sym>
<sym id="50" cat="26" type="IDENTIFIER">RULE</sym>
<sym id="51" cat="23" type="SPACE"> </sym>
<sym id="52" cat="28" type="STRING">.</sym>
<sym id="53" cat="23" type="SPACE"> </sym>
<sym id="54" cat="26" type="IDENTIFIER">LEFT_SIDE</sym>
<sym id="55" cat="28" type="STRING">=</sym>
<sym id="56" cat="26" type="IDENTIFIER">RIGHT_SIDES</sym>
<sym id="57" cat="23" type="SPACE"> </sym>
<sym id="58" cat="23" type="SPACE"> </sym>
<sym id="59" cat="27" type="NUMBER">3</sym>
<sym id="60" cat="26" type="IDENTIFIER">RIGHT_SIDE</sym>
<sym id="61" cat="28" type="STRING">|</sym>
<sym id="62" cat="23" type="SPACE"> </sym>
<sym id="63" cat="26" type="IDENTIFIER">SYNTAX_PART</sym>
<sym id="64" cat="26" type="IDENTIFIER">SEMANTIC_PART</sym>
<sym id="65" cat="26" type="IDENTIFIER">MEMBERETIES</sym>
<sym id="66" cat="23" type="SPACE"> </sym>
<sym id="67" cat="27" type="NUMBER">6</sym>
<sym id="68" cat="23" type="SPACE"> </sym>
<sym id="69" cat="27" type="NUMBER">7</sym>
<sym id="70" cat="26" type="IDENTIFIER">MEMBER</sym>
<sym id="71" cat="23" type="SPACE"> </sym>
<sym id="72" cat="26" type="IDENTIFIER">PRIMARY</sym>
<sym id="73" cat="27" type="NUMBER">8</sym>
<sym id="74" cat="23" type="SPACE"> </sym>
<sym id="75" cat="27" type="NUMBER">9</sym>
<sym id="76" cat="23" type="SPACE"> </sym>
<sym id="77" cat="26" type="IDENTIFIER">TRANSFORMATIONS</sym>
<sym id="78" cat="23" type="SPACE"> </sym>
<sym id="79" cat="27" type="NUMBER">11</sym>
<sym id="80" cat="27" type="NUMBER">12</sym>
<sym id="81" cat="28" type="STRING">=></sym>
<sym id="82" cat="26" type="IDENTIFIER">TRANSFORMATION</sym>
<sym id="83" cat="27" type="NUMBER">13</sym>
<sym id="84" cat="28" type="STRING">-></sym>
<sym id="85" cat="23" type="SPACE"> </sym>
<sym id="86" cat="27" type="NUMBER">14</sym>
<sym id="87" cat="26" type="IDENTIFIER">DESTINATION</sym>
<sym id="88" cat="26" type="IDENTIFIER">ELEMENT</sym>
<sym id="89" cat="27" type="NUMBER">16</sym>
<sym id="90" cat="23" type="SPACE"> </sym>
<sym id="91" cat="27" type="NUMBER">17</sym>
<sym id="92" cat="23" type="SPACE"> </sym>
<sym id="93" cat="27" type="NUMBER">18</sym>
<sym id="94" cat="26" type="IDENTIFIER">SYMBOL</sym>
<sym id="95" cat="27" type="NUMBER">19</sym>
<sym id="96" cat="27" type="NUMBER">20</sym>
<sym id="97" cat="28" type="STRING">#</sym>
<sym id="98" cat="27" type="NUMBER">21</sym>
<sym id="99" cat="27" type="NUMBER">22</sym>
<sym id="100" cat="27" type="NUMBER">23</sym>
<sym id="101" cat="28" type="STRING">@</sym>
<sym id="102" cat="27" type="NUMBER">24</sym>
<sym id="103" cat="28" type="STRING">(</sym>
<sym id="104" cat="26" type="IDENTIFIER">COMBINED_LIST</sym>
<sym id="105" cat="28" type="STRING">)</sym>
<sym id="106" cat="27" type="NUMBER">25</sym>
<sym id="107" cat="26" type="IDENTIFIER">INCARNATION</sym>
<sym id="108" cat="28" type="STRING">$</sym>
<sym id="109" cat="27" type="NUMBER">27</sym>
<sym id="110" cat="27" type="NUMBER">28</sym>
<sym id="111" cat="28" type="STRING">:</sym>
<sym id="112" cat="27" type="NUMBER">29</sym>
<sym id="113" cat="27" type="NUMBER">30</sym>
<sym id="114" cat="27" type="NUMBER">32</sym>
<sym id="115" cat="27" type="NUMBER">33</sym>
<sym id="116" cat="27" type="NUMBER">34</sym>
</symbolList>
<rules>
<rule left="HYPER_AXIOM">
<prod left="HYPER_AXIOM" size="3">
<sym id="21" cat="21">EOF</sym>
<sym id="29" cat="29">axiom</sym>
<sym id="21" cat="21">EOF</sym>
<sym id="0" cat="0">EOP</sym>
</prod>
</rule>
</rules>
</grammar>
<legibleGrammar>
[
]
</legibleGrammar>
<legibleTable>
10: @axiom -> 11 =: HYPER_AXIOM
11: @EOF -> 11 =: HYPER_AXIOM
</legibleTable>
</EmptyParser>
|
67fde69638e892ac5dfe8ab9e4bb3a6dba6733e7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2609/CH2/EX2.11/ex_2_11.sce | 6f560ceffbcced0cdc6d68def3cc77e8cf5d87bd | [] | 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 | 524 | sce | ex_2_11.sce | ////Ex 2.11
clc;
clear;
close;
format('v',6);
Beta=100;//unitless
VBE=0.7;//V
RC=2.7;//kohm
R=2.2;//kohm
VT=26;//mV
VCC=10;//V
VEE=10;//V
IExt=(VEE-VBE)/R;//mA
IT=IExt;;//mA
IE=IT/2;//mA(Let IE1=IE2=IE)
re=2*VT/IT;re1=re;re2=re;re3=re;re4=re//ohm
reD=re1+re2;//ohm
BetaD=Beta^2;//unitless
Ad=-RC*1000/reD;//unitless
disp(Ad,"Differential voltage gain, Ad")
Rid=2*BetaD*reD/1000;//kohm(let Rid1=Rid2=Rid)
disp(Rid,"Differntial input resistances, Rid1=Rid2(kohm)");
//Answer in the bok is not accurate.
|
ceda2838c97241e2474089fcae7b93576ad9b46f | 449d555969bfd7befe906877abab098c6e63a0e8 | /24/CH18/EX18.1/Example18_1.sce | cf811e23dae5f5fe9c518a5bbae34887310f8a4c | [] | 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 | 314 | sce | Example18_1.sce | exec('degree_rad.sci', -1)
//Given that
Vs = 1482 //in m/s
Vw = 343 //in m/s
//Sample Problem 18-1
printf("**Sample Probelm 18-1**\n")
//deltaT = d/V = D*sin(theta)/V
//D*sin(90)/Vs = D*sin(theta)/Vw
theta = rtod(asin(Vw/Vs))
printf("The actual angle at which source is present, is %fdegree", theta) |
fe7ecb7d59a67762285e38ec6f5ad167baf9f330 | 449d555969bfd7befe906877abab098c6e63a0e8 | /764/CH7/EX7.2.b/solution7_2.sce | 7079dc7c84235a2f70617892f95e96895e48bf4f | [] | 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 | 815 | sce | solution7_2.sce |
//Function to standardise the given bolt-size
function[v] = standard(w)
v = ceil(w)
rem = pmodulo(v,10)
if (rem ~= 0) then
v = v + (10 - rem)
end
endfunction
//Obtain path of solution file
path = get_absolute_file_path('solution7_2.sce')
//Obtain path of data file
datapath = path + filesep() + 'data7_2.sci'
//Clear all
clc
//Execute the data file
exec(datapath)
//Calculate the yield shear strength Ssy (N/mm2)
Ssy = (50/100)*Syt
//Calculate the permissible shear stress tau (N/mm2)
tau = Ssy/fs
//Shear load acting on one bolt P (kN)
P = Pt/2
//Calculate the diameter of the bolt shank d (mm)
d = ((4 * P * 1000)/(%pi * tau))^(1/2)
//Standardise the bolt size from Table 7.1
d = standard(d)
//Print results
printf('\nThe standard size of the bolt is M%d\n',d)
|
b1474baec26c4cc9565b01d19b4cacd98ec74642 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2360/CH2/EX2.3/ex2_4.sce | 999d9a7d203a65bd03fe5ae5786440c4a3419cd3 | [] | 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 | 355 | sce | ex2_4.sce | // Exa 2.4
format('v',7);clc;clear;close;
// Given data
Fullscaledeflection = 30;//full scale deflection in cm
n = 30;// number of divisions
scaledivision = Fullscaledeflection/n;//scale division in cm
scaledivision = scaledivision * 10;// in mm
Resolution = (1/20)*scaledivision;// in mm
disp(Resolution,"The Resolution of the scale in mm is");
|
1878f23fbce84111235e32264d829a8f448859bd | 9cb37875b74a713c93c09fa50ccc70ac0f71ecdb | /Multigraph/scenarios/gotoInHole.sce | 2012529568b86d984efba79177d6dca5e9366b0c | [] | no_license | jmainpri/move3d-assets | a5b621daaedaaf8784fed0da1e80d029c83f3983 | 939db49d17a14e052bb58324b70e6112803d3105 | refs/heads/master | 2021-01-16T17:48:56.669119 | 2016-02-16T14:04:09 | 2016-02-16T14:04:09 | 20,237,987 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,119 | sce | gotoInHole.sce | #************************************************************
# Scenario of threeManipulators2D
#
# date : Tue Oct 28 07:35:07 2008
#************************************************************
p3d_sel_desc_name P3D_ENV threeManipulators2D
p3d_sel_desc_name P3D_ROBOT 2-3dof_manip_and_obj
p3d_set_robot_steering_method Linear
p3d_set_robot_current 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -70.000000 -40.000000 -60.000000 60.176991 0.000000 0.000000 70.000000 -40.000000 60.000000 40.707973 0.000000 0.000000 0.000000 80.000000 180.000000 60.176991 0.000000 0.000000
p3d_set_robot_goto 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -70.000000 -40.000000 -60.000000 26.548676 -64.503441 31.465092 70.000000 -40.000000 60.000000 26.548676 -64.503441 31.465092 0.000000 80.000000 180.000000 26.548676 -64.503441 31.465092
p3d_set_robot_config config_1 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -70.000000 -40.000000 -60.000000 26.548676 -64.503441 31.465092 70.000000 -40.000000 60.000000 26.548676 -64.503441 31.465092 0.000000 80.000000 180.000000 26.548676 -64.503441 31.465092
|
3ef7d272c1aa772edd7f5d44037dd5267e574bd1 | e9d5f5cf984c905c31f197577d633705e835780a | /GED/linear/scilab/functions/pmgei_method/method/pls/qpls.sci | de35e881bf752fb65d07076bc2ebb78f3e0b5584 | [] | no_license | faiz-hub/dr-ged-benchmarks | 1ad57a69ed90fe7595c006efdc262d703e22d6c0 | 98b250db9e9f09d42b3413551ce7a346dd99400c | refs/heads/master | 2021-05-18T23:12:18.631904 | 2020-03-30T21:12:16 | 2020-03-30T21:12:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 8,231 | sci | qpls.sci | function [model]=qpls(X0,Y0,comps,predict_info, compact_info)
//
//Carry out the PLS decomposition of the matrices X and Y using the NIPALS algorithm
//
//INPUTS
//X - inputs matrix to be decomposed (required)
//Y - response matrix to be decomposed (required)
//comps - numbers of components to be used (default = m)
//tol - precision of the calculations (default = 1e-15)
//maxiter - maximum numbers of iterations allowed (default = 1000)
//
//OUTPUTS
//T - score matrix of X (n times comp)
//P - loading matriz of X (comp times m)
//
//---> explicar os outros no futuro <---
nconverged=0;
nnotconverged=0;
model.method='QPLS';
[%nargout,%nargin] = argn(0)
//extracting information from data and pars structures
[n,k]=mtlb_size(X0);
[n,m]=mtlb_size(Y0);
if %nargin < 3 then
comps=k;
end
have_best_dirs = %F;
//setting defaults values
//digse_tol=5;
digse_tol=3;
maxiter=3000;
//centering and scaling data
[X0sc,X0bar,X0std]=centerscale(X0);
[Y0sc,Y0bar,Y0std]=centerscale(Y0);
//saving scale constants
model.scale.X0bar=X0bar;
model.scale.X0std=X0std;
model.scale.Y0bar=Y0bar;
model.scale.Y0std=Y0std;
//pause
//#####################################
//STEP A
X=X0sc; Y=Y0sc;
//#####################################
//#####################################
//STEP B
a=0;
//#####################################
u=zeros(size(Y,'r'),1);
for i=1:comps
a=a+1;
// pause
//(1)Set the output scores u as some Y column:
if sum(abs(Y(:,1)),'r') == 0 then
if sum(abs(Y(:,2)),'r') > 0 then
u=Y(:,2);
printf('initial output scores at 2, %d \n ', sum(abs(Y(:,2)),'r'));
end
if sum(abs(Y(:,3)),'r') > 0 then
u=Y(:,3);
printf('initial output scores at 3, %d \n ', sum(abs(Y(:,3)),'r'));
end
if sum(abs(Y(:,4)),'r') > 0 then
u=Y(:,4);
printf('initial output scores at 4, %d \n ', sum(abs(Y(:,4)),'r'));
end
if sum(abs(Y(:,5)),'r') > 0 then
u=Y(:,5);
printf('initial output scores at 5, %d \n ', sum(abs(Y(:,5)),'r'));
end
if sum(abs(Y(:,6)),'r') > 0 then
u=Y(:,6);
printf('initial output scores at 6, %d \n ', sum(abs(Y(:,6)),'r'));
end
if sum(abs(Y(:,7)),'r') > 0 then
u=Y(:,7);
printf('initial output scores at 7, %d \n ', sum(abs(Y(:,7)),'r'));
end
if sum(abs(Y(:,8)),'r') > 0 then
u=Y(:,8);
printf('initial output scores at 8, %d \n ', sum(abs(Y(:,8)),'r'));
end
if sum(abs(Y(:,9)),'r') > 0 then
u=Y(:,9);
printf('initial output scores at 9, %d \n ', sum(abs(Y(:,9)),'r'));
end
if sum(abs(Y(:,10)),'r') > 0 then
u=Y(:,10);
printf('initial output scores at 10, %d \n ', sum(abs(Y(:,10)),'r'));
end
if sum(abs(Y(:,11)),'r') > 0 then
u=Y(:,11);
printf('initial output scores at 11, %d \n ', sum(abs(Y(:,11)),'r'));
end
if sum(abs(Y(:,12)),'r') > 0 then
u=Y(:,12);
printf('initial output scores at 12, %d \n ', sum(abs(Y(:,12)),'r'));
end
if sum(abs(Y(:,13)),'r') > 0 then
u=Y(:,13);
printf('initial output scores at 13, %d \n ', sum(abs(Y(:,13)),'r'));
end
if sum(abs(Y(:,14)),'r') > 0 then
u=Y(:,14);
printf('initial output scores at 14, %d \n ', sum(abs(Y(:,14)),'r'));
end
else
u=Y(:,1);
printf('initial output scores at 1, %d \n ', sum(abs(Y(:,1)),'r') );
end
// pause
//(2)Regress columns of X on u:
w=u'*X/(u'*u);
//pause
//(3)Normalise w to unit legth:
w=w'/norm(w');
//(4)Calculate the input scores
t0=X*w/(w'*w);
for iter=1:maxiter
//(5)Fit the quadratic relation:
T2=[ones(size(t0,1),1) t0 t0.^2];
c=inv(T2'*T2)*(T2'*u);
//(6)Calculate the quadratic prediction r of u:
r=T2*c;
//(7)Regress the columns of Y on r:
q=r'*Y/(r'*r);
//(8)Normalise q to unit legth:
q=q'/norm(q');
//(9)Calculate the new output scores:
u=Y*q/(q'*q);
//(10)Update the input weights:
Z=[];
for j=1:k
Z=[Z (c(2)+2*c(3).*t0).*X(:,j)];
end
e=u-r;
//pause
dw=pinv(Z'*Z)*(Z'*e);
//dw=0.15*dw;
w=w+dw;
//(11)Normalise w to unit legth:
w=w/norm(w);
//(12)Calculate new input scores:
t=X*w/(w'*w);
//(13)check convergence on t:
//TEST(iter)=norm(t);
for j=1:k
digsei(i,1)=digse_eval(w(i)-dw(i),w(i));
end
digse=min(digsei); //disp(digse)
dif=norm(t-t0)/norm(t0);
DIF(iter)=dif;
if digse>digse_tol then //covergrence achived goto 14
clear DIF
printf('convergence achieved, %d, %d \n' , digse, iter )
nconverged = nconverged + 1;
//pause
break
else //covergrence not achived goto 5
t0=t;
// printf('convergence NOT achieved, %d, %d \n' , digse, iter)
nnotconverged=nnotconverged + 1;
end
end
if iter==maxiter then
clear DIF;
// printf('the iteration %d did not converge \n ', iter);
// nnotconverged=nnotconverged + 1;
else
// printf('converged at iteration %d \n ', iter);
// nconverged = nconverged + 1;
end
//(14)Fit the quadratic relation:
T2=[ones(size(t,1),1) t t.^2];
c=inv(T2'*T2)*(T2'*u);
//(15)Calculate the quadratic prediction r of u:
r=T2*c;
q=r'*Y/(r'*r);
q=q'/norm(q');
u=Y*q/(q'*q);
//(16)Calculate the X loadings p
p=(t'*X)/(t'*t); p=p';
//(17)Calculate the input residual matrix
X=X-t*p';
//(18)Calculate the output residual matrix
Y=Y-r*q';
//#####################################
//SAVING RESULTS FOR PREDICTION:
W(i,:)=w'; model.arrays.W=W;
Q(i,:)=q'; model.arrays.Q=Q;
P(i,:)=p'; model.arrays.P=P;
if compact_info == 0 then
U(:,i)=u; model.arrays.U=U;
T(:,i)=t; model.arrays.T=T;
R(:,i)=r; model.arrays.R=R;
end
//#####################################
ITER(i,:)=iter; model.stat.ITER=ITER;
model.pars.C(i,:)=c';
// calculate best directions
if minreq(Y-r*q', Y, X, i) == %T then
model.stat.bestdirs = i-1;
have_best_dirs = %T;
end
//axis([-3 3 -3 3])
end
for i=1:comps
it=model.stat.ITER(i,:);
par=model.pars.C(i,:);
//disp([it par])
end
//pause
// calculate R^2
//1-((yhat-y).SumSquare())/((y-ymeanVector).SumSquare());
//if %nargin == 4 & predict_info ==1 then
if predict_info ==1 then
if have_best_dirs then
y_hat = predictq(X0, model, model.stat.bestdirs );
else
model.stat.bestdirs = comps;
y_hat = predictq(X0, model, comps );
end
r_SQR = 1- sum((y_hat - Y0).^2)/sum((Y0 - ones(n,m)*diag(model.scale.Y0bar)).^2);
// r_SQR = 1- sum((y_hat - Y0).^2)/sum((Y0 - model.scale.Y0bar).^2);
model.stat.r2 = r_SQR;
end
// calculate mean absolute error
model.stat.mean_absolute_error = sum(abs((y_hat - Y0)))/n;
// calculate max error
model.stat.max_error = max(abs(y_hat - Y0));
model.nconverged = nconverged;
model.nnotconverged = nnotconverged;
endfunction
function[is_best] = minreq(Y1, Y, X, i)
//minreq(Y-r*q.t(), Y, X, i)
N = size(Y,1);
M = size(Y,2);
Yd = Y1 - Y; // Reduction obtained
YY = Y'*Y;
C0 = 2*(YY)./(N-i); // 2 * residual variance
bim = [];
is_best = %F;
k = %F;
// ------------ Rule 6 for each response var
for j = 1: M
bim = Yd(:,j)'*Yd(:,j); // Variation obtained
if bim(1,1) > C0(j,j) then
k = %T;
end
end
if (k == %F) then
is_best = %T;
end
endfunction
|
eb42dcba98febe7728ee2cb0ddf875ff532e62c9 | 8ad9380384d2751d79937ba5d6d581565596b891 | /macros/outlier_removal.sci | 1d28a377c58090d168a5314e0ad260dbf2a21e88 | [
"BSD-3-Clause"
] | permissive | iamAkshayrao/scilab_point_cloud_toolbox | 1d8845f0830ddb623383c8dbfeadc8a3a35e8801 | 5d592a695b7976f4e63f0ae24d0a14937e474642 | refs/heads/master | 2022-12-17T23:14:11.513116 | 2020-09-25T18:57:02 | 2020-09-25T18:57:02 | 290,829,006 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,614 | sci | outlier_removal.sci | function outlier_removal()
// Statistical Outlier Removal filtering of a point cloud.
//
// Syntax
// PointCloud(InputPCDFilename,OutputPCDFilename,options,"outlier_removal")
//
// Parameters
// inputPCDFilename : PCD file of input pointcloud
// outputPCDFilename : PCD file where the output pointcloud had to be saved
// where options are:
// -method = the outlier removal method to be used (options: radius / statistical) (default: radius)
// -radius = (RadiusOutlierRemoval) the sphere radius used for determining the k-nearest neighbors (default: 0.0)
// -min_pts = (RadiusOutlierRemoval) the minimum number of neighbors that a point needs to have in the given search radius in order to be considered an inlier (default: 0)
// -mean_k = (StatisticalOutlierRemoval only) the number of points to use for mean distance estimation (default: 2)
// -std_dev_mul = (StatisticalOutlierRemoval only) the standard deviation multiplier threshold (default: 0.0)
// -negative = decides whether the inliers should be returned (1), or the outliers (0). (default: 0)
// -keep_organized = keep the filtered points in organized format.
//
// Description
// This function takes a PCD input file, performs statistical outlier removal filtering and gives the output as a PCD file of specifed name.
//
// Examples
// PointCloud("bun0.pcd","output_outlier1.pcd","-mean_k","3","-radius","10","outlier_removal")
//
// Examples
// PointCloud("bun0.pcd","output_outlier2.pcd","-radius","15","outlier_removal")
//
//Authors
//Ankit Kumar
//Akshay S Rao
//Mohammed Rehab Sait
//Aliasgar AV
endfunction
|
e094ab84b562efcc4e602087cf1810548da91246 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1739/CH6/EX6.3/Exa6_3.sce | 9756a66e1bffd45cec088a255de76a76f6af2183 | [] | 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 | 443 | sce | Exa6_3.sce | //Exa 6.3
clc;
clear;
close;
//given data :
format('v',6);
Pint=28.4;//in mw
Pint=Pint*10^-3;//in Watts
I=60;//in mA
I=I*10^-3;//in A
h=6.63*10^-34;//constant
c=3*10^8;//speed of light in m/s
q=1.6*10^-19;//in coulamb
//Tr=Tnr
//Formula : Pint=(Tnr/(Tr+Tnr))*(I*h*c/(q*lambda))
//as Tr=Tnr : (Tnr/(Tr+Tnr))=1/2
lambda=(1/2)*(I*h*c/(q*Pint));//in m
disp(lambda*10^6,"Peak emission waelength from the device in micro meter : "); |
798852cc710ca0db29d75b1413cd6d4cdf995a31 | 449d555969bfd7befe906877abab098c6e63a0e8 | /443/DEPENDENCIES/17_22_data.sci | 58e81e8b61118e06e8c503a3abf0734ce713c9c8 | [] | 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 | 397 | sci | 17_22_data.sci | //Percentage carbon
C1=0.86;
//Percentage hydrogen
H=0.13;
//Air consumption in excessof that required for theoretically correct combustion
Ac=110/100;
//Brake power(in kW)
bp=120;
//Mechanical efficiency
nm=0.8;
//Indicated thermal efficiency
nith=0.40;
//Calorific Value(in kJ/kg)
CV=43000;
//Volume flow
Va=0.77;
//Speed of the engine(in rpm)
N=1600;
//No of cylinders
K=6;
|
1260aa684bcf4aefd63ce6370ef19ad444c7cefa | 449d555969bfd7befe906877abab098c6e63a0e8 | /1646/CH14/EX14.10/Ch014Ex10.sce | e4c1186d4ddab0fc635072615cc20f9047444121 | [] | 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,038 | sce | Ch014Ex10.sce | // Scilab code Ex14.10 : Pg:724(2011)
clc;clear;
R_L = 980; // Load resistance across FWR, ohm
R_F = 20; // Internal resistance of two crystal diodes in FWR, ohm
V_rms = 50; // Rms value of voltage supply, V
V0 = sqrt(2)*V_rms; // Peak value of voltage, V
I0 = V0/((R_L+R_F)*1e-03); // Peak value of current, mA
I_dc = 2*I0/%pi; // Average value of current, mA
I_rms = I0/sqrt(2); // Rms value of current, mA
V_dc = I_dc*R_L/1e+03; // Dc output voltage, V
eta = 81.2/(1+R_F/R_L); // Rectification efficiency
PIV = 2*V0; // Peak inverse voltage, V
printf("\nThe average value of current = %2d mA", I_dc);
printf("\nThe rms value of current = %2d mA", I_rms);
printf("\nThe dc output voltage = %4.1f V", V_dc/1);
printf("\nThe rectification efficiency = %4.1f percent", eta);
printf("\nPIV = %5.1f V", PIV);
// Result
// The average value of current = 45 mA
// The rms value of current = 50 mA
// The dc output voltage = 44.1 V
// The rectification efficiency = 79.6 percent
// PIV = 141.4 V
|
e346c73798f75030e261354227713be79b69d720 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2024/CH9/EX9.13/9_13.sce | 550bd3cc0c6bff94db5277764beb46d93b4ccad7 | [] | 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 | 381 | sce | 9_13.sce | clc
//Initialization of variables
k=1.31
p1=7200 //lbf/ft^2
v1=8.515 //ft^3/lbm
pr=0.6
m1=0.574
T1=741 //R
//calculations
V2rev=8.02*sqrt(k/(k-1) *p1*v1*(1- (pr)^((k-1)/k)))
v2=v1*(1/pr)^(1/k)
m=%pi/4 *1/144 *V2rev/v2
C=m/m1
T2=T1*(0.887)
t=250+460 //R
dt=t-T2
//results
printf("Mass flow rate = %.3f lbm/sec",m)
printf("\n Meta stable under cooling = %d F",dt)
|
3c778bd9d4e4df82151a1794b84d46f0305f292d | 4ebea1be375a38f07d1b8536e25cd91584882389 | /src/test/example027.tst | 71371aface280b9aeaca3249a27eaac3d16b249c | [
"MIT"
] | permissive | robertsmeets/rjhg-pl | f5c2d850ba7a5e3daa0d4147357d37a275c7100a | 87721b77f92d5180c34123265fac70dcf54c77a9 | refs/heads/master | 2021-05-22T06:46:14.395448 | 2021-02-21T05:54:35 | 2021-02-21T05:54:35 | 32,521,807 | 1 | 1 | MIT | 2020-05-17T16:48:51 | 2015-03-19T13:07:49 | C | UTF-8 | Scilab | false | false | 39 | tst | example027.tst | Writing file testfile.txt
Found char 2
|
8c00d7efc443cd03cd74a661a4a4a25a7092c89f | 449d555969bfd7befe906877abab098c6e63a0e8 | /275/CH7/EX7.7.37/Ch7_7_37.sce | 40d0d753bc83118bd3f6f4dd3f2d80db671a5362 | [] | 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 | 293 | sce | Ch7_7_37.sce | clc
disp("Example 7.37")
printf("\n")
disp("Calculate the modulation index")
printf("Given\n")
disp("carrier voltage=100V,Total modulated voltage in rms=110V")
Vt=110
Vcar=100
//assume R value as 1
R=1
Pt=Vt^2/R
Pc=Vcar^2/R
Ma=sqrt(2*((Pt/Pc)-1))
printf("Modulation index =%f",Ma) |
d7ed6bcdc1848e786c4fd7b4c0c5d111426bb916 | 449d555969bfd7befe906877abab098c6e63a0e8 | /545/CH4/EX4.11/ch_4_eg_11.sce | 7d4cc83ee4289523e1edfc48bf43f13001106eca | [] | 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 | 600 | sce | ch_4_eg_11.sce | clc
//batch reactors
disp("the solution of e.g. 4.11 -->Batch and Stirred Tank Reactors")
//rxn given A--> B
rate_const_k=1
function dCa_by_dt=fs1(t,Ca),
dCa_by_dt=-rate_const_k*Ca,
endfunction
Ca=1
for t=0.1:0.1:3,
h=0.1 //step increment of 0.1
k1=h*fs1(t,Ca)
k2=h*fs1(t+h/2,Ca+k1/2)
k3=h*fs1(t+h/2,Ca+k2/2)
k4=h*fs1(t+h,Ca+k3)
Ca=Ca+(k1+2*k2+2*k3+k4)/6
end
disp(Ca,"the value of conc. at t=3 using Runge Kutta method is");
Ca_anl=exp(-t) //analytical solution
disp(Ca_anl,"the analytical soln. is") |
1d25ea2513495e263b0994007b1dc30a2fc57573 | 3bf94cc0e342c7c76eec4a76f2800ffb17246272 | /TFXSLT_project/testdata/delivery.example.out1.tst | 6794cf43d71cdd1c372a4db77bcafc7d98f82c5e | [] | no_license | imhurduc/BOMRepo | db947cb4b1a3742d1d8ddb91d05109ce8ccee145 | 7053a26a1ca88f944118c9d32153c9cc3c062de3 | refs/heads/master | 2020-12-30T11:52:55.800895 | 2017-05-25T14:36:24 | 2017-05-25T14:36:24 | 91,437,559 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 286 | tst | delivery.example.out1.tst | <?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns0="http://service.arno.com/MathServiceNoPolicy">
<Body>
<ns0:add>
<ns0:a>100</ns0:a>
<ns0:b>20</ns0:b>
</ns0:add>
</Body>
</Envelope> |
8e8c4ba5b6257108d107eda2770b876542a0ce7b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1850/CH3/EX3.7/exa_3_7.sce | 3b64cef2c90bde47c32f1aa5ec83bda16bb4e645 | [] | 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 | 424 | sce | exa_3_7.sce | // Exa 3.7
clc;
clear;
close;
//given data
R_in= 2;// in M ohm
R_in=R_in*10^6;// in ohm
R_out=75;// in ohm
A=2*10^5;
f_o=5;// in Hz
R1=330;// in ohm (assuming)
R_f=R1;
B= R1/(R1+R_f);
A_f = -1;
disp(A_f,"Voltage gain")
R_inf= R1;
disp(R_inf,"Input Resistance in ohm")
R_outf= R_out/(A/2);// in ohm
disp(R_outf,"Output Resistance in ohm");
f_f= f_o*A/2;// in Hz
disp(f_f*10^-6,"Bandwidth in MHz");
|
8f93baf892256db448ed2682744b659426f28b01 | 449d555969bfd7befe906877abab098c6e63a0e8 | /914/CH5/EX5.11/ex5_11.sce | 106f9f34e7fe31597abd03a1f0cb13553f97b607 | [] | 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 | ex5_11.sce | clc;
warning("off");
printf("\n\n example5.11 - pg176");
// given
T=0+273.15; //[K] - temperature in Kelvins
pa2=1.5; //[atm] - partial presuure of a at point2
pa1=0.5; //[atm] - partial pressure of a at point 1
z2=20; //[cm] - position of point 2 from reference point
z1=0; //[cm] - position of point1 from reference point
p=2; //[atm] - total pressure
d=1; //[cm] - diameter
D=0.275; //[cm^2/sec] - diffusion coefficient
A=(%pi*((d)^2))/4;
R=0.082057; //[atm*m^3*kmol^-1*K^-1] - gas constant
// (a) using the formula Na/A=-(D/(R*T))*((pa2-pa1)/(z2-z1))
Na=(-(D/(R*T))*((pa2-pa1)/(z2-z1)))*(A)/(10^6);
printf("\n\n Na=%ekmol/sec\n The negative sign indicates diffusion from point 2 to point 1",Na);
pb2=p-pa2;
pb1=p-pa1;
// (b) using the formula Na/A=((D*p)/(R*T*(z2-z1)))*ln(pb2/pb1)
Na=(((D*p)/(R*T*(z2-z1)))*log(pb2/pb1))*(A)/(10^6);
printf("\n\n Na=%ekmol/sec",Na);
printf("\n The induced velocity increases the net transport of A by the ratio of 10.6*10^-10 to 4.82*10^-10 or 2.2 times.This increse is equivalent to 120 percent"); |
3298fde9fb0aa758a4b35b8499663a4c5770b51a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3574/CH2/EX2.12/EX2_12.sce | 89039d460ef0b805e2059017840eb5207cee5ea3 | [] | 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,815 | sce | EX2_12.sce | // Example 2.12
// Computation of (a) Core loss (b) Core loss if operated at rated current and
// 0.860 power factor from 375V, 50 HZ supply (c) Efficiency for condition in (b)
// (d) Efficiency if the load is disconnected
// Page No. 72
clc;
clear;
close;
// Given data
Srated=50000; // Transformer power rating
VHS=450; // High side voltage
RPU=0.0125; // Percent resistance
XPU=0.0224; // Percent reactance
FP=0.86; // Power factor lagging
eta=0.965 // Efficiency
Hl=0.71 // Hysteresis loss
Vt60=375 // Supply voltage
f1=60; // Transformer frequency
f2=50; // Supply frequency
// (a) Core loss
IHS=Srated/VHS;
// Using high-side values
Req_HS=RPU*VHS/IHS; // Equivalent high-side resistance
Pout=Srated*FP; // Output power
Pin=Pout/eta; // Input power
Pcore=Pin-Pout-(IHS^2*Req_HS) // Core loss
// (b) Core loss if operated at rated current and 0.860 power factor from
// 375V, 50 HZ supply
Ph60=Hl*Pcore; // Hysteresis loss
Pe60=Pcore-Ph60; // Eddy current loss
Pe50=Pe60*(Vt60/VHS)^2; // Eddy current loss
Ph50=Ph60*(f2/f1)*(Vt60/VHS*f1/f2)^1.6;
Pcore50=Pe50+Ph50; // Core loss
// (c) Efficiency
Pout=Vt60*IHS*FP; // Output power
etanew=Pout/(Pout+Pcore50+IHS^2*Req_HS);
// (d) Efficiency with the load is disconnected
// Display result on command window
printf("\n Core loss = %0.1f W", Pcore);
printf("\n Core loss at 375V, 50 Hz supply = %0.2f W",Pcore50);
printf("\n Efficiency = %0.1f Percent", etanew*100);
printf("\n Efficiency = 0 with the load is disconnected as Pout=0" )
|
cce174d2f84bf0c817bf80d5577d0ba89420ddd7 | d8c4bf9ddb7db18c69e9e5e543d546b8dd4338d2 | /userland/bin/utils/e/expr/test/arith-string.tst | a67d2b6b3afeb77433faf09d95b288d365e6a52f | [] | no_license | r-tty/QRV | aac7bb7167f8dc630be54c041169a4867e8e963f | 87d22fc3c3b8e14902643fa987af8ba06bda2a8a | refs/heads/master | 2022-07-27T13:40:02.469769 | 2021-12-09T12:57:19 | 2021-12-09T12:57:19 | 322,424,788 | 2 | 2 | null | null | null | null | UTF-8 | Scilab | false | false | 1,160 | tst | arith-string.tst | expr '' '+' ''
expr '' '+' abc
expr '' '+' 0
expr '' '+' 2
expr '' '-' ''
expr '' '-' abc
expr '' '-' 0
expr '' '-' 2
expr '' '*' ''
expr '' '*' abc
expr '' '*' 0
expr '' '*' 2
expr '' '/' ''
expr '' '/' abc
expr '' '/' 0
expr '' '/' 2
expr '' '%' ''
expr '' '%' abc
expr '' '%' 0
expr '' '%' 2
expr abc '+' ''
expr abc '+' abc
expr abc '+' 0
expr abc '+' 2
expr abc '-' ''
expr abc '-' abc
expr abc '-' 0
expr abc '-' 2
expr abc '*' ''
expr abc '*' abc
expr abc '*' 0
expr abc '*' 2
expr abc '/' ''
expr abc '/' abc
expr abc '/' 0
expr abc '/' 2
expr abc '%' ''
expr abc '%' abc
expr abc '%' 0
expr abc '%' 2
expr 0 '+' ''
expr 0 '+' abc
expr 0 '+' 0
expr 0 '+' 2
expr 0 '-' ''
expr 0 '-' abc
expr 0 '-' 0
expr 0 '-' 2
expr 0 '*' ''
expr 0 '*' abc
expr 0 '*' 0
expr 0 '*' 2
expr 0 '/' ''
expr 0 '/' abc
expr 0 '/' 0
expr 0 '/' 2
expr 0 '%' ''
expr 0 '%' abc
expr 0 '%' 0
expr 0 '%' 2
expr 2 '+' ''
expr 2 '+' abc
expr 2 '+' 0
expr 2 '+' 2
expr 2 '-' ''
expr 2 '-' abc
expr 2 '-' 0
expr 2 '-' 2
expr 2 '*' ''
expr 2 '*' abc
expr 2 '*' 0
expr 2 '*' 2
expr 2 '/' ''
expr 2 '/' abc
expr 2 '/' 0
expr 2 '/' 2
expr 2 '%' ''
expr 2 '%' abc
expr 2 '%' 0
expr 2 '%' 2
|
5d2556ee92db254fe2e63bef261121cb5f7500b0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2627/CH3/EX3.10/Ex3_10.sce | 79206fd60cb9abe81aa5fb65cf5dd92a84c58662 | [] | 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 | Ex3_10.sce | //Ex 3.10
clc;clear;close;
format('v',5);
Pr=750;//W(rated)
Vr=100;//V(rated)
V=230;//V(Supply voltage)
f=60;//Hz
VC=sqrt(V^2-Vr^2);//V(Voltage across capacitor)
Ir=Pr/Vr;//A(Rated current)
C=Ir/(2*%pi*f*VC)*10^6;//micro F
disp(C,"(a) Capacitance required(micro F)");
fi=acosd(Vr/V);//degree
disp(fi,"(b) Phase angle(degree)");
|
2ee4bc64cb76479816938003c2af575d5a0e5b60 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2054/CH3/EX3.15/Exa3_15.sce | e9af78d42883aebf8b5efa1b74ae6c4ddb791cdd | [] | 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 | 254 | sce | Exa3_15.sce | //Exa:3.15
clc;
clear;
close;
alpha=0.25;//duty cycle
V=400;//in volts
L=0.5;//in henery
I=10;//ripple current (in amperes)
V_a=alpha*V;//in volts
T_on=L*I/(V-V_a);//in seconds
T=T_on/alpha;//in seconds
f=1/T;
disp(f,'Frequency (in hertzs)=') |
4c4b954f82b8e731ec929a023a23ca2d2cc2c50c | 46ffb5fda9448453eba4d6787a1568028b241d88 | /ABMLangangen/calibration/calibSimplexMeanSquares_04:56:11.876 PM 07-juin-2013.sci | 8ff47e05f6552f82fe4fc29559f48e1527a0da02 | [] | no_license | JusteRaimbault/Models | f81f886dc050445dae68e933e0c052c7f9c0b59c | 52f9c28fe20c8e491fb83e22ef162256eb966d32 | refs/heads/master | 2016-09-10T23:23:05.419418 | 2013-07-30T22:02:34 | 2013-07-30T22:02:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,258 | sci | calibSimplexMeanSquares_04:56:11.876 PM 07-juin-2013.sci | ms=[];incomemean=[];bref=[];bnorm=[];
ms(1)=4.964979805910687E7;
incomemean(1)=17000;
bref(1)=12000;
bnorm(1)=30000;
ms(2)=5.1304862526147686E7;
incomemean(2)=17000;
bref(2)=13000;
bnorm(2)=30000;
ms(3)=5.0506900243041545E7;
incomemean(3)=17000;
bref(3)=12000;
bnorm(3)=31000;
ms(4)=1.9234492552612614E7;
incomemean(4)=18000;
bref(4)=12000;
bnorm(4)=30000;
ms(5)=2.954828136947894E7;
incomemean(5)=17666.666666666668;
bref(5)=11000;
bnorm(5)=30666.666666666664;
ms(6)=1.6521002820140846E7;
incomemean(6)=18111.111111111113;
bref(6)=11333.333333333332;
bnorm(6)=29444.44444444443;
ms(7)=7469512.649989238;
incomemean(7)=18666.66666666668;
bref(7)=11000;
bnorm(7)=28666.66666666665;
ms(8)=6825400.908761693;
incomemean(8)=19222.22222222223;
bref(8)=10666.666666666664;
bnorm(8)=29555.55555555554;
ms(9)=1.91049550557299E7;
incomemean(9)=20333.33333333335;
bref(9)=9999.999999999996;
bnorm(9)=29333.33333333332;
ms(10)=7781975.779417768;
incomemean(10)=19592.592592592606;
bref(10)=11444.444444444442;
bnorm(10)=28148.148148148124;
ms(11)=2.0686251470807165E7;
incomemean(11)=20320.987654321016;
bref(11)=10074.074074074073;
bnorm(11)=27580.246913580202;
ms(12)=1.0917891041546512E7;
incomemean(12)=18580.246913580253;
bref(12)=11518.518518518518;
bnorm(12)=29395.06172839505;
ms(13)=7531469.859914415;
incomemean(13)=19740.740740740755;
bref(13)=10555.555555555555;
bnorm(13)=28185.185185185153;
ms(14)=6584562.010392697;
incomemean(14)=18827.160493827178;
bref(14)=10037.03703703704;
bnorm(14)=29456.79012345677;
ms(15)=1.248750173628373E7;
incomemean(15)=18444.444444444467;
bref(15)=9333.333333333341;
bnorm(15)=30111.111111111088;
ms(16)=1.420400068860311E7;
incomemean(16)=18069.95884773664;
bref(16)=10580.24691358025;
bnorm(16)=30267.489711934162;
ms(17)=6457470.137862526;
incomemean(17)=19323.045267489728;
bref(17)=10561.72839506173;
bnorm(17)=28705.761316872406;
ms(18)=7636402.169208169;
incomemean(18)=19581.61865569276;
bref(18)=9843.621399176958;
bnorm(18)=29812.07133058983;
ms(19)=6385963.986040474;
incomemean(19)=18895.4046639232;
bref(19)=10710.90534979424;
bnorm(19)=28953.017832647445;
ms(20)=8288773.093406325;
incomemean(20)=18808.18472793786;
bref(20)=10206.447187928672;
bnorm(20)=28521.490626428887;
ms(21)=6215465.046966467;
incomemean(21)=19118.712848651136;
bref(21)=10551.611796982166;
bnorm(21)=29297.03932327388;
ms(22)=6450127.330314476;
incomemean(22)=19397.614692882213;
bref(22)=11179.126657521716;
bnorm(22)=28513.755525072404;
ms(23)=6512233.754550052;
incomemean(23)=19118.712848651136;
bref(23)=10551.611796982166;
bnorm(23)=29297.03932327388;
ms(24)=6415485.29122182;
incomemean(24)=19118.712848651136;
bref(24)=10551.611796982166;
bnorm(24)=29297.03932327388;
ms(25)=5984720.295770543;
incomemean(25)=19118.712848651136;
bref(25)=11551.611796982166;
bnorm(25)=29297.03932327388;
ms(26)=6377821.680288596;
incomemean(26)=19118.712848651136;
bref(26)=10551.611796982166;
bnorm(26)=30297.03932327388;
ms(27)=1.439541665121651E7;
incomemean(27)=20118.712848651136;
bref(27)=10551.611796982166;
bnorm(27)=29297.03932327388;
ms(28)=1.6481240155526338E7;
incomemean(28)=18118.712848651136;
bref(28)=11218.278463648832;
bnorm(28)=29963.705989940543;
ms(29)=7859566.203770019;
incomemean(29)=19618.712848651136;
bref(29)=10718.278463648832;
bnorm(29)=29463.705989940543;
ms(30)=1.011634213215736E7;
incomemean(30)=18618.712848651132;
bref(30)=11051.611796982164;
bnorm(30)=29797.03932327388;
ms(31)=6424069.364681931;
incomemean(31)=19368.712848651136;
bref(31)=10801.611796982166;
bnorm(31)=29547.03932327388;
ms(32)=7178931.754107056;
incomemean(32)=18868.712848651136;
bref(32)=10968.278463648836;
bnorm(32)=29713.70598994055;
ms(33)=5831927.20952274;
incomemean(33)=19243.712848651136;
bref(33)=10843.278463648832;
bnorm(33)=29588.705989940547;
ms(34)=5979852.734105287;
incomemean(34)=19202.046181984468;
bref(34)=11412.722908093274;
bnorm(34)=30158.150434384996;
ms(35)=6028199.718266811;
incomemean(35)=19257.601737540022;
bref(35)=11986.796982167347;
bnorm(35)=29065.557841792404;
ms(36)=6009996.739377064;
incomemean(36)=19222.8795153178;
bref(36)=11628.000685871053;
bnorm(36)=29373.428212162773;
ms(37)=6352904.47346661;
incomemean(37)=19243.712848651136;
bref(37)=10843.278463648832;
bnorm(37)=29588.705989940547;
|
7b96ece53644f04b283a9f1d3e2b286a365502d8 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/tests/examples/plot.man.tst | 6ff2d179d246927f23411a1a32b6f2853f14955e | [
"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 | 179 | tst | plot.man.tst | clear;lines(0);
x=0:0.1:2*%pi;
// simple plot
plot(sin(x))
// using captions
xbasc()
plot(x,sin(x),"sin","time","plot of sinus")
// plot 2 functions
xbasc()
plot([sin(x);cos(x)])
|
6e42ec5605c8a66c68d4e72e05f0bf550de2f181 | 89c4b0937ea9ccf1d3b0f2635d805ea0e9287765 | /test.tst | 3ef9a06b87fe5d6df3100258619ccda8ec865aa7 | [
"MIT"
] | permissive | marcosQuesada/Symfony2--Sonata-Full---FOSUserBundle | 8ee573423e6f2caf5c2f346410d500d06a9fedf3 | 1ca4e0e50d44f8ad46e5873fd70b43b03be829d6 | refs/heads/master | 2021-01-19T15:28:26.030996 | 2011-10-27T22:08:54 | 2011-10-27T22:08:54 | 2,594,498 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 28 | tst | test.tst | XXXcommit contra la branch
|
d49f263acea1b1fe7b63ba6802884a8bdaa55e4d | 449d555969bfd7befe906877abab098c6e63a0e8 | /331/CH10/EX10.6/Example_10_6.sce | 29f4ebd59d0d9d6e30eff9da401bc3d1a65fc063 | [] | 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,010 | sce | Example_10_6.sce | //Caption:Weighted Moving Average Method
//Example10.6
//Page383
clear;
clc;
Dt = [80,90,70,100,70,90];//Demand of a product
t = length(Dt);// months
W = [0.2,0.3,0.5];//weights
//Three months weighted moving averages
for i = 3:t
Wt(i-2) = W*Dt([(i-2):i])' ;
WtMA(i-2) = Wt(i-2)/sum(W)
end
disp(WtMA,'Three Months weighted moving average Mt=')
for i = 1:length(Wt)-1
Ft(i) = WtMA(i);
et(i) = Dt(i+3)-Ft(i);
end
disp(Ft,'Forecast Ft=')
disp(et,'Error et=')
MAD = sum(abs(et(:)))/length(et);
disp(MAD,'Mean Absolute Deviation MAD=')
MFE = sum(et(:))/length(et);
disp(MFE,'Mean Forecast Error MFE=')
//Result
//Three Months weighted moving average Mt=
//
// 78.
// 89.
// 79.
// 86.
//
// Forecast Ft=
//
// 78.
// 89.
// 79.
//
// Error et=
//
// 22.
// - 19.
// 11.
//
// Mean Absolute Deviation MAD=
//
// 17.333333
//
// Mean Forecast Error MFE=
//
// 4.6666667 |
a67260acec1a33fd1af65462fa63f5aaaf30e3ec | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/TE360.prev.tst | 5762d2dd150fc669bfa5c351f86d4bd24cfe2ec0 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gfis/ramath | 498adfc7a6d353d4775b33020fdf992628e3fbff | b09b48639ddd4709ffb1c729e33f6a4b9ef676b5 | refs/heads/master | 2023-08-17T00:10:37.092379 | 2023-08-04T07:48:00 | 2023-08-04T07:48:00 | 30,116,803 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 10,789 | tst | TE360.prev.tst | TranspositionSet={[0,2,1,3],[1,0,2,3],[1,2,0,3],[2,1,0,3],[2,0,1,3]}
considerNonPrimitive
Expanding for base=6, level=1, reasons+features=base,transpose,primitive,same,similiar
Refined variables=a,b,c,d
[0+1a,0+1b,0+1c,0+1d]: unknown -> [1] [0,0,0,0] a³+b³+c³-d³
-> solution [0,0,0,0],trivial(3) [1,0,0,1],trivial(3) [0,1,0,1],trivial(3) [0,0,1,1],trivial(3)
---------------- level 0
expanding queue[0]^-1,meter=[6,6,6,6]: a³+b³+c³-d³
[0+6a,0+6b,0+6c,0+6d]: non-primitive
-> solution [0,0,0,0],trivial(3) [6,0,0,6],trivial(3) [0,6,0,6],trivial(3) [0,0,6,6],trivial(3)
[5+6a,1+6b,0+6c,0+6d]: unknown -> [1] [5,1,0,0] 450a+540a²+216a³+18b+108b²+216b³+216c³-216d³+126
[4+6a,2+6b,0+6c,0+6d]: non-primitive
[3+6a,3+6b,0+6c,0+6d]: non-primitive
[2+6a,4+6b,0+6c,0+6d]: non-primitive
[1+6a,5+6b,0+6c,0+6d]: transposed [1] by [1,0,2,3]
[5+6a,0+6b,1+6c,0+6d]: transposed [1] by [0,2,1,3]
[3+6a,2+6b,1+6c,0+6d]: unknown -> [2] [3,2,1,0] 162a+324a²+216a³+72b+216b²+216b³+18c+108c²+216c³-216d³+36
[2+6a,3+6b,1+6c,0+6d]: transposed [2] by [1,0,2,3]
[0+6a,5+6b,1+6c,0+6d]: transposed [1] by [2,0,1,3]
[4+6a,0+6b,2+6c,0+6d]: non-primitive
[3+6a,1+6b,2+6c,0+6d]: transposed [2] by [0,2,1,3]
[1+6a,3+6b,2+6c,0+6d]: transposed [2] by [2,0,1,3]
[0+6a,4+6b,2+6c,0+6d]: non-primitive
[3+6a,0+6b,3+6c,0+6d]: non-primitive
[2+6a,1+6b,3+6c,0+6d]: transposed [2] by [1,2,0,3]
[1+6a,2+6b,3+6c,0+6d]: transposed [2] by [2,1,0,3]
[0+6a,3+6b,3+6c,0+6d]: non-primitive
[5+6a,4+6b,3+6c,0+6d]: unknown -> [3] [5,4,3,0] 450a+540a²+216a³+288b+432b²+216b³+162c+324c²+216c³-216d³+216
-> solution [5,4,3,6],NONTRIVIAL
[4+6a,5+6b,3+6c,0+6d]: transposed [3] by [1,0,2,3]
[2+6a,0+6b,4+6c,0+6d]: non-primitive
[0+6a,2+6b,4+6c,0+6d]: non-primitive
[5+6a,3+6b,4+6c,0+6d]: transposed [3] by [0,2,1,3]
[3+6a,5+6b,4+6c,0+6d]: transposed [3] by [2,0,1,3]
[1+6a,0+6b,5+6c,0+6d]: transposed [1] by [1,2,0,3]
[0+6a,1+6b,5+6c,0+6d]: transposed [1] by [2,1,0,3]
[4+6a,3+6b,5+6c,0+6d]: transposed [3] by [1,2,0,3]
[3+6a,4+6b,5+6c,0+6d]: transposed [3] by [2,1,0,3]
[1+6a,0+6b,0+6c,1+6d]: unknown -> [4] [1,0,0,1] 18a+108a²+216a³+216b³+216c³-18d-108d²-216d³
-> solution [1,0,0,1],trivial(3) [7,0,0,7],trivial(3)
[0+6a,1+6b,0+6c,1+6d]: transposed [4] by [2,0,1,3]
[4+6a,3+6b,0+6c,1+6d]: unknown -> [5] [4,3,0,1] 288a+432a²+216a³+162b+324b²+216b³+216c³-18d-108d²-216d³+90
[3+6a,4+6b,0+6c,1+6d]: transposed [5] by [1,0,2,3]
[0+6a,0+6b,1+6c,1+6d]: transposed [4] by [2,1,0,3]
[5+6a,1+6b,1+6c,1+6d]: unknown -> [6] [5,1,1,1] 450a+540a²+216a³+18b+108b²+216b³+18c+108c²+216c³-18d-108d²-216d³+126
[4+6a,2+6b,1+6c,1+6d]: unknown -> [7] [4,2,1,1] 288a+432a²+216a³+72b+216b²+216b³+18c+108c²+216c³-18d-108d²-216d³+72
[3+6a,3+6b,1+6c,1+6d]: unknown -> [8] [3,3,1,1] 162a+324a²+216a³+162b+324b²+216b³+18c+108c²+216c³-18d-108d²-216d³+54
[2+6a,4+6b,1+6c,1+6d]: transposed [7] by [1,0,2,3]
[1+6a,5+6b,1+6c,1+6d]: transposed [6] by [2,0,1,3]
[4+6a,1+6b,2+6c,1+6d]: transposed [7] by [0,2,1,3]
[1+6a,4+6b,2+6c,1+6d]: transposed [7] by [2,0,1,3]
[4+6a,0+6b,3+6c,1+6d]: transposed [5] by [0,2,1,3]
[3+6a,1+6b,3+6c,1+6d]: transposed [8] by [1,2,0,3]
[1+6a,3+6b,3+6c,1+6d]: transposed [8] by [2,0,1,3]
[0+6a,4+6b,3+6c,1+6d]: transposed [5] by [2,0,1,3]
[3+6a,0+6b,4+6c,1+6d]: transposed [5] by [1,2,0,3]
[2+6a,1+6b,4+6c,1+6d]: transposed [7] by [1,2,0,3]
[1+6a,2+6b,4+6c,1+6d]: transposed [7] by [2,1,0,3]
[0+6a,3+6b,4+6c,1+6d]: transposed [5] by [2,1,0,3]
[5+6a,4+6b,4+6c,1+6d]: unknown -> [9] [5,4,4,1] 450a+540a²+216a³+288b+432b²+216b³+288c+432c²+216c³-18d-108d²-216d³+252
[4+6a,5+6b,4+6c,1+6d]: transposed [9] by [2,0,1,3]
[1+6a,1+6b,5+6c,1+6d]: transposed [6] by [2,1,0,3]
[4+6a,4+6b,5+6c,1+6d]: transposed [9] by [2,1,0,3]
[2+6a,0+6b,0+6c,2+6d]: non-primitive
-> solution [2,0,0,2],trivial(3) [8,0,0,8],trivial(3)
[0+6a,2+6b,0+6c,2+6d]: non-primitive
-> solution [0,2,0,2],trivial(3) [0,8,0,8],trivial(3)
[5+6a,3+6b,0+6c,2+6d]: unknown -> [10] [5,3,0,2] 450a+540a²+216a³+162b+324b²+216b³+216c³-72d-216d²-216d³+144
[3+6a,5+6b,0+6c,2+6d]: transposed [10] by [1,0,2,3]
[5+6a,2+6b,1+6c,2+6d]: unknown -> [11] [5,2,1,2] 450a+540a²+216a³+72b+216b²+216b³+18c+108c²+216c³-72d-216d²-216d³+126
[2+6a,5+6b,1+6c,2+6d]: transposed [11] by [1,0,2,3]
[0+6a,0+6b,2+6c,2+6d]: non-primitive
-> solution [0,0,2,2],trivial(3) [0,0,8,8],trivial(3)
[5+6a,1+6b,2+6c,2+6d]: transposed [11] by [0,2,1,3]
[4+6a,2+6b,2+6c,2+6d]: non-primitive
[3+6a,3+6b,2+6c,2+6d]: unknown -> [12] [3,3,2,2] 162a+324a²+216a³+162b+324b²+216b³+72c+216c²+216c³-72d-216d²-216d³+54
[2+6a,4+6b,2+6c,2+6d]: non-primitive
[1+6a,5+6b,2+6c,2+6d]: transposed [11] by [2,0,1,3]
[5+6a,0+6b,3+6c,2+6d]: transposed [10] by [0,2,1,3]
[3+6a,2+6b,3+6c,2+6d]: transposed [12] by [1,2,0,3]
[2+6a,3+6b,3+6c,2+6d]: transposed [12] by [2,0,1,3]
[0+6a,5+6b,3+6c,2+6d]: transposed [10] by [2,0,1,3]
[2+6a,2+6b,4+6c,2+6d]: non-primitive
[5+6a,5+6b,4+6c,2+6d]: unknown -> [13] [5,5,4,2] 450a+540a²+216a³+450b+540b²+216b³+288c+432c²+216c³-72d-216d²-216d³+306
[3+6a,0+6b,5+6c,2+6d]: transposed [10] by [1,2,0,3]
[2+6a,1+6b,5+6c,2+6d]: transposed [11] by [1,2,0,3]
[1+6a,2+6b,5+6c,2+6d]: transposed [11] by [2,1,0,3]
[0+6a,3+6b,5+6c,2+6d]: transposed [10] by [2,1,0,3]
[5+6a,4+6b,5+6c,2+6d]: transposed [13] by [1,2,0,3]
[4+6a,5+6b,5+6c,2+6d]: transposed [13] by [2,0,1,3]
[3+6a,0+6b,0+6c,3+6d]: non-primitive
-> solution [3,0,0,3],trivial(3) [9,0,0,9],trivial(3)
[2+6a,1+6b,0+6c,3+6d]: unknown -> [14] [2,1,0,3] 72a+216a²+216a³+18b+108b²+216b³+216c³-162d-324d²-216d³-18
-> solution [8,1,6,9],NONTRIVIAL
[1+6a,2+6b,0+6c,3+6d]: transposed [14] by [1,0,2,3]
[0+6a,3+6b,0+6c,3+6d]: non-primitive
-> solution [0,3,0,3],trivial(3) [0,9,0,9],trivial(3)
[5+6a,4+6b,0+6c,3+6d]: unknown -> [15] [5,4,0,3] 450a+540a²+216a³+288b+432b²+216b³+216c³-162d-324d²-216d³+162
[4+6a,5+6b,0+6c,3+6d]: transposed [15] by [1,0,2,3]
[2+6a,0+6b,1+6c,3+6d]: transposed [14] by [0,2,1,3]
[0+6a,2+6b,1+6c,3+6d]: transposed [14] by [2,0,1,3]
[5+6a,3+6b,1+6c,3+6d]: unknown -> [16] [5,3,1,3] 450a+540a²+216a³+162b+324b²+216b³+18c+108c²+216c³-162d-324d²-216d³+126
[3+6a,5+6b,1+6c,3+6d]: transposed [16] by [1,0,2,3]
[1+6a,0+6b,2+6c,3+6d]: transposed [14] by [1,2,0,3]
[0+6a,1+6b,2+6c,3+6d]: transposed [14] by [2,1,0,3]
[4+6a,3+6b,2+6c,3+6d]: unknown -> [17] [4,3,2,3] 288a+432a²+216a³+162b+324b²+216b³+72c+216c²+216c³-162d-324d²-216d³+72
[3+6a,4+6b,2+6c,3+6d]: transposed [17] by [1,0,2,3]
[0+6a,0+6b,3+6c,3+6d]: non-primitive
-> solution [0,0,3,3],trivial(3) [0,0,9,9],trivial(3)
[5+6a,1+6b,3+6c,3+6d]: transposed [16] by [0,2,1,3]
[4+6a,2+6b,3+6c,3+6d]: transposed [17] by [0,2,1,3]
[3+6a,3+6b,3+6c,3+6d]: non-primitive
[2+6a,4+6b,3+6c,3+6d]: transposed [17] by [2,0,1,3]
[1+6a,5+6b,3+6c,3+6d]: transposed [16] by [2,0,1,3]
[5+6a,0+6b,4+6c,3+6d]: transposed [15] by [0,2,1,3]
[3+6a,2+6b,4+6c,3+6d]: transposed [17] by [1,2,0,3]
[2+6a,3+6b,4+6c,3+6d]: transposed [17] by [2,1,0,3]
[0+6a,5+6b,4+6c,3+6d]: transposed [15] by [2,0,1,3]
[4+6a,0+6b,5+6c,3+6d]: transposed [15] by [1,2,0,3]
[3+6a,1+6b,5+6c,3+6d]: transposed [16] by [1,2,0,3]
[1+6a,3+6b,5+6c,3+6d]: transposed [16] by [2,1,0,3]
[0+6a,4+6b,5+6c,3+6d]: transposed [15] by [2,1,0,3]
[4+6a,0+6b,0+6c,4+6d]: non-primitive
-> solution [4,0,0,4],trivial(3) [10,0,0,10],trivial(3)
[3+6a,1+6b,0+6c,4+6d]: unknown -> [18] [3,1,0,4] 162a+324a²+216a³+18b+108b²+216b³+216c³-288d-432d²-216d³-36
[1+6a,3+6b,0+6c,4+6d]: transposed [18] by [1,0,2,3]
[0+6a,4+6b,0+6c,4+6d]: non-primitive
-> solution [0,4,0,4],trivial(3) [0,10,0,10],trivial(3)
[3+6a,0+6b,1+6c,4+6d]: transposed [18] by [0,2,1,3]
[2+6a,1+6b,1+6c,4+6d]: unknown -> [19] [2,1,1,4] 72a+216a²+216a³+18b+108b²+216b³+18c+108c²+216c³-288d-432d²-216d³-54
[1+6a,2+6b,1+6c,4+6d]: transposed [19] by [2,0,1,3]
[0+6a,3+6b,1+6c,4+6d]: transposed [18] by [2,0,1,3]
[5+6a,4+6b,1+6c,4+6d]: unknown -> [20] [5,4,1,4] 450a+540a²+216a³+288b+432b²+216b³+18c+108c²+216c³-288d-432d²-216d³+126
[4+6a,5+6b,1+6c,4+6d]: transposed [20] by [1,0,2,3]
[1+6a,1+6b,2+6c,4+6d]: transposed [19] by [2,1,0,3]
[4+6a,4+6b,2+6c,4+6d]: non-primitive
[1+6a,0+6b,3+6c,4+6d]: transposed [18] by [1,2,0,3]
[0+6a,1+6b,3+6c,4+6d]: transposed [18] by [2,1,0,3]
[4+6a,3+6b,3+6c,4+6d]: unknown -> [21] [4,3,3,4] 288a+432a²+216a³+162b+324b²+216b³+162c+324c²+216c³-288d-432d²-216d³+54
[3+6a,4+6b,3+6c,4+6d]: transposed [21] by [2,0,1,3]
[0+6a,0+6b,4+6c,4+6d]: non-primitive
-> solution [0,0,4,4],trivial(3) [0,0,10,10],trivial(3)
[5+6a,1+6b,4+6c,4+6d]: transposed [20] by [0,2,1,3]
[4+6a,2+6b,4+6c,4+6d]: non-primitive
[3+6a,3+6b,4+6c,4+6d]: transposed [21] by [2,1,0,3]
[2+6a,4+6b,4+6c,4+6d]: non-primitive
[1+6a,5+6b,4+6c,4+6d]: transposed [20] by [2,0,1,3]
[4+6a,1+6b,5+6c,4+6d]: transposed [20] by [1,2,0,3]
[1+6a,4+6b,5+6c,4+6d]: transposed [20] by [2,1,0,3]
[5+6a,0+6b,0+6c,5+6d]: unknown -> [22] [5,0,0,5] 450a+540a²+216a³+216b³+216c³-450d-540d²-216d³
-> solution [5,0,0,5],trivial(3) [11,0,0,11],trivial(3)
[3+6a,2+6b,0+6c,5+6d]: unknown -> [23] [3,2,0,5] 162a+324a²+216a³+72b+216b²+216b³+216c³-450d-540d²-216d³-90
[2+6a,3+6b,0+6c,5+6d]: transposed [23] by [1,0,2,3]
[0+6a,5+6b,0+6c,5+6d]: transposed [22] by [2,0,1,3]
[2+6a,2+6b,1+6c,5+6d]: unknown -> [24] [2,2,1,5] 72a+216a²+216a³+72b+216b²+216b³+18c+108c²+216c³-450d-540d²-216d³-108
[5+6a,5+6b,1+6c,5+6d]: unknown -> [25] [5,5,1,5] 450a+540a²+216a³+450b+540b²+216b³+18c+108c²+216c³-450d-540d²-216d³+126
[3+6a,0+6b,2+6c,5+6d]: transposed [23] by [0,2,1,3]
[2+6a,1+6b,2+6c,5+6d]: transposed [24] by [1,2,0,3]
[1+6a,2+6b,2+6c,5+6d]: transposed [24] by [2,0,1,3]
[0+6a,3+6b,2+6c,5+6d]: transposed [23] by [2,0,1,3]
[5+6a,4+6b,2+6c,5+6d]: unknown -> [26] [5,4,2,5] 450a+540a²+216a³+288b+432b²+216b³+72c+216c²+216c³-450d-540d²-216d³+72
[4+6a,5+6b,2+6c,5+6d]: transposed [26] by [1,0,2,3]
[2+6a,0+6b,3+6c,5+6d]: transposed [23] by [1,2,0,3]
[0+6a,2+6b,3+6c,5+6d]: transposed [23] by [2,1,0,3]
[5+6a,3+6b,3+6c,5+6d]: unknown -> [27] [5,3,3,5] 450a+540a²+216a³+162b+324b²+216b³+162c+324c²+216c³-450d-540d²-216d³+54
[3+6a,5+6b,3+6c,5+6d]: transposed [27] by [2,0,1,3]
[5+6a,2+6b,4+6c,5+6d]: transposed [26] by [0,2,1,3]
[2+6a,5+6b,4+6c,5+6d]: transposed [26] by [2,0,1,3]
[0+6a,0+6b,5+6c,5+6d]: transposed [22] by [2,1,0,3]
[5+6a,1+6b,5+6c,5+6d]: transposed [25] by [1,2,0,3]
[4+6a,2+6b,5+6c,5+6d]: transposed [26] by [1,2,0,3]
[3+6a,3+6b,5+6c,5+6d]: transposed [27] by [2,1,0,3]
[2+6a,4+6b,5+6c,5+6d]: transposed [26] by [2,1,0,3]
[1+6a,5+6b,5+6c,5+6d]: transposed [25] by [2,0,1,3]
endexp[0]
---------------- level 1
Maximum level 1 [28] mod 6: a³+b³+c³-d³
|
65aad7c0d19700bd24aff967d4b1b43b4b639d0c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH1/EX1.37/Ex1_37.sce | d38cc4cd854ffea585535632d3e9488e343cbb16 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 351 | sce | Ex1_37.sce | //Example 1_37
clc;
clear;
close;
format('v',5);
//given data :
V=12;//V
RAB=3;//ohm
RAC=3;//ohm
RBC=3;//ohm
RBD=3;//ohm
RCD=3;//ohm
RA=RAB*RAC/(RAB+RAC+RBC);//ohm
RB=RAB*RBC/(RAB+RAC+RBC);//ohm
RC=RAC*RBC/(RAB+RAC+RBC);//ohm
Req=RA+(RB+RBD)*(RC+RCD)/(RB+RBD+RC+RCD);//ohm
I=V/Req;//A
disp(I,"Current I supplied by the battery(A)");
|
a469e9f540f3ebdca258cf81a3e0ee39a64ee7e9 | 352a2b6c7e8e0fbc76f9dacb222075df0cc1bbc6 | /TP1/trace.sci | 3f6a7730ae75c9bcfc1d669f4ff16281c298f8f3 | [] | no_license | BenFradet/RO05 | 443dd2807b521eefdd65ff901d25b46bce8a0838 | 0aa5855de282bfccacae999536f1424a303ca72e | refs/heads/master | 2020-06-06T17:45:47.138916 | 2014-12-18T15:32:12 | 2014-12-18T15:32:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,788 | sci | trace.sci | function[] = trace()
exec('generatePoisson.sci', -1);
exec('generateOneThird.sci', -1);
exec('generateGaussian.sci', -1);
exec('generateWeibull.sci', -1);
n = 500;
lambda = 3;
mu = 2;
sigma = 4;
alpha = 3;
beta = 3;
poisson = generatePoisson(lambda, n);
sPoisson = grand(n, 1, 'poi', lambda);
oneThird = generateOneThird(n);
gaussian = generateGaussian(mu, sigma, n);
sGaussian = grand(n, 1, 'nor', mu, sigma);
weibull = generateWeibull(alpha, beta, n);
// poisson plot
xPoisson = linspace(min(poisson), max(poisson), n);
f1Poisson = zeros(1:n);
f2Poisson = zeros(1:n);
for i = 1:n
f1Poisson(i) = size(find(poisson <= xPoisson(i)), 2) / n;
f2Poisson(i) = size(find(sPoisson <= xPoisson(i)), 2) / n;
end
// density of the poisson distrib
deff('[p] = f(x, lambda)', ...
'p = exp(-lambda) .* lambda .^ x ./ gamma(x + 1)')
x2Poisson = [1:floor(max(xPoisson))]
d3Poisson = f(x2Poisson, lambda);
f3Poisson = []
for i = 1:floor(max(xPoisson))
f3Poisson = [f3Poisson sum(d3Poisson(1:i))];
end
f = figure(0);
f.background = -2;
gc = gca();
gc.data_bounds = [1, 0; 11, 1];
plot(xPoisson, f1Poisson, 'r');
plot(xPoisson, f2Poisson, 'b');
plot(x2Poisson, f3Poisson, 'k');
// third plot
xThird = linspace(min(oneThird) - 1, max(oneThird) + 1, n);
f1Third = zeros(1:n);
for i = 1:n
f1Third(i) = size(find(oneThird <= xThird(i)), 2) / n;
end
f = figure(1);
f.background = -2;
gc = gca();
gc.data_bounds = [min(oneThird) - 1, min(f1Third) - 0.2; ...
max(oneThird) + 1, max(f1Third) + 0.2];
x = [-2, -1, -1, 0, 0, 1, 1, 2];
y = [0, 0, 1 / 3, 1 / 3, 2 / 3, 2 / 3, 1, 1];
plot(xThird, f1Third, 'r--');
xpoly(x, y);
// gaussian plot
xGaussian = linspace(min(gaussian), max(gaussian), n);
f1Gaussian = zeros(1:n);
f2Gaussian = zeros(1:n);
for i = 1:n
f1Gaussian(i) = size(find(gaussian <= xGaussian(i)), 2) / n;
f2Gaussian(i) = size(find(sGaussian <= xGaussian(i)), 2) / n;
end
f3Gaussian = cdfnor("PQ", xGaussian, mu * ones(xGaussian), ...
sigma * ones(xGaussian));
f = figure(2);
f.background = -2;
plot(xGaussian, f1Gaussian, 'r--');
plot(xGaussian, f2Gaussian, 'b:');
plot(xGaussian, f3Gaussian, 'k');
// weibull plot
xWeibull = linspace(min(weibull), max(weibull), n);
f1Weibull = zeros(1:n);
for i = 1:n
f1Weibull(i) = size(find(weibull <= xWeibull(i)), 2) / n;
end
f2Weibull = 1 - exp(-(xWeibull ./ beta) .^ alpha);
f = figure(3);
f.background = -2;
plot(xWeibull, f1Weibull, 'r--');
plot(xWeibull, f2Weibull, 'k');
endfunction
|
b50e42db7fc514cc6f38e42c1e16fdac402de25d | 449d555969bfd7befe906877abab098c6e63a0e8 | /3830/CH5/EX5.4/Ex5_4.sce | 24ab7b7b66db896693f042b55517ff2130e25cf3 | [] | 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 | 502 | sce | Ex5_4.sce | // Exa 5.4
clc;
clear;
// Given
// The Lissajous pattern
Y2 = 2.5; // slope of the major axis(in div)
Y1 = 1.2; // slope of the vertical axis(in div)
// Solution
printf(' The phase shift V2 and V1 can be given as sin(Theta) = Y1/Y2 \n -where V1 and V2 are voltages applied to X and Y axis respectively \n ');
Theta = asind(Y1/Y2) ;
printf(' Since, the ellipse is lying in the I and the III quadrant, \n The angle is theta or 360-theta , i.e, %.2f or %.2f \n',Theta,360-Theta);
|
06b48a12df0cd50721ebe26c8eaadb26ad49fabe | 449d555969bfd7befe906877abab098c6e63a0e8 | /104/CH3/EX3.7/3_7.sce | 3a2ab3ee45629238d070799e4db54e2736b703da | [] | 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 | 421 | sce | 3_7.sce | //block diagram is converted to SFG
//mason's gain formula applied to SFG in figure 3-17
//E as output node
syms G1 G2 G3 G4 H1 H2
M1=1
L11=-G1*G2*H1
L21=-G2*G3*H2
L31=-G1*G2*G3
L41=-G1*G4
L51=-G4*H2
delta=1-(L11+L21+L31+L41+L51)
delta1=1-(L21+L51+L11)
x=M1*delta1/delta
disp(x,"E(s)/R(s)=")
//Y as output node
M1=G1*G2*G3
M2=G1*G4
delta1=1
delta2=1
y=(M1*delta1+M2*delta2)/delta
disp(y,"Y(s)/R(s)=") |
fbaccf801bc86daae3a9094fecdb487c3ff09306 | 449d555969bfd7befe906877abab098c6e63a0e8 | /29/CH4/EX4.4.9/exa4_4_9.sce | abff334915483cc904039b44825e888ec108da07 | [] | 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 | 430 | sce | exa4_4_9.sce | //Caption:overall_transfer_function
// example 4.4.9
//page 71
// we have defined parallel and series function which we are going to use here
exec parallel.sce;
exec series.sce;
syms G1 G2 G3 G4 H5 H1 H2;
//shift the SUMMING point locsted after G3 towards left of block G3
a=G2/.H1;
b=G5/G3;
c=parallel(a,b);
c=simple(c);
d=G3/.H2;
e=series(G1,c);
f=series(e,d);
y=series(G4,f);
y=simple (y);
disp(y,"C(s)/R(s)=") |
e7a4160a2bec2f26378d3471230113c5710ef0cc | 449d555969bfd7befe906877abab098c6e63a0e8 | /497/CH11/EX11.1/Chap11_Ex1.sce | 56754f2787ece4b9849b890cef938c8c413b75be | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,063 | sce | Chap11_Ex1.sce | //Kunii D., Levenspiel O., 1991. Fluidization Engineering(II Edition). Butterworth-Heinemann, MA, pp 491
//Chapter-11, Example 1, Page 265
//Title: Fitting Reported Mass Transfer Data with the Bubbling Bed Model
//==========================================================================================================
clear
clc
//INPUT
db=0.37;//Equilibrium bubble size in cm
dp=0.028;//Particle size in cm
rhos=1.06;//Density of solids in g/cc
ephsilonmf=0.5;//Void fraction at minimum fluidization condition
phis=0.4;//Sphericity of solids
gammab=0.005;//Ratio of volume of dispersed solids to that of bubble phase
rhog=1.18E-3;//Density of air in g/cc
myu=1.8E-4;//Viscosity of gas in g/cm s
D=0.065;//Diffusion coefficient of gas in cm^2/s
Sc=2.35;//Schmidt number
etad=1;//Adsorption efficiency factor
y=1;
umf=1.21;//Velocity at minimum fluidization condition in cm/s
ut=69;//Terminal velocity in cm/s
g=980;//Acceleration due to gravity in square cm/s^2
uo=[10;20;30;40;50];//Superficial gas velocity in cm/s
//CALCULATION
n=length(uo);
i=1;
Rept=(dp*ut*rhog)/myu;
Shstar=2+(0.6*(Rept^0.5)*(Sc^(1/3)));//Sherwood no. from Eqn.(1)
Kbc=4.5*(umf/db)+5.85*((D^0.5*g^0.25)/db^(5/4));//Gas interchange coefficient between bubble and cloud from Eqn.(10.27)
ubr=0.711*(g*db)^0.5;//Rise velocity of the bubble
while i<=n
x(i)=(uo(i)-umf)/(ubr*(1-ephsilonmf));//The term delta/(1-epshilonf) after simplification
Shbed(i)=x(i)*[(gammab*Shstar*etad)+((phis*dp^2*y)/(6*D))*Kbc];//Sherwood no. from Eqn.(11)
Rep(i)=(dp*uo(i)*rhog)/myu;//Reynolds of the particle
i=i+1;
end
//OUTPUT
printf('\nThe desired result is the relationship between Shbed and Rep The points gives a straight line of the form y=mx+c');
printf('\nRep');
printf('\t\tShbed');
i=1;
while i<=n
printf('\n%f',Rep(i));
printf('\t%f',Shbed(i));
i=i+1;
end
plot(Rep,Shbed);
xlabel("Rep");
ylabel("Shbed");
//====================================END OF PROGRAM ====================================================== |
8e31f573559290901e970ad1e58076757ba1be6a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1052/CH28/EX28.8/288.sce | e5eea98efc996209ce71f74a7a7525c518241e33 | [] | 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 | 674 | sce | 288.sce | clc;
//Example 28.8
//page no 436
printf("Example 28.8 page no 436\n\n");
//we have to determine the siaze an aerobic digester to treat the solids
m=1000//mass of solid that is generate by municipality,lb
OL=0.2//organic loading,lbcs/ft^3.day
VS=.78//volatile solids
V_ol=m*VS/OL//volume based on organic loading
printf("\n volume based on organic loading V_ol=%f ft^3",V_ol);
t_h=20//detention time hydraulic, days
TS=0.044//percentage solids enterning digester
V_hl=m*t_h/(TS*8.33*7.48)//volume based on hydrulic load
printf("\n volume based on hyraulic load V_hl=%f ft^3",V_hl);
//since V_hl >V_ol,the hdraulic time controls and the design volume is V_hl
|
edaf184cd70c920bb5fd019f16f22d66fd315304 | 089894a36ef33cb3d0f697541716c9b6cd8dcc43 | /NLP_Project/test/tweet/bow/bow.13_6.tst | 9bdc579e5a4200f5700b7e336bdc6391a4a0b44c | [] | no_license | mandar15/NLP_Project | 3142cda82d49ba0ea30b580c46bdd0e0348fe3ec | 1dcb70a199a0f7ab8c72825bfd5b8146e75b7ec2 | refs/heads/master | 2020-05-20T13:36:05.842840 | 2013-07-31T06:53:59 | 2013-07-31T06:53:59 | 6,534,406 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 15,167 | tst | bow.13_6.tst | 13 16:0.06666666666666667 33:0.125 70:0.125 72:0.5 78:0.5 184:0.5 387:0.25 1025:0.5 3803:1.0 4103:1.0 4741:2.0 5280:0.25 5296:0.25 5363:1.0 5386:1.0 6255:0.3333333333333333
13 11:0.16666666666666666 29:0.3333333333333333 70:0.125 547:0.1111111111111111 554:0.2 590:0.3333333333333333 758:0.5 962:0.25 1321:1.0 3649:1.0 5265:0.14285714285714285 5401:0.3333333333333333 5558:1.0
13 33:0.125 43:0.25 311:0.25 660:1.0 672:0.5 2866:1.0 5265:0.2857142857142857 5295:1.0 5389:1.0 5462:1.0 5804:1.0 6051:1.0 6329:1.0 6363:0.5 6862:1.0 6865:1.0 6867:1.0
13 11:0.16666666666666666 43:0.25 102:0.08333333333333333 274:0.14285714285714285 672:0.5 1219:1.0 2866:1.0 3994:1.0 5958:1.0
13 8:0.25 9:0.6666666666666666 32:1.0 43:0.5 90:0.07142857142857142 1522:0.5 3194:0.5 3941:0.5 5389:1.0 5515:1.0 5577:1.0 6126:0.16666666666666666 6255:0.3333333333333333 6363:0.5
13 16:0.06666666666666667 102:0.08333333333333333 160:0.3333333333333333 438:1.0 5280:0.25 5343:0.3333333333333333 5414:0.2 5577:1.0 5762:0.5 6126:0.16666666666666666
13 16:0.06666666666666667 25:1.0 100:1.0 184:0.5 453:0.1 1742:0.14285714285714285 1918:1.0 1929:1.0 3383:1.0 5293:0.5 5296:0.25 5316:2.0 5363:1.0 5462:2.0 5577:1.0 6126:0.16666666666666666 6255:0.3333333333333333 6806:1.0
13 33:0.125 43:0.25 61:0.25 90:0.14285714285714285 130:1.0 364:1.0 547:0.1111111111111111 4741:1.0 5272:0.125 5401:0.3333333333333333 5476:1.0 5577:1.0 5882:1.0 6126:0.16666666666666666
13 31:0.047619047619047616 71:0.3333333333333333 275:0.25 286:0.3333333333333333 311:0.25 489:1.0 547:0.1111111111111111 737:0.5 846:0.3333333333333333 2077:1.0 2246:1.0 2311:1.0 5280:0.5 5316:1.0 5352:2.0 5389:1.0 5390:1.0 5427:1.0 5462:1.0 5641:1.0 5810:1.0 6255:0.3333333333333333 6309:1.0 6390:1.0 6808:2.0
13 25:1.0 42:0.3333333333333333 90:0.07142857142857142 311:0.25 387:0.25 442:0.3333333333333333 453:0.1 966:0.5 983:0.2 1249:0.5 1742:0.14285714285714285 5293:0.5 5348:1.0 5522:0.5 5804:1.0
13 26:1.0 43:0.25 53:0.6666666666666666 364:1.0 547:0.1111111111111111 873:1.0 1478:0.5 5293:0.5 5382:1.0 5401:0.3333333333333333 5448:1.0 5449:1.0 5481:1.0 5561:0.2 5617:1.0 5782:0.3333333333333333 6850:1.0
13 16:0.06666666666666667 274:0.14285714285714285 1916:1.0 3613:1.0 4177:1.0 5291:0.16666666666666666 5296:0.25 5414:0.2 5462:1.0 5489:1.0 6488:1.0 6491:1.0 6620:1.0
13 5577:1.0 5652:1.0 6126:0.16666666666666666
13 11:0.16666666666666666 16:0.06666666666666667 29:0.3333333333333333 5577:1.0 5702:1.0 6126:0.16666666666666666
13 14:1.0 29:0.3333333333333333 53:1.0 130:1.0 160:0.3333333333333333 274:0.2857142857142857 387:0.25 442:0.3333333333333333 556:1.0 873:1.0 1130:0.3333333333333333 1199:1.0 5280:0.5 5445:1.0 5561:0.2 5574:1.0 5577:1.0 5746:1.0 5782:0.3333333333333333 6030:1.0 6126:0.16666666666666666
13 14:0.5 29:0.3333333333333333 53:0.3333333333333333 90:0.07142857142857142 262:0.3333333333333333 453:0.1 1828:1.0 5401:0.3333333333333333 5473:1.0 5577:1.0 5765:1.0 6126:0.16666666666666666 6353:1.0 6589:1.0
13 61:0.25 100:3.0 102:0.08333333333333333 116:1.0 290:0.3333333333333333 453:0.1 609:1.0 723:0.5 1522:0.5 1855:1.0 2115:3.0 3373:0.3333333333333333 5296:0.25 5316:1.0 5328:1.0 5363:1.0 5400:1.0 5427:4.0 5515:1.0 5861:1.0 5890:1.0 6172:0.5 6532:1.0
13 43:0.25 61:0.25 2111:0.5 5293:0.5 5577:1.0 5700:1.0 5980:1.0 6126:0.16666666666666666
13 25:1.0 33:0.125 42:0.3333333333333333 43:0.25 311:0.25 364:2.0 547:0.1111111111111111 721:0.5 966:0.5 1742:0.14285714285714285 1802:0.5 2676:1.0 3194:0.5 4278:0.3333333333333333 5280:0.5 5293:1.0 5522:0.5 5577:1.0 6126:0.16666666666666666 6665:1.0
13 33:0.125 43:0.25 78:0.5 90:0.07142857142857142 274:0.14285714285714285 554:0.2 983:0.2 2283:1.0 2673:1.0 2694:1.0 3414:1.0 5265:0.14285714285714285 5280:0.25 5340:0.5 5427:1.0 5521:0.14285714285714285 5577:1.0 6126:0.16666666666666666 6859:1.0
13 33:0.125 42:0.3333333333333333 387:0.25 453:0.1 983:0.2 5509:1.0 5704:1.0
13 4:0.5 29:0.3333333333333333 364:1.0 449:0.5 890:1.0 1378:1.0 2694:1.0 3826:1.0 5265:0.14285714285714285 6126:0.16666666666666666
13 43:0.25 53:0.3333333333333333 280:1.0 590:0.3333333333333333 846:0.3333333333333333 1626:1.0 3615:0.5 4177:1.0 5265:0.14285714285714285 5291:0.16666666666666666 5577:1.0 6126:0.16666666666666666
13 33:0.125 453:0.1 1057:0.5 4492:1.0 5265:0.14285714285714285 5280:0.25 5291:0.16666666666666666 5577:1.0 6126:0.16666666666666666
13 29:0.3333333333333333 102:0.08333333333333333 590:0.3333333333333333 5265:0.14285714285714285 5280:0.25 5291:0.16666666666666666 5577:1.0 6126:0.16666666666666666
13 29:0.3333333333333333 70:0.125 274:0.14285714285714285 290:0.3333333333333333 442:0.3333333333333333 1249:0.5 3941:0.5 5265:0.2857142857142857 5427:1.0 5577:1.0 6126:0.16666666666666666 6172:0.5
13 160:0.3333333333333333 184:0.5 925:1.0 1773:1.0 5265:0.14285714285714285 5280:0.25 5445:1.0 5577:1.0 5918:1.0 6126:0.16666666666666666
13 14:1.0 16:0.06666666666666667 42:0.3333333333333333 278:0.3333333333333333 547:0.1111111111111111 594:1.0 631:0.5 886:2.0 935:0.25 1155:1.0 1593:1.0 5280:0.5 5293:0.5 5363:1.0 5386:1.0 5415:1.0 5577:1.0 5652:1.0 6491:2.0
13 16:0.06666666666666667 42:0.3333333333333333 52:0.3333333333333333 57:0.08333333333333333 70:0.25 78:0.5 278:0.3333333333333333 547:0.1111111111111111 746:1.0 860:1.0 872:1.0 983:0.2 1773:1.0 2034:1.0 2119:1.0 3039:1.0 5336:0.16666666666666666 5445:1.0 6246:1.0 6352:1.0
13 16:0.06666666666666667 29:0.3333333333333333 53:0.3333333333333333 116:1.0 131:1.0 184:0.5 248:1.0 290:0.3333333333333333 387:0.25 554:0.2 1629:1.0 3615:0.5 3642:1.0 4224:0.5 4255:1.0 4309:1.0 4687:1.0 4741:2.0 5280:0.5 5296:0.25 5574:1.0 6352:1.0
13 11:0.16666666666666666 14:0.5 29:0.3333333333333333 53:0.3333333333333333 90:0.07142857142857142 246:0.125 274:0.14285714285714285 455:0.5 2206:1.0 5076:1.0 5280:0.25 6363:0.5
13 16:0.13333333333333333 29:0.3333333333333333 31:0.047619047619047616 43:0.25 53:0.3333333333333333 90:0.07142857142857142 116:1.0 246:0.125 275:0.25 311:0.25 364:1.0 387:0.25 453:0.1 461:0.3333333333333333 531:0.5 590:0.3333333333333333 780:0.5 2115:1.0 4571:1.0 5280:0.5 5426:0.3333333333333333 5641:1.0 5698:1.0 5918:1.0 6158:1.0
13 16:0.06666666666666667 43:0.25 100:1.0 276:1.0 547:0.1111111111111111 5293:0.5 5294:1.0 5518:0.2 6280:1.0 6601:1.0
13 14:0.5 31:0.047619047619047616 33:0.375 44:0.5 61:0.25 70:0.125 78:0.5 104:1.0 311:0.25 570:0.5 935:0.25 1742:0.14285714285714285 2501:1.0 3010:1.0 3855:1.0 5235:1.0 5280:0.25 5293:0.5 6454:0.5
13 14:0.5 16:0.2 21:0.5 25:1.0 33:0.25 57:0.08333333333333333 64:0.3333333333333333 100:1.0 137:1.0 453:0.2 521:1.0 554:0.2 609:1.0 935:0.25 949:0.3333333333333333 1742:0.14285714285714285 4492:1.0 5280:0.75 5293:0.5 5401:0.3333333333333333 5521:0.14285714285714285 5785:1.0 5971:1.0 6429:1.0 6457:1.0 6605:1.0
13 9:0.3333333333333333 25:1.0 42:0.3333333333333333 90:0.07142857142857142 453:0.1 554:0.2 935:0.25 1742:0.14285714285714285 5280:0.25 5343:0.3333333333333333 5414:0.2 5515:1.0 5577:1.0 6363:0.5
13 14:0.5 33:0.125 61:0.25 100:1.0 105:0.5 275:0.25 367:1.0 453:0.1 5076:1.0 5280:0.5 5401:0.3333333333333333 5427:1.0 5521:0.14285714285714285 5786:1.0 6705:1.0
13 43:0.25 53:0.3333333333333333 364:1.0 547:0.1111111111111111 873:1.0 5401:0.3333333333333333 5448:1.0 5449:1.0 5561:0.2 5617:1.0 5782:0.3333333333333333 5807:1.0 6850:1.0
13 11:0.16666666666666666 33:0.25 43:0.5 70:0.125 78:0.5 90:0.07142857142857142 303:1.0 311:0.25 547:0.1111111111111111 549:0.5 590:0.3333333333333333 925:1.0 1244:1.0 1245:1.0 1704:1.0 3530:1.0 5038:1.0 5400:1.0 6363:0.5
13 14:0.5 16:0.13333333333333333 53:0.3333333333333333 758:0.5 3272:1.0 5280:0.25 5361:1.0 5393:0.5 5491:2.0
13 16:0.06666666666666667 100:1.0 192:1.0 311:0.25 5280:0.25 5452:1.0 5521:0.14285714285714285 5577:1.0 6230:1.0
13 102:0.08333333333333333 547:0.2222222222222222 3479:1.0 3488:1.0 4567:1.0 5293:0.5 5358:0.16666666666666666 6020:1.0 6363:0.5
13 3962:1.0
13 31:0.047619047619047616 5293:0.5 5296:0.25 6363:0.5 6457:1.0
13 31:0.047619047619047616 2972:1.0 5340:0.5 5400:1.0 6363:0.5
13 33:0.125 102:0.08333333333333333 302:1.0 554:0.2 594:1.0 1848:1.0 2070:1.0 4309:1.0 5291:0.16666666666666666 5296:0.25 5391:1.0 5736:1.0 6363:0.5 6454:0.5
13 14:0.5 218:1.0 245:1.0 286:0.3333333333333333 415:0.5 772:1.0 1035:1.0 1130:0.3333333333333333 5265:0.14285714285714285 5289:0.16666666666666666 5293:1.0 5389:1.0 5423:1.0 5696:0.25
13 61:0.25 184:0.5 983:0.2 1725:0.5 2503:1.0 2768:1.0 4250:1.0 5316:1.0 5358:0.16666666666666666 5453:1.0 6363:0.5
13 31:0.047619047619047616 33:0.125 52:0.3333333333333333 53:0.3333333333333333 61:0.25 83:0.5 278:0.3333333333333333 3138:0.5 5285:1.0 5586:0.5
13 53:0.3333333333333333 387:0.25 453:0.1 5291:0.16666666666666666 5293:0.5 5427:1.0 6074:1.0 6750:1.0
13 16:0.06666666666666667 116:1.0 508:1.0 1464:1.0 6840:1.0
13 16:0.06666666666666667 43:0.25 78:0.5 102:0.08333333333333333 364:1.0 547:0.1111111111111111 631:0.5 5272:0.125
13 14:0.5 43:0.25 594:1.0 1802:0.5 2719:1.0 3373:0.3333333333333333 3941:0.5 5280:0.5 5293:0.5 6363:0.5 6741:1.0
13 33:0.125 43:0.25 56:0.2 90:0.14285714285714285 453:0.1 982:1.0 983:0.2 1802:0.5 2115:1.0 3138:0.5 3969:0.3333333333333333 4492:1.0 5293:0.5 5462:1.0 5646:1.0 5704:1.0 6122:1.0 6363:0.5
13 26:1.0 43:0.5 53:0.6666666666666666 57:0.08333333333333333 90:0.14285714285714285 590:0.3333333333333333 723:0.5 1249:0.5 1582:0.5 1802:0.5 2719:1.0 5280:0.5 5293:0.5 5294:1.0 5296:0.25 5299:1.0 5377:1.0 5414:0.2 5541:1.0
13 70:0.125 275:0.25 561:1.0 672:0.5 780:0.5 1117:1.0 1379:1.0 5280:0.25 5293:0.5 5895:1.0 6138:1.0 6539:1.0 6796:1.0
13 16:0.06666666666666667 43:0.25 2364:1.0 5339:0.5 5518:0.2 5969:1.0 6711:1.0
13 43:0.25 90:0.07142857142857142 102:0.08333333333333333 737:0.5 982:1.0 5087:1.0 5414:0.2 5577:1.0 5755:1.0 6363:0.5
13 387:0.25 453:0.1 4309:2.0 5280:0.25 5390:1.0 6177:1.0 6629:1.0
13 16:0.06666666666666667 31:0.047619047619047616 33:0.125 43:0.25 52:0.3333333333333333 180:1.0 387:0.25 561:1.0 949:0.3333333333333333 4686:1.0 5280:0.75 5343:0.3333333333333333 5383:1.0 5393:0.5 5414:0.2 6255:0.3333333333333333
13 78:0.5 453:0.1 1390:1.0 5280:0.25 5291:0.16666666666666666 5296:0.25 5343:0.3333333333333333 5414:0.2 6491:1.0
13 11:0.16666666666666666 90:0.07142857142857142 215:1.0 672:0.5 5265:0.14285714285714285 5280:0.25 5281:1.0 5414:0.2 6454:0.5 6534:1.0 6867:1.0
13 116:2.0 554:0.2 2115:1.0 5280:0.25 5296:0.25 5363:1.0 5814:1.0 6175:1.0 6863:1.0 6864:1.0
13 42:0.3333333333333333 90:0.07142857142857142 846:0.3333333333333333 924:1.0 3373:0.3333333333333333 5577:1.0
13 33:0.125 53:0.3333333333333333 90:0.14285714285714285 180:1.0 1582:0.5 1802:0.5 2564:1.0 4964:1.0 5280:0.75 5689:1.0 6122:1.0 6370:0.5 6447:1.0
13 16:0.06666666666666667 43:0.5 61:0.25 116:1.0 455:0.5 570:0.5 983:0.2 1470:1.0 1528:1.0 1629:1.0 1918:1.0 2364:1.0 5048:1.0 5076:1.0 5280:0.25 5561:0.2 5987:1.0
13 14:0.5 16:0.06666666666666667 33:0.5 44:0.5 60:0.1 61:0.25 78:0.5 268:0.2 275:0.25 311:0.25 439:2.0 453:0.1 561:1.0 772:1.0 949:0.3333333333333333 2398:1.0 2501:1.0 2569:1.0 5038:1.0 5267:1.0 5280:0.25 5293:0.5 5577:1.0 5963:1.0
13 450:1.0 547:0.1111111111111111 802:0.5 1249:0.5 1742:0.14285714285714285 5291:0.16666666666666666 5293:0.5 5542:1.0 6802:1.0
13 9:0.3333333333333333 16:0.06666666666666667 25:1.0 29:0.3333333333333333 44:0.5 61:0.25 455:0.5 547:0.1111111111111111 1742:0.14285714285714285 1779:1.0 2146:1.0 3497:0.5 5076:1.0 5265:0.2857142857142857 5474:1.0 5577:1.0 6609:1.0
13 29:0.3333333333333333 43:0.25 61:0.25 90:0.07142857142857142 144:0.3333333333333333 1245:1.0 1802:0.5 4579:1.0 4741:1.0 5265:0.14285714285714285 5336:0.16666666666666666 5577:1.0
13 16:0.06666666666666667 29:0.3333333333333333 61:0.25 100:1.0 184:0.5 275:0.25 554:0.2 982:1.0 5280:0.25 5515:1.0 5521:0.14285714285714285 5594:1.0 6034:1.0 6126:0.16666666666666666 6168:1.0 6363:0.5
13 14:0.5 16:0.06666666666666667 846:0.3333333333333333 2111:0.5 3950:1.0 5343:0.3333333333333333 5577:1.0
13 11:0.16666666666666666 16:0.13333333333333333 29:0.3333333333333333 160:0.3333333333333333 780:0.5 982:1.0 5515:1.0 5542:1.0 5753:1.0 5772:1.0 6363:0.5
13 9:0.3333333333333333 31:0.047619047619047616 42:0.3333333333333333 268:0.2 272:0.5 442:0.3333333333333333 886:1.0 3615:0.5 5293:0.5 5348:1.0 5358:0.16666666666666666 5389:1.0 5561:0.2 5577:1.0 5696:0.25
13 2095:1.0 2465:1.0
13 33:0.125 163:1.0 2015:1.0 5291:0.16666666666666666 5861:1.0 6286:1.0 6621:1.0
13 16:0.06666666666666667 78:0.5 1844:0.5 2716:1.0 5293:0.5 5377:1.0 5696:0.25 5974:1.0 5982:1.0 6393:1.0 6454:0.5 6619:1.0
13 53:0.3333333333333333 450:1.0 453:0.1 774:1.0 2716:1.0 5291:0.16666666666666666
13 56:0.2 90:0.07142857142857142 160:0.3333333333333333 275:0.25 370:0.5 415:1.0 1601:1.0 3098:1.0 3941:0.5 5514:1.0 5515:1.0 5579:0.3333333333333333
13 33:0.125 43:0.25 949:0.3333333333333333 1009:0.5 5400:1.0 5628:1.0
13 11:0.16666666666666666 16:0.06666666666666667 33:0.125 311:0.25 554:0.2 1629:1.0 3414:1.0 4741:1.0 5377:1.0 5755:1.0 6665:1.0
13 11:0.16666666666666666 33:0.125 43:0.25 90:0.07142857142857142 233:1.0 311:0.25 554:0.2 590:0.3333333333333333 672:0.5 1057:0.5 5280:0.25 5291:0.16666666666666666 5293:0.5 5336:0.16666666666666666 5343:0.3333333333333333 5377:1.0 5400:1.0 5575:1.0 5696:0.25 5755:1.0 6131:1.0 6447:1.0 6860:1.0
13 42:0.3333333333333333 43:0.5 52:0.3333333333333333 102:0.08333333333333333 183:0.25 230:0.5 246:0.125 262:0.3333333333333333 274:0.14285714285714285 547:0.2222222222222222 554:0.2 631:0.5 672:0.5 925:1.0 982:1.0 2111:0.5 3138:1.0 5293:0.5 5445:1.0 5646:1.0 5762:0.5 6087:1.0
13 14:0.5 61:0.25 437:0.5 455:0.5 5291:0.16666666666666666 5343:0.3333333333333333 5393:0.5 5414:0.2
13 14:0.5 16:0.06666666666666667 225:1.0 935:0.25 5414:0.2 5500:1.0 5502:1.0 6278:1.0
13 53:0.3333333333333333 90:0.07142857142857142 208:0.5 387:0.25 886:1.0 5265:0.2857142857142857 5280:0.25 5427:1.0 6235:1.0 6525:1.0
13 26:1.0 32:1.0 53:0.3333333333333333 268:0.2 275:0.25 3912:1.0
13 184:0.5 631:0.5 712:0.3333333333333333 3474:1.0 5265:0.14285714285714285
13 531:0.5 5694:1.0 6310:1.0
13 42:0.3333333333333333 43:0.25 90:0.07142857142857142 275:0.25 590:0.3333333333333333 1663:1.0 5265:0.14285714285714285 5280:0.25 5293:0.5 5476:1.0 5578:1.0 5625:1.0 6172:0.5
13 16:0.06666666666666667 2719:1.0 5305:1.0 5487:1.0 5955:1.0
13 31:0.047619047619047616 43:0.25 53:0.6666666666666666 387:0.25 671:1.0 4786:0.3333333333333333 5268:2.0 5518:0.2
13 11:0.16666666666666666 14:0.5 31:0.047619047619047616 594:1.0 631:0.5 983:0.2 3941:0.5 5265:0.14285714285714285 5295:1.0 5297:1.0 6031:1.0
13 442:0.3333333333333333 626:1.0 966:0.5 1097:1.0 3613:1.0 3941:0.5 5377:1.0 5736:1.0 5947:1.0
13 146:0.5 442:0.3333333333333333 626:1.0 966:0.5 3451:1.0 3941:0.5 5280:0.25 5377:1.0 5679:1.0 5736:1.0 5947:1.0
13 11:0.16666666666666666 43:0.25 2159:1.0 3373:0.3333333333333333 4741:1.0 5265:0.14285714285714285 5632:1.0
13 43:0.25 184:0.5 364:1.0 5265:0.14285714285714285 5272:0.125
13 9:0.3333333333333333 16:0.06666666666666667 43:0.25 53:0.3333333333333333 70:0.125 102:0.08333333333333333 130:1.0 246:0.125 268:0.2 286:0.3333333333333333 311:0.25 846:0.3333333333333333 1162:1.0 1522:0.5 2719:1.0 3285:1.0 3497:0.5 4571:0.5 5294:1.0 5313:1.0 5882:1.0
13 14:0.5 16:0.06666666666666667 53:0.3333333333333333 268:0.2 3912:1.0 5296:0.25
|
4be0e6e1c7c9022061882aed61ccad5b498e91bd | 73614745139719e6a73e2ccc5166289b8a21b2fc | /build/Scilab/Checktype.sci | 0465d7f510ecc7b7c94511297141eac2b961e5ae | [] | no_license | akshaymiterani/fossee_intqpipopt | 06b1f3ea3373a3d04530b38b929b3b224ee89bd0 | 14fa6a66a984c4d08c20417ba4620fbf531bee2f | refs/heads/master | 2021-01-18T19:54:48.796792 | 2016-06-24T08:52:06 | 2016-06-24T08:52:06 | 61,268,791 | 1 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 2,517 | sci | Checktype.sci | // Copyright (C) 2010 - DIGITEO - Michael Baudin
//
// This file must be used under the terms of the GNU LGPL license.
function errmsg = Checktype ( funname , var , varname , ivar , expectedtype )
// Generates an error if the given variable is not of expected type.
//
// Calling Sequence
// errmsg = Checktype ( funname , var , varname , ivar , expectedtype )
//
// Parameters
// funname : a 1 x 1 matrix of strings, the name of the calling function.
// var : a 1 x 1 matrix of valid Scilab data type, the variable
// varname : a 1 x 1 matrix of string, the name of the variable
// ivar : a 1 x 1 matrix of floating point integers, the index of the input argument in the calling sequence
// expectedtype : a n x 1 or 1 x n matrix of strings, the available types for the variable #ivar
// errmsg : a 1 x 1 matrix of strings, the error message. If there was no error, the error message is the empty matrix.
//
// Description
// This function is designed to be used to design functions with
// input arguments with variable type.
// We use the typeof function to compute the type of the variable:
// see help typeof to get the list of all available values for expectedtype.
// Last update : 29/07/2010.
//
// Examples
// // The function takes a string argument.
// function myfunction ( x )
// Checktype ( "myfunction" , x , "x" , 1 , "string" )
// disp("This is a string")
// endfunction
// // Calling sequences which work
// myfunction ( "Scilab" )
// // Calling sequences which generate an error
// myfunction ( 123456 )
//
// // The function takes a string or a matrix of doubles argument.
// function myfunction ( x )
// Checktype ( "myfunction" , x , "x" , 1 , [ "string" "constant" ] )
// if ( typeof(x) == "string" ) then
// disp("This is a matrix of strings")
// else
// disp("This is a matrix of doubles")
// end
// endfunction
// // Calling sequences which work
// myfunction ( "Scilab" )
// myfunction ( 123456 )
// // Calling sequences which generate an error
// myfunction ( uint8(2) )
//
// Authors
// Michael Baudin - 2010 - DIGITEO
//
errmsg = []
if ( and ( typeof ( var ) <> expectedtype ) ) then
strexp = """" + strcat(expectedtype,""" or """) + """"
errmsg = msprintf(gettext("%s: Expected type [%s] for input argument %s at input #%d, but got ""%s"" instead."),funname, strexp, varname , ivar , typeof(var) );
error(errmsg);
end
endfunction
|
f1517bbfbd0299caed1f71297865d13752795edb | 449d555969bfd7befe906877abab098c6e63a0e8 | /1457/CH11/EX11.5/11_5.sce | d12feb847f0fd962a97d5535eb9f132dafb58f7b | [] | 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 | 545 | sce | 11_5.sce | clc
//Initialization of variables
y0=2.17 //ft
q=400/10
g=32.2
d=4.8 //ft
S0=0.0016
//calculations
yc=(q^2 /g)^(1/3)
y2=y0/2 *(-1 + sqrt(1+ 8*q^2 /(g*y0^3)))
y1=d/2 *(-1 + sqrt(1+ 8*q^2/(g*d^3)))
E1=y0 + (q/yc)^2 /(2*g)
E2= y1+ (q/y1)^2 /(2*g)
Vm=0.5*(q/yc + q/y1)
Rm=0.5*(y0/1.434 + y1/1.552)
S=(0.013*Vm/(1.49*Rm^(2/3)))^2
dx=(E1-E2)/(S-S0)
E1d=E2
E2d=d+ (q/4.8)^2 /(2*g)
HPl=62.4*q*10*(E1d-E2d)/550
//results
printf("Power loss = %.2f ",HPl)
//The answer is a bit different from the textbook due to rounding off error
|
f34fba05646d47730f1390e72a3258d269dda64a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1319/CH12/EX12.1/i_1.sce | a20cc62201bac668733fb1a9c14d3d69341a9ea6 | [] | 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 | i_1.sce | // To Compute the number of electrons.
clc;
clear;
I=(25)*(10^-3);
t=(30)*(10^-3);
C=I*t;
// 1C = 6.242*(10^18)
n= 6.242*(10^18);
e_s=C*n;
disp(e_s,'The Number Of Electrons passing through the person is' )
|
0c2d6b4be49312f883ad2e4dec088e07b466550a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2453/CH8/EX8.9/8_9.sce | 83a932788f16f3bfa032d7c0d8bd4eb644fb2442 | [] | 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 | 426 | sce | 8_9.sce | //To calculate the energy band gap
rho_2 = 4.5; //resistivity at 20C
rho_1 = 2; //resistivity at 32C
T1 = 20; //temperature, C
T1 = T1+273; //temp, K
T2 = 32; //temp, C
T2 = T2+273; //temp, K
k = 8.616*10^-5;
dy = log10(rho_2)-log10(rho_1);
dx = (1/T1)-(1/T2);
Eg = 2*k*dy/dx; //energy band gap, eV
printf("energy band gap is %5.3f eV",Eg);
//answer given in the book is wrong
|
23baaedcf5e59dda6eb3edb78e07cad5de286154 | 8881166f518b8c3365fd0a2c0395dbbe4b666a4c | /Examples/Tutorial_AutoExperiment/RTmain.sce | 528b1020cefc026c074433447e547a8aa98c5d40 | [] | no_license | christianausb/OpenRTDynamics | e1e31e61060611a710cf870538969ba5047061f6 | df0c6946622d9a54ab63796337003fb318931b36 | refs/heads/master | 2021-01-21T06:59:51.243998 | 2018-07-13T13:17:29 | 2018-07-13T13:17:29 | 10,501,420 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 11,981 | sce | RTmain.sce | //
//
// TUTORIAL SESSION: Implement the functionality described by the TODO-comments!
//
// At first, however, you may try out this example as it is and observe
// the results.
//
//
// BACKGROUND INFORMATION CONCERNIG THIS EXAMPLE:
//
// In this example, a simulation of a system to control must be implemented. This system
// shall be identified and hence I/O data must be recorded, while the system is excited.
// It is bettor to operate the system only in a given working point (for some reason)
// and hence also the system excitation must be performed close to this point.
// Since the system's initial states typically do not match the ones entered in the working
// point, a robust PI-controller must be used to drive the system to this point in advance
// to the excitation for garthering I/O-data. After the excitation experiment finishes, the
// system must be smoothly brough to a save state.
//
//
//
//
// HINTS:
//
// Use the following blocks:
//
// For 1) and 2): ld_add, ld_ztf, ld_gain, ld_mux, ld_savefile, ld_play_simple
// For 3) and 4): ld_compare01, ld_counter or ld_modcounter, ld_not, ld_cond_overwrite
//
//
// To run the generated controller call the command form a terminal
//
// $ ortdrun
//
// Please ensure that the current directory is the one in which this file is placed.
//
// The name of this program
ProgramName = 'RTmain'; // must be the filename without .sce
thispath = get_absolute_file_path(ProgramName+'.sce');
cd(thispath);
function [sim, u] = ControlSystem(sim, y)
function [sim, outlist, active_state, x_global_kp1, userdata] = state_mainfn(sim, inlist, x_global, state, statename, userdata)
// This function is called multiple times -- once to define each state.
// At runtime, all states will become different nested simulations of
// which only one is active at a time. Switching
// between them represents state changing, thus each simulation
// represents a certain state.
printf("Defining state %s (#%d) ...\n", statename, state);
// demultiplex x_global that is a state variable shared among the different states
[sim, x_global] = ld_demux(sim, 0, vecsize=1, invec=x_global);
// inputs signals to the state machine
y = inlist(1);
// sample data for the output (actuation variable)
[sim, u] = ld_constvec(sim, 0, vec=[0] );
[sim, zero] = ld_const(sim, 0, 0);
//
// The signals "active_state" is used to indicate state switching: A value > 0 means
// the state enumed by "active_state" shall be activated in the next time step.
// A value less or equal to zero causes the statemachine to stay in its currently active
// state
select state
case 1 // state 1
[sim] = ld_printf(sim, 0, zero, "Controller active ", 1);
// The reference
[sim, r] = ld_const(sim, 0, 1);
// compare the input "inlist(1)" to thresholds
// [sim, TargetReached] = ld_compare_01(sim, 0, in=y, thr=1); // a lower level
// the controller
//
// TODO: 1) Implement a PI-Controller, here! Hint H=z/(z-1) is the transfer function of an integrator
//
//[sim, u] = ld_const(sim, 0, 4);
Kp = 0.1; Ki = 0.01;
[sim, e] = ld_add(sim, 0, list(r,y), [1,-1] );
[sim, u1] = ld_gain(sim, 0, e, Kp);
[sim, u2] = ld_ztf(sim, 0, e, Ki * z/(z-1) );
[sim, u] = ld_add(sim, 0, list(u1,u2), [1,1] );
// check if the reference is reached ( r == y )
[sim, TargetReached] = reference_reached(sim, r, y, N=40, eps=0.05);
[sim] = ld_printf(sim, 0, TargetReached, "target reached? ", 1);
// Store the input data into a shared memory
[sim, one] = ld_const(sim, 0, 1);
[sim] = ld_write_global_memory(sim, 0, data=u, index=one, ...
ident_str="ReferenceActuation", datatype=ORTD.DATATYPE_FLOAT, ...
ElementsToWrite=1);
// wait for the input signal to go bejond a threshold
[ sim, active_state ] = ld_const(sim, 0, 0); // by default: no state switch
[ sim, active_state ] = ld_cond_overwrite(sim, 0, in=active_state, condition=TargetReached, setto=2); // go to state "2" if reached is true
case 2 // state 2
// Read the parameters
[sim, readI] = ld_const(sim, 0, 1); // start at index 1
[sim, ReferenceActuation] = ld_read_global_memory(sim, 0, index=readI, ident_str="ReferenceActuation", ...
datatype=ORTD.DATATYPE_FLOAT, 1);
[sim] = ld_printf(sim, 0, ReferenceActuation, "The required actuation in the operation point is ", 1);
//
// TODO: 2) Implement a system identification experiment: Excite the system with a step-wise actuation signal!
// TODO: 2) While the experiment is running, I/O-data must be saved to the hard disk. Use a multiplexer to
// TODO: 2) record y and u into the same file!
// TODO: 2) This state shall be left when the experiment is over.
//
[sim, u_plus] = ld_play_simple(sim, 0, [ zeros(20,1) ; ones(20, 1) ] );
[sim, u] = ld_add(sim, 0, list(ReferenceActuation, u_plus), [1,1] );
// u = ReferenceActuation;
[sim, SignalsToSave] = ld_mux(sim, 0, 2, list(u, y) );
[sim] = ld_savefile(sim, 0, fname="SignalsToSave.dat", source=SignalsToSave, vlen=2); // Example for saving data
// wait 3 simulation steps and then switch to back to state 1
[sim, active_state] = ld_steps(sim, 0, activation_simsteps=[100], values=[-1,3]);
//
case 3 // state 3
[sim] = ld_printf(sim, 0, zero, "Experiment finished ", 1);
//
// TODO: 3) Reduce the actuation variable u from ReferenceActuation to zero in
// TODO: 3) steps of size 0.05 for every sample. Note that this may take a variable number of sampling
// TODO: 3) steps to perform!
// TODO: 4) If u == 0 is reached, the system should go to a fourth state (pause), that you inserted youself
// TODO: 4) into this state machine to pause operation. The fourth state shall restart the whole procedure
// TODO: 4) starting at "state 1" when 6 seconds have passed.
//
u = zero;
// wait 3 simulation steps and then switch to back to state 1
[sim, active_state] = ld_steps(sim, 0, activation_simsteps=[3], values=[-1,3]);
//
// TODO: 4) Insert state pause by adding "case 4" and the required changes below in this file.
//
end
// multiplex the new global states
[sim, x_global_kp1] = ld_mux(sim, 0, vecsize=1, inlist=x_global);
// the user defined output signals of this nested simulation
outlist = list(u);
endfunction
// initialise a global memory for storing the actuation variable in the working point
[sim] = ld_global_memory(sim, 0, ident_str="ReferenceActuation", ...
datatype=ORTD.DATATYPE_FLOAT, len=1, ...
initial_data=[0], ...
visibility='global', useMutex=1);
// set-up three states represented by three nested simulations
[sim, outlist, x_global, active_state,userdata] = ld_statemachine(sim, 0, ...
inlist=list(y), ..
insizes=[1], outsizes=[1], ...
intypes=[ORTD.DATATYPE_FLOAT ], outtypes=[ORTD.DATATYPE_FLOAT], ...
nested_fn=state_mainfn, Nstates=3, state_names_list=list("elevating", "measuring", "exp_finished"), ...
inittial_state=1, x0_global=[0], userdata=list() ); // TODO: 4) insert a state "pause"
u = outlist(1);
endfunction
// The main real-time thread
function [sim, outlist, userdata] = Thread_MainRT(sim, inlist, userdata)
// This will run in a thread
[sim, Tpause] = ld_const(sim, 0, 1/27); // The sampling time that is constant at 27 Hz in this example
[sim, out] = ld_ClockSync(sim, 0, in=Tpause); // synchronise this simulation
// feedback of the actuation variable without the disturbing_signal
[sim, y_fb] = libdyn_new_feedback(sim);
[sim, y] = ld_gain(sim, 0, y_fb, 1);
// controller
[sim, u] = ControlSystem(sim, y);
// print the controller output
[sim] = ld_printf(sim, 0, u, "u ", 1);
// Simulation of a system to control
z = poly(0, 'z');
[sim,y_kp1] = ld_ztf(sim, 0, u, 0.25*(1-0.97)/(z-0.97) );
// print the systems output
[sim] = ld_printf(sim, 0, y, "y ", 1);
[sim, bar_] = ld_gain(sim, 0, y, 50);
[sim] = ld_printfbar(sim, 0, in=bar_, str="y ");
// Feed back u
[sim] = libdyn_close_loop(sim, y_kp1, y_fb);
outlist = list();
endfunction
// Helper function
function [sim, reached] = reference_reached(sim, r, y, N, eps)
// check wheter the controller reached the constant reference
[sim, e] = ld_add(sim, 0, list(r,y), [1,-1] );
[sim, i1] = ld_ztf(sim, 0, e, 1/(3+1) * (1 + z^(-1) + z^(-2) + z^(-3) ) );
[sim, i3] = ld_abs(sim, 0, i1);
[sim, i4] = ld_compare_01(sim, 0, in=i3, thr=eps);
[sim, i5] = ld_not(sim, 0, in=i4);
[sim, resetto] = ld_const(sim, 0, 0);
[sim, count] = ld_counter(sim, 0, count=i5, reset=i4, resetto, initial=0);
[sim, reached] = ld_compare_01(sim, 0, in=count, thr=N);
endfunction
// This is the main top level schematic
function [sim, outlist] = schematic_fn(sim, inlist)
// Create a thread that runs the control system
ThreadPrioStruct.prio1=ORTD.ORTD_RT_NORMALTASK; // or ORTD.ORTD_RT_REALTIMETASK
ThreadPrioStruct.prio2=0; // for ORTD.ORTD_RT_REALTIMETASK: 1-99 as described in man sched_setscheduler
// for ORTD.ORTD_RT_NORMALTASK this is the nice-value (higher value means less priority)
ThreadPrioStruct.cpu = -1; // The CPU on which the thread will run; -1 dynamically assigns to a CPU,
// counting of the CPUs starts at 0
[sim, StartThread] = ld_initimpuls(sim, 0); // triggers your computation only once
[sim, outlist, computation_finished] = ld_async_simulation(sim, ev, ...
inlist=list(), ...
insizes=[], outsizes=[], ...
intypes=[], outtypes=[], ...
nested_fn = Thread_MainRT, ...
TriggerSignal=StartThread, name="MainRealtimeThread", ...
ThreadPrioStruct, userdata=list() );
// NOTE: for rt_preempt real-time you can use e.g. the following parameters:
//
// // Create a RT thread on CPU 0:
// ThreadPrioStruct.prio1=ORTD.ORTD_RT_REALTIMETASK; // rt_preempt FIFO scheduler
// ThreadPrioStruct.prio2=50; // Highest priority
// ThreadPrioStruct.cpu = 0; // CPU 0
// output of schematic (empty)
outlist = list();
endfunction
//
// Set-up (no detailed understanding necessary)
//
thispath = get_absolute_file_path(ProgramName+'.sce');
cd(thispath);
z = poly(0,'z');
ev = [0];
// set-up schematic by calling the user defined function "schematic_fn"
insizes = []; outsizes=[];
[sim_container_irpar, sim]=libdyn_setup_schematic(schematic_fn, insizes, outsizes);
// pack the simulation into a irpar container
parlist = new_irparam_set();
parlist = new_irparam_container(parlist, sim_container_irpar, 901); // pack simulations into irpar container with id = 901
par = combine_irparam(parlist); // complete irparam set
save_irparam(par, ProgramName+'.ipar', ProgramName+'.rpar'); // Save the schematic to disk
// clear
par.ipar = []; par.rpar = [];
|
99c2316f7549b054ed8bfe628fc9f236eb156f13 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2006/CH6/EX6.15/ex6_15.sce | 4965921d73dff0ee24407008fae8aa3fbfd10555 | [] | 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,053 | sce | ex6_15.sce | clc;
m=1; // Mass of water in kg
T1=300; // Temperature of water in kelvin
C=4.1868; // Specific heat in kJ/kg K
// (a). Heat Transfer
T2=500; // Temperature of heat reservoir in kelvin
Q=m*C*(T2-T1); // Heat transfer
del_Swater=m*C*log (T2/T1); // Entropy change of water
del_Sreservoir=-Q/T2; // Entropy change of reservoir
del_Suniverse=del_Swater+del_Sreservoir; // Entropy change of universe
disp ("kJ/K",del_Suniverse,"Entropy change of universe =","(a).Heat Transfer");
// (b).Heat Transfer in each reservoir
T2=400; // Temperature of intermediate reservoir in kelvin
T3=500; // Temperature of heat reservoir in kelvin
Q=m*C*(T3-T2); // Heat transfer
del_Swater=m*C*(log (T2/T1)+log (T3/T2)); // Entropy change of water
del_SreservoirI=-Q/T2; // Entropy change of reservoir I
del_SreservoirII=-Q/T3; // Entropy change of reservoir II
del_Suniverse=del_Swater+del_SreservoirI+del_SreservoirII; // Entropy change of universe
disp ("kJ/K",del_Suniverse,"Entropy change of universe =","(b).Heat Transfer in each reservoir");
|
0de8c4059241839674b059904866dcc28a836f3b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2417/CH1/EX1.11/Ex1_11.sce | f555d7f6bc50dbd00f2122ca47673c10fb002c6a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 588 | sce | Ex1_11.sce | //scilab 5.4.1
clear;
clc;
printf("\t\t\tProblem Number 1.11\n\n\n");
// Chapter 1: Fundamental Concepts
// Problem 1.11 (page no. 35)
// Solution
//Given
Patm=30.0 //in. //pressure of mercury at standard temperature
Vacuum=26.5 //in. //vaccum pressure
Pabs=Patm-Vacuum; //Absolute pressure of mercury //in.
// (3.5 inch* (ft/12 inch) * (13.6*62.4)LBf/ft^3 * kg/2.2 LBf * 9.806 N/kg)/((12 inch^2/ft^2) * (0.0254 m/inch)^2)
p=(3.5*(1/12)*13.6*62.4*(1/2.2)*9.806)/(12^2*0.0254^2*1000); //kPa //Absolute pressure in psia
printf("Absolute pressure of mercury is %f kPa",p)
|
7bbfb2df26b4e89533bc1419e3f697a476282831 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1208/CH1/EX1.17/Exa17.sce | 8d94435c352d16f1841d426d782e4e51cd5b9010 | [] | 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 | Exa17.sce | //Exa17
clc;
clear;
close;
//given data :
Vo=200000;//in Rs
r=8;//in % per annum
i=r/100;
n=5;//in years
//Formula for size of installment can be calculated by Vo=(A*((1+i)^n-1))/(i*(1+i)^n);
A=(Vo*(i*(1+i)^n))/((1+i)^n-1);
disp(A,"Required value(in Rs) : ")
//Note: answer given in the book is not accurate |
b0e94219f087bd1e77b5216ac27a8adf41479806 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3683/CH7/EX7.2/Ex7_2.sce | 570bb956a5c05f99bd12c399f7669a86bb9de6d2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,118 | sce | Ex7_2.sce | sigma_cbc=5//in MPa
sigma_st=230//in MPa
MF=1.4//modification factor
//let a be span to depth ratio
l=4.5//span, in m
a=MF*20
D=l*1000/a//in mm
D=160//approximately, in mm
//to calculate loading
self_weight=25*(D/10^3)//in kN/m
finish=1//in kN/m
partitions=1//in kN/m
live_load=4//in kN/m
W=self_weight+finish+partitions+live_load//total load, in kN/m
lef=l+D/1000//in m
M=W*lef^2/8//in kN-m
//check for depth
d=(M*10^6/(0.9*sigma_cbc/2*0.29*1000))^0.5//in mm
//assume 12 mm dia bars
D=d+12/2+15//in mm
//the calculated value of D is more than its assumed value
D=1.1*D//revised value of depth, in mm
D=250//assume, in mm
self_weight=25*(D/10^3)//in kN/m
finish=1//in kN/m
partitions=1//in kN/m
live_load=4//in kN/m
W=self_weight+finish+partitions+live_load//total load, in kN/m
lef=l+D/1000//in m
M=W*lef^2/8//in kN-m
//check for depth
d=round((M*10^6/(0.9*sigma_cbc/2*0.29*1000))^0.5)//in mm
D=d+12/2+15//in mm
D=250//approximately, in mm
Ast=round(M*10^6/(sigma_st*0.9*d))//in sq mm
s1=1000*0.785*12^2/Ast//which is less than 3d= 690 mm
s1=155//approximately, in mm
pt=Ast/1000/d*100//in %
Ads=0.12/100*1000*D//distribution steel, in sq mm
//assume 8 mm dia bars
s2=1000*0.785*8^2/Ads//which is less than 5d= 1150 mm
s2=165//approximately, in mm
//to calculate development length
w=0.23//support width, in m
l=l+w//in m
R=W*l/2//reaction at support, in kN
M1=R*w/2-W*w^2/2//bending moment at the face of wall, in kN-m
sigma_st=M1*10^6/(Ast/2*0.9*d)//in MPa
Tbd=0.6//in MPa
Ld=12*sigma_st/(4*Tbd)//in mm
La=w*1000-25//available length for bar over wall, which is greater than development length
//check for shear
V=W*lef/2//in kN
Tv=V*10^3/(1000*d)//in MPa
Tc=0.2212//permissible shear in concrete for p=0.315 and M15, in MPa
Tc=1.15*Tc//permissible shear for slabs, in MPa
//Tc>Tv; hence no shear reinforcement is required
mprintf("Summary of design\nSlab thickness=%d mm\nCover=15 mm\nMain steel = 12 dia @ %d mm c/c\nAlternate bars are bent up at 45-degree at support at a distance of l/7 from support face\nDistribution steel=8 dia @ %d mm c/c",D,s1,s2)
|
ea58477681a0b6e77e964a516ac2eb199bd2db07 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3020/CH11/EX11.3/ex11_3.sce | 6afb08b88d284299dababb5f54baadb62c22a01a | [] | 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 | ex11_3.sce | clc;
clear all;
T = 523; // Temperature in kelvin
c = 3e8;// Velocity of air
h = 6.626e-34; // Plancks constant
k = 1.38e-23; // Boltzmanns constant
e = 1.602e-19; // Charge of an electron
lambda = 5900e-10; // Wavelength of light in meters
r = exp(((h*c)/(k*T*lambda))); // Temporary variable
t = (1/(r-1)); //t =(Stimulated emission/Spontaneous emission)
disp('',t,'Ratio between stimulated emission and spontaneous emission')
|
f9de045cc54f898df99305051c33e795d20494bd | 449d555969bfd7befe906877abab098c6e63a0e8 | /752/CH19/EX19.16.1/19_16_1.sce | e2cbd088ffa417e8521a8a55debd6d09cd49558b | [] | 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 | 246 | sce | 19_16_1.sce | clc;
//page no
//problem no 19.16.1
//Determination of overall C/N
CNo_dB_U=88;CNo_dB_D=78;
NoC_U=10^(-CNo_dB_U/10);
NoC_D=10^(-CNo_dB_D/10);
NoC=NoC_U+NoC_D;
CNo_dB=10*log10(1/NoC);
disp(CNo_dB,'The overall carrier to noise ratio is'); |
05176f3c7992481787f101757bcf96ddd89337b0 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set5/s_Electrical_And_Electronic_Principles_And_Technology_J._Bird_1529.zip/Electrical_And_Electronic_Principles_And_Technology_J._Bird_1529/CH9/EX9.19/9_19.sce | 4511e4050158dfc8af8d765c74e3fafd89c60e8a | [] | 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 | 276 | sce | 9_19.sce | errcatch(-1,"stop");mode(2);//Chapter 9, Problem 19
;
E=0.72; //induced emf
M=0.018; //mutual inductance
D=E/M; //calculating rate of change of current
printf("Rate of change of current = %d A/s", D);
exit();
|
9167d6db38aa9ede8a93cf1ff509be09e90af341 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3772/CH3/EX3.14/Ex3_14.sce | c6eb85f329a4bc86f6dff1203cf1f2dcd70515f1 | [] | 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 | 463 | sce | Ex3_14.sce | // Problem 3.14,Page no.63
clc;clear;
close;
A=1600 //mm**2 //Area of the Bar
P=480*10**3 //N //Load
dell_L=0.4 //mm //Contraction of metal bar
L=200 //mm //Length of metal bar
sigma_t=0.04 //mm //Guage Length
t=40
//Calculations
sigma_L=dell_L*L**-1
E=((P*L)*(A*dell_L)**-1*10**-3) //N/mm**2 //Young's Modulus
m=t*sigma_t**-1*sigma_L
//Result
printf("The value of Young''s Modulus is %.2f N/mm^2",E)
printf("\n The value of Poissoin''s ratio is %.2f",m)
|
a4e601d5c97fcb67257a3cb0d62961aca322b387 | 449d555969bfd7befe906877abab098c6e63a0e8 | /608/CH10/EX10.09/10_09.sce | 6c7c70aba8dbd1aa1f817f92f20f9bb818553e60 | [] | 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 | 756 | sce | 10_09.sce | //Problem 10.09: (For the c.r.o. display of a pulse waveform shown in Figure 10.16 the ‘time/cm’ switch is on 50 ms/cm and the ‘volts/cm’ switch is on 0.2 V/cm. Determine (a) the periodic time, (b) the frequency, (c) the magnitude of the pulse voltage.
//(In Figures 10.15 to 10.18 assume that the squares shown are 1 cm by 1 cm)
//initializing the variables:
tc = 50E-3; // in s/cm
Vc = 0.2; // in V/cm
w = 3.5; // in cm ( width of one complete cycle )
h = 3.4; // in cm ( peak-to-peak height of the display )
//calculation:
T = w*tc
f = 1/T
ptpv = h*Vc
printf("\n\n Result \n\n")
printf("\n (a)the periodic time, T = %.2E sec ",T)
printf("\n (b)Frequency, f = %.2f Hz",f)
printf("\n (c)the peak-to-peak voltage = %.2f V",ptpv) |
5a8131a2f6c0fad0a84f6ab51912279eb4752329 | 9a4f02797ab8eecfe1394e2d276ac86379bb9824 | /symphony-master/demos/fminunc.dem.sce | 3ead9b555bed798b2d07a4add04b3d62517f6402 | [] | no_license | RVidyadhar/Scilab_FOSSEE_Project | b686bfa6127df08ef47bfa430580be7779d9e2c5 | 7656e5089f307d46eacf77be8991d82125643365 | refs/heads/master | 2021-01-20T16:34:39.597133 | 2015-12-23T04:34:27 | 2015-12-23T04:34:27 | 48,269,308 | 0 | 0 | null | 2015-12-19T05:10:17 | 2015-12-19T05:10:17 | null | UTF-8 | Scilab | false | false | 1,052 | sce | fminunc.dem.sce | mode(1)
//
// Demo of fminunc.sci
//
//Find x in R^2 such that it minimizes rosenbrock function
//f = 100*(x(2) - x(1)^2)^2 + (1-x(1))^2
halt() // Press return to continue
function y= _f(x)
y= 100*(x(2) - x(1)^2)^2 + (1-x(1))^2;
endfunction
function y= _g(x)
y= [-400*(x(2)-x(1)^2)*x(1)-2*(1-x(1)), 200*(x(2)-x(1)^2)]; //Row Vector is expected for gradient function
endfunction
function y= _h(x)
y= [1200*x(1)^2, -400*x(1);-400*x(1), 200 ]; //symmentric Matrix is expected for hessian function
endfunction
x0=[2,7];
options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "ON", "Hessian", "ON");
[xopt,fopt,exitflag,output,gradient,hessian]=fminunc(_f,x0,options,_g,_h)
halt() // Press return to continue
halt() // Press return to continue
//Find x in R^2 such that the below function is minimum
//f = x(1)^2 + x(2)^2
halt() // Press return to continue
function y= _f(x)
y= x(1)^2 + x(2)^2;
endfunction
x0=[2,1];
[xopt,fopt]=fminunc(_f,x0)
halt() // Press return to continue
//========= E N D === O F === D E M O =========//
|
6dc21a79b10e570ee89e80c4f4aaf8b00f593e2a | 449d555969bfd7befe906877abab098c6e63a0e8 | /548/DEPENDENCIES/2_4data.sci | c0f10d6bc4d7bcfb9994ff0ecb8fe28a3c9ba545 | [] | 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 | 110 | sci | 2_4data.sci | //Example 2.4
P=1.04*10^4//unit N/m^2
R=287;//gas constant.of air(j/kg.k)
T=362;//unit K
density=P/(R*T)
|
5e4b354ecc77aa6563f1e5120f44c9ce76bd4b0a | 4bbc2bd7e905b75d38d36d8eefdf3e34ba805727 | /ee_scicoslab/scicos_flex/dspic/Flex-Roller/loader.sce | 410e4cc32dc6ce77e366986cb6ddced39e499153 | [] | no_license | mannychang/erika2_Scicos-FLEX | 397be88001bdef59c0515652a365dbd645d60240 | 12bb5aa162fa6b6fd6601e0dacc972d7b5f508ba | refs/heads/master | 2021-02-08T17:01:20.857172 | 2012-07-10T12:18:28 | 2012-07-10T12:18:28 | 244,174,890 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 223 | sce | loader.sce | // generated by builder.sce: Please do not edit this file
// ------------------------------------------------------
roller_link_num = link(get_absolute_file_path('loader.sce')+'RollerGui.dll',['EvidenceRollers'],'c');
|
f677a88b4ac6fcc7ff501c01b85c81d7cb81a8d0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2882/CH11/EX11.3/Ex11_3.sce | 88adbfd57224e071b08f8f3d3df60f855af44be7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 317 | sce | Ex11_3.sce | //Tested on Windows 7 Ultimate 32-bit
//Chapter 11 Oscillators and Multivibrators Pg no. 359
clear;
clc;
//Given
f=3.8D6;//frequency of oscillations in hertz
L=0.2;//equivalent inductance in henry
R=6000;//series resistance in ohms
//Solution
Q=2*%pi*f*L/R;//quality factor Q
printf("Q = %d\n",Q);
|
0fc77e0274228b98c791abdeb1a0f55e805193b9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3636/CH8/EX8.3/Ex8_3.sce | 66d1f929b5f639be53aa7f3ea3afb6d42e8b2ea3 | [] | 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 | 301 | sce | Ex8_3.sce | clc;
clear;
alpha_F=0.98
alpha_R=0.18
IC=2 //current in mA
IB=0.06 //current in mA
Const=0.026 //constant for kT/e in V
//Calculation
VCE=Const*log((((IC*(1-alpha_R))+IB)/((alpha_F*IB)-((1-alpha_F)*IC)))*(alpha_F/alpha_R))
mprintf("Collector-emitter voltage at saturation= %1.2f V",VCE)
|
d5c48cb8497275fb41b12bb01b5d756323a2b48d | 449d555969bfd7befe906877abab098c6e63a0e8 | /3809/CH2/EX2.6/EX2_6.sce | 55424cad8e6247c163ae994cea827a6a664ede32 | [] | 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 | 527 | sce | EX2_6.sce | //Chapter 2, Example 2.6
clc
//Initialisation
i2=1*10^-3 //full scale deflection current in ampere
v=50 //full scale deflection voltage
r=25 //resistance in ohm
//Calculation
i3=1/i2 //reduction of the sensitivity of the meter
R=v/i2 //Resistance in ohm
rse=R-r //Resistance in ohm
//Result
printf("Series Resistance, Rse = %.3f Kohm\n",rse/1000)
printf(" \t\t\t≈ %.1f Kohm",rse/1000)
|
afdc8eed587f70ca1849207e6f5c14012a2e2a25 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3507/CH10/EX10.3/Ex10_3.sce | b41c29bd1acc2a51e8d1dcecb562d3d265726f5f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 258 | sce | Ex10_3.sce | //chapter10
//example10.3
//page187
//from graph, we see that for zero illumination, the reverse current i.e. dark current is 50 micro ampere
Ir=50d-6 // A
Vr=10 // V
Rr=Vr/Ir
printf("dark resistance = %.3f ohm or %.3f kilo ohm",Rr,Rr/1000)
|
da035fb3e8d34e98373b858c99820ac416e75ab1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1514/CH2/EX2.5/ch2_2_5.sce | 5cdc414e5e85dc358e860b01ea776093213a370e | [] | 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 | 604 | sce | ch2_2_5.sce | //chapter 2
//example 2.5
//page 40
clear;
clc ;
//given
VF=0.7;//forward voltage drop across diode for temparature range 0-65 degree celcius
deltaT1=40;//change in temperature for T=65 in degree celcius
deltaVF=-1.8/10^3; //change in forward voltage drop per degree celcius
//finding required VF
VFmin=VF+deltaVF*deltaT1; //minimum forward voltage drop in volts
deltaT2=-25; //change in temperature for T=0 in degree celcius
VFmax=VF+deltaVF*deltaT2; //maximum forward voltage drop in volts
printf('Minimum and maximum values of forward voltage drop are %.3f V & %.3f V.',VFmin,VFmax)
|
e9507439ef29d2e16c4bf65eef5027f087ea9172 | 29d0a9144c1926fef6ef23493d08728073758805 | /cfg/intop2-zzz.tst | f25bce240187f5b4a5afc6aa49339a6bf1decb6b | [] | no_license | mikma/freeRouter | 47c1516edf6fc5c75cc6ce626cd7ce024147d5a5 | 96106c23a7144558ffb7fb831297194327ee3ef1 | refs/heads/master | 2023-06-08T06:51:14.563806 | 2020-01-22T14:56:13 | 2020-01-22T14:56:13 | 235,618,523 | 0 | 0 | null | 2020-01-22T16:46:19 | 2020-01-22T16:46:18 | null | UTF-8 | Scilab | false | false | 324 | tst | intop2-zzz.tst | description interop2: config wiper
addrouter r1
int eth1 eth 0000.0000.1111 $rem1$
!
vrf def v1
rd 1:1
exit
int eth1
vrf for v1
ipv4 addr 1.1.1.1 255.255.255.0
ipv6 addr 1234::1 ffff::
exit
!
addremote r2
int eth1 eth 0000.0000.2222 $rem1$
!
root
commit
!asdf
!asdf
!asdf
!asdf
!asdf
!asdf
!asdf
!asdf
!asdf
!asdf
!
|
9ae83855babc4cc58108d470e3ab8fb0dbb0f5aa | 6e257f133dd8984b578f3c9fd3f269eabc0750be | /ScilabFromTheoryToPractice/CreatingPlots/testxfpoly.sce | 43ef8d5f56c746692cfa4dd8d598cfd0ce6162fd | [] | no_license | markusmorawitz77/Scilab | 902ef1b9f356dd38ea2dbadc892fe50d32b44bd0 | 7c98963a7d80915f66a3231a2235010e879049aa | refs/heads/master | 2021-01-19T23:53:52.068010 | 2017-04-22T12:39:21 | 2017-04-22T12:39:21 | 89,051,705 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 616 | sce | testxfpoly.sce | clf;
plot2d(0,0,0,rect=[0,0,10,10],frameflag=3)
xgrid(4),
// pentagon vertices
t=[0:4]*2*%pi/5;
x=2*cos(t);
y=2*sin(t);
//1st pentagon centered at (2.5,2.5)
xfpoly(2.5+x,2.5+y) // black background
E=gce();E.foreground=5; // red edge
//2nd pentagon centered at (2.5,7.5)
xfpoly(2.5+x,7.5+y,5) // red background
E=gce();E.line_style=3; // edge is a black dotted line
//3rd pentagon centered at (7.5,2.5)
xfpoly(7.5+x,2.5+y,-2) // polygon vertices
E=gce();E.mark_style=2; // dotted line
//4th pentagon centered at (7.5,7.5)
xfpoly(7.5+x,7.5+y,0) // 0=open polygon
E=gce();E.background=3; // green background
|
4dd426ea1e079cd8fa90330b61bd4c702eba75bd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2339/CH3/EX3.1.1/Ex3_1.sce | bf26befad32302c0aee0b933b3ebd268166d145b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 595 | sce | Ex3_1.sce | clc
clear
//Declaring Values
V=3; //Volume in m^3
P1=2500; //Pressure in kilobar
P2=1500;
T2=21+273; //Temperature in Kelvin
T1=(T2*P1)/P2;
Cp=1.005;
Cv=0.718;
R=Cp-Cv; //Universal Gas Constant
m=(P1*V)/(R*T1); //Calculating mass
H=m*Cp*(T2-T1);
U=m*Cv*(T2-T1);
Q=U; //Since Constant Volume Process: Work Done=0
//Displaying Results
printf('Change in Enthalpy: %5.2f kJ',H);
printf('\n');
printf('Change in Internal Energy: %5.2f kJ',U);
printf('\n');
printf('Heat Transfer: %4.2f kJ',Q);
printf('\n')
printf('As Answer is negative, system rejects heat');
|
c0c062ee45c14e7f1a97286361491cbd16f38d61 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2333/CH4/EX4.4/4.sce | 6cbbb5a5fe6f18b97c76265bf503bf4b4b38d9ef | [] | 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 | 507 | sce | 4.sce | clc
// Given that
mu_w = 1.33 // refractive index of water
mu_g = 1.54 // refractive index of glass
// Sample Problem 4 on page no. 3.24
printf("\n # PROBLEM 4 # \n")
Ip_1 = atan(mu_g / mu_w) * (180 / %pi)//calculation for polarizing angle for water
Ip_2 = atan(mu_w / mu_g) * (180 / %pi) // calculation for polarizing angle for glass
printf("Standard formula used \n mu=tan(Ip)\n")
printf("\n Polarizing angle for water to glass = %f degree,\n Polarizing angle for glass to water = %f degree",Ip_1,Ip_2)
|
935780b5034dd0ab37a903f425bc36ce964781e3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1322/CH19/EX19.6/167ex3.sce | 253d2e24dea8d64f19ae5fb791b91a3c1fac81aa | [] | 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 | 122 | sce | 167ex3.sce |
//5th root of 721.8
clear;
clc;
close;
//log(a)^n=n*log(a)
p=721.8;n=1/5;
logx=n*log10(p);
format(6)
x=10^logx
|
b0f8ae11c0d6c33190c3d71139ce6673c92f3e6a | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set5/s_Electrical_Machines_M._V._Despande_833.zip/Electrical_Machines_M._V._Despande_833/CH4/EX4.1/Ex4_1.sce | b115df54df3128c37e4accace4802000146b6053 | [] | 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 | 1,233 | sce | Ex4_1.sce | errcatch(-1,"stop");mode(2);//Caption: Find (a)Voltage per turn (b)Cross sectional area of core (c)Cross sectional area of conductor for l.v (d)Cross sectional area of conductor for h.v (e)Number of turns in l.v (f)Number of turns in h.v (g)Window area (h)Yoke and approx. frame size (i)Copper used in windings
//Exa:4.1
;
;
P=5000//Power supplied to transformer(in VA)
f=50//frequency(in Hertz)
V_1=415//Primary side voltage(in volts)
V_2=240//Secondary side voltage(in volts)
k=0.75
B=1.6//Maximum flux density(in weber/m^2)
i_d=2//Current density(in A/mm^2)
k_w=0.3
E=k*sqrt(P/1000)
disp(E,'(a)Voltage per turn(in volts)=')
A_1=(E*(10^6))/(4.44*B*f)
disp(A_1,'(b)Cross sectional area of core(in mm^2)=')
i_2=P/V_2
A_2=i_2/i_d
disp(A_2,'(c)Cross sectional area of conductor for low voltage side(in mm^2)=')
i_1=P/V_1
A_1=i_1/i_d
disp(A_1,'(d)Cross sectional area of conductor for high voltage side(in mm^2)=')
n_2=V_2/E
disp(n_2,'(e)Number of turns in low voltage winding=')
n_1=V_1/E
disp(n_1,'(f)Number of turns in high voltage winding=')
A_w=(P*(10^(9))/1000)/(2.22*A_1*k_w*i_d*B)
disp(A_w,'(g)Window area(in mm^2)=')
cu=(A_1*n_1)+(A_2*n_2)
disp(cu,'(i)Copper used in windings(in mm^2)=')
exit();
|
afda8b3b31a64a78ba88c4f324efaeb8410bf4aa | 449d555969bfd7befe906877abab098c6e63a0e8 | /2234/CH2/EX2.13/ex2_13.sce | 3de4f01a13c245a24ca4c2a0d88bd6ce91c256e8 | [] | 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 | 434 | sce | ex2_13.sce | clc;
i=10; //current
r=0.005; //radius in metre
h1=(i)/(4*2*(%pi)*r); //at half radius H is (1/4)th
disp(h1,"H field intensity at one half of radius in A/metre = "); //displaying result
h2=(i)/(2*(%pi)*0.01); //calculating H at surface
disp(h2,"H field intensity at surface in A/metre = "); //displaying result
disp("H field intensity is proportional to radius.Therefore, it is zero at the center."); //displaying result |
f82ec2b1b2668b41e47dbfdab777210f7ae845e9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1634/CH1/EX1.64/example1_64.sce | e58c86e29debdfe707d08775dd83f42c8729c892 | [] | 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 | 847 | sce | example1_64.sce |
//exapple 1.64
clc; funcprot(0);
// Initialization of Variable
pi=3.14159;
RA=1+41/60+48.64/3600;
lat=48+36/60+40/3600;//latitude
delta=88+58/60+28.26/3600;//declination of polaris
GMM=16+48/60+20.86/3600;
longP=7+20/60;//longitude of place P
i1=51/3600;//error due to barometer
i2=1/3600;//error due to barometer
i3=-1/3600;//error due to temp
lat=lat-i1+i2+i3;
delT=longP/15;
i4=delT*9.8565/3600;
lst=GMM+i4;
LMT=20+24/60+50/3600;
i6=9.8565/3600*LMT;//error in LMT
LST=LMT+i6+lst-24;
H=LST-RA;//hour angle
H=H*15;
lat=lat-(90-delta)*cos(H*pi/180)+.5*sin(1/3600*pi/180)*(90-delta)^2*(sin(H*pi/180))^2*tan(lat*pi/180);
disp("latitude of star observed:");
a=modulo(lat*3600,60);
printf("seconds %.2f",a);
b=modulo(lat*3600-a,3600)/60;
printf(" minutes %i",b);
c=(lat*3600-b*60-a)/3600;
printf(" degrees %i",c);
|
f0d947fdb8d84e2dae226e15fd9387edee6886b6 | 36c5f94ce0d09d8d1cc8d0f9d79ecccaa78036bd | /Rhombus Vertical Dodge.sce | c3fa157dd82381ec8de2931992becc5dbff39be3 | [] | no_license | Ahmad6543/Scenarios | cef76bf19d46e86249a6099c01928e4e33db5f20 | 6a4563d241e61a62020f76796762df5ae8817cc8 | refs/heads/master | 2023-03-18T23:30:49.653812 | 2020-09-23T06:26:05 | 2020-09-23T06:26:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 24,742 | sce | Rhombus Vertical Dodge.sce | Name=Rhombus Vertical Dodge
PlayerCharacters=Quaker
BotCharacters=Pigeon.bot
IsChallenge=true
Timelimit=60.0
PlayerProfile=Quaker
AddedBots=Pigeon.bot
PlayerMaxLives=0
BotMaxLives=0
PlayerTeam=2
BotTeams=1
MapName=rhombusvert.map
MapScale=6.0
BlockProjectilePredictors=true
BlockCheats=true
InvinciblePlayer=true
InvincibleBots=true
Timescale=1.0
BlockHealthbars=false
TimeRefilledByKill=0.0
ScoreToWin=1000.0
ScorePerDamage=3.0
ScorePerKill=0.0
ScorePerMidairDirect=0.0
ScorePerAnyDirect=0.0
ScorePerTime=0.0
ScoreLossPerDamageTaken=0.0
ScoreLossPerDeath=0.0
ScoreLossPerMidairDirected=0.0
ScoreLossPerAnyDirected=0.0
ScoreMultAccuracy=false
ScoreMultDamageEfficiency=false
ScoreMultKillEfficiency=false
GameTag=Overwatch, Fortnite, Quake
WeaponHeroTag=Tracking, lg
DifficultyTag=3
AuthorsTag=patys, AIMER7
BlockHitMarkers=false
BlockHitSounds=false
BlockMissSounds=true
BlockFCT=false
Description=Track a vertically bouncing and strafing bot while moving.
GameVersion=1.0.8.0
ScorePerDistance=0.0
MBSEnable=true
MBSTime1=0.08
MBSTime2=2.0
MBSTime3=2.0
MBSTime1Mult=90.0
MBSTime2Mult=150.0
MBSTime3Mult=150.0
MBSFBInstead=false
MBSRequireEnemyAlive=false
[Aim Profile]
Name=Default
MinReactionTime=0.3
MaxReactionTime=0.4
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=15.0
TrackSpeed=3.5
TrackError=3.5
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=40.0
ShootFOV=15.0
VerticalAimOffset=0.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Bot Profile]
Name=Pigeon
DodgeProfileNames=Jumping
DodgeProfileWeights=1.0
DodgeProfileMaxChangeTime=10.0
DodgeProfileMinChangeTime=10.0
WeaponProfileWeights=1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0
AimingProfileNames=Default;Default;Default;Default;Default;Default;Default;Default
WeaponSwitchTime=3.0
UseWeapons=false
CharacterProfile=Clay Pigeon
SeeThroughWalls=true
NoDodging=false
NoAiming=true
[Character Profile]
Name=Quaker
MaxHealth=200.0
WeaponProfileNames=;;LG;;;;;
MinRespawnDelay=1.0
MaxRespawnDelay=1.0
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=2.0
CameraOffset=X=0.000 Y=0.000 Z=80.000
HeadshotOnly=false
DamageKnockbackFactor=4.0
MovementType=Base
MaxSpeed=1300.0
MaxCrouchSpeed=500.0
Acceleration=9000.0
AirAcceleration=16000.0
Friction=4.0
BrakingFrictionFactor=2.0
JumpVelocity=800.0
Gravity=3.0
AirControl=0.25
CanCrouch=false
CanPogoJump=false
CanCrouchInAir=true
CanJumpFromCrouch=false
EnemyBodyColor=X=0.771 Y=0.000 Z=0.000
EnemyHeadColor=X=1.000 Y=1.000 Z=1.000
TeamBodyColor=X=1.000 Y=0.888 Z=0.000
TeamHeadColor=X=1.000 Y=1.000 Z=1.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=0.0
MainBBType=Cylindrical
MainBBHeight=320.0
MainBBRadius=58.0
MainBBHasHead=false
MainBBHeadRadius=45.0
MainBBHeadOffset=0.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=230.0
ProjBBRadius=55.0
ProjBBHasHead=false
ProjBBHeadRadius=45.0
ProjBBHeadOffset=0.0
ProjBBHide=true
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=;;;
HideWeapon=false
AerialFriction=0.0
StrafeSpeedMult=1.0
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.0
AllowBufferedJumps=true
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.0
ThirdPersonCamera=false
TPSArmLength=300.0
TPSOffset=X=0.000 Y=150.000 Z=150.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
SpawnXOffset=0.0
SpawnYOffset=0.0
InvertBlockedSpawn=false
[Character Profile]
Name=Clay Pigeon
MaxHealth=30.0
WeaponProfileNames=;;;;;;;
MinRespawnDelay=0.001
MaxRespawnDelay=0.001
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=1.0
CameraOffset=X=0.000 Y=0.000 Z=0.000
HeadshotOnly=false
DamageKnockbackFactor=0.0
MovementType=Base
MaxSpeed=1100.0
MaxCrouchSpeed=500.0
Acceleration=7000.0
AirAcceleration=16000.0
Friction=8.0
BrakingFrictionFactor=4.0
JumpVelocity=2000.0
Gravity=0.58
AirControl=0.4
CanCrouch=false
CanPogoJump=false
CanCrouchInAir=false
CanJumpFromCrouch=false
EnemyBodyColor=X=255.000 Y=0.000 Z=0.000
EnemyHeadColor=X=255.000 Y=255.000 Z=255.000
TeamBodyColor=X=0.000 Y=0.000 Z=255.000
TeamHeadColor=X=255.000 Y=255.000 Z=255.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=800.0
MainBBType=Spheroid
MainBBHeight=200.0
MainBBRadius=100.0
MainBBHasHead=false
MainBBHeadRadius=10.0
MainBBHeadOffset=0.0
MainBBHide=false
ProjBBType=Spheroid
ProjBBHeight=50.0
ProjBBRadius=25.0
ProjBBHasHead=false
ProjBBHeadRadius=45.0
ProjBBHeadOffset=0.0
ProjBBHide=true
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=;;;
HideWeapon=true
AerialFriction=0.05
StrafeSpeedMult=1.0
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.0
AllowBufferedJumps=true
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.0
ThirdPersonCamera=false
TPSArmLength=300.0
TPSOffset=X=0.000 Y=150.000 Z=150.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=10.0
SpawnXOffset=0.0
SpawnYOffset=0.0
InvertBlockedSpawn=false
[Dodge Profile]
Name=Jumping
MaxTargetDistance=30000.0
MinTargetDistance=0.0
ToggleLeftRight=true
ToggleForwardBack=true
MinLRTimeChange=0.8
MaxLRTimeChange=1.5
MinFBTimeChange=0.8
MaxFBTimeChange=1.2
DamageReactionChangesDirection=false
DamageReactionChanceToIgnore=0.5
DamageReactionMinimumDelay=0.125
DamageReactionMaximumDelay=0.25
DamageReactionCooldown=1.0
DamageReactionThreshold=0.0
DamageReactionResetTimer=0.1
JumpFrequency=0.5
CrouchInAirFrequency=0.0
CrouchOnGroundFrequency=0.0
TargetStrafeOverride=Ignore
TargetStrafeMinDelay=0.125
TargetStrafeMaxDelay=0.25
MinProfileChangeTime=0.0
MaxProfileChangeTime=0.0
MinCrouchTime=0.3
MaxCrouchTime=0.6
MinJumpTime=0.000001
MaxJumpTime=0.000001
LeftStrafeTimeMult=1.0
RightStrafeTimeMult=1.0
StrafeSwapMinPause=0.0
StrafeSwapMaxPause=0.0
BlockedMovementPercent=0.5
BlockedMovementReactionMin=0.01
BlockedMovementReactionMax=0.02
[Weapon Profile]
Name=LG
Type=Hitscan
ShotsPerClick=1
DamagePerShot=6.0
KnockbackFactor=0.0
TimeBetweenShots=0.046
Pierces=false
Category=FullyAuto
BurstShotCount=1
TimeBetweenBursts=0.5
ChargeStartDamage=10.0
ChargeStartVelocity=X=500.000 Y=0.000 Z=0.000
ChargeTimeToAutoRelease=2.0
ChargeTimeToCap=1.0
ChargeMoveSpeedModifier=1.0
MuzzleVelocityMin=X=2000.000 Y=0.000 Z=0.000
MuzzleVelocityMax=X=2000.000 Y=0.000 Z=0.000
InheritOwnerVelocity=0.0
OriginOffset=X=0.000 Y=0.000 Z=0.000
MaxTravelTime=5.0
MaxHitscanRange=100000.0
GravityScale=1.0
HeadshotCapable=false
HeadshotMultiplier=2.0
MagazineMax=0
AmmoPerShot=1
ReloadTimeFromEmpty=0.5
ReloadTimeFromPartial=0.5
DamageFalloffStartDistance=100000.0
DamageFalloffStopDistance=100000.0
DamageAtMaxRange=7.0
DelayBeforeShot=0.0
HitscanVisualEffect=Tracer
ProjectileGraphic=Ball
VisualLifetime=0.05
WallParticleEffect=None
HitParticleEffect=None
BounceOffWorld=false
BounceFactor=0.0
BounceCount=0
HomingProjectileAcceleration=0.0
ProjectileEnemyHitRadius=1.0
CanAimDownSight=false
ADSZoomDelay=0.0
ADSZoomSensFactor=0.7
ADSMoveFactor=1.0
ADSStartDelay=0.0
ShootSoundCooldown=0.08
HitSoundCooldown=0.08
HitscanVisualOffset=X=0.000 Y=0.000 Z=-80.000
ADSBlocksShooting=false
ShootingBlocksADS=false
KnockbackFactorAir=0.0
RecoilNegatable=false
DecalType=0
DecalSize=30.0
DelayAfterShooting=0.0
BeamTracksCrosshair=true
AlsoShoot=
ADSShoot=
StunDuration=0.0
CircularSpread=true
SpreadStationaryVelocity=0.0
PassiveCharging=false
BurstFullyAuto=true
FlatKnockbackHorizontal=0.0
FlatKnockbackVertical=0.0
HitscanRadius=0.0
HitscanVisualRadius=6.0
TaggingDuration=0.0
TaggingMaxFactor=1.0
TaggingHitFactor=1.0
ProjectileTrail=None
RecoilCrouchScale=1.0
RecoilADSScale=1.0
PSRCrouchScale=1.0
PSRADSScale=1.0
ProjectileAcceleration=0.0
AccelIncludeVertical=true
AimPunchAmount=0.0
AimPunchResetTime=0.05
AimPunchCooldown=0.5
AimPunchHeadshotOnly=false
AimPunchCosmeticOnly=true
MinimumDecelVelocity=0.0
PSRManualNegation=false
PSRAutoReset=true
AimPunchUpTime=0.05
AmmoReloadedOnKill=0
CancelReloadOnKill=false
FlatKnockbackHorizontalMin=0.0
FlatKnockbackVerticalMin=0.0
ADSScope=No Scope
ADSFOVOverride=72.099998
ADSFOVScale=Overwatch
ADSAllowUserOverrideFOV=true
IsBurstWeapon=false
ForceFirstPersonInADS=true
ZoomBlockedInAir=false
ADSCameraOffsetX=0.0
ADSCameraOffsetY=0.0
ADSCameraOffsetZ=0.0
QuickSwitchTime=0.1
Explosive=false
Radius=500.0
DamageAtCenter=100.0
DamageAtEdge=0.0
SelfDamageMultiplier=0.5
ExplodesOnContactWithEnemy=false
DelayAfterEnemyContact=0.0
ExplodesOnContactWithWorld=false
DelayAfterWorldContact=0.0
ExplodesOnNextAttack=false
DelayAfterSpawn=0.0
BlockedByWorld=false
SpreadSSA=1.0,1.0,-1.0,0.0
SpreadSCA=1.0,1.0,-1.0,0.0
SpreadMSA=1.0,1.0,-1.0,0.0
SpreadMCA=1.0,1.0,-1.0,0.0
SpreadSSH=1.0,1.0,-1.0,0.0
SpreadSCH=1.0,1.0,-1.0,0.0
SpreadMSH=1.0,1.0,-1.0,0.0
SpreadMCH=1.0,1.0,-1.0,0.0
MaxRecoilUp=0.0
MinRecoilUp=0.0
MinRecoilHoriz=0.0
MaxRecoilHoriz=0.0
FirstShotRecoilMult=1.0
RecoilAutoReset=false
TimeToRecoilPeak=0.05
TimeToRecoilReset=0.35
AAMode=0
AAPreferClosestPlayer=false
AAAlpha=1.0
AAMaxSpeed=2.0
AADeadZone=0.0
AAFOV=720.0
AANeedsLOS=true
TrackHorizontal=true
TrackVertical=true
AABlocksMouse=false
AAOffTimer=0.0
AABackOnTimer=0.0
TriggerBotEnabled=false
TriggerBotDelay=0.0
TriggerBotFOV=1.0
StickyLock=false
HeadLock=false
VerticalOffset=0.0
DisableLockOnKill=false
UsePerShotRecoil=false
PSRLoopStartIndex=0
PSRViewRecoilTracking=0.45
PSRCapUp=9.0
PSRCapRight=4.0
PSRCapLeft=4.0
PSRTimeToPeak=0.095
PSRResetDegreesPerSec=40.0
UsePerBulletSpread=false
PBS0=0.0,0.0
[Map Data]
reflex map version 8
global
entity
type WorldSpawn
String32 targetGameOverCamera end
UInt8 playersMin 1
UInt8 playersMax 16
brush
vertices
0.000000 16.000000 -320.000000
16.000000 16.000000 -320.000000
0.000000 0.000000 -336.000000
0.000000 0.000000 -320.000000
16.000000 0.000000 -320.000000
0.000000 16.000000 -336.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 3 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 3 0 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 4 2 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-576.000000 464.000000 256.000000
448.000000 464.000000 256.000000
448.000000 464.000000 -768.000000
-576.000000 464.000000 -768.000000
-576.000000 448.000000 256.000000
448.000000 448.000000 256.000000
448.000000 448.000000 -768.000000
-576.000000 448.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 structural/dev/dev_grey128
brush
vertices
-576.000000 -464.000000 248.000000
448.000000 -464.000000 248.000000
448.000000 -464.000000 -776.000000
-576.000000 -464.000000 -776.000000
-576.000000 -480.000000 248.000000
448.000000 -480.000000 248.000000
448.000000 -480.000000 -776.000000
-576.000000 -480.000000 -776.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 structural/dev/dev_grey128
brush
vertices
-576.000000 456.000000 -768.000000
448.000000 456.000000 -768.000000
448.000000 456.000000 -784.000000
-576.000000 456.000000 -784.000000
-576.000000 -472.000000 -768.000000
448.000000 -472.000000 -768.000000
448.000000 -472.000000 -784.000000
-576.000000 -472.000000 -784.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 structural/dev/dev_grey128
brush
vertices
-576.000000 464.000000 272.000000
448.000000 464.000000 272.000000
448.000000 464.000000 256.000000
-576.000000 464.000000 256.000000
-576.000000 -480.000000 272.000000
448.000000 -480.000000 272.000000
448.000000 -480.000000 256.000000
-576.000000 -480.000000 256.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 structural/dev/dev_grey128
brush
vertices
-592.000000 456.000000 264.000000
-576.000000 456.000000 264.000000
-576.000000 456.000000 -776.000000
-592.000000 456.000000 -776.000000
-592.000000 -472.000000 264.000000
-576.000000 -472.000000 264.000000
-576.000000 -472.000000 -776.000000
-592.000000 -472.000000 -776.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 structural/dev/dev_grey128
brush
vertices
448.000000 456.000000 256.000000
464.000000 456.000000 256.000000
464.000000 456.000000 -768.000000
448.000000 456.000000 -768.000000
448.000000 -464.000000 256.000000
464.000000 -464.000000 256.000000
464.000000 -464.000000 -768.000000
448.000000 -464.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 structural/dev/dev_grey128
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 structural/dev/dev_grey128
brush
vertices
-144.000000 472.000000 -320.000000
0.000000 472.000000 -320.000000
0.000000 472.000000 -336.000000
-144.000000 472.000000 -336.000000
-144.000000 -504.000000 -320.000000
0.000000 -504.000000 -320.000000
0.000000 -504.000000 -336.000000
-144.000000 -504.000000 -336.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-144.000000 472.000000 -176.000000
-128.000000 472.000000 -176.000000
-128.000000 472.000000 -320.000000
-144.000000 472.000000 -320.000000
-144.000000 -520.000000 -176.000000
-128.000000 -520.000000 -176.000000
-128.000000 -520.000000 -320.000000
-144.000000 -520.000000 -320.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-128.000000 472.000000 -176.000000
15.999999 472.000000 -176.000000
15.999999 472.000000 -192.000000
-128.000000 472.000000 -192.000000
-128.000000 -512.000000 -176.000000
15.999999 -512.000000 -176.000000
15.999999 -512.000000 -192.000000
-128.000000 -512.000000 -192.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
0.000000 472.000000 -192.000000
16.000000 472.000000 -192.000000
16.000000 472.000000 -336.000000
0.000000 472.000000 -336.000000
0.000000 -512.000000 -192.000000
16.000000 -512.000000 -192.000000
16.000000 -512.000000 -336.000000
0.000000 -512.000000 -336.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-584.000000 8.000000 256.000000
-152.000000 8.000000 256.000000
-152.000000 8.000000 -776.000000
-584.000000 8.000000 -776.000000
-584.000000 0.000000 256.000000
-152.000000 0.000000 256.000000
-152.000000 0.000000 -776.000000
-584.000000 0.000000 -776.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
24.000000 8.000000 264.000000
448.000000 8.000000 264.000000
448.000000 8.000000 -768.000000
24.000000 8.000000 -768.000000
24.000000 0.000000 264.000000
448.000000 0.000000 264.000000
448.000000 0.000000 -768.000000
24.000000 0.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-152.000000 8.000000 256.000000
24.000000 8.000000 256.000000
24.000000 8.000000 -168.000000
-152.000000 8.000000 -168.000000
-152.000000 0.000000 256.000000
24.000000 0.000000 256.000000
24.000000 0.000000 -168.000000
-152.000000 0.000000 -168.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-152.000000 8.000000 -344.000000
24.000000 8.000000 -344.000000
24.000000 8.000000 -776.000000
-152.000000 8.000000 -776.000000
-152.000000 0.000000 -344.000000
24.000000 0.000000 -344.000000
24.000000 0.000000 -776.000000
-152.000000 0.000000 -776.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
entity
type CameraPath
UInt32 entityIdAttachedTo 5
UInt8 posLerp 2
UInt8 angleLerp 2
entity
type Effect
Vector3 position 0.000000 256.000000 0.000000
String64 effectName internal/misc/reflectionprobe
entity
type Target
Vector3 position 352.000000 256.000000 224.000000
Vector3 angles -135.000000 30.000000 0.000000
String32 name end
entity
type PlayerSpawn
Vector3 position 416.000000 0.000000 -256.000000
Vector3 angles 270.000000 0.000000 0.000000
Bool8 teamA 0
entity
type PlayerSpawn
Vector3 position -64.000000 -488.000000 -256.000000
Vector3 angles 90.000000 0.000000 0.000000
Bool8 teamB 0
|
c8ca19ce5bde50dcb50db6a1f7a95c3c985da4e8 | a2dd2b9c1ff772eac263e04e43b6bbfea43c41a8 | /solveTentjeBoompjeNieuw4.sci | 71c89b298d3aa15d3eab9613593e6adf621fface | [] | no_license | JSilkens/TentsAndTrees | 37542c783a8df743d275b12d90f96f8c6debd42a | f44ec711c6147094afd4ee8c8e6faf73e7a3bada | refs/heads/master | 2021-01-10T18:33:11.358621 | 2014-05-09T17:11:05 | 2014-05-09T17:11:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 17,084 | sci | solveTentjeBoompjeNieuw4.sci | x = 7 // leeg vakje (geel)
g = 3 // gras (lichtgroen)
b = 13 // boom (donkergroen)
t = 6 // tent (paars)
A11 = [x x b x x x x x x x x x x x x x b x x x x x b x x;
x b x x x b b b x x b x x b x b x x x x x x x x x;
x x b x x x x b b x x x x x x x b x x b x x x x b;
x x x b x x x x x x b x b x x x x x x x b x x x x;
x x b x x b x x x x b x x x x b x x b b x x b x x;
x x x x x x b x x x x x x b b x x b x x x x x x x;
b x x x b x x x x b b x b x x x x x b x x x x x b;
x x x x x x x x x x x x x x x b x x x x x x x x x;
x b b x b x x x x x b x x x x x x x x x x x b x x;
x x x x x x x x b b x x x x x x b x b x x x b x x;
x b x b x x x x x x x x b x b x x x x x x x b x x;
x b x x b x x x x x x b x x x b b x b x x x x x x;
x x x x x x b x x b x x x b x x x b x b b x x x b;
x x x x x x x x x x b x x x x x x x x x x x x x x;
x x x b x b x x x x x x b x x x x b x x x x b x x;
x x b x x x x x x x b x x b x x x x b x x x x x x;
x x b x x x x x x x x x x x x x x x x x x x b x x;
x b x x x b b b x x x x x x x b x x x x x x b x x
x x b x x x x b b x x x x x x x b x x b x x x x x;
x x x b x x x x x x b x b x x x b x x x b x x x b;
x x x x x x x x x x x x x x x x x x x x x x b x b;
b x x b x x b b x b b b b x x b x b b x b x x x x;
x b x x x b x x x x x x x b x x x x x x x x b x x;
x b x x x x x x x b x x x x x x b x x x b x x x x;
x x b x x x b x x x b x x x x x x b x x x x x x b;]
K11 = [6 4 6 3 8 1 9 3 4 7 4 7 4 5 3 7 1 10 2 9 2 5 0 12 1]
R11 = [6 5 5 6 5 5 6 2 4 5 6 4 6 3 2 7 2 7 5 5 7 0 9 2 9]
function X = solveTentjeBoompje(B,R,K)
T = zeros(B)
A = geefBoompjes(B)
M = ones(B)
M = berekenMogelijkheden(B,R,K,M)
M = mogelijkhedenVolgensVec(T,M,R,K)
[M,T] = losOp(T,M,A,R,K)
X = zeros(B)
X(find(T==1))=t
X(find(A==1))=b
X(find(M==1))=x
X(find(X==0))=g
//
// Matplot(X)
// Rom = R($:-1:1)
// xlabel(string(K))
// ylabel(string(Rom))
//
return X
endfunction
//mogelijkhedenkolom
function mk = bayern(M,K)
M2 = M
mk = M
//eentje omhoog
M2(1:length(K)-1,:) = M2(1:length(K)-1,:) + M2(2:length(K),:)
if length(find(M2==2)) > 0 then
mk(find(M2==2)) = 0.5
mk(find(M2==2)+1) = 0.5
end
M3 = M2
M3(1:length(K)-2,:) = M3(1:length(K)-2,:) + M(3:length(K),:)
if length(find(M3==3)) > 0 then
mk(find(M3==3)) = 0.66
mk(find(M3==3)+1) = 0.66
mk(find(M3==3)+2) = 0.66
end
M4 = M3
M4(1:length(K)-3,:) = M4(1:length(K)-3,:) + M(4:length(K),:)
if length(find(M4==4)) > 0 then
mk(find(M4==4)) = 0.5
mk(find(M4==4)+1) = 0.5
mk(find(M4==4)+2) = 0.5
mk(find(M4==4)+3) = 0.5
end
return mk
endfunction
//mogelijkhedenrij
function mr = munchen(M,R)
M2 = M
mr = M
//eentje links
M2(:,1:length(R)-1) = M2(:,1:length(R)-1) + M(:,2:length(R))
if length(find(M2==2)) > 0 then
mr(find(M2==2)) = 0.5
mr(find(M2==2)+length(R)) = 0.5
end
M3 = M2
M3(:,1:length(R)-2) = M3(:,1:length(R)-2) + M(:,3:length(R))
if length(find(M3==3)) > 0 then
mr(find(M3==3)) = 0.66
mr(find(M3==3)+length(R)) = 0.66
mr(find(M3==3)+2*length(R)) = 0.66
end
M4 = M3
M4(:,1:length(R)-3) = M4(:,1:length(R)-3) + M(:,4:length(R))
if length(find(M4==4)) > 0 then
mr(find(M4==4)) = 0.5
mr(find(M4==4)+length(R)) = 0.5
mr(find(M4==4)+2*length(R)) = 0.5
mr(find(M4==4)+3*length(R)) = 0.5
end
return mr
endfunction
function prop = berekenKans(T1,M1,R,K)
// bereken matrix met kansen
X = (sum(M1,2))'
//delen door nul voorkomen (maakt toch niet uit als terug op 1 staat.)
X(find(X==0)) = 1
Y = sum(M1,1)
Y(find(Y==0)) = 1
prop = M1
propR = (R - (sum(T1,2))') ./ X
propK = (K - sum(T1,1)) ./ Y
prop = prop .* (repmat(propR,length(R),1))'
prop = prop .* (repmat(propK,length(K),1))
return prop
endfunction
function G = berekenMogelijkheden(B,R,K,M)
//Functie plaatsGrasWaarGeenBoom herschreven
// de matrixelementen omzetten naar getallen
B(find(B==x))=0
B(find(B==b))=1
// de grootte van de te gebruiken matricen bepalen
S = size(B)
nrKol = S(2)
nrRij = S(1)
// lege matricen aanmaken
C = zeros(B)
D = zeros(B)
E = zeros(B)
F = zeros(B)
// matrix naar boven verplaatsen
C(1:nrRij-1,:) = B(2:nrRij,:)
// matrix naar onder verplaatsen
D(2:nrRij,:) = B(1:nrRij-1,:)
// matrix naar rechts verplaatsen
E(:,1:nrKol-1) = B(:,2:nrKol)
// matrix naar links verplaatsen
F(:,2:nrKol) = B(:,1:nrKol-1)
// matricen optellen
G = C + D + E + F
// De bomen van de mogelijkheden aftrekken
G = G - B*10
// de matrix G is een matrix met de mogelijkheden
G(find(G<0)) = 0
G(find(G>0)) = 1
//later opnieuw deze functie kunnen oproepen
G(find(M==0)) = 0
return G
endfunction
function M = mogelijkhedenVolgensVec(T,M,R,K)
// waar er 0 staat in de vector of het aantal tentjes gelijk
// is aan de vector is er geen mogelijkheid
// we willen weten welke er nul zijn (rij0)
rij0 = R - (sum(T,2))'
kolom0 = K - sum(T,1)
M(find(rij0==0),:)=0
M(:,find(kolom0==0))=0
return M
endfunction
function H = geefBoompjes(B)
//een matrix met de boompjes teruggeven
H = B
H(find(H==x)) = 0
H(find(H==b)) = 1
return H
endfunction
function [M,T] = tentjesVolgensVector(T,M,R,K)
// tentjes zetten waar vector gelijk is aan mogelijkheden + tentjes
// rijen checken
//krijgt rij met False en true terug
mr = munchen(M,R)
rijTent = (sum(mr,2))' + (sum(T,2))' == R
//in de rij waar true staat zet hij in t-matrix ook tentjes (1)
T(rijTent,:) = T(rijTent,:) + mr(rijTent,:)
if length(find(T==0.66)) > 0 then
T1 = (T)'
T1(find(T1==0.66)) = repmat([1,0,1],1,length(T(find(T==0.66)))/3)
T = (T1)'
end
T(find(T<>1&T<>0))=0
//kolommen checken
//idem rij maar bij kolom
mk = bayern(M,K)
kolomTent = sum(mk,1) + sum(T,1) == K
T(:,kolomTent) = T(:,kolomTent) + mk(:,kolomTent)
if length(find(T==0.66)) > 0 then
T(find(T==0.66)) = repmat([1,0,1],1,length(T(find(T==0.66)))/3)
end
T(find(T<>1&T<>0))=0
//mogelijkheden wegdoen
M(find(T == 1)) = 0
return
endfunction
function M = geenMogelijkheidRondTent (T,M,R,K)
if sum(T) > 0 then
// geen mogelijkheid rond tent
A = find(T==1)
// kijken naar plaatsje deronder en als
// het tentje op de laatste plaats staat is
// het volgende volgende kolom dus mogelijkheid verwijderen
// van vektor A
A1 = A + 1
A1 = A1(find(A1 <= length(R) * length(K)&modulo(A1,length(R))<>1))
// kijken naar plaatsje erboven
A2 = A - 1
A2 = A2(find(A2 > 0&modulo(A2,length(R))<>0))
// kijken naar plaatse rechts
// alles wat een hogere index heeft dan er eigenlijk
// kan zijn, (rechts van het veld),
// verwijderen als mogelijkheid van vektor A
A3 = A + length(R)
A3 = A3(find(A3 <= length(R) * length(K)))
A4 = A + length(R) - 1
//modulo voor als hij een kolom verder springt
A4 = A4(find(A4 <= length(R) * length(K)&modulo(A4,length(R))<>0))
A5 = A + length(R) + 1
A5 = A5(find(A5 <= length(R) * length(K)&modulo(A5,length(R))<>1))
// kijken naar plaatsen links
// alles wat een lagere index heeft dan er eigenlijk
// kan zijn, (links van het veld),
// verwijderen als mogelijkheid van vektor A
A6 = A - length(R)
A6 = A6(find(A6 > 0))
A7 = A - length(R) - 1
A7 = A7(find(A7 > 0&modulo(A7,length(R))<>0))
A8 = A - length(R) + 1
A8 = A8(find(A8 > 0&modulo(A8,length(R))<>1))
Atotaal = unique([A1,A2,A3,A4,A5,A6,A7,A8])
M(Atotaal) = 0
return M
end
endfunction
function [M,T] = eenKansRondBoom (T,A,M,R,K)
M = M + T
// nieuwe lege matrix aanmaken
M1 = zeros(M)
// eentje omhoog, als het exact 1 is -> tentje beneden
M1(1:length(R)-1,:) = M1(1:length(R)-1,:) + M(2:length(R),:)
// eentje omlaag, als het exact 10 is -> tentje omhoog
M1(2:length(R),:) = M1(2:length(R),:) + 10*M(1:length(R)-1,:)
// eentje links, als het exact 100 is -> tentje rechts
M1(:,1:length(K)-1) = M1(:,1:length(K)-1) + 100*M(:,2:length(K))
// eentje rechts, als het exact 1000 is -> tentje links
M1(:,2:length(K)) = M1(:,2:length(K)) + 1000*M(:,1:length(K)-1)
// BP = boomplaats
BP = find(A==1)
// KRB = kans rond boom
KRB = M1(BP)
// als er geen getal is mag het geen +1 doen -> if
// als het 1 is tentje beneden
if (sum(KRB==1) >= 1) then
T(BP(find(KRB==1))+1) = 1
end
// als het 10 is tentje omhoog
if (sum(KRB==10) >= 1) then
T(BP(find(KRB==10))-1) = 1
end
// als het 100 is tentje rechts
if (sum(KRB==100) >= 1) then
T(BP(find(KRB==100))+length(R)) = 1
end
// als het 1000 is tentje links
if (sum(KRB==1000) >= 1) then
T(BP(find(KRB==1000))-length(R)) = 1
end
//mogelijkheden wegdoen
M(find(T == 1)) = 0
return
endfunction
function C = isOpgelost(T,M,R,K)
// kijken of het juist is opgelost
// tentjes aftrekken van de vector om
// te kijken of er genoeg tentjes staan
rij0 = R - (sum(T,2))'
kolom0 = K - sum(T,1)
// de hele som van de rijvector moet
// nul zijn als we er de tenten van aftrekken
if (sum(rij0) == 0 & sum(kolom0) == 0) then
C = %T
else
C = %F
end
endfunction
function C =isVeilig(T,M,A,R,K)
C = %T
// kijken in rij dat er niet meer tentjes zijn
// dan er in de vektor zijn toegestaan
if sum(sum(T,2)' > R) <> 0 then
C = %F
end
// idem vorige maar met kolom
if sum(sum(T,1) > K) <> 0 then
C = %F
end
// som mogelijkheden en tentjes niet kleiner dan vec
if sum(sum(T,2)' + sum(M,2)' < R) then
C = %F
end
//idem voor kolom
if sum(sum(T,1) + sum(M,1) < K) then
C = %F
end
//boom zonder tent of mogelijkheid
A1 = zeros(A)
//alles van tentjes en mogelijkheden eentje omhoog
A1(1:length(R)-1,:) = T(2:length(R),:) + M(2:length(R),:)
//eentje omlaag
A1(2:length(R),:) = T(1:length(R)-1,:) + M(1:length(R)-1,:) + A1(2:length(R),:)
//eentje links
A1(:,1:length(K)-1) = T(:,2:length(K)) + M(:,2:length(K)) + A1(:,1:length(K)-1)
//eentje rechts
A1(:,2:length(K)) = T(:,1:length(K)-1) + M(:,1:length(K)-1) + A1(:,2:length(K))
if sum(A1(find(A==1))==0) > 0 then
C = %F
end
//geen twee tentjes naast elkaar
// nieuwe lege matrix aanmaken
T1 = T
// eentje omhoog
T1(1:length(R)-1,:) = T1(1:length(R)-1,:) + T(2:length(R),:)
// eentje omlaag
T1(2:length(R),:) = T1(2:length(R),:) + T(1:length(R)-1,:)
// eentje links
T1(:,1:length(K)-1) = T1(:,1:length(K)-1) + T(:,2:length(K))
// eentje rechts
T1(:,2:length(K)) = T1(:,2:length(K)) + T(:,1:length(K)-1)
//linkerbovenhoek
T1(1:length(R)-1,1:length(K)-1) = T1(1:length(R)-1,1:length(K)-1) + T(2:length(R),2:length(K))
//rechterbovenhoek
T1(1:length(R)-1,2:length(K)) = T1(1:length(R)-1,2:length(K)) + T(2:length(R),1:length(K)-1)
//linkeronderhoek
T1(2:length(R),1:length(K)-1) = T1(2:length(R),1:length(K)-1) + T(1:length(R)-1,2:length(K))
//rechteronderhoek
T1(2:length(R),2:length(K)) = T1(2:length(R),2:length(K)) + T(1:length(R)-1,1:length(K)-1)
// TP = tentplaats
TP = find(T==1)
// TRT= tentRondTent
TRT = T1(TP)
// als er iets groter dan 1 is staat er ergens een tentje naast elkaar
if (sum(TRT>1) > 1) then
C = %F
end
//1 tent per boompje
// nieuwe lege matrix aanmaken
A2 = zeros(A)
// eentje omhoog
A2(1:length(R)-1,:) = A2(1:length(R)-1,:) + A(2:length(R),:)
// eentje omlaag
A2(2:length(R),:) = A2(2:length(R),:) + 10*A(1:length(R)-1,:)
// eentje links
A2(:,1:length(K)-1) = A2(:,1:length(K)-1) + 100*A(:,2:length(K))
// eentje rechts
A2(:,2:length(K)) = A2(:,2:length(K)) + 1000*A(:,1:length(K)-1)
BP = find(T==1)
KRB = A2(BP)
// als er geen getal is mag het geen +1 doen -> if
// als het 1 is beneden
if (sum(KRB==1) >= 1) then
A(BP(find(KRB==1))+1) = A(BP(find(KRB==1))+1) - 1
end
// als het 10 is omhoog
if (sum(KRB==10) >= 1) then
A(BP(find(KRB==10))-1) = A(BP(find(KRB==10))-1) - 1
end
// als het 100 is rechts
if (sum(KRB==100) >= 1) then
A(BP(find(KRB==100))+length(R)) = A(BP(find(KRB==100))+length(R)) - 1
end
// als het 1000 is links
if (sum(KRB==1000) >= 1) then
A(BP(find(KRB==1000))-length(R)) = A(BP(find(KRB==1000))-length(R)) - 1
end
if (sum(A<0)>0) then
C = %F
end
return C
endfunction
function A1 = verminderBomen(T1,A1)
// nieuwe lege matrix aanmaken
A2 = zeros(A1)
// eentje omhoog, als het exact 1 is -> tentje beneden
A2(1:length(R)-1,:) = A2(1:length(R)-1,:) + A1(2:length(R),:)
// eentje omlaag, als het exact 10 is -> tentje omhoog
A2(2:length(R),:) = A2(2:length(R),:) + 10*A1(1:length(R)-1,:)
// eentje links, als het exact 100 is -> tentje rechts
A2(:,1:length(K)-1) = A2(:,1:length(K)-1) + 100*A1(:,2:length(K))
// eentje rechts, als het exact 1000 is -> tentje links
A2(:,2:length(K)) = A2(:,2:length(K)) + 1000*A1(:,1:length(K)-1)
// BP = tentplaats
BP = find(T1==1)
// KRB = kans rond boom
KRB = A2(BP)
// als er geen getal is mag het geen +1 doen -> if
// als het 1 is tentje beneden
if (sum(KRB==1) >= 1) then
A1(BP(find(KRB==1))+1) = 0
end
// als het 10 is tentje omhoog
if (sum(KRB==10) >= 1) then
A1(BP(find(KRB==10))-1) = 0
end
// als het 100 is tentje rechts
if (sum(KRB==100) >= 1) then
A1(BP(find(KRB==100))+length(R)) = 0
end
// als het 1000 is tentje links
if (sum(KRB==1000) >= 1) then
A1(BP(find(KRB==1000))-length(R)) = 0
end
return A1
endfunction
function [M,T] = losOp(T,M,A,R,K)
if isOpgelost(T,M,R,K) then
return M,T
end
T1 = T
M1 = M
A1 = A
M1 = mogelijkhedenVolgensVec(T1,M1,R,K)
M1 =geenMogelijkheidRondTent(T1,M1,R,K)
[M1,T1] = tentjesVolgensVector(T1,M1,R,K)
M1 = geenMogelijkheidRondTent(T1,M1,R,K)
A1 = verminderBomen(T1,A1)
M1 = berekenMogelijkheden(A1,R,K,M1)
[M1,T1] = eenKansRondBoom(T1,A1,M1,R,K)
M1 = geenMogelijkheidRondTent(T1,M1,R,K)
A1 = verminderBomen(T1,A1)
M1 = berekenMogelijkheden(A1,R,K,M1)
//
// if(length(R)>9 & length(K)>9)
// if (sum(M<>M1)<> 0 & isVeilig(T1,M1,A,R,K)~=%T )
//
// [M,T] = losOp(T1,M1,A,R,K)
// end
// else
// if (sum(M<>M1)<> 0 & isVeilig(T1,M1,A,R,K))
// [M,T] = losOp(T1,M1,A,R,K)
// end
// end
if (sum(M<>M1)<> 0 & isVeilig(T1,M1,A,R,K))
[M,T] = losOp(T1,M1,A,R,K)
end
// zoek volgende locatie
M2 = M
T2 = T
M2(find(M==1,1)) = 0
// disp("DEBUG INFO")
// disp("----------")
// disp(sum(M<>M2))
// disp(isVeilig(T2,M2,A,R,K))
//// pause
if(length(R)>9 & length(K)>9)
if (sum(M<>M2)<> 0 & isVeilig(T2,M2,A,R,K)~=%T )
[M,T] = losOp(T2,M2,A,R,K)
end
else
if (sum(M<>M2)<> 0 & isVeilig(T2,M2,A,R,K))
[M,T] = losOp(T2,M2,A,R,K)
end
end
// zoek volgende locatie
M2 = M
T2 = T
prop = berekenKans(T,M,R,K)
propNew = ones(M)
[m,k] = max(prop .* propNew)
T2(k(1),k(2)) = 1
M2(k(1),k(2)) = 0
M2 = geenMogelijkheidRondTent(T2,M2,R,K)
A1 = verminderBomen(T2,A)
M2 = berekenMogelijkheden(A1,R,K,M2)
// disp("DEBUG INFO")
// disp("----------")
// disp(sum(M<>M2))
// disp(isVeilig(T2,M2,A,R,K))
// pause
// if (sum(M<>M2)<> 0 & isVeilig(T2,M2,A,R,K)~=%T )
if (sum(M<>M2)<> 0 | isVeilig(T2,M2,A,R,K))
[M,T] = losOp(T2,M2,A,R,K)
end
return M,T
endfunction
|
3e720877fe152c42292f64d4ee383967344e4823 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1439/CH5/EX5.9/5_9.sce | 2acb0982a6328e8d1570d767473e2e3135b07e9d | [] | 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 | 453 | sce | 5_9.sce | clc
//initialisation of variables
T= 100 //C
R= 1.987 //cal mole^-1 K^-1
H= 539.7 //cal g^-1
M= 18 //g mole^-1
//CALCULATIONS
w= -R*(273+T)
qp= -H*M
dE= qp-w
dA= -w
dS= qp/(273+T)
dG= qp-(273+T)*dS
//RESULTS
printf ('W= %.f cal mole^-1',w)
printf ('\n qp= %.f cal mole^-1',qp)
printf ('\n dE= %.f cal mole^-1',dE)
printf ('\n dA= %.f cal mole^-1',dA)
printf ('\n dS= %.f cal deg^-1 mole^-1',dS)
printf ('\n dG= %.f cal mole^-1',dG)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.