blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
214
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
6
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
21 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
141k
586M
star_events_count
int64
0
30.4k
fork_events_count
int64
0
9.67k
gha_license_id
stringclasses
8 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
50 values
src_encoding
stringclasses
23 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
5
10.4M
extension
stringclasses
29 values
filename
stringlengths
2
96
content
stringlengths
5
10.4M
266561ee321913397cfa1b833b6c13a395978a57
449d555969bfd7befe906877abab098c6e63a0e8
/181/CH2/EX2.24/example2_24.sce
29048a0fa75a91198253e848f5615cdb13b5aa30
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
510
sce
example2_24.sce
// Find the diffusion length // Basic Electronics // By Debashis De // First Edition, 2010 // Dorling Kindersley Pvt. Ltd. India // Example 2-24 in page 101 clear; clc; close; // Given data C_D=1.5*10^-6; // Diffusion capacitance in F D_p=13; // Constant eta=2; // Constant V_t=0.026; // Voltage at room temperature in V I=1*10^-3; // Current in mA // Calculation L_p=sqrt((C_D*D_p*eta*V_t)/I); printf("Diffusion length = %0.3e m",L_p); // Result // Diffusion length = 31.84*10^-3 m
fc765b1dd4be340e2c8f1df4f2ec631eca9b91e8
05b2bd67239938195f6ea021fd482c06f69c9145
/p3.sci
946f9f99f7ec0a9c9e326ff70e29ceeec74445c7
[]
no_license
ZimmSebas/Metodos
213aa8af793726409cf0346c3315663aa59ae835
5fb6f28413064194ae8f625da48914b471bb50f7
refs/heads/master
2020-03-31T15:18:35.349807
2019-12-21T23:19:21
2019-12-21T23:19:21
152,331,779
5
0
null
null
null
null
UTF-8
Scilab
false
false
3,946
sci
p3.sci
function y = dosc(x) y = sin(x) - x^2/2 endfunction //Método de la bisección, toma minimo, maximo, funcion, epsilon y epsilon funcion function med = bisecc(mini,maxi,fun,eps,epsf) if(fun(maxi).*fun(mini) > 0) error('Intervalos del mismo signo'); end; m = ((mini+maxi)/2); while(maxi-m > eps | abs(fun(m)) > epsf ) m = ((mini+maxi)/2); if((fun(maxi) < 0 & fun(m) > 0) | (fun(maxi) > 0 & fun(m) < 0)) mini = m; else maxi = m; end; end; med = m; endfunction; //Método Secante, toma primer elemento, segundo, funcion, epsilon y epsilon funcion function seca = secante(fst,snd,func,eps,epsf) if(func(fst).*func(snd) > 0) error('Intervalo incorrecto') end seca = snd - (func(snd) * (snd-fst )/(func(snd)-func(fst))) fst = snd snd = seca while(abs(func(seca)) > epsf | abs(snd-fst) > eps) seca = snd - (func(snd) * (snd-fst )/(func(snd)-func(fst))) fst = snd snd = seca end endfunction //Método de la falsa posición, toma minimo, maximo, funcion, epsilon y epsilon funcion function c = falsapp(a,b,fun,eps,epsf) if(fun(b).*fun(a) > 0) error('Intervalos del mismo signo'); end; c = b - fun(b)*(b-a)/(fun(b)-fun(a)) while(b-c > eps | abs(fun(c)) > epsf ) if((fun(b) < 0 & fun(c) > 0) | (fun(b) > 0 & fun(c) < 0)) a = c; else b = c; end; c = b - fun(b)*(b-a)/(fun(b)-fun(a)) end; endfunction; function y = serie5(x, n) if(n == 0) y = x; return;end; y = serie5(2** (x-1), n-1); return; endfunction function y = serie6(x, c, n) //cotas x = 2 y c = 1, que onda lo de sqrt(z)? if(n == 0) y = x; return;end; y = serie6((x+c*((x^2)-5)),c,n-1); return; endfunction function y = ide(x) y = x endfunction // Ejercicio 8 // ge(f,x,n) es la funcion generica para iterar sobre una funcion dada // g1 a g4 son las funciones del ejercicio function y = g1(x) y = %e^x/3 endfunction function y = g2(x) y = (%e^x - x)/2 endfunction function y = g3(x) y = log(3*x) endfunction function y = g4(x) y = %e^x - 2*x endfunction function y = comp(f, x) y = f(x) endfunction function y = ge(x, n) // Funcion, Punto, Cantidad iteraciones if(n == 0) y = x; return;end; y = ge(g3(x), n-1); return; endfunction // Ejercicio 9 function n = fnueve(X) n = [1 + X(1)^2 - X(2)^2 + %e^X(1)*cos(X(2)); 2*X(1)*X(2) + %e^X(1)*sin(X(2))]; endfunction //Método de Newton function y = newt_mult(fn, X, N) Xn = X; mprintf("X0 = %f\n", Xn) for i = 1:N J = numderivative(fn, Xn); J = 1/J; y = Xn - J*fn(Xn); Xn = y //mprintf("X%d = %0.5f |-| %0.5f\n", i, Xn(1), Xn(2)) end endfunction // Ejercicio 10 function n = fdiez(X) n = [X(1)^2 + X(1)*X(2)^3 - 9; 3*X(1)^2*X(2) - 4 - X(2)^3]; endfunction Xa = [1.2; 2.5] Xb = [-2; 2.5] Xc = [-1.2; -2.5] Xd = [2; -2.5] // Ejercicio 11 function y = fonce(X) y = 2*X(1) + 3*X(2)^2 + %e^(2*X(1)^2 + X(2)^2) endfunction function y = newt_mult_fin(fn, X, eps) //Función, punto inicial, error y = X; Xn = X; i = 0; mprintf("X0 = %f\n", Xn) while(norm(y-Xn) > eps | i == 0) // Norma euclideana Xn = y; J = numderivative(fn, Xn); J = 1/J; y = Xn - J*fn(Xn); i = i+1; mprintf("X%d = %0.12f |-| %0.12f\n", i, y(1), y(2)) end [Jac, Hes] = numderivative(fn, y, [] , 2, "blockmat"); mprintf("Una matriz es definida positiva si sus autovalores son positivos.\n") mprintf("Autovalores del hessiano de fn: ") disp(spec(Hes)) endfunction function ploty(fn,l,in,r) // Funcion, Limite Izq, Intervalo, Limite Der //xdel(winsid()); x = [l:in:r]; y = fn(x); n = size(x); yy = zeros(1,n(2)); plot(x,yy) plot(x,y) a = gca(); a.auto_scale = "off"; endfunction
494a59a73f426a3371e111b81d215fcf958f1320
449d555969bfd7befe906877abab098c6e63a0e8
/728/CH5/EX5.1/Ex5_1.txt
fd11d407547e6c6d8fd52ab466ef49ebbb1473a0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
253
txt
Ex5_1.txt
//Caption:Determine the minimum distance between two end plates //Exa:5.1 clc; clear; close; //Given: a=3;//in cm c=3*10^10;//in cm/s f=10*10^9;//in Hz P_01=2.405; d=%pi/sqrt(f^2*4*%pi^2/c^2-(P_01/a)^2); disp(d,'Minimum distance (in cm) =');
77829899ab67a42acda958c60aac99d0341d1b57
449d555969bfd7befe906877abab098c6e63a0e8
/773/CH4/EX4.03/4_03.sci
cbfb4b25e5cee1f990bd6035c045d0a131694f17
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
800
sci
4_03.sci
//laplace// printf("since S2 is the referance stator winding , Es2=KVcos0 \n where Es2 & Er are rms voltages \n') k=1 Theta=60; disp(Theta,"Theta=") V=28; disp(V,"V(applied)=") printf("Es2=V*cos(Theta) \n") Es2=k*V*cos(Theta*(%pi/180)); disp(Es2,"Es2=") printf("Es1=k*V*cos(Theta-120)\n") Es1=k*V*cos((Theta-120)*(%pi/180)); // Given Theta=60 in degrees disp(Es1,"Es1=') printf("Es3=k*V*cos(Theta+120) \n") Es3=k*V*cos((Theta+120)*(%pi/180)); disp(Es3,"Es3=') printf("Es31=sqrt(3)*k*Er*sin(Theta)") Es31=sqrt(3)*k*V*sin(Theta*(%pi/180)); disp(Es31,"Es31=') printf("Es12=sqrt(3)*k*Er*sin((Theta-120)") Es12=sqrt(3)*k*V*sin((Theta-120)*(%pi/180)); disp(Es12,"Es12=') printf("Es23=sqrt(3)*k*Er*sin((Theta+120)") Es23=sqrt(3)*k*V*sin((Theta+120)*(%pi/180)); disp(Es23,"Es23=')
7c219d8ae47b3c1de1d60d73e2b9510418aef513
d1a2737ec744ffbba1165afa7b05f26a4076f513
/Lab 9/Q5.sce
1bd3d50582aaafeb5cf814ff0a4dd7aa73ee6d00
[ "MIT" ]
permissive
ipsitmantri/EE-324-Control-Systems-Lab
4e37a3de51f4114ba0ea281cbb1da78a6c4815bb
b34c45efc3539005603b2e76c1665d6636f80f88
refs/heads/master
2023-04-03T10:42:34.548542
2021-04-13T14:11:21
2021-04-13T14:11:21
357,540,595
2
0
null
null
null
null
UTF-8
Scilab
false
false
805
sce
Q5.sce
clc; clear; s = poly(0, 's'); g = (10*s + 2000) / (s^3 + 202*s^2 + 490*s + 18001); G = syslin('c', g); scf(); show_margins(G, 'bode'); K = 9 * 18001 / 2000; g1 = K*g; G1 = syslin('c', g1); disp(sprintf("The proportional added to get sse of 10%s = %.4f",'%', K)); [gm, fg] = g_margin(G1); [phm, fp] = p_margin(G1); disp(sprintf("The gain margin of G1(s) is %.8f", gm)); disp(sprintf("The phase margin of G1(s) is %.8f at crossover frequency %.8f Hz",... phm, fp)); g2 = g1 * (s+1); G2 = syslin('c', g2); [gm2, fg2] = g_margin(G2); [phm2, fp2] = p_margin(G2); disp(sprintf("The gain margin of G2(s) is %.8f", gm2)); disp(sprintf("The phase margin of G2(s) is %.8f at crossover frequency %.8f Hz",... phm2, fp2)); G2_cl = G2 /. syslin('c', 1, 1); [z, p, k] = tf2zp(G2_cl); disp(p); scf(); show_margins(G2);
4456989c425de178092c43fe996529e29141e4f1
d2f78245a2b280448680f5f264ad5e73ebb04932
/AFISMC_Controller/AFISMC_obsv_beam_new.sce
d4b94dcb37a03bdf12ab4681fd6701f7c3fe0567
[ "BSD-2-Clause" ]
permissive
hbx5233/AFISMC
2240dd3461ea96c71e7a9425a2ed21bb11a64c0a
bb7f501867a1fdf54d229a361e753e6f945269fc
refs/heads/master
2022-04-24T02:56:20.404213
2020-04-20T12:17:20
2020-04-20T12:17:20
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
7,304
sce
AFISMC_obsv_beam_new.sce
clc clear A=[-209.443458108676,450.728478793718,0,0,0,0;-450.728478793718,-209.443458108676,0,0,0,0;0,0,-2.25680753735172,467.128469627320,0,0;0,0,-467.128469627320,-2.25680753735172,0,0;0,0,0,0,-0.460680331454473,87.5968670596031;0,0,0,0,-87.5968670596031,-0.460680331454473]; B=[-9.64474367821996,2.65660382188316;-7.76311006325836,-5.61613187293423;-0.117927290005266,0.0527206875641465;0.215603654718808,-0.128623447556356;0.0737096142170821,0.0391127484963023;-0.0970049785583168,-0.0786358112919118]; C=[1.88477251668799,-1.14284793707382,5.77230310808448,47.9525873535994,-5.11774457916239,-49.0010462763406]; H=-B(:,1); dum1=size(A); dum2=size(B); dum3=size(H); dum4=size(C); n=dum1(1,1); m=dum2(1,2); m_H=dum3(1,2); q=dum4(1,1); DeltaA=eye(n,n)*0.01; DeltaB=zeros(n,m); DeltaB(1,1)=0; Bp=inv(B'*B)*B'; Gama=eye(n)-B*Bp; DeltaAm=Bp*DeltaA; DeltaAu=Gama*DeltaB; DeltaBm=Bp*DeltaA; DeltaBu=Gama*DeltaB; bm=norm(DeltaBm,2); bu=norm(DeltaBu,2); a=norm(DeltaA,2); au=norm(DeltaAu,2); am=norm(DeltaAm,2); gm=0; cm=0; function [LME, LMI, OBJ]=AFSMC(XLIST) [X,Kh,eps1,eps2,eps3,eps4,eps5,eps6,eps7,eps8,eps9,gama]= XLIST(:) LME=list(X-X') LMI=list(-([X*A'+A*X+Kh'*B'+B*Kh+(eps1+eps2+eps3+eps4+eps5+eps6+eps7+eps8+eps9)*eye(n,n),zeros(n,m_H),(1+cm)*X'*C',au*X',gm*X'*Bp'*B',am*bu/(1-bm)*X',gm*bu/(1-bm)*X'*Bp',bu/(1-bm)*Kh',gm*X',zeros(n,n+m+n);zeros(m_H,n),-gama^2*eye(m_H,m_H),zeros(m_H,q+n+n+n+m+m+n),H'*Bp'*B',bu/(1-bm)*H'*Bp',H';(1+cm)*C*X,zeros(q,m_H),-eye(q,q),zeros(q,n+n+n+m+m+n+n+m+n);au*X,zeros(n,m_H+q),-eps1*eye(n,n),zeros(n,n+n+m+m+n+n+m+n);gm*B*Bp*X,zeros(n,m_H+q+n),-eps2*eye(n,n),zeros(n,n+m+m+n+n+m+n);am*bu/(1-bm)*X,zeros(n,m_H+q+n+n),-eps4*eye(n,n),zeros(n,m+m+n+n+m+n);gm*bu/(1-bm)*Bp*X,zeros(m,m_H+q+n+n+n),-eps5*eye(m,m),zeros(m,m+n+n+m+n);bu/(1-bm)*Kh,zeros(m,m_H+q+n+n+n+m),-eps7*eye(m,m),zeros(m,n+n+m+n);gm*X,zeros(n,m_H+q+n+n+n+m+m),-eps8*eye(n,n),zeros(n,n+m+n);zeros(n,n),B*Bp*H,zeros(n,q+n+n+n+m+m+n),-eps3*eye(n,n),zeros(n,m+n);zeros(m,n),bu/(1-bm)*Bp*H,zeros(m,q+n+n+n+m+m+n+n),-eps6*eye(m,m),zeros(m,n);zeros(n,n),H,zeros(n,q+n+n+n+m+m+n+n+m),-eps9*eye(n,n)]),X,eps1,eps2,eps3,eps4,eps5,eps6,eps7,eps8,eps9,gama,0.9-gama) OBJ=gama endfunction X0=ones(n,n); Kh0=zeros(m,n); eps1_0=1; eps2_0=1; eps3_0=1; eps4_0=1; eps5_0=1; eps6_0=1; eps7_0=1; eps8_0=1; eps9_0=1; gama_0=1; Init_guess=list(X0,Kh0,eps1_0,eps2_0,eps3_0,eps4_0,eps5_0,eps6_0,eps7_0,eps8_0,eps9_0,gama_0); Ans_LMI=lmisolver(Init_guess, AFSMC); X0=Ans_LMI(1); Kh0=Ans_LMI(2); gama_0=Ans_LMI(12); K0=Kh0*X0^-1; R0=eye(n,n); Lh0=zeros(n,q); eps1_0=1; eps2_0=1; eps3_0=1; eps4_0=1; eps5_0=1; eps6_0=1; eps7_0=1; eps8_0=1; eps9_0=1; eps10_0=1; save('sys.dat',A,B,C,H,n,m,q,m_H,a,am,au,bm,bu,gm,cm,Bp); save('init_vals1.dat',X0,Kh0,K0,R0,Lh0,eps1_0,eps2_0,eps3_0,eps4_0,eps5_0,eps6_0,eps7_0,eps8_0,eps9_0,eps10_0,gama_0); for ii=1:1 clear load('init_vals1.dat','X0','Kh0','K0','R0','Lh0','eps1_0','eps2_0','eps3_0','eps4_0','eps5_0','eps6_0','eps7_0','eps8_0','eps9_0','eps10_0','gama_0'); load('sys.dat','A','B','C','H','n','m','q','m_H','a','am','au','bm','bu','gm','cm','Bp'); gama=gama_0; function [LME, LMI, OBJ]=AFSMCobsv(XLIST) [X,Kh,R,Lh,eps1,eps2,eps3,eps4,eps5,eps6,eps7,eps8,eps9,eps10]= XLIST(:) LME=list(X-X',R-R') LMI=list(-([X'*A'+A*X+Kh'*B'+B*Kh+(eps1+eps2+eps3+eps4+eps5+eps6+eps7)*eye(n,n),-B*K0,H,au*X',gm*X',am*bu/(1-bm)*X',bu/(1-bm)*Kh',gm*X',zeros(n,n+n+m+m+n+n);-K0'*B',A'*R+R*A+C'*Lh'+Lh*C+(eps8*am^2+eps9*au^2)*eye(n,n),R*H,zeros(n,n+n+n+m+n),a*Bp'*B',am*bu/(1-bm)*eye(n,n),bu/(1-bm)*K0',R*B,R,R;H',H'*R,-gama*eye(m_H,m_H),zeros(m_H,n+n+n+m+n+n+n+m+m+n+n);au*X,zeros(n,n+m_H),-eps2*eye(n,n),zeros(n,n+n+m+n+n+n+m+m+n+n);gm*X,zeros(n,n+m_H+n),-eps3*eye(n,n),zeros(n,n+m+n+n+n+m+m+n+n);am*bu/(1-bm)*X,zeros(n,n+m_H+n+n),-eps4*eye(n,n),zeros(n,m+n+n+n+m+m+n+n);bu/(1-bm)*Kh,zeros(m,n+m_H+n+n+n),-eps6*eye(m,m),zeros(m,n+n+n+m+m+n+n);gm*X,zeros(n,n+m_H+n+n+n+m),-eps10*eye(n,n),zeros(n,n+n+m+m+n+n);zeros(n,n),a*B*Bp,zeros(n,m_H+n+n+n+m+n),-eps1*eye(n,n),zeros(n,n+m+m+n+n);zeros(n,n),am*bu/(1-bm)*eye(n,n),zeros(n,m_H+n+n+n+m+n+n),-eps5*eye(n,n),zeros(n,m+m+n+n);zeros(m,n),bu/(1-bm)*K0,zeros(m,m_H+n+n+n+m+n+n+n),-eps7*eye(m,m),zeros(m,m+n+n);zeros(m,n),B'*R',zeros(m,m_H+n+n+n+m+n+n+n+m),-eps8*eye(m,m),zeros(m,n+n);zeros(n,n),R',zeros(n,m_H+n+n+n+m+n+n+n+m+m),-eps9*eye(n,n),zeros(n,n);zeros(n,n),R',zeros(n,m_H+n+n+n+m+n+n+n+m+m+n),-eps10*eye(n,n)]),X,R,eps1,eps2,eps3,eps4,eps5,eps6,eps7,eps8,eps9,eps10) OBJ=[] endfunction Init_guess=list(X0,Kh0,R0,Lh0,eps1_0,eps2_0,eps3_0,eps4_0,eps5_0,eps6_0,eps7_0,eps8_0,eps9_0,eps10_0); Ans_LMI=lmisolver(Init_guess,AFSMCobsv); X0=Ans_LMI(1); Kh0=Ans_LMI(2); R0=Ans_LMI(3); Lh0=Ans_LMI(4); eps1_0=Ans_LMI(5); eps2_0=Ans_LMI(6); eps3_0=Ans_LMI(7); eps4_0=Ans_LMI(8); eps5_0=Ans_LMI(9); eps6_0=Ans_LMI(10); eps7_0=Ans_LMI(11); eps8_0=Ans_LMI(12); eps9_0=Ans_LMI(13); eps10_0=Ans_LMI(14); Kind=K0-Kh0*X0^-1; K0=Kh0*X0^-1; L0=R0^-1*Lh0; save('init_vals1.dat',X0,Kh0,K0,R0,Lh0,eps1_0,eps2_0,eps3_0,eps4_0,eps5_0,eps6_0,eps7_0,eps8_0,eps9_0,eps10_0,gama_0); end for ii=1:1 clear load('init_vals1.dat','X0','Kh0','K0','R0','Lh0','eps1_0','eps2_0','eps3_0','eps4_0','eps5_0','eps6_0','eps7_0','eps8_0','eps9_0','eps10_0','gama0'); load('sys.dat','A','B','C','H','n','m','q','m_H','a','am','au','bm','bu','gm','cm','Bp'); function [LME, LMI, OBJ]=AFSMCobsv(XLIST) [X,Kh,R,Lh,eps1,eps2,eps3,eps4,eps5,eps6,eps7,eps8,eps9,eps10,gama]= XLIST(:) LME=list(X-X',R-R',K0*X-Kh) LMI=list(-([X'*A'+A*X+Kh'*B'+B*Kh+(eps1+eps2+eps3+eps4+eps5+eps6+eps7)*eye(n,n),-B*K0,H,au*X',gm*X',am*bu/(1-bm)*X',bu/(1-bm)*Kh',gm*X',zeros(n,n+n+m+m+n+n);-K0'*B',A'*R+R*A+C'*Lh'+Lh*C+(eps8*am^2+eps9*au^2)*eye(n,n),R*H,zeros(n,n+n+n+m+n),a*Bp'*B',am*bu/(1-bm)*eye(n,n),bu/(1-bm)*K0',R*B,R,R;H',H'*R,-gama*eye(m_H,m_H),zeros(m_H,n+n+n+m+n+n+n+m+m+n+n);au*X,zeros(n,n+m_H),-eps2*eye(n,n),zeros(n,n+n+m+n+n+n+m+m+n+n);gm*X,zeros(n,n+m_H+n),-eps3*eye(n,n),zeros(n,n+m+n+n+n+m+m+n+n);am*bu/(1-bm)*X,zeros(n,n+m_H+n+n),-eps4*eye(n,n),zeros(n,m+n+n+n+m+m+n+n);bu/(1-bm)*Kh,zeros(m,n+m_H+n+n+n),-eps6*eye(m,m),zeros(m,n+n+n+m+m+n+n);gm*X,zeros(n,n+m_H+n+n+n+m),-eps10*eye(n,n),zeros(n,n+n+m+m+n+n);zeros(n,n),a*B*Bp,zeros(n,m_H+n+n+n+m+n),-eps1*eye(n,n),zeros(n,n+m+m+n+n);zeros(n,n),am*bu/(1-bm)*eye(n,n),zeros(n,m_H+n+n+n+m+n+n),-eps5*eye(n,n),zeros(n,m+m+n+n);zeros(m,n),bu/(1-bm)*K0,zeros(m,m_H+n+n+n+m+n+n+n),-eps7*eye(m,m),zeros(m,m+n+n);zeros(m,n),B'*R',zeros(m,m_H+n+n+n+m+n+n+n+m),-eps8*eye(m,m),zeros(m,n+n);zeros(n,n),R',zeros(n,m_H+n+n+n+m+n+n+n+m+m),-eps9*eye(n,n),zeros(n,n);zeros(n,n),R',zeros(n,m_H+n+n+n+m+n+n+n+m+m+n),-eps10*eye(n,n)]),X,R,eps1,eps2,eps3,eps4,eps5,eps6,eps7,eps8,eps9,eps10,gama) OBJ=gama endfunction Init_guess=list(X0,Kh0,R0,Lh0,eps1_0,eps2_0,eps3_0,eps4_0,eps5_0,eps6_0,eps7_0,eps8_0,eps9_0,eps10_0,gama0); Ans_LMI=lmisolver(Init_guess,AFSMCobsv); X0=Ans_LMI(1); Kh0=Ans_LMI(2); R0=Ans_LMI(3); Lh0=Ans_LMI(4); eps1_0=Ans_LMI(5); eps2_0=Ans_LMI(6); eps3_0=Ans_LMI(7); eps4_0=Ans_LMI(8); eps5_0=Ans_LMI(9); eps6_0=Ans_LMI(10); eps7_0=Ans_LMI(11); eps8_0=Ans_LMI(12); eps9_0=Ans_LMI(13); eps10_0=Ans_LMI(14); gama0=Ans_LMI(15); Kind=K0-Kh0*X0^-1; K0=Kh0*X0^-1; L0=R0^-1*Lh0; save('init_vals1.dat',X0,Kh0,K0,R0,Lh0,eps1_0,eps2_0,eps3_0,eps4_0,eps5_0,eps6_0,eps7_0,eps8_0,eps9_0,eps10_0,gama0); end
687965b3851d8e4c7b43f718002f1d429403ef56
449d555969bfd7befe906877abab098c6e63a0e8
/23/CH14/EX14.8/Example_14_8.sce
53ce6a2fdf3cfa5b6280e136d6536164e27499aa
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,889
sce
Example_14_8.sce
clear; clc; //To find Approx Value function[A]=approx(V,n) A=round(V*10^n)/10^n;//V-Value n-To what place funcprot(0) endfunction //Exampl_14.8 //Solution : Program to Determine the Phase equlibrium data for the System A12=4.62424; A21=3.35629; alpha12=3.78608; alpha21=1.81775; B11=-996; B22=-1245; B12=-567; P1_sat=103.264;//[kPa] P2_sat=5.633;//[kPa] T=308.15;//[K] R=8314; //G_E/RT = T1 = A21*x1 + A12*x2 - Q //V1=exp[(x2^2)*[A12 + (2*(A21-A12)*x1) - Q - (x1*(dQ/dx1))]] //V2=exp[(x1^2)*[A21 + (2*(A12-A21)*x2) - Q + (x2*(dQ/dx1))]] //Q=(alpha12*x1*alpha21*x2)/((alpha12*x1) + (alpha21*x2)) //dQ/dx1=dQ_x1=(alpha12*alpha21*(alpha21*x2^2 - alpha12*x1^2))/((alpha12*x1 + alpha21*x2)^2) //P=(x1*V1*P1_sat)/si1 + (x2*V2*P2_sat)/si2 //d12=2B12-B11-B22 //si1=exp[((B11*(P-P1_sat)) + (P*y2^2*d12)))/RT] //si2=exp[((B22*(P-P2_sat)) + (P*y1^2*d12)))/RT] //y1=(x1*V1*P1_sat)/(si1*P) //y2=(x2*V2*P2_sat)/(si2*P) //BUBL P x1=[0.01:0.01:0.99]; x2=1-x1; for(i=1:99) si1=1;//Assumed si2=1;//Assumed dP=100; while(dP>0.0001) Q=approx(((alpha12*x1(i)*alpha21*x2(i))/((alpha12*x1(i)) + (alpha21*x2(i)))),4); dQ_x1=approx((alpha12*alpha21*((alpha21*((x2(i))^2)) - (alpha12*((x1(i))^2))))/(((alpha12*x1(i)) + (alpha21*x2(i)))^2),4); V1=approx(exp((x2(i)^2)*(A12 + (2*(A21-A12)*x1(i)) - Q - (x1(i)*dQ_x1))),4); V2=approx(exp((x1(i)^2)*(A21 + (2*(A12-A21)*x2(i)) - Q + (x2(i)*dQ_x1))),4); Pi=approx((((x1(i)*V1*P1_sat)/si1) + ((x2(i)*V2*P2_sat)/si2)),4); y1=approx((x1(i)*V1*P1_sat)/(si1*Pi),4); y2=approx((x2(i)*V2*P2_sat)/(si2*Pi),4); d12=(2*B12)-B11-B22; si1=approx(exp(((B11*(Pi-P1_sat))+(Pi*(y2^2)*d12))/(R*T)),4); si2=approx(exp(((B22*(Pi-P2_sat))+(Pi*(y1^2)*d12))/(R*T)),4); Pf=approx(((x1(i)*V1*P1_sat)/si1) + ((x2(i)*V2*P2_sat)/si2),4); dP=abs(Pf-Pi); end P(i)=Pf; y(i)=y1; end for(i=1:99) if(P(i)>104.61) P(i)=%nan; end end x1(100)=1; y(100)=1; P(100)=P1_sat; subplot(1,2,1) P_=[5.633 104.6]; x=[0 0.0117]; plot2d(x,P_,rect=[0,0,0.02,104.6]) P_=[104.6 104.6]; x=[0 0.02]; plot(x,P_,'r') P_=[5.633 5.633]; y1=[0 0.02]; plot(y1,P_,'b') P_=[104.6 120]; xa=[0.0117 0.0117]; plot(xa,P_,'g--') legend('P vs x1','P* = 104.6kPa','P vs y1','x1_a=0.0117') xtitle('P-x-y','x1,y1','P/kPa') P_=[100 120]; y1=[0.02 0.02]; plot(y1,P_,'w') subplot(1,2,2) P_=[104.6 104.6]; x=[0.943 0.96]; plot(x,P_,'r') P_=[104.3 104.6]; y1=[0.946 0.946]; plot(y1,P_,'b--') P_=[104.6 104.8]; xb=[0.95 0.95]; plot(xb,P_,'g--') plot2d(x1,P,rect=[0.943,103,1,105]) plot2d(y,P,style=3,rect=[0.943,103,1,105]) legend('P*=104.6kPa','y1*=0.946','x1_b=0.95','P vs x1','P vs y1') xtitle('P-x-y(Ether Rich Region)','x1,y1','P/kPa') //End
7169c937fec209230134a7a35119da582d5b8a56
449d555969bfd7befe906877abab098c6e63a0e8
/3745/CH1/EX1.62/Ex1_62.sce
b3456a1e32a8fde6232ffb6e34429cd6c8442ae2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
732
sce
Ex1_62.sce
// Ex 62 Page 403 clc;clear;close; // Given R=150;//ohm Vrms=200;//V Rd1=65;//ohm Rd2=140;//ohm Vm=Vrms/sqrt(2);//V //v=Vm*sin(theta) Rf=R+Rd1;//ohm Rb=R+Rd2;//ohm //i_f=v/Rf;//A //i_b=v/Rb;//A Irms=1/2/%pi*(integrate('(sqrt(2)*sin(theta))**2','theta',0,%pi)+integrate('(sqrt(2)/3*sin(theta))**2','theta',%pi,2*%pi)) Iav=1/2/%pi*(integrate('sqrt(2)*sin(theta)','theta',0,%pi)+integrate('sqrt(2)/3*sin(theta)','theta',%pi,2*%pi)) printf("reading of ammeter 1= %.2f A",Irms) printf("\n reading of ammeter 2 = %.2f A",Iav) P=1/2*(Vrms**2/Rf+Vrms**2/Rb);//W printf("\n\n Power taken from the mains = %.1f W",P) Pc=Irms**2*R;//W Pd=P-Pc;//W printf("\n Power dissipated in rectifying device = %d W",Pd) //Answer wrong in the textbook.
6029c41012843eb798578625a53927626acd84a5
d465fcea94a1198464d7f8a912244e8a6dcf41f9
/system/kiks_draw_remoterobot.sci
1dadbccfcf40878342bae43c64af267047de4431
[]
no_license
manasdas17/kiks-scilab
4f4064ed7619cad9e2117a6c0040a51056c938ee
37dc68914547c9d0f423008d44e973ba296de67b
refs/heads/master
2021-01-15T14:18:21.918789
2009-05-11T05:43:11
2009-05-11T05:43:11
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,720
sci
kiks_draw_remoterobot.sci
function [] = kiks_draw_remoterobot(id,kx,ky,ang,n,r) // Display mode mode(0); // Display warning for floating point exception ieee(1); // ----------------------------------------------------- // (c) 2000-2004 Theodor Storm <theodor@tstorm.se> // http://www.tstorm.se // ----------------------------------------------------- global("KIKS_MMPERPIXEL","KIKS_ARENA_HDL","KIKS_REMOTEKHEPDIOD_HDL","KIKS_REMOTEKHEPWHL_HDL","KIKS_REMOTEKHEP_HDL","KIKS_MMPERPIXEL","KIKS_NR_HDL","KIKS_LINVIS_GR_HDL","KIKS_LINVIS_HDL","KIKS_ROBOT_MATRIX","KIKS_RBT_BODY","KIKS_RBT_LAMP","KIKS_RBT_DIOD","KIKS_RBT_HDL","KIKS_RBTSENS_HDL","KIKS_RBTWHL_HDL","KIKS_RBTLMP_HDL","KIKS_RBTDIOD_HDL","KIKS_WALL_WIDTH","KIKS_WALL_RENDER","KIKS_PROX_DIR","KIKS_PROX_ANG"); scale = mtlb_double(r)/29; KIKS_WALL_WIDTH_SCALED = mtlb_double(KIKS_WALL_WIDTH)/mtlb_double(KIKS_MMPERPIXEL); KIKS_WALL_RENDER_SCALED = mtlb_double(KIKS_WALL_RENDER)/mtlb_double(KIKS_MMPERPIXEL); if ~isempty(n) then // !! L.15: Unknown function kiks_remotekheppatch not converted, original calling sequence used KIKS_REMOTEKHEP_HDL = mtlb_i(KIKS_REMOTEKHEP_HDL,id,kiks_remotekheppatch(id)); // !! L.16: Matlab function sprintf not yet converted, original calling sequence used // !! L.16: Matlab function patch not yet converted, original calling sequence used KIKS_REMOTEKHEPWHL_HDL = mtlb_i(KIKS_REMOTEKHEPWHL_HDL,id,patch("Facecolor",[0.5,0.5,0.6],"EdgeColor","none","Erase","xor","tag",sprintf("remoteKhep %d",id))); // !! L.17: Matlab function sprintf not yet converted, original calling sequence used // !! L.17: Matlab function patch not yet converted, original calling sequence used KIKS_REMOTEKHEPDIOD_HDL(id,1) = patch("Facecolor",[0.5,0.5,0.6],"EdgeColor","none","Erase","xor","tag",sprintf("remoteKhep %d",id)); // !! L.18: Matlab function sprintf not yet converted, original calling sequence used // !! L.18: Matlab function patch not yet converted, original calling sequence used KIKS_REMOTEKHEPDIOD_HDL(id,2) = patch("Facecolor",[0.5,0.5,0.6],"EdgeColor","none","Erase","xor","tag",sprintf("remoteKhep %d",id)); end; // ! L.21: mtlb($) can be replaced by $() or $ whether $ is an M-file or not // ! L.21: mtlb($) can be replaced by $() or $ whether $ is an M-file or not // !! L.21: Matlab function set not yet converted, original calling sequence used // L.21: Name conflict: function name changed from set to %set %set(mtlb_e(KIKS_REMOTEKHEP_HDL,id),"xdata",mtlb_a(mtlb_s(mtlb_a(mtlb_double(KIKS_RBT_BODY(1,mtlb_imp(1,3,mtlb_double(mtlb($)))))*(mtlb_double(r)/mtlb_double(KIKS_MMPERPIXEL)),floor(mtlb_double(kx)/mtlb_double(KIKS_MMPERPIXEL))),floor(KIKS_WALL_WIDTH_SCALED)),floor(KIKS_WALL_RENDER_SCALED)),"ydata",mtlb_a(mtlb_s(mtlb_a(mtlb_double(KIKS_RBT_BODY(2,mtlb_imp(1,3,mtlb_double(mtlb($)))))*(mtlb_double(r)/mtlb_double(KIKS_MMPERPIXEL)),floor(mtlb_double(ky)/mtlb_double(KIKS_MMPERPIXEL))),floor(KIKS_WALL_WIDTH_SCALED)),floor(KIKS_WALL_RENDER_SCALED))); whl_xcoord = ([-15,-15,20]/mtlb_double(KIKS_MMPERPIXEL))*scale; whl_ycoord = ([-10,10,0]/mtlb_double(KIKS_MMPERPIXEL))*scale; // !! L.25: Matlab function set not yet converted, original calling sequence used // L.25: Name conflict: function name changed from set to %set %set(mtlb_e(KIKS_REMOTEKHEPWHL_HDL,id),"xdata",mtlb_a(mtlb_s(mtlb_a(mtlb_s(whl_xcoord*cos(-mtlb_double(ang)),whl_ycoord*sin(-mtlb_double(ang))),floor(mtlb_double(kx)/mtlb_double(KIKS_MMPERPIXEL))),floor(KIKS_WALL_WIDTH_SCALED)),floor(KIKS_WALL_RENDER_SCALED)),"ydata",mtlb_a(mtlb_s(mtlb_a(mtlb_a(whl_xcoord*sin(-mtlb_double(ang)),whl_ycoord*cos(-mtlb_double(ang))),floor(mtlb_double(ky)/mtlb_double(KIKS_MMPERPIXEL))),floor(KIKS_WALL_WIDTH_SCALED)),floor(KIKS_WALL_RENDER_SCALED))); endfunction
2885778c233f6e2e96981ce13a034a38ab2474ce
a7df4100475b96e7670094f49788307220742c9d
/Nand To Tetris/Course Material/projects/00/Mux8Way16.tst
fc1b51c20088904f835135a9202e34418a4b7f8c
[]
no_license
alecjcook/LabVIEW
39ccfedd57d1027ec8b1788a6cdb4898a6bf0c04
b235f2b6fceb3f74bfeea6e1c0651be7cab0e687
refs/heads/master
2021-01-16T18:29:51.436920
2014-05-18T15:06:18
2014-05-18T15:06:18
12,083,067
6
3
null
null
null
null
UTF-8
Scilab
false
false
990
tst
Mux8Way16.tst
// This file is part of the materials accompanying the book // "The Elements of Computing Systems" by Nisan and Schocken, // MIT Press. Book site: www.nand2tetris.org // File name: projects/00/Mux8Way16.tst load Mux8Way16.hdl, output-file Mux8Way16.out, compare-to Mux8Way16.cmp, output-list a%X1.4.1 b%X1.4.1 c%X1.4.1 d%X1.4.1 e%X1.4.1 f%X1.4.1 g%X1.4.1 h%X1.4.1 sel%D2.1.2 out%X1.4.1; set a 0, set b 0, set c 0, set d 0, set e 0, set f 0, set g 0, set h 0, set sel 0, eval, output; set sel 1, eval, output; set sel 2, eval, output; set sel 3, eval, output; set sel 4, eval, output; set sel 5, eval, output; set sel 6, eval, output; set sel 7, eval, output; set a %X1234, set b %X2345, set c %X3456, set d %X4567, set e %X5678, set f %X6789, set g %X789a, set h %X89ab, set sel 0, eval, output; set sel 1, eval, output; set sel 2, eval, output; set sel 3, eval, output; set sel 4, eval, output; set sel 5, eval, output; set sel 6, eval, output; set sel 7, eval, output;
72f13e22226c428f24407ec365d1ae9425388575
449d555969bfd7befe906877abab098c6e63a0e8
/60/CH4/EX4.4/ex_4.sce
5d04187e4574de2651882d03d57b4c32de1b5fcf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
382
sce
ex_4.sce
//Example (pg no.136) // x1 + 2(x2) = 3 //2(x1) + 4(x2) = 6 A=[1 2;2 4] //coefficient matrix of above equations b=[3 6]' x=A\b //for corresponding homogenous system // x1 + 2(x2) = 0 //2(x1) + 4(x2) = 0 A=[1 2;2 4] //coefficient matrix of above equations b=[0 0]' x=A\b
a9038ba939fa5cbde18c09bb4920628be11e1eb2
449d555969bfd7befe906877abab098c6e63a0e8
/2048/DEPENDENCIES/armac1.sci
75b8ee7c3aeebe92805524bffa6afd6ba79071cb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
441
sci
armac1.sci
// Scilab description of an ARMAX process // Form: // A(q) y(t) = [B(q)/F(q)] u(t-nk) + [C(q)/D(q)] e(t) // [A(q)*F(q)*D(q)] y(t) = [B(q)*D(q)] u(t-nk) + [C(q)*F(q)]e(t) // A1(q) = [A(q)*F(q)*D(q)] // B1(q) = [B(q)*D(q)] // D1(q) = [C(q)*F(q)] function process_ar = armac1(a,b,c,d,f,sig) ny = 1; nu =1; a1 = convol(convol(a,f),d); b1 = convol(b,d); d1 = convol(c,f); process_ar = armac(a1,b1,d1,ny,nu,sig); endfunction;
df67cec89171eba07a64d02382fafea28e621cf0
449d555969bfd7befe906877abab098c6e63a0e8
/2384/CH8/EX8.9/ex8_9.sce
1626aa6cc878bf851675459773cedc5a0d6eae91
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
590
sce
ex8_9.sce
// Exa 8.9 clc; clear; close; format('v',7) // Given data N = 500; R = 4;// in ohm d_mean = 0.25;// in m a = 700;// in mm^2 a = a * 10^-6;// in m V = 6;// in V miu_r = 550; miu_o = 4*%pi*10^-7; l_i = %pi*d_mean;// in m S = l_i/(miu_o*miu_r*a);// in AT/Wb I = V/R;// in A // Calculation of mmf mmf = N*I;// in AT // total flux phi = mmf/S;// in Wb phi = phi * 10^6;// in µWb disp(phi,"The total flux in the ring in µWb is"); // Note: In the book the value of flux calculated correct in µWb but at last they print only in Wb, so the answer in the book is wrong.
b1194d099826482faa4dc3f765ebd1a5fffbf54f
449d555969bfd7befe906877abab098c6e63a0e8
/172/CH14/EX14.6/ex6.sce
ec041b50a82c89c8738668157035e3fe43b1b8a1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
962
sce
ex6.sce
//ques6 //isothermal steady state processes clear clc //from table A.2 P1=8;//pressure at state 1 in MPa P2=0.5;//pressure at state 2 in MPa T1=150;//Temperature at state 1 in K Pr1=P1/3.39;//Reduced pressure at state 1 Pr2=P2/3.39;//Reduced pressure at state 2 Tr1=T1/126.2;//Reduced temperature T2=125;//temperature at state 2 //from compressibility chart h1*-h1=2.1*R*Tc //from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a) //h2*-h2=0.5*R*Tc //this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.15*R*Tc R=0.2968;//gas constant for given substance Tc=126.2;//K, Constant temperature Cp=1.0416;//heat enthalpy at constant pressure in kJ/kg dh=(2.35)*R*Tc+Cp*(T2-T1);// printf('Enthalpy change = %.2f kJ/kg \n',dh); //change in entropy //ds= -(s2*-s2)+(s2*-s1*)+(s1*-s1) //s1*-s1=1.6*R //s2*-s2=0.1*R //s2*-s1*=Cp*log(T2/T1)-R*log(P2/P1) //so ds=1.6*R-0.1*R+Cp*log(T2/T1)-R*log(P2/P1); printf(' Entropy Change = %.4f kJ/kg.K ',ds);
65faa88bca5866bbaa2472f88d414ec3f41eb118
449d555969bfd7befe906877abab098c6e63a0e8
/2144/CH2/EX2.2/exa_2_2.sce
089ad76fa901f079a8e39f5b96a7960860b7d6b0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
361
sce
exa_2_2.sce
// Example 2.2 clc; clear; close; // Given data guagePressure= 1500;// in kN/m^2 atmPressure= 100;// in kN/m^2 P1= guagePressure+atmPressure;// in kN/m^2 V1= 0.1;// in m^3 V2= 0.4;// in m^3 // Formula P1*V1 = P2*V2 P2= P1*V1/V2;// in kN/m^2 NewGuagePressure= P2-atmPressure;// in kN/m^2 disp(NewGuagePressure,"New guage pressure in kN/m^2 is : ")
a454ad364136853ec2584dc22bd04c0bba5d8028
449d555969bfd7befe906877abab098c6e63a0e8
/671/CH7/EX7.14/7_14.sce
7f4d6cb49a8a70e0583cd20dd5121d4470d84749
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
7_14.sce
uo=(4*%pi)*1E-7 ur=1600 lc=160/100 lg=0.8/1000 A=5/10000 N=1200 Rc=lc/(uo*ur*A) Rg=lg/(uo*A) R=Rc+Rg L=N*N/R disp(L)
b26a8bed92d37108247b9f37511ef4288d87a305
449d555969bfd7befe906877abab098c6e63a0e8
/764/CH10/EX10.9.a/data10_9.sci
68bd80f734b42956d3114ee81d8b783f75115205
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
653
sci
data10_9.sci
//(Springs) Example 10.9 //Diameter of the safety valve dia (mm) dia = 50 //Blow off pressure of the valve Pb (MPa) Pb = 1.5 //Initial compression of the spring delta1 (mm) delta1 = 25 //Maximum lift of the valve l (mm) l = 10 //Spring index C C = 6 //Ultimate tensile strength of the spring Sut (N/mm2) Sut = 1500 //For plain ends, endtype = 1 //For plain ends(ground), endtype = 2 //For square ends, endtype = 3 //For square ends(ground), endtype = 4 endtype = 4 //Modulus of rigidity of the spring G (N/mm2) G = 81370 //The permissible shear stress for the spring wire is r% of the Sut r = 30 //Gap between adjacent turns of the spring g (mm) g = 2
73c2adcbb16fef76eb5497c55bebfcaac08f955b
725517259e3eea555ad0f79d421792c632bc4655
/workspace/MissionC1.sce
81ef7b0ba8121afdcb5b5f2259c48c28c715c377
[]
no_license
Exia-epickiwi/exolife
58b8a72aa397c5d3df8dc6f61730b3b2b217740e
b1bdb3ec2adb92c0fc8c546c9bd56a654523bd22
refs/heads/master
2020-05-25T14:05:45.795829
2017-03-20T09:26:15
2017-03-20T09:26:15
84,937,674
0
0
null
null
null
null
UTF-8
Scilab
false
false
417
sce
MissionC1.sce
//Load scripts from folder funcprot(0) getd("../scripts"); //Global variables imgPos = "../images/"; //The position of the source images renderPos = "render/"; //The folder where the render images will be saved //Load image imgin = readpbm(imgPos+"Contours.pbm"); imgout = normalisation(contours(imgin)) //Show the coordinates of the brightest color of the image loaded writepbm(imgout,renderPos+"MissionC1.pbm")
08396cc64ac407741f1c795adfe4085a74e0a131
449d555969bfd7befe906877abab098c6e63a0e8
/1106/CH4/EX4.13/ex4_13.sce
5810a057c46d31e6d79a415df95acba579e5a760
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
118
sce
ex4_13.sce
// Example 4.13, Page No-226 clear clc // TF is H(S)= 4/(s^2 + 3.3*s + 0.9) // This is a theorotical problem
6f6f58944ae1b8416d360aa018313bbdf6773b98
39c5c468df5e2bde0147a30cf092fc8da3e7ed3e
/UFRGS/calcNumerico/area2/P2_numerico_oberdan/M9 - Riemann-Simpson-Trapezio-erros/riemmann.sci
aeea2fd58d6a2eef491e6536bca701723308b6b6
[]
no_license
andredxc/Files
9dffc9fe5f7e923b83035d794dfa15c930cdb898
e32309b9ab548b829b04be66c2776cf9c9c6656e
refs/heads/master
2021-06-03T10:44:01.606242
2020-09-21T15:39:48
2020-09-21T15:39:48
107,410,076
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,111
sci
riemmann.sci
clear /** Somas de riemmann a esquerda * a: limite esquerdo * b: limite direito * n: numero de iteracoes * * S: area apos integrar a funcao */ function S=riemmann(a,b,n) h=(b-a)/n; x=linspace(a,b,n+1); S=0; for i=1:n A=f(x(i))*h; S=S+A; end endfunction // Devolve a integral definida da funcao para comparacao com metodos iterativos function v=integral(limiteEsquerda, limiteDireita, funcao) v = intg(limiteEsquerda, limiteDireita, funcao); endfunction // valor da integral fica em riemmann(inicio, fim, numero_intervalos) // valor da funcao fica em f(valor_x) //q1 Funcao a ser integrada e' dada por y function y=f(x) y=cos(2*x); endfunction disp("Questão 1"); disp(riemmann(2,3,40)); disp("---------"); //q5 Funcao a ser integrada e' dada por y function y=f(x) y=cos(4*x+11); endfunction disp("Questão 5"); disp(riemmann(0,1,10000000)) //tentativa e erro. disp("---------"); //q8 Funcao a ser integrada e' dada por y function y=f(x) y=cos(4*x+11); endfunction disp("Questão 8"); disp(riemmann(2,3,3799)) //tentativa e erro. disp("---------");
17cf9809f91d267f27c0d31e6154bb3ba97a7e52
449d555969bfd7befe906877abab098c6e63a0e8
/1226/CH17/EX17.42/EX17_42.sce
5e16eb4c561eb6ed57f75f50a3fe345e5b14d05b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,061
sce
EX17_42.sce
clc;funcprot(0);//EXAMPLE 17.42 // Initialisation of Variables Cpw=4.18;..............//Specific heat of water in kJ/kgK n=1;................//No of cylinders N=350;.......//Engine rpm pmi=2.8;..........//Mean effective pressure in bar bl=590;..........//Brake load in N mf=4.3;............//Fuel consumption in kg mw=500;..............//Mass of cooling water tw1=25;...............//Water inlet temperature in C tw2=50;................//Water outlet temperature in C ma=33;..................//Mass of air used per kg of fuel in kg tr=25;.................//Room temperature in C tg=400;.................//Exhaust temperature in C D=0.22;.................//Engine bore in m L=0.28;.................//Engine stroke in m Db=1;......................//Brake drum diameter in m C=43900;...................//Calorirfic value of fuel in kJ/kg Cps=2.09;..................//Specific heat of steamm in exhaust in kJ/kgK Cpg=1.0;...................//Specific heat of dry exhaust gases in kJ/kgK k=1;....................//Two stroke engiine perh=15;...................//Percentage of hydrogen //Calculations IP=(n*pmi*N*D*D*L*k*10*(%pi/4))/6;...................//Indicated power in kW disp(IP,"Indicated power in kW:") BP=(bl*%pi*Db*N)/(60*1000);......................//Brake power in kW disp(BP,"Brake power in kW:") //Heat supplied hf=(mf/60)*C;................//heat supplied by fuel hip=IP*60;...........//Heat equivalent of BP in kJ/min hcw=(mw/60)*Cpw*(tw2-tw1);..........//Heat carried away by cooling water mg=(mf+(mf*ma))/60;....................//Mass of exhaust gases in kg/min mst=9*(perh/100)*(mf/60);..................//Mass of steam formed mdg=mg-mst;..............................//Mass of dry exhaust gases per min hg=(mdg)*Cpg*(tg-tr);..........//Heat carried by exhaust gasses hst=mst*(417.5+2257.9+(Cps*(400-99.6)));....................//Heat carried by exhaust steam, the obtained values are from steam tables at NTP mg=mf+(ma*mf);....................//Mass of exhaust gases in kg/min ha=round(hf)-round(hip+hg+hst+hcw);............//Unaccounted heat pf=100;pip=(hip/hf)*100;pcw=(hcw/hf)*100;pg=(hg/hf)*100;pa=(ha/hf)*100;pst=(hst/hf)*100; printf("\n\n") printf("HEAT BALANCE TABLE\n") printf("_______________________________________________________________________\n") printf("Item kJ Percent\n") printf("_______________________________________________________________________\n") printf("Heat supplied by fuel %d %f\n",hf,pf) printf("Heat absorbed in IP %d %f\n",hip,pip) printf("Heat taken away by cooling water %d %f\n",hcw,pcw) printf("Heat carried away by dry exhaust gases %d %f\n",hg,pg) printf("Heat carried away by steam in exhaust gases %d %f\n",hst,pst) printf("Unaccounted heat %d %f\n",ha,pa) printf("_____________________________________________________________________")
bff462fcff727636757bb3cb0f2bf9aeec84b660
449d555969bfd7befe906877abab098c6e63a0e8
/2744/CH1/EX1.2/Ex1_2.sce
05689ac787964d18d8ca05bcb5fed3abe57557f0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
355
sce
Ex1_2.sce
clear all; clc; s_p = 200;//steam pressure in lb/in^2 l = 4;//length in inches b = 4;//breadth in inches p = 14000;//permissible streaa in lb/in^2 P = s_p*l*b;//Pull on each bolt in lb-wt A = P/p ;//necessary area of bolt-section d = sqrt(4*A/%pi) ;//minimum diameter in inches printf('The minimum diameter d of each stay bolt = %0.2f inch',d);
50fc61519ab7dd737c3e277624ff00f48270b6c3
449d555969bfd7befe906877abab098c6e63a0e8
/2084/CH3/EX3.17w/3_17w.sce
3e77faa4e5776b030bba75a493305638e623abbd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
901
sce
3_17w.sce
//developed in windows XP operating system 32bit //platform Scilab 5.4.1 clc;clear; //example 3.17w //calculation of time taken and position of the arrival on opposite bank //given data dyaxis=.5//displacement(in km) along Y axis vrg=2//velocity(in km/h) of the river with respect to ground vmr=3////velocity(in km/h) of the man with respect to river theta1=30//angle(in degree) of vmr with Y axis theta2=90//angle(in degree) of vrg with Y axis //calculation vyaxis=(vmr*cosd(theta1))+(vrg*cosd(theta2));//velocity along Y axis i.e taking y component in equation vmg=vmr+vrg t=dyaxis/vyaxis; vxaxis=(-vmr*sind(theta1))+(vrg*sind(theta2));//velocity along X axis i.e taking x component in equation vmg=vmr+vrg dxaxis=vxaxis*t; printf('time taken by the swimmer to cross the river is %3.2f hour',t); printf('\ndisplacement of the swimmer along X axis is %3.4f km',dxaxis);
aa97606ec5100b1d417a88deb61a27b66883b47a
dbd504f73f233675d0c8c2c8c5730e866aabcd96
/codes/wireless sim.sce
4a10f560a01def3428f7d1b87e94dd7aa3659f04
[]
no_license
surajdurgesht/Wireless-Communication-Lab
f5019be42d24fe6568e98d666efd901283a0c7a7
e8fac339daf91d24ee0dd9e22e9236fcbb68dac3
refs/heads/master
2020-06-04T19:07:54.824459
2019-06-16T06:30:21
2019-06-16T06:30:21
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
187
sce
wireless sim.sce
h=100; t=10; P=0:10:100; N_o=grand(1,10000,"exp",2); S=10^(P/10); for i=1:1:length(S) K=(S(i)*h^2/N_o); X(i)=sum(K<t)/10000; end plot2d("ln",X,S,style=2); plot(X,S);
dad38d76e0c2029c3330d2a8f75e65baad3bf41e
449d555969bfd7befe906877abab098c6e63a0e8
/34/CH8/EX8.1/Ch8Exa1.sci
10decdd7060782985927b5a5e41a08d2370cd8ee
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
812
sci
Ch8Exa1.sci
//Part (a) r= 0.113; //bond length, nm Mc= 1.99*(10^(-26)); //mass of C12, kg Mo= 2.66*(10^(-26)); //mass of O16, kg Mco= (Mc*Mo)/(Mc+Mo); //mass of CO, kg I= Mco*((r*(10^(-9)))^2); //moment of inertia, kg.m^2 J=1; //lowest rotational state h= 6.63*(10^(-34)); //Planck's constant, J.s hbar= h/(2*(%pi)); //reduced Planck's constant, J.s E1= (J*(J+1)*(hbar^2))/(2*I); //energy corresponding to state J=1, J e= 1.6*(10^(-19)); //charge of an electron, C E1= E1/e; //converting to eV disp(E1,"The energy of CO molecule, in eV, is: ") //Result // The energy of CO molecule, in eV, is: // 0.0004787 //Part(b) w= sqrt((2*E1*e)/(I)); //angular velocity, rad/s disp(w,"The angular velocity, in rad.sec, is: ") //Result // The angular velocity, in rad.sec, is: // 1.027D+12
046f3fdb260ae74287937057cdce1c0434af2449
449d555969bfd7befe906877abab098c6e63a0e8
/3875/CH5/EX5.1/Ex5_1.sce
053fc67dbdc72c46f4d5e9a8a9ec68abaf9414ae
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
237
sce
Ex5_1.sce
clc; clear; k=2 lambda=5*10^-5 //wavlength in cm theta=30 //angle in degrees //calculations e=(k*lambda)/sind(theta) //in cm mprintf("No. of lines per centimeter = %.0e",(1/e)) //The answer provided in the textbook is wrong
c09b2df4efb41890171956d23e9a2b38b6b21b40
79b6b573a5fd59b14ecaa36d2b39e3872e98d0c3
/src/Assets/Donnees_scene.sce
b5dc33ba062e63bf251558692ee271339ab3ad68
[]
no_license
ColinEspinas/Processing-3D-Viewer
ff27605c0aaf79e27cd002c82c7462192ba38c94
9515f1362aba55e696b63e385f5ac009cc2ec557
refs/heads/master
2020-08-21T16:42:37.488970
2019-12-16T23:01:47
2019-12-16T23:01:47
216,201,337
2
0
null
null
null
null
UTF-8
Scilab
false
false
231
sce
Donnees_scene.sce
a 0.8 #intensite ambiante dans scene d 250 #distance camera image #sources lumineuses #l 400 400 100 0.5 #l -100 -150 -200 0.7 #l 150 -100 500 1.2 l 250 -300 -150 0.7 #l 150 -100 -300 1.2 #l -150 200 -300 0.7 l -150 200 500 1.2
f2327408806b63ebb5cd9916f6e4851ff91f92a8
449d555969bfd7befe906877abab098c6e63a0e8
/1151/CH1/EX1.49/example49.sce
8f31d31492e9f653273d28aee72b1763ab6203b6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
426
sce
example49.sce
//to find transfer function using mason gain formula printf("syms R1 R2 C1 C2 \n //gains of forward path\n P1=1/(R1*R2*C1*C2*s^2);//forward path1 gain\n //gain of individual loops\n L1=-1/(R1*C1*s);\n L2=-1/(R2*C1*s);\n L3=-1/(R2*C2*s);\n //gain of two non touching loops\n g1=1/(s^2*R1*R2*C1*C2);\n //since all the loops touches the forward path1 so\n d1=1\n d=1-(L1+L2+L3)+g1;\n G=(P1*d1)/d;\n transfer function C/R=G")
036a1949ca6a111caddef58db9dfbd8160220cf9
449d555969bfd7befe906877abab098c6e63a0e8
/2409/CH12/EX12.7/Ex12_7.sce
8537f2f4ca5dfa44e95ba64e7d8fb9cc411b3f74
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
495
sce
Ex12_7.sce
//Variable Declaration Tant=35 //Antenna noise temperature(kelvin) Te1=150 //Receiver noise temperature(kelvin) L=5 //Cable Loss (dB) T0=290 G1=10**5 //LNA Gain F=12 //Receiver Noise figure(dB) //Calculation L=10**(L/10) //Converting L into ratio F=10**(F/10) //Converting F into ratio Ts=Tant+Te1+(L-1)*T0/G1+L*(F-1)*T0/G1 //Noise Temperature referred to the input(Kelvin) //Result printf("The noise temperature referred to the input is %.0f Kelvini",Ts)
1cdce0af019b82a57f28560d16c19583e9526ca1
449d555969bfd7befe906877abab098c6e63a0e8
/824/CH10/EX13.8/13_8.sci
4ac55841a73cbf2a4d3e4fc7e0f553ee84e004eb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
40
sci
13_8.sci
//Moved to it's proper location in Ch 13
ba6f3737bac8c8c577a703e77fa5c9a925af2553
449d555969bfd7befe906877abab098c6e63a0e8
/710/CH2/EX2.9/2_9.sci
b2b0047e6726538d8febc9ad37df05d764977cda
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
511
sci
2_9.sci
clc(); clear; //To determine the density of free electrons rho=9000; //density in kg/m^3 w=65; //atomic weight v=1; //volume in m^3 n=(rho*v)/(w/(6.022*10^26)); //number of atoms a=1.4; //average number of free electrons per atom rhoe=n*a //density of free electrons per atom in electrons/m^3 printf("The density of free electrons is %e electrons/m^3",rhoe);
b26156d965ea78c72f72fd7e6a84fb1d1e03e7b3
449d555969bfd7befe906877abab098c6e63a0e8
/1535/CH11/EX11.3/Ch11Ex3.sci
5618fdadbf38a2d0471712eabbcf939984dcfc1d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
477
sci
Ch11Ex3.sci
// Scilab Code Ex11.3: Page-250 (2010) h = 6.626e-034; // Planck's constant, Js k = 1.38e-023; // Boltzmann constant, J/K // Stimulated Emission = Spontaneous Emission <=> exp(h*f/(k*T))-1 = 1 i.e. // f/T = log(2)*k/h = A A = log(2)*k/h; // Frequency per unit temperature, Hz/K printf("\nThe stimulated emission equals spontaneous emission iff f/T = %4.2e Hz/K", A); // Result // The stimulated emission equals spontaneous emission iff f/T = 1.44e+010 Hz/K
b9810c9c7256d6398124aaa435adec2954a8ede2
449d555969bfd7befe906877abab098c6e63a0e8
/611/CH14/EX14.1/Chap14_Ex1_R1.sce
d2e04e283a9b53197c61629ad6fd9a46bd428a13
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,341
sce
Chap14_Ex1_R1.sce
// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India. //Chapter-14,Example 1,Page 489 //Title: Standard Gibbs free energy change and equilibrium constant //================================================================================================================ clear clc //INPUT //The water gas shift reaction is given by : CO2(g)+H2(g)--->CO(g)+H2O(g) T=298.15;//temperature in K del_Gf=[-137.327;-228.600;-394.815;0];//the standard Gibbs free energy of formation of CO(g),H2O(g),CO2(g) and H2(g) in kJ n=[1;1;-1;-1];//stoichiometric coefficients of CO(g),H2O(g),CO2(g) and H2(g) respectively (no unit) R=8.314;//universal gas constant in J/molK //CALCULATION //calculation of the standard Gibbs free energy of reaction at 298.15K using Eq.(14.1) in kJ del_G=(n(1,:)*del_Gf(1,:))+(n(2,:)*del_Gf(2,:))+(n(3,:)*del_Gf(3,:))+(n(4,:)*del_Gf(4,:)); Ka=exp((-(del_G*10^3))/(R*T));//calculation of the equilibrium constant using Eq.(14.9) (no unit) //OUTPUT mprintf('The standard Gibbs free energy of the water gas shift reaction at 298.15K=%0.3f kJ \n',del_G); mprintf('The equilibrium constant of the water gas shift reaction at 298.15K=%0.3e \n',Ka); //===============================================END OF PROGRAM===================================================
781ee2d89b63a0477d9bdc63a12465bf4da138d2
70edbf624e390623eeb8c508529d6a1a1f984193
/ex2/Tarefa2.sci
963b16217e663681bb3b2bfc2414015ff6347b22
[]
no_license
phpavelski/Lab_Medicoes_Controle
a78407efd0c55df05de6d15e7491e7f15af42d96
95995962d826363bf434268e4c5c5971c69f38eb
refs/heads/master
2022-12-11T16:48:11.769962
2020-09-07T00:20:06
2020-09-07T00:20:06
293,382,235
0
0
null
2020-09-07T00:02:53
2020-09-07T00:02:52
null
UTF-8
Scilab
false
false
457
sci
Tarefa2.sci
//PME3402 - Laboratório de Medição e Controle Discreto / Atividade Aula 2 //Tarefa 2 //Grupo 4 - Integrantes: //Caique de Oliveira Kobayashi - 9793461 //Heitor Fontana de Godoy - 10335677 //Lucas Hattori Costa - 10335847 //Lucas Pinheiro Paiva Cavalcante - 10274270 //Pedro Henrique Pavelski - 10335621 clc clear xdel( winsid() ) pi = %pi M = csvRead('C:\Users\Usuario\Documents\GitHub\Lab_Medicoes_2\ex2\Sons\Caique_o_fechado.wav') scf(0) disp(M)
7979d1ab5151fdceb11e139acc77a141423d8677
1b969fbb81566edd3ef2887c98b61d98b380afd4
/Rez/bivariate-lcmsr-post_mi/bfi_e_vrt_col_d/~BivLCM-SR-bfi_e_vrt_col_d-PLin-VLin.tst
b556203743daac7b4ff032b74d9c728f650beadd
[]
no_license
psdlab/life-in-time-values-and-personality
35fbf5bbe4edd54b429a934caf289fbb0edfefee
7f6f8e9a6c24f29faa02ee9baffbe8ae556e227e
refs/heads/master
2020-03-24T22:08:27.964205
2019-03-04T17:03:26
2019-03-04T17:03:26
143,070,821
1
0
null
null
null
null
UTF-8
Scilab
false
false
11,974
tst
~BivLCM-SR-bfi_e_vrt_col_d-PLin-VLin.tst
THE OPTIMIZATION ALGORITHM HAS CHANGED TO THE EM ALGORITHM. ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 1 2 3 4 5 ________ ________ ________ ________ ________ 1 0.529298D+00 2 -0.768207D-02 0.415135D-02 3 0.366046D-01 -0.304514D-02 0.392577D+00 4 -0.312172D-02 0.435699D-05 -0.210729D-02 0.325538D-02 5 0.144862D-02 0.149009D-03 -0.154729D-03 0.364884D-04 0.405951D-02 6 0.876992D-03 0.362265D-04 0.604377D-03 0.106137D-04 0.123335D-03 7 -0.243409D-04 0.125888D-03 0.198624D-02 0.989486D-05 0.453959D-03 8 -0.114703D-03 0.317640D-04 -0.120898D-02 0.995436D-04 0.265720D-03 9 -0.137879D+00 0.262662D-01 -0.431811D-01 -0.483974D-02 0.859430D-01 10 0.137409D+00 0.128867D-01 0.241869D-03 0.211800D-01 0.182522D+00 11 -0.195606D+00 0.321229D-01 -0.215995D+00 -0.145780D-01 -0.240237D-01 12 -0.667330D-02 -0.172287D-02 -0.120255D+01 0.541088D-01 -0.332322D-01 13 0.848360D-01 0.164504D-01 0.105074D+00 0.128407D-02 0.629735D-02 14 -0.645725D-02 0.104647D-02 -0.477924D+00 0.180438D-01 0.514726D-02 15 -0.744670D+00 -0.328461D-01 -0.189230D+01 0.128862D-01 -0.110705D+00 16 -0.409549D-01 -0.406011D-02 -0.279968D-01 -0.173911D-02 -0.253842D-02 17 -0.188004D-02 -0.102072D-02 0.850797D-02 -0.209734D-03 -0.101924D-02 18 -0.169078D+01 -0.130581D-01 0.447863D+00 -0.402089D-01 -0.214831D-01 19 -0.240336D+00 0.161514D-01 0.137087D+00 -0.292112D-02 -0.182245D-01 20 0.354640D+00 -0.257067D-01 -0.329882D+01 -0.570872D-01 0.336717D-01 21 0.196643D+00 -0.163247D-01 -0.723778D-01 0.160550D-02 0.154292D-01 22 0.600020D-02 -0.449255D-03 -0.151300D-02 0.101787D-02 0.132760D-03 23 0.466003D-01 0.345854D-03 -0.459398D-01 -0.121649D-01 -0.163454D-02 24 -0.235782D-02 0.103798D-02 0.597148D-02 -0.636993D-03 -0.228462D-03 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 6 7 8 9 10 ________ ________ ________ ________ ________ 6 0.878539D-03 7 0.106435D-02 0.378663D-02 8 -0.946239D-04 0.703794D-04 0.177566D-02 9 0.401522D-02 0.538152D-01 -0.521214D-03 0.568848D+02 10 -0.178257D-01 -0.134501D-01 0.394212D-02 0.245282D+01 0.257555D+02 11 -0.196162D-01 -0.664520D-02 0.166789D-01 0.351721D+01 -0.152265D+01 12 -0.262180D-01 0.212416D-01 0.143340D-01 0.606020D+01 0.152563D+01 13 0.639567D-01 0.149385D+00 -0.181401D-01 0.210371D+01 0.433088D+00 14 -0.143700D-01 -0.125584D-01 0.156291D+00 0.182679D+01 0.178938D+01 15 0.238549D-01 -0.387319D-01 -0.297734D-01 -0.198786D+02 -0.128590D+02 16 -0.781850D-03 -0.130439D-02 -0.745018D-03 0.164408D+01 -0.513956D+00 17 -0.197787D-03 -0.146072D-03 0.867791D-05 -0.190118D+00 -0.563960D-01 18 -0.298828D-01 -0.500451D-01 -0.141807D-02 -0.116309D+02 0.324863D+01 19 -0.125656D-01 0.379577D-02 0.134380D-01 -0.623094D+00 -0.187492D+01 20 0.526258D-01 0.394471D-01 -0.969277D-01 -0.362490D+00 0.434816D+00 21 0.954471D-02 -0.867733D-02 -0.139738D-01 0.102457D+01 0.169645D+01 22 -0.212235D-03 -0.584706D-03 0.121048D-03 0.653528D-01 -0.299006D-01 23 -0.565197D-03 -0.177919D-02 -0.446140D-04 0.355967D-01 -0.961392D-02 24 -0.132037D-03 0.419008D-04 -0.163465D-03 0.695239D-02 -0.416682D-01 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 11 12 13 14 15 ________ ________ ________ ________ ________ 11 0.425246D+02 12 0.569392D+01 0.123726D+03 13 -0.394670D+01 0.358369D+00 0.177481D+02 14 0.317067D+01 -0.111325D+01 -0.259392D+01 0.579877D+02 15 0.871122D+00 0.299160D+01 -0.355475D+00 0.426727D+00 0.633308D+03 16 0.446141D+00 0.728614D+00 -0.102112D+00 -0.231325D+00 0.172694D+01 17 -0.718168D-02 -0.271584D-01 -0.332380D-01 0.186206D-01 -0.276451D+01 18 -0.290868D+01 0.474002D+01 -0.432719D+01 -0.280990D+01 0.798564D+02 19 0.129923D+01 -0.210278D+01 -0.115290D+01 0.236712D+01 0.918438D+00 20 -0.230678D+01 -0.170487D+02 0.754425D+01 -0.173048D+02 0.117985D+03 21 -0.187421D+00 0.163709D+01 0.555569D+00 -0.240594D+01 -0.414738D+01 22 -0.839646D-01 -0.215208D-01 -0.145245D-01 0.341256D-01 -0.535394D+00 23 0.151959D+00 -0.386695D+00 -0.839136D-01 0.294295D+00 0.328419D+00 24 0.198220D-01 -0.128000D+00 -0.203569D-01 -0.911847D-01 -0.522204D+00 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 16 17 18 19 20 ________ ________ ________ ________ ________ 16 0.884003D+00 17 -0.600594D-01 0.291749D-01 18 -0.189335D+01 -0.462346D+00 0.410651D+03 19 -0.212423D-01 -0.389906D-02 0.590636D+01 0.617924D+01 20 0.306373D+00 -0.628166D+00 0.845062D+01 -0.752994D+00 0.489071D+03 21 0.304368D-01 0.123754D-01 -0.162248D+01 -0.572961D+01 -0.747387D+00 22 0.520968D-02 0.440568D-02 -0.187204D+01 -0.314697D-01 -0.463814D-01 23 0.141889D-01 0.934757D-02 -0.139352D+01 -0.341476D-01 0.429335D+01 24 0.108942D-01 0.376551D-02 0.347632D-02 0.104333D-01 -0.236905D+01 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 21 22 23 24 ________ ________ ________ ________ 21 0.730074D+01 22 -0.138957D-01 0.182919D-01 23 0.115832D+00 -0.812041D-02 0.630271D+00 24 -0.351714D-01 -0.217152D-03 -0.326087D-01 0.249239D-01 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 1 2 3 4 5 ________ ________ ________ ________ ________ 1 1.000 2 -0.164 1.000 3 0.080 -0.075 1.000 4 -0.075 0.001 -0.059 1.000 5 0.031 0.036 -0.004 0.010 1.000 6 0.041 0.019 0.033 0.006 0.065 7 -0.001 0.032 0.052 0.003 0.116 8 -0.004 0.012 -0.046 0.041 0.099 9 -0.025 0.054 -0.009 -0.011 0.179 10 0.037 0.039 0.000 0.073 0.564 11 -0.041 0.076 -0.053 -0.039 -0.058 12 -0.001 -0.002 -0.173 0.085 -0.047 13 0.028 0.061 0.040 0.005 0.023 14 -0.001 0.002 -0.100 0.042 0.011 15 -0.041 -0.020 -0.120 0.009 -0.069 16 -0.060 -0.067 -0.048 -0.032 -0.042 17 -0.015 -0.093 0.079 -0.022 -0.094 18 -0.115 -0.010 0.035 -0.035 -0.017 19 -0.133 0.101 0.088 -0.021 -0.115 20 0.022 -0.018 -0.238 -0.045 0.024 21 0.100 -0.094 -0.043 0.010 0.090 22 0.061 -0.052 -0.018 0.132 0.015 23 0.081 0.007 -0.092 -0.269 -0.032 24 -0.021 0.102 0.060 -0.071 -0.023 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 6 7 8 9 10 ________ ________ ________ ________ ________ 6 1.000 7 0.584 1.000 8 -0.076 0.027 1.000 9 0.018 0.116 -0.002 1.000 10 -0.119 -0.043 0.018 0.064 1.000 11 -0.101 -0.017 0.061 0.072 -0.046 12 -0.080 0.031 0.031 0.072 0.027 13 0.512 0.576 -0.102 0.066 0.020 14 -0.064 -0.027 0.487 0.032 0.046 15 0.032 -0.025 -0.028 -0.105 -0.101 16 -0.028 -0.023 -0.019 0.232 -0.108 17 -0.039 -0.014 0.001 -0.148 -0.065 18 -0.050 -0.040 -0.002 -0.076 0.032 19 -0.171 0.025 0.128 -0.033 -0.149 20 0.080 0.029 -0.104 -0.002 0.004 21 0.119 -0.052 -0.123 0.050 0.124 22 -0.053 -0.070 0.021 0.064 -0.044 23 -0.024 -0.036 -0.001 0.006 -0.002 24 -0.028 0.004 -0.025 0.006 -0.052 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 11 12 13 14 15 ________ ________ ________ ________ ________ 11 1.000 12 0.078 1.000 13 -0.144 0.008 1.000 14 0.064 -0.013 -0.081 1.000 15 0.005 0.011 -0.003 0.002 1.000 16 0.073 0.070 -0.026 -0.032 0.073 17 -0.006 -0.014 -0.046 0.014 -0.643 18 -0.022 0.021 -0.051 -0.018 0.157 19 0.080 -0.076 -0.110 0.125 0.015 20 -0.016 -0.069 0.081 -0.103 0.212 21 -0.011 0.054 0.049 -0.117 -0.061 22 -0.095 -0.014 -0.025 0.033 -0.157 23 0.029 -0.044 -0.025 0.049 0.016 24 0.019 -0.073 -0.031 -0.076 -0.131 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 16 17 18 19 20 ________ ________ ________ ________ ________ 16 1.000 17 -0.374 1.000 18 -0.099 -0.134 1.000 19 -0.009 -0.009 0.117 1.000 20 0.015 -0.166 0.019 -0.014 1.000 21 0.012 0.027 -0.030 -0.853 -0.013 22 0.041 0.191 -0.683 -0.094 -0.016 23 0.019 0.069 -0.087 -0.017 0.245 24 0.073 0.140 0.001 0.027 -0.679 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 21 22 23 24 ________ ________ ________ ________ 21 1.000 22 -0.038 1.000 23 0.054 -0.076 1.000 24 -0.082 -0.010 -0.260 1.000
6eab3b5b2745b11cb493400a5b07333a22c08643
449d555969bfd7befe906877abab098c6e63a0e8
/995/CH6/EX6.2/Ex6_2.sce
655914baacfb349d33ffbbd63d31f1e0164b69cf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
121
sce
Ex6_2.sce
//Ex:6.2 clc; clear; close; X_c=3.18; R=100; V_rip=1*(X_c/sqrt(R^2+X_c^2)); printf("Ripple voltage = %f V",V_rip);
b60d5c748e7462c8dba1c30912446cae6f585444
449d555969bfd7befe906877abab098c6e63a0e8
/2267/CH6/EX6.3/ex6_3.sce
1b14d0f5e79522eb518ef03ecc49fb38b46a4c52
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
221
sce
ex6_3.sce
//Part A Chapter 6 Example 3 clc; clear; close; R=8.314/32;//kJ/kgK p1=125;//kPa p2=375;//kPa T1=27+273;//K T2=T1;//K delta_S=-R*log(p2/p1);//kJ/K;//kJ/kgK disp("Change in entropy = "+string(delta_S)+" kJ/K");
b33b674af8bf5b13be32e49b5674c9157c30b6cc
f42e0a9f61003756d40b8c09ebfe5dd926081407
/TP4/newton.sci
84b2fc6fa4955ffd0525ca94d9429f1acc121ccd
[]
no_license
BenFradet/MT09
04fe085afaef9f8c8d419a3824c633adae0c007a
d37451249f2df09932777e2fd64d43462e3d6931
refs/heads/master
2020-04-14T02:47:55.441807
2014-12-22T17:34:50
2014-12-22T17:34:50
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
481
sci
newton.sci
function[x, k] = newton(foncjac, tol, Kmax, x0) if Kmax - floor(Kmax) ~= 0 | Kmax < 0 error('Kmax must be an int'); end if tol < 0 | abs(tol) < %eps error('wrong tol'); end for k = 1:Kmax [f, J] = foncjac(x0); correction = J\-f; x = x0 + correction; if (norm(x - x0) / norm(x)) < tol return x; else x0 = x; end end error('didnt converge'); endfunction
4d1cc85318397b8ed0cede6af14af863bba64686
0480f6392643f10964ff6b301b2be49036bfe7d9
/fsk.sce
b7930d7cf7e901d19ac5cf051cf5523d61ecd2ec
[]
no_license
vbv15/helloworld
02f13332442310e95126067564516a8500b072c3
7982e10b0195afc1adb582ec623d95bd8f9556cb
refs/heads/master
2021-06-28T01:18:01.725621
2016-11-11T02:49:46
2016-11-11T02:49:46
42,517,937
0
0
null
null
null
null
UTF-8
Scilab
false
false
210
sce
fsk.sce
t=(0:0.01:5*%pi)'; tc=(2*%pi)/10; fc=1/tc; k=(squarewave(t)+1)*(1/2); y=k.*cos(2*%pi*fc*t); k1=((-1)*squarewave(t)+1)*(1/2); ta=(2*%pi)/2; fa=1/ta; y1=k1.*cos(2*%pi*fa*t); p=y+y1; plot(t,p);
ad556d751ae09cdb2b0a42c7c4e698ad1f9c569d
449d555969bfd7befe906877abab098c6e63a0e8
/3840/CH9/EX9.4/Ex9_4.sce
c7adbb5756c0c0218dca37934c1d967178f2342d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
318
sce
Ex9_4.sce
clear // // // //Variable declaration Hc=200*10**3 //critical magnetic field(A/m) Tc=12 //critical temperature(K) H0=250*10**3 //critical magnetic field(A/m) //Calculation T=Tc*sqrt(1-(Hc/H0)**2) //maximum critical temperature(K) //Result printf("\n maximum critical temperature is %0.3f K",T)
af51fa51863bbe16c9ffe5c0a6397cb816f4db99
6e257f133dd8984b578f3c9fd3f269eabc0750be
/ScilabFromTheoryToPractice/Computing/testisinf.sce
4843b29d4705e52697f1e61247dc45960afb7d68
[]
no_license
markusmorawitz77/Scilab
902ef1b9f356dd38ea2dbadc892fe50d32b44bd0
7c98963a7d80915f66a3231a2235010e879049aa
refs/heads/master
2021-01-19T23:53:52.068010
2017-04-22T12:39:21
2017-04-22T12:39:21
89,051,705
0
0
null
null
null
null
UTF-8
Scilab
false
false
149
sce
testisinf.sce
// comparing real numbers to infinity %inf==%inf %inf<=%inf 1<=%inf 1>-%inf // using isinf A=[0 %nan 1 %inf 2 -%inf %nan ] A==%inf isinf(A)
7449ddf58c4c0e8ff78e23db2297993bfa28bb68
449d555969bfd7befe906877abab098c6e63a0e8
/1247/CH3/EX3.4/example3_4.sce
b38954a28aa4f2bda8a82b4264c50cca4f87150e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
637
sce
example3_4.sce
clear; clc; // Stoichiometry // Chapter 3 // Material Balances Without Chemical Reaction // Example 3.4 // Page 62 printf("Example 3.4, Page 62 \n \n"); // solution m = 1 //[kg] dry neem leaves (basis) m1 = .01/100 //[kg] beta cartene content of leaves Ex = (m1*100)/.41 //[kg] extract quantity Tc1 = Ex*.155 //[kg] Alpha Tocopherol in the extract Tc2 = .46/100 //[kg] Alpha Tocopherol in the neem leaves R = (Tc1*100)/Tc2 // recovery of Alpha Tocopherol printf("(a) \n \nmass of extract phase per kg of dry leaves is "+string(Ex)+" kg \n \n \n(b) \n \npercent recovery of Alpha Tocopherol is "+string(R)+".")
0dafe7cc0cdb43f680e9a7d4e78e64b592b79b1e
f934e15695c77d0a1015c230c5ed65c4f16a2425
/band pass butterworth.sce
8ea30ee9a91b210e75ef05a19ee689b23a5c9426
[]
no_license
manasdas17/Scilab-for-Signal-Processing-
6efc5adb507243c7302f7b4f3f12d12060112038
5f6e6ce941c0a11212a83674b5d35d97a2cf4396
refs/heads/master
2021-01-10T07:49:58.006357
2016-04-07T07:45:26
2016-04-07T07:45:26
55,673,271
0
0
null
null
null
null
UTF-8
Scilab
false
false
378
sce
band pass butterworth.sce
//By Manas,FOSSEE,IITB //function which designs an iir digital filter using analog filter designs and bilinear transformation . hz=iir(3,'bp','butt',[.15 .25],[0 0]); [hzm,fr]=frmag(hz,256); plot2d(fr',hzm') xtitle('Discrete IIR filter band pass 0.15&lt;fr&lt;0.25 ',' ',' '); q=poly(0,'q'); //to express the result in terms of the delay operator q=z^-1 hzd=horner(hz,1/q)
1b39f7de511b7b05262b3ae16f542223fa924dfe
449d555969bfd7befe906877abab098c6e63a0e8
/965/CH13/EX13.11/11.sci
f6cc4549b43eb8712e8d341c7afa2d8cd3717ab6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
603
sci
11.sci
clc; clear all; disp("evaporation rate calculation") U=2.8;// m/s L=300/1000;//m rho=1.205;//kg/m^3 v=15.06*10^(-6);//m^2/s D=4.166*10^(-5);//m^2/s Re=U*L/v;// Reynolds No. Re if Re<5*10^5 disp("flow is laminar") end Sc=v/D;// Schmidt No. Sc Sh=0.664*((Re)^0.5)*(Sc)^(0.33); Sh L=320/1000;//m hm=Sh*D/L;// m/s disp("m/s",hm,"mass transfer coefficient = ") disp("mass transfer based on pressure difference ") T=15+273;//K R=287; hmp=hm/(R*T);// m/s A=0.32*0.42;//m^2 pw1=0.017*10^(5); pw2=0.0068*10^(5); mw=hmp*A*(pw1-pw2)*3600; disp("kg/h",mw,"mass diffusion of water =")
b63e6570664f9ff9cf488daa9df7410703279a3e
449d555969bfd7befe906877abab098c6e63a0e8
/1850/CH1/EX1.10/exa_1_10.sce
fa9fbca56246c49185bf826b9fa40263bba93bbf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
699
sce
exa_1_10.sce
// Exa 1.10 clc; clear; close; // Given data format('v',7) V_CC= 9;// in volt V_EE= 9;// in volt V_BE= 0.7;// in volt (Assuming value) R_C= 47;// in k ohm R_C= R_C*10^3;// in ohm R_E= 43;// in k ohm R_E= R_E*10^3;// in ohm Ri_1= 20;// in ohm Ri_2= Ri_1;// in ohm v_in1= 2.5;// in mv v_in1=v_in1*10^-3;// in volt Bita_1= 75; Bita_2= Bita_1; I_CQ = (V_EE-V_BE)/(2*R_E+Ri_1/Bita_1);// in amp I_E= I_CQ;// in amp V_CEQ= V_CC + V_BE - I_CQ*R_C;// in volt re_desh= (26*10^-3)/I_E;// in ohm // However, voltage gain of single-input, unbalanced-output differential amplifier is given by so A_d = R_C/(2*re_desh); v_out= A_d*v_in1;// in volt disp(v_out,"Output voltage in volt")
97008bcc1eb590144c1dfdac0eeb4f3ba4161637
449d555969bfd7befe906877abab098c6e63a0e8
/479/CH3/EX3.11/Example_3_11.sce
3192a9b75fe7ee2d7bd0fd44672428216cbbdb57
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
649
sce
Example_3_11.sce
//Chemical Engineering Thermodynamics //Chapter 3 //First Law of Thermodynamics //Example 3.11 clear; clc; //Given H1 = 680.6;//Enthalpy of entering steam at 6Kgf/cm^2 &200 deg cel in Kcal/Kg u1 = 60;//velocity at which steam entered the nozzle in m/sec u2 = 600;//velocity at which steam left the nozzle in m/sec g = 9.8; Hg = 642.8; Hlq = 110.2;//Enthalpy of saturated vapour & saturated liquid at 1.46 Kgf/cm^2 respectively //To calculate the quality of exit steam H2 = H1+((u1^2)-(u2^2))/(2*g*427);//enthalpy of leaving steam in Kcal/Kg x = (H2-Hlq)/(Hg-Hlq); mprintf('The quality of exit steam is %f percent',x*100); //end
704dee8131122eb7988ceeb901d0c9eb8a69c0fa
449d555969bfd7befe906877abab098c6e63a0e8
/3850/CH31/EX31.1/Ex31_1.sce
0500825ed43f3c416b22209abe8b5d455010a6c7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
302
sce
Ex31_1.sce
//To Calculate the Capacitance of the capacitor //Example 31_1 clear; clc; Q=60*10^-6;//Charge on the capacitor V=12;//Potential difference between the plates C=Q/V;//Formula for finding the capacitance of the capacitor printf("Capacitance of the capacitor=%f *10^-6 F",C*10^6);
83855b55e67701ed4d924cca7ecb030789027155
6e257f133dd8984b578f3c9fd3f269eabc0750be
/ScilabFromTheoryToPractice/Computing/testpilefile.sce
ba85ce85fb4a39211f7c8cb373bdab533f08a373
[]
no_license
markusmorawitz77/Scilab
902ef1b9f356dd38ea2dbadc892fe50d32b44bd0
7c98963a7d80915f66a3231a2235010e879049aa
refs/heads/master
2021-01-19T23:53:52.068010
2017-04-22T12:39:21
2017-04-22T12:39:21
89,051,705
0
0
null
null
null
null
UTF-8
Scilab
false
false
382
sce
testpilefile.sce
// stack representation L=[] // empty stack L=[1,L] // add 1 to the stack L=[2,L] // add 2 to the stack L=[3,L] // add 3 to the stack x=L(1),L(1)=[] // "unstacking" // queue representation F=[] // empty queue F=[F,1] // add 1 to the queue F=[F,2] // add 2 to the queue F=[F,3] // add 3 to the queue x=F(1),F(1)=[] // remove from the queue
db2dc32533d26a3367f3e5ebbe49c47e839b5a04
449d555969bfd7befe906877abab098c6e63a0e8
/995/CH5/EX5.2/Ex5_2.sce
af4b968f45fb3498c1d177d1347d74655b21dc38
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex5_2.sce
//Ex:5.2 clc; clear; close; i=15*10^-3; R=(21-2.2)/i; v=18.8;//in volts P=i*v*1000; printf("Resistor %d ohms of %d mW",R,P);
db525bed67b7a78d000eb5d7e95165c78e98ab86
449d555969bfd7befe906877abab098c6e63a0e8
/1067/CH20/EX20.14/20_14.sce
360be08a2f0e65d35347c62397316ec2bc37e958
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
451
sce
20_14.sce
clear; clc; rb=75000e3; ro=50e6; v1=11e3; v2=66e3; xa=.25*rb/ro; xb=.75; xt=.1; v=1; xeq=inv(inv(xa)+inv(xb))+xt; i=v/xeq; i=round(i*100)/100; ia=i*xb/(xa+xb); ib=i*xa/(xa+xb); ia=round(ia*100)/100; ilt=rb/(sqrt(3)*v1); iht=rb/(sqrt(3)*v2); i=i*iht; i=fix(i) ia=ia*ilt; ilt=rb/(1.73*v1); ib=ib*ilt; ia=round(ia); ib=round(ib/10)*10; mprintf("sub transient current generator A=%dA \n generator B=%dA \n HT side=%dA",ia,ib,i);
94f43066da6c86cb6ca2b4556388c2fb48dfcec7
449d555969bfd7befe906877abab098c6e63a0e8
/3718/CH12/EX12.3/Ex12_3.sce
8612017e796987a796605f6c3d240cd5a4dcdfd2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
389
sce
Ex12_3.sce
//Chapter 12: Polymers and Polymerization //Problem: 3 clc; //Declaration of Variables d1 = 920 // density,in kg per m cube d2 = 961.97 // density,in kg per m cube dp = 44 // density % // Solution mprintf("dp = [d2 * (p - d1)] * [100/p * (d2 - d1)]\n") p = 937.98 mprintf(" Density of sample is %.2f kg per m cube", p)
2ccf2e2cd1a4c822b50e55f1d032c369b3449e14
1b969fbb81566edd3ef2887c98b61d98b380afd4
/Rez/bivariate-lcmsr-post_mi/bfas_ap_hrz_col_d/~BivLCM-SR-bfas_ap_hrz_col_d-PLin-VLin.tst
c837823e45cf269e20f480a7bbfda61255da77fb
[]
no_license
psdlab/life-in-time-values-and-personality
35fbf5bbe4edd54b429a934caf289fbb0edfefee
7f6f8e9a6c24f29faa02ee9baffbe8ae556e227e
refs/heads/master
2020-03-24T22:08:27.964205
2019-03-04T17:03:26
2019-03-04T17:03:26
143,070,821
1
0
null
null
null
null
UTF-8
Scilab
false
false
11,974
tst
~BivLCM-SR-bfas_ap_hrz_col_d-PLin-VLin.tst
THE OPTIMIZATION ALGORITHM HAS CHANGED TO THE EM ALGORITHM. ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 1 2 3 4 5 ________ ________ ________ ________ ________ 1 0.254114D+00 2 -0.329455D-02 0.196425D-02 3 0.121788D+00 -0.262772D-02 0.281165D+00 4 -0.201290D-02 0.887240D-03 -0.528054D-02 0.229735D-02 5 -0.425259D-03 -0.207082D-04 0.123844D-02 0.380227D-04 0.262262D-02 6 -0.186682D-03 0.655832D-04 0.146532D-03 -0.121259D-03 -0.386094D-03 7 -0.665925D-03 0.107984D-03 -0.592615D-03 -0.670200D-04 0.528680D-03 8 0.960528D-03 -0.119453D-04 0.566942D-03 0.172302D-03 -0.540302D-05 9 -0.167603D+00 -0.134576D-02 -0.118886D+00 0.109523D-01 0.248955D-01 10 -0.246365D+00 -0.415916D-02 0.191995D-01 -0.201862D-02 0.124062D+00 11 0.623366D-01 0.809937D-02 0.118389D+00 0.863066D-02 0.298419D-01 12 -0.472021D+00 -0.369682D-02 -0.800358D+00 0.322672D-01 0.111100D+00 13 -0.689804D-01 0.787281D-02 0.191885D-01 -0.112781D-01 -0.107956D-01 14 -0.183244D+00 -0.140391D-02 -0.523412D+00 0.263070D-01 0.315289D-02 15 -0.137123D+01 0.992568D-02 -0.668055D+00 0.644651D-02 -0.108978D+00 16 -0.921077D-02 -0.829671D-02 0.721046D-02 -0.463072D-02 0.323115D-03 17 -0.167284D-02 -0.324577D-03 -0.181369D-02 -0.483887D-04 -0.153951D-03 18 -0.526684D+00 -0.501606D-02 -0.107685D+01 0.313948D-01 -0.616948D-02 19 -0.758680D-01 0.262296D-03 -0.255280D-01 0.458605D-02 0.212350D-02 20 -0.855305D+00 0.334640D-01 -0.252106D+01 0.511490D-01 0.293709D-02 21 0.934451D-01 -0.909549D-02 0.999443D-01 -0.176276D-01 -0.144329D-02 22 -0.241555D-02 -0.124378D-04 -0.259703D-02 0.269701D-03 -0.421765D-03 23 0.426627D-01 -0.629577D-02 0.493423D-01 -0.126216D-01 -0.935423D-03 24 -0.375048D-02 0.207436D-03 -0.136665D-02 0.559563D-04 -0.460613D-03 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 6 7 8 9 10 ________ ________ ________ ________ ________ 6 0.980643D-03 7 0.657208D-03 0.321399D-02 8 -0.309786D-04 -0.329590D-03 0.318493D-02 9 0.156599D-01 0.436734D-01 0.211864D-01 0.328404D+02 10 -0.257549D-01 0.131238D-01 0.712901D-02 0.389664D+00 0.139671D+02 11 0.274355D-01 0.434922D-01 0.206439D-01 0.838680D+01 0.582666D+00 12 -0.406606D-01 0.439148D-01 0.169019D-02 0.801116D+01 0.116209D+02 13 0.585354D-01 0.899392D-01 -0.577683D-03 0.173874D+01 0.221349D+00 14 -0.903721D-02 -0.389331D-01 0.230266D+00 0.191456D+01 0.300248D+01 15 0.226797D-01 -0.803617D-02 -0.829908D-01 -0.448734D+01 -0.845216D+01 16 0.295518D-03 0.769410D-03 -0.120869D-02 0.368531D+00 0.788204D-01 17 -0.123263D-03 -0.266286D-03 0.577168D-03 -0.536464D-01 0.504363D-02 18 -0.688696D-01 -0.147557D+00 -0.474499D-01 -0.846995D+01 -0.746594D-01 19 -0.878079D-02 0.110649D-01 -0.387112D-02 -0.117559D+01 0.285878D+00 20 -0.179157D-01 -0.430719D-01 -0.231491D+00 -0.715998D+01 -0.214530D+01 21 0.964579D-02 -0.146701D-01 0.121837D-02 0.103876D+01 0.123572D-01 22 0.395049D-04 -0.104567D-03 0.674379D-03 0.476435D-01 -0.214170D-01 23 0.138612D-02 -0.230792D-02 -0.555035D-02 -0.276305D+00 0.693180D-01 24 -0.648053D-04 -0.477397D-04 0.900972D-03 0.101206D+00 -0.821701D-02 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 11 12 13 14 15 ________ ________ ________ ________ ________ 11 0.316118D+02 12 0.655638D+00 0.119308D+03 13 0.980473D+00 0.265799D-01 0.102550D+02 14 0.846112D-02 0.351534D+01 0.295901D+00 0.514783D+02 15 -0.601322D+01 -0.169971D+01 0.255923D+01 -0.443509D+01 0.160931D+03 16 0.329298D-01 0.375981D+00 -0.478191D-02 -0.938865D-01 0.625546D-01 17 -0.246809D-01 -0.711525D-01 -0.209058D-01 0.470341D-01 -0.715176D+00 18 -0.414434D+01 -0.258544D+01 -0.729377D+01 -0.540073D+01 0.668654D+02 19 -0.735496D+00 0.264981D+01 -0.507408D+00 -0.112868D+01 0.209242D+01 20 0.208456D+01 -0.257475D+02 -0.570598D+01 -0.211410D+02 0.469761D+02 21 0.108858D+01 -0.197543D+01 0.373765D+00 0.873786D+00 -0.268481D+01 22 -0.630325D-01 -0.354030D-01 0.401251D-02 0.809843D-01 -0.251732D+00 23 -0.169773D-01 0.659033D+00 -0.654569D-01 -0.476432D+00 -0.231907D-01 24 -0.598973D-01 -0.740237D-01 0.292760D-01 0.100172D+00 -0.144203D+00 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 16 17 18 19 20 ________ ________ ________ ________ ________ 16 0.323294D+00 17 -0.122367D-01 0.100821D-01 18 -0.174443D+00 -0.266784D+00 0.137250D+03 19 0.155640D+00 -0.280495D-01 0.314225D+00 0.362127D+01 20 -0.218598D+00 -0.167697D+00 0.114701D+03 -0.403893D+00 0.301234D+03 21 0.188502D+00 0.106297D-01 0.576207D+00 -0.322753D+01 0.704364D+00 22 -0.843629D-02 0.453721D-02 -0.572077D+00 -0.245657D-01 -0.557150D+00 23 0.131623D+00 -0.892880D-02 0.291029D+00 0.554793D-01 0.187950D+01 24 -0.703131D-02 0.283850D-02 -0.463680D+00 -0.187403D-01 -0.136296D+01 ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES 21 22 23 24 ________ ________ ________ ________ 21 0.398011D+01 22 -0.177295D-01 0.785202D-02 23 0.494400D+00 -0.254901D-01 0.622899D+00 24 -0.263928D-01 0.725928D-02 -0.589932D-01 0.167163D-01 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 1 2 3 4 5 ________ ________ ________ ________ ________ 1 1.000 2 -0.147 1.000 3 0.456 -0.112 1.000 4 -0.083 0.418 -0.208 1.000 5 -0.016 -0.009 0.046 0.015 1.000 6 -0.012 0.047 0.009 -0.081 -0.241 7 -0.023 0.043 -0.020 -0.025 0.182 8 0.034 -0.005 0.019 0.064 -0.002 9 -0.058 -0.005 -0.039 0.040 0.085 10 -0.131 -0.025 0.010 -0.011 0.648 11 0.022 0.033 0.040 0.032 0.104 12 -0.086 -0.008 -0.138 0.062 0.199 13 -0.043 0.055 0.011 -0.073 -0.066 14 -0.051 -0.004 -0.138 0.076 0.009 15 -0.214 0.018 -0.099 0.011 -0.168 16 -0.032 -0.329 0.024 -0.170 0.011 17 -0.033 -0.073 -0.034 -0.010 -0.030 18 -0.089 -0.010 -0.173 0.056 -0.010 19 -0.079 0.003 -0.025 0.050 0.022 20 -0.098 0.044 -0.274 0.061 0.003 21 0.093 -0.103 0.094 -0.184 -0.014 22 -0.054 -0.003 -0.055 0.064 -0.093 23 0.107 -0.180 0.118 -0.334 -0.023 24 -0.058 0.036 -0.020 0.009 -0.070 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 6 7 8 9 10 ________ ________ ________ ________ ________ 6 1.000 7 0.370 1.000 8 -0.018 -0.103 1.000 9 0.087 0.134 0.066 1.000 10 -0.220 0.062 0.034 0.018 1.000 11 0.156 0.136 0.065 0.260 0.028 12 -0.119 0.071 0.003 0.128 0.285 13 0.584 0.495 -0.003 0.095 0.018 14 -0.040 -0.096 0.569 0.047 0.112 15 0.057 -0.011 -0.116 -0.062 -0.178 16 0.017 0.024 -0.038 0.113 0.037 17 -0.039 -0.047 0.102 -0.093 0.013 18 -0.188 -0.222 -0.072 -0.126 -0.002 19 -0.147 0.103 -0.036 -0.108 0.040 20 -0.033 -0.044 -0.236 -0.072 -0.033 21 0.154 -0.130 0.011 0.091 0.002 22 0.014 -0.021 0.135 0.094 -0.065 23 0.056 -0.052 -0.125 -0.061 0.024 24 -0.016 -0.007 0.123 0.137 -0.017 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 11 12 13 14 15 ________ ________ ________ ________ ________ 11 1.000 12 0.011 1.000 13 0.054 0.001 1.000 14 0.000 0.045 0.013 1.000 15 -0.084 -0.012 0.063 -0.049 1.000 16 0.010 0.061 -0.003 -0.023 0.009 17 -0.044 -0.065 -0.065 0.065 -0.561 18 -0.063 -0.020 -0.194 -0.064 0.450 19 -0.069 0.127 -0.083 -0.083 0.087 20 0.021 -0.136 -0.103 -0.170 0.213 21 0.097 -0.091 0.059 0.061 -0.106 22 -0.127 -0.037 0.014 0.127 -0.224 23 -0.004 0.076 -0.026 -0.084 -0.002 24 -0.082 -0.052 0.071 0.108 -0.088 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 16 17 18 19 20 ________ ________ ________ ________ ________ 16 1.000 17 -0.214 1.000 18 -0.026 -0.227 1.000 19 0.144 -0.147 0.014 1.000 20 -0.022 -0.096 0.564 -0.012 1.000 21 0.166 0.053 0.025 -0.850 0.020 22 -0.167 0.510 -0.551 -0.146 -0.362 23 0.293 -0.113 0.031 0.037 0.137 24 -0.096 0.219 -0.306 -0.076 -0.607 ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES 21 22 23 24 ________ ________ ________ ________ 21 1.000 22 -0.100 1.000 23 0.314 -0.364 1.000 24 -0.102 0.634 -0.578 1.000
8c80c4c16f5f8f5b0db6f7386ccf119d377bb21e
449d555969bfd7befe906877abab098c6e63a0e8
/1073/CH3/EX3.38/3_38.sce
b660a3be6083ff0bec4334385bff06541d7eeead
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
660
sce
3_38.sce
clc; clear; //Example 3.38 v=23.13*10^-6 ; //[m^2/s] k=0.0321 ; //[W/m.K] Beta=2.68*10^-3; //[K^-1] Tw=443 ;//[K] T_inf=303 ; //[K] dT=Tw-T_inf; //[K] g=9.81 ; //[m/s^2] Npr=0.688; //Prandtl number D=100 ; //Diameter [mm] D=D/1000 //Diameter [m] Nra=(g*Beta*dT*(D^3)*Npr)/(v^2) Nnu=0.53*(Nra^(1.0/4.0)) //Nusselt number h=Nnu*k/D //[W/(m^2.K)] h=7.93 //Approximation e=0.90; //Emissivity sigma=5.67*10^-8 ; //Q=Q_conv+Q_rad //Total heat loss //for total heat loss per meter length Q_by_l=h*%pi*D*dT+sigma*e*%pi*D*(Tw^4-T_inf^4) //[W/m] printf("Total heat loss per metre length of pipe is %f W/m",Q_by_l)
3c6ce1f0402280b92f1baa1c32902cdce08cb454
449d555969bfd7befe906877abab098c6e63a0e8
/1964/CH1/EX1.13/ex1_13.sce
925670fd73af33f5cb8224731e351a1af5bcfbdc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,120
sce
ex1_13.sce
//Chapter-1, Example 1.13, Page 25 //============================================================================= clc; clear; //INPUT DATA m=80000;//mass of water lifted by pump in Kg/min g=9.81;//gravity constant in m/sec^2 h=2;//pump is in operation for two hours a day d=30;//pump is in operation for 30 days T=h*d;//total time for which pump is in operation in hrs n=70;//efficeincy in percentage h=12;//the height in m to which pump lifts water C=50;//cost of energy in paise/Kwh //CALCULATIONS P=m*g*h;//potential energy possessed by water per minute or workdone by motor pump/minute measured in joules P=P/60;//potential energy possessed by water per minute or workdone by motor pump/minute measured in joules/sec or watts. O=P/1000;//output power of motor in Kw n=n/100; E=O/n;//input power of motor in Kw Et=E*T;//total energy supplied or energy consumption in Kwh C=C/100;//cost of energy in Rs/Kwh Ct=C*Et;//Total cost of energy //OUTPUT mprintf("Thus the total cost of energy is Rs %4.0f",Ct); //=================================END OF PROGRAM==============================
a8c451d266f444d321a97bbb41b37f4121d19db5
449d555969bfd7befe906877abab098c6e63a0e8
/2471/CH6/EX6.1/Ex6_1.sce
d111dd953c48bc301fa31c8a7c5d1bfd43d4ae16
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
839
sce
Ex6_1.sce
clear ; clc; // Example 6.1 printf('Example 6.1\n\n'); printf('Page No. 142\n\n'); // given L = 2.5;// Length of tubes in metre Do = 10*10^-3;// Internal diameter of tubes in metre m = 3.46;// mass flow rate in kg/s Th = 120;// Temperature of condening steam in degree celcius Tl_i = 20;// Inlet temperature of liquid in degree celcius Tl_o = 80;// Outlet temperature of liquid in degree celcius Cp = 2.35*10^3;// Specific heat capacity of liquid in J/kg-K U = 950;// Overall heat transfer coefficent in W/m^2-K T1 = Th- Tl_i;// in degree celcius T2 = Th- Tl_o;// in degree celcius Tm = ((T2-T1)/log(T2/T1));// logarithmic mean temperature of pipe in degree celcius a = %pi*Do*L;//Surface area per tube in m^2 A = ((m*Cp*(Tl_o - Tl_i))/(U*Tm));// in m^2 N = A/a; printf('The number of tubes required is %3.0f',N)
c96479c474bfe047ee1da608348f33242a0b9d3a
449d555969bfd7befe906877abab098c6e63a0e8
/2465/CH3/EX3.16/Example_16.sce
cee4cbed1afb62d638c02d23dcc54d672580ac15
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
598
sce
Example_16.sce
//Chapter-3,Example 16,Page 61 clc; close; //Reaction.....U(235) + n(1) ---> Kr(95) + Ba(139) + 2*n(1) + Q m_U= 235.124 // Isotopic mass of Uranium in a.m.u. m_n= 1.0099 // mass of neutron in a.m.u. m_Kr= 94.945 // Isotopic mass of Kripton in a.m.u. m_Ba=138.954 // Isotopic mass of Ba in a.m.u. Q_value= (m_U + m_n - (m_Kr + m_Ba + 2*m_n))*931 // in electron volt since 1 a.m.u. =931 MeV //since mass is decreased after reaction // Q value is positive printf('the Q value for the reaction is %.3f MeV',Q_value) //mistake in textbook
d98ac9bfa9c33df7f19adf3e671b031f3c436736
367fb86cc145c187bc8aa89afab0f15f7e8826e4
/functions/cv_threshold_mean.sci
37e701988e66aa075da6e8cdcc98883cf49c99f4
[]
no_license
rishubhjain/funcforscilab
19180cefb15a88df5cd55d91c2e50ab1829e4860
3f9fb8b1f467e1e89da1297bee8bd14645da5605
refs/heads/master
2021-01-23T00:15:23.622940
2015-04-22T09:32:28
2015-04-22T09:32:28
31,612,595
0
0
null
null
null
null
UTF-8
Scilab
false
false
163
sci
cv_threshold_mean.sci
function[img_ret]=cv_threshold_mean(image,maxValue) pyImport adaptive_threshold img_ret=adaptive_threshold.adaptive_thresh_mean(image,maxValue) endfunction
8674bb7d2577853ad6895c88bb2b66bba1e1578c
449d555969bfd7befe906877abab098c6e63a0e8
/1544/CH5/EX5.16/Ch05Ex16.sce
d7e79ed3b34d0e56aa8cd2241884cea7986a901d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,117
sce
Ch05Ex16.sce
// Scilab code Ex5.16: Pg 166 (2008) clc; clear; R_1 = 30; // Resistance, ohm R_2 = 70; // Resistance, ohm R_in = 200; // Internal resistance of meter, ohm V = 12; // Supply voltage, V // Using voltage divider rule, we have V_2t = (R_2 /(R_1 + R_2))*V // True value of p.d across resistance R_2, V // Since the rsistances R_2 and R-in are parallel, so their equivalent resistance is given their parallel combination R_BC = (R_2 * R_in)/(R_2 + R_in); // Resistance, ohms // Using the potential divider technique, V_2i = (R_BC / ( R_BC + R_1 ))*V // Indicated value of p.d across by voltmetre, volts err = (( V_2i-V_2t ) / V_2t)*100 // Percentage error in the reading printf("\nThe p.d. indicated by the meter = %3.1f V", V_2i); printf("\nThe percentage error in the reading = %4.2f percent", err); // Result // The p.d. indicated by the meter = 7.6 V // The percentage error in the reading = -9.50 percent
1c23c7fa98bb0894637d905e944d261fe388686d
449d555969bfd7befe906877abab098c6e63a0e8
/2252/CH7/EX7.3/Ex7_3.sce
bf97b140ee62d3ee73f213d6eaa56f8cb1a9edc5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
941
sce
Ex7_3.sce
//calculating resistance, reactance and impedance of choke coil I=7.5//current flowing through the circuit V1=110//voltage across non-inductive resistor R=V1/I V2=180//voltage across choke coil Z=V2/I Zt=230/I//impedance of whole circuit r=(Zt^2-R^2-Z^2)/(2*R) Xl=sqrt(Z^2-r^2) mprintf("Reactance of coil=%f ohm\nResistance of coil=%f ohm\nImpedance of coil=%f ohm\n",Xl,r,Z) //calculating total resistance and impedance of the circuit Rt=r+R Zt=sqrt(Rt^2+Xl^2) mprintf("Total resistance of circuit=%f ohm\nTotal impedance of circuit=%f ohm\n",Rt,Zt) //calculating power absorbed by the coil P1=I^2*r mprintf("Power absorbed by the coil=%f W\n",P1) //calculating power drawn by circuit P2=I^2*(r+R) mprintf("Power drawn by the circuit=%f W\n",P2) //calculating power factor of whole circuit pf=Rt/Zt mprintf("Power factor of the whole circuit=%f lagging",pf) //answers vary from the textbook due to round off error
dff28ec04d5fb106665f9f372f70ccb2e75f3143
449d555969bfd7befe906877abab098c6e63a0e8
/2240/CH4/EX3.13/EX3_13.sce
879dec6cd73f85ec0260280dee6191a46d692c58
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
303
sce
EX3_13.sce
// Grob's Basic Electronics 11e // Chapter No. 03 // Example No. 3_13 clc; clear; // How much current is needed for a 600-W, 120-V toaster? // Given data V = 120; // Applied Voltage=120 Volts P = 600; // Power of toaster=600 Watts I = P/V; disp (I,'The Current I in Amps')
ca56397f7dbb5e4c736f83b84a09f3bb502d074d
449d555969bfd7befe906877abab098c6e63a0e8
/2534/CH5/EX5.6/Ex5_6.sce
bc32feedfcd3f9fa475b66c9a9a91a986b628f51
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
702
sce
Ex5_6.sce
//Ex5_6 clc Vdc = 15 disp("Vdc = "+string(Vdc)+"V")//applied D.C. voltage //Half Wave Rectifier Vm = %pi*Vdc PIV = Vm disp("Vm = Vdc*pi = "+string(Vm)+"V")//D.C. voltage for half wave rectifier disp("PIV = Vm = "+string(PIV)+"V")//peak inverse voltage for half wave rectifier //Full Wave Rectifier Vm = %pi*Vdc/2 PIV = 2*Vm disp("Vm = Vdc*pi/2 = "+string(Vm)+"V")//D.C. voltage for full wave rectifier disp("PIV = 2*Vm = "+string(PIV)+"V")//peak inverse voltage for full wave rectifier //Bridge Rectifier Vm = %pi*Vdc/2 PIV = Vm disp("Vm = Vdc*pi/2 = "+string(Vm)+"V")//D.C. voltage for bridge rectifier disp("PIV = Vm = "+string(PIV)+"V")//peak inverse voltage for bridge rectifier
f1065b33c381501448aa0c344bcbe68699aa0040
449d555969bfd7befe906877abab098c6e63a0e8
/2420/CH10/EX10.7/10_7.sce
ec8cf7ff8e717b88431893a7dbb5c2cf2f322562
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
435
sce
10_7.sce
clc clear //Initialization of variables p1=14.7 //psia t1=60 //F p2=60 //psia t2=440 //F m=10 //lb/sec //calculations disp("From mollier charts,") h2=216.3 //Btu/lb h1=124.3 //Btu/lb W21=h2-h1 power=W21*m hp=power*3600/2545 cp=0.237 W212=cp*(t2-t1) power2=W212*m hp2=power2*3600/2545 //results printf("Power required = %d hp",hp) printf("\n Power required = %d hp",hp2) printf("\n Work done = %.1f Btu/lb",W212)
7d403e06f67baace918d1a899c46331449d7005e
449d555969bfd7befe906877abab098c6e63a0e8
/3428/CH17/EX10.17.13/Ex10_17_13.sce
4e9634a564d109e832880180af4a4ae86f1ea9c3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
235
sce
Ex10_17_13.sce
//Section-10,Example-3,Page no.-CT.42 //To calculate Entropy change(dl_S). clc; R=8.314 C_v=(3/2)*R C_p=C_v+R n=5 T_1=323 T_2=298 P_2=380 P_1=760 R=8.314 dl_S=n*((C_p*log(T_2/T_1))+(R*log(P_1/P_2))) disp(dl_S,'Entropy change(JK^-1)')
5f22f91808ac873d42a44c6f91a2586a015d70e0
449d555969bfd7befe906877abab098c6e63a0e8
/1670/CH10/EX10.15/10_15.sce
47069316935294d57b19e0147a08739ca3ce1267
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
353
sce
10_15.sce
//Example 10.15 //Fourth Order Runge Kutta Method //Page no. 324 clc;clear;close; deff('y=f(x,y)','y=x^2+y^2') y=1;h=0.1; for i=1:2 x=(i-1)*h K1=h*f(x,y); K2=h*f(x+h/2,y+K1/2); K3=h*f(x+h/2,y+K2/2); K4=h*f(x+h,y+K3); disp(K4,'K4 =',K3,'K3 =',K2,'K2 =',K1,'K1 =') y=y+(K1+2*K2+2*K3+K4)/6 printf('\ny(%g) = %.13f\n\n\n\n',x+h,y) end
35c811eec3e536bf8f1757c6ecea3142c9fe5a25
449d555969bfd7befe906877abab098c6e63a0e8
/1370/CH3/EX3.12/example3_12.sce
c49cf410d092dc2d0a9be80d1d644b2447cbaebe
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
737
sce
example3_12.sce
//example3.12 clc disp("R1=0.9 ohm, R2=0.03 ohm, X1=5 ohm, X2=0.13 ohm") disp("K=N2/N1=1/6 as N1:N2 is 6:1") r=0.03+(0.9*(1/6)^2) format(6) disp(r,"Therefore, (R_2e)[in ohm]=R2+R1''=R2+(K^2)*R1=0.03+(1/6)^2*0.9=") x=0.13+(5*(1/6)^2) format(8) disp(x,"(X_2e)[in ohm]=X2+X1''=X2+(K^2)*X1=0.13+(5*(1/6)^2)=") disp("I_sc = 200 A") disp("(Z_2e)=(V_sc)/(I_sc) i.e. sqrt((R_2e^2)+(X_2e^2))=(V_sc)/200") v=200*0.27444 disp(v,"V_sc(in V)=200*0.27444=") v=54.8895*6 disp(v,"i) V1(in V)=(V_sc)/K=54.8895/(1/6)=") disp("(W_sc)=(V_sc)*(I_sc)*cos(phi_sc) and (W_sc)=(I_sc^2)*(R_2e)") disp("Therefore, (200^2)*0.055 = 54.8895*200*cos(phi_sc)") s=((0.055*200)/(54.8895)) format(4) disp(s,"Therefore, cos(phi_sc)[lagging]=")
ee64423cb5cc42715071c71184255b8c6f9a6428
6e8df5b4cc6a12833566b3b67b0160d1937be025
/Multimorphic_testing_data_code/code/scilab/OpenCV/scripts/scilab/v2/script_generalisation.sci
715f230c1fcd3773ea0ddce7d6a5125c1457e1d2
[]
no_license
templep/TSE_MM_test
2b2cc79b9e6d46a80bf692227f367438adeca3f3
4d3c08489c182b77418fc5d4e55377d5b68e8334
refs/heads/master
2020-03-22T22:01:12.897309
2019-06-13T07:50:42
2019-06-13T07:50:42
140,728,734
0
0
null
null
null
null
UTF-8
Scilab
false
false
21,604
sci
script_generalisation.sci
//a function to choose randomly a number nb_config of observations //to remove in the range [1,l] (l being the total number of observations ; i.e., the number of line) //inputs : // - nb_config : number of observations to be removed // - l : total number of observations //outputs : // - idx_config : randomly chosen observations to be removed function idx_config = choose_random_index(nb_config,l) //random permutation r = grand(1,"prm",1:l); //choose nb_config first elem in the permutation idx_config = r(1:nb_config); endfunction //remove idx_config from teh set of observations rows //inputs : // - rows : the initial set of observations // - idx_config : indexes of observations to be removed //outputs : // - red_rows : reduced set of observations (initial set from which observations have been removed) function red_rows = remove_idx(rows, idx_config) red_rows = rows; red_rows(idx_config,:) = []; endfunction //a function to save a matrix in a specified filename //inputs : // - m : matrix of data to be saved // - path : the path to the directory in which data will be saved // - filename : the name of the file containing data to be saved function save_result(m,path,filename) csvWrite(m,path+filename); endfunction //a function to normalize and take care of missing values //the normalization is in [0;1], //missing values are replaced with '0' (at worst will add a bin) //each column are treated separately in turn and replace previous values //inputs : // - data : all data that will be processed (even columns which are not of interest) // - idx_col : indexes of columns of interest //outputs : // - d : matrix with all columns but columns are interest are normalized and missing value are replaced function d=normalize_and_fill(data,idx_col) //copy before replacing needed columns d = data; //for each column of interest, check if no value miss and if normalize in [0;1] for i = 1:prod(size(idx_col)) //consider specific column c = data(:,idx_col(i)); //remove possible"-nan" replacing them by '0' perf_red = c; perf_red(find(c == "-nan"))='0'; ////normalize //find columns which are not between [0;1] //normalize columns temp=strtod(perf_red); if(find(temp > 1 | temp < 0) ~= []) ma = max(temp); mi = min(temp); temp = (temp-mi)/(ma-mi); end //replace column with possible changes // d=d'; // d(idx_col(i),:) = temp'; // d=d'; d(:,idx_col(i)) = string(temp); end endfunction function [red_set, test_set] = decouple(data,list_tc,idx_config) test_set = []; red_set = []; for i=1:prod(size(list_tc)) tc_meas = data(find(data(:,1) == list_tc(i)),:); test_set = [test_set;tc_meas(idx_config,:)]; tc_meas(idx_config,:)=[]; red_set= [red_set;tc_meas]; end endfunction //a function to load all csv files from a given directory // inputs : // - path : the path where files containing observations over executions // - fileregex : a simple regex containing data to process //files containing data to process must be in a csv format with columns separated by ';' //decimal float values given by a '.' and every cell will be intepreted as a string // outputs : // - x : a matrix containing every read data contained in files function x=load_csv_files(path,fileregex) x=[]; //not sorted list specifically csv_files=listfiles(path+fileregex+'.csv'); //nb file to retrieve nb_iter = size(csv_files,1); //for each file; read data and put them in a matrix to be returned for i=1:nb_iter ////@DEBUG : display the name of the current file to be read //disp(csv_files(i)) //read the file and remove first element (name of the different columns) curr=read_csv(csv_files(i)); if(size(curr,2) == 1) curr = csvTextScan(curr,';','.','string'); end if(nb_iter ~= 1) curr(1,:)=[]; //concatenate to previous data x=[x;curr]; else x = curr; end end endfunction //a function to create histograms needed to compute dispersion scores //it also computates associate dispersion scores to videos //scores and histograms are stored in the given file //inputs : // - data : data to build histograms and dispersion scores // - path : the path to the folder where results will be saved // - filename : the file name containing results (histograms + dispersion score) // - idx_col : the column indexes containing property of interest // - is_rand : a boolean representing whether we should use random test cases or a predefined set function [best_i,best_j,best_k,best_l,best_m] = process_data(data,path,filename,idx_col,is_rand) //scan csv data to have proper format (string and double are mixted) -> //everything in string with decimal noted '.' //formatted_data = csvTextScan(data,";",".",'string'); formatted_data = data; formatted_data = normalize_and_fill(formatted_data,idx_col); //unique first column (filename) unique_text_file = unique(formatted_data(:,1)); //prepare output file (column header) result=["filename","metric","hist"]; idx_config =[]; if(is_rand) //compute the maximum number of observations (parameter to remove observations) l_max = 0; // //arbitrary high constant value l_min = 100000; for(i=1:size(unique_text_file,1)) rows = formatted_data(find(formatted_data(:,1) == unique_text_file(i)),:); l = size(rows,1); if(l > l_max) l_max = l; end if(l < l_min) l_min = l; end end //find for each unique filename corresponding rows //for j = 0 : 100 //number of config to put in test set j = 30; //take indexes at random to be removed //cannot remove more than the max number of observations if(j>l_max) j = l_max-1; end //choose the index to put appart idx_config = choose_random_index(j,l_max); else // test_filename = ["../../../../../results/video_synth/results_executions/motiv_metrics_product_1.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_2.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_10_2.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_10_7.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_16.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_24.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_32.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_70.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_89.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_208.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_10_105.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_44.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_213.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_212.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_206.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_121.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_125.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_115.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_107.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_124.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_59.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_122.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_128.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_110.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_111.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_216.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_116.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_132.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_106.csv"]; test_filename = ["../../../../../results/video_synth/results_executions/motiv_metrics_product_1.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_2.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_10_2.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_10_7.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_16.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_24.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_32.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_70.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_89.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_208.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_10_105.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_212.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_111.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_34_216.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_116.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_11_208.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_11_303.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_10.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_10_107.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_11_212.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_101.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_107.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_108.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_114.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_127.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_131.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_19_132.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_44.csv"; "../../../../../results/video_synth/results_executions/motiv_metrics_product_69.csv"]; csv_files=listfiles("../../../../../results/video_synth/results_executions/"+"motiv_metrics_*"+".csv"); for i =1:size(test_filename,1) idx_config = [idx_config find(csv_files == test_filename(i))]; end end //extract property (properties) of interest data_prop = formatted_data(:,[1 idx_col]); //decouple data into two sets : the test set and the other set //test set will be used to check that our score makes sense [red_set, test_set] = decouple(data_prop,unique_text_file,idx_config); fd=mopen("../../../../../data/video_synth/CV_programs/used_configurations.txt",'r'); used_config = mgetl(fd,-1); mclose(fd); //disp(size(used_config)); //save config used for test used_config_test = used_config(idx_config,:); save_result(used_config_test,"../../../../../data/video_synth/generalization/","used_configuration_test.txt"); //for each test case in reduced set, compute metric and histogram for i=1:size(unique_text_file,1) red_set2 = red_set(find(red_set(:,1) == unique_text_file(i)),:); if(red_set2 ~= []) [measure,hist] = compute_metric(red_set2); hist = strcat(hist,' '); result=[result;unique_text_file(i),measure, hist]; end end //save results of histograms and measures for a given set save_result(result,"../../../../../data/video_synth/generalization/",filename+"_gener.csv"); save_result(test_set,"../../../../../data/video_synth/generalization/",filename+"_test_set.csv") nb_cols = prod(size(idx_col)); // retrieve the best set of 5 histograms [best_measure,best_i,best_j,best_k,best_l,best_m] = compose_5hist_best(result(2:$,3),nb_cols); disp("afte composition : "); disp(best_measure); disp(best_i); disp(best_j); disp(best_k); disp(best_l); disp(best_m); //retrieve lines corresponding to test cases in test set meas_test1 = test_set(find(test_set(:,1) == unique_text_file(best_i)),:); meas_test2 = test_set(find(test_set(:,1) == unique_text_file(best_j)),:); meas_test3 = test_set(find(test_set(:,1) == unique_text_file(best_k)),:); meas_test4 = test_set(find(test_set(:,1) == unique_text_file(best_l)),:); meas_test5 = test_set(find(test_set(:,1) == unique_text_file(best_m)),:); //save those information save_result(meas_test1,"../../../../../results/video_synth/generalization/","tc1.csv"); save_result(meas_test2,"../../../../../results/video_synth/generalization/","tc2.csv"); save_result(meas_test3,"../../../../../results/video_synth/generalization/","tc3.csv"); save_result(meas_test4,"../../../../../results/video_synth/generalization/","tc4.csv"); save_result(meas_test5,"../../../../../results/video_synth/generalization/","tc5.csv"); endfunction // computes the histogram of observations and associated dispersion score // the dispersion score is computed as follows: disp(S) = (#bin of histogram ~= 0 / # of programs) // which is the ratio of activated bins to the number of programs to execute // inputs : // - m : a matrix containing observations to build histogram and dispersion score // - idx_col : index of columns of interest containing observations to take into account // outputs : // - measure : the computed dispersion score based on observations // - hist : histogram associated to the dispersion score function [measure, hist]=compute_metric(m,idx_col) measure=[]; //retrieve right data -> data-first column perf=m; perf(:,1) = []; //convert to double d=strtod(perf); ////prepare histogram //number of bins nb_bins = size(perf,1); cf =[]; ind=[]; //for each column to process for i = 1:size(idx_col,2) //compute histogram [tmp_cf,tmp_ind] = histc([0:nb_bins]/nb_bins,d(:,i)); //add to final histogram and frequencies cf = [cf,tmp_cf']; ind=[ind,tmp_ind]; end //finalize dispersion score and convert to string measure = size(unique(ind,'r'),1); measure = measure/nb_bins; measure = string(measure); //histogram also converted to string hist = string(cf); endfunction //function to create the set of 5 videos which gives the highest dispersion score //regarding a property of interest combining different observations : // histograms are kept separated and are processed as one multi-dimensional histogram //inputs : // - histograms : the set of all histograms available // - nb_cols : number of execution performed to compute histograms //outputs : // - measure : the dispersion scores of each possible set // - i : the index of the first video of each possible set // - j : the index of the second video of each possible set // - k : the index of the third video of each possible set // - l : the index of the fourth video of each possible set // - m : the index of the fifth video of each possible set function [best_measure,best_i,best_j,best_k,best_l,best_m] = compose_5hist_best(histograms,nb_cols) best_measure = 0; best_i = 1; best_j = 2; best_k = 3; best_l = 4; best_m = 5; z=1 for i = 1 : size(histograms,1) for j = i+1 : size(histograms,1) for k = j+1 : size(histograms,1) for l = k+1 :size(histograms,1) for m = l+1 : size(histograms,1) hist1 = csvTextScan(histograms(i),' ','.',"double"); hist2 = csvTextScan(histograms(j),' ','.',"double"); hist3 = csvTextScan(histograms(k),' ','.',"double"); hist4 = csvTextScan(histograms(l),' ','.',"double"); hist5 = csvTextScan(histograms(m),' ','.',"double"); // hist2 = histograms(j); // hist3 = histograms(k); // hist4 = histograms(l); // hist5 = histograms(m); //resize so that cols are kept (no mix of different dimensions) hist1 = matrix(hist1,nb_cols,-1); hist2 = matrix(hist2,nb_cols,-1); hist3 = matrix(hist3,nb_cols,-1); hist4 = matrix(hist2,nb_cols,-1); hist5 = matrix(hist3,nb_cols,-1); //hist1T and hist2T are transposed of hist1 and hist2 respectively //hist1T and hist2T -> 1 line = 1 observation over all columns of interest hist1T = hist1'; hist2T = hist2'; hist3T = hist3'; hist4T = hist4'; hist5T = hist5'; //with different dimensions, a bin is not activated if // every bin of each dimension is not activated v=[]; [v1,v2]=find(hist1T~=0); v=[v;unique(v1)']; [v1,v2]=find(hist2T~=0); v=[v;unique(v1)']; [v1,v2]=find(hist3T~=0); v=[v;unique(v1)']; [v1,v2]=find(hist4T~=0); v=[v;unique(v1)']; [v1,v2]=find(hist5T~=0); v=[v;unique(v1)']; ///////dispersion score is still ///////the number of bins activated to the number of executions //measure = # of activated bins measure = size(unique(v),1); //normalize nb_bins = max([size(hist1,2),size(hist2,2),size(hist3,2),size(hist4,2),size(hist5,2)]); measure = measure/nb_bins; if(measure > best_measure) then best_measure = measure; best_i = i; best_j = j; best_k = k; best_l = l; best_m = m; end end end end end end endfunction function data = display_results(filename,best_i,best_j,best_k,best_l,best_m) data = read_csv("../../../../../data/video_synth/generalization/"+filename+"_test_set.csv"); reshaped_d = matrix(data(:,2),[30,-1]); col=[best_i best_j best_k best_l best_m]; //retrieve column of interest d_interest = reshaped_d(:,col); //convert from string to double d_interest = strtod(d_interest); //x= [1:size(col,2)]; //plot2d(x,d_interest,style=[-1 -1 -1 -1 -1], rect=[0 -0.2 30 1]) plot2d(d_interest,style=[-1 -1 -1 -1 -1], rect=[0 -0.2 30 1]); endfunction //load all csv files from the current directory //and rewrite them into a single one without headers //one after an other all_data=load_csv_files("../../../../../data/video_synth/","all_data"); //cols = [9]; //cols = [10]; cols = [11,12,13]; [i,j,k,l,m] = process_data(all_data,"../../../../../results/video_synth/generalization/","metrics_hist_composite_reduced",cols,%f); ////@DEBUG //i= 1; //j= 15; //k = 35; //l = 36; //m = 37; d = display_results("metrics_hist_composite_reduced",i,j,k,l,m);
7408b81d9e6976c13245ba550398e48dbc73a293
449d555969bfd7befe906877abab098c6e63a0e8
/2681/CH6/EX6.20/Ex6_20.sce
70f9690d5348207fd8d3d0b4b3540620d2bbe24c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
310
sce
Ex6_20.sce
//radius of the outer conductor //given clc C=70D-12//F/m Zo=75//ohm L=Zo^2*C//inductance epsilon_r=2.3 a=0.292//mm//radius of inner conductor b=a*10^(Zo*sqrt(epsilon_r)/138)//Zo=(138/sqrt(epsilon_r))*log(b/a) b=round(b*1d+4)/1d+4///rounding off decimals disp(b,'the radius of the outer conductor')
07618d268d95987ac9a0d8fbfddbb053e09a9af5
53bdf5ec3d505c23a6dbff1555c838c03e7ce670
/Assignment 4/Q1.sce
fe15251055ac7227e53d54e481b86b16c53d5522
[]
no_license
dishvyas/AI
6e7fb662a04b99d5fca4380f97ac94eb5b18debe
a0903084fe210faee4b571b4cade5e5d410ad504
refs/heads/master
2020-05-22T00:50:06.362841
2019-05-12T20:29:20
2019-05-12T20:29:20
186,180,759
0
1
null
null
null
null
UTF-8
Scilab
false
false
367
sce
Q1.sce
clc; clear; rand('seed',0); N = [2,2,1]; x=[0.89, 0.79; 0.85, 0.74; 0.84, 0.72; 1, 1; 0.04, 0.07; 0.03, 0.02; 0.02, 0.01;0.01, 0.01; 0.0086, 0.0053; 0.0061, 0.0026; 0.0044, 0.009; 0.008, 0.0087]'; t=[1 1 1 1 0 0 0 0 0 0 0 0]; disp(size(x)) lp=[0.1, 0]; W=ann_FF_init(N); T=400; W=ann_FF_Std_online(x,t,N,W,lp,T); a=ann_FF_run(x,N,W); disp(x); disp(W);
13f92b4f2dbb63dccf1a1ace4bea65fb40f4f01e
449d555969bfd7befe906877abab098c6e63a0e8
/147/CH2/EX2.8/Example2_8.sce
60121924ddf4f6837435371fc590abd652b2580d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
307
sce
Example2_8.sce
//Resistance R, Voltage V close(); clear; clc; R1 = 6;//ohm R2 = 1; R3 = 2; R4 = 3; R5 = 10; V1 = 10;//V V2 = 20; //Solving Nodal equations A = [1/R1+1/R2+1/R3 -1/R3;-1/R3 1/R3+1/R4+1/R5]; C = [V1/R1;V2/R5]; B = inv(A)*C; V3 = B(1,1); V4 = B(2,1); I = (V4-V2)/R5; mprintf('I = %0.2f A',I);
0c0f5fac8b9befcee117f3d8f20eab68d8e4106c
449d555969bfd7befe906877abab098c6e63a0e8
/3835/CH1/EX1.12/Ex1_12.sce
50ba22d123723f38c75e5b727a0b0357186f04ea
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
291
sce
Ex1_12.sce
clear // //this is a derivation by substitution problem //al1=al0/(1+al0*t1) //al2=al0/(1+al0*t2) //where t1 and t2 are different temperatures al0,al1 and al2 are temperature coefficients //substitute al0 in al2 //on deriving and solving for al2 we get, printf("\n al2=al1/(1+al1*(t1-t2))")
58a6b7c6123d4cab3068e6dee7183a183498f603
8c9e7e9371ab3ab1b8d07c51188e55b24a7634c2
/EXP-1_60002190039_DURVANG_VIJAY_PARAB_plotting_elementary_signals.sce
7c642c35050930ed0cd9410a8b4f485968700c84
[]
no_license
durvangparab967/SYSTEMS-AND-SIGNALS-EXPERIMENTS
0b82f8d1e90b5f4b36366e34ff703738ad4cd32b
ab23491f9aaeebb230832826a3b5e5d6788c5b1d
refs/heads/main
2023-01-22T11:25:20.906104
2020-11-25T10:13:44
2020-11-25T10:13:44
315,895,563
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,979
sce
EXP-1_60002190039_DURVANG_VIJAY_PARAB_plotting_elementary_signals.sce
//Plot various elementary signals in continuous and discrete domain //Unit Step clc; clf; clear all; n=-10:10; x=[ zeros(1,10), ones(1,11) ]; a= gca(); subplot(2,1,1) plot2d3(n,x); title( 'Plot of Discrete Time Unit Step ' ); xlabel( ' n ' ); ylabel( ' u[n] ' ); n1=0:10 x1 = [ones(1,11) ]; a = gca(); subplot(2,1,2) plot(n1,x1); title('Plot of Continuous Time unit step '); xlabel(' t '); ylabel(' u(t) '); //Unit Impulse clc ; clf ; clear all; n1= -5:5 x1=[ zeros(1,5),ones(1,1),zeros(1,5)]; subplot(2,1,1) plot2d3(n1,x1); title( 'Plot of discrete unit impulse ' ); xlabel( ' number of samples ' ); ylabel( ' amplitude ' ); n= -5:5 x=[ zeros(1,5),ones(1,1),zeros(1,5)]; subplot(2,1,2) plot(n,x); title( 'Plot of continuous unit impulse ' ); xlabel( ' time ' ); ylabel( ' amplitude ' ); //Unit Ramp clc ; clf ; clear all; n=0:1:10; x=n subplot(2,1,1) plot2d3(n,x); xtitle( 'Plot of Discrete unit ramp signal ' ); xlabel( ' number of samples (n) ' ); ylabel( ' x [ n ] ' ); t=0:1:10; x1=t subplot(2,1,2) plot(t,x1); xtitle( 'Plot of Continuous unit ramp signal ' ); xlabel( ' time ' ); ylabel( ' x ( t ) ' ); //Sinusoidal Signal t=0:0.01:10; a=cos(2*3.14*t); subplot(2,1,1) plot(t,a) xlabel('time') ylabel('cosine x(t)') title('Plot of Continuous cosine wave') t1=0:0.01:10; a1=cos(2*3.14*t); subplot(2,1,2) plot(t1,a1) xlabel('n') ylabel('cosine x[n]') title('Plot of Discrete cosine wave') //Exponential signal clc ; clf ; clear all; t = -2:0.1:2; x= exp(t); subplot(2,1,1) plot(t,x); title( 'Plot of Continuous exponential wave ' ); xlabel( ' t ' ); ylabel( ' x(t) ' ); t = -2:0.1:2; x= exp(t); subplot(2,1,2) plot2d3(t,x); title( 'Plot of Discrete exponential wave ' ); xlabel( ' n ' ); ylabel( ' x[n] ' ); //Signum Function clc ; clf ; clear all; t=-5:0.1:5 a=gca(); x=sign(t); b=gca(); plot2d3(t,x); title('Plot of signum function ' ); xlabel( ' t ' ); ylabel( ' x ' );
3f4efc3fdebd85b0964f6e159db59543aec20907
717ddeb7e700373742c617a95e25a2376565112c
/3428/CH23/EX14.23.18/Ex14_23_18.sce
a19fbf1101edc9defecdac740070411d5744e79a
[]
no_license
appucrossroads/Scilab-TBC-Uploads
b7ce9a8665d6253926fa8cc0989cda3c0db8e63d
1d1c6f68fe7afb15ea12fd38492ec171491f8ce7
refs/heads/master
2021-01-22T04:15:15.512674
2017-09-19T11:51:56
2017-09-19T11:51:56
92,444,732
0
0
null
2017-05-25T21:09:20
2017-05-25T21:09:19
null
UTF-8
Scilab
false
false
664
sce
Ex14_23_18.sce
//Section-14,Example-2,Page no.-PC.112 //To calculate the pH in the following cases. clc; V_1=150 //volume of 0.1 NaOH solution V_2=150 //volume of 0.2 HCl solution N_1=0.1 N_2=0.2 V=V_1+V_2 //Total volume of the solution m_eq=(V_2*N_2)-(V_1*N_1) //Total milliequivalents of excess HCl N=m_eq/V C_1=N //Since HCl is a strong acid so[HCl]=[H3O+] pH_1=-log10(C_1) disp(pH_1,'pH of the required solution') pH1=5 C1=10^-5 //[H3O+] pH2=3 C2=10^-3 //[H3O+] C_3=(C1+C2)/2 //[H3O+] pH_2=-log10(C_3) disp(pH_2,'pH of the required solution')
c3f1fd37c9bc58a22f9b90f21d6914e7ced1563e
449d555969bfd7befe906877abab098c6e63a0e8
/389/CH10/EX10.1/Example10_1.sce
f77f06ea6914505c050b1596b67dc202c9740fa5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,902
sce
Example10_1.sce
clear; clc; // Illustration 10.1 // Page: 494 printf('Illustration 10.1 - Page: 494\n\n'); // solution //****Data****// // a:water b:isopropyl ether c:acetic acid xF = 0.30;// [mol fraction] yS = 0;// [mol fraction] S1 = 40;// [kg] B1 = 40;// [kg] //*******// // Equilibrium data at 20 OC: // Wa: Wt. percent of a // Wb: Wt. percent of b // Wc: Wt. percent of c // Data1 = [Wc Wa Wb] // Data1: water layer Data1 = [0.69 98.1 1.2;1.41 97.1 1.5;2.89 95.5 1.6;6.42 91.7 1.9;13.30 84.4 2.3;25.50 71.1 3.4;36.70 58.9 4.4;44.30 45.1 10.6;46.40 37.1 16.5]; // Data2: isopropyl ether layer Data2 = [0.18 0.5 99.3;0.37 0.7 98.9;0.79 0.8 98.4;1.93 1 97.1;4.82 1.9 93.3;11.40 3.9 84.7;21.60 6.9 71.5;31.10 10.8 58.1;36.20 15.1 48.7]; scf(20); plot(Data1(:,3)/100,Data1(:,1)/100,Data2(:,3)/100,Data2(:,1)/100); xgrid(); xlabel("Wt fraction of isopropyl ether"); ylabel("Wt fraction of acetic acid"); // x: Wt fraction of acetic acid in water layer. // y: Wt fraction of acetic acid in isopropyl layer. legend("x Vs fraction ether","y Vs fraction ether"); // The rectangular coordinates of Fig 10.9(a) will be used but only upto x = 0.30 a = gca(); a.data_bounds = [0 0;1 0.3]; // Stage 1: F = 100;// [kg] // From Eqn. 10.4: M1 = F+S1;// [kg] // From Eqn. 10.5: xM1 = ((F*xF)+(S1*yS))/M1; // From Fig. 10.15 (Pg 495): // Point M1 is located on the line FB and with the help of tie line passing through M1: x1 = 0.258;// [mol fraction] y1 = 0.117;// [mol fraction] // From Eqn. 10.8: E1 = (M1*(xM1-x1)/(y1-x1));// [kg] // From Eqn. 10.4: R1 = M1-E1;// [kg] // Stage 2: S2 = 40;// [kg] B2 = 40;// [kg] // From Eqn. 10.15: M2 = R1+B2;// [kg] // From Eqn. 10.16: xM2 = ((R1*x1)+(S2*yS))/M2; // Point M2 is located on the line R1B and the tie line passing through R2E2 through M2: x2 = 0.227; y2 = 0.095; // From Eqn. 10.8: E2 = (M2*(xM2-x2)/(y2-x2));// [kg] // From Eqn. 10.4: R2 = M2-E2;// [kg] // Stage 3: S3 = 40;// [kg] B3 = 40;// [kg] // From Eqn. 10.15: M3 = R2+B3;// [kg] // From Eqn. 10.16: xM3 = ((R2*x2)+(S3*yS))/M3; // Point M3 is located on the line R2B and the tie line passing through R3E3 through M3: x3 = 0.20;// [mol fraction] y3 = 0.078;// [mol fraction] // From Eqn. 10.8: E3 = (M3*(xM3-x3)/(y3-x3));// [kg] // From Eqn. 10.4: R3 = M3-E3;// [kg] Ac = x3*R3; printf("The composited extract is %f kg\n",(E1+E2+E3)); printf("The acid content is %f kg\n",((E1*y1)+(E2*y2)+(E3*y3))); printf("\n"); // If an extraction to give the same final raffinate concentration were to be done in single stage, the point M would be at the intersection of tie line R3E3 and the line BF. x = 0.20;// [mol fraction] xM = 0.12;// [mol fraction] // From Eqn. 10.6: S = F*(xF-xM)/(xM-yS);// [kg] printf("%f kg of solvent would be recquired if the same final raffinate concentration were to be obtained with one stage.\n",S);
2043b564477e16cb1ff3adba0cefecbc726459e3
449d555969bfd7befe906877abab098c6e63a0e8
/3793/CH14/EX14.2/exp_14_2.sce
1e5287b65aa90c52bebebe9f6aa6555bc5f8adb0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
684
sce
exp_14_2.sce
clear; clc; z12=complex(.05,.20); z23=complex(.075,.25); c1=.025; c2=.005; w1= (.1568*10^(-4)); w2= (.1679*10^(-4)); w3= (.0668*10^(-4)); w4= (.0702*10^(-4)); W=[w1 0 0 0; 0 w2 0 0; 0 0 w3 0; 0 0 0 w4]; v1=1.05; v2=1.05; v3=(1.05); h1=(v1/z12); h2=(v2/z12); h3=(v2/z23); h4=(v3/z23); H=[h1 0 0 0; 0 h2 0 0; 0 0 h3 0; 0 0 0 h4]; H1=conj(H); D=H1*W*H; D1=real(D); A=[1 -1 0; -1 1 0; 0 1 -1; 0 -1 1]; B=[-1 0; 1 0; 1 -1; -1 1]; b=[1;-1;0;0]; E=(B')*D; f=E*B; s1=complex(.50,-.12); s2=complex(-.48,.10); s3=complex(.80,-.40); s4=complex(-.78,.38); S=[s1;s2;s3;s4]; vm=(inv(H))*(conj(S)); vb=inv(f)*E*(vm-(b*v1)); V=[v1;vb]; printf("V = ") disp(V);
40974ec0c9264f30202f1ad3980608e76ca0d726
449d555969bfd7befe906877abab098c6e63a0e8
/2417/CH7/EX7.8/Ex7_8.sce
63e85e0e24c08c5898d43e98bc323fc557f4e8f5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,422
sce
Ex7_8.sce
//scilab 5.4.1 clear; clc; printf("\t\t\tProblem Number 7.8\n\n\n"); // Chapter 7 : Mixtures Of Ideal Gases // Problem 7.8 (page no. 329) // Solution //We will take as a basis 100 lbm of mixture. //Dividing colomn 2 by 3 gives us mass/molecular weight or moles of each constituents.The total number of moles in the mixture is the sum of coloumn 4,and the molecular weight of the mixture is the mass of the mixture(100 lbm) divided by the number of moles //In coloumn 5,mole fraction is given by moles/total mole printf("Basis:100 pounds of gas mixture\n\n") printf("gas Mass Molecular Moles Mole Percent \n") printf(" lbm weight MW fraction Volume \n") printf("O2 23.18 32.00 0.724 %f %f \n",(0.724/3.45),(0.724/3.45)*100) printf("N2 75.47 28.02 2.693 %f %f \n",(2.692/3.45),(2.692/3.45)*100) printf("A 1.30 39.90 0.033 %f %f \n",(0.033/3.45),(0.033/3.45)*100) printf("CO2 0.05 44.00 - - - \n") printf(" =100.00 =3.45 =1.00 = 100 \n ") printf(" MWm=100/3.45=28.99 ")
a048efd9d1ffa965f2e7ffa200adaec21cab1996
449d555969bfd7befe906877abab098c6e63a0e8
/2825/CH19/EX19.13/Ex19_13.sce
37182261d3644f5ec467ff1fa9c27b6a93c2ef78
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex19_13.sce
//Ex19_13 Pg-962 clc dec=175; //binary input oct=dec2oct(dec) //decimal output disp("The octal equivslent of 175 is") disp(oct)
01b41f4ad509e0b3274e05bae7a2cd36958161b3
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set12/s_Industrial_Instrumentation_K._Krishnaswamy_And_S._Vijayachitra_1436.zip/Industrial_Instrumentation_K._Krishnaswamy_And_S._Vijayachitra_1436/CH5/EX5.19/ex5_19.sce
ddf0c6607adde7fdc7d4e7417fa694376d7674eb
[]
no_license
hohiroki/Scilab_TBC
cb11e171e47a6cf15dad6594726c14443b23d512
98e421ab71b2e8be0c70d67cca3ecb53eeef1df6
refs/heads/master
2021-01-18T02:07:29.200029
2016-04-29T07:01:39
2016-04-29T07:01:39
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
164
sce
ex5_19.sce
errcatch(-1,"stop");mode(2);//Example 5.19, page no-317 e=0.2*10^-3 B=0.08 l=10*10^-2 v=e/(B*l) printf("V = %.3f m/sec = %.2f cm/sec",v,v*100) exit();
11a4e13ecbaf4d67c7e91a6d36352d51ae4d6b71
1d7cb1dbfad2558a4145c06cbe3f5fa3fc6d2c08
/Scilab/SSCTIE/SSCTIE2.sce
234ae0206b8e3bbdeda5201e8cc9f03fdffc58b6
[]
no_license
lrayzman/SI-Scripts
5b5f6a8e4ae19ccff53b8dab7b5773e0acde710d
9ab161c6deff2a27c9da906e37aa68964fabb036
refs/heads/master
2020-09-25T16:23:23.389526
2020-02-09T02:13:46
2020-02-09T02:13:46
66,975,754
0
0
null
null
null
null
UTF-8
Scilab
false
false
562
sce
SSCTIE2.sce
fssc=33e3; f0=6e9; a=0.005; favg=f0*(1-0.5*a); t=[0:1e-7:1/(2*fssc)]; foft=favg-2*f0*a*fssc*(t-0.25/fssc); //Triangular thetadelta=f0*a*t/2-f0*a*fssc*(t^2); //Triangular //foft=favg+f0*0.5*a*cos(2*%pi*fssc*t); //Sine //thetadelta=(f0*0.5*a/(2*%pi*fssc))*sin(2*%pi*fssc*t); //Sine tie=thetadelta/favg; printf("Max tie is %0.2f ns\", max(tie)*1e9); xinit("1"); plot2d(t*1e6,foft/1e9); xtitle("f(t)", "Time (uS)", "Frequency (GHz)"); xinit("2"); plot2d(t*1e6,tie*1e9); xtitle("TIE", "Time (uS)", "Interval Error (nS)");
41b0909dae7e23d01a60b169e024d9a9780849dd
b67defe3c1cae63dd1a79578f840d069568034e6
/scilab/mulapproxluck.sci
93f79f9bb504ca4f1e5faa1026bd375292f762c9
[]
no_license
wmacevoy/luck
bf5d93ce00e8136634d715057a97706d3aa804b3
47e5c8eb1782a1b4f3f5b9e7583290d9a842532e
refs/heads/master
2023-05-03T14:46:51.353817
2023-04-25T03:13:44
2023-04-25T03:13:44
33,452,250
0
0
null
null
null
null
UTF-8
Scilab
false
false
219
sci
mulapproxluck.sci
function L=mulapproxluck(x,p) [nprobs,nsamps]=size(x); ntrials=sum(x,'r'); mu=p*ntrials; z=(x-mu) ./ sqrt(mu); R2=sum(z.^2,'r'); one=ones(1,nsamps); L=cdfgam("PQ",R2/2,((nprobs-1)/2)*one,one); endfunction
3344ab0f08e15a3ba059962cdf71e9aeeab8ad73
449d555969bfd7befe906877abab098c6e63a0e8
/1217/CH1/EX1.25/Exa1_25.sce
e1441d2428024cc433361dba2dd0f4e0e892877e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
523
sce
Exa1_25.sce
//Exa 1.25 clc; clear; close; //given data BETAmin=80;//unitless BETAmax=120;//unitless IE=400;//in uA VT=25;//in mvolts VEE=15;//in volts VCC=15;//in volts VBE=0.7;//in volts VEB=-0.7;//in vol IE1=IE/2;//in uA IE2=IE1;//in uA IBmax=IE1/(1+BETAmin);//in uA IBmin=IE1/(1+BETAmax);//in uA Iiomax=IBmax-IBmin;//in uA disp(IBmax,"Largest possible input bias current in uA is :"); disp(IBmin,"smallest possible input bias current in uA is :"); disp(Iiomax,"Largest possible input offset current in uA is :");
2c317ab75ffecd7478274324aa23ff2a5a9f20c4
74084a1c6ef810ee05785941963c7dc1725783cf
/test/CT3.prev.tst
0dbc294a9f66c0728adf63b5268b399b17857d64
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gfis/common
338d245dc6a1ef093748fa577129ac30822ec70b
da1e36931decdbdfe201d88207d5a01c207f8c5a
refs/heads/master
2022-03-21T14:56:42.582874
2022-02-07T10:39:22
2022-02-07T10:39:22
59,970,966
0
0
null
null
null
null
UTF-8
Scilab
false
false
109
tst
CT3.prev.tst
call -in 2011-07-21 17:39:00 call my.pr1 -in 2 double quoted -in:int 29647 -in 3 single quoted ;
50cd168bb3dea0cfdb70ee8ba14ab8db367d8ae4
d47ef89d1d0330681dd97a1ca4cb131d64b6d609
/code/held_karp.sce
22d612fe9c5d52db645a0af6c4ff9b735c6e4003
[]
no_license
jere1882/TSP_Heuristics
a035a28bc786a19d0d5fd17364f81d46d70d9c17
ca58cb77b986d03b4a92d86161ce812df8d85b17
refs/heads/master
2022-11-25T05:35:45.053166
2020-08-02T23:45:28
2020-08-02T23:45:28
284,557,182
0
0
null
null
null
null
UTF-8
Scilab
false
false
36
sce
held_karp.sce
// *** ESCRIBA EL CODIGO AQUI! ***
48d338dd480215a1001ff940ff6285e0cdb303be
449d555969bfd7befe906877abab098c6e63a0e8
/3012/CH7/EX7.3/Ex7_3.sce
1055014ad9f94ad8bad4e57f66c10fee1a584c79
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,099
sce
Ex7_3.sce
// Given :- T = 373.15 // initial temperature of saturated liquid in kelvin T0 = 293.15 // in kelvin P0 = 1.014 // in bar // Part(a) // From table A-2 ug = 2506.5 // in kj/kg uf = 418.94 // in kj/kg vg = 1.673 // in m^3/kg vf = 1.0435*(10**(-3)) // in m^3/kg sg = 7.3549 // in kj/kg.k sf = 1.3069 // in kj/kg.k // Calculations // Energy transfer accompanying work etaw = 0 // since p = p0 // Exergy transfer accompanying heat Q = 2257 // in kj/kg,obtained from example 6.1 etah = (1-(T0/T))*Q // Exergy destruction ed = 0 // since the process is accomplished without any irreversibilities deltae = ug-uf + P0*(10**5)*(vg-vf)/(10**3)-T0*(sg-sf) // Results printf( ' Part(a)the change in exergy is %.2f kJ/kg.',deltae) printf( ' The exergy transfer accompanying work is %.2f kJ/kg.',etaw) printf( ' The exergy transfer accompanying heat is %.2f kJ/kg',etah) printf( ' The exergy destruction is %.2f kJ/kg.',ed) // Part(b) Deltae = deltae // since the end states are same Etah = 0 // since process is adiabatic // Exergy transfer along work W = -2087.56 // in kj/kg from example 6.2 Etaw = W- P0*(10**5)*(vg-vf)/(10**3) // Exergy destruction Ed = -(Deltae+Etaw) // Results printf( ' Part(b)the change in exergy is %.2f kJ/kg.',Deltae) printf( ' The exergy transfer accompanying work is %.2f kJ/kg.',Etaw) printf( ' The exergy transfer accompanying heat is %.2f kJ/kg.',Etah) printf( ' The exergy destruction is %.2f kJ/kg.',Ed)
2ec9a78a9a81ca452cbd9b0075af03611f5cf9ae
449d555969bfd7befe906877abab098c6e63a0e8
/2990/CH4/EX4.3/Ex4_3.sce
597d04004675cda795a5dc98f359ec71d81764a7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
524
sce
Ex4_3.sce
clc; funcprot(0); // Initialization of Variable function[dms]=degtodms(deg) d = int(deg) md = abs(deg - d) * 60 m = int(md) sd = (md - m) * 60 sd=round(sd*100)/100 dms=[d m sd] endfunction b=40.0;//distance in degrees p=6.0;//disatnce in degrees //calculation a=%pi/2-asin(cos(b*%pi/180)*cos(p*%pi/180)); Bc=a*180/%pi-b; BC=Bc*1.853*60; B=asin(sin(b*%pi/180)/sin(a)) B=degtodms(B*180/%pi); disp(round(BC*100)/100,"distance BC in km"); disp(B,"angle of B deg min sec"); clear()
864f1d20962a10466926ca25e59114a0f1ab878e
29ebda219499e5b5e13800b6e5083ff775eb8196
/Control_levi.sce
b5fe2eaae3ec95ef78e28b8a3897bea678f76efe
[]
no_license
izlervaldivia/Maglevtrains
8b9a002694c5658f9561f93a17d7a555b8fd120f
7282faae4998e7a9a18a6107275379cc61c64a51
refs/heads/master
2022-12-01T05:54:23.048728
2020-08-17T03:59:03
2020-08-17T03:59:03
288,067,147
1
0
null
2020-08-17T07:36:19
2020-08-17T02:40:21
Scilab
UTF-8
Scilab
false
false
3,906
sce
Control_levi.sce
//Evaluacion LQG Train // load the data clc clear load("maglevtrainLTI.sod","X","U","sys") Ap=sys.A; Bp=sys.B; Cp=sys.C; Dp=sys.D; Dp=0 Cp=[1 0 0] tri = trzeros(sys) w = logspace(-3,3); svi = svplot(sys,w); scf(1); plot2d("ln", w, 20*log(svi')/log(10)) xgrid(12) xtitle("Valores singulares de la planta inicial","Frequency (rad/s)", "Amplitude (dB)"); ///////////////////////////////////--------------------------- //Planta aumentada con el integrador [ns,nc]=size(Bp); //ns= number of inputs; nc=number of controls Ai=[Ap Bp; 0*ones(nc,ns) 0*ones(nc,nc)]; Bi=[0*ones(ns,nc); eye(nc)]; Ci=[Cp 0*ones(1,1)]; Di=0*ones(nc,nc); sysi=syslin('c',Ai,Bi,Ci,Di); I=eye(nc); /* Plot singular values */ tri = trzeros(sysi) w = logspace(-3,3); svi = svplot(sysi,w); scf(2); plot2d("ln", w, 20*log(svi')/log(10)) xgrid(12) xtitle("Valores singulares de la planta con integrador","Frequency (rad/s)", "Amplitude (dB)"); //Obtenciion de los polos y zeros planta con integrador scf(3); plzr(sysi); //----LQR------// //we use ricatti equation for calculate de gain H C=1*Ci'*Ci; //State Weighting Matrix rho=1; //Cheap control recovery parameter //The smaller the parameter, the better the recovery. R = rho*eye(nc);//Control Weigthing Matrix //now we calculate B B=Bi*inv(R)*Bi'; A=Ai; //Solv the ricatti equation X=riccati(A,B,C,'c','eigen'); //the value of the gain G G=inv(R)*Bi'*X; //Matriz G //----KALMAN FILTER-------/// ll= inv(Cp*inv(-Ap)*Bp+Dp); //Choose ll and lh to match singular values at all frequencies lh = -inv(Ap)*Bp*ll; Lp=[lh, ll]; //ll, lh - for low and high frequency loop shaping pnint = eye(nc,nc) // Process Noise Intensity Matrix mu = 0.1; // Measurement Noise Intesity; Used to adjust Kalman Filter Bandwidth //Small mu - expensive sensor - large bandwidth //Large mu - inexpensive sensor - small bandwidth THETA = mu*eye(nc,nc) // Measurement Noise Intensity Matrix //We use the ricatti equation for calculate de gain H Ch=Lp*Lp'; Ah=Ai'; //calculating Bh Bh=Ci'*inv(THETA)*Ci; //Calculate de solution Xh=riccati(Ah,Bh,Ch,'c','eigen'); //The gain H H=(inv(THETA)*Ci*Xh)'; sysh = syslin('c',Ai,H,Ci,Di); /* Plot singular values*/ trh = trzeros(sysh) w = logspace(-3,3); svh = svplot(sysh,w); scf(4); plot2d("ln", w, 20*log(svh')/log(10)) xgrid(12) xtitle("Valores singulares Malla objetivo G_{KF}", "Amplitude (dB)"); //-------------------------------------- //Compensator LQG Ak = [ Ai-Bi*G-H*Ci 0*ones(ns+nc,nc) G 0*ones(nc,nc) ] Bk = [ H 0*ones(nc,nc) ] Ck = [0*ones(nc, ns+nc) eye(nc,nc) ] Dk = 0*ones(nc,nc); sysk=syslin('c',Ak,Bk,Ck,Dk); /* Plot singular values */ trk = trzeros(sysk) w = logspace(-3,3); svk = svplot(sysk,w); scf(5); plot2d("ln", w, 20*log(svk')/log(10)) xgrid(12) xtitle("Valores singulares compensador","Frequency (rad/s)", "Amplitude (dB)"); //---------------------------------------- //Analysis in open loop Aol = [ Ap Bp*Ck 0*ones(ns+nc+nc,ns) Ak ] Bol = [ 0*ones(ns,nc) Bk ] Col = [ Cp 0*ones(nc,ns+nc+nc) ] Dol = 0*ones(nc,nc); sysol = syslin('c',Aol,Bol,Col,Dol); //Obtencion de los polos y zeros lazo abierto scf(6); plzr(sysol); //---------------------------------------- //Response in closed loop syscl = syslin('c',Aol-Bol*Col, Bol*0.0001, Col, 0*eye(nc,nc)); //Obtencion de los polos y zeros en lazo cerrado scf(7); plzr(syscl); //-------------------------------- //Respuesta al step t=[0:0.1:20]; //input defined by a time function deff('u=timefun(t)','u=1') scf(8); plot2d(t',(csim(timefun,t,syscl))') xtitle("Respuesta del sistema","t(s)","Amplitud(m)");
501b2b0169369c2279ad5a45648b8de8e3ba8509
848985a0f79ca7b51ae07d2a69da499a3093257a
/Assignment-4/Rayleigh.sce
b98d31fc1d8667d4c85caecd53cb1239f37de4e5
[]
no_license
Gituser143/Linear-Alegebra-SciLab-Assignment
db69f6cf6a2431e553dbd1f067a329dcb7979f41
6eef13de5aa3b2f45b0faaff826648738985377a
refs/heads/master
2020-12-30T04:18:21.185190
2020-04-04T07:24:22
2020-04-04T07:24:22
238,857,772
2
1
null
null
null
null
UTF-8
Scilab
false
false
603
sce
Rayleigh.sce
//Largest eigen value clear; clc; close(); a = [0 0 0; 0 0 0; 0 0 0] for i=1:3 for j=1:3 a(i,j) = input('Enter the values:') end end disp(a,'A = ') //initial vector u0 = [1 1 1]'; disp(u0,'The initial vector is') v = a*u0 a1 = max(u0) disp(a,'First approximation to eigen value is ') while abs(max(v)-a1)>0.002 disp(v,'Current eigen vector is ') a1 = max(v) disp(a1,'Current eigen value is ') u0 = v/max(v) v = a*u0 end format('v',4) disp(max(v),'The largest eigen value is: ') format('v',5) disp(u0,'The corresponding eigen vector is: ')
94632e96ef3987be76f3cecefb95a2a2672f73f2
449d555969bfd7befe906877abab098c6e63a0e8
/2207/CH2/EX2.7.12/ex_2_7_12.sce
aec4a85ee9424cdf8e6a117640b89d04e638c8e5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
495
sce
ex_2_7_12.sce
//Example 2.7.12;//pulse width clc; clear; close; //given data : format('v',5) v=200;//in volts il=100;//latch current in mA l=0.2;//inductance in henry dit=v/l;//in amp/sec dt=(il*10^-3)/dit;//in seconds disp("part (a)") disp(dt*10^6,"minimum pulse width required to turn on the SCR is in micro seconds") r=20;//in ohms x=(il*10^-3*r)/v;// t=(log(1-x))*(-l/r);// disp("part (b)") disp(round(t*10^6),"minimum pulse width in micro seconds is") //part b answer is calculated wrong in the textbook
29dccab6a008264656548d17a53675f15f5e9e6d
cc6cc2c2fcdfa476aa883265aa05e06d82c1110a
/2018.1/MAT/lista-scilab/8.sce
7b876e1a315aa01fc66c1fc1df3a42b0324c92b0
[]
no_license
devarthurribeiro/ads-ufrn
39038c2089d5d784fa121c4094e6d694dcb5a545
9a9881acf756be4f844e72e581543daf3a649641
refs/heads/master
2020-03-17T15:16:28.940709
2018-10-02T12:26:27
2018-10-02T12:26:27
133,704,315
0
0
null
null
null
null
UTF-8
Scilab
false
false
86
sce
8.sce
x = [10:10:1000]; y = 1.2*x+6; plot(x,y); x = [10:10:1000]; y = -1.2*x+6; plot(x,y);
3fd996d29ba3acb39ac9d7056e54849de0b9d16c
449d555969bfd7befe906877abab098c6e63a0e8
/761/CH13/EX13.2/13_2.sce
4e1171778318b4842708244d7e179b4f7793863b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
776
sce
13_2.sce
clc; // page no 444 // prob no 13_2 //Voice transmisssion occupies 30 kHz.Spread spectrum is used to increase BW to 10MHz B1=30*10^3;//BW is 30 kHz B2=10*10^6;//BW is 10 MHz T=300;//noise temp at i/p PN=-110;//signal has total signal power of -110 dBm at receiver k=1.38*10^-23;//Boltzmann's const in J/K //Determination of noise power at B1=30kHz PN1=10*(log10(k*B1*T/10^-3)); disp('dBm',PN1,'The noise power at BW=30 kHz is'); //Determination of noise power at B2=10MHz PN2=10*(log10(k*B2*T/10^-3)); disp('dBm',PN2,'The noise power at BW=10 MHz is'); //Determination of SNR for 30kHz BW SNR1=PN-PN1; disp('dB',SNR1,'The value of SNR for BW=30 kHz is'); //Determination of SNR for 10MHz BW SNR2=PN-PN2; disp('dB',SNR2,'The value of SNR for BW=10 MHz is');
5a050ec3af77f7deefd0965a2eb75314052563e8
7b040f1a7bbc570e36aab9b2ccf77a9e59d3e5c2
/Scilab/virtual/2dof_controller/dc/minv/scilab/pm_10.sce
a0a3659e5a86722b334c9cb9de441f1cd5a17409
[]
no_license
advait23/sbhs-manual
e2c380051117e3a36398bb5ad046781f7b379cb9
d65043acd98334c44a0f0dbf480473c4c4451834
refs/heads/master
2021-01-16T19:50:40.218314
2012-11-16T04:11:12
2012-11-16T04:11:12
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
162
sce
pm_10.sce
// Updated(18-7-07) // 11.3 C = [1 0.5]; dC = 1; j=2; A = [1 -0.6 -0.16]; dA = 2; zj = zeros(1,j+1); zj(j+1) = 1; [Fj,dFj,Ej,dEj] = xdync(zj,j,A,dA,C,dC)
60aaae30b4e3eb6b0d4bf0c3fc9d8f32506d8fde
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.2/macros/auto/obsv_mat.sci
4e531b43a7af04cf779214896114df83d23583aa
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
549
sci
obsv_mat.sci
function o=obsv_mat(a,c) [lhs,rhs]=argn(0) select type(a) case 1 then if rhs=1 then error('2 arguments : a,c'),end [m,n]=size(a) if m<>n then error(20,1),end [mb,nb]=size(c);if nb<>n then error(60),end //-compat next case retained for list/tlist compatibility case 15 then if a(1)<>'lss' then error(91,1),end [a,c]=a([2,4]) [n,n]=size(a) case 16 then if a(1)<>'lss' then error(91,1),end [a,c]=a([2,4]) [n,n]=size(a) else error('(a,c) pair or syslin list') end; o=c;for k=1:n-1, o=[c;o*a],end
4e0b49b951ec4ee31a60f7912629b0f82120394e
43772f2bf6438bafd09a75fa971439a099f9b50f
/MonaLisa.sce
bd99456cf2c4289a01e90657a2d1055e867caf06
[]
no_license
oriolorra/MonaLisaCountPixels
3b0f3052210e25691e20e1559b4b44c9d4425c25
9c7789847d25648b811009fea9f21e0bfb756eb8
refs/heads/master
2021-01-10T05:56:35.238580
2015-11-03T16:14:03
2015-11-03T16:14:03
45,261,300
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,238
sce
MonaLisa.sce
// Distance Vector dist = (0.75:0.25:15) //Num. elements dist. vector sz = length(dist) //Width Mona Lisa Painting width = 0.53 //Height Mona Lisa Painting height = 0.77 //Focus lenght f = 0.008 //Dimension of a pixel sp = 0.00000408 //Total pixels width & height sensor wp = 1288 hp = 728 //Loop for each distance for i = 1:sz //Calculate angles for each dist alphaW = 2*atan((width/2)/dist(i)) alphaH = 2*atan((height/2)/dist(i)) //Calculate dimensions in camera's sensor camW = (tan(alphaW/2))*2*f camH = (tan(alphaH/2))*2*f //Caculate number of pixels (must be int, it is discrete) pixelsW = int(camW/sp) //Compare pixelsW with total pixels width in sensor if pixelsW > wp then pixelsW = wp end pixelsH = int(camH/sp) //Compare pixelsW with total pixels width in sensor, //truncated if pixelsH is higher than hp if pixelsH > hp then pixelsH = hp end //Vector with all pixels values vecPixels(i) = pixelsW*pixelsH end disp(vecPixels) //Draw graph plot(dist,vecPixels','r') //Write axis-labels and title on the graph xlabel('Distance (m)','fontsize',4) ylabel ('Num. pixels','fontsize',4) title('Mona Lisa graph','fontsize',8,'color','green')
224dc9317baf8a977d660e4f6b791d502f896be0
449d555969bfd7befe906877abab098c6e63a0e8
/405/CH6/EX6.6/6_6.sce
449f4fe6f6bd54740326adff11dd7020d058940f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,625
sce
6_6.sce
clear; clc; printf("\t\t\tExample Number 6.6\n\n\n"); // turbulent heat transfer in a short tube // illustration6.6 // solution p = 101325;// [Pa] pressure of air Ta = 300;// [K] temperature of air d = 0.02;// [m] diameter of tube u = 40;// [m/s] velocity of air L = 0.1;// [m] length of tube dT = 5;// [degree celsius] rise in temperature // we first must evaluate the air properties at 300 K v = 15.69*10^(-6);// [square meter/s] kinematic viscosity k = 0.02624;// [W/m degree celsius] Cp = 1006;// [J/kg K] Pr = 0.70;// prandtl no. rho = 1.18;// [kg/cubic meter] Re_d = u*d/v;// reynolds number disp(Re_d,"reynolds number is "); disp("so the flow is turbulent"); // consulting figure (6-6) for this value of Re_d and L/d = 5 we find Nu_x_by_Nu_inf = 1.15; // or the heat transfer coefficient is about 15 percent higher that it would be for thermally developed flow. // we calculate heat-transfer for developed flow using Nu_d = 0.023*Re_d^(0.8)*Pr^(0.4); // and h = k*Nu_d/d;// [W/square meter degree celsius] // increasing this value by 15 percent h = 1.15*h;// [W/square meter degree celsius] // the mass flow is Ac = %pi*d^(2)/4;// [square meter] m_dot = rho*u*Ac;// [kg/s] // so the total heat transfer is A = %pi*d*L;// [square meter] q_by_A = m_dot*Cp*dT/A;// [W/square meter] printf("\n\n the constant heat flux that must be applied at the tube surface to result in an air temperature rise of 5 degree celsius is %f W/square meter",q_by_A); Tb_bar = (Ta+(Ta+dT))/2;// [K] Tw_bar = Tb_bar+q_by_A/h;// [K] printf("\n\n average wall temperature is %f K",Tw_bar);
364675e3d132d4329d47aa6beb6a38b7741a85f5
449d555969bfd7befe906877abab098c6e63a0e8
/530/CH4/EX4.2.b/example_4_2b.sce
99e444ab3906c0b5ae5b6fbec7b46f4069ffdb85
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
914
sce
example_4_2b.sce
clear; clc; // A Textbook on HEAT TRANSFER by S P SUKHATME // Chapter 4 // Principles of Fluid Flow // Example 4.2(b) // Page 180 printf("Example 4.2(b), Page 180 \n\n") L = 3 ; //[m] D = 0.01 ; //[m] V = 0.2 ; //[m/s] // (b) V1=0.7; v1 = 1.306 * 10^-6 ; // [m^2/s] printf("(b) If the velocity is increased to 0.7 \n"); // if velocity of water is 0.7 m/s V1=0.7; // [m/s] Re_D1=V1*D/(1.306*10^-6); printf("Reynolds no is %f \n",Re_D1); // flow is again turbulent f1 = 0.079*(Re_D1)^(-0.25); delta_p1 = (4*f1*L*999.7*0.7^2)/(0.01*2); // [Pa] printf("Pressure drop is %f Pa \n",delta_p1); // x1 = (T_w/p)^0.5 = ((f1/2)^0.5)*V ; x1 = ((f1/2)^0.5)*V1 ; y1_plus = 0.005*x1/(v1); printf("y+ at centre line = %f \n",y1_plus); V_max1 = x1*(2.5* log(y1_plus) + 5.5) ; // [m/s] printf("V_max is %f m/s \n",V_max1); ratio1 = V_max1/V1; printf("Vmax/Vbar = %f ",ratio1);
6b1d89b7dc03f6031bfc6654e819465e335b6fc7
449d555969bfd7befe906877abab098c6e63a0e8
/2969/CH13/EX13.5/Ex13_5.sce
e2aa8dad63c11c3c7f15d723f36c80266d0d1c39
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,388
sce
Ex13_5.sce
clc clear //DATA GIVEN r1=750/2000; //radius of larger pulley in m r2=300/2000; //radius of smaller pulley in m d=1.5; //distance between the centres of pulley in m Tms=14; //maximum safe tension in N/mm b=150; //width of the belt in mm v=540; //speed of the belt in m/min mu=0.25; //coefficient of friction T1=Tms*b; //maximum tension in the belt in N v=v/60; //speed of the belt converted into m/s //(i) for open belt ALPHAo=asin ((r1-r2)/d)*180/(%pi); //alpha in degrees THETAo=180-2*ALPHAo; //angle of lap or contact in deg T2o=T1/(%e^(mu*(THETAo*%pi/180))); //tension on the slack side in N Po=(T1-T2o)*v; //power transmitted by the belt in watts //(ii) for cross belt ALPHAc=asin ((r1+r2)/d)*180/(%pi); //alpha in degrees THETAc=180+2*ALPHAc; //angle of lap or contact in deg T2c=T1/(%e^(mu*(THETAc*%pi/180))); //tension on the slack side in N Pc=(T1-T2c)*v; //power transmitted by the belt in watts printf(' (i) The Maximum Power transmitted by the open belt is: %2.3f kW. \n',(Po/1000)); printf(' (ii) The Maximum Power transmitted by the cross belt is: %2.3f kW. \n',(Pc/1000));
1cd85db3580ebdc6545fd432b5ed2a6650f071dc
e5bea7afb93323d75e9314d0be7a05720badf57b
/projects/02/ALU-64cases.tst
28d38e91916fc048ad6688934228760a2eee7d09
[]
no_license
afsalptl/ecs
afdd8884aabd11298e15fe6cee561ac665da6f98
8af565807df4c1b75edf676ec0e74b97e7e02358
refs/heads/master
2021-01-09T20:49:45.178751
2016-07-18T19:35:33
2016-07-18T19:35:33
44,654,884
0
1
null
2015-10-21T07:51:08
2015-10-21T05:36:19
Assembly
UTF-8
Scilab
false
false
5,061
tst
ALU-64cases.tst
load ALU.hdl, output-file ALU-64cases.out, compare-to ALU-64cases.cmp, output-list x%B1.16.1 y%B1.16.1 zx%B1.1.1 nx%B1.1.1 zy%B1.1.1 ny%B1.1.1 f%B1.1.1 no%B1.1.1 out%B1.16.1 zr%B1.1.1 ng%B1.1.1 ; set x %B1100110011001100, set y %B1010101010101010; set zx 0, set nx 0, set zy 0, set ny 0, set f 0, set no 0, eval, output; set zx 0, set nx 0, set zy 0, set ny 0, set f 0, set no 1, eval, output; set zx 0, set nx 0, set zy 0, set ny 0, set f 1, set no 0, eval, output; set zx 0, set nx 0, set zy 0, set ny 0, set f 1, set no 1, eval, output; set zx 0, set nx 0, set zy 0, set ny 1, set f 0, set no 0, eval, output; set zx 0, set nx 0, set zy 0, set ny 1, set f 0, set no 1, eval, output; set zx 0, set nx 0, set zy 0, set ny 1, set f 1, set no 0, eval, output; set zx 0, set nx 0, set zy 0, set ny 1, set f 1, set no 1, eval, output; set zx 0, set nx 0, set zy 1, set ny 0, set f 0, set no 0, eval, output; set zx 0, set nx 0, set zy 1, set ny 0, set f 0, set no 1, eval, output; set zx 0, set nx 0, set zy 1, set ny 0, set f 1, set no 0, eval, output; set zx 0, set nx 0, set zy 1, set ny 0, set f 1, set no 1, eval, output; set zx 0, set nx 0, set zy 1, set ny 1, set f 0, set no 0, eval, output; set zx 0, set nx 0, set zy 1, set ny 1, set f 0, set no 1, eval, output; set zx 0, set nx 0, set zy 1, set ny 1, set f 1, set no 0, eval, output; set zx 0, set nx 0, set zy 1, set ny 1, set f 1, set no 1, eval, output; set zx 0, set nx 1, set zy 0, set ny 0, set f 0, set no 0, eval, output; set zx 0, set nx 1, set zy 0, set ny 0, set f 0, set no 1, eval, output; set zx 0, set nx 1, set zy 0, set ny 0, set f 1, set no 0, eval, output; set zx 0, set nx 1, set zy 0, set ny 0, set f 1, set no 1, eval, output; set zx 0, set nx 1, set zy 0, set ny 1, set f 0, set no 0, eval, output; set zx 0, set nx 1, set zy 0, set ny 1, set f 0, set no 1, eval, output; set zx 0, set nx 1, set zy 0, set ny 1, set f 1, set no 0, eval, output; set zx 0, set nx 1, set zy 0, set ny 1, set f 1, set no 1, eval, output; set zx 0, set nx 1, set zy 1, set ny 0, set f 0, set no 0, eval, output; set zx 0, set nx 1, set zy 1, set ny 0, set f 0, set no 1, eval, output; set zx 0, set nx 1, set zy 1, set ny 0, set f 1, set no 0, eval, output; set zx 0, set nx 1, set zy 1, set ny 0, set f 1, set no 1, eval, output; set zx 0, set nx 1, set zy 1, set ny 1, set f 0, set no 0, eval, output; set zx 0, set nx 1, set zy 1, set ny 1, set f 0, set no 1, eval, output; set zx 0, set nx 1, set zy 1, set ny 1, set f 1, set no 0, eval, output; set zx 0, set nx 1, set zy 1, set ny 1, set f 1, set no 1, eval, output; set zx 1, set nx 0, set zy 0, set ny 0, set f 0, set no 0, eval, output; set zx 1, set nx 0, set zy 0, set ny 0, set f 0, set no 1, eval, output; set zx 1, set nx 0, set zy 0, set ny 0, set f 1, set no 0, eval, output; set zx 1, set nx 0, set zy 0, set ny 0, set f 1, set no 1, eval, output; set zx 1, set nx 0, set zy 0, set ny 1, set f 0, set no 0, eval, output; set zx 1, set nx 0, set zy 0, set ny 1, set f 0, set no 1, eval, output; set zx 1, set nx 0, set zy 0, set ny 1, set f 1, set no 0, eval, output; set zx 1, set nx 0, set zy 0, set ny 1, set f 1, set no 1, eval, output; set zx 1, set nx 0, set zy 1, set ny 0, set f 0, set no 0, eval, output; set zx 1, set nx 0, set zy 1, set ny 0, set f 0, set no 1, eval, output; set zx 1, set nx 0, set zy 1, set ny 0, set f 1, set no 0, eval, output; set zx 1, set nx 0, set zy 1, set ny 0, set f 1, set no 1, eval, output; set zx 1, set nx 0, set zy 1, set ny 1, set f 0, set no 0, eval, output; set zx 1, set nx 0, set zy 1, set ny 1, set f 0, set no 1, eval, output; set zx 1, set nx 0, set zy 1, set ny 1, set f 1, set no 0, eval, output; set zx 1, set nx 0, set zy 1, set ny 1, set f 1, set no 1, eval, output; set zx 1, set nx 1, set zy 0, set ny 0, set f 0, set no 0, eval, output; set zx 1, set nx 1, set zy 0, set ny 0, set f 0, set no 1, eval, output; set zx 1, set nx 1, set zy 0, set ny 0, set f 1, set no 0, eval, output; set zx 1, set nx 1, set zy 0, set ny 0, set f 1, set no 1, eval, output; set zx 1, set nx 1, set zy 0, set ny 1, set f 0, set no 0, eval, output; set zx 1, set nx 1, set zy 0, set ny 1, set f 0, set no 1, eval, output; set zx 1, set nx 1, set zy 0, set ny 1, set f 1, set no 0, eval, output; set zx 1, set nx 1, set zy 0, set ny 1, set f 1, set no 1, eval, output; set zx 1, set nx 1, set zy 1, set ny 0, set f 0, set no 0, eval, output; set zx 1, set nx 1, set zy 1, set ny 0, set f 0, set no 1, eval, output; set zx 1, set nx 1, set zy 1, set ny 0, set f 1, set no 0, eval, output; set zx 1, set nx 1, set zy 1, set ny 0, set f 1, set no 1, eval, output; set zx 1, set nx 1, set zy 1, set ny 1, set f 0, set no 0, eval, output; set zx 1, set nx 1, set zy 1, set ny 1, set f 0, set no 1, eval, output; set zx 1, set nx 1, set zy 1, set ny 1, set f 1, set no 0, eval, output; set zx 1, set nx 1, set zy 1, set ny 1, set f 1, set no 1, eval, output;
1172600dd1ee8d9749fbc5195d60c049ec98a726
449d555969bfd7befe906877abab098c6e63a0e8
/2384/CH2/EX2.24/ex2_24.sce
f8c065bd253ce0b5ffb85ed99cf92db090e6ca60
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
310
sce
ex2_24.sce
// Exa 2.24 clc; clear; close; format('v',5) // Given data R1 = 3;// in ohm R2 = 2;// in ohm R3 = 1;// in ohm R4 = 8;// in ohm R5 = 2;// in ohm V = 10;// in V R = ((R1+R2)*R5)/((R1+R2)+R5);// in ohm Rth = R + R3;// in ohm R_L = Rth;// in ohm disp(R_L,"The value of load resistance in ohm is");
35840a913b3219b05ca137dc90966ab60ea75bb2
449d555969bfd7befe906877abab098c6e63a0e8
/2234/CH6/EX6.14/ex6_14.sce
fe0448f6cf699e944beab23e22670401e472fa6f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
346
sce
ex6_14.sce
clc; disp("The filter must attenuate the signal by a factor of 10."); //displaying result f=300*10^6; //frequency in Hz disp(" If R = 100 Ohm ,then the reactance of the capacitor should be about 10 Ohm."); //displaying result c=1/(2*(%pi)*f*10); //calculating capacitance disp(c,"At 300 MHz, this is in Farad = "); //displaying result
7d0bffec44d4e7b7c0bde44efc061e24ba0dd29f
449d555969bfd7befe906877abab098c6e63a0e8
/3411/CH5/EX5.14.u1/Ex5_14_u1.sce
5c247d9c76929092520aed63d473e8d01d31bde6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
543
sce
Ex5_14_u1.sce
//Example 5_14_u1 clc(); clear; //To calculate the effective temprature of neutrons a=0.352 //units in nm h=1 k=1 l=1 d=a/sqrt(h^2+k^2+l^2) //units in nm theta=28.5 //units in degrees lamda=2*d*sin(theta*(%pi/180)) //units in nm h=6.63*10^-34 //units in m^2 kg s^-1 m=1.67*10^-27 //units in Kgs KB=1.38*10^-23 //units in m^2 kg s^-2 K^-1 lamda=lamda*10^-9 //units in meters T=h^2/(3*m*KB*lamda^2) //units in K printf("The effective temprature of neutrons is T=%dK",T)
27ba9c81d089a07b80bdbba7debb97013929fa78
449d555969bfd7befe906877abab098c6e63a0e8
/1760/CH2/EX2.94/EX2_94.sce
7ea71a652dccd26381f09329421614f0bcf7cfff
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
283
sce
EX2_94.sce
//EXAMPLE 2.94 PG NO-139-140 L=0.6; //LENGTH a=20*10^-4; //AREA MU=(4*%pi*10^-7); R=L/(MU*a); N1=1500; N2=500; i=250; M=(N1*N2)/R; e=M*(i); disp('R = '+string(R)+' '); disp('mutual induction is = '+string(M)+' H'); disp('E.M.F INDUCE is = '+string(e)+' V');