blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
214
content_id
stringlengths
40
40
detected_licenses
sequencelengths
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
08d7689b6c4504e000dc6751bfb5ced9ab6e45e4
449d555969bfd7befe906877abab098c6e63a0e8
/764/CH22/EX22.3.a/data22_3.sci
972ec92775b76c544b171fd29be7597df3d8ec6d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
551
sci
data22_3.sci
//(Cylinders and Pressure Vessels) Example 22.3 //Force exerted by the piston rod F (kN) F = 10 //Friction force due to piston packing as a percentage of operating force frac(%) frac = 10 //Pressure inside the cylinder Pi (MPa) Pi = 10 //Ultimate tensile strength of the cylinder material Sut (N/mm2) Sut = 200 //Factor of safety fs fs = 5 //Check the behavior of the material behavior = 'brittle' //Change the behavior to 'ductile' if the material is ductile and uncomment the //next line specifying the poisson's ratio //mu = 0.26
04947b05d465a8d31d5055233b50631f170778a9
449d555969bfd7befe906877abab098c6e63a0e8
/1862/CH11/EX11.8/C11P8.sce
dc6a64ee79eb27145ab0cffc30492ca9bddf2c5d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
398
sce
C11P8.sce
clear clc //to find spring compression // GIVEN:: //mass of body m = 3.63//in kg //speed of block v = 1.22//in m/s //force constant for spring k = 135//in // SOLUTION: //using work-energy principle //spring compression d = v*sqrt(m/k)//in meters d1 = d*10^2//in printf ("\n\n Spring compression d = \n\n %.3f m",d); printf ("\n\n Spring compression d = \n\n %.1f cm",d1);
fd3b195dc2d25017fd1f816c07db2c1b6c4a171d
449d555969bfd7befe906877abab098c6e63a0e8
/3821/CH11/EX11.22/Example11_22.sce
e77ed0512f11011335a0157e4fde1911dddd1938
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
627
sce
Example11_22.sce
///Chapter No 11 Steam Boilers ////Example 11.22 Page No 256 ///Find Efficeincy of chimney draught ///Input data clc; clear; H=45; //Chimney height in m Tg=370+273; //Temperature of flue gases in degree celsius T1=150+273; //Temperature of flue gases in degree celsius ma=25; //Mass of the flue gas formed in Kg/kg of a cosl fired Ta=35+273; //The boiler temperature in degree celsius Cp=1.004; //fuel gas //Calculation //Efficeincy of chimney draught in % A=(H*(((Tg/Ta)*(ma/(ma+1)))-1))/(Cp*(Tg-T1))*100; //Output printf('Efficeincy of chimney draught= %f percent \n',A);
3b638fa273e9d8721fd505ab14aa30231970e058
449d555969bfd7befe906877abab098c6e63a0e8
/1223/CH14/EX14.2/Ex14_2.sce
dec5a58f08c05fc3304c0c959d08c9ab5f3d9d21
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
146
sce
Ex14_2.sce
clear; clc; //Example 14.2 R2=10000; Ri=10000; Aol=10^5; Rif=1/(1/Ri+(1+Aol)/R2); printf('\nclosed loop input resistance =%.2fOhm\n',Rif)
c9934853cc87182ae8036d0e3760a4d2eef2e76b
8712e7b4614b1ab648f19bcce8ca17e378876546
/Scilab Com Interface Grafica/Engine/Quiescent.sce
3fe06320e2ad09754afe53f540f9c38e21cc4eee
[]
no_license
Diogo-Rossi/Mestrado-Diogo-Rossi
d0d476d878c729c44778ea8f364c50c5464fc751
d544d3bce094931eb96a6031aaa1ae1a833d2b04
refs/heads/master
2022-08-26T22:28:04.339221
2022-07-11T00:25:21
2022-07-11T00:25:21
236,889,761
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,053
sce
Quiescent.sce
Dt(2) = Dt(1); for i=2:3 // Atualização do instante de tempo t(i) = t(i-1) + Dt(i-1); // Vetor de Carga efetiva incremental, dado pela equação XXX p(:,i) = Carregamento(n,nc,opC,desC,t0,t1,w1,F,t(i)); Dp = p(:,i) - p(:,i-1); Dp_ = Dp + ... + M*((1/(Beta*Dt(i-1)))*V(:,i-1) + (1/(2*Beta))*A(:,i-1) ) ... + C*((Gama/Beta)*V(:,i-1) + (Gama/(2*Beta)-1)*Dt(i-1)*A(:,i-1)); // Incremento no deslocamento, encontrado ao resolver a equação XXX Du = k_\Dp_; // Incremento na Velocidade, obtido com a equação XXX Dv = (Gama/(Beta*Dt(i-1)))*Du + (1-Gama/(2*Beta))*Dt(i-1)*A(:,i-1) ... -(Gama/Beta)*V(:,i-1); // Deslocamento e velocidade no final do passo, equações XXX e XXX D(:,i) = D(:,i-1) + Du; V(:,i) = V(:,i-1) + Dv; // Aceleração no final do passo, equação XXX A(:,i) = M\( p(:,i) - C*V(:,i) - K*D(:,i)); // Algoritmo de Hulbert & Jang Da = A(:,i) - A(:,i-1); // Incremento na Aceleração e(:,i) = (Dt(i-1)^2)*(Beta-1/6)*Da; // Erro local, Eq. XXX sclfac(i) = max(norm(Du),0.9*sclfac(i-1)); // Fator de escala, Eq. XXX RL(i) = norm(e(:,i))/sclfac(i); // Erro local normalizado, Eq. XXX end while RL(3)>tol // Algoritmo de Hulbert & Jang para redução do passo fdec = (tol/RL(3))^(1/pdec); // Fator de redução, eq. XXX Dt(2) = fdec*Dt(2); // Redução do incremento, eq. XXX Dt(2) = max(Dt(2),Dtmin); // Dt limitado a um valor mínimo k_ = K + (1/(Beta*Dt(2)^2))*M + (Gama/(Beta*Dt(2)))*C; // Atualização do instante de tempo t(3) = t(2) + Dt(2); // Vetor de Carga efetiva incremental, dado pela equação XXX p(:,3) = Carregamento(n,nc,opC,desC,t0,t1,w1,F,t(3)); Dp = p(:,3) - p(:,2); Dp_ = Dp + ... + M*((1/(Beta*Dt(2)))*V(:,2) + (1/(2*Beta))*A(:,2) ) ... + C*((Gama/Beta)*V(:,2) + (Gama/(2*Beta)-1)*Dt(2)*A(:,2)); // Incremento no deslocamento, encontrado ao resolver a equação XXX Du = k_\Dp_; // Incremento na Velocidade, obtido com a equação XXX Dv = (Gama/(Beta*Dt(2)))*Du + (1-Gama/(2*Beta))*Dt(2)*A(:,2) ... -(Gama/Beta)*V(:,2); // Deslocamento e velocidade no final do passo, equações XXX e XXX D(:,3) = D(:,2) + Du; V(:,3) = V(:,2) + Dv; // Aceleração no final do passo, equação XXX A(:,3) = M\( p(:,3) - C*V(:,3) - K*D(:,3)); // Atualização do passo de tempo - algoritmo de Hulbert & Jang Da = A(:,3) - A(:,2); // Incremento na Aceleração e(:,3) = (Dt(2)^2)*(Beta-1/6)*Da; // Erro local, Eq. XXX RL(3) = norm(e(:,3))/sclfac(3); // Erro local normalizado, Eq. XXX end if lb*tol<=RL(3) && RL(3)<=tol // Verificação da condição XXX Dt(3) = Dt(2); count = 0; elseif RL(3)<lb*tol Dt(3) = Dt(2); count = count + 1; end
45447b65015859f1685f150c269e099d315baaca
449d555969bfd7befe906877abab098c6e63a0e8
/213/CH8/EX8.1/8_1.sce
6c763fb7d414cdd439592f6c40aa2b529cc4a8f9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,291
sce
8_1.sce
//To find linear and agular velocity and acceleration clc //Given: NBO=300 //rpm OB=150/1000,BA=600/1000 //m //Solution: //Refer Fig. 8.4 //Calculating the angular velocity of BO omegaBO=2*%pi*NBO/60 //rad/s //Calculating the linear velocity of B with respect to O vBO=omegaBO*OB //m/s vB=vBO //By measurement from the velocity diagram, Fig. 8.4(b), vAB=3.4,vD=4.1 //m/s //Calculating the radial component of the acceleration of B with respect of O arBO=vBO^2/OB //m/s^2 aB=arBO //Calculating the radisla component of the accaleration of A with respect to B arAB=vAB^2/BA //m/s^2 //By measurement from the acceleration diagram, Fig. 8.4(c), aD=117,adashAB=103 //m/s^2 //Calculating the angular velocity of the connecting rod omegaAB=vAB/BA //rad/s^2 //Calculating the angular acceleration of the connecting rod alphaAB=adashAB/BA //rad/s^2 //Results: printf("\n\n The linear velocity of the midpoint of the connecting rod, vD = %.1f m/s.\n",vD) printf(" The linear acceleration of the midpoint of the connecting rod, aD = %d m/s^2.\n",aD) printf(" The angular velocity of the connecting rod, omegaAB = %.2f rad/s, anticlockwise about B.\n",omegaAB) printf(" The angular acceleration of the connecting rod, alphaAB = %.2f rad/s^2, clockwise about B.\n\n",alphaAB)
b2ecd308e05c1762eac6657cffe175d433bb9267
449d555969bfd7befe906877abab098c6e63a0e8
/2705/CH8/EX8.24/Ex8_24.sce
42ac180f368c34c24d51a825190e6233a3768731
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,224
sce
Ex8_24.sce
clear; clc; disp('Example 8.24'); // aim : To determine // the mass of air supplied/kg of fuel burnt // given values // gas composition in the fuel C = 84;// %age mass composition of Carbon in the fuel H2 = 14;// %age mass composition of H2 in the fuel O2f = 2;// %age mass composition of O2 in the fuel // exhaust gas composition CO2 = 8.85;// %age composition of CO2 by volume CO = 1.2// %age composition of CO by volume O2 = 6.8;// %age composition of O2 by volume N2 = 83.15;// %age composition of N2 by volume mC = 12;// moleculer mass of CO2,[kg/kmol] mH2 = 2;// moleculer mass of H2, [kg/kmol] mO2 = 32;// moleculer mass of O2, [kg/kmol] mN2 = 28;// moleculer mass of N2, [kg/kmol] // solution // combustion equation by no. of moles // 84/12 C + 14/2 H2 +2/32 O2 + a O2+79.3/20.7*a N2 = b CO2 + d CO2+ eO2 + f N2 +g H2 // equating coefficient and given condition b = 6.16;// [mol] a = 15.14;// [mol] d = .836;// [mol] f = 69.3*d;// [mol] // so fuel side combustion equation is // 84/12 C + 14/2 H2 +2/32 O2 + 15.14 O2 +85.5 N2 mair = ( a*mO2 +f*mN2)/100;// mass of air/kg fuel, [kg] mprintf('\n The mass of air supplied per kg of fuel is = %f kg\n',mair); // End
a715b81fda54653b65f3356942088bbc2d946a0c
449d555969bfd7befe906877abab098c6e63a0e8
/2561/CH4/EX4.12/Ex4_12.sce
6cc6a24fa13d174fc685672f3f08cb0ac876323a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
696
sce
Ex4_12.sce
//Ex4_12 Refer fig 4.9(a)and fig 4.9(b) clc VDD=(5) disp("VDD= "+string(VDD)+" volts") // Drain voltage supply RL1=125*10^(3) disp("RL1= "+string(RL1)+ " ohm") //Load resistance RL2=200*10^(3) disp("RL2= "+string(RL2)+ " ohm") //Load resistance IDON1=34.88*10^(-6) disp("IDON1 ="+string(IDON1)+" A")//Drain current for load line 1 from fig. IDON2=22.5*10^(-6) disp("IDON2 ="+string(IDON2)+" A")//Drain current for load line 2 from fig. VDON1=VDD-IDON1*RL1 disp("VDON1=VDD-IDON1*RL1= "+string(VDON1)+" volts") // output voltage at drain terminal for IDON1 VDON2=VDD-IDON2*RL2 disp("VDON2=VDD-IDON2*RL2= "+string(VDON2)+" volts") // output voltage at drain terminal for IDON2
b8dde5600bc3e2ef464c9e01de678a00b25f3f13
fd6e45f66c41ad779a3d47c3bf8ebfa140d3d657
/P3 - Non-linear equations /Métodos/3- regula falsi CHECK.sci
b7a8f4dc84300c27c86488964684ca6884a6308e
[]
no_license
jere1882/Numerical-Analysis-Assignments
7f474e2020d010f9f9c3dceff5e48c03b0d38652
1074f92ca93d0a402259f92a0f61f105f25e5230
refs/heads/master
2021-09-06T20:00:36.411386
2018-02-10T18:04:38
2018-02-10T18:04:38
121,039,769
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,020
sci
3- regula falsi CHECK.sci
function y=fea(x) y=(%e)^x+2 - x^3 endfunction //REGULA FALSI: Combinación del método de la secante y el método de la bisección function c=reg_falsi(f,a,b,delta,epsilon,maxit) // f función // a y b aproximaciones iniciales tales que f(a)f(b)<0 // maxit: cantidad máxima de iteraciones permitida // epsilon: tolerancia para la imágen // delta: diferencia entre dos aproximaciones sucesivas if f(a)*f(b)>0 then disp("par (a,b) no válido") else c=a; for i=1:maxit c_ant=c c = (a*f(b)-f(a)*b)/(f(b)-f(a)) // SALE DE LA ECUACION DE LA RECTA QUE PASA POR (a,f(a)) , (b,f(b)), al despejar el punto (c,0) ! if f(a)*f(c)<0 then b=c else a=c end if abs(f(c))<epsilon then disp ("termina por epsilon"), break end if abs(c_ant - c)<delta then disp ("termina por delta"), break end end end endfunction
ca9c60990a6d59d338a906edc3368c80ec6cd6c8
676ffceabdfe022b6381807def2ea401302430ac
/solvers/IncNavierStokesSolver/Tests/ChanFlow_V8P7_Avg.tst
4db4aeac99138d0013a38c0430f54197c2da0947
[ "MIT" ]
permissive
mathLab/ITHACA-SEM
3adf7a49567040398d758f4ee258276fee80065e
065a269e3f18f2fc9d9f4abd9d47abba14d0933b
refs/heads/master
2022-07-06T23:42:51.869689
2022-06-21T13:27:18
2022-06-21T13:27:18
136,485,665
10
5
MIT
2019-05-15T08:31:40
2018-06-07T14:01:54
Makefile
UTF-8
Scilab
false
false
876
tst
ChanFlow_V8P7_Avg.tst
<?xml version="1.0" encoding="utf-8"?> <test> <description>Channel Flow Vel P=8 Pre P=7 dumping average field </description> <executable>IncNavierStokesSolver</executable> <parameters>ChanFlow_V8P7_Avg.xml</parameters> <files> <file description="Session File">ChanFlow_V8P7_Avg.xml</file> </files> <metrics> <metric type="L2" id="1"> <value variable="u" tolerance="1e-12">4.08607e-16</value> <value variable="v" tolerance="1e-12">1.54276e-16</value> <value variable="p" tolerance="1e-12">1.1993e-14</value> </metric> <metric type="Linf" id="2"> <value variable="u" tolerance="1e-12">6.43929e-15</value> <value variable="v" tolerance="1e-12">6.36813e-16</value> <value variable="p" tolerance="1e-12">4.86278e-14</value> </metric> </metrics> </test>
c09de016a81c35a141cc415f8789d0e15a41af92
449d555969bfd7befe906877abab098c6e63a0e8
/3630/CH3/EX3.15/Ex3_15.sce
b790f9ddd5bc99881f5bc9149ef843eee6f250a0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex3_15.sce
clc; //ex3.15 IL=0.02; //Ampere t=[0.0167 0.00833]; //seceond c=0.0005; // Farad Vr1=(IL*t(1,1))/c; //peakvolt Vr2=(IL*t(1,2))/c; //peakvolt disp('mVpp',Vr1*1000,"Vr1="); disp('mVpp',Vr2*1000,"Vr2="); ////The answers vary due to round off error
2fc85db411df120bb75e68649e2e192b2420d253
449d555969bfd7befe906877abab098c6e63a0e8
/2084/CH18/EX18.7/18_7.sce
86d816a46e5bd54c35ae771828e137b9043183e3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
792
sce
18_7.sce
//developed in windows XP operating system 32bit //platform Scilab 5.4.1 clc;clear; //example 18.7 //calculation of the size of the image of an object placed at a distance from the spherical concave surface //given data u=-40; //object distance(in cm) R=-20; //radius of curvature of the spherical concave surface(in cm) mu1=1; //refractive index of the medium in which object is kept mu2=1.33; //refractive index of the medium of spherical concave surface h1=1; //size of the object(in cm) //calculation v=mu2/((mu2-mu1)/R+(mu1/u)); //formula for refraction at spherical surface h2=(mu1*v*h1)/(mu2*u); //formula for lateral magnification if(h2>0) disp(h2,'image is erect and is of size(in cm)'); else disp(h2,'image is inverted and is of size(in cm)'); end
02d6fece1d828fd2e37970ba82f24df7b28ff42c
fd4b1f9f2f7fc4cac772482125a749e51c444ca1
/Metodo del descenso y potencia.sci
38fc2439a7620eba057b71ce0ebe55a8880e8c23
[]
no_license
barufa/Metodos_Numericos
db0cb98dbf81654ec14f73cb34b84ba7c98ac52a
012d08e8de6e971a38a32c9768f463ca58a07839
refs/heads/master
2020-03-15T22:49:33.054047
2018-09-03T13:18:24
2018-09-03T13:18:24
132,380,939
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,080
sci
Metodo del descenso y potencia.sci
function x = descenso(A,b,x0,iter,e) i=1 x=x0' x0=x v=b'-A*x t=(v'*v)/(v'*(A*v)) x=x+t*v while i<=iter & (norm(x-x0,'inf'))>=e x0=x v=b'-A*x t=(v'*v)/(v'*(A*v)) x=x+t*v i=i+1 end endfunction function [v,r] = potencia(A,v,iter,e) k=1 v=v' t=v y=A*v r=(y(1))/(v(1)) v=y/norm(y,'inf') while k<=iter-1 & (norm(v-t,'inf'))>=e t=v y=A*v v=y/norm(y,'inf') k=k+1 end r=y(1)/v(1) endfunction function S = resolver(A,n,v) S = zeros(n,1) S(n)=v(n)/A(n,n) for i = 1:n-1 s=0 e=n-i for j= e+1:n s=s+A(e,j)*S(j) end S(e)=(v(e)-s)/A(e,e) end endfunction function [x,r]=inverso(A,x,n,iter,e) [P,L,A]=gauss_escalable(A,n) k=1 x=inv(L)*(P*x') t=x x=resolver(A,n,x) while k<=iter & (norm(x-t,'inf'))>=e t=x x=resolver(A,n,x) k=k+1 end endfunction function [x,r] = inverso2(A,x,iter,e) [x,r]=potencia(inv(A),x,iter,e) r=(r^(-1)) endfunction
9050362e40d680307d29f1b0a340ca666089ed17
449d555969bfd7befe906877abab098c6e63a0e8
/3556/CH14/EX14.14/Ex14_14.sce
8b5decc0fc9e13ea456fbbd9f506886cdf3d06a4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,140
sce
Ex14_14.sce
clc // Fundamental of Electric Circuit // Charles K. Alexander and Matthew N.O Sadiku // Mc Graw Hill of New York // 5th Edition // Part 2 : AC Circuits // Chapter 14 : Frequency Response // Example 14 - 14 clear; clc; close; // // Given data L1 = 1.8480; L2 = 0.7650; C1 = 0.7650; C2 = 1.8480; R = 1.0000; R1 = 10.0000 * 10^3; f_cutoff = 50.0000 * 10^3; wc = 1.0000; wc1 = 2*%pi*f_cutoff; // // Calculations Frequency Scale Factor Kf = wc1/wc // Calculations Magnitude Scale Factor Km = R1/R // Calculation L11 and L21 L11 = (Km/Kf)*L1; L21 = (Km/Kf)*L2; // Calculation C11 and C21 C11 = C1/(Km*Kf); C21 = C2/(Km*Kf); // disp("Example 14-14 Solution : "); printf(" \n L11 = Inductance of Induktor 1 = %.3f miliHenry",L11*10^3) printf(" \n L21 = Inductance of Induktor 2 = %.3f miliHenry",L21*10^3) printf(" \n C11 = Capacitance of Capacitor 1 = %.3f pikoFarad",C11*10^12) printf(" \n C21 = Capacitance of Capacitor 2 = %.3f pikoFarad",C21*10^12)
a3fa544f91d1dd8445b15b95f35c9ef99b063894
449d555969bfd7befe906877abab098c6e63a0e8
/1949/CH6/EX6.10/Ex6_10.sce
7811498203881cc6fea477393ba6c75e07e6d118
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
496
sce
Ex6_10.sce
//Chapter-6,Example 6_10,Page 6-30 clc() //Given Values: B=2.5 //Magnetic field in tesla u0=4*%pi*10^-7 //Permeability in free space i0=0.7 //current in the core ri=11*10^-2 //inner radii of core ro=12*10^-2 //outer radii of core //Calculations: r=(ri+ro)/2 //Average radii of core n=3000/(2*%pi*r) //Number of turns //We know, B=u0*ur*n*i0 .Thus, ur=B/(u0*n*i0) printf('Relative Permeability of medium is =%.2f \n',ur)
99f9e5294b774f36fb64d4df2d82b282fac46a4e
449d555969bfd7befe906877abab098c6e63a0e8
/1223/CH6/EX6.6/Ex6_6.sce
fe3a60be03b84b415fc0bb49374916680b63cc83
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
338
sce
Ex6_6.sce
clear; clc; //Example 6.6 Vtn=0.8; Kn=1;//(mA/V^2) Idq=0.5; Vdd=5; Rd=7;//(Kohm) Vgsq=sqrt(Idq/Kn)+Vtn; printf('\nVgsq=%.2f V\n',Vgsq) Vs=-Vgsq Vdsq=Vdd-Idq*Rd-Vs; printf('\nVdsq=%.2f V\n',Vdsq) g_m=2*Kn*(Vgsq-Vtn); printf('\ntransconductance=%.3f mA/V\n',g_m) Av=-g_m*Rd; printf('\nsmall signal voltage gain=%.2f\n',Av)
9bc54b9838b23b0012ca9ffeb173c8ac00a26842
872b5ff8852c926ca1261037de07449db7ac51db
/area-02/vandermonde-interpolacao.sce
8704693679b025dab9299160fe90cf583dcaa3a7
[]
no_license
BerdaSantos/numeric-calculus
20e4c50d9f66f8582e89533a5101f597df6665ec
0698409e7fa4158d6f7dd7e4d60f8a38538b3335
refs/heads/master
2020-05-14T18:07:02.017600
2018-11-23T01:50:38
2018-11-23T01:50:38
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
759
sce
vandermonde-interpolacao.sce
clear x=[2 3]' // 4 pontos -> curva com 4-1 pontos (tinha 4 pontos, botei 2 do meio pq pediu) y=[7 10]' n=length(x); // size(x,1) plot(x,y,'ro-'),xgrid // Faz grafico dos pontos // Monta a matriz de Vandermonde for i=1:n for j=1:n V(i,j)= x(i)^(j-1); end end // a: coefiecientes do polinomio que da forma ao polinomio de interpolacao a = inv(V)*y // ao inves de resolver por LU p = 0// init no polinomio p X = 2.8 // Valor de x em 1 ponto pra interpolar //X = 5:0.1:8 // 0.5, 0.6, ..., 6.5 for k=1:n p = p + a(k)*X.^(k-1); // X.: todos pontos end // grafico do polinomio de grau n-1 que passa por todos pontos de x plot(X,p,'b.-') // numero_condicionamento = norm(V,1)*norm(inv(V),1) // >>>Valor no ponto de interpoolacao e' o p<<<
83195505bba5b69c075c3cc3fcf2619bf2d36a79
449d555969bfd7befe906877abab098c6e63a0e8
/905/CH4/EX4.4/4_4.sce
42167a9cc20551511734a3c077837c20ce623479
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
4,300
sce
4_4.sce
clear; clc; // Illustration 4.4 // Page: 237 printf('Illustration 4.4 - Page: 237\n\n'); // solution //*****Data*****// // a-ethanol b- gas(CO2 rich vapor) c-liquid water P = 110; // [kPa] T = 303; // [K] R = 8.314; Vb = 180; // [kmole/h] xab = 0.02; // [molar composition of ethanol in gas] Vc = 151.5; // [kmole/h] d = 0.97; // [ethanol absorbed] Ma = 46; // [gram/mole] Mb = 44; // [gram/mole] Mc = 18; // [gram/mole] g = 9.8; // [square m/s] //*****// // For Inlet gas Mg = (1-xab)*Mb+xab*Ma; // [gram/mole] V = Vb*Mg/3600; // [kg/h] rowg = P*Mg/(R*T); // [kg/cubic m] Qg = V/rowg; // [cubic m/s] // For exiting liquid b = Vb*xab*Ma*d; // [ethanol absorbed in kg/h] L = (Vc*Mc+b)/3600; // [kg/s] rowl = 986; // [kg/cubic m] X = (L/V)*(sqrt(rowg/rowl)); // From equation 4.8 Yflood = exp(-(3.5021+1.028*log(X)+0.11093*(log(X))^2)); printf('Illustration 4.4(a) - Page: 237\n\n'); // Solution(a) // For 50 mm metal Hiflow rings Fp = 16; // [square ft/cubic ft] ul = 6.31*10^-4; // [Pa.s] // From equation 4.6 Csflood = sqrt(Yflood/(ul^0.1*Fp)); // [m/s] // From equation 4.7 vgf = Csflood/(sqrt(rowg/(rowl-rowg))); // [m/s] // From equation 4.9 deltaPf = 93.9*(Fp)^0.7; // [Pa/m of packing] // For operation at 70% of the flooding velocity f = 0.7; // From equation 4.10 vg = f*vgf; // [m/s] D = sqrt(4*Qg/(vg*%pi)); // From Table 4.1, for 50 mm metal Hiflow rings a = 92.3; // [square m/cubic m] Ch = 0.876; e = 0.977; Cp = 0.421; // From equation 4.13 dp = 6*(1-e)/a; // [m] // From equation 4.12 Kw = 1/(1+(2*dp/(3*D*(1-e)))); // The viscosity of the gas phase is basically that of air at 303 K and 110 kPa ug = 1.45*10^-5; // [kg/m.s] // From equation 4.15 Reg = vg*rowg*dp*Kw/(ug*(1-e)); // From equation 4.14 sia_o = Cp*((64/Reg)+(1.8/(Reg^0.08))); // From equation 4.11 // deltaP_o/z = I I = sia_o*a*rowg*vg^2/(2*Kw*e^3); // [Pa/m] // Now Gx = L/(%pi*D^2/4); // [kg/square m.s] Rel = Gx/(a*ul); Frl = Gx^2*a/(rowl^2*g); // From equation 4.5 // ah/a = x x = 0.85*Ch*Rel^0.25*Frl^0.1; // From equation 4.3 hl = (12*Frl/Rel)^(1/3)*(x)^(2/3); // From equation 4.16 // daltaP/deltaP_o = Y Y = (e/(e-hl))^1.5*exp(Rel/200); // Therefore // deltaP/z = H H = Y*I; // [Pa/m] printf('Since the pressure drop is too high, we must increase the tower diameter to reduce the pressure drop.\n'); // The resulting pressure drop is too high; therefore, we must increase the tower diameter to reduce the pressure drop. Appendix D presents a Mathcad computer // program designed to iterate automatically until the pressure drop criterion is satisfied. // From the Mathcad program we get D1 = 0.738; // [m] printf("The tower diameter for pressure drop of 300 Pa/m of packed height is %f m\n\n",D1); printf('Illustration 4.4(b) - Page: 241\n\n'); // Solution(b) // For the tower diameter of D = 0.738 m, the following intermediate results were obtained from the computer program in Appendix D: vg1 = 2.68; // [m/s] vl1 = 0.00193; // [m/s] hl1 = 0.017; ah1 = 58.8; // [square m/cubic m] Reg1 = 21890; Rel1 = 32.6; Kw1 = 1/(1+(2*dp/(3*D1*(1-e)))); f1 = vg1/vgf; printf("The fractional approach to flooding conditions is %f\n\n",f1); printf('Illustration 4.4(c) - Page: 242\n\n'); // Solution(c) // For ethanol Vc_a = 167.1; // [cubic cm/mole] sigma_a = 4.53*10^-10; // [m] // E/k = M M_a = 362.6; // [K] // For carbon dioxide sigma_b = 3.94*10^-10; // [m] M_b = 195.2; // [K] // From equation 1.48 Vb_a = 0.285*Vc_a^1.048; // [cubic cm/mole] e1 = (9.58/(Vb_a)-1.12); // From equation 1.53 Dl = 1.25*10^-8*((Vb_a)^-0.19 - 0.292)*T^1.52*(ul*10^3)^e1; // [square cm/s] // From equation 1.49 Dg = 0.085; // [square cm/s] // From Table 4.2, for 50 mm metal Hiflow rings Cl = 1.168 Cv = 0.408; // From equation 4.17 kl = 0.757*Cl*sqrt(Dl*a*vl1*10^-4/(e*hl1)); // [m/s] mtcl = kl*ah1; // [s^-1] Sc = ug/(rowg*Dg*10^-4); // From equation 4.18 ky = 0.1304*Cv*(Dg*10^-4*P*1000/(R*T))*(Reg1/Kw1)^(3/4)*Sc^(2/3)*(a/(sqrt(e*(e-hl1)))); // [mole/square m.s] mtcg = ky*ah1*10^-3; // [kmole/cubic m.s] printf("The gas and liquid volumetric mass transfer coefficients are %e kmole/cubic m.s and %e s^-1 respectively.\n\n",mtcg,mtcl);
acc6f5a9e2f13550900fdb4ddd82cec840fc05b5
1573c4954e822b3538692bce853eb35e55f1bb3b
/DSP Functions/allpasslp2hp/test_11.sce
04881f68755d0cbc3e56515cdbfc583ce83037c4
[]
no_license
shreniknambiar/FOSSEE-DSP-Toolbox
1f498499c1bb18b626b77ff037905e51eee9b601
aec8e1cea8d49e75686743bb5b7d814d3ca38801
refs/heads/master
2020-12-10T03:28:37.484363
2017-06-27T17:47:15
2017-06-27T17:47:15
95,582,974
1
0
null
null
null
null
UTF-8
Scilab
false
false
269
sce
test_11.sce
// Test # 11 : Valid input test case #1 exec('./allpasslp2hp.sci',-1); [n,d]=allpasslp2hp(0.3,0.6); disp(d); disp(n); // //Scilab Output //d= 1 -0.1755705 //n= 0.1755705 -1 //Matlab Output //d = 1.0000 -0.1756 //n = 0.1756 -1.0000
206df337d719fdeaa700b4c4e8a5125047e3bb5f
634af5304c38dcb1f46551b3af0cd17d9538279f
/aula1/a1e4-histograma.sce
9927f0501a8369bc72c2df865f1bf449da343329
[]
no_license
taiaraujo/Processos_Estoc-sticos
3b35ab57321d08047621f7045ae62a5c937a3346
85677fe2d055ed621d399c64cec14eb6ec1875de
refs/heads/master
2021-04-28T03:06:13.349687
2018-02-19T23:07:28
2018-02-19T23:07:28
122,131,723
0
0
null
null
null
null
UTF-8
Scilab
false
false
334
sce
a1e4-histograma.sce
//histograma clear n = 10; U = rand(1,n); //distribuição uniforme X = zeros(1,n); for i=1:n if U(i)<0.5 X(i) = 1; end end barrasU = 10; barrasX = 2; [NU,Uhist] = histc(barrasU, U); [NX,Xhist] = histc(barrasX, X); figure subplot(2,1,1) histplot(barrasU, U) subplot(2,1,2) histplot(barrasX, X)
ed9635cc22e2dbce4cbbbe009f669136c4cc1d64
beca18778f40d44e713160c5b0e8136d8a92cad8
/scilab/cross.sci
1968c9a5e7d31ed672be614967ad46369308f256
[]
no_license
thomasantony/enjomitch-orbiter
9542df3dfc83ce0a6cf06ec78dca91b4c1a0babf
83967b7bf8f8c49d1e90f7b904846e66d1ad6e37
refs/heads/master
2022-12-02T07:47:03.976695
2020-03-22T13:54:57
2020-03-22T13:54:57
286,159,679
0
0
null
null
null
null
UTF-8
Scilab
false
false
223
sci
cross.sci
function v=cross(a,b) // Produit vectoriel entre a et b v=[a(2)*b(3)-b(2)*a(3);a(3)*b(1)-b(3)*a(1);a(1)*b(2)-b(1)*a(2)]; s=size(a); // On remet le vecteur initial à la forme du vecteur a v=matrix(v,s(1),s(2)); endfunction
ac689ab4f70dd5fc3637f44485024e7865673209
3592fbcb99d08024f46089ba28a6123aeb81ff3c
/src/asserVisu/interactionMatrix.sci
6b4a898d75435264944319401b8b21208b4f374c
[]
no_license
clairedune/sciGaitanLib
a29ab61206b726c6f0ac36785ea556adc9ef03b9
7498b0d707a24c170fc390f7413359ad1bfefe9f
refs/heads/master
2020-12-11T01:51:13.640472
2015-01-28T13:52:26
2015-01-28T13:52:26
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
9,768
sci
interactionMatrix.sci
//---------------------------------------// // compute the interaction matrix // associated to a point // and for a 6ddl control // Typically, a free 6ddl camera // author : Claire Dune // date : decembre 2009 //---------------------------------------// function L = matIntPoint6ddl(x,y,Z) // compute the interaction matrix for a 6ddl camera L = [-1/Z , 0 , x/Z, x*y ,-(1+x^2), y ; 0 , -1/Z , y/Z ,1+y^2 , - x*y , -x ] ; endfunction //---------------------------------------// // compute Lz matrix for one point // author : Claire Dune // date : septembre 2013 //---------------------------------------// function L = matLzPoint6ddl(x,y) // compute the Lz Matrix described in Folio & Cadenat L = [0 , 0, -1, -y ,-x, 0] ; endfunction //---------------------------------------// // compute the interaction matrix // associated to a point // and for a 3ddl control // Typicaly the COM of the HRP2 // // author : Claire Dune // date : decembre 2009 //---------------------------------------// function L = matIntPoint3ddl(x,y,Z) // 3ddl vx, vz and thetay L = [ -1/Z , x/Z , -(1+x^2); 0 ,y/Z , -x*y ]; endfunction //---------------------------------------// // compute the interaction matrix // associated to 5 points // and for a 6ddl control // Typically, a free 6ddl camera // // only the projection of the points in the // image plane are known // // author : Claire Dune // date : decembre 2009 //---------------------------------------// function L = matIntMire6ddl(p,Zin) Z = 0; // point mire, 2 feature per point N = length(p)/2; //----- test on Zin if (length(Zin)==N) Z = Zin; //disp('Z was a vector, no change') else Z = Zin*ones(N,1); //disp('Z was a scalar, create a vector, change') end L=[]; for i=1:N L= [L; matIntPoint6ddl(p((i-1)*2+1),p((i-1)*2+2),Z(i))]; end endfunction //---------------------------------------// // compute the Lz matrix for n 2D points // to estimate z // // only the projection of the points in the // image plane are known // // author : Claire Dune // date : september 2013 (ICRA) //---------------------------------------// function L = matLzMire6ddl(p) N = length(p)/2; L=[]; for i=1:N L= [L; matLzPoint6ddl(p((i-1)*2+1),p((i-1)*2+2))]; end endfunction //---------------------------------------// // Compute the ODE relative to the visual // servoing control law, see Folio's // // // author : Claire Dune // date : september 2013 (ICRA) //---------------------------------------// function Xdot =vsOde(t,X,v) // t mandatory // L the interaction matrix // v the velocity N_in = length(X)/3; s_in =(X(1:2*N_in)); Z_in =(X(2*N_in+1:$)); L_in = matIntMireC(s_in,Z_in); Lz_in = matLzMire6ddl(s_in); Xdot = [L_in;Lz_in]*v; //disp('Xdot!!----') endfunction //---------------------------------------// // compute the interaction matrix // associated to 5 points // and for a 3ddl control // Typicaly the COM of the HRP2 // // only the projection of the points in the // image plane are known // // author : Claire Dune // date : decembre 2009 //---------------------------------------// function L = matIntMire3ddl(p,Zint) Z = 0; // point mire, 2 feature per point N = length(p)/2; //----- test on Zint if (length(Zint)==N) Z = Zint; //disp('Z was a vector, no change') else Z = Zint*ones(N,1); //disp('Z was a scalar, create a vector, change') end L=[]; for i=1:N L= [L; matIntPoint3ddl(p((i-1)*2+1),p((i-1)*2+2),Z(i))]; end endfunction //---------------------------------------// // compute the interaction matrix // associated to 5 points // and for a 6ddl control // Typically, a free 6ddl camera // // In this case, the 3D positions of the // points have been estimated // // author : Claire Dune // date : decembre 2009 //---------------------------------------// function L = matInt3dMire6ddl(cP) N = length(cP)/3; L = [] ; for i=1:N L= [ L ; matIntPoint6ddl(cP(1,i)/cP(3,i),cP(2,i)/cP(3,i),cP(3,i))]; end endfunction //---------------------------------------// // compute the interaction matrix // associated to 5 points // and for a 3ddl control // Typicaly the COM of the HRP2 // // In this case, the 3D positions of the // points have been estimated // // author : Claire Dune // date : decembre 2009 //---------------------------------------// function L = matInt3dMire3ddl(cP) N = length(cP)/3; L = [] ; for i=1:N L= [ L ; matIntPoint3ddl(cP(1,i)/cP(3,i),cP(2,i)/cP(3,i),cP(3,i))]; end endfunction //-------------------------------// // compute the interaction matrix // associated to 5 points // and for a 3ddl control // Typicaly the COM of the HRP2 // // only the projection of the points in the // image plane are known // // author : Claire Dune // date : decembre 2009 //---------------------------------// function L_out = matIntMireD(s_in,Z_in) global Zdes_global; global sdes_global; L_out = matIntMire6ddl(sdes_global,Zdes_global); endfunction //-------------------------------// // compute the interaction matrix // associated to 5 points // and for a 3ddl control // Typicaly the COM of the HRP2 // // only the projection of the points in the // image plane are known // // author : Claire Dune // date : decembre 2009 //---------------------------------// function L_out = matIntMireC(s_in,Z_in) L_out = matIntMire6ddl(s_in,Z_in); endfunction //-------------------------------// // compute the interaction matrix // associated to 5 points // and for a 3ddl control // Typicaly the COM of the HRP2 // // only the projection of the points in the // image plane are known // // author : Claire Dune // date : decembre 2009 //---------------------------------// function L_out = matIntMireP(s_in,Z_in) global Zdes_global; L_out = matIntMire6ddl(s_in,Zdes_global); endfunction //-------------------------------// // compute the interaction matrix // associated to 5 points // and for a 3ddl control // Typicaly the COM of the HRP2 // // only the projection of the points in the // image plane are known // // author : Claire Dune // date : decembre 2009 //---------------------------------// function L_out = matIntMireM(s_in,Z_in) global Zdes_global; global sdes_global; L_des = matIntMire6ddl(sdes_global,Zdes_global); L_current = matIntMire6ddl(s_in,Z_in); L_out = 0.5*(L_des+L_current); endfunction //-------------------------------// // compute the interaction matrix // associated to 5 points // and for a 3ddl control // Typicaly the COM of the HRP2 // // only the projection of the points in the // image plane are known // // author : Claire Dune // date : decembre 2009 //---------------------------------// function L_out = matIntMireC(s_in,Z_in) L_out = matIntMire6ddl(s_in,Z_in); endfunction //----------------------------------// // First try of visual servoing for walking // 10/02/10 // The cost funciton has to be linear // the interaction matrix used is the desired matrix // only for x and z //------------------------------------// function L_out = matIntDLinearWalk(s_des,Z_des,Np, Nbpts) // Np is the lenght of the horizon // Nbpts is the number of point of the target // sdes id a vector of 2*Np // Zdes is a vector of Np // compute the whole interaction matrix L = matIntMire6ddl(s_des,Z_des); // take the 2 usefull columns X and Z Lx = L(:,1); Ly = L(:,3); // stack the matrices L_out_x = []; L_out_y = []; Zer = zeros(Nbpts*2,1); for i = 1:Np; L_ligne = []; for j=1:Np if i==j L_ligne = [L_ligne Lx]; else L_ligne = [L_ligne Zer]; end end L_out_x = [L_out_x;L_ligne] end for i = 1:Np; L_ligne = []; for j=1:Np if i==j L_ligne = [L_ligne Ly]; else L_ligne = [L_ligne Zer]; end end L_out_y = [L_out_y;L_ligne] end L_out = [L_out_x L_out_y]; endfunction //------------------------------// // R Matrix //------------------------------// function [Rres,Rx] = matR(Np) R = zeros(Np,Np); Zer = R; for i=1:Np for j=1:i R(i,j)=1; end end Rres = [R Zer ; Zer R]; Rx =R; endfunction //------------------------------// // L Matrix //------------------------------// function [Lxx,Lyy,Lxy,Lyx] = matL(L_in,Np) // Lin'Lin LL = L_in'*L_in; Lxx = LL(1:Np,1:Np); Lyy = LL(Np+1:2*Np,Np+1:2*Np); Lxy = LL(1:Np,Np+1:2*Np); Lyx = LL(Np+1:2*Np,1:Np); endfunction //----------------------------------// // M Matrix //-----------------------------------// function [Mxx,Myy,Mxy,Myx,Rres,Ldes] = matLinearAsserVisu(sdes,Zdes,Np,Nbpts) [Rres,Rx] = matR(Np); Ldes = matIntDLinearWalk(sdes,Zdes,Np, Nbpts); [Lxx,Lyy,Lxy,Lyx] = matL(Ldes,Np); Mxx = Rx' * Lxx * Rx ; Myy = Rx' * Lyy * Rx ; Mxy = Rx' * Lxy * Rx ; Myx = Rx' * Lyx * Rx ; endfunction //--------------------------------// // ThetaU interaction matrix // cdRc: current rotation in the reference frame //--------------------------------// function L = matIntThetaU(thetaU) theta = norm(thetaU); L0 = zeros(3,3); if(theta~=0) u = thetaU./theta; else u = thetaU; end Ux = skew(u); Lw = eye(3,3)+ theta/2*Ux+ (1-sinc(theta)/(sinc(theta/2))^2)*Ux*Ux; L = [L0 Lw] endfunction function L = matIntposeThetaU(posetU) cdRc = rotationMatrixFromThetaU(posetU(4:6)); Lt = [cdRc zeros(3,3)]; Lr = matIntThetaU(posetU(4:6)); L = [Lt;Lr]; endfunction //---------------------------------------// function IsMatIntLoaded() disp('Matrice interaction is loaded') endfunction
11ca33886f98a53acad55099e3cd24ac8857f4e0
449d555969bfd7befe906877abab098c6e63a0e8
/692/CH6/EX6.16/P6_16.sce
4533012f1072e37118742caaadc0a5120c842fd6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
508
sce
P6_16.sce
//EXAMPLE 6.16 //Partial fraction expansion clc; clear; z=%z; num = z^3; den = 18*z^3 + 3*z^2 - 4*z - 1; elts=factors(den); disp(elts,'the factors are :') ; func = num/den; //the partial fraction gives: p1 = horner((1/(1+0.3333333/z)^2),0.5); disp(p1,'p1 = '); p2 = horner(1/((1-0.5/z)),-0.3333333); disp(p2,'p2 = '); p3 = horner(0.6/((1-0.5/z)),-0.3333333); disp(p3,'p3 = '); disp('partial fraction gives : '); disp(p1*z/elts(1),'h1 = '); disp(p3*z/elts(3),'h2 = '); disp(p2*z^2/(elts(2)*elts(2)),'h3 = ');
5374e44812184fac637e985d2b39a2fecdaabb8b
449d555969bfd7befe906877abab098c6e63a0e8
/3751/CH12/EX12.5/Ex12_5.sce
93c09f621c9c8984e036c4306e083be33ab0e882
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,901
sce
Ex12_5.sce
//Fluid Systems - By Shiv Kumar //Chapter 12- Reciprocating Pumps //Example 12.5 //To Determine the Pressure Head on Piston at Begining, Middle and End of Suction Stroke. clc clear //Given Data:- L=150; //Length of Stroke, mm l_s=7; //Length of Suction Pipe, m ds_by_D=3/4; //Ratio of Suction Pipe Diameter to Piston Diameter, ds/D hs=2.5; //Suction Head, m ds=75; //Diameter of Suction Pipe, mm N=75; //Crank Speed, rpm f=0.01; //Co-efficient of Friction //Data Used:- g=9.81; //Acceleration due to gravity, m/s^2 h_atm=10.33; //Atmospheric Pressure Head, m of water //Computations:- L=L/1000; //m ds=ds/1000; //m r=L/2; //Crank radius, m A_by_as=(1/ds_by_D)^2; omega=2*%pi*N/60; //Angular Velocity, rad/s //At Begining of Suction Stroke, theta=0; //degrees h_as=(l_s/g)*A_by_as*omega^2*r*cosd(theta); //Acceleration Head, m of water h_fs=(4*f*l_s/(2*g*ds))*(A_by_as*omega*r*sind(theta))^2; //Head loss due to friction, m of water h_v=hs+h_fs+h_as; //Pressure Head on Piston, m of water Vaccum h_abs=h_atm-h_v; //Pressure Head on Piston, m of water Absolute //Result 1 printf("At Begining of Suction Stroke\n Pressure Head on Piston=%.2f m of water Vaccum \n\t\t\t =%.2f m of water Absolute\n\n",h_v,h_abs) //The answer vary due to round off error //At Mid of Suction Stroke, theta=90; //degrees h_as=(l_s/g)*A_by_as*omega^2*r*cosd(theta); //Acceleration Head, m of water h_fs=(4*f*l_s/(2*g*ds))*(A_by_as*omega*r*sind(theta))^2; //Head loss due to friction, m of water h_v=hs+h_fs+h_as; //Pressure Head on Piston, m of water Vaccum h_abs=h_atm-h_v; //Pressure Head on Piston, m of water Absolute //Result 2 printf("At Middle of Suction Stroke\n Pressure Head on Piston=%.4f m of water Vaccum \n\t\t\t =%.3f m of water Absolute\n\n",h_v,h_abs) //The answer vary due to round off error //At End of Suction Stroke, theta=180; //degrees h_as=(l_s/g)*A_by_as*omega^2*r*cosd(theta); //Acceleration Head, m of water h_fs=(4*f*l_s/(2*g*ds))*(A_by_as*omega*r*sind(theta))^2; //Head loss due to friction, m of water h_v=hs+h_fs+h_as; //Pressure Head on Piston, m of water Vaccum h_abs=h_atm-h_v; //Pressure Head on Piston, m of water Absolute //Result 3 printf("At End of Suction Stroke\n Pressure Head on Piston=%.2f m of water Vaccum \n\t\t\t =%.2f m of water Absolute\n\n",h_v,h_abs) //The answer vary due to round off error
b20f1090c07241c988b8e1c13098de1d84bf0a69
a5e2e29746cbbbfd0c0bd14cc542cd3ba2bf7d3f
/Sem2_Mathe/3D-Graphics/3D_2_schaubild_fxy.sce
90d42384659f2b3c673cc798d9ca90e084e49777
[]
no_license
DonnyAwesome/UNI
99580eabc0ff200eeecb72d866313b89cd28d0cb
c028434b672ae1962c2074fc249012d68a63db2b
refs/heads/master
2020-04-02T13:05:02.067280
2019-02-14T02:14:06
2019-02-14T02:14:06
154,466,384
0
0
null
2018-10-24T08:33:10
2018-10-24T08:33:10
null
UTF-8
Scilab
false
false
386
sce
3D_2_schaubild_fxy.sce
//2. Schubild von f(x,y) clf() x = -2:0.05:2; y = 0:.05:4; //x = linspace(-2, 2); //y = linspace(0, 4); [X, Y] = meshgrid(x, y) F = X.^2 + Y.^2; surf(X, Y, F); //Achsenbeschriftung a = gca(); // a.font_size = 2; //Schriftgröße für x,y,z scala xlabel('x-Achse', 'fontsize', 5) ylabel('y-Achse', 'fontsize', 5) zlabel('z-Achse', 'fontsize', 5)
878986c1772564708deb88be2089bc5d16e56194
449d555969bfd7befe906877abab098c6e63a0e8
/2510/CH15/EX15.8/Ex15_8.sce
d9c07b2a4619d9310bb4eb2cae07377dc4ffecb7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
3,719
sce
Ex15_8.sce
//Variable declaration: uC = 3.7*10**-4 //Viscosity of benzene (lb/ft.s) uH = 2.05*10**-4 //Viscosity of water @200 . (lb/ft.s) u2 = 2.16*10**-4 //Viscosity of water @192 . (lb/ft.s) pC = 54.8 //Density of benzene (lb/ft^3) pH = 60.13 //Density of water (lb/ft^3) cpC = 0.415 //Specific heat capacity of benzene (Btu/lb..) cpH = 1 //Specific heat capacity of water (Btu/lb..) sgC = 0.879 kC = 0.092 //Thermal conductivity of benzene (Btu/h.ft..) kH = 0.392 //Thermal conductivity of water @200 . (Btu/h.ft..) k2 = 0.390 //Thermal conductivity of water @192 . (Btu/h.ft..) mC = 2500 //Flow rate of benzene (lb/s) mH = 4000 //Flow rate of water (lb/s) Re = 13000 //Reynolds number dTc = 120-60 //Difference in temperature heating for benzene Tw = 200 //Temperatperature of hot water (.) //For 2-inch schedule 40 pipe Ai = 0.541 //Inside area of pipe (ft^2/ft) Ao = 0.622 //Outside area of pipe (ft^2/ft) Di = 2.067 //Inside diameter of pipe (inch) Do = 2.375 //Outside diameter of pipe (inch) Si = 0.0233 //Inside surface area of pipe (ft^2) dXw = 0.128 //Width of pipe (ft) pi = %pi //For 4-inch schedule 40 pipe Dio = 4.026 //Inside diameter of pipe (inch) Doi = Do //Outside diameter of pipe (inch) kw = 26 //Calculations: function [a] = St(Re,Pr) //Dittus Boelter equation a = 0.023*Re**-0.2*Pr**-0.667 endfunction //For inside tubes: Dicalc = 4*mC/(Re*pi*uC)/3600 //Inside diameter (ft) mHcalc = Re*pi*uH*(Doi+Dio)/4*3600/12 //Mass flow rate of water (lb/h) Q = mC*cpC*dTc //Heat in water (Btu/h) dTH = Q/mH //Temperature difference of water (.) THo = Tw - dTH //Outlet temperature of water (.) THav = (Tw+THo)/2 //Average temperature of water (.) //For benzene: PrC = cpC*uC/kC*3600 //Prandtl number StC = round(St(13000, PrC) * 10**5)/10**5 //Stanton number hi = StC*cpC*mC/Si //Heat transfer coefficient (Btu/h.ft^2..) //For water: ReH = 4*mH/3600/(pi*u2*(Doi+Dio)/12) //Reynolds number PrH = cpH*(u2)/k2*3600 //Prandtl number StH = round(St(ReH, PrH) * 10**5)/10**5 //Stanton number Sann = pi/4*(Dio**2-Doi**2)/144 //Surface area of annulus (ft^2) ho = round(StH*cpH*mH/Sann) //Heat transfer coefficient (Btu/h.ft^2..) //For pipe: Dlm = (Do-Di)/log(Do/Di)*12 //Log mean difference in diameter (ft) Uo = 1/(Do/Di/hi + dXw*Do/kw/Dlm + 1/ho) //Overall heat transfer coefficient (Btu/h.ft^2..) dTlm = (124.4-80)/log(124.4/80) //Log mean temperature difference (.) L = Q/(Uo*0.622*dTlm) //Length of pipe (ft) //Result: printf("The required length of pipe: %.1f ft",L)
b089b9c5cf9abf6ccc2f8b27a9ee00051fcc9f2e
449d555969bfd7befe906877abab098c6e63a0e8
/1019/CH8/EX8.15/Example_8_15.sce
41336e333faffcd0e60689c387ea5f0e9ceedabb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
579
sce
Example_8_15.sce
//Example 8.15 clear; clc; //Given T=298;//temperature in K R=8.314;//gas constant in J K^-1 mol^-1 delGfoH2Ol=-237.2;//standard enthalpy of formation of water in kJ mol^-1 pH2O=23.7;//vapour pressure of water in mm Hg P=760;//standard pressure in mm Hg //To determine delGfoH2Og Kp=pH2O/P;//equillibrium constant for given reaction delGo=(-1)*R*T*log(Kp)/1000;//delGo in kJ mol^-1 delGfoH2Og=delGo+delGfoH2Ol;//free energy of formation of water vapour in kJ mol^-1 mprintf('Free energy of formation of water vapour,delGfoH2Og = %f kJ mol^-1',delGfoH2Og); //end
cfeb430877bf0dc9b3c660d665f4d04cdeb03d79
a2919a91aa01a261d8f362383439831d8f774a16
/Phase1_functions/function_final/warpaffine/builder_gateway_cpp.sce
776043a24d841e458d01025916b38792bd641738
[]
no_license
priyanka1111/Scilab-Image-Processing-Toolbox-using-OpenCV
d673451a979dee4ae67d23aa51c42aaa5a34c951
d9d4ef736e88d172796aa59e113f5a6c9380f3f2
refs/heads/master
2020-12-30T11:15:31.975435
2020-10-03T09:30:19
2020-10-03T09:30:19
38,579,256
0
0
null
2020-10-02T04:49:55
2015-07-05T18:26:04
C++
UTF-8
Scilab
false
false
575
sce
builder_gateway_cpp.sce
// This file is released under the 3-clause BSD license. See COPYING-BSD. function builder_gw_cpp() copyfile("../common.h",TMPDIR); copyfile("../common.cpp",TMPDIR); WITHOUT_AUTO_PUTLHSVAR = %t; tbx_build_gateway("skeleton_cpp3451", .. ["warpaffine","warpaffine"], .. ["warpaffine.cpp"], .. get_absolute_file_path("builder_gateway_cpp.sce"),[],"g++ -ggdb `pkg-config --cflags opencv` -o `basename warpaffine.cpp .cpp` warpaffine.cpp `pkg-config --libs opencv`"); endfunction builder_gw_cpp(); clear builder_gw_cpp; // remove builder_gw_cpp on stack
59197a56af6d99549dcf0914a09fd207ad09ea78
449d555969bfd7befe906877abab098c6e63a0e8
/2078/CH10/EX10.2/Example10_2.sce
0c6437691aa33aa03621fd7882bdf8ee3f422c8a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
255
sce
Example10_2.sce
//Exa 10.2 clc; clear; close; //Given data : W=680;//kg/km L=260;//m U_strength=3100;//kg SF=2;//safety factor Clearance=10;//m T=U_strength/SF;//kg w=W/1000;//kg S=w*L^2/(8*T);//,m h=Clearance+S;//m disp(h,"Height above the ground(m) :");
41eadad1823a2451016d0009486f0987dba0cb17
449d555969bfd7befe906877abab098c6e63a0e8
/2132/CH6/EX6.4/Example6_4.sce
27afe507053823a3b5cc5fa396a950ef014ff114
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Example6_4.sce
//Example 6.4 clc; clear; close; format('v',5); //Given data : Q=180/62;//litres/sec Q=Q/1000;//cumec Dc=25/1000;//m H=1.9;//m ac=%pi/4*Dc^2;//m^2 g=9.81;//constant Cv=Q/sqrt(2*g*H)/ac; disp(Cv,"Coefficient of velocity : ");
292d14fc00ce97b7f8e2cede1d0301ee03865fb0
ac66d3377862c825111275d71485e42fdec9c1bd
/Resources/res/map/map2102.sce
440a476cfdde6e3cab3d3545bea62f662abac921
[]
no_license
AIRIA/CreazyBomber
2338d2ad46218180f822682d680ece3a8e0b46c3
68668fb95a9865ef1306e5b0d24fd959531eb7ad
refs/heads/master
2021-01-10T19:58:49.272075
2014-07-15T09:55:00
2014-07-15T09:55:00
19,776,025
0
2
null
null
null
null
UTF-8
Scilab
false
false
3,507
sce
map2102.sce
<?xml version="1.0" encoding="UTF-8"?> <Project Name="map2102" Width="13" Height="15" CellSize="40" BackgroundSize="1" Background="13plus.png"> <Cell Name="木箱" X="4" Y="1" /> <Cell Name="树" X="5" Y="1" /> <Cell Name="仓鼠-bt" X="8" Y="1" arg0="44" /> <Cell Name="丛林图腾2" X="9" Y="1" /> <Cell Name="出生点" X="1" Y="2" /> <Cell Name="树" X="2" Y="2" /> <Cell Name="木箱" X="3" Y="2" /> <Cell Name="丛林图腾2" X="4" Y="2" /> <Cell Name="木箱" X="5" Y="2" /> <Cell Name="丛林图腾2" X="6" Y="2" /> <Cell Name="豌豆-右" X="7" Y="2" arg0="3" arg1="3,0" arg2="3" /> <Cell Name="丛林图腾2" X="10" Y="2" /> <Cell Name="蜘蛛怪-bt" X="11" Y="2" arg0="26" /> <Cell Name="木箱" X="1" Y="3" /> <Cell Name="树" X="3" Y="3" /> <Cell Name="樱桃树" X="6" Y="3" /> <Cell Name="樱桃树" X="8" Y="3" /> <Cell Name="木箱" X="10" Y="3" /> <Cell Name="丛林图腾2" X="2" Y="4" /> <Cell Name="池塘-左上" X="4" Y="4" /> <Cell Name="池塘-上" X="5" Y="4" /> <Cell Name="池塘-右上" X="6" Y="4" /> <Cell Name="豌豆-左" X="9" Y="4" arg0="2" arg1="3,0" arg2="3" /> <Cell Name="蜘蛛怪-bt" X="10" Y="4" arg0="26" /> <Cell Name="木箱" X="11" Y="4" /> <Cell Name="木箱" X="1" Y="5" /> <Cell Name="树" X="2" Y="5" /> <Cell Name="池塘-左" X="4" Y="5" /> <Cell Name="池塘-中" X="5" Y="5" /> <Cell Name="池塘-右" X="6" Y="5" /> <Cell Name="木箱" X="8" Y="5" /> <Cell Name="木箱" X="9" Y="5" /> <Cell Name="丛林图腾2" X="11" Y="5" /> <Cell Name="木箱" X="2" Y="6" /> <Cell Name="池塘-左" X="4" Y="6" /> <Cell Name="池塘-内角右下" X="5" Y="6" /> <Cell Name="池塘-右下" X="6" Y="6" /> <Cell Name="地洞" X="9" Y="6" arg0="0" arg1="0,0,0,0,1" arg2="1" /> <Cell Name="丛林图腾2" X="11" Y="6" /> <Cell Name="丛林图腾2" X="2" Y="7" /> <Cell Name="蜘蛛怪-bt" X="3" Y="7" arg0="26" /> <Cell Name="池塘-左下" X="4" Y="7" /> <Cell Name="池塘-右下" X="5" Y="7" /> <Cell Name="花" X="6" Y="7" /> <Cell Name="仓鼠-bt" X="8" Y="7" arg0="44" /> <Cell Name="木箱" X="9" Y="7" /> <Cell Name="樱桃树" X="1" Y="8" /> <Cell Name="地洞" X="2" Y="8" arg0="0" arg1="0,0,0,0,1" arg2="1" /> <Cell Name="木箱" X="6" Y="8" /> <Cell Name="豌豆-右" X="7" Y="8" arg0="3" arg1="3,0" arg2="3" /> <Cell Name="树" X="10" Y="8" /> <Cell Name="丛林图腾2" X="1" Y="9" /> <Cell Name="樱桃树" X="2" Y="9" /> <Cell Name="樱桃树" X="4" Y="9" /> <Cell Name="樱桃树" X="5" Y="9" /> <Cell Name="木箱" X="6" Y="9" /> <Cell Name="地洞" X="8" Y="9" arg0="0" arg1="0,0,0,0,1" arg2="1" /> <Cell Name="树" X="11" Y="9" /> <Cell Name="豌豆-右" X="2" Y="10" arg0="3" arg1="3,0" arg2="3" /> <Cell Name="丛林图腾2" X="5" Y="10" /> <Cell Name="石块" X="10" Y="10" /> <Cell Name="仓鼠-bt" X="3" Y="11" arg0="44" /> <Cell Name="通关点-1" X="5" Y="11" /> <Cell Name="木箱" X="7" Y="11" /> <Cell Name="蜘蛛怪-bt" X="8" Y="11" arg0="26" /> <Cell Name="丛林图腾2" X="9" Y="11" /> <Cell Name="树" X="10" Y="11" /> <Cell Name="木箱" X="11" Y="11" /> <Cell Name="丛林图腾2" X="2" Y="12" /> <Cell Name="木箱" X="4" Y="12" /> <Cell Name="地洞" X="5" Y="12" arg0="0" arg1="0,0,0,0,1" arg2="1" /> <Cell Name="木箱" X="9" Y="12" /> <Cell Name="丛林图腾2" X="1" Y="13" /> <Cell Name="樱桃树" X="7" Y="13" /> <Cell Name="丛林图腾2" X="11" Y="13" /> </Project>
b2335b315ce003b76c04679d2fe1507bf0851e4c
449d555969bfd7befe906877abab098c6e63a0e8
/1541/CH1/EX1.33/Chapter1_Example33.sce
dd100c50b8dd12a44e48d6857738542945259660
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
843
sce
Chapter1_Example33.sce
//Chapter-1, Example 1.21, Page 1.49 //============================================================================= clc clear clc clear //INPUT DATA N1=1500;//Initial speed in rpm N2=1200;//Final speed in rpm Ia1=30;//Initial armature current in A V=300;//Terminal voltage in V Ra1=0.5;//Initial armature resistance in ohm //CALCULATIONS R=(V-((N2/N1)*(V-(Ia1*Ra1))))/Ia1;//Total resistance in ohm Rs=(R-Ra1);//Resistance to be added in ohm n=((V-(Ia1*R))/V)*100;//Armature circuit efficiency Nn2=(N2*(V-((Ia1/2)*R)))/(V-(Ia1*R));//New speed at half of the full load torque in rpm //OUTPUT mprintf('Resistance to be added to the existing armature resistance is %3.1f ohm \n Speed at half of the full load torque is %3.1f rpm',Rs,Nn2) //=================================END OF PROGRAM==============================
43c9f233fe89a9fb22dee3e51a5cac030760d35b
52cbfb547384bc9612dc59f5280971ed5a701a9d
/Continuous Exponential Signal.sce
0d728b49b04813e4d5cdfae4007f45e561aa251b
[]
no_license
allenbenny419/Scilab-Codes
efa5402bea6d03088f77dafcf9ed87bd1f93e915
48109cd70c8a66a56e87f88152e866565dd52362
refs/heads/main
2023-06-23T21:10:24.227426
2021-07-21T11:09:15
2021-07-21T11:09:15
388,086,261
1
0
null
null
null
null
UTF-8
Scilab
false
false
139
sce
Continuous Exponential Signal.sce
function y=f(x) y=exp(x) endfunction x=linspace(0,6) plot(x,f) xlabel('t') ylabel('y') xtitle('Continuous Exponential Signal')
064ba1e662670eb8d79ad345b5a5f05707997d6c
449d555969bfd7befe906877abab098c6e63a0e8
/3685/CH12/EX12.12/Ex12_12.sce
473dabb7232d8b11c59673810ad19847505ee13f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,572
sce
Ex12_12.sce
clc // From table h1 = 2792.2 // Enthalpy at state 1 in kJ/kg h4 = 122.96// Enthalpy at state 4 in kJ/kg hb = 254.88 // Enthalpy at state b in kJ/kg hc = 29.98// Enthalpy at state c in kJ/kg ha = 355.98 // Enthalpy at state a in kJ/kg hd = hc // Isenthalpic process h2 = 1949.27 // // Enthalpy at state 2 in kJ/kg // m = (h1-h4)/(hb-hc) // Amount of mercury circulating Q1t = m*(ha-hd) // Heat addition W1t = m*(ha-hb) + (h1-h2) // Turbine work n = W1t/Q1t // first law efficiency printf("\n Example 12.12 \n") printf("\n Overall efficiency of the cycle is %f percent",n*100) //The answers vary due to round off error S = 50000 // Stem flow rate through turbine in kg/h wm = S*m // mercury flow rate printf("\n Flow through the mercury turbine is %e kg/h",wm) Wt = W1t*S/3600 // Turbine work printf("\n Useful work done in binary vapor cycle is %f MW",Wt/1e3) nm = 0.85 // Internal efficiency of mercury turbine ns = 0.87 // Internal efficiency of steam turbine WTm = nm*(ha-hb) // turbine work of mercury based cycle hb_ = ha-WTm // Enthalpy at state b in kJ/kg m_ = (h1-h4)/(hb_-hc) // mass flow rate of mercury h1_ = 3037.3 // Enthalpy at state 1 in kJ/kg Q1t = m_*(ha-hd)+(h1_-h1) // Heat addition x2_ = (6.9160-0.4226)/(8.47-0.4226) // steam quality h2_ = 121+(0.806*2432.9) // Enthalpy at state 2 in kJ/kg WTst = ns*(h1_-h2_) // Turbine work WTt = m_*(ha-hb_)+WTst // Total turbine work N = WTt/Q1t //Overall efficiency printf("\n Overall efficiency is %f percent",N*100) // The answers vary due to round off error
cd76cd5016f01186d33051cc612449ede9268291
eec0cb8a9a3987d4e28fc22c89750a158a00ea84
/Assignment5_Team8/logicalop.tst
e48b573ca6cc413e8259dfc238e5dba3e86ddee5
[]
no_license
Archaic-Mage/CS2310_LAB_Assignments
8ac90e0123de95f5cf8db709cd7761962bf8cef2
e922b59fc1350db3f23b07b8f5986ac54f197c8d
refs/heads/main
2023-08-29T23:42:07.913682
2021-11-16T14:00:05
2021-11-16T14:00:05
401,640,543
1
1
null
2021-10-01T05:55:36
2021-08-31T09:10:15
Scilab
UTF-8
Scilab
false
false
637
tst
logicalop.tst
//TEST CASES FOR LOGICAL OPERATIONS(NOP,AND,OR,XOR) load ALU.hdl; output-file logicalop.out, compare-to logicalop.cmp, output-list x%B1.8.1 y%B1.8.1 z%B1.8.1 OF%B3.1.3 EQ%B3.1.3; //1 pair of operand with X not equal to Y for NOP set x 12, set y 24, set c %B000, eval, output; //1 pair of operand with X equal to Y for NOP set x 11, set y 11, set c %B000, eval, output; //1 pair of operand for AND set x 7, set y 11, set c %B001, eval, output; //1 pair of operand for OR set x 15, set y 29, set c %B010, eval, output; //1 pair of operand for XOR set x 1, set y 19, set c %B011, eval, output;
1238420415428756cd2acb64792d71c401451a7f
449d555969bfd7befe906877abab098c6e63a0e8
/542/CH12/EX12.1/Example_12_1.sci
d5d77a416f8d497a1474ad32fe15a7e195bacaf1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,027
sci
Example_12_1.sci
clear; clc; printf("\n Example 12.1"); //Overall liquid transfer coefficient KLa = 0.003 kmol/s.m^3(kmol/m^3) //(1/KLa)=(1/kLa)+(1/HkGa) // let (KLa)=x x = 0.003; overall = 1/x; //For the absorption of a moderately soluble gas it is reasonable to assume that the liquid and gas phase resistances are of the same order ofmagnitude, assuming them to be equal. //(1/KLa)=(1/kLa)+(1/HkGa) //let 1/kLa = 1/HkGa = y y = (1/(2*x)); z = (1/y); //z is in kmol/s m^3(kmol/m^3) printf("\n For S02:"); printf("\n kGa = %f kmol/s m^3(kN/m^2)",z/50); printf("\n For NH3:"); d_SO2 = 0.103; //diffusivity at 273K for SO2 in cm^2/sec d_NH3 = 0.170; //diffusivity at 273K for NH3 in cm^2/sec printf("\n kGa = %f kmol/s m^3(kN/m^2)",(z/50)*(d_NH3/d_SO2)^0.56); printf("\n For a very soluble gas such as NH3, kGa = KGa."); printf("\n For NH3 the liquid-film resistance will be small, and:"); printf("\n kGa =KGa = %fkmol/s m^3(kN/m^2)",(z/50)*(d_NH3/d_SO2)^0.56);
977e9922dc4dbece155a5e08625f85561dc2458d
449d555969bfd7befe906877abab098c6e63a0e8
/548/CH2/EX2.5/2_5.sce
78946b5c9a5c4f3cdfb08ca522d3b99c94f9d238
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
2_5.sce
pathname=get_absolute_file_path('2_5.sce') filename=pathname+filesep()+'2_5data.sci' exec(filename) function[unit]=Conversion(SI) unit=(9.8*(0.3048)^2)*(SI)/4.448; endfunction disp("1lb/ft^2=(9.8*(0.3048)^2)*/4.448)kgf/m^2") disp(Conversion(280.8),"wing loading in lb/ft^2 for F-117A stealth fighter");
f37fbb1926a555d552376c34144ef4c801c75b2c
449d555969bfd7befe906877abab098c6e63a0e8
/269/CH1/EX1.1/ex.sce
2d6cdd030278930bcdcdaeee4edb7f0d6de9b768
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
487
sce
ex.sce
disp("example1.1") printf("\n") disp("given") printf("\n") disp("C=C0(1-coswt)") disp("angular frequency=500rad/sec") w=500; t=0:0.001:0.015 disp("initial capacitance=1 micro farad") disp("i=d(CV)/dt") disp("supply voltage=3V") C0=1*(10^-6) C=C0*(1-cos(w*t)) V=3; i= w*C0*V*sin(w*t)//differentiating CV wrt t ,V is constant, i=d(CV)/dt subplot(221) plot(t,i) xtitle('i vs t','t','i') subplot(222) plot(t,C)//variation of capacitance with time xtitle('C vs t','t','C')
43c38fc5ed910696d5913f673cd33d62de79d4da
449d555969bfd7befe906877abab098c6e63a0e8
/2873/CH1/EX1.8/Ex1_8.sce
fa542d8f7a9218db01435fe0652e8587e1146f11
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
597
sce
Ex1_8.sce
// Display mode mode(0); // Display warning for floating point exception ieee(1); clear; clc; disp("Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8") d=15*10^-2;//diameter of cylinder in m h=12*10^-2;//manometer height difference in m of mercury rho=13.6*10^3;//density of mercury in kg/m^3 g=9.81;//acceleration due to gravity in m/s^2 disp("pressure measured by manometer(P) in pa") disp("p=rho*g*h") p=rho*g*h disp("now weight of piston(m*g) = upward thrust by gas(p*%pi*d^2/4)") disp("mass of piston(m)in kg") disp("so m=(p*%pi*d^2)/(4*g)") m=(p*%pi*d^2)/(4*g)
f3d3ef761677bcaaaef9ad145f619cd6954a678f
449d555969bfd7befe906877abab098c6e63a0e8
/1466/CH20/EX20.5/20_5.sce
84c245260f8c183be9fdb7fc751a6d6e1017dd2e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
160
sce
20_5.sce
clc //initialisation of variables clear W= [0 2000 4000 6000 8000 10000 12000 14000] V= [4 3.76 3.48 3.18 2.86 2.48 2.02 1.47] //CALCULATIONS plot (V,W)
deb43ee6b1741ca7119367975aed5b0654af718f
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.0/Unix/scilab-2.0/macros/metanet/g_xnode.sci
49795bad06bdb0cba801d56a9832233e9c44bd63
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
76
sci
g_xnode.sci
function x=g_xnode(g) [lhs,rhs]=argn(0), if rhs=0 then g=the_g, end x=g(16)
c34298e7a9efa6d69c3c50f4e64f434152a54a1b
ab0891df3df62a84b3bc60ee178e2d84b0d692c5
/FINAL_SUBMISSION/Geometry_Processing_Toolbox/demos/decimate_libigl.sci
dc40ae2a47c1bf675702c5b1d4fd9b4e5ac99ceb
[ "MIT" ]
permissive
sidgairo18/SCILAB_MEX_TOOLBOX
6b36c8b5dd21bb15d942a283ebfe2366a7ac02ec
fc679f6d226c03b992b632823a5e57abea05cefa
refs/heads/master
2020-03-19T04:03:55.721880
2018-08-14T11:22:24
2018-08-14T11:22:24
135,791,680
0
0
null
null
null
null
UTF-8
Scilab
false
false
761
sci
decimate_libigl.sci
% DECIMATE_LIBIGL Decimate a closed manifold mesh (V,F) % % [W,G] = decimate_libigl(V,F,ratio) % [W,G,J,I] = decimate_libigl(V,F,ratio,'ParameterName',ParameterValue, ...) % % Inputs: % V #V by 3 list of vertex positions % F #F by 3 list of triangle indices into V % ratio either a 1<number<#F of max faces, or a 0<ratio<1 to be multiplied % against #F to get max faces in output % Optional: % 'Method' followed by one of: % {'naive'} simply collapse small edges and place vertices at midpoint % 'qslim' Quadric error metric % Outputs: % W #W by 3 list of vertex positions % G #G by 3 list of triangle indices into W % J #G list of indices into F of birth face % I #U list of indices into V of birth vertices %
a1fff1245b5e00043eec424b927c90b87b7d95ed
449d555969bfd7befe906877abab098c6e63a0e8
/323/CH2/EX2.17/ex2_17.sci
a68cf4ec72da25f75e47a7785d54d00929bef90e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
296
sci
ex2_17.sci
//Chapter 2,Ex2.16,Pg2.24 clc; disp("Refer to the diagram shown in the figure") a=[15 -10 -5;0 1 -1;-15 12 6] b=[50;2;0] i=a\b printf("\n I1 = %.0f A\n",i(1)) printf("\n I2 = %.2f A\n",i(2)) printf("\ I3=%.2f A\n",i(3)) printf("\n Current through 5 ohms resistor = %.1f A\n",i(1)-i(3))
6dd3c7c332de3e2e2fa8ec1e4f57fd2b4ad11928
449d555969bfd7befe906877abab098c6e63a0e8
/1238/CH1/EX1.12/12.sce
a5563782d0971fd1a4c8780a43440c37606dcf10
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
12.sce
//hex to binary,octal and decimal conversion// //example 12// clc //clears the command window// clear //clears// //decimal conversion// x='100' d=hex2dec(x);//hex to decimal conversion// b=dec2bin(d);//decimal to binary conversion// o=dec2oct(d);//decimal to octal conversion// disp(d);//answer in decimal form// disp(b);//answer in binary form// disp(o);//answer in octal form//
d4aa7fa125e61f381719babc7318d72384d40bdc
449d555969bfd7befe906877abab098c6e63a0e8
/2006/CH14/EX14.5/ex14_5.sce
aa64da71f605cdaff8e6176fa25107ecc8e2a5ba
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
728
sce
ex14_5.sce
clc; p=101.325; // Atmospheric pressure in kPa // The complete combustion equation for actane // yC8H18+ x (O2+3.76N2) → n1 CO2+n2 H2O+n3 O2+n3 N2 x=12.5*1.5; y=1; n1=8; n2=9; n3=6.28; n4=70.5; n=n1+n2+n3+n4; // Total number of moles of the products AFm=(x+x*3.76)/y ;// Air fuel ratio m=28.84; M=116; // Molecular weight of octane AF=AFm*m/M; yco2=n1/n; yH2O=n2/n; yO2=n3/n; yN2=n4/n; pH2O=p*yH2O; // Partial pressure of water vapour in the products Tsat=45.21; // In oC disp ("kg air/kg octane",AF,"Air fuel ratio = "); disp ("If the products are cooled below 25 oC then, the water vapour will condense. Because the cooled temperature is less than dew point temperature of water vapour i.e., T < Tsat.");
cb16c3d055aaaf10efb8b6069bec4a21c0bb1d79
4a1effb7ec08302914dbd9c5e560c61936c1bb99
/Project 2/Experiments/FURIA-C/results/FURIA-C.abalone-10-1tra/result8s0.tst
8109b3927cfaf3ad9ef69a7413618fba603f337a
[]
no_license
nickgreenquist/Intro_To_Intelligent_Systems
964cad20de7099b8e5808ddee199e3e3343cf7d5
7ad43577b3cbbc0b620740205a14c406d96a2517
refs/heads/master
2021-01-20T13:23:23.931062
2017-05-04T20:08:05
2017-05-04T20:08:05
90,484,366
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,428
tst
result8s0.tst
@relation abalone @attribute Sex{M,F,I} @attribute Length real[0.075,0.815] @attribute Diameter real[0.055,0.65] @attribute Height real[0.0,1.13] @attribute Whole_weight real[0.002,2.8255] @attribute Shucked_weight real[0.001,1.488] @attribute Viscera_weight real[5.0E-4,0.76] @attribute Shell_weight real[0.0015,1.005] @attribute Rings{15,7,9,10,8,20,16,19,14,11,12,18,13,5,4,6,21,17,22,1,3,26,23,29,2,27,25,24} @inputs Sex,Length,Diameter,Height,Whole_weight,Shucked_weight,Viscera_weight,Shell_weight @outputs Rings @data 9 9 10 9 12 9 10 7 12 9 18 9 8 7 7 7 9 9 13 9 9 9 12 20 13 9 9 7 9 7 10 9 5 4 14 11 9 9 14 23 8 7 9 7 9 23 14 9 22 9 3 3 5 5 10 7 7 7 15 9 13 9 12 9 4 4 19 9 5 4 8 23 9 9 8 9 20 9 16 11 15 9 12 9 14 9 6 7 14 9 11 9 9 7 8 7 19 9 16 11 17 9 21 11 16 9 15 9 15 9 10 9 6 7 5 7 20 9 10 7 14 9 10 7 7 5 13 9 13 9 13 7 10 7 12 9 17 9 8 7 9 7 7 5 10 9 10 7 2 3 15 20 14 9 13 9 20 9 13 9 15 9 9 7 11 9 10 9 6 7 9 9 10 9 12 9 8 9 8 9 12 9 11 20 9 9 4 5 6 5 6 7 7 7 7 7 7 7 8 9 7 9 9 9 9 9 11 9 8 9 10 9 8 9 11 9 10 9 11 9 6 5 7 7 6 7 8 7 9 9 9 9 7 9 9 9 10 9 9 9 9 9 9 9 11 9 5 5 5 5 4 7 7 7 6 7 7 7 6 7 7 7 7 7 10 9 9 9 10 9 8 9 10 9 10 9 9 9 9 9 10 9 12 9 9 9 10 9 10 9 12 11 12 11 12 11 14 11 6 7 6 7 8 9 8 9 11 9 10 9 10 9 5 5 8 5 7 7 6 7 7 7 6 9 8 9 7 9 9 9 8 9 10 9 10 9 10 9 10 9 10 9 11 9 10 9 11 9 9 9 9 9 9 9 11 9 14 11 7 7 8 7 10 9 10 9 9 9 8 7 8 7 9 7 8 9 8 9 9 9 9 9 9 9 8 9 11 9 9 9 11 9 11 9 10 9 10 9 11 9 9 9 10 9 10 9 12 9 10 9 12 11 4 3 6 7 7 7 8 7 7 7 9 9 9 9 9 9 11 9 8 9 6 7 12 20 9 7 9 9 12 9 17 9 10 7 8 9 9 7 7 7 6 7 6 7 12 9 13 9 9 9 12 9 16 9 14 9 13 9 12 9 15 23 23 11 18 9 12 9 18 9 5 4 16 9 11 7 17 9 12 9 10 5 10 9 10 7 15 9 10 9 6 5 5 5 17 9 14 9 14 9 19 9 6 5 7 5 8 9 11 9 13 11 13 9 7 7 6 7 7 9 11 9 9 9 13 11 10 11 5 5 8 7 6 7 9 9 8 9 9 9 9 9 8 9 9 9 8 9 9 9 9 9 9 9 8 7 10 9 11 9 8 9 11 9 8 9 11 9 11 9 10 9 4 5 7 7 9 9 10 9 12 9 11 9 11 9 6 7 11 9 9 9 8 9 11 9 9 9 11 9 10 9 10 9 10 9 8 9 9 9 8 7 8 7 10 9 10 9 8 9 12 9 9 9 11 9 11 9 11 9 8 7 11 9 10 9 8 7 8 9 7 9 9 7 6 5 11 9 8 7 7 7 10 9 13 9 11 9 15 9 18 9 10 7 13 9 15 9 13 9 16 20 12 7 4 4 13 9 11 7 13 7 14 23 11 7 17 9 10 7 5 5 7 5 13 9 8 7 7 7 7 9 10 9 12 9 7 7 8 7 8 9 11 9 10 9 9 9 11 9 11 11 7 7 6 7 8 7 9 9 10 9 11 9 11 9 11 9 8 9 10 9 7 7 8 9 11 9 11 9 13 9 11 11 9 9 12 11 7 7 7 7 8 7 9 9 9 9 9 9 10 9 10 9 7 5 8 7 8 9 9 9 7 9 10 7 11 9 18 9 11 9 8 9 7 7 6 7 6 9 11 9 9 9 9 9 8 9 10 9 9 9 8 9 9 9 11 9 7 7 8 7
1d6616cda1c3d54af1df2b7e96a18dcfb6bf83a0
449d555969bfd7befe906877abab098c6e63a0e8
/914/CH1/EX1.2/ex1_2.sce
fb3b6644c850b98e441172d5ae6642fcafdedc61
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
482
sce
ex1_2.sce
clc; warning("off"); printf("\n\n example1.2 - pg9"); // given // the three unknowns are x,y,z // the three equations are- // x+y+z=1500 // (1) 0.05*x+0.15*y+0.40*z=1500*0.25 // (2) 0.95*x+0.00*y+0.452*z=1500*0.50 a=[1 1 1;0.05 0.15 0.40;0.95 0 0.452]; d=[1500;1500*0.25;1500*0.50]; ainv=inv(a); sol=ainv*d; printf("\n\n the amount of concentrated HNO3 is %fkg\n the amount of concentrated H2SO4 is %fkg\n the amount of waste acids is %fkg",sol(2),sol(1),sol(3));
8201afccc0c42c99e3fbc7a9ee78b193ec464cab
449d555969bfd7befe906877abab098c6e63a0e8
/1301/CH5/EX5.3/ex5_3.sce
112ee0c4780ac365235632d0234781c8d50e53bf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
205
sce
ex5_3.sce
clc; F=2000; //force in lb s=80; //distance inft W=F*s; //calculating weight disp(W,"Weight in ft.lb = "); //displaying result disp(W,"Potential Energy in ft.lb = "); //displaying result
4ac2926578fab9f0e74e9935104a24ba9e5bd127
449d555969bfd7befe906877abab098c6e63a0e8
/1022/CH2/EX2.2/2_2.sce
c10d42868fafbc1f8a9c050f38a3c1301d945982
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
158
sce
2_2.sce
clc //initialisation of variables F= 1 //Pouunda m= 1 //lbm g= 1 //fts^-2 //CALCULATIONS gc= m*g/F //RESULTS printf ('gc= %.2f lbm ft/poundal^2',gc)
9279205c9513464bbf3c746de04676a4d2585d68
449d555969bfd7befe906877abab098c6e63a0e8
/1910/CH7/EX7.3/Chapter73.sce
23bd9b11644cf0ec6d6445bdb9e006e2c761ac6c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,960
sce
Chapter73.sce
// Display mode mode(0); // Display warning for floating point exception ieee(1); clear; clc; disp("Introduction to heat transfer by S.K.Som, Chapter 7, Example 3") //Air at a pressure of 101kPa and temprature,Tinf=20°C flows with a velocity(Uinf) of 5m/s over a flat plate whose temprature is kept constant at Tw=140°C. Tw=140; Tinf=20; Uinf=5; //The properties at the film temprature of 80°C are Prandtl number(Pr=0.706),Conductivity(k=0.03W/(m*°C)),kinematic viscosity(nu=2*10^-5m^2/s) Pr=0.706; k=0.03; nu=2*10^-5; //ReL is reynolds number and L is length of flat plate disp("(a)When the air flows parallel to the long side we have L=5 and the Reynolds no. becomes") L=5; ReL=(Uinf*L)/nu disp("which is greater than critical Reynolds number.") //Thus we have combined laminar and tubulent flow. // So The average heat transfer coefficient over L=5m is determined from hbarL=(k/L)*[0.037*(ReL)^(4/5)-871]*Pr^(1/3) disp("The average heat transfer coefficient over L=5m in W/(m^2*K)") hbarL=(k/L)*[0.037*(ReL)^(4/5)-871]*Pr^(1/3) //The rate of heat transfer per unit width is Q=h*A*(Tinf-Tw) //Since width is 1m so B=1 //Area(A)=L*B B=1; A=L*B; //Q is the rate of heat transfer disp("The rate of heat transfer per unit width in W is") Q=hbarL*A*(Tw-Tinf) //When the air flow is parallel to the 1m side we have L=1 disp("(b)When the air flow is parallel to the 1m side we have L=1 an the Reynolds no. becomes ") L=1; ReL=(Uinf*L)/nu disp("which is less than critical Reynolds number.") //Thus we have laminar flow //Heat flux is given by h=(k/L)*0.664*ReL^0.5*Pr^(1/3) disp("Heat flux in W/(m^2*K) is") h=(k/L)*0.664*ReL^0.5*Pr^(1/3) //The rate of heat transfer per unit width is Q=h*A*(Tinf-Tw) //Now width is 5m so B=5 //Area(A)=L*B B=5; A=L*B; //Q is the rate of heat transfer disp("The rate of heat transfer per unit width in W is") Q=h*A*(Tw-Tinf)
a1c9ccdf101f75ce3a8fc5017d91ec8997518b23
449d555969bfd7befe906877abab098c6e63a0e8
/2252/CH6/EX6.4/Ex6_4.sce
9b1d85eb5b054a6ffa84bb4f969d14750ff07fd0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex6_4.sce
//e=100*sin(100*%pi*t) //calculating rate of change of voltage at t=.0025 sec t=.0025 r1=10000*%pi*cos(100*%pi*t) mprintf("Rate of change of voltage at .0025 sec=%f V/sec\n",r1) //calculating rate of change of voltage at t=.005 sec t=.005 r2=10000*%pi*cos(100*%pi*t) mprintf("Rate of change of voltage at .005 sec=%d V/sec\n",r2) //calculating rate of change of voltage at t=.01 sec t=.01 r3=10000*%pi*cos(100*%pi*t) mprintf("Rate of change of voltage at .01 sec=%f V/sec\n",r3) //error in textbook answer in first and last case
0c8fed804842da6e39df32a6f572fd39077f739f
449d555969bfd7befe906877abab098c6e63a0e8
/3785/CH12/EX12.2/Ex12_2.sce
4f059fa2a2bdfdd6b1c1124fb8f3b1e888d82817
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
602
sce
Ex12_2.sce
// Example 12_2 clc;funcprot(0); // Given data T=20;// °C SPL=20;// Sound Pressure level in dB // From table 1.1, rho_0=1.204;// kg/m^3 gamma=3.5/2.5;// Specific heat ratio // Calculation // (a) Inverting equation 12.18, Pa=2*10^-5*(1*10^(20/10));// Pa // (b) From equation 12.17, a=(gamma*1.013*10^5*rho_0)^(1/2);// m/s va=Pa/(rho_0*a); //(c) From equation 12.17, P_sw=(Pa)^2/(rho_0*a); printf('\n(a)The pressure amplitude is %1.0e Pa \n(b)The velocity amplitude is %1.2e m/s \n The power per unit area,P_sw=%1.2e W/m^2',Pa,va,P_sw); // The answer provided in the book is wrong
57ac8130bd0b124efc9e0ffe7af9ea3774eecdc4
449d555969bfd7befe906877abab098c6e63a0e8
/1670/CH4/EX4.5/4_5.sce
34a049b36e3c4ea918490bdd71bde166831b4b78
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
773
sce
4_5.sce
//Example 4.5 //Jacobi Method //Page no. 95 clc;close;clear; A=[10,7,8,7;7,5,6,5;8,6,10,9;7,5,9,10]; n=4; for k=1:14 max1=0 for i=1:n for j=1:n if A(i,j)>max1 & i~=j then max1=A(i,j) i1=i;j1=j; end end end fi=(atan((2*A(i1,j1))/(A(i1,i1)-A(j1,j1)+10^-20)))/2 disp(fi,'fi = ') O1=eye(n,n) O1(i1,j1)=-sin(fi) O1(j1,i1)=sin(fi) O1(i1,i1)=cos(fi) O1(j1,j1)=cos(fi) disp(O1,'O1 = ') A=inv(O1)*A*O1 disp(A,'A1 = ') end printf('\n\n The eigenvalues are : \n\n') for i=1:n printf('\tl%i = %g\t',i,A(i,i)) end printf('\n\n') l=poly(0,'lb') A=A-l*eye(n,n) disp(det(A),'Characteristic Equation = ') printf("\n\n\n\n\nNote : Computation Errors in some parts in calculation performed in book")
2963509a303b5a0fe575f24c6324a42395c56192
449d555969bfd7befe906877abab098c6e63a0e8
/284/CH10/EX10.1/ex_1.sce
cd7a4901b0bee34d36f007933048c5eb990a67ca
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
376
sce
ex_1.sce
// Chapter 10_Fundamentals of the Metal Oxide Semiconductor Field Effect Transistor //Caption_The two terminal MOS structure //Ex_1//page 434 Na=10^16 T=300 eps=11.7*8.85*10^-14 e=1.6*10^-19 ni=1.5*10^10 //intrinsic carrier concentration phi_fp=0.0259*log(Na/ni) xdT=10^4*(4*eps*phi_fp/(e*Na))^0.5 printf('The maximum space charge width is %1.2f micrometer',xdT)
89cc7d9f80f7940b6ad2100252d47f872909d6c8
19e7b2a92e135cbdbd427cbb0b422f1706b80d35
/tests/FAC5861.tst
e68efc5c5b3bd756c920d55d762391934e5a1f17
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-other-permissive", "BSD-2-Clause" ]
permissive
friedkiwi/hyperion
08106d9235c67480b609452903d7f253f7baeb5f
d0ccfbc9a74dd0a77a75ac224025fc68f6a6617f
refs/heads/master
2023-03-16T08:26:25.222250
2022-01-06T23:54:32
2022-01-06T23:54:32
142,925,136
0
1
NOASSERTION
2021-09-12T21:15:38
2018-07-30T20:31:06
C
UTF-8
Scilab
false
false
174
tst
FAC5861.tst
*Testcase FAC5861: Quick Test of Misc. Instr. Ext. 2 & 3 mainsize 2 numcpu 1 sysclear archlvl z/Arch loadcore "$(testpath)/FAC5861.core" runtest 1.0 *Done
3a420a5ae849b2717ac1cc6af1887fe5378cbf17
449d555969bfd7befe906877abab098c6e63a0e8
/555/CH3/EX3.3/3.sce
616eb2d432c8ae3d67008fd8ad996e7a64f7566a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
442
sce
3.sce
// Implementation of example 3.3 // Basic and Applied Thermodynamics by P.K.Nag // page 55 clc clear p=101.325 // (atmospheric pressure in kN/m^2) N=10000 // no. of revolutions T=1.275 // (torque in Nm) d=0.6 //(diameter in m) l=0.8 //(distance moved in m) w1=(2*%pi*T*N)/1000; // work done by stirring device a=((%pi/4)*d^2); w2=(p*a)*l; // work done by system w=(-w1)+w2; disp("net work transfer") disp(w) disp("kJ")
683d6bdb2671ce59712991b7e7815b33b182f583
0592c9e4cfbb77a0755aff6f0c798d9fe31f6ff4
/scilab/LiborMarketModel/lmm_scilab.sci
5ee4f0c74f6239045f74ffb4c5919d8d5cd55c15
[]
no_license
FinancialEngineerLab/premia-13-cpp_FICC
e19caa6a9cadb4ad1361053efc0dfc9418071cf9
e271da627dbfc8c2c1f7e9f700766544f64c72b2
refs/heads/master
2023-03-16T11:11:26.830681
2016-04-19T05:58:16
2016-04-19T05:58:16
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
7,055
sci
lmm_scilab.sci
function resu=lmm_swpt_stovol_sci(period , nb_fac , swpt_mat , swp_mat , perct) list_file=[ "lmm_swpt_stovol_sci.o", "lmm_volatility.o" , "lmm_zero_bond.o" , "lmm_stochastic_volatility.o" , "lmm_random_generator.o" , "lmm_products.o" , "lmm_numerical.o" , "lmm_mathtools.o" , "lmm_libor.o" , "premia_files/complex.o " ] link( list_file ,"lmm_swpt_stovol_sci","C") tenor=[ period ]; numFac=[ nb_fac ]; swaptionMat=[ swpt_mat ]; swapMat=[ swp_mat ]; percent=[ perct ]; c=fort("lmm_swpt_stovol_sci",tenor,2,"d",numFac , 3, "i" , swaptionMat , 4 , "d", swapMat , 5 , "d" , percent , 6 , "d" , "out",[1,1],1,"d"); resu=c*100*100; endfunction /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// //// martingale X //// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function resu=lmm_cap_martX_sci(period , nb_fac , maturity , strike ) list_file=[ "lmm_martingaleX_sci.o", "lmm_martingaleX.o" , "lmm_volatility.o" , "lmm_zero_bond.o" , "lmm_random_generator.o" , "lmm_products.o" , "lmm_numerical.o" , "lmm_mathtools.o" , "lmm_libor.o" , "cumulfunc.o" , "dcdflib.o" , "ipmpar.o" ] link( list_file ,"lmm_cap_martX_sci","C") tenor=[ period ]; numFac=[ nb_fac ]; Mat=[ maturity ]; K=[strike]; numcap=round(maturity/period) c=fort("lmm_cap_martX_sci",tenor,3,"d",numFac , 2, "i" , Mat , 5 , "d", strike , 4 , "d" , "out",[numcap , 1],1,"d"); m=zeros(numcap,2); for i=1:numcap, m(i,1)=c(i), m(i,2)=(i-1)*period, end; resu=m; endfunction function resu=lmm_swpt_martX_sci(period , nb_fac , swpt_maturity , swp_maturity , strike ) list_file=[ "lmm_martingaleX_sci.o", "lmm_martingaleX.o" , "lmm_volatility.o" , "lmm_zero_bond.o" , "lmm_random_generator.o" , "lmm_products.o" , "lmm_numerical.o" , "lmm_mathtools.o" , "lmm_libor.o" , "cumulfunc.o" , "dcdflib.o" , "ipmpar.o" ] link( list_file ,"lmm_swpt_martX_sci","C") tenor=[ period ]; numFac=[ nb_fac ]; swpt_mat = [ swpt_maturity ]; swp_mat = [ swp_maturity ]; K=[ strike]; c=fort("lmm_swpt_martX_sci",tenor,6 ,"d",numFac , 4, "i" ,swpt_mat , 2 , "d", swp_mat , 3 , "d", K , 5 , "d" , "out",[1 , 1],1,"d"); resu=c; endfunction /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// //// martingale V //// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function resu=lmm_cap_spotV_sci(period , nb_fac , maturity , strike ) list_file=[ "lmm_martingaleV_sci.o", "lmm_martingaleV.o" , "lmm_volatility.o" , "lmm_zero_bond.o" , "lmm_random_generator.o" , "lmm_products.o" , "lmm_numerical.o" , "lmm_mathtools.o" , "lmm_libor.o" , "cumulfunc.o" , "dcdflib.o" , "ipmpar.o" ] link( list_file ,"lmm_cap_spotV_sci","C") tenor=[ period ]; numFac=[ nb_fac ]; Mat=[ maturity ]; K=[strike]; numcap=round(maturity/period) c=fort("lmm_cap_spotV_sci",tenor,3,"d",numFac , 2, "i" , Mat , 5 , "d", strike , 4 , "d" , "out",[numcap , 1],1,"d"); m=zeros(numcap,2); for i=1:numcap, m(i,1)=c(i), m(i,2)=(i-1)*period, end; resu=m; endfunction function resu=lmm_swpt_spotV_sci(period , nb_fac , swpt_maturity , swp_maturity , strike ) list_file=[ "lmm_martingaleV_sci.o", "lmm_martingaleV.o" , "lmm_volatility.o" , "lmm_zero_bond.o" , "lmm_random_generator.o" , "lmm_products.o" , "lmm_numerical.o" , "lmm_mathtools.o" , "lmm_libor.o" , "cumulfunc.o" , "dcdflib.o" , "ipmpar.o" ] link( list_file ,"lmm_swpt_spotV_sci","C") tenor=[ period ]; numFac=[ nb_fac ]; swpt_mat = [ swpt_maturity ]; swp_mat = [ swp_maturity ]; K=[strike]; c=fort("lmm_swpt_spotV_sci",tenor,6 ,"d",numFac , 4, "i" ,swpt_mat , 2 , "d", swp_mat , 3 , "d", K , 5 , "d" , "out",[1 , 1],1,"d"); resu=c; endfunction /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// //// Jump //// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function resu=lmm_swpt_jump_sci(period , nb_fac , swpt_maturity , swp_maturity , strike ) list_file=[ "lmm_jump_sci.o", "lmm_jump.o" , "lmm_volatility.o" , "lmm_zero_bond.o" , "lmm_random_generator.o" , "lmm_products.o" , "lmm_numerical.o" , "lmm_mathtools.o" , "lmm_libor.o" , "cumulfunc.o" , "dcdflib.o" , "ipmpar.o" ] link( list_file ,"lmm_swpt_jump_sci","C") tenor=[ period ]; numFac=[ nb_fac ]; swpt_mat = [ swpt_maturity ]; swp_mat = [ swp_maturity ]; K=[ strike]; c=fort("lmm_swpt_jump_sci",tenor,6 ,"d",numFac , 4, "i" ,swpt_mat , 2 , "d", swp_mat , 3 , "d", K , 5 , "d" , "out",[1 , 1],1,"d"); resu=c; endfunction ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// /// Bermuda swaption Pedersen interface /// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function resu=lmm_bermuda_LS_sci(period , nb_fac , swpt_maturity , swp_maturity , strike , payoff_Reg ,Regr_basis_dim) list_file=[ "lmm_bermuda_LS_sci.o", "lmm_basis.o" , "lmm_bermudaprice.o" , "lmm_volatility.o" , "lmm_zero_bond.o" , "lmm_random_generator.o" , "lmm_products.o" , "lmm_numerical.o" , "lmm_mathtools.o" , "lmm_libor.o" ] link( list_file ,"lmm_bermuda_LS_sci","C") tenor=[ period ]; numFac=[ nb_fac ]; swpt_mat = [ swpt_maturity ]; swp_mat = [ swp_maturity ]; K=[ strike]; payoff_as_regressor=[ payoff_Reg ]; Regr_Basis_Dimension=[ Regr_basis_dim ]; c=fort("lmm_bermuda_LS_sci",tenor ,2 ,"d",numFac , 3, "i" ,swpt_mat , 4 , "d", swp_mat , 5 , "d", K , 6 , "d" , payoff_as_regressor , 7 , "d" , Regr_Basis_Dimension , 8 , "i" , "out",[1 , 1],1,"d"); resu=c*100*100; endfunction ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// /// Bermuda swaption Andersen interface /// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function resu=lmm_bermuda_andersen_sci(period , nb_fac , swpt_maturity , swp_maturity , strike ) list_file=[ "lmm_bermuda_andersen_sci.o", "lmm_basis.o" , "lmm_bermudaprice_andersen.o" , "lmm_volatility.o" , "lmm_zero_bond.o" , "lmm_random_generator.o" , "lmm_products.o" , "lmm_numerical.o" , "lmm_mathtools.o" , "lmm_libor.o" ] link( list_file ,"lmm_bermuda_andersen_sci","C") tenor=[ period ]; numFac=[ nb_fac ]; swpt_mat = [ swpt_maturity ]; swp_mat = [ swp_maturity ]; K=[ strike]; c=fort("lmm_bermuda_andersen_sci",tenor ,2 ,"d",numFac , 3, "i" ,swpt_mat , 4 , "d", swp_mat , 5 , "d", K , 6 , "d", "out",[1 , 1],1,"d"); resu=c*100*100; endfunction
806a4d3a8d4026e996d11f34e180f3d069fa3578
449d555969bfd7befe906877abab098c6e63a0e8
/1703/CH11/EX11.1/11_1.sce
76f4b918a8a966d1fd18df7dff4522c56216ede2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
392
sce
11_1.sce
clc //initialisation of variables h= 75 //ft e= 0.75 k= 0.01 Q= 3000 //gal/min k1= 1.2 N= 1500 g= 32.2 //ft/sec^2 D= 0.836 //ft //CALCULATIONS W= h/e v1= sqrt((W-h)/k) Q1= Q/374.06 f1= Q1/(k1*D^2) u1= %pi*D*N/60 w1= W*g/u1 B= atand(f1/(u1-w1)) //RESULTS printf ('Diameter of impeller = %.3f ft ',D) printf ('\n Blade angle at outlet edge of impeller = %.f degrees ',B)
1b4401befaa32bdff3576daa0845ae6de5562b43
449d555969bfd7befe906877abab098c6e63a0e8
/2411/CH2/EX2.13/Ex2_13.sce
fafa9367eee25119eb499512bd049c7dd03e8393
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
667
sce
Ex2_13.sce
// Scilab Code Ex2.13: Page-80 (2008) clc; clear; x = poly(0, 'x'); y = x^2-4; F = [x*y (x^2 + y^2)]; // Force acting on the particle, N x1 = 2; // lower limit x2 = 4; // upper limit dr = [derivat(x); derivat(y);]; // Infinitesimal displacement, m dW = F*dr; // Work done or infinitesimally small displcement, J work_exp = sci2exp(dW); // Convert the polynomial to the expression W = integrate(work_exp, 'x', x1, x2); // Total work done in moving the particle in a force field, J printf("\nThe total work done in moving the particle in the x-y plane = %d J", W); // Result // The total work done in moving the particle in the x-y plane = 732 J
4d1c833e85abcae46138229a4dc56f6987564977
449d555969bfd7befe906877abab098c6e63a0e8
/2240/CH14/EX13.1/EX13_1.sce
6db13a19291210bfbe7e4889d1ce5cf7075cace0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
485
sce
EX13_1.sce
// Grob's Basic Electronics 11e // Chapter No. 13 // Example No. 13_1 clc; clear; // Make the following conversions: (a) 25,000 Mx to Wb; (b) 0.005 Wb to Mx. // Given data A = 25000; // A=25000 Maxwell B = 0.005; // B=0.005 Wabers C = 1*10^8; // Conversion Factor Wb = A*(1/C); disp (Wb,'The 25000 Maxwell in Wabers is') disp ('i.e 250*10^-6 Wb or 250 uWb') Mx = B*C; disp (Mx,'The 0.005 Wabers in Maxwell is') disp ('i.e 5.0*10^5 Mx')
8982087deaee9d83eb1d1e6de74ed477c010652c
3ab7c3ba0b53c896747be95b21d2a39dc0ba021a
/Biseccion.sci
bbda212922fad57fcbdd2c4e15280bfd705bc217
[]
no_license
Farber98/MetodosNumericos
0752f090eb596926f05bff0730a088eb70e77033
5c1be0d0e8274d204b41d0b91778847e6469e6bb
refs/heads/master
2021-04-23T12:58:07.339435
2020-03-25T08:41:32
2020-03-25T08:41:32
249,926,955
0
0
null
null
null
null
UTF-8
Scilab
false
false
333
sci
Biseccion.sci
function [p]= biseccion(f,a,b,n,e) //n:cantidad de iteraciones ; e: error i=1 p=(a+b)/2 while i<=n & abs (f(p))>e if f(a)*f(p)>0 then a=p; else b=p; end i=i+1 p=(a+b)/2 end if i>n then printf("No converge") else printf("Raiz: %f",p) end endfunction
556ad258ac1ede0779ef69d0e3e0f74490895d24
449d555969bfd7befe906877abab098c6e63a0e8
/401/CH6/EX6.6/Example6_6.sce
65e43cf2e3d46d6cd20cb3bf12ccb369ca5d12cf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
486
sce
Example6_6.sce
//Example 6.6 //Program to calculate the external power efficiency of the device clear; clc ; close ; //Given data eeta_t=0.18; //*100 percent - TOTAL EFFICIENCY Eg=1.43; //eV - ENERGY BAND GAP OF GaAs V=2.5; //Volts - APPLIED VOLTAGE //External power efficiency of the device eeta_ep=eeta_t*Eg/V; //Displaying the Result in Command Window printf("\n\n\t External power efficiency of GaAs device is %1.0f percent.",eeta_ep*100);
d4fb01b30a89c4bca83ab71b6944be8cd875cc32
449d555969bfd7befe906877abab098c6e63a0e8
/3718/CH3/EX3.8/Ex3_8.sce
6f40f4418c887ae0f79ddc7b6cf1d349aa4a16a9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
474
sce
Ex3_8.sce
//Chapter 3: Thermodynamic and Chemical Equilibrium //Problem: 8 clc; //Declaration of Constant R = 1.987 // cal per K per mol //Declaration of Variables m = 5 Vo = 4 //in litres, Initial Volume Vf = 40 //in litres, Final Volume T = 27 //in deg C // Solution mprintf("dS = nRln(V2 / V1)\n") dS = m * R * 2.303 * log10(Vf / Vo) mprintf(" The change in entropy is: %.2f cal / degree",dS)
4cc2e9c479278784c9d0c39968b970650dcd55fd
931df7de6dffa2b03ac9771d79e06d88c24ab4ff
/FortBox Tracking.sce
88694add387b19fec1311fce4c82c22ca1a6eaa5
[]
no_license
MBHuman/Scenarios
be1a722825b3b960014b07cda2f12fa4f75c7fc8
1db6bfdec8cc42164ca9ff57dd9d3c82cfaf2137
refs/heads/master
2023-01-14T02:10:25.103083
2020-11-21T16:47:14
2020-11-21T16:47:14
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
22,937
sce
FortBox Tracking.sce
Name=FortBox Tracking PlayerCharacters=Player BotCharacters=Pigeon Jumper.bot IsChallenge=true Timelimit=60.0 PlayerProfile=Player AddedBots=Pigeon Jumper.bot;Pigeon Jumper.bot;Pigeon Jumper.bot PlayerMaxLives=0 BotMaxLives=0;0;0 PlayerTeam=1 BotTeams=2;2;2 MapName=box_v4.map MapScale=3.15 BlockProjectilePredictors=true BlockCheats=true InvinciblePlayer=true InvincibleBots=false Timescale=0.75 BlockHealthbars=false TimeRefilledByKill=0.0 ScoreToWin=1.0 ScorePerDamage=0.0 ScorePerKill=1.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=Fortnite, TPS, Tracking WeaponHeroTag=AR, SMG DifficultyTag=2 AuthorsTag=Tee7even BlockHitMarkers=false BlockHitSounds=false BlockMissSounds=false BlockFCT=true Description=FortBox, but with a tracking weapon and targets that live longer GameVersion=2.0.1.0 ScorePerDistance=0.0 MBSEnable=false MBSTime1=0.25 MBSTime2=0.5 MBSTime3=0.75 MBSTime1Mult=1.0 MBSTime2Mult=2.0 MBSTime3Mult=3.0 MBSFBInstead=false MBSRequireEnemyAlive=false LockFOVRange=false LockedFOVMin=80.0 LockedFOVMax=80.0 LockedFOVScale=Clamped Horizontal [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 AimingStyle=Original ScanSpeedMultiplier=1.0 MaxSeekPitch=30.0 MaxSeekYaw=30.0 AimingSpeed=5.0 MinShootDelay=0.3 MaxShootDelay=0.6 [Bot Profile] Name=Pigeon Jumper DodgeProfileNames=Long Strafes Jumping DodgeProfileWeights=1.0 DodgeProfileMaxChangeTime=5.0 DodgeProfileMinChangeTime=1.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=true CharacterProfile=Clay Pigeon SeeThroughWalls=false NoDodging=false NoAiming=false AbilityUseTimer=0.1 UseAbilityFrequency=1.0 UseAbilityFreqMinTime=0.3 UseAbilityFreqMaxTime=0.6 ShowLaser=false LaserRGB=X=1.000 Y=0.300 Z=0.000 LaserAlpha=1.0 [Character Profile] Name=Player MaxHealth=100.0 WeaponProfileNames=Head Tracker;;;;;;; MinRespawnDelay=1.0 MaxRespawnDelay=5.0 StepUpHeight=0.0 CrouchHeightModifier=0.5 CrouchAnimationSpeed=1.0 CameraOffset=X=0.000 Y=0.000 Z=10.000 HeadshotOnly=false DamageKnockbackFactor=0.0 MovementType=Base MaxSpeed=800.0 MaxCrouchSpeed=0.0 Acceleration=5000.0 AirAcceleration=16000.0 Friction=4.0 BrakingFrictionFactor=2.0 JumpVelocity=0.0 Gravity=0.0 AirControl=0.0 CanCrouch=true 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=Cylindrical MainBBHeight=300.0 MainBBRadius=45.0 MainBBHasHead=false MainBBHeadRadius=0.1 MainBBHeadOffset=0.0 MainBBHide=true ProjBBType=Cylindrical ProjBBHeight=300.0 ProjBBRadius=45.0 ProjBBHasHead=false ProjBBHeadRadius=0.1 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.5 AllowBufferedJumps=false 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=true TPSArmLength=450.0 TPSOffset=X=0.000 Y=65.000 Z=105.000 BrakingDeceleration=2048.0 VerticalSpawnOffset=-390.0 TerminalVelocity=0.0 CharacterModel=Ecto CharacterSkin=Default SpawnXOffset=0.0 SpawnYOffset=0.0 InvertBlockedSpawn=false ViewBobTime=0.0 ViewBobAngleAdjustment=0.0 ViewBobCameraZOffset=0.0 ViewBobAffectsShots=false IsFlyer=false FlightObeysPitch=false FlightVelocityUp=800.0 FlightVelocityDown=800.0 [Character Profile] Name=Clay Pigeon MaxHealth=5.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=8.0 MovementType=Base MaxSpeed=1000.0 MaxCrouchSpeed=500.0 Acceleration=12000.0 AirAcceleration=16000.0 Friction=8.0 BrakingFrictionFactor=4.0 JumpVelocity=1750.0 Gravity=3.0 AirControl=0.2 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=150.0 MainBBRadius=20.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.2 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 TerminalVelocity=0.0 CharacterModel=None CharacterSkin=Default SpawnXOffset=0.0 SpawnYOffset=0.0 InvertBlockedSpawn=false ViewBobTime=0.0 ViewBobAngleAdjustment=0.0 ViewBobCameraZOffset=0.0 ViewBobAffectsShots=false IsFlyer=false FlightObeysPitch=false FlightVelocityUp=800.0 FlightVelocityDown=800.0 [Dodge Profile] Name=Long Strafes Jumping MaxTargetDistance=3000.0 MinTargetDistance=500.0 ToggleLeftRight=true ToggleForwardBack=true MinLRTimeChange=0.5 MaxLRTimeChange=3.0 MinFBTimeChange=0.5 MaxFBTimeChange=1.5 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.00001 MaxJumpTime=0.00001 LeftStrafeTimeMult=1.0 RightStrafeTimeMult=1.0 StrafeSwapMinPause=0.0 StrafeSwapMaxPause=0.0 BlockedMovementPercent=0.5 BlockedMovementReactionMin=0.125 BlockedMovementReactionMax=0.2 WaypointLogic=Ignore WaypointTurnRate=200.0 MinTimeBeforeShot=0.15 MaxTimeBeforeShot=0.25 IgnoreShotChance=0.0 [Weapon Profile] Name=Head Tracker Type=Hitscan ShotsPerClick=1 DamagePerShot=1.0 KnockbackFactor=4.0 TimeBetweenShots=0.03 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=true HeadshotMultiplier=2.0 MagazineMax=0 AmmoPerShot=1 ReloadTimeFromEmpty=0.5 ReloadTimeFromPartial=0.5 DamageFalloffStartDistance=100000.0 DamageFalloffStopDistance=100000.0 DamageAtMaxRange=25.0 DelayBeforeShot=0.0 ProjectileGraphic=Ball VisualLifetime=0.05 BounceOffWorld=false BounceFactor=0.5 BounceCount=0 HomingProjectileAcceleration=0.0 ProjectileEnemyHitRadius=0.1 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=-50.000 ADSBlocksShooting=false ShootingBlocksADS=false KnockbackFactorAir=4.0 RecoilNegatable=false DecalType=0 DecalSize=30.0 DelayAfterShooting=0.0 BeamTracksCrosshair=true AlsoShoot= ADSShoot= StunDuration=0.0 CircularSpread=true SpreadStationaryVelocity=300.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 RecoilCrouchScale=1.0 RecoilADSScale=1.0 PSRCrouchScale=1.0 PSRADSScale=1.0 ProjectileAcceleration=0.0 AccelIncludeVertical=false AimPunchAmount=0.0 AimPunchResetTime=0.2 AimPunchCooldown=0.5 AimPunchHeadshotOnly=false AimPunchCosmeticOnly=false MinimumDecelVelocity=0.0 PSRManualNegation=false PSRAutoReset=true AimPunchUpTime=0.05 AmmoReloadedOnKill=1 CancelReloadOnKill=false FlatKnockbackHorizontalMin=0.0 FlatKnockbackVerticalMin=0.0 ADSScope=No Scope ADSFOVOverride=70.0 ADSFOVScale=Clamped Horizontal ADSAllowUserOverrideFOV=false IsBurstWeapon=false ForceFirstPersonInADS=true ZoomBlockedInAir=false ADSCameraOffsetX=0.0 ADSCameraOffsetY=0.0 ADSCameraOffsetZ=0.0 QuickSwitchTime=0.1 WeaponModel=Heavy Surge Rifle WeaponAnimation=Primary UseIncReload=false IncReloadStartupTime=0.1 IncReloadLoopTime=0.1 IncReloadAmmoPerLoop=1 IncReloadEndTime=0.1 IncReloadCancelWithShoot=true WeaponSkin=Default ProjectileVisualOffset=X=0.000 Y=0.000 Z=0.000 SpreadDecayDelay=0.0 ReloadBeforeRecovery=false 3rdPersonWeaponModel=SMG 3rdPersonWeaponSkin=Default ParticleMuzzleFlash= ParticleWallImpact= ParticleBodyImpact= ParticleProjectileTrail= ParticleHitscanTrace=None ParticleMuzzleFlashScale=1.0 ParticleWallImpactScale=1.0 ParticleBodyImpactScale=1.0 ParticleProjectileTrailScale=1.0 Explosive=false Radius=500.0 DamageAtCenter=100.0 DamageAtEdge=100.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,5.0 SpreadSCA=1.0,1.0,-1.0,5.0 SpreadMSA=1.0,1.0,-1.0,5.0 SpreadMCA=1.0,1.0,-1.0,5.0 SpreadSSH=0.0,1.0,0.0,0.0 SpreadSCH=1.0,1.0,-1.0,5.0 SpreadMSH=0.0,1.0,0.0,0.0 SpreadMCH=1.0,1.0,-1.0,5.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=0.05 AAMaxSpeed=1.0 AADeadZone=0.0 AAFOV=30.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.175 PSRResetDegreesPerSec=40.0 UsePerBulletSpread=false PBS0=0.0,0.0 [Map Data] reflex map version 8 global entity type WorldSpawn brush vertices -91.466667 -76.000000 112.000000 -91.466667 96.000000 112.000000 -91.466667 96.000000 -128.000000 -91.466667 -76.000000 -128.000000 -80.000000 96.000000 -128.000000 -80.000000 -76.000000 -128.000000 -80.000000 -76.000000 112.000000 -80.000000 96.000000 112.000000 faces 0.000000 0.000000 2.000000 1.433334 0.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 1.433334 -1.433334 90.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 90.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 90.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 1.433334 -1.433334 90.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.000000 1.433334 0.000000 4 7 6 5 0x00000000 __TB_empty brush vertices -80.000000 -90.000000 112.000000 -80.000000 -74.000000 112.000000 -80.000000 -74.000000 -128.000000 -80.000000 -90.000000 -128.000000 160.000000 -74.000000 -128.000000 160.000000 -90.000000 -128.000000 160.000000 -90.000000 112.000000 160.000000 -74.000000 112.000000 faces 0.000000 0.000000 2.000000 2.000000 0.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 4 7 6 5 0x00000000 __TB_empty brush vertices 160.000000 -76.000000 112.000000 160.000000 96.000000 112.000000 160.000000 96.000000 -128.000000 160.000000 -76.000000 -128.000000 171.466667 96.000000 -128.000000 171.466667 -76.000000 -128.000000 171.466667 -76.000000 112.000000 171.466667 96.000000 112.000000 faces 0.000000 0.000000 2.000000 1.433334 0.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 1.433334 -1.433334 90.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 90.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 90.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 1.433334 -1.433334 90.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.000000 1.433334 0.000000 4 7 6 5 0x00000000 __TB_empty brush vertices -80.000000 -76.000000 123.466667 -80.000000 96.000000 123.466667 -80.000000 96.000000 112.000000 -80.000000 -76.000000 112.000000 160.000000 96.000000 112.000000 160.000000 -76.000000 112.000000 160.000000 -76.000000 123.466667 160.000000 96.000000 123.466667 faces 0.000000 0.000000 1.433334 1.433334 90.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 1.433334 0.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 0.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 0.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.000000 1.433334 0.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 1.433334 1.433334 90.000000 4 7 6 5 0x00000000 __TB_empty brush vertices -80.000000 -76.000000 -128.000000 -80.000000 96.000000 -128.000000 -80.000000 96.000000 -139.466667 -80.000000 -76.000000 -139.466667 160.000000 96.000000 -139.466667 160.000000 -76.000000 -139.466667 160.000000 -76.000000 -128.000000 160.000000 96.000000 -128.000000 faces 0.000000 0.000000 1.433334 1.433334 90.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 1.433334 0.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 0.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 0.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.000000 1.433334 0.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 1.433334 1.433334 90.000000 4 7 6 5 0x00000000 __TB_empty brush vertices -80.000000 223.000000 112.000000 -80.000000 239.000000 112.000000 -80.000000 239.000000 -128.000000 -80.000000 223.000000 -128.000000 160.000000 239.000000 -128.000000 160.000000 223.000000 -128.000000 160.000000 223.000000 112.000000 160.000000 239.000000 112.000000 faces 0.000000 0.000000 2.000000 2.000000 0.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 4 7 6 5 0x00000000 __TB_empty brush vertices -91.466667 -76.000000 112.000000 -91.466667 224.000000 112.000000 -91.466667 224.000000 -128.000000 -91.466667 -76.000000 -128.000000 -80.000000 224.000000 -128.000000 -80.000000 -76.000000 -128.000000 -80.000000 -76.000000 112.000000 -80.000000 224.000000 112.000000 faces 0.000000 0.000000 2.000000 2.500000 0.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.500000 -1.433334 90.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 90.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 90.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.500000 -1.433334 90.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.500000 0.000000 4 7 6 5 0x00000000 __TB_empty brush vertices -80.000000 -90.000000 112.000000 -80.000000 -74.000000 112.000000 -80.000000 -74.000000 -128.000000 -80.000000 -90.000000 -128.000000 160.000000 -74.000000 -128.000000 160.000000 -90.000000 -128.000000 160.000000 -90.000000 112.000000 160.000000 -74.000000 112.000000 faces 0.000000 0.000000 2.000000 2.000000 0.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.000000 0.000000 4 7 6 5 0x00000000 __TB_empty brush vertices 160.000000 -76.000000 112.000000 160.000000 224.000000 112.000000 160.000000 224.000000 -128.000000 160.000000 -76.000000 -128.000000 171.466667 224.000000 -128.000000 171.466667 -76.000000 -128.000000 171.466667 -76.000000 112.000000 171.466667 224.000000 112.000000 faces 0.000000 0.000000 2.000000 2.500000 0.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.500000 -1.433334 90.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 90.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 90.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.500000 -1.433334 90.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.500000 0.000000 4 7 6 5 0x00000000 __TB_empty brush vertices -80.000000 -76.000000 123.466667 -80.000000 224.000000 123.466667 -80.000000 224.000000 112.000000 -80.000000 -76.000000 112.000000 160.000000 224.000000 112.000000 160.000000 -76.000000 112.000000 160.000000 -76.000000 123.466667 160.000000 224.000000 123.466667 faces 0.000000 0.000000 2.500000 1.433334 90.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.500000 0.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 0.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 0.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.500000 0.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.500000 1.433334 90.000000 4 7 6 5 0x00000000 __TB_empty brush vertices -80.000000 -76.000000 -128.000000 -80.000000 224.000000 -128.000000 -80.000000 224.000000 -139.466667 -80.000000 -76.000000 -139.466667 160.000000 224.000000 -139.466667 160.000000 -76.000000 -139.466667 160.000000 -76.000000 -128.000000 160.000000 224.000000 -128.000000 faces 0.000000 0.000000 2.500000 1.433334 90.000000 0 1 2 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.500000 0.000000 2 4 5 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 0.000000 5 6 0 3 0x00000000 __TB_empty 0.000000 0.000000 2.000000 -1.433334 0.000000 1 7 4 2 0x00000000 __TB_empty 0.000000 0.000000 2.000000 2.500000 0.000000 6 7 1 0 0x00000000 __TB_empty 0.000000 0.000000 2.500000 1.433334 90.000000 4 7 6 5 0x00000000 __TB_empty entity type PlayerSpawn Vector3 position 128.000000 -20.000000 -96.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamA 0 entity type PlayerSpawn Vector3 position 48.000000 -20.000000 0.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamB 0 entity type PlayerSpawn Vector3 position -48.000000 -20.000000 80.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamA 0 entity type PlayerSpawn Vector3 position -48.000000 -20.000000 -96.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamA 0 entity type PlayerSpawn Vector3 position 128.000000 -20.000000 80.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamA 0 entity type PlayerSpawn Vector3 position 128.000000 -20.000000 -96.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamA 0 entity type PlayerSpawn Vector3 position 48.000000 -20.000000 0.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamB 0 entity type PlayerSpawn Vector3 position -48.000000 -20.000000 80.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamA 0 entity type PlayerSpawn Vector3 position -48.000000 -20.000000 -96.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamA 0 entity type PlayerSpawn Vector3 position 128.000000 -20.000000 80.000000 Vector3 angles 90.000000 0.000000 0.000000 Bool8 TeamA 0
5a24cc0666bf39803cbf97aa0a6aa008767b7067
449d555969bfd7befe906877abab098c6e63a0e8
/2159/CH6/EX6.1/61.sce
647b40b9a8479ae6042928fd9e8669528b771a4d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
61.sce
// problem 6.1 Rn=1700 v=0.744*(10^-4) d=0.05 V=(Rn*v)/d Vmax=2*V x=0.00625 r=(d/2)-x V1=Vmax*(1-(2*r/d)^2) disp(V1,"velocity at the point 6.25 mm from the wall in m/sec")
9940b08784b41a846b75479706ac7318efb806e0
449d555969bfd7befe906877abab098c6e63a0e8
/1397/CH1/EX1.3/1_3.sce
227d46298853b63ec905d19a7d90cd688f6e0ac3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
447
sce
1_3.sce
//clc(); clear; // To determine the slit seperation in Young's double slit experiment lambda=5100*10^(-8); //A source of light in centimetres D=200; // Seperation between screen and slit in centimetres beeta=0.01; // Overall seperation from double slit in metres d=(lambda*D)/beeta; printf("The seperation between slits if the source of light is incident from a narrow slit on a double slit is %f m",d);
2ee619ae59fd6a9d45dfde4a5bc21cdea2b1c0d1
449d555969bfd7befe906877abab098c6e63a0e8
/2183/CH7/EX7.5.a/Ex_7_5_a.sce
7f57833c39cd66e2ccab1b3b73e7678b02cd5990
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
146
sce
Ex_7_5_a.sce
// Example 7.5.a //photocurrent clc; clear; close; R=0.85;//in AW^-1 pi=1.5;//in mW po=1;//in mW ip=po*R;//in mA disp(ip,"photocurrent in mA is")
8f9e727b740c84c0d9de5f965c1043f3c424d064
ee3626ca13823b55caeb86e78fe258aad67d85e9
/scenes/toon_faces/toon_faces.sce
76a5c4ecd6d1f1db9ead7af83ca7a2d25721d53d
[]
no_license
Maleedo/ComputerGraphics
ea334e6a16520706e7934e61b2224e866b6f62dc
8e7bab0824676a67c1ea2faabddf128bbe9ef63c
refs/heads/master
2020-09-04T18:04:41.768905
2020-01-31T19:44:14
2020-01-31T19:44:14
219,843,157
0
0
null
null
null
null
UTF-8
Scilab
false
false
907
sce
toon_faces.sce
# camera: eye-point, look-at-point, up, fovy, width, height camera 0 16 50 0 12 -1 0 1 0 30 600 300 # recursion depth depth 1 # background color background 0.5 0.7 1.0 # global ambient light ambience 0.2 0.2 0.2 # light: position and color light 5 20 0 1.0 1.0 1.0 25 # meshes: filename, shading, material (ambient, diffuse, specular, shininess) mesh neutral.obj PHONG 0.2 0.2 0.2 0.9 0.9 0.4 1.0 1.0 1.0 30.0 0.0 mesh sad.obj PHONG 0.2 0.2 0.2 0.9 0.5 0.1 1.0 1.0 1.0 30.0 0.0 mesh confused.obj PHONG 0.2 0.2 0.2 0.9 0.2 0.2 1.0 1.0 1.0 30.0 0.0 mesh smile.obj PHONG 0.2 0.2 0.2 0.2 0.2 0.7 1.0 1.0 1.0 30.0 0.0 mesh kiss.obj PHONG 0.2 0.2 0.2 0.7 0.2 0.7 1.0 1.0 1.0 30.0 0.0 mesh puff.obj PHONG 0.2 0.2 0.2 0.2 0.7 0.7 1.0 1.0 1.0 30.0 0.0 # planes: center, normal, material plane 0 0 0 0 1 0 0.2 0.9 0.2 0.2 0.9 0.2 0.0 0.0 0.0 100.0 0.1
b090084751694d8ad7c5cdfa3fd2683ea092d8d9
a439c420539294c6e178cc89c43c4231246f9cbe
/Scripts/21. Signal/convol&corr/convol.sce
819abbe1c7251fee36dca4dbfb837997c1659b84
[]
no_license
PirateKing19902016/Scilab-Spoken-Tutorials
b7927e196acbefa47abdbdeb326d37385d5cbc34
a110fc425c123f7041cb9ee8eca42ce08619ae60
refs/heads/master
2021-05-02T06:14:37.089440
2018-02-09T16:23:27
2018-02-09T16:23:27
120,855,481
0
0
null
null
null
null
UTF-8
Scilab
false
false
201
sce
convol.sce
//Linear Convolution n=1:4 x=[1,2,3,4]; h=[1,1,1]; y=convol(x,h) subplot(311) plot(x) xtitle("Input Sequence [x]") subplot(312) plot(h) xtitle("h") subplot(313) plot2d3('gnn',y) xtitle("Convolution")
a5c9e040a67b96b9cb6ec6657070729d11b9b557
449d555969bfd7befe906877abab098c6e63a0e8
/122/CH6/EX6.5/exa6_5.sce
2119af75fbdde234ecb46b8dd75a9a568192ee35
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
401
sce
exa6_5.sce
// Example 6_5 // Root locus of system in state space clear; clc; xdel(winsid()); //close all windows // please edit the path // cd "/<your code directory>/"; exec("rootl.sci"); A = [0 1 0; 0 0 1; -160 -56 -14]; B = [0; 1; -14]; C = [1 0 0]; D = [0]; G = syslin('c',A,B,C,D); H = clean(ss2tf(G)); disp(H,' transfer function = '); rootl(G,[-20 -20; 20 20],'Root locus plot of State Space model');
8e0c5a6b4d990a21b56fa07374f4942f0b25de2c
449d555969bfd7befe906877abab098c6e63a0e8
/3856/CH10/EX10.2/Ex10_2.sce
946965632577ffa0bcce3d392a751937387393c8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
599
sce
Ex10_2.sce
//Calculate the Standard Reduction Potential for the Half reaction Fe(three positive)(aq)+3 electron =Fe(s). //Example 10.2 clc; clear; v1=2; //Number of electron in first reaction v2=1; //Number of electron in second reaction v3=3; //Number of electron in third reaction E1=-0.447; //Standard Reduction Potential for first reaction in V E2=0.771; //Standard Reduction Potential for second reaction in V E3=(v1*E1+v2*E2)/v3; //Standard Reduction Potential for first reaction in V (delrG3=delrG1+delrG2) printf("Standard Reduction Potential = %.3f V",E3);
e1db1d1b3351ad4333bb20b9096d41d56fbd232b
4ba406c1422fd1f3462feb6c2f378b17ea9175c2
/src/functions/dump/AbstractOrbit.tst
754e9a3cad23e1918334386c7b4648a18fc55700
[]
no_license
dwjohnston/geoplanets-model
236670178c456a0537ee31cfb3ab931ea46c7edf
06ff2b0ec83272f56ffe02b9ee38f1e169b41a51
refs/heads/master
2021-07-12T23:00:17.411355
2018-09-02T08:08:22
2018-09-02T08:08:22
144,376,835
1
0
null
null
null
null
UTF-8
Scilab
false
false
2,091
tst
AbstractOrbit.tst
import { AbstractParameter } from "../AbstractParameter"; import { Position } from "../../../blacksheep-geometry/lib"; import { SimpleParameter } from "../SimpleParameter"; export class AbstractOrbit extends AbstractParameter < Position[] > { speed: SimpleParameter; distance: SimpleParameter; center: Position; currentPhase: number; initPhase: number; positionsList: Position[]; previousPositionsList: Position[]; nPositions: SimpleParameter; constructor( label: string, speed: SimpleParameter, distance: SimpleParameter, center: Position, initPhase: number, nPositions: SimpleParameter, ) { super(label); this.speed = speed; this.distance = distance; this.initPhase = initPhase; this.currentPhase = initPhase; this.center = center; this.nPositions = nPositions; this.tickables = []; this.resetParams = []; this.randomParams = [this.speed, this.distance]; this.clearParams = [this.speed, this.distance]; this.initPositions(); // this.initialiseClearEventSubscriptions(); } reset() { this.currentPhase = this.initPhase; } getCenter() { return this.center; } getDistance() { return this.distance; } getSpeed() { return this.speed; } setCenter(p : Position) { this.center =p; } getPositions(): Position[] { return this.positionsList; } getPreviousPositions(): Position[] { return this.previousPositionsList; } calcPositions(): Position[] { throw "Calc positions not implmented"; } tick() { this.calcPositions(); } initPositions() { this.positionsList = []; this.previousPositionsList = []; for (let i = 0; i < this.nPositions.getValue(); i++) { this.positionsList[i] = this.center.copy(); this.previousPositionsList[i] = this.center.copy(); } } }
fa3773f4c3dece16254534c866d25f8e7330dba9
449d555969bfd7befe906877abab098c6e63a0e8
/1787/CH2/EX2.11/Exa2_11.sce
bae41f8fc5669001bb255b4dfe542fd8fed933e8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
517
sce
Exa2_11.sce
//Exa 2.11 clc; clear; close; //given data ni=2.5*10^13;//in cm^-3 e=1.6*10^-19;//in coulamb MUh=1800;//in cm^2/V-s MUe=3800;//in cm^2/V-s SIGMAi=ni*e*(MUe+MUh);//in (ohm-cm)^-1 GeAtoms=4.41*10^22;//in cm^-1 DonorImpurity=1/10^7;//in per Ge Atom Nd=4.41*10^22*DonorImpurity;//in cm^-1 n=Nd;//in cm^-1 p=ni^2/Nd;//in cm^-3 SIGMAn=e*Nd*MUe;//in (ohm-cm)^-1 disp(SIGMAi,"Conductivity of Ge(intrinsic) in (ohm-cm)^-1 "); disp(SIGMAn,"Conductivity of resulting N-type Ge semiconductor in (ohm-cm)^-1 : ");
9fbfe9a4049b52b05ac89c2f1e1d4d54f94c8597
cac765899ef2f4a3fea7b30feb7d3cc9e32a4eb4
/test-deprecated/testFonctionCout.sce
3e7e17d5f30aa7fafb04261b05a5dd165a0dfa35
[]
no_license
clairedune/AsserVisu
136d9cb090f709a410f23d3138ab115b722066d2
f351f693bffd50b5ae19656a7fcb7b52e01d6943
refs/heads/master
2020-04-11T09:56:32.106000
2017-01-12T14:01:12
2017-01-12T14:01:12
1,187,919
0
0
null
null
null
null
UTF-8
Scilab
false
false
14,827
sce
testFonctionCout.sce
//--------------------------------------------------// // main program // test the functions defined in // src/asserVisu/predictiveControl.sci // // author Claire Dune // date 28/01/2010 // Pour tester les fonctions de cout // ;exec('testAsserVisuTous.sce'); //--------------------------------------------------// clear DEBUG_VERBOSE = %F; //--------------------------------------------------// // LOAD The Files ---------------------// //--------------------------------------------------// path=get_absolute_file_path("scilab-src"); disp('HOME:'+path), getd(path + "src/graphisme"); // pour charger un repertoire en entier getd(path + "src/transformation"); getd(path + 'src/projectionPers'); getd(path + 'src/asserVisu'); getd(path + 'src/hrp2') getd(path + 'src/optimisation') // load optimisation exec('../HuMAnS/KickStart.sci'); execstr(LoadModule('../HuMAnS/Kernel')); if ~c_link('libcfsqp') then exec('../HuMAnS/Kernel/OptimizationTools/fsqp-1.2/loader.sce') ; end disp('') disp('------ Test Predictive Control -------') disp('') //----------------------------------------------------------------// // problem Statement // A fixed Object and a mobile camera //----------------------------------------------------------------// ////-------------case 1 Allibert-------------------------// // posecDesMo_m= [0 0 1 0 0 0 ]; // pose target/object desired posecMo_m = [0.05 -0.6 1 0 0 0 ]; // pose target/object init posewMo_m = [0 0 0 0 %pi 0 ]; // pose of the target in the World Frame Np_m = 1; // horizon lenght Nc_m = 1; // command horizon length v_m = [0 0 0 0 0 0]'; // init velocity // ------ Constraints definition xu_m = [ 0.22 ; 0.22 ]; // position max of the a 2D point in the image plane xl_m = [ -0.22 ; -0.22 ]; // position min of the a 2D point in the image plane bu_m = 1e3*0.25*ones(6,1); // command bounds bl_m = -bu_m; // command bounds on the horizon // -------- Sampling time Te_m = 0.08; // to be consistant with the image frame rate Te_simu = Te_m; a_m = 0.20; // dimension of the target oP_m = mire4points (a_m); // create the Npbts Points Target Nbpts_m = length(oP_m)/3 ; thres_m = 1e-4; // error threshold lambda = 1/Te_m; //----------LFunction and Q definition Lfunction = matIntMireC; // Lc(t) classical visual servo s(t) Z(t) //Lfunction = matIntMireP; // Lp(t) classical visual servo s(t) Z* //Lfunction = matIntMireM; // Lm(t) mixte (L*+Lc(t)) //Lfunction = matIntMireD; // Ld classical interaction matrix desired Q_m = matWeightIdentity(Np_m,Nbpts_m); //Q_m = matWeightIdentityZero(Np_m,Nbpts_m,1); //Q_m = matWeightTV(Np_m,Nbpts_m); //funcost_m = cld_costLocalMire; //funcost_m = ga_costLocalMire; funcost_m = cld_costSQPMire; //funcost_m = ga_costSQPMire; funcst_m = ga_constraintsLocalMire; jaccost_m = "grobfd"; jaccst_m = "grcnfd"; // -------- OP OPT_ERROR = %F; // use error sm-s as a correction OPT_DISPLAY = %T; // display option OPT_SAVE = %F; // Save option OPT_INEQ = %F; // ineq constraints OPT_NORMALIZE = %F; // normalisation //OPT_CONTROL ='SQP'; //OPT_CONTROL = 'QLD'; OPT_CONTROL = 'AV'; //OPT_CONTROL = 'PRED'; path_exp = '/home/dune/Documents/Resultats/100125-TestAsserVisu/'; name_exp = 'PRED'; save_path = path_exp+'/'+name_exp; //---------------------------------------------------------------------// // Create the object //---------------------------------------------------------------------// wMo_m = homogeneousMatrixFromPos(posewMo_m); wP_m = changeFrameMire(oP_m,wMo_m); // the Points in the World frame //---------------------------------------------------------------------// // Create the cameras //---------------------------------------------------------------------// // ------ First Camera Object Position cMo_m = (homogeneousMatrixFromPos(posecMo_m));// pose target/object init wMc_m = wMo_m*inv(cMo_m) ; // pose of the camera in the world frame wMc_m = wMc_m.*(abs(wMc_m)>1e-10); // compute the init projection on the view cP_m = changeFrameMire(oP_m,cMo_m); // target Points in the camera frame s_m = projectMireDirect(cP_m); // projection of the target points in the image plane Z_m = cP_m(3:3:length(cP_m)) ; // depth of the target points in the camera frame disp(s_m) halt //------- Desired Camera Object Position cDesMo_m = (homogeneousMatrixFromPos(posecDesMo_m)); wMcDes_m = wMo_m*inv(cDesMo_m); wMcDes_m = wMcDes_m.*(abs(wMcDes_m)>1e-10); // compute the desired projection on the view cDesP_m = changeFrameMire(oP_m,cDesMo_m); // desired target Points in the camera frame sDes_m = projectMireDirect(cDesP_m); // desired target Points projection ZDes_m = cDesP_m(3:3:length(cDesP_m)) ; // desired depth //---------------------------------------------------------------------// // Global Variable Control settings //----------------------------------------------------------------------// e0_m = zeros(Nbpts_m*2,1); defineGlobalVariable(s_m,... Z_m,Nc_m,Np_m,Nbpts_m,Te_m,sDes_m,ZDes_m,Q_m,e0_m,xl_m,xu_m,bl_m,bu_m,Lfunction,OPT_INEQ); // ----- Control param U0_m = []; // create the first control horizon for i = 1:Nc_m U0_m = [U0_m ; v_m]; end ; //----------------------------------------------------------------------// // Displays // //----------------------------------------------------------------------// // create the image plane if(OPT_DISPLAY) cote_m = 0.01; // display size of the dots hf2d1_m = createPlanImage(1,xl_m,xu_m,"Point 2D"); mire2DDraw(s_m,cote_m,3); // display the current points show_pixmap() mire2DDraw(sDes_m,cote_m,5); // display the desired points show_pixmap() // create the 3D view hf3d1_m = createFigure3D(2,"Camera Motion",1); Camera3DDrawColor(0.1,wMc_m,3); // display the current camera Camera3DDrawColor(0.1,wMcDes_m ,5); // display the desired camera Mire3DDraw4pts(wP_m); // display the target show_pixmap() disp('Red : desired pose, Green : init pose and target'); //create a windows to display the top view hf2d2_m = createFigure2D(3,"TopView"); // create a window to display the error hf2d3_m = createFigure2D(4,"Error"); //create a windows to display the top view hf2d4_m = createFigure2D(5,"Velocity"); //create a windows for the prediction hf2d5_m = createPlanImage(6,xl_m,xu_m,"Prediction Mire"); //create a windows to display the top view hf2d6_m = createFigure2D(7,"Prediction Velocity"); //create a windows to display the top view hf2d7_m = createFigure2D(8,"Erreur en Position "); end //-----------------------------------------------------// // launch the servo //------------------------------------------------------// disp('-------------------- servo loop------------') halt err = 10; // error value init iter_m = 0; // number of the iteration pt2D_m = s_m'; // store the real points for display norme_m = []; norme2_m = []; velocity_m = []; sm_m = s_m; position_m = []; v_m = zeros(6,1); while(err > thres_m & iter_m < 1000 ) iter_m = iter_m+1; disp('---------------------------------') disp(iter_m) updateVar(s_m,Z_m,sDes_m,ZDes_m,e0_m); //-------------------------------------------------------// // Compute the velocity using predictive control // //-------------------------------------------------------// if(OPT_CONTROL == 'PRED') disp('Predictive control') tic; // compute the best control on the Time horizon // vcam is a vector of Np velocities // sm is a vector of Np features / Np*Nbpts 2d points [U_m,smhor_m,Uhor_m] =predControlLocalMire(U0_m,funcost_m,funcst_m,jaccost_m,jaccst_m); disp('time') toc v_m = U_m(1:6) ; // apply only the first velocity U0_m = U_m; cost = ga_costHorLoc2dMire(s_m,Z_m,Uhor_m,Te_m,Lfunction,Np_m,Q_m,e0_m,sDes_m); //--------------------------------------------------------// // Compute the velocity using classical visual servoing // //--------------------------------------------------------// elseif(OPT_CONTROL == 'SQP') disp('SQP') nf = 1; // nombre de fonction de cout nineqn = 0; // nombre de contraintes d'inegalite nl if(OPT_INEQ) nineq = Np_m*Nbpts_m*4; // nombre de contraintes d'inegalites l else nineq = 0; end neqn = 0; // nombre de contraintes d'egalite nl neq = 0; // nombre de contraintes d'egalite l modefsqp = 100; miter = 500; // maximum number of iteration allowed by the user iprint = 0; // displayed parameter objective and constraint is displayed ipar =[nf,nineqn,nineq,neqn,neq,modefsqp,miter,iprint]; bigbnd = 1e4; // infinity value eps = 1e-5; // final norm requirement for d0k epsneq = 0.e0; // maximum violation of linear equalite contraints udelta = 0.e0; // the perturbation sixze the user suggest to compute the gradients // 0 if the user has no idea of what to suggest rpar =[bigbnd,eps,epsneq,udelta]; v_m=fsqp(v_m,ipar,rpar,[bl_m,bu_m],funcost_m,funcst_m,jaccost_m,jaccst_m); cost = funcost_m(1,v_m); //--------------------------------------------------------// // Compute the velocity using classical visual servoing // //--------------------------------------------------------// elseif(OPT_CONTROL == 'AV') disp('Asservissement visuel classique') L_m = Lfunction (s_m,Z_m); v_m = computeVelocity(lambda, L_m,s_m-sDes_m); v_m = v_m'; sm_m = s_m; cost = (s_m-sDes_m)'*(s_m-sDes_m) cost2 = cld_costSQPMire(1,v_m) cost3 = ga_costSQPMire(1,v_m) end //--------------------------- End of velocity computation // if(OPT_NORMALIZE) v_m = normalizeU(v_m,0.25); end v_m = v_m.*(abs(v_m)>1e-08); velocity_m =[velocity_m ;v_m']; //--------------------------------------------------------// // Displays // //--------------------------------------------------------// if(OPT_DISPLAY) xset("window",1); // image plane mire2DDraw(s_m,cote_m,3); // current projection show_pixmap() mire2DDraw(sDes_m,cote_m,5); // desired projection show_pixmap() mire2DDraw(sm_m,cote_m,4);//model projection show_pixmap() pt2D_m = [pt2D_m ; s_m']; if(size(pt2D_m,1)>1) for l=1:Nbpts_m xset("color",l) xpoly(pt2D_m(:,(l-1)*2+1),pt2D_m(:,(l-1)*2+2),"lines",0) show_pixmap() end end xset("window",2); // 3D view Camera3DDraw(0.1,wMc_m); show_pixmap() xset("window",3); AxeZ2DDraw(1,wMc_m); show_pixmap(); xset("window",4); plot(thres_m*ones(1,iter_m),'r') show_pixmap(); her=gce(); her.foreground=5; plot(norme_m,'b'); plot(norme2_m,'g') her=gce(); her.foreground=3; show_pixmap(); if(size(velocity_m,1)>1) xset("window",5); plot2d(velocity_m); show_pixmap() end if(size(position_m,1)>1) xset("window",8); plot2d(position_m); show_pixmap() end if(OPT_CONTROL == 'PRED') hf2d5_m = createPlanImage(6,xl_m,xu_m,"Prediction Mire"); //xset("window",6); mire2DDraw(s_m,cote_m,3); // current projection show_pixmap() mire2DDraw(sDes_m-e0_m,cote_m,5); // desired projection show_pixmap() mire2DDraw(sm_m(1:Nbpts_m*2),cote_m,4); //model projection show_pixmap() smvisu_m =[s_m;smhor_m]; mireEvolutionDraw(Np_m+1,smvisu_m,1); show_pixmap() hf2d6_m = createFigure2D(7,"Prediction Velocity"); previewVelocity_m = []; for index=1:Np_m previewVelocity_m = [previewVelocity_m ;... Uhor_m((index-1)*6+1:(index-1)*6+6)' ]; end plot2d(previewVelocity_m); show_pixmap() end end //--------------------------------------------------------// // Update data for next iter // //--------------------------------------------------------// c1Mc2_m = computeMotion(v_m',Te_simu) ; // resulting motion cMo_m = inv(c1Mc2_m)*cMo_m; wMc_m = wMc_m* c1Mc2_m ; cP_m = changeFrameMire(oP_m,cMo_m); sm_m = ga_predLoc2dMire(s_m,Z_m,v_m,Te_m,Lfunction); Z_m = cP_m(3:3:length(cP_m)) ; // init depth for the step s_m = projectMireDirect(cP_m); if(OPT_ERROR) e0_m = sm_m-s_m ; // model error disp('error taken into account'); disp(e0_m'); end err =(s_m-sDes_m)'*(s_m-sDes_m) //--------------------------------------------------------------// cDesMc_m = inv(wMcDes_m)*wMc_m; p = pFromHomogeneousMatrix(cDesMc_m); position_m = [position_m;p']; //------ termination test----// norme_m = [norme_m err]; norme2_m = [norme2_m cost]; //halt disp('---------------------------------') end disp('------ the end -------') disp('Enter to exit') halt if(OPT_SAVE & OPT_DISPLAY) xs2fig(1,save_path+'-point2D.fig') xs2fig(2,save_path+'-cameraPosition.fig') xs2fig(3,save_path+'-topview.fig') xs2fig(4,save_path+'-error.fig') xs2fig(5,save_path+'-velocity.fig') xs2fig(8,save_path+'-errPosision.fig') disp('IMAGES SAVED') end if(OPT_DISPLAY) xset("pixmap",0); delete(hf3d1_m); delete(hf2d1_m); delete(hf2d2_m); delete(hf2d3_m); delete(hf2d4_m); delete(hf2d5_m); delete(hf2d6_m); delete(hf2d7_m); end
e5fd5c92ab995fed2672f819b25ea10174d4c100
449d555969bfd7befe906877abab098c6e63a0e8
/48/CH4/EX4.5/eg_4_5.sce
82073dc804e2f5ce9d166beb44d15a90659143cc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
15,323
sce
eg_4_5.sce
//f=x^y^z+wxz+xy+v^w^yz^ clc; n=4; k=[0 0 0 0; 1 0 1 1; 0 1 1 0; 1 1 1 0]; k(:,:,2)=[0 0 0 0; 1 0 1 1; 0 1 1 0; 0 1 1 0]; //k=[1 0 0 0; // 0 0 0 0; // 0 0 0 0; // 0 0 1 0]; //k(:,:,2)=[1 0 0 0; // 0 0 0 0; // 0 0 0 0; // 1 0 0 0]; k(:,:,3)=zeros(n,n); k(:,:,4)=zeros(n,n); var=['y' 'z' 'v' 'w' 'x']; p1=['y''z''' 'y''z' 'yz' 'yz''']; p2=['v''w''x''';'v''w''x';'v''wx';'v''wx'''; 'vw''x''';'vw''x';'vwx';'vwx''']; cmn16=9; cmn8=5; cmn4=3; cmn2=2; temp=1; printf('The minimal ecpression of the given Kmap '); disp(k(:,:,1)); disp(k(:,:,2)); disp("is :"); printf('f'); printf("="); //32 cells for i=1:n for j=1:n for l=1:2 if(k(i,j,l)~=1 & k(i,j,l)~=2) temp=0; break; end end end end if(temp==1) printf("1"); abort; end //16 cells //8+8 row cells z1=ones(2,4,2); z2=ones(4,2,2); temp1=['00' '01' '11' '10']; temp2=['000' '001' '011' '010' '100' '101' '111' '110']; for i=1:n if(i==4) t=1; else t=i+1; end z=[k(i,:,1:2);k(t,:,1:2)]; z1=[k(i,:,3:4);k(t,:,3:4)]; if(noof3(z,0)==0 & noof3(z1,1)<cmn16) k(i,:,3:4)=ones(4,2); k(t,:,3:4)=ones(4,2); a=strsplit(temp1(1,i)); b=strsplit(temp1(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(in)); else if(c(in)==0 & a(in)=='1') printf(var(in)); end end end k(i,:,3:4)=ones(1,4,2); k(t,:,3:4)=ones(1,4,2); end end //8+8 column cells for j=1:n if(j==4) t=1; else t=j+1; end z=[k(:,j,1:2) k(:,t,1:2)]; z1=[k(:,j,3:4) k(:,t,3:4)]; if(noof3(z,0)==0 & noof3(z1,1)<cmn16) k(:,j,3:4)=ones(4,2); k(:,t,3:4)=ones(4,2); a=strsplit(temp2(1,j)); b=strsplit(temp2(1,t)); c=strsplit(temp2(1,j+4)); d=strsplit(temp2(1,t+4)); c1=check(a,b,c,d); for in=1:max(size(c1)) if(c1(in)==0 & a(in)=='0') printf('%s''',var(2+in)); else if(c1(in)==0 & a(in)=='1') printf(var(2+in)); end end end printf("+"); k(:,j,3:4)=ones(1,4,2); k(:,t,3:4)=ones(1,4,2); end end //4x4 front matrix if(number_of(k(:,:,1),0)==0 & number_of(k(:,:,3),1)<cmn16) printf(var(3)); printf(''''); k(:,:,3)=ones(4,4); end //4x4 rear matrix if(number_of(k(:,:,2),0)==0 & number_of(k(:,:,4),1)<cmn16) printf(var(3)); k(:,:,4)=ones(4,4); end //8 cells //2x2 front and rear cells for i=1:n for j=1:n if(i==4) t=1; else t=i+1; end if(j==4) u=1; else u=j+1; end z=k(i,j,1:2); z(1,2,:)=k(i,u,1:2); z(2,1,:)=k(t,j,1:2); z(2,2,:)=k(t,u,1:2); z1=k(i,j,3:4); z1(1,2,:)=k(i,u,3:4); z1(2,1,:)=k(t,j,3:4); z1(2,2,:)=k(t,u,3:4); if(noof3(z,0)==0 & noof3(z1,1)<cmn8) a=strsplit(temp1(1,i)); b=strsplit(temp1(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(in)); else if(c(in)==0 & a(in)=='1') printf(var(in)); end end end a=strsplit(temp2(1,j)); b=strsplit(temp2(1,u)); c=strsplit(temp2(1,4+j)); d=strsplit(temp2(1,4+u)); c1=check(a,b,c,d); for in=1:max(size(c1)) if(c1(in)==0 & a(in)=='0') printf('%s''',var(2+in)); else if(c1(in)==0 & a(in)=='1') printf(var(2+in)); end end end k(i,j,3:4)=ones(1,1,2); k(i,u,3:4)=ones(1,1,2); k(t,j,3:4)=ones(1,1,2); k(t,u,3:4)=ones(1,1,2); printf("+"); end end end //1x4 front and rear cells for i=1:n z=k(i,:,1:2); z1=k(i,:,3:4); if(noof3(z,0)==0 & noof3(z1,1)<cmn8) printf(p1(i)); printf("+"); k(i,:,3:4)=ones(1,4,2); end end //4x1 front and rear cells for j=1:n z=k(:,j,1:2); z1=k(:,j,3:4); if(noof3(z,0)==0 & noof3(z1,1)<cmn8) a=strsplit(temp2(1,j)); b=strsplit(temp2(1,u)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(2+in)); else if(c(in)==0 & a(in)=='1') printf(var(2+in)); end end end printf("+"); k(:,j,3:4)=ones(1,2,4); end end //2x4 front cells for i=1:n if(i==4) t=1; else t=i+1; end z=k(i,:,1); z(2,:,1)=k(t,:,1); z1=k(i,:,3); z1(2,:,1)=k(t,:,3); if(number_of(z,0)==0 & number_of(z1,1)<cmn8) a=strsplit(temp1(1,i)); b=strsplit(temp1(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(in)); else if(c(in)==0 & a(in)=='1') printf(var(in)); end end end printf('%s''',var(3)); printf("+"); k(i,:,3)=ones(1,4); k(t,:,3)=ones(1,4); end end //2x4 rear cells for i=1:n if(i==4) t=1; else t=i+1; end z=k(i,:,2); z(2,:,1)=k(t,:,2); z1=k(i,:,4); z1(2,:,1)=k(t,:,4); if(number_of(z,0)==0 & number_of(z1,1)<cmn8) a=strsplit(temp1(1,i)); b=strsplit(temp1(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(in)); else if(c(in)==0 & a(in)=='1') printf(var(in)); end end end printf(var(3)); printf("+"); k(i,:,4)=ones(1,4); k(t,:,4)=ones(1,4); end end //4x2 front cells for j=1:n if(j==4) u=1; else u=j+1; end z=k(:,j,1); z(:,2,1)=k(:,u,1); z1=k(:,j,3); z1(:,2,1)=k(:,u,3); if(number_of(z,0)==0 & number_of(z1,1)<cmn8) a=strsplit(temp2(1,i)); b=strsplit(temp2(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(in)); else if(c(in)==0 & a(in)=='1') printf(var(in)); end end end printf('%s''',var(3)); printf("+"); k(:,j,3)=ones(4,1); k(:,u,3)=ones(4,1); end end //4x2 rear cells for j=1:n if(j==4) u=1; else u=j+1; end z=k(:,j,2); z(:,2,1)=k(:,u,2); z1=k(:,j,4); z1(:,2,1)=k(:,u,4); if(number_of(z,0)==0 & number_of(z1,1)<cmn8) a=strsplit(temp2(1,i)); b=strsplit(temp2(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(4+in)); else if(c(in)==0 & a(in)=='1') printf(var(4+in)); end end end printf(var(3)); printf("+"); k(:,j,4)=ones(4,1); k(:,u,4)=ones(4,1); end end //4 cells //1x4 front cells for i=1:n z=k(i,:,1); z1=k(i,:,3); if(number_of(z,0)==0 & number_of(z1,1)<cmn4) printf(p1(1,i)); printf('%s''',var(3)); printf("+"); k(i,:,3)=ones(1,4); end end //1x4 rear cells for i=1:n z=k(i,:,2); z1=k(i,:,4); if(number_of(z,0)==0 & number_of(z1,1)<cmn4) printf(p1(1,i)); printf(var(3)); printf("+"); k(i,:,4)=ones(1,4); end end //4x1 front cells for j=1:n z=k(:,j,1); z1=k(:,j,3); if(number_of(z,0)==0 & number_of(z1,1)<cmn4) printf(p2(j,1)); printf("+"); k(:,j,3)=ones(4,1); end end //4x1 rear cells for j=1:n z=k(:,j,2); z1=k(:,j,4); if(number_of(z,0)==0 & number_of(z1,1)<cmn4) printf(p2(4+j,1)); printf("+"); k(:,j,4)=ones(4,1); end end //2x1 front and rear matrix for i=1:n for j=1:n if(i==4) t=1; else t=i+1; end z=[k(i,j,1);k(t,j,1)]; z(:,:,2)=[k(i,j,2) k(t,j,2)]; z1=[k(i,j,3);k(t,j,3)]; z1(:,:,2)=[k(i,j,4) k(t,j,4)]; if(noof3(z,0)==0 & noof3(z1,1)<cmn4) a=strsplit(temp1(1,i)); b=strsplit(temp1(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(in)); else if(c(in)==0 & a(in)=='1') printf(var(in)); end end end a=strsplit(temp2(1,j)); b=strsplit(temp2(1,4+j)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(2+in)); else if(c(in)==0 & a(in)=='1') printf(var(2+in)); end end end printf('+'); k(i,j,3)=1;k(t,j,3)=1; k(i,j,4)=1; k(t,j,4)=1; end end end //1x2 front and rear matrix for i=1:n for j=1:n if(j==4) u=1; else u=j+1; end z=[k(i,j,1) k(i,u,1)]; z(:,:,2)=[k(i,j,2) k(i,u,2)]; z1=[k(i,j,3) k(i,u,3)]; z1(:,:,2)=[k(i,j,4) k(i,u,4)]; if(noof3(z,0)==0 & noof3(z1,1)<1) printf(p1(i)); a=strsplit(temp2(1,j)); b=strsplit(temp2(1,u)); c=strsplit(temp2(1,4+j)); d=strsplit(temp2(1,4+j)); c1=check(a,b,c,d); for in=1:max(size(c1)) if(c1(in)==0 & a(in)=='0') printf('%s''',var(2+in)); else if(c1(in)==0 & a(in)=='1') printf(var(2+in)); end end end printf('+'); k(i,j,3)=1; k(i,u,3)=1; k(i,j,4)=1; k(i,u,4)=1; end end end //2 cells //1x2 front cells for i=1:n for j=1:n if(j==4) u=1; else u=j+1; end z=[k(i,j,1) k(i,u,1)]; z1=[k(i,j,3) k(i,u,3)]; if(number_of(z,0)==0 & number_of(z1,1)<cmn2) printf(p1(1,i)); a=strsplit(temp2(1,j)); b=strsplit(temp2(1,u)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(2+in)); else if(c(in)==0 & a(in)=='1') printf(var(2+in)); end end end printf('+'); k(i,j,3)=1; k(i,u,3)=1; end end end //1x2 rear cells for i=1:n for j=1:n if(j==4) u=1; else u=j+1; end z=[k(i,j,2) k(i,u,2)]; z1=[k(i,j,4) k(i,u,4)]; if(number_of(z,0)==0 & number_of(z1,1)<cmn2) printf(p1(1,i)); a=strsplit(temp2(1,4+j)); b=strsplit(temp2(1,4+u)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(2+in)); else if(c(in)==0 & a(in)=='1') printf(var(2+in)); end end end printf('+'); k(i,j,4)=1; k(i,u,4)=1; end end end //2x1 front cells for i=1:n for j=1:n if(i==4) t=1; else t=i+1; end z=[k(i,j,1);k(t,j,1)]; z1=[k(i,j,3) k(t,j,3)]; if(number_of(z,0)==0 & number_of(z1,1)<cmn2) a=strsplit(temp1(1,i)); b=strsplit(temp1(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(in)); else if(c(in)==0 & a(in)=='1') printf(var(in)); end end end printf(p2(j,1)) printf('+'); k(i,j,3)=1; k(i,u,3)=1; end end end //2x1 rear cells for i=1:n for j=1:n if(i==4) t=1; else t=i+1; end z=[k(i,j,2);k(t,j,2)]; z1=[k(i,j,4) k(t,j,4)]; if(number_of(z,0)==0 & number_of(z1,1)<cmn2) a=strsplit(temp1(1,i)); b=strsplit(temp1(1,t)); c=strcmp(a,b); for in=1:max(size(c)) if(c(in)==0 & a(in)=='0') printf('%s''',var(in)); else if(c(in)==0 & a(in)=='1') printf(var(in)); end end end printf(p2(4+j,1)) printf('+'); k(i,j,4)=1; k(i,u,4)=1; end end end //1 cell front and rear matrix for i=1:n for j=1:n z=k(i,j,1:2); z1=k(i,j,3:4); if(noof3(z,0)==0 & noof3(z1,1)<cmn2) printf(p1(1,i)); a=strsplit(temp2(1,j)); b=strsplit(temp2(1,4+j)); c=strcmp(a,b); for in=2:max(size(c)) if(a(in)=='0' & c(in)==0) printf('%s''',var(2+in)); else if(a(in)=='1' & c(in)==0) printf(var(2+in)); end end end printf('+'); k(i,j,3:4)=ones(1,1,2); end end end //single cell for i=1:n for j=1:n for z=1:2 if(k(i,j,z)==1 & k(i,j,z+2)==0) printf(p2(j,1)); printf(p1(1,i)); printf('+'); end end end end printf('0');
a61d24649e656c1d8d921d2d6489e40897f1e6de
8016059350f017142cd5cdf2df5cabf94cf3c477
/Digital Communication/snr pcm.sce
095d20891a4b928b4eab821f738e875b1ef9dc7c
[]
no_license
aftalam/5th-sem-labworks
07062dc9824af810a7d7970c7907ab999fda7c52
d3c858587369757ccbed96bc9b29e8a1fa709824
refs/heads/master
2022-11-11T23:58:51.147782
2020-07-05T18:13:59
2020-07-05T18:13:59
275,115,844
0
0
null
null
null
null
UTF-8
Scilab
false
false
593
sce
snr pcm.sce
//Find Signal to Noise Ratio (SNR)& Probability of Error of Pulse Code Modulation (PCM) System clc clear all n = input('Enter the Number of Bits : '); snrdb = 4.8+6*n; print(%io(2),snrdb,'in db'); xmax = input('Enter XMAX : '); pb = input('Enter the Input Power : '); snr = ((pb*3*(2^2*n))/(xmax^2)); print(%io(2),snr); print(%io(2),'in no. unit'); notb = 10:1:30; pe = 0.5*erfc(0.5*sqrt(pb/notb)); print(%io(2),pe); plot(notb,pe) xlabel('Noise Power Spectral Density') ylabel('Probability of Error') title('Probability of Error of PCM System') //no of bits = 8 //xmax = 100 //input power = 1
642d19a7f87294b85cc61ea5befd239d6b6b1906
449d555969bfd7befe906877abab098c6e63a0e8
/1133/CH10/EX10.2/Example10_2.sce
83620e1021c5b081b4b3e3689a1800fc332e2541
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
377
sce
Example10_2.sce
//Example 10.4 clc disp("R1 = 5 k-ohm, R2 = 10 k-ohm") disp("The IC is 7808 i.e. V_reg = +8 V") vt=8*(3) format(3) disp(vt,"Therefore, V_out(in V) = V_reg*[1 + R2/R1] =") disp("Now R2 = 1 k-ohm then,") vo=8*(1+(1/5)) format(4) disp(vo,"V_out(in V) = 8*[1 + 1/5] =") disp("Thus the V_out can be varied from 9.6 V to 24 V, by varing R2 from 1 k-ohm to 10 k-ohm.")
cf14b7bd7af9997e1501cef191534aa6ffdf7a3f
449d555969bfd7befe906877abab098c6e63a0e8
/608/CH15/EX15.22/15_22.sce
f2143b83b24c2dcdea1a89fbe87387b98fca0fd3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
925
sce
15_22.sce
//Problem 15.22: A coil of negligible resistance and inductance 100 mH is connected in series with a capacitance of 2 μF and a resistance of 10  across a 50 V, variable frequency supply. Determine (a) the resonant frequency, (b) the current at resonance, (c) the voltages across the coil and the capacitor at resonance, and (d) the Q-factor of the circuit. //initializing the variables: L = 100E-3; // in Henry C = 2E-6; // in Farads R = 10; // in ohms V = 50; // in Volts //calculation: fr = 1/(2*%pi*((L*C)^0.5)) //At resonance, XL = Xc and impedance Z = R I = V/R VL = I*(2*%pi*fr*L) Vc = I/(2*%pi*fr*C) Q = VL/V printf("\n\n Result \n\n") printf("\n (a)the resonant frequency = %.1f Hz",fr) printf("\n (b)Current, I = %.0f A",I) printf("\n (c)Voltage across coil at resonance is %.0fV and Voltage across capacitance at resonance is %.0fV",VL, Vc) printf("\n (d)At resonance, Q-factor = %.2f",Q)
e872ebb6ceebbf150846f23df7a2d61de54fb52d
449d555969bfd7befe906877abab098c6e63a0e8
/2441/CH1/EX1.12/Ex1_12.sce
fe5bbf2204fb84b310ce07a74570ab5e24a8b15e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
697
sce
Ex1_12.sce
//exa 1.12 clc;clear;close; format('v',5); //Arranging data for Load Duration Curve //week days 5-9pm load L1=350;//MW t1=4*5;//hours //week days 8-12am & 1-5pm load L2=250;//MW t2=t1+8*5;//hours //saturday & sunday 5-9pm load L3=200;//MW t3=t2+4*2;//hours //All days 150MW load L4=150;//MW t4=t3+6*5+15*2;//hours //All days 100MW load L5=100;//MW t5=t4+6*5+5*2;//hours A=31600;//Total Load Curve Area LF=A/L1/24/7*100;//%//Weekly load factor disp(LF,"Weekly Load factor(%)"); disp("Load Duration Curve is shown in figure."); //Load Duration Curve L=[L1 L2 L3 L4 L5];//MW T=[t1 t2 t3 t4 t5];//hours plot2d2(T,L); xtitle('Load Duration Curve','Time(Hours)','Load(MW)');
865410ee5157972968aa41ffbc9e4cb31ba69395
449d555969bfd7befe906877abab098c6e63a0e8
/1076/CH12/EX12.9/12_9.sce
a2ec65b9666be7d9999613f9ea3ba638f10b7197
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
528
sce
12_9.sce
clear; clc; ef=3000; Zc=300; ea=1700; iF=ef/Zc mprintf("\nCurrent in line= %d kA",iF) Ia=((2*ef)-ea)/Zc mprintf("\nCurrent through Arrester= %.3f kA",Ia) Ia=round(Ia *1000)/1000 R=ea/Ia mprintf("\nresistance of arrester= %.2f ohm",R) er=ea-ef; mprintf("\nSurge Voltage Reflected= %.0f kV",er) Cr=er/ef; CR=ea/ef; mprintf("\nCoeff of Reflection = %.3f, Coeff of Refraction=%.3f",Cr,CR) Cr=(R-Zc)/(R+Zc); CR=(R*2)/(R+Zc); mprintf("\nVerification: Coeff of Reflection = %.3f, Coeff of Refraction=%.3f",Cr,CR)
f683ba518ade4bc172bb8236217d6e2d419d7967
449d555969bfd7befe906877abab098c6e63a0e8
/1697/CH1/EX1.12/Exa1_12.sce
16d780f421127e7b86bf89b9cecf7d819be776c7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Exa1_12.sce
//Exa 1.12 clc; clear; close; //given data : r=10;//in Km Erms=10;//in mV/m r1=20;//in Km //Formula : Erms=sqrt(90*W)/r;//in V/m //Let swrt(90*W)=a a=Erms*r; Erms1=a/r1;//in mV/m disp(Erms1,"Field strength at 20Km distace in mV/m: ");
6d05c09eb011572b27c5cd7276378c59f5d2f5f6
5a05d7e1b331922620afe242e4393f426335f2e3
/macros/pchips.sci
c639ca256860bf8666fb4babdcd8e96c7a4ff5fb
[]
no_license
sauravdekhtawala/FOSSEE-Signal-Processing-Toolbox
2728cf855f58886c7c4a9317cc00784ba8cd8a5b
91f8045f58b6b96dbaaf2d4400586660b92d461c
refs/heads/master
2022-04-19T17:33:22.731810
2020-04-22T12:17:41
2020-04-22T12:17:41
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,383
sci
pchips.sci
function d = pchips(x,y,delta) //Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) //Parameters // x: a vector // y: is Y is vector then it must have the same length as x and Y is matrix then the last dimension of Y must equal //length(X). // delta: Points for interpolation // d: vector of interpolantant at delta //Examples: //x = -3:3; //y = [-1 -1 -1 0 1 1 1]; //xq1 = -3:.01:3; //v=pchips(x,y,xq1) // n = length(x); if n==2 d = repmat(delta(1),size(y)); else d = zeros(size(y)); k = find(sign(delta(1:n-2)).*sign(delta(2:n-1)) > 0); h = diff(x); hs = h(k)+h(k+1); w1 = (h(k)+hs)./(3*hs); w2 = (hs+h(k+1))./(3*hs); if ~isempty (k) then del_mx = max(abs(delta(k)), abs(delta(k+1))); del_mn = min(abs(delta(k)), abs(delta(k+1))); d(k+1) = del_mn./conj(w1.*(delta(k)./del_mx) + w2.*(delta(k+1)./del_mx)); else d(1) = ((2*h(1)+h(2))*delta(1) - h(1)*delta(2))/(h(1)+h(2)); if sign(d(1)) ~= sign(delta(1)) d(1) = 0; elseif (sign(delta(1)) ~= sign(delta(2))) & (abs(d(1)) > abs(3*delta(1))) d(1) = 3*delta(1); end d(n) = ((2*h(n-1)+h(n-2))*delta(n-1) - h(n-1)*delta(n-2))/(h(n-1)+h(n-2)); if sign(d(n)) ~= sign(delta(n-1)) d(n) = 0; elseif (sign(delta(n-1)) ~= sign(delta(n-2))) & (abs(d(n)) > abs(3*delta(n-1))) d(n) = 3*delta(n-1); end end end endfunction
3dc16b0a27e6cc9ad159a8a4ed3d5516ff327d52
ef7da921e1289d3deaaf9727db2b6f025656e8d9
/AverageOfDiscreteSignal.sce
8aae511ef938adc81418bd938af4206f4fe8a3b5
[]
no_license
PrayagS/SciLab_Exercises
ea88438207f2dc5d3f211c9abfe137a4bd43f68f
0495ba76e693750980fefb386c28209a6fd6563e
refs/heads/master
2020-09-08T01:52:22.914681
2019-11-16T05:39:29
2019-11-16T05:39:29
220,977,317
2
1
null
null
null
null
UTF-8
Scilab
false
false
103
sce
AverageOfDiscreteSignal.sce
clear; clf; dn = 1; n = 0 : dn : 10; x = sin(2*%pi*(1/11)*n); plot2d3(n, x); y = sum(x) / 11; disp(y);
56087e821263694485279d6214153be6082663a0
449d555969bfd7befe906877abab098c6e63a0e8
/1826/CH2/EX2.26/ex2_26.sce
1ff572853fe6e553e9539f81261e9a1d4a348021
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
ex2_26.sce
// Example 2.26, page no-46 clear clc theta=27.5/2//in degrees a=0.563*10^-9 n=1 h=1 k=1 l=1 d=a/sqrt(h^2+k^2+l^2) printf("\nThe lattice spacing for the plane (111) is %.2f * 10^-10 m",d*10^10) lam=2*d*sin(theta*%pi/180)/n printf("\nThe deBroglie wavelength of the neutrons is %.3f *10^-10 m",lam*10^10)
8f88efc4949f2c94f954d1a210f7522e36307e97
449d555969bfd7befe906877abab098c6e63a0e8
/67/CH1/EX1.49.b/example149b.sce
a5ac9be7481d38b4266d44636d7b25183665b369
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
230
sce
example149b.sce
//Example 1.49b //Determine whether the signal x(n)=cos(pi*n/2)cos(pi*n/4) clc; n=0:1/100:100 x0=cos((%pi*n/2)+(%pi*n/4)) x1=cos((%pi*n/2)-(%pi*n/4)) x=(x0+x1)/2; plot(x); disp('plot shows that this is a periodic signal');
2339672c248addc5bffac0deb3c133835964bf2e
449d555969bfd7befe906877abab098c6e63a0e8
/662/CH8/EX8.13/Example8_13.sci
fab4ae0b6aba2147e70b7aea04914fcaa77b7002
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
568
sci
Example8_13.sci
//Programming Example 8.13 //simple compound interest problem function[]=mainCI() //read input data(including prompts) printf("Please enter a value for the principle:(p)"); p=scanf("%f"); printf("Please Enter a value for the interest rate(r): ") r=scanf("%f"); printf("Please Enter a value for the number of years(n): ") n=scanf("%f"); //calculate i, then f i= r/100; f=p*(n^(1+i)); //display the output printf("\n The final value(F) is: %.2f\n", f); endfunction //calling routine mainCI();
5399e3c8d27aceaee8cbf0cd31ce0f146723a68a
449d555969bfd7befe906877abab098c6e63a0e8
/69/CH5/EX5.13/5_13.sce
0381bea777377a48603cc4fb993f43ec15870f61
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
494
sce
5_13.sce
clear; clc; close; Vcc = 12; Vbe = 0.7; Vt = 26*(10^(-3)); Rc = 3*(10^(3)); Rf1 = 120*(10^(3)); Rf2 = 68*(10^(3)); Rf = Rf1 + Rf2; ro = 30*(10^(3)); Beta = 140; Ib = (Vcc-Vbe)/(Rf+Beta*Rc); Ie = (1+Beta)*Ib; re = Vt/Ie; disp(re,"Value of diode resistive element(re) :"); Zb = Beta*re; Zi = (Rf1*Zb)/(Rf1+Zb); disp(Zi,"Input Impedance(Zi) :"); Zo = (Rc*Rf2)/(Rc+Rf2); disp(Zo,"Output Impedance(Zo) :"); Av = -[(Rf2*Rc)/(Rf2+Rc)]/re; disp(Av,"Voltage gain(Av) :");
3a2ad3c651627279e96495ae27724ec4a7c3ce71
13c3ed7bef4d80dabd836219bbf4396f07cb934a
/mattrace.sci
15d48e6ee9058a2b1c6aec42c2b608e22336de10
[]
no_license
Mushirahmed/scilab_workspace
99f489a110a5e295ce9fca9991122d14840018d3
f58b91b87bb0357fff82dcb97b05541e7e976eca
refs/heads/master
2021-01-10T15:48:40.576771
2016-02-10T10:32:46
2016-02-10T10:32:46
43,348,489
0
0
null
null
null
null
UTF-8
Scilab
false
false
123
sci
mattrace.sci
//SCI2C: DEFAULT_PRECISION= FLOAT function mattrace() a = uint16([1,2,3;4,5,6;7,8,9]); disp(trace(a)); endfunction
d3f6d1c2b10d8d419948a4d995b2b29ef9bf00fa
449d555969bfd7befe906877abab098c6e63a0e8
/69/CH14/EX14.5/14_5.sce
c61c830fce91800046a035914a0c02dfee9b8c7e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
263
sce
14_5.sce
clear; clc; close; hfe = 120; hie = 900; Re = 510; Rc = 2.2*10^(3); re = 7.5; A = -hfe/(hie+Re); Beta = -Re; Af = A/(1+Beta*A); Avf = Af*Rc; Av = -Rc/re; disp(Avf,'Voltage gain with feedback = '); disp(Av,'Voltage gain without feedback = ');
3912434ec77a467ab7ebd92e48cceca0430dfc94
449d555969bfd7befe906877abab098c6e63a0e8
/1574/CH10/EX10.4/PoRW_Ex_10_4.sce
bfe0a23ab408ec1a129954942e170f83334a749f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
212
sce
PoRW_Ex_10_4.sce
clc //Chapter10 //Example10.4 //Given //b ht=3e3,hr=5e3 // Antenna height d=4100*(sqrt(ht)+sqrt(hr))//distance mprintf('Max possible distance for efective point to point\n communication is %f km',d*1e-3)
db6c67965d537bd3579ccf0bfe9c46726d142d1c
449d555969bfd7befe906877abab098c6e63a0e8
/1073/CH2/EX2.30/2_30.sce
1d289783155e79b4c92d6db8bddf61a38d346b16
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
817
sce
2_30.sce
clear; clc; //Example 2.30 //Given hi=75 //[W/sq m.K) x1=0.2 //m x2=0.1 //[m] x3=0.1 //[m] T1=1943 //[K] k1=1.25 //W/m.K k2=0.074 ///W/m.K k3=0.555 //W/m.K T2=343 //K A=1 //assume [sq m] sigma_R=1/(hi*A)+x1/(k1*A)+x2/(k2*A)+x3/(k3*A); //Heat loss per i sq m Q=(T1-T2)/sigma_R //[W] //if T=temperature between chrome brick and koalin brick then //Q=(T1-T)/(1/(hi*A)+x1/(k1*A)) //or T=T1-(Q*(1/(hi*A)+x1/(k1*A))) T=T1-(Q*(1/(hi*A)+x1/(k1*A))); //[K] printf("Temperature at inner surface of middle layer=%f K(%f degree C)",T,T-273); //if Tdash=temperature at the outer surface of middel layer,then //Q=(Tdash-T2)/(x3/(k1*A)) //or Tdash=T2+(Q*x3/(k3*A)) Tdash=T2+(Q*x3/(k3*A)) //[K] printf("Temperature at outer surface of middle layer=%f K (%f degree C)",Tdash,Tdash-273);
e77924e3da32e97448380c64b6d6d31d4ded8e91
e25bb3040c96f9782aab0493e05ba22f5bf50ccf
/ex6/ex6_q2_template.sce
9247cc796992ea306bf54f1b90df726cb85142e6
[]
no_license
gpioblink/aizu-spls-exercise
c13258d46f50ed2db7797693a097b0fb75d24eaf
6c0b9326ba8e4b52378cfe777e82a2bfcdecc9b9
refs/heads/master
2022-09-14T06:09:44.774157
2020-05-31T07:43:26
2020-05-31T07:43:26
263,856,972
0
0
null
null
null
null
UTF-8
Scilab
false
false
772
sce
ex6_q2_template.sce
// EXERCISE 6 - QUESTION 2 // Change values of p and q to (2, 4), (5, 5) or (5, 10) p = 2; q = 4; // Define some parameters a = 0.1; // a(k)=0.1 b = 0.4; // b(k)=0.4 omega = -%pi:2*%pi/100:%pi; // omega=[-pi:pi] // Initialize B(e^jw) and A(e^jw) B = zeros(1,length(omega)); A = zeros(1,length(omega)); // Compute B(e^jw) into "B" // Write your code here for m=0:q B = B+b*((exp(%i*omega))^(-m)); end // Compute A(e^jw) into "A" // Write your code here for m=0:p if m==0 A = 1; else A = A+a*((exp(%i*omega))^(-m)); end end // Compute H(e^jw) into "H" // Write your code here H = B./A; disp(H) // Plot H(e^jw) figure; plot(abs(H)); title(sprintf('q = %d, p = %d',q,p)); xlabel('|H(ejw)|');
77d30d09a240ac20660e880d2f846077f4a72421
449d555969bfd7befe906877abab098c6e63a0e8
/991/CH20/EX20.2/Example20_2.sce
3ce1cd6b3674e8d4dcc13112cc679b3d6e782d16
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
132
sce
Example20_2.sce
//Example 20.2. clc format(6) sr=20/(4) // in V/us disp(" The slew rate, SR = dVo / dt") disp(sr," SR(in V/us) =")
b05b35f1c25fc087a6ecdcae04a3e42173fa2288
20f46832ae88a89a38f61087f5c7b9be092760cf
/tspCityInput.sce
8738f855e5e564ac70e8c41222ef513499068b4a
[]
no_license
valdron/tspscilab
beef362216b51a534e928a51a917f691cb99b846
c148f9a1d08d246966f23bcfb2739f2faa62526d
refs/heads/master
2020-06-11T13:57:36.005279
2016-12-08T20:54:27
2016-12-08T20:54:27
75,650,403
0
0
null
null
null
null
UTF-8
Scilab
false
false
927
sce
tspCityInput.sce
clear; exec tspGetCoordFromName.sci; exec tspDistOnSphere.sci; exec tspDraw.sci; exec tspLength.sci; exec tsp2Opt.sci; global name dist pos; disp "wieviele städte:" anzahl = scanf("%d"); name = []; for i = 1:anzahl disp "Name der Stadt oder exit:\n" text = scanf("%s"); if strcmp(text,'exit') == 0 then break; end name(i) = text; end _size = length(length(name)); coord = zeros(_size,2); for j = 1:_size [lat,lon]=tspGetCoordFromName(name(j)); coord(j,1)=lat; coord(j,2)=lon; end dist = zeros(_size,_size); for i = 1:_size for j = 1:_size if i == j then dist(i,j) = 0; else dist(i,j) = tspDistOnSphere(coord(i,1) , coord(i,2) , coord(j,1) , coord(j,2)); end end end pos = zeros(_size,2); for j = 1:_size pos(j,1)=coord(j,2); pos(j,2)=coord(j,1); end
b8fa6bf64a7cc4ed2473ae33ffa9d68c6839a69b
449d555969bfd7befe906877abab098c6e63a0e8
/3511/CH8/EX8.5/Ex8_5.sce
bbb11b731d3a50d9303635ede6747e9b093b9952
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,054
sce
Ex8_5.sce
clc; N=12500; // Speed in rpm m=15; // Mass flow rate in kg/s rp=4; // Pressure ratio eff_c=0.75; // Isentropic efficiency mu=0.9; // Slip factor pi=0.3; // Flow coefficient at impeller exit D=0.15; // Hub diameter in m ca2=150; // Axial velocity in m/s T01=275; // Inlet temperature in kelvin p01=1; // Inlet pressure in bar Cp=1.005;// Specific heat at constant pressure in kJ/kg K Cv=0.717;// Specific heat at constant volume in kJ/kg K r=1.4; // Specific heat ratio R=287; // Characteristic gas constant in J/kg K u2=ca2/pi; P=m*mu*u2^2/1000; // Power output D2=u2*60/(3.14*N); T1=T01-ca2^2/(2*Cp*10^3); p1=p01*(T1/T01)^(r/(r-1)); row1=p1*10^5/(R*T1); A1=m/(row1*ca2); D1=sqrt ((A1*4/(3.14))+D^2); p3_p1=rp; p2=2*p1; T_2=T1*(p2/p1)^((r-1)/r); T2=T1+(T_2-T1)/eff_c; row2=p2*10^5/(R*T2); W2=(m)/(row2*ca2*3.14*D2); disp ("kW",P,"Power = "); disp ("Impeller Diameters"); disp ("cm",D2*100,"D2 = ","cm (roundoff error)",D1*100,"D1 = "); disp ("Impeller width") disp ("cm (roundoff error)",W2*100,"W2 = ");
d23696cfdd608ffdd456b7cf1422b9483a06edf6
05df9394f5d45c0bddbd52e4aad8c8210e9e2743
/Scilab/Linear_Interpolation.sce
23013b3d456608ad9c8a49d57b000dc72732b236
[]
no_license
pikabing/Scilab
a9fd34b70be3bd552f47fafc409bf7c88573ac7a
87f2cc1914bfdb6c24a54960e9c49191bbd1f1ad
refs/heads/master
2020-03-10T09:34:56.522084
2018-04-12T21:51:52
2018-04-12T21:51:52
129,311,712
0
0
null
null
null
null
UTF-8
Scilab
false
false
138
sce
Linear_Interpolation.sce
function[ans] = linear_interpolarion(x,x0,y0,x1,y1) b0 = y0; b1 = (y1 - y0) / (x1-x0); ans = b0 + b1*(x-x0); endfunction
78951ce97fd9198e18e8904645f051d5f30ad6a1
449d555969bfd7befe906877abab098c6e63a0e8
/869/CH1/EX1.6/1_6.sce
58504d63cb281ab43c6b8ed140f7d5b09d1139ad
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
137
sce
1_6.sce
clc //initialisation of variables V= 30 //mph //CALCULATIONS Vinfps= V*5280*(1/60)*(1/60) //RESULTS printf ('v = %.f fps',Vinfps)
3f016948a6ba2b83f33ea7e938acea0f498b4bc3
449d555969bfd7befe906877abab098c6e63a0e8
/608/CH36/EX36.15/36_15.sce
9be820846bae8d4c55c9afeb29f568a4cafbadd4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,635
sce
36_15.sce
//Problem 36.15: A voltage wave has an amplitude of 800 V at the fundamental frequency of 50 Hz and its nth harmonic has an amplitude 1.5% of the fundamental. The voltage is applied to a series circuit containing resistance 5 ohm, inductance 0.369 H and capacitance 0.122 μF. Resonance occurs at the nth harmonic. Determine (a) the value of n, (b) the maximum value of current at the nth harmonic, (c) the p.d. across the capacitor at the nth harmonic and (d) the maximum value of the fundamental current. //initializing the variables: V1m = 800; // in volts f = 50; // in Hz x = 0.015; C = 0.122E-6; // in farads R = 5; // in ohms L = 0.369; // in Henry //calculation: //voltage at nth harmonic Vnm = x*V1m w = 2*%pi*f //For resonance at the nth harmonic nwL = 1/nwC n = 1/(w*(L*C)^0.5) //At resonance, impedance Zn = R //the maximum value of current at the nth harmonic Inm = Vnm/Zn //capacitive reactance, at nth harmonic Xcn = 1/(n*w*C) //the p.d. across the capacitor at the nth harmonic Vcn = Inm*Xcn //At the fundamental frequency, inductive reactance, XL1 = w*L //capacitive reactance Xc1 = 1/(w*C) //Impedance at the fundamental frequency, Z1 = R + %i*(XL1 - Xc1) Z1mag = (real(Z1)^2 + imag(Z1)^2)^0.5 phiZ1 = atan(imag(Z1)/real(Z1)) //Maximum value of current at the fundamental frequency, I1m = V1m/Z1mag printf("\n\n Result \n\n") printf("\n(a)n = %.0f",n) printf("\n(b)the maximum value of current at the nth harmonic %.2f A",Inm) printf("\n(c)the p.d. across the capacitor at the nth harmonic is %.2f",Vcn) printf("\n(d)the maximum value of the fundamental current. %.2f A",I1m)
b7089d5fc764ab98a2fbc4e9dda1da9bd4197ae6
449d555969bfd7befe906877abab098c6e63a0e8
/1703/CH10/EX10.5/10_5.sce
1272fd5d8f6900c67d3023b04b576e58b1633bec
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
548
sce
10_5.sce
clc //initialisation of variables pl= 122.5 // ft Hw= 1225 //ft g= 32.2 //ft/sec^2 Cd= 0.98 Cd1= 0.45 N= 500 //r.p.m P= 6800 //h.p n= 0.86 w= 62.4 //lb/ft^2 l= 5450 //ft f= 0.005 A= 18 //ft^2 //CALCULATIONS Ah= Hw-pl js= Cd*sqrt(2*g*Ah) bs= Cd1*js D= bs*60*2/(N*2*%pi) a= P*2*g*550*144/(n*w*js^3*2) vp= sqrt(pl*2*g/(4*f*l)) dp= (js*2*4*A/(%pi*144*vp))^(2/3) dp=2.495 //ft //RESULTS printf ('diameter of bucket circle D = %.1f ft',D) printf ('\n area of jet = %.f in^2',a) printf ('\n diameter of pipe = %.1f ft',dp)
c086e1b38db121624996de284525cfc45be56367
449d555969bfd7befe906877abab098c6e63a0e8
/1757/CH6/EX6.10/EX6_10.sce
2f69e7ff4ce8c5fdf9269a40d70eec430a790d4d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,063
sce
EX6_10.sce
//Example6.10 // To determine the range of the differential voltage gain clc; clear; close; //R1 = 1 K ohm to 25 K ohm ; R2 = 50 ; // K ohm R3 = 10 ; // K ohm R4 = 10 ; // K ohm // the output of instrumentation amplifier is given by //Vo = (R4/R3)*(1+(2*R2/R1))*(VI@-VI1); // the differential voltage gain of the instrumentation amplifier can be written as //Av = (Vo/(VI2-VI1)) = (R4/R3)*(1+(2R2/R1)); // For R1 = 1 K ohm the maximum differential voltage gain of the instrumentation amplifier is R1 = 1 ; // K ohm Av = (R4/R3)*(1+(2*R2/R1)); disp('the maximum differential voltage gain of the instrumentation amplifier is = '+string(Av)+ ' '); // For R1 = 25 K ohm the mminimum differential voltage gain of the instrumentation amplifier is R1 = 25 ; // K ohm Av = (R4/R3)*(1+(2*R2/R1)); disp('the minimum differential voltage gain of the instrumentation amplifier is = '+string(Av)+ ' '); disp(' the range of the differential voltage gain of the instrumentation amplifier is '); disp(' 5 <= Av <= 101 ');