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
35868d6bf450f9c5124c3715552b48fc3aab876e
449d555969bfd7befe906877abab098c6e63a0e8
/1026/CH11/EX11.8/Example11_8.sce
83b59c534e9acedb191aae1020c5b0928034d869
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
363
sce
Example11_8.sce
//chapter11,Example11_8,pg 302 h=6.634*10^-34 c=3*10^8 e=1.6*10^-19 m=9.1*10^-31 Ep=100*10^3*e//energy of photon lamp=((h*c)/Ep)//wavelength of photon lame=lamp//wavelength of electron v=h/(m*lame) KEe=0.5*m*(v^2)//kinetic energy of electron KEe=KEe/(1.6*10^-19) printf("kinetic energy of electron\n") printf("KEe=%.2f ev",KEe)
507cd94b7e491ba15adbb5740b9959bb6ba409e9
449d555969bfd7befe906877abab098c6e63a0e8
/462/CH2/EX2.15/ex_2_15.sce
833808f03449360330949985194edc636e0e77ee
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
401
sce
ex_2_15.sce
//example 2.15// //subtraction of two binary number// clc //clears the screen// clear //clears the existing variables// x=bin2dec('1011') //x is the minuend// //binary to decimal conversion// y=bin2dec('0110') //y is the subtrahend// z=x-y //subtraction// disp('the subtraction of given numbers is:') ans=dec2bin(z) //decimal to binary conversion// disp(ans) //answer in binary form//
d228757d3971641618d014145d96d9b83f654e37
08bfc8a1f8e44adc624d1f1c6250a3d9635f99de
/SDKs/swig/Examples/test-suite/scilab/throw_exception_runme.sci
c5d521102a3528bd7317195c7dadccb4aef6326d
[]
no_license
Personwithhat/CE_SDKs
cd998a2181fcbc9e3de8c58c7cc7b2156ca21d02
7afbd2f7767c9c5e95912a1af42b37c24d57f0d4
refs/heads/master
2020-04-09T22:14:56.917176
2019-07-04T00:19:11
2019-07-04T00:19:11
160,623,495
0
0
null
null
null
null
UTF-8
Scilab
false
false
128
sci
throw_exception_runme.sci
version https://git-lfs.github.com/spec/v1 oid sha256:339628f38812801111cdcf77b8374d6db452ed9b63e7c5f334a07b2765af3083 size 689
3b7468bb26093b5c4014b6cae6bcfd9cafd61b74
449d555969bfd7befe906877abab098c6e63a0e8
/3812/CH5/EX5.26/5_26.sce
8948a6cabf53e8110a329e95ca68cec226b06976
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
384
sce
5_26.sce
//Example 5_26 //find and sketch Fourier Transform of Periodic Impulse Train clear; clc; T=-4:4;; T1=1; xt=ones(1,length(T)); ak=1/T1; XW=2*%pi*ak*ones(1,length(T)); Wo=2*%pi/T1; W=Wo*T; figure subplot(2,1,1) plot2d3('gnn',T,xt); xlabel('t'); title('Periodic Impulse Train') subplot(2,1,2) plot2d3('gnn',W,XW); xlabel('t'); title('CTFT of Periodic Impulse Train')
d787d62d1199ddd9e348160243b1ba03dea6e50b
449d555969bfd7befe906877abab098c6e63a0e8
/296/CH5/EX5.6/eg5_6.sce
19db12109341e6c186775258976602a4f1fa03dd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
332
sce
eg5_6.sce
A = 10^-4; kT = 0.0259; ni = 1.5*10^10; q = 1.6*10^-19; Na = 10^17; Nd = 10^15; epsilon0 = 8.85*10^-14; epsilon = 11.8; E1 = kT*log(Na/ni); E2 = kT*log(Nd/ni); V0 = E1+E2; V = -4; Cj = sqrt(epsilon*epsilon0)*A*sqrt(q*Nd*Na/(2*(V0-V)*(Na+Nd))); disp(V0,"V0 (in volt)=") disp(Cj,"total depletion constant (in farad)=")
06abd3e79f1f6b558e802306b5f216a814f84f3e
01ecab2f6eeeff384acae2c4861aa9ad1b3f6861
/xcos_blocks/common_drain_c.sci
6baac8ad53952826eb725a166503cf667340f62e
[]
no_license
jhasler/rasp30
9a7c2431d56c879a18b50c2d43e487d413ceccb0
3612de44eaa10babd7298d2e0a7cddf4a4b761f6
refs/heads/master
2023-05-25T08:21:31.003675
2023-05-11T16:19:59
2023-05-11T16:19:59
62,917,238
3
3
null
null
null
null
UTF-8
Scilab
false
false
332
sci
common_drain_c.sci
global Ut_sim Kappa_sim; function block=common_drain_c(block,flag) if flag ==1 in_out_num = block.ipar(1); row_vec_io = 1:in_out_num; // Row vector for input & output Vdc1=1.5; Vdc2=1.5; block.outptr(1)(row_vec_io)=Kappa_sim*(block.inptr(1)(row_vec_io)-Vdc1)+Vdc2; end endfunction
1d0d0dc6bdc1bf4adec6f0a29f7160bd693118af
449d555969bfd7befe906877abab098c6e63a0e8
/1787/CH6/EX6.4/Exa6_4.sce
292924cf03a2c62d4f4c48db2530f47665af83ef
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
245
sce
Exa6_4.sce
//Exa 6.4 clc; clear; close; //given data IB=10;//in uA IB=IB*10^-3;//in mA Beta=99;//Unitless ICO=1;//in uA ICO=ICO*10^-3;//in mA //Formula : IC=alfa*(IB+IC)+ICO IC=Beta*IB+(1+Beta)*ICO;//in mA disp(IC,"Collector current in mA : ");
e505148a4fd9db84bdc68a7b58de326de867d3f4
449d555969bfd7befe906877abab098c6e63a0e8
/1670/CH10/EX10.25/10_25.sce
8ba900a19dbc057fcf40b625cd95e7fd747f0e79
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
728
sce
10_25.sce
//Example 10.25 //Milne Simpsons formula //Page no. 340 clc;clear;close; h=0.1; deff('y=f(x,y)','y=x*y+y^2') y(1)=1; for i=1:5 x(i)=(i-1)*h end for i=1:3 K(1)=h*f(x(i),y(i)); K(2)=h*f(x(i)+h/2,y(i)+K(1)/2); K(3)=h*f(x(i)+h/2,y(i)+K(2)/2); K(4)=h*f(x(i)+h,y(i)+K(3)); y(i+1)=y(i)+(K(1)+2*K(2)+2*K(3)+K(4))/6 for j=1:4 printf('\n K%i = %.4g\n',j,K(j)) end printf('\ny(%g) = %.4f\n\n',x(i)+h,y(i+1)) end i=5; y(i)=y(i-4)+4*h*(2*f(x(i-1),y(i-1))-f(x(i-2),y(i-2))+2*f(x(i-3),y(i-3)))/3 printf('\nPredictor y(%g) = %.4f\n\n',x(i),y(i)) y(i)=y(i-2)+h*(f(x(i-2),y(i-2))+4*f(x(i-1),y(i-1))+f(x(i),y(i)))/3 printf('Corrector y(%g) = %.4f\n\n',x(i),y(i))
55702d9e6b64bd195dcea2d4d228193057a84922
449d555969bfd7befe906877abab098c6e63a0e8
/2627/CH11/EX2.12/Ex_B_2_12.sce
f37037005d72c8cb91a906cc2c989498dcef7e2f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
181
sce
Ex_B_2_12.sce
//Part B Ex 2.12 clc;clear;close; format('v',5); binary='11010';//given binary value decimal=bin2dec(binary);//equivalent decimal disp(decimal,"Equivalent decimal value is");
1988c915eb3ff92c34882d8e6bf294053ec5728e
dabaa151dd30205dd92a6844c0cd61cf046fb8fe
/FPMUL/FPMUL16.tst
29ad1381d664d032d2d75f0c5d1e514480db71b4
[]
no_license
hakesh729/Project_hack
627ef8260f81dbc971bb5371839523daac4a2646
a1ea76fa612bbe4515863495922167bb4c65c418
refs/heads/main
2023-01-13T13:37:09.828021
2020-11-27T06:05:39
2020-11-27T06:05:39
316,411,714
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,311
tst
FPMUL16.tst
/* * @Sathvik Team11 * * Test file for FP16 * * Testcases for * * Two pairs of numbers of the same sign * * Two pairs of numbers of the opposite sign * * One pair of numbers for which the product of mantissas, Pm, is greater than 2.0 * * One pair of numbers for which the product of mantissas, Pm, is between 1.0 and 2.0 */ load FPMUL16.hdl, output-file FPMUL16.out, output-list X%B1.16.1 Y%B1.16.1 Z%B1.16.1; //-1.75 * 2^85 * -1.25 * 2^-19 = 2.1875 * 2^66 ( 0 11000010 0001100 ) set X %B1110101001100000, set Y %B1011011000100000, eval, output; //1.2890625 * 2^38 * 1.6640625 * 2^-43 = 2.140625 * 2^-5 (0 01111011 0001001) set X %B0101001010100101, set Y %B0010101001010101, eval, output; //-1.625 * 2^80 * 1.5 * 2^10 = -2.4375 * 2^90 (1 11011010 0011100) set X %B1110011111010000, set Y %B0100010011000000, eval, output; //1.75 * 2^81 * -1.5625 * 2^20 = -2.734375 * 2^101 (1 11100101 0101111) set X %B0110100001100000, set Y %B1100100111001000, eval, output; //1.1328125 * 2^-63 * 1.1015625 * 2^50 = 1.2421875 * 2^-13 (0 01110010 0011111) set X %B0010000000010001, set Y %B0101100010001101, eval, output; //1.875 * 2^-63 * 1.96875 * 2^50 = 3.6875 * 2^-13 (0 01110011 1101100) set X %B0010000001110000, set Y %B0101100011111100, eval, output;
9ec3a169ec725a57bff286dfc037f1272cfb9796
449d555969bfd7befe906877abab098c6e63a0e8
/2594/CH4/EX4.3/Ex4_3.sce
6e711a723886fc2ee3bc97185b091d356f7fd86a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
504
sce
Ex4_3.sce
clc n=10^15 disp("n = "+string(n)+"cm^-3") //initializing value of concentration of electrons/cm^3. no=10^10 disp("no = "+string(no)+"cm^-3") //initializing value of intrinsic concentration of electron. t=10^-6 disp("t = "+string(t)+"s") //initializing value of carrier lifetime. c=1*10^14 disp("Excess electron concentration = "+string(c)+"cm^-3") //initializing value of excess electrons concentration. R=(c/t) disp("electron hole recombination,R=(c/t))="+string(R)+" /cm^3s")//calculation
658b45b0b9c3f85df5e6a1eeeed0b100e4f66bd7
449d555969bfd7befe906877abab098c6e63a0e8
/2453/CH8/EX8.7/8_7.sce
6740a83706fbc7c211b6cda7fff3f342e7bf9b50
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
696
sce
8_7.sce
//To calculate the intrinsic carrier density and conductivity m = 9.109*10^-31; //mass of electron, kg k = 1.38*10^-23; //boltzmann constant pi = 22/7; //value of pi h = 6.626*10^-34; //planck's constant T = 300; //temperature, K e = 1.6*10^-19; Eg = 0.7; //energy gap, eV ni = 2*(2*pi*m*k*T/h^2)^(3/2)*exp(-Eg*e/(2*k*T)); //intrinsic carrier density per m^3 printf("intrinsic carrier density per m^3 is"); disp(ni); mew_e = 0.4; //electron mobility, m^2/Vs mew_h = 0.2; //hole mobility, m^2/Vs sigma = ni*e*(mew_e+mew_h); //conductivity, ohm-1 m-1 printf("conductivity is %5.2f ohm-1 m-1",sigma); //answer given in the book is wrong
ca9c13f6a982587ef0989ecb53c9b50400b47824
b5a6d0e4c3d84d1a446434b60e55627f017991d7
/GAUSS- SEIDEL y JACOBI.sce
7bcb67cd80251301486636c25c7c3efccee86d13
[]
no_license
mayra-diaz/Scilab-Funciones-Matrices
249cdec506befa4e5e88da9aaf8f6752e401153f
dc89d7dccc7fd22851e6a31867f986cb543b4c50
refs/heads/master
2022-12-10T12:50:48.449166
2020-09-14T01:10:43
2020-09-14T01:10:43
259,477,803
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,249
sce
GAUSS- SEIDEL y JACOBI.sce
//FUNCIÓN GAUSS CON N ITERACIONES function x= GAUSSN(A,b,N) D=diag(diag(A)) L=-tril(A,-1) U=-triu(A,1) Tgs=inv(D-L)*U Cgs=inv(D-L)*b [m,n] = size(A) X=ones(n,1) cont=0 while N>cont aux=Tgs*X+Cgs X=aux cont=cont+1 end x=X endfunction A=[10 0 -1;4 12 -4; 4 4 10] b=[-1 8 4]' n=2 x= GAUSSN(A,b,n) disp(x) disp(A*x) //FUNCIÓN GAUSS CON Tolerancia function x= GAUSSTol(A,b,Tol) D=diag(diag(A)) L=-tril(A,-1) U=-triu(A,1) Tgs=inv(D-L)*U Cgs=inv(D-L)*b [m,n] = size(A) X=ones(n,1) tol=10 while tol>Tol aux=Tgs*X+Cgs tol=abs(max(X-aux)) X=aux end x=X endfunction Tol=0.000000000001 x= GAUSSTol(A,b,Tol) disp(x) disp(A*x) //FUNCIÓN JACOBI CON N ITERACIONES function x= JACOBIN(A,b,N) D=diag(diag(A)) L=-tril(A,-1) U=-triu(A,1) Tgs=inv(D)*(L+U) Cgs=inv(D)*b [m,n] = size(A) X=ones(n,1) cont=0 while N>cont aux=Tgs*X+Cgs X=aux cont=cont+1 end x=X endfunction A=[2 1;2 3] b=[2 7]' n=2 x= JACOBIN(A,b,n) disp(x) disp(A*x) //FUNCIÓN JACOBI CON Tolerancia function x=JACOBITol(A,b,Tol) D=diag(diag(A)) L=-tril(A,-1) U=-triu(A,1) Tgs=inv(D)*(U+L) Cgs=inv(D)*b [m,n] = size(A) X=ones(n,1) tol=10 while tol>Tol aux=Tgs*X+Cgs tol=abs(max(X-aux)) X=aux end x=X endfunction Tol=0.000000000001 x= JACOBITol(A,b,Tol) disp(x) disp(A*x) //CONVERGENTE O NO //op=1; Diagonal estrictamente dominante //op=2; No es Diagonal function op=verdiag(A) [m,n]=size(A) op=1 for k=1:n if abs(A(k,k))<-sum(abs(A(k,:)))-abs(A(k,k)) op=0 break end end endfunction op=verdiag(A) disp(op,"Diag=") //Radio espectral Jacobi (debe ser menor a 1) D=diag(diag(A)) L=D-tril(A) U=D-triu(A) T=inv(D)*(U+L) a=abs(spec(T)) disp(max(a),"Radio espectral matriz J T=") //Radio espectral Gauss (debe ser menor a 1) D=diag(diag(A)) L=-tril(A,-1) U=-triu(A,1) Tgs=inv(D-L)*U a=abs(spec(Tgs)) disp(max(a),"Radio espectral matriz G T=")
01518211d1e84eb5f6fa54e9ebc9fac3f375061e
449d555969bfd7befe906877abab098c6e63a0e8
/1133/CH8/EX8.25/Example8_25.sce
54a7e9603c52121e347d3b833c608f2ba2db3206
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
248
sce
Example8_25.sce
//Example 8.25. clc disp("IC 7490 is a decade counter. Whentwo such ICs are cascaded, it becomes a divide-by-100 counter. To get a divide-by-93 counter, the counter is reset as soon as ot becomes 1001 0011. The diagram is as shown in fig.8.53")
75d94812586e52c4c4cfd89f9ec5d7562a8924eb
449d555969bfd7befe906877abab098c6e63a0e8
/3673/CH2/EX2.12/Ex2_12.sce
ddf9e86a8c5691278063382a0c0323035ffd2383
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
843
sce
Ex2_12.sce
//Example 2_12 page no:76 clc //applying kirchoff's law to the given circuit R1=10//resistance in ohm R2=3//resistance in ohm R3=5//resistance in ohm R4=1//resistance in ohm V=10//source voltage resistance=[(1/10+1/3),-1/3;-1/3,(1/3+1/5+1)] current=[5,10] volt=inv(resistance)'*current'//calculating V1 V2 disp(volt(1),"voltage across node 1 is (in V)") disp(volt(2),"voltage across node 2 is (in V)") I1=volt(1,1)/R1; disp(I1,"current in branch I10 (in ampere)") I2=(volt(1,1)-volt(2,1))/R2; disp(I2,"current in branch I3 (in ampere)") I3=volt(2,1)/R3 disp(I3,"current in branch I5 (in ampere)") I4=(volt(2,1)-V)/R4 disp(I4,"current in branch I1 (in ampere)") //in textbook node voltages are rounded off so that current in each branches are more approximated in text book so current values varies slightly with textbook
7034aaf25b28defdec9d83056661bd4b791c89bd
449d555969bfd7befe906877abab098c6e63a0e8
/3814/CH2/EX2.2/Ex2_2.sce
0f8e0d979785e1ccf05ac0a931e8c5f8c9830ee5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
616
sce
Ex2_2.sce
// to determine pressure at point 2 clc p1=4.4 // bar d1=15e-2 //cm z1=3.2 // m z2=1.2// m d2=22.5e-2// cm Q=0.05 // VOLUME FLOW RATE AT m3/s a1=(%pi/4)*d1^2 // area at d1 a2=(%pi/4)*d2^2 // area at d2 mprintf('a1 = %e m2',a1) mprintf('\n a2= %e m2',a2) V1=Q/a1 // volume at different area V2=Q/a2 // volume at different area a2 mprintf(' \n V1 = %e m/s',V1) mprintf('\n V2 = %e m/s',V2 ) // specific weight ofx benzene =8.82x 103 kg/m3 g1=9.8 gamma1=8.82e3 // specific weight of benzene P2=((p1*10^5)/(g1))+((V1^2)/(2*g1))+z1-((V2^2)/(2*g1))-z2 p21=P2*gamma1 mprintf('\n P2= %f Pa',p21)
df5a7eee3780e1954c1e31d655d54c44389644d3
449d555969bfd7befe906877abab098c6e63a0e8
/845/CH5/EX5.5/Ex5_5.sce
0c5c5eccd07bcbaac63ccf442e839f7436bec232
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex5_5.sce
//Example 5.5 clc clear x = 1:6; y = [2.6 5.4 8.7 12.1 16 20.2]; X = x; Y = y ./x; n = length(Y); M1 = [sum(Y); sum(X.*Y)]; M2 = [n sum(X); sum(X) sum(X.^2)]; A = M2\M1; a = A(1); b = A(2); disp(round(a*10^5)/10^5, "a =") disp(round(b*10^5)/10^5, "b =")
3c11f022de1f7065d6043c8a0f69b2ce964564e0
449d555969bfd7befe906877abab098c6e63a0e8
/2858/CH11/EX11.1/Ex11_1.sce
12fb9daf77a215b0c2c38d5d0137c0c86d9f727d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
507
sce
Ex11_1.sce
//example 11.1 clc; funcprot(0); //parta phi=30; pa=2000; q=100*50/1000; Nq=55; Ap=16*16/16/12; Qp=Ap*q*Nq; qp=0.4*pa*Nq*tan(phi*%pi/180)*Ap; disp(qp,"ultimate load in lb"); disp(qp/1000,"ultimate load in kip"); disp("there is change in answer because of calculation mistake in the book"); //partb Nsigma=36; Ap=16*16/12/12; q=110*50/1000; Qp=Ap*q*Nsigma*((1+2*(1-sin(phi*%pi/180)))/3); disp(Qp,"ultimate load in kip"); //partc Nq=18.4; Qp=Ap*q*Nq; disp(Qp,"ultimate load in kip");
ed3f7d248336a09c4486c1046eaed799bf7a5396
e0124ace5e8cdd9581e74c4e29f58b56f7f97611
/3913/CH12/EX12.26/Ex12_26.sce
102e4dcbf586c96f51a3ae1f978674dcc5e2bb58
[]
no_license
psinalkar1988/Scilab-TBC-Uploads-1
159b750ddf97aad1119598b124c8ea6508966e40
ae4c2ff8cbc3acc5033a9904425bc362472e09a3
refs/heads/master
2021-09-25T22:44:08.781062
2018-10-26T06:57:45
2018-10-26T06:57:45
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
184
sce
Ex12_26.sce
//Chapter 12 : Solutions to the Exercises //Scilab 6.0.1 //Windows 10 clear; clc; //Solution for 7.2 //(a) A=[2 -1 0;0 -2 -1] disp(A) //(b) B=[0 2 -1;1 -1 0] disp(B)
ff6291a0ea9e93b77587d2e3beb449465498ca01
449d555969bfd7befe906877abab098c6e63a0e8
/2837/CH13/EX13.11/Ex13_11.sce
e108f49b9b8e376a508d7aa6836d013eaf38a4cc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
242
sce
Ex13_11.sce
clc clear //Initialization of variables c=0.74 ref=0.02 co2=0.12 co=0.1/100 M=12 //calcualtions carbon=c-ref car2=co2+co wt=car2*M amount=carbon/wt //results printf("Moles of dry products per pound of coal = %.3f mole",amount)
a9c6879776557917d9ee7dcd8346225f9d8987cc
449d555969bfd7befe906877abab098c6e63a0e8
/287/CH13/EX13.1/Exa13_1.sci
1e333504151dccdfb9c5ff8654c53704de239cd6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
409
sci
Exa13_1.sci
//Determine level-crossing rate, avg. duration of fade for a cellular system and a vehicle speed. f = 900e+6; c = 3e+8; v = 6.67; rho = 0.3162; lambda = c/f; fm = v/lambda; n0 = sqrt(2*%pi)*fm; Tr = (1.105-1)/(n0*rho); Tr1 = (1/(3*v)) * (rho/sqrt(2*%pi)); disp(n0, 'Level-crossing rate') disp(Tr, 'Avg. duration of fade (in s)') disp(Tr1, 'Avg. duration of fade, using appx. exp. (in s)')
8f257d5384307e1867c8b6b85318eca33afcc7ba
449d555969bfd7befe906877abab098c6e63a0e8
/2021/CH21/EX21.2/EX21_2.sce
48e64dd48f5eda777a0785eecdd5d5035a34893f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
336
sce
EX21_2.sce
//Finding of Force,Power,strokes //Given d1=0.3; d2=0.15; W=600; d=1.2; s=0.25; //To Find A1=(%pi/4)*d1^2; A2=(%pi/4)*d2^2; F=(A1/A2)*W; W1=W*(d/1200); P=W1/1000; S=(A1/A2)*(d/s); disp("Force ="+string(F)+" Newtons"); disp("Power required ="+string(P)+" Kilo Watts"); disp("Number of strokes ="+string(S)+" No units");
c93f94d7197e434a3c95e5647ad92fffd7db1541
449d555969bfd7befe906877abab098c6e63a0e8
/3840/CH7/EX7.10/Ex7_10.sce
caa949d428e57f4d2ea37024665efbf9eaae8d5d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
204
sce
Ex7_10.sce
clear // // // //Variable declaration B0=6.5*10**-4 //magnetic field(Tesla) B=1.4 //magnetic field(Tesla) //Calculation mewr=B/B0 //relative permeability of iron //Result
ef5e1cd1f33c06f764741a5c7025702a5a85cc9e
449d555969bfd7befe906877abab098c6e63a0e8
/1670/CH7/EX7.7/7_7.sce
5da90a4fc8e7e0e2c236783c4cfcbb480d5209dc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,364
sce
7_7.sce
//Example 7.7 //Stirlings Central Difference Derivatives //Page no. 240 clc;close;clear; printf(' x\t\t y\t\t d\t\t d2\t\t d3\t\t d4\n') printf('------------------------------------------------------------------------------------------') h=0.2;s=1; a=poly(0,'a'); b=poly(0,'b'); deff('y=f3(x)','y=z(x,1)*y2(x)+(z(x,1)-b)*z(x,2)') deff('y=f4(x)','y=y1(x)*a') deff('y=f1(x)','y=(z(x+1,2)-z(x-1,2)-(z(x,4)-z(x-2,4))/factorial(3)+4*(z(x-1,6)-z(x-3,6))/factorial(5))/(2*h)') deff('y=f2(x)','y=(z(x-1,4)-2*(z(x-2,6))/factorial(4))/h^2') z=[0.8,1.73036;1,1.95532;1.2,2.19756;1.4,2.45693;1.6,2.73309;1.8,3.02549;2,3.33334;2.2,3.65563]; x0=0.8; for i=3:6 for j=1:10-i z(j,i)=z(j+1,i-1)-z(j,i-1) end end printf('\n') for i=1:8 for j=1:6 if z(i,j)==0 then printf(' \t') elseif j==1 printf(' %.1f\t\t',z(i,j)) else printf('%.6f\t',z(i,j)) end end printf('\n') end y1(4)=f1(4); y2(4)=f2(4); y1(5)=f1(5); y2(5)=f2(5); g=f3(4) printf('\n\ny`(1.4) = %g\n\ny``(1.4) = %g\n\ny`(1.6) = %g\n\ny``(1.6) = %g\n\n',y1(4),y2(4),y1(5),y2(5)) disp(f3(4),f4(4)) printf('\n\n') A=[y1(4),z(4,2);y1(5),z(5,2)]; B=[z(4,1)*(y2(4)+z(4,2));z(5,1)*(y2(5)+z(5,2))]; disp(f3(5),f4(5)) C=inv(A)*B; printf('\n\n a = %g\n\n b = %g',C(1),C(2))
8481eb57e16ec5a61a141dc342aae6cbbd4d7431
449d555969bfd7befe906877abab098c6e63a0e8
/1895/CH7/EX7.2/EXAMPLE7_2.SCE
18cb77b310026cb2585da781fe35f61265a64d9d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
869
sce
EXAMPLE7_2.SCE
//ANALOG AND DIGITAL COMMUNICATION //BY Dr.SANJAY SHARMA //CHAPTER 7 //SAMPLING THEORY AND PULSE MODULATION clear all; clc; printf("EXAMPLE 7.12(PAGENO 325)"); //given //x(t) = (1/()2*%pi))*cos(4000*%pi*t)*cos(1000*%pi*t) //exapnding disp("x(t) = (1/(2*%pi)*cos(4000*%pi*t)*cos(1000*%pi*t)"); disp("x(t) = (1/(4*%pi)*2*cos(4000*%pi*t)*cos(1000*%pi*t)"); disp("x(t) = (1/(4*%pi))*[cos(4000*%pi*t + 1000*pi*t)*cos(4000*%pi*t - 1000*%pi*t)]") disp("x(t) = (1/(4*%pi))*[cos(5000*%pi*t + cos(3000*%pi*t))]") //by comparing above equation with x(t) = (1/(4*%pi))*[cos(w_1*t) + cos(w_2*t)] w_1 = 5000*%pi w_2 = 3000*%pi //calculations f_1 = w_1/(2*%pi); f_2 = w_2 /(2*%pi); f_m = f_1 f_s = 2*f_m//Nyquist rate T_s = 1/f_s//Nyquist interval //results printf("\n\nNyquist rate = %.2f Hz",f_s); printf("\n\nNyquist interval = %.5f seconds",T_s);
da22f85b2356361a5c46072fc2db2a9aff688d12
449d555969bfd7befe906877abab098c6e63a0e8
/929/CH1/EX1.3/Example1_3.sce
41066e975ebaffc425a5609b84681fedc2027ff5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
252
sce
Example1_3.sce
//Example 1.3 clear; clc; R1=10*10^3; R2=100*10^3; Ri=R1;//Input Resistance Ro=0;//Output Resistance A=-(R2/R1);// Ideal Overall Gain printf("Ri=%.2f kohms",(Ri/1000)); printf("\nRo=%.f ohms",Ro); printf("\nA=%.2f V/V",A);
826d25937ca2d095f257965fdad338e1f8aa0f02
449d555969bfd7befe906877abab098c6e63a0e8
/213/CH16/EX16.13/16_13.sce
6e4450e47a3ff3321532c1e6af4b48c149e1fba4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,721
sce
16_13.sce
//To find power, fluctuation and torque clc //Given: I=1000 //kg-m^2 N=300 //rpm //Solution: //Refer Fig. 16.15 and Fig. 16.16 //Calculating the angular speed of the crank omega=2*%pi*N/60 //rad/s //Power of the engine: //Calculating the work done per revolution WD=integrate('5000+1500*sin(3*theta)','theta',0,2*%pi) //Work done per cycle, N-m //Calculating the mean resisting torque Tmean=WD/(2*%pi) //N-m //Calculating the power of the engine P=Tmean*omega/1000 //kW //Maximum fluctuation of the speed of the flywheel when resisting torque is constant: //Calculating the value of theta sind3theta=(5000-5000)/1500 theta=1/3*(asind(sind3theta)+180) //degrees //Calculating the maximum fluctuation of energy deltaE=integrate('5000+1500*sin(3*theta)-5000','theta',0,60*%pi/180) //N-m //Calculating the maximum fluctuation of speed of the flywheel CS1=deltaE/(I*omega^2)*100 //% //Maximum fluctuation of speed of the flywheel when resisting torque (5000+600*sin(theta)) N-m: //Calculating the values of theta, thetaB and thetaC thetaB=asind(sqrt((1/4*(3-600/1500)))) //degrees thetaC=180-thetaB //degrees //Calculating the maximum fluctuation of energy deltaE=round(integrate('(5000+1500*sin(3*theta))-(5000+600*sin(theta))','theta',thetaB*%pi/180,thetaC*%pi/180)) //N-m //Calculating the maximum fluctuation of speed of the flywheel CS2=abs(deltaE)/(I*omega^2)*100 //% //Results: printf("\n\n Power of the engine, P = %.1f kW.\n\n",P) printf(" Maximum fluctuation of the speed of the flywheel when resisting torque is constant, CS = %.1f %c.\n\n",CS1,"%") printf(" Maximum fluctuation of speed of the flywheel when resisting torque (5000+600*sin(theta)) N-m, CS = %.3f %c.\n\n",CS2,"%")
3fddf7a9c979ff728e9d1bbbaa2ca062a616a8c4
449d555969bfd7befe906877abab098c6e63a0e8
/32/CH8/EX8.04/8_04.sce
e12088ca4a1e6862dcd73631e56f959fd52cbc1f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,147
sce
8_04.sce
//pathname=get_absolute_file_path('8.04.sce') //filename=pathname+filesep()+'8.04-data.sci' //exec(filename) //Pressure of the steam entering(in MPa): p1=20 //Temperature(in K): T1=500+273 //Dryness fraction of the steam leaving: x=0.90 //Condensor pressure(in MPa): p6=0.005 //From steam tables: h2=3238.2 //kJ/kg s2=6.1401 //kJ/kg.K s3=s2 hf=137.82 //kJ/kg hfg=2423.7 //kJ/kg.K sf=0.4764 //kJ/kg.K sfg=7.9187 //kJ/kg.K h6=137.82 //kJ/kg h4=3474.1 //kJ/kg sf1=2.2842 //kJ/kg.K sfg1=4.1850 //kJ/kg.K hf1=830.3 //kJ/kg hfg1=1959.7 //kJ/kg v6=0.001005 //m^3/kg //Enthalpy at state 5(in kJ/kg): h5=hf+x*hfg s5=sf+x*sfg //By interpolation, pressure at state 4(in bar): p4=1.4 //Dryness fraction at state 3: x3=(s3-sf1)/sfg1 //Enthalpy at state 3(in kJ/kg): h3=hf1+x3*hfg1 //Enthalpy at state 1(in kJ/kg): h1=h6+v6*(p1-p6)*10^3 //Net work per kg of steam(in kJ/kg): Wnet=(h2-h3)+(h4-h5)-(h1-h6) //Heat added per kg of steam(in kJ/kg): Q=h2-h1 //Thermal efficiency: n=Wnet/Q*100 printf("\n RESULT \n") printf("\nPressure of steam leaving HP turbine = %f MPa",p4) printf("\nThermal efficiency = %f percent",n)
2a7fd99b6d98894b80705035aa948e493686166b
449d555969bfd7befe906877abab098c6e63a0e8
/462/CH2/EX2.21/ex_2_21.sce
8d639aa8d244fbfb7032a632016f2f9970e964cd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
225
sce
ex_2_21.sce
//example 2.21// clc //clears the screen// clear //clears already existing variables// x=247 //decimal to octal conversion// a=dec2oct(x) disp('the octal conversion of given no is:') disp(a) //answer in octal form//
4ba179cd35c547578c8ecd1d863017468511abc9
b29e9715ab76b6f89609c32edd36f81a0dcf6a39
/ketpic2escifiles6/Fullformfunc.sci
97ddae5bbe441920470bbb14c0476498ebfcfbb9
[]
no_license
ketpic/ketcindy-scilab-support
e1646488aa840f86c198818ea518c24a66b71f81
3df21192d25809ce980cd036a5ef9f97b53aa918
refs/heads/master
2021-05-11T11:40:49.725978
2018-01-16T14:02:21
2018-01-16T14:02:21
117,643,554
1
0
null
null
null
null
UTF-8
Scilab
false
false
2,301
sci
Fullformfunc.sci
// 08.08.16 // 08.09.16 // 09.11.14 // 10.08.19 // 13.10.22 ( __ added to varibles ) function Out__=Fullformfunc(FdL__) Out__=MixS(Mixop(1,FdL__)); N__=Mixlength(FdL__); for Jrg__=1:N__ Tmp__=Mixop(Jrg__,FdL__); if part(Tmp__,length(Tmp__))==']' break end; end; Urg__=Mixop(Jrg__,FdL__); K__=mtlb_findstr(Urg__,'='); Uname__=stripblanks(part(Urg__,1:K__-1)); Tmp__=part(Urg__,K__+1:length(Urg__)); // 2013.10.22 Tmp1__=evstr(Tmp__); Urg__=Uname__+"=["+string(Tmp1__(1))+","+string(Tmp1__(2))+"]"; Vrg__=Mixop(Jrg__+1,FdL__); K__=mtlb_findstr(Vrg__,'='); Vname__=stripblanks(part(Vrg__,1:K__-1)); Tmp__=part(Vrg__,K__+1:length(Vrg__)); Tmp1__=evstr(Tmp__); Vrg__=Vname__+"=["+string(Tmp1__(1))+","+string(Tmp1__(2))+"]"; // if Jrg__==2 Tmp__=Mixop(1,FdL__); K__=mtlb_findstr(Tmp__,'='); Zf__=part(Tmp__,K__+1:length(Tmp__)); Tmp__=MixS(Uname__,Vname__,Zf__,Urg__,Vrg__); Out__=Mixjoin(Out__,Tmp__); elseif Jrg__==4 Tmp__=Mixop(1,FdL__); K__=mtlb_findstr(Tmp__,'='); Zf__=part(Tmp__,K__+1:length(Tmp__)); Tmp__=Mixop(2,FdL__); K__=mtlb_findstr(Tmp__,'='); Xname__=stripblanks(part(Tmp__,1:K__-1)); Xf__=part(Tmp__,K__+1:length(Tmp__)); Tmp__=Mixop(3,FdL__); K__=mtlb_findstr(Tmp__,'='); Yname__=stripblanks(part(Tmp__,1:K__-1)); Yf__=part(Tmp__,K__+1:length(Tmp__)); Tmp__=strsubst(Zf__,Xname__,'('+Xf__+')'); Zf__=strsubst(Tmp__,Yname__,'('+Yf__+')'); Tmp__=MixS(Xf__,Yf__,Zf__,Urg__,Vrg__); Out__=Mixjoin(Out__,Tmp__); else Tmp__=Mixop(2,FdL__); K__=mtlb_findstr(Tmp__,'='); Xf__=part(Tmp__,K__+1:length(Tmp__)); Tmp__=Mixop(3,FdL__); K__=mtlb_findstr(Tmp__,'='); Yf__=part(Tmp__,K__+1:length(Tmp__)); Tmp__=Mixop(4,FdL__); K__=mtlb_findstr(Tmp__,'='); Zf__=part(Tmp__,K__+1:length(Tmp__)); Tmp__=MixS(Xf__,Yf__,Zf__,Urg__,Vrg__); Out__=Mixjoin(Out__,Tmp__); end; DrwS__='enws'; BdyL__=[]; for I__=Jrg__+2:Mixlength(FdL__) Tmp__=Mixop(I__,FdL__); if type(Tmp__)==10 if length(Tmp__)==0 // Tmp__=' '; end; DrwS__=Tmp__; end; if type(Tmp__)==1 & size(Tmp__,2)>1 BdyL__=Tmp__; end; end; Tmp__=MixS(DrwS__,BdyL__); Out__=Mixjoin(Out__,Tmp__); endfunction
50a0833a036b30e36b48e7e3691fc22ec1ab395b
449d555969bfd7befe906877abab098c6e63a0e8
/2015/CH7/EX7.4/7_4.sce
7ba43ad56dc9403747c09704c599835896ea88b6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
516
sce
7_4.sce
clc //initialisation of variables ps=0.035636 //pressure in bar pvw=0.018168 //pressure in bar p=1.01325 //pressure in bar a=6.6*10^-4 w=0.00667 td=27 //temparature in degrees tw=16 //temparature in degrees //CALCULATIONS pv=pvw-(p*a*(td-tw)) w=0.622*(pv/(p-pv)) phi=pv/ps h=(1.005*td+w*(2500+1.86*td)) //RESULTS printf('humidity ratio is %2fkg/kg of da',w) printf('\nrelative humidity is %2f',phi) disp('dew point temparature is 8 degrees') printf('\nenthalphy of moist air is %2fkg/kg of da',h)
ea0271f5d1958739732371fd9c92e395a2876449
449d555969bfd7befe906877abab098c6e63a0e8
/1895/CH11/EX11.1/EXAMPLE11_1.SCE
d60e79a05100ac4ebce196d704cc08fdf6e297c1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
850
sce
EXAMPLE11_1.SCE
//ANALOG AND DIGITAL COMMUNICATION //BY Dr.SANJAY SHARMA //CHAPTER 11 //Information Theory clear all; clc; printf("EXAMPLE 11.1(PAGENO 488)"); //given Px_1=1/2;//probability 1 Px_2=1/4;//probability 2 Px_3=1/8;//probability 3 Px_4=1/8;//probability 4 //calculations Ix_1 = log2(1/(Px_1))//information content in first probability Ix_2 = log2(1/(Px_2))//information content in first probability Ix_3 = log2(1/(Px_3))//information content in first probability Ix_4 = log2(1/(Px_3))//information content in first probability //results printf("\n\ni. Information content of first symbol = %.2f bit",Ix_1); printf("\n\nii. Information content of second symbol = %.2f bits",Ix_2); printf("\n\niii. Information content of third symbol = %.2f bits",Ix_3); printf("\n\niV. Information content of fourth symbol = %.2f bits",Ix_4);
2591a11c623f798a85908979611d18745653ac47
449d555969bfd7befe906877abab098c6e63a0e8
/797/CH3/EX3.12.s/3_12_solution.sce
d1b1745b018034fe2ca7682bfcde81ec26473f9b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
884
sce
3_12_solution.sce
//Solution 3-12 WD=get_absolute_file_path('3_12_solution.sce'); datafile=WD+filesep()+'3_12_example.sci'; clc; exec(datafile) a_x = (V_1 - V_0) / t; //acceleration = rate of change of velocity (horizontal) a_x = a_x / 3.6 //converting acceleration to [m/s^2] theta = atan(a_x / (g + a_z)) //angle made by free surface of water with horizontal [radians] printf("Vertical rise at the back of the tank relative to the midplande is") //Case 1: deltaz_1 = b_1 / 2 * tan(theta); printf("\n1.For long side parallel to direction of motion =%1.2f cm", deltaz_1 * 100); //Case 2: deltaz_2 = b_2 / 2 * tan(theta); printf("\n2.For short side parallel to direction of motion =%1.2f cm", deltaz_2 * 100); if(deltaz_2 < deltaz_1) printf("\n Hence short side must be parallel to the direction of motion."); else printf("\n Hence long side must be parallel to the direction of motion "); end
2a186e3652017fc2693bab8585a5ea2c0fa3e3cb
449d555969bfd7befe906877abab098c6e63a0e8
/2921/CH3/EX3.4/Ex3_4.sce
ff6d87e2ce77a74f1b4130a8409b8046e01943c2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,133
sce
Ex3_4.sce
clc; clear; mprintf('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-3.4 Page No.46\n'); hp=10; //[hp] Power transmitted rpm=1750; //[rpm] Turning speed d=0.5; //[in] Diameter of shaft L=12; //[in] Length of shaft G=11.5*10^6 //[lb/in^2] shear modulus of elasticity Su=62000; //[lb/in^2] T=63000*hp/rpm; //[in*lb] Torque transmitted Z=%pi*d^3/16; //[in^3] Polar section modulus Ss=T/Z; //[lb/in^2] Torsional shear stress //Note- In the book Z=0.025 in^3 is used instead of Z=0.0245437 in^3 mprintf('\na. Stress in the shaft is %f lb/in^2.',Ss) J=%pi*d^4/32; //[in^4] Polar moment of inertia theta=T*L/(J*G); //[radians] //Note- In the book J=0.0061 in^4 is used instead of J=0.0061359 in^4 mprintf('\nb. The angular deflection of shaft would be %f radians',theta); SF=3; //[] Safety factor based on ultimate strength Zd=T/(0.5*Su/SF); //[in^3] Polar section modulus required for SF=3 Dd=(16*Zd/%pi)^(1/3); //[in] Diameter of shaft required Z=%pi*d^3/16 mprintf('\nc. Diameter of shaft required is %f in.',Dd);
825c5183cf928aa3ca005a280e4587f3f1c12d92
449d555969bfd7befe906877abab098c6e63a0e8
/1938/CH1/EX1.9/1_9.sce
eddf140d2d56d8cd3003157e2908902363027484
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
351
sce
1_9.sce
clc,clear printf('Example 1.9\n\n') V_t=250 //terminal voltage P=10*10^3 //10kW power of generator I_L=P/V_t //load current I_a=I_L //As seperately excited V_brush=2*2 // 2 * no of brushes E=255 //on full load R_a=(E-V_t-V_brush)/I_a //Because E=V_t+ I_a*R_a + V_brush printf('\nArmature resistance of generator is %.3f ohm',R_a)
b1eeeb07f048b5e631ed864c24d130efa568581a
449d555969bfd7befe906877abab098c6e63a0e8
/48/CH16/EX16.2/eg_16_2.sce
ce72395ab3db46ab73ab2ca8d4f51f18d7fe06e8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
227
sce
eg_16_2.sce
clc; clear; disp("R1=λ+1*(011)*(1*(011)*)*"); //from the identity λ+RR*=R* where R=1*(011)* disp("R2=(1+011)*"); //from the identity (P+Q)*=(P*Q*)* disp("R1=λ+1*(011)*(1*(011)*)*"); disp("(1*(011)*)*"); disp("(1+011)*=R2");
8c3d4bd106c3ec86d0b573087e2b2ed8f8ad1fbf
449d555969bfd7befe906877abab098c6e63a0e8
/620/CH10/EX10.9/example10_9.sce
f5d35dd8808a6a04c7222c7ad42bb5260b254c55
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
537
sce
example10_9.sce
v=132; r1=20*10^3; r2=40*10^3; r3=60*10^3; rl1=55*10^3; rl2=110*10^3; disp("Part a"); r=r1+r2*r3/(r2+r3); i=v/r; in=i*r3/(r2+r3); rn=r2+r1*r3/(r1+r3); i1=in*rn/(rn+rl1); i2=in*rn/(rn+rl2); disp("when the load is 55 kΩ the load current (in mA) is");disp(i1*10^3); disp("when the load is 110 kΩ the load curent (in mA) is"); disp(i2*10^3); disp("Part b"); v1=i1*rl1; v2=i2*rl2; disp("when the load is 55 kΩ the load voltage (in V) is"); disp(v1); disp("when the load is 110 kΩ the load voltage (in V) is"); disp(v2);
d2acdfec859b86aa1b479ae7ed03987351a90590
449d555969bfd7befe906877abab098c6e63a0e8
/46/CH29/EX29.2/Example29_2.sce
04e6796a926c8eb951b1b67a1a129733e941e7ea
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
315
sce
Example29_2.sce
//Example 29.2 clc A=[-2 0;4 -3] B=[1 0;0 2] syms s H1s H2s U1s U2s I=eye(2,2) Gs=inv(s*I-A)*B Hs=[H1s;H2s] Us=[U1s;U2s] Hs=Gs*Us //On comparing H1s=Hs(1,1) H2s=Hs(2,1) U2s=0; U1s=1/s; H1s=eval(H1s) H2s=eval(H2s) //On inverse laplace transformations H1t=ilaplace(H1s,s,t) H2s=ilaplace(H2s,s,t)
a2efd4a63037d79281697b2806c2dbed81628069
449d555969bfd7befe906877abab098c6e63a0e8
/1427/CH16/EX16.20/16_20.sce
d30bc4b4c7149d4ef9eebb2c7f070538529ea263
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
287
sce
16_20.sce
//ques-16.20 //Calculating activation energy and k at 670 K clc //logk = 14.34 - 1.25*10^4/T Ea=1.25*10^4*2.303*8.314;//activation energy T=670;//temperature (in K) k=4.8*10^-5;//rate constant (in /s) printf("Activation energy is %d kJ/mol and k at 670K is %.6f /s.",Ea/1000,k);
33225b3b72d8d2c773e120f0fc10c99bb6759c9c
25ecbf436e9499640445c5f8dd256d12dcfecf2a
/Vclamp/StochHH_K2 DAss Vclamp.sci
6d397510e67dbfab6f97fd5358abf020fdf3dcb1
[]
no_license
ModelDBRepository/141272
89fa654099db5fe443f1d34b43071108882d740e
67f44e52600c751f37f731f71a5b13a21fd28e8e
refs/heads/master
2020-05-29T18:22:46.893645
2019-05-31T02:44:35
2019-05-31T02:44:35
189,298,198
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,256
sci
StochHH_K2 DAss Vclamp.sci
// Potassium channel from original HH model // Voltage clamp simulations with non-stationary noise analysis // UNcoupled activation particles (2-state independent particles), Diffusion approximation algorithm // Steady state approximation of variables in the stochastic terms // See "StochHH_K2 F1 Vclamp noise.sci" for more comments stacksize('max'); nsim=200; //number of sweeps to be simulated Tstop=6; dt=0.001; //Total time and dt in ms points = round(Tstop/dt) //number of points per sweep NK=300; //number of potassium channels Vhold=-90; Vtest=70; rand('normal') points = round(Tstop/dt) p=1; Norec = zeros(points,nsim); v = Vhold*ones(1,nsim); alpha_n=0.01*(v+55)./(1-exp(-(v+55)/10)); beta_n=0.125*exp(-(v+65)/80); n=ones(1,nsim)./(1+beta_n./alpha_n); v = Vtest*ones(1,nsim); alpha_n=0.01*(v+55)./(1-exp(-(v+55)/10)); beta_n=0.125*exp(-(v+65)/80); tic() for t = dt:dt:Tstop Norec(p,:) = NK*n.^4; p=p+1; SDn = sqrt(abs(2*alpha_n.*beta_n)/((alpha_n+beta_n)*dt*NK*4)); n=n+dt*(alpha_n.*(1-n)-beta_n.*n+rand(1,nsim).*SDn); end time=toc() printf("time = %g\n",time); scf(0); clf plot(dt:dt:Tstop,Norec) scf(1); clf plot(dt:dt:Tstop,[mean(Norec,2),variance(Norec,2)]) scf(2); clf plot(mean(Norec,2),variance(Norec,2))
91a45faf0625f9e31f0ece2964fd8393673f9810
8217f7986187902617ad1bf89cb789618a90dd0a
/source/1.1/macros/percent/%sir.sci
1fb873bf43c883ae2fd61cd459af59a459628bea
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
403
sci
%sir.sci
//<f>=%sir(i,j,f2,f) // %sir(i,j,M,r) insere la matrice de scalaires M dans la matrice de fractions //rationnelles r pour les indices de lignes (de colonnes) i (j). (r(i,j)=M) //! //f(i,j)=f2 [t,n,d]=f(1:3),[ld,cd]=size(d),l=maxi(i),c=maxi(j) if l>ld then d(ld+1:l,:)=ones(l-ld,cd),ld=l,end if c>cd then d(:,cd+1:c)=ones(ld,c-cd),end n(i,j)=f2,[l,c]=size(f2),d(i,j)=ones(l,c) f=list(t,n,d,f(4)) //end
6362b47b6aa0f00700696c143e33985a09109f10
449d555969bfd7befe906877abab098c6e63a0e8
/2621/CH7/EX7.15/Ex7_15.sce
6eafa47d7173754e6dd0a986194225803baf9c17
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
230
sce
Ex7_15.sce
// Example 7.15 clc; clear; close; // Given data format('v',5); C= 0.068*10^-6;// in F f_N= 50;// in Hz R= 1/(2*%pi*f_N*C);// in Ω R= R*10^-3;// in kΩ disp("The value of R is : "+string(R)+" kΩ ( Approx. 50 kΩ)")
bd7f644580facab592288b7d3026b602d4483e7b
449d555969bfd7befe906877abab098c6e63a0e8
/1092/CH8/EX8.7/Example8_7.sce
d89d99b8c638f6b5c37d29f391bb9a885ce901e4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
4,380
sce
Example8_7.sce
// Electric Machinery and Transformers // Irving L kosow // Prentice Hall of India // 2nd editiom // Chapter 8: AC DYNAMO TORQUE RELATIONS - SYNCHRONOUS MOTORS // Example 8-7 clear; clc; close; // Clear the work space and console. // Given data P_o = 2000 ; // Total power consumed by a factory in kW from the transformer cos_theta = 0.6 ; // 0.6 lagging power factor at which power is consumed - // - from the transformer sin_theta = sqrt(1 - (cos_theta)^2); theta = -acosd(0.6); // power factor angle at which power is consumed - // - from the transformer in degrees V_L = 6000 ; // Primary line voltage of a transformer in volt P = 750 ; // kW expected to be delivered by the dc motor-generator hp = 1000 ; // hp rating of the motor(induction or synchronous) V_L_m = 6000 ; // Line voltage of a synchronous(or induction) motor in volt cos_theta_sm = 0.8 ; // 0.8 leading power factor of the synchronous motor theta_sm = acosd(0.8); // power factor angle of the synchronous motor in degrees cos_theta_im = 0.8 ; // 0.8 lagging power factor of the induction motor theta_im = -acosd(0.8); // power factor angle of the induction motor in degrees eta = 0.92 ; // Efficiency of each motor // Calculations // case a : using Induction Motor(IM) P_m = ( hp * 746 ) / eta ; // Induction(or synchronous) motor load in W I_1 = P_m / ( sqrt(3) * V_L_m * cos_theta_im ); // Lagging current drawn by IM in A I_1_prime = P_o * 1000 / ( sqrt(3) * V_L * cos_theta ); // Original lagging - // - factory load current in A // Total load current in A using Induction Motor : I_TM = I_1*(cosd(theta_im) + %i*sind(theta_im)) + I_1_prime*(cosd(theta) + %i*sind(theta)) ; I_TM_m = abs(I_TM);//I_TM_m = magnitude of I_TM in A I_TM_a = atan(imag(I_TM) /real(I_TM))*180/%pi;//I_TM_a=phase angle of I_TM in degrees PF_im = cosd(I_TM_a); // Overall PF using induction motor // case b: using synchronous motor I_s1 = P_m / ( sqrt(3) * V_L_m * cos_theta_sm ); // Lagging current drawn by IM in A // Total load current in A using synchronous motor : I_TSM = I_s1*(cosd(theta_sm) + %i*sind(theta_sm)) + I_1_prime*(cosd(theta) + %i*sind(theta)) ; I_TSM_m = abs(I_TSM);//I_TSM_m = magnitude of I_TSM in A I_TSM_a = atan(imag(I_TSM) /real(I_TSM))*180/%pi;//I_TSM_a=phase angle of I_TSM in degrees PF_sm = cosd(I_TSM_a); // Overall PF using Synchronous motor // case c percent_I_L = ( I_TM_m - I_TSM_m ) / I_TM_m * 100 ; // Percent reduction in - // - total load current in percent // Display the results printf("Note : case a,I1 calculated is around 97.53 A instead of 47.53 A(textbook).\n") printf(" Note : case b,Actual I_s1 imaginary part is around 58.52 instead of "); printf(" \n 52.52(textbook)so slight variation in I_TSM and percent ") printf(" \n reduction in total load current.\n") disp("Example 8-7 Solution : "); printf(" \n a: Induction(or sunchronous) motor load"); printf(" \n P_m = %.f W ",P_m); printf(" \n Lagging current drawn by the IM = I1"); printf(" \n I_1 = %.2f <-%.2f A \n",I_1,acosd(cos_theta_sm)); printf(" \n I_1 in A = ");disp(I_1*cosd(-36.87)+%i*I_1*sind(-36.87)); printf(" \n Original lagging factory load current = I_1_prime"); printf(" \n I_1_prime in A = ");disp(I_1_prime*cosd(theta)+%i*I_1_prime*sind(theta)); printf(" \n I_1_prime = %.1f <-%.2f A \n",I_1_prime,acosd(cos_theta)); printf(" \n Total load current = motor load + factory load"); printf(" \n I_TM = I_1 + I_1_prime\n"); printf(" \n I_TM in A = ");disp(I_TM); printf(" \n I_TM = %.1f <%.1f A \n ",I_TM_m , I_TM_a ); printf(" \n Overall system PF = %.4f lagging \n ", PF_im ); printf(" \n b: Synchronous motor load\n I_s1 = %.2f <%.2f A\n",I_1,acosd(cos_theta_sm)); printf(" \n I_s1 in A = ");disp(I_s1*cosd(36.87)+%i*I_s1*sind(36.87)); printf(" \n Total load current : I_TSM = I_s1 + I_1_prime \n"); printf(" \n I_TSM in A = ");disp(I_TSM); printf(" \n I_TSM = %.1f <%.1f A \n ",I_TSM_m , I_TSM_a ); printf(" \n Overall system PF = %.1f lagging \n ", PF_sm ); printf(" \n c: Percent reduction in total load current = %.1f percent \n",percent_I_L); printf(" \n d: PF improvement: Using the synchronous motor ( in lieu of the IM)"); printf(" \n raises the total system PF from %.4f lagging to %.1f lagging.",PF_im,PF_sm);
16879e5bea6d4c30bc795def54bbb22216ef9ce5
449d555969bfd7befe906877abab098c6e63a0e8
/2240/CH30/EX29.3/EX29_3.sce
ceaca9d66542492ba0e9f638dfceac53a7659757
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
326
sce
EX29_3.sce
// Grob's Basic Electronics 11e // Chapter No. 29 // Example No. 29_3 clc; clear; // assume Av still equals 300. If vin is 5 mVp-p, calculate Vout. // Given data Vin = 5*10^-3; // Input voltage=5 mVolts(p-p) Av = 300; // Voltage gain=300 Vo = Av*Vin; disp (Vo,'The Output Voltage in Volts(p-p)')
4027fe7651d4b4c16f06544ecc34e1b341ea0dec
449d555969bfd7befe906877abab098c6e63a0e8
/3701/CH7/EX7.8/Ex7_8.sce
8ef4b0c18c7acba815014e7f47d6726f60d67a36
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
481
sce
Ex7_8.sce
////Given L1=0.4 L2=0.6 L=1 //Say //Calculation // dx=(L2-L1)*L P1=2/L*(sin(%pi*L/2.0*L))**2*dx //for first excited state P2=2/L*(sin(2*%pi*L/2.0*L))**2*dx //for second excited state P3=2/L*(sin(3*%pi*L/2.0*L))**2*dx //Result printf("\n (a) probability for ground state %0.3f ", P1) printf("\n (b) probability for first excited state %0.1f ",P2) printf("\n (c) Probability for second excited state %0.3f ", P3)
2b9095b62c1862a558393359ae3dda48fb1c40bb
ebd6f68d47e192da7f81c528312358cfe8052c8d
/swig/Examples/test-suite/scilab/li_std_vector_runme.sci
4f21edd1891d102f1a33eb09d84ec20773be08c3
[ "LicenseRef-scancode-swig", "GPL-3.0-or-later", "LicenseRef-scancode-unknown-license-reference", "GPL-3.0-only", "Apache-2.0" ]
permissive
inishchith/DeepSpeech
965ad34d69eb4d150ddf996d30d02a1b29c97d25
dcb7c716bc794d7690d96ed40179ed1996968a41
refs/heads/master
2021-01-16T16:16:05.282278
2020-05-19T08:00:33
2020-05-19T08:00:33
243,180,319
1
0
Apache-2.0
2020-02-26T05:54:51
2020-02-26T05:54:50
null
UTF-8
Scilab
false
false
225
sci
li_std_vector_runme.sci
exec("swigtest.start", -1); // TODO: support for STL vectors operator = iv = new_DoubleVector(); //for i=1:4 // iv(i) = i; //end //x = average(iv); //if x <> 2.5 then swigtesterror(); end exit exec("swigtest.quit", -1);
53d83e71395fbb281057b11e401fd6fd7f096fae
491dfade9270403d35c94491116eb08a73209eab
/Lloyd.sci
eb14458a837bfbcfef99b24e95a8c9373ee56610
[]
no_license
skad94/Quantification
9cfcbd490af4f718bbecd414b66fc8de48f0b78d
011f56ba3549d4d96c98090536d4109163c4525c
refs/heads/master
2021-01-21T13:17:30.662165
2016-04-21T13:08:12
2016-04-21T13:08:12
52,862,728
1
0
null
null
null
null
UTF-8
Scilab
false
false
8,383
sci
Lloyd.sci
function [res] = Esperance_Gauss(sup,inf) res = (exp(-0.5.*inf.^2) - exp(-0.5.*sup.^2)) /(sqrt(%pi * 2)); endfunction function [res] = PHI(x)// fonction de repartition // p = length(x); // mu = zeros(1,p); // sigma = ones(1,p); res = cdfnor("PQ",x,zeros(x),ones(x)); endfunction function [res] = M_k(x,Mu,dt)// drift aussi egale à l'esperance de la marginal res = x + Mu.*x*dt; endfunction function [res] = S_k_CEV(x,Nu,Delta,dt)// drift aussi egale à l'esperance de la marginal res = sqrt(dt)*(Nu* x.^(Delta + 1))/(sqrt(1+x.^2)); endfunction function [res] = S_k(x,Sigma,dt)// diffusion aussi egale à l'ecart type de la marginal res = Sigma.*x*sqrt(dt); endfunction function [Grilles,Poids] = Lloyd_1d(nb_quant,init,nb_iter) compteur = 0; Grilles = init; Poids = ones(1,nb_quant); for compteur =1:nb_iter // || les centres ne bougent plus*/) //disp('iteration numero '+string(compteur)) tmp_memoire = ( cat(2,Grilles,%inf) + cat(2,-%inf,Grilles) ); tmp_memoire = 0.5*tmp_memoire;// -inf;demi somme;+inf tmp_memoirem = tmp_memoire(1:nb_quant);//x+1/2 tmp_memoirep = tmp_memoire(2:nb_quant+1);//x-1/2 espe = Esperance_Gauss(tmp_memoirep,tmp_memoirem); Poids = PHI(tmp_memoirep) - PHI(tmp_memoirem); Grilles = espe ./(Poids + 0.000000001); end Grilles = Grilles; Poids = Poids; endfunction //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function [G_t,P_t] = Lloyd_RMQ(G_moins,P_moins,Mu,Sigma,dt)// Recursive Marginal Quantization compteur = 0; nb_quant = length(G_moins); G_t = G_moins; P_t = ones(1,nb_quant); // disp(G_t, "gt") //disp(G_moins, "gmoin") tmp_memoire = cat(2,-%inf,G_t,%inf); tmp_memm = (G_t + tmp_memoire(1:nb_quant)); // Xj-1/2 ; au temps k+1; tmp_memm = 0.5*tmp_memm; tmp_memp = (G_t + tmp_memoire(3:nb_quant+2));// Xj+1/2 ; au temps k+1; tmp_memp = 0.5*tmp_memp; //-repmat((M_k(G_moins,Mu,dt))',1,nb_quant);// matrice nn des -M_k(Xi) constante sur une meme LIGNE!!! Xmm = repmat(tmp_memm,nb_quant,1) - repmat((M_k(G_moins,Mu,dt))',1,nb_quant) // Xj-1/2 -M_k(Xi) matrice nn Xpp = repmat(tmp_memp,nb_quant,1) - repmat((M_k(G_moins,Mu,dt))',1,nb_quant) // Xj+1/2 -M_k(Xi) matrice nn //disp(Xpp, "xpp") Xmm = Xmm/(Sigma*sqrt(dt)) // V(i)j-1/2 matrice nn Xpp = Xpp/(Sigma*sqrt(dt)) // V(i)j+1/2 matrice nn DPhi = PHI(Xpp) - PHI(Xmm) // taille des vj+1/2;i P_t = P_moins*DPhi; P_t = P_t; // grilles A = P_moins.*M_k(G_moins,Mu,dt)*(PHI(Xpp) - PHI(Xmm)); B = P_moins*Esperance_Gauss(Xpp,Xmm); B = Sigma*sqrt(dt)*B; B = B.*G_moins; G_t = A + B; // disp(P_t, "pt") G_t = G_t./(P_t+0.000001); //disp(G_t, " grill ") //disp(G_t , P_t, "poids , grille") G_t = G_t; P_t = P_t; endfunction function [G_t,P_t] = Lloyd_RMQ_CEV(G_moins,P_moins,Mu,Nu,Delta,dt)// Recursive Marginal Quantization compteur = 0; nb_quant = length(G_moins); G_t = G_moins; P_t = ones(1,nb_quant); // disp(G_t, "gt") //disp(G_moins, "gmoin") tmp_memoire = cat(2,-%inf,G_t,%inf); tmp_memm = (G_t + tmp_memoire(1:nb_quant)); // Xj-1/2 ; au temps k+1; tmp_memm = 0.5*tmp_memm; tmp_memp = (G_t + tmp_memoire(3:nb_quant+2));// Xj+1/2 ; au temps k+1; tmp_memp = 0.5*tmp_memp; //-repmat((M_k(G_moins,Mu,dt))',1,nb_quant);// matrice nn des -M_k(Xi) constante sur une meme LIGNE!!! Xmm = repmat(tmp_memm,nb_quant,1) - repmat((M_k(G_moins,Mu,dt))',1,nb_quant) // Xj-1/2 -M_k(Xi) matrice nn Xpp = repmat(tmp_memp,nb_quant,1) - repmat((M_k(G_moins,Mu,dt))',1,nb_quant) // Xj+1/2 -M_k(Xi) matrice nn den = ones(G_moins)./sqrt(1+(G_moins).^2)//Nu*(G_moins.^(Delta+1)) Xmm = Xmm./S_k_CEV(G_moins,Nu,Delta,dt) // V(i)j-1/2 matrice nn Xpp = Xpp./S_k_CEV(G_moins,Nu,Delta,dt) // V(i)j+1/2 matrice nn DPhi = PHI(Xpp) - PHI(Xmm) // taille des vj+1/2;i P_t = P_moins*DPhi; P_t = P_t; // grilles A = P_moins.*M_k(G_moins,Mu,dt)*(PHI(Xpp) - PHI(Xmm)); B = P_moins*Esperance_Gauss(Xpp,Xmm); //B = Sigma*sqrt(dt)*B; B = B*S_k_CEV(G_moins,Nu,Delta,dt); B = B.*G_moins; G_t = A + B; // disp(P_t, "pt") G_t = G_t./(P_t+0.000001); //disp(G_t, " grill ") //disp(G_t , P_t, "poids , grille") a_t = G_t'; b_t = P_t'; //plot(a_t,b_t) endfunction function [Grilles,Poids] = Lloyd2BS(nb_quant,nb_step,nb_iter,x0,Mu,Sigma,T,x1g,x1p) dt = T/nb_step; Grilles = ones(nb_step+1,nb_quant); Poids = ones(nb_step+1,nb_quant); Grilles (1,:)= x0*Grilles (1,:); // x0 et init = gsort(rand(1,N,"normal"),'g','i');//loi normal naif //[x1g,x1p] = Lloyd_1d(nb_quant,init,nb_iter); Grilles(2,:) = M_k(x0,Mu,dt)+S_k(x0,Sigma,dt)*x1g; Poids(2,:) = x1p; plot(Grilles(2,:),Poids(2,:),">") plot(Grilles(2,:),Poids(2,:)) for t = 3:nb_step+1 [tmp,Poids(t,:)] = Lloyd_RMQ(Grilles(t-1,:),Poids(t-1,:),Mu,Sigma,dt); Grilles(t,:) = M_k(Grilles(t-1,:),Mu,dt) + S_k(Grilles(t-1,:),Sigma,dt).*x1g; // disp(Grilles,Poids, "poids , grilles ") // plot(Grilles(t,:),Poids(t,:)) end plot(Grilles(nb_step,:),Poids(nb_step,:),"*") plot(Grilles(nb_step,:),Poids(nb_step,:)) Grilles; Poids; endfunction function [Grilles,Poids] = Lloyd2CEV(nb_quant,nb_step,nb_iter,x0,Mu,Nu,Delta,T) dt = T/nb_step; Grilles = ones(nb_step+1,nb_quant); Poids = ones(nb_step+1,nb_quant); Grilles (1,:)= x0*Grilles (1,:); // x0 et init = gsort(rand(1,N,"normal"),'g','i');//loi normal naif moy = x0 + Mu*x0*dt; var = (Nu*sqrt(dt/(1+x0^2))*x0.^(Delta+1)); init = moy + var*init; [x1g,x1p] = Lloyd_1d(nb_quant,init,nb_iter); Grilles(2,:) = M_k(x0,Mu,dt)+S_k_CEV(x0,Nu,Delta,dt).*x1g; Poids(2,:) = x1p; for t = 3:nb_step+1 [tmp,Poids(t,:)] = Lloyd_RMQ_CEV(Grilles(t-1,:),Poids(t-1,:),Mu,Nu,Delta,dt); Grilles(t,:) = M_k(Grilles(t-1,:),Mu,dt) + S_k_CEV(Grilles(t-1,:),Nu,Delta,dt).*x1g; end Grilles = Grilles'; Poids = Poids'; clf; plot(Grilles(:,2),Poids(:,2),"<",Grilles(:,nb_step+1),Poids(:,nb_step+1),"*") plot(Grilles(1:nb_quant,2:nb_step+1),Poids(1:nb_quant,2:nb_step+1)) endfunction ///////////// §§§§§§§§§§§ 1111111111 !!!!!!!!!!!!!!!!!!!!!!!!!!! // 2D2D2D2D22D2D2D2D2D2D22D2D2D // QUANTIFICATION PRODUIT function [Grille,Poids] = Prod_2_Quantif(g1,p1,g2,p2) n1 = length(g1); n2 = length(g2); Grille = ones(2,n1*n2); Poids = ones(1,n1*n2); Grille (1,:) = repmat(g1,1,n2); tmp2 = []; Poids = []; for i = 1:n2 tmp1 = repmat(g2(i),1,n1); tmp2 = cat(2,tmp2,tmp1); tmp3 = p2(i)*p1 Poids = cat(2,Poids,tmp3); end Grille(2,:) = tmp2; endfunction function [Grilles,Poids] = Lloyd2BS_2d(nb_quant,nb_step,nb_iter,x0,y0,Mu,Sigma,Mu0,Sigma0,T,Zg,ZP)// uncorrelated dt = T/nb_step; Grilles = ones(nb_step+1,nb_quant,2); Grilles (1,:,1)= x0*Grilles (1,:,1); // x0 et Grilles (1,:,2)= y0*Grilles (1,:,2); init = gsort(rand(1,N,"normal"),'g','i');//loi normal naif //disp(Grilles(2,:,1), "grille") //disp(M_k(x0,Mu,dt), "mk(x0,mu,dt)") //disp(S_k(x0,Sigma,dt), "sk(x0...)") //disp(Zg, "zg") //pause Grilles(2,:,1) = M_k(x0,Mu,dt)+S_k(x0,Sigma,dt)*Zg Poids(2,:,1) = ZP; for t = 3:nb_step+1 [tmp,Poids(t,:,1)] = Lloyd_RMQ(Grilles(t-1,:,1),Poids(t-1,:,1),Mu,Sigma,dt); [tmp2,Poids(t,:,2)] = Lloyd_RMQ(Grilles(t-1,:,1),Poids(t-1,:,1),Mu0,Sigma0,dt); Grilles(t,:,1) = M_k(Grilles(t-1,:,1),Mu,dt) + S_k(Grilles(t-1,:,1),Sigma,dt).*Zg; Grilles(t,:,2) = M_k(Grilles(t-1,:,2),Mu,dt) + S_k(Grilles(t-1,:,2),Sigma,dt).*Zg; // disp(Grilles,Poids, "poids , grilles ") //plot(Grilles(t,:),Poids(t,:)) end [Grilles,Poids] = Prod_2_Quantif(Grilles(t,:,1),Poids(t,:,1),Grilles(t,:,2),Poids(t,:,2)); Grilles; Poids; endfunction function [res] = Basket_Call(g12,p12,weig1,weig2,K)// uncorrelated [nb_iter,nb_quant] = size(g12); disp(g12, "g12") g12(1,:) = weig1*g12(1,:) //grille pondere du sous jacent 0 g12(2,:) = weig2*g12(2,:) //grille pondere du sous jacent 1 disp(g12, "g12") tmp = sum(g12,1); disp(tmp,"sum") tmp = tmp - K; //disp(tmp, "s-k") tmp = max(zeros(tmp),tmp); disp(tmp, "(s-k )+") res = tmp*p12'; //disp(res, "E(s-k)") disp(res, "res =") res = exp(-0.02)*res endfunction
d55136d15f1c846f85b462bd06afa044f03ce14a
3cc9acf95ce241492ba31e6e51cb0e5d994f2490
/Project 2/FastRCA12.tst
8658038927196e59139fd64b418dea5ffda01322
[]
no_license
alisaylin/CSCE-312
d2d0ad1d4f01b1d6f8332038acc140435f448997
c2d8821e39e0a454f897b49f47b5dbdafe1aa165
refs/heads/main
2023-05-08T09:55:09.799838
2021-05-26T01:52:46
2021-05-26T01:52:46
370,875,567
0
0
null
null
null
null
UTF-8
Scilab
false
false
529
tst
FastRCA12.tst
//Starter Test stimulus file for FastRCA12 load FastRCA12.hdl, compare-to FastRCA12.cmp, output-file FastRCA12.out, output-list a%B3.12.3 b%B3.12.3 out%B3.12.3 carry%B3.1.3; set a %B000000000000, set b %B000000000000, eval, output; set a %B111111111111, set b %B111111111111, eval, output; set a %B101010101010; set b %B010101010101; eval, output; set a %B111100110101, set b %B001101111101, eval, output; set a %B010000001011, set b %B010010010011, eval, output; set a %B111100101110, set b %B000000101000, eval, output;
cc67cdc56d644386fda22f25e97d3de92a5d2176
449d555969bfd7befe906877abab098c6e63a0e8
/174/CH1/EX1.13/example1_13.sce
54107268f4fe6d377325a0c8a1b9504c5e61aa26
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
783
sce
example1_13.sce
// To find the maximum error // Modern Electronic Instrumentation And Measurement Techniques // By Albert D. Helfrick, William D. Cooper // First Edition Second Impression, 2009 // Dorling Kindersly Pvt. Ltd. India // Example 1-13 in Page 15 clear; clc; close; // Given data // For the given tolerence of 0.1% // highest value of resistor is 1.001 times the nominal value // lowest value of resistor is 0.999 times the nominal value //Calculations V_out_max = 1.001 * 1.001/ 0.999; V_out_min = 0.999 * 0.999/ 1.003; total_var = 0.1 * 3; // total variation of the resultant voltage is sum of tolerences printf("The total variation of the resultant voltage = +/- %0.1f %%",total_var); //Result // The total variation of the resultant voltage = +/- 0.3 %
5b1ed183101aeb777df8bbdc23e8b966298564b6
ba080ae552d7cd933fbe2a088e062df4ccfa2a6f
/contest/submissions/files/1b1.tst
4a50e7fa612a280ed7c172c1df4382c82ad11b34
[]
no_license
kumartej/debugger2016
944a3c5949e59b2fd712c814274df8fbc4c980dd
3ba1afbb4257674b0a282c3476e7efb63cb91fca
refs/heads/master
2021-01-13T10:56:24.471965
2016-10-29T16:40:01
2016-10-29T16:40:01
72,296,432
0
2
null
null
null
null
UTF-8
Scilab
false
false
39
tst
1b1.tst
9 12 85 47 63 25 74 56 33 99
bdbacafc1bd31588fa626bd992e360e32babf49a
449d555969bfd7befe906877abab098c6e63a0e8
/2840/CH9/EX9.11/ex9_11.sce
048af93834a0ad199b29e9397b47e9b68a9e5ecf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
281
sce
ex9_11.sce
clc; clear all; a = 1e-10 // Width of box in meter m = 9.1e-31; // Mass of electron in kg h = 6.62e-34; // Planck's constant in Js c = 3e8; // Velocity of light in vaccum n = 1; // Single electron E = (n^2 * h^2)/(8*m*a^2*1.6e-19); disp('eV',E,'Energy of electron n^2*');
35a26dd80efad7e7ec8994e7fa43912596a0cb61
449d555969bfd7befe906877abab098c6e63a0e8
/446/CH10/EX10.5/10_5.sce
ef6131ac4428d008daea18b73e70f7e5c1af1597
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
400
sce
10_5.sce
clear clc disp('Exa-10.5'); p=0.971; A=6.023*10^23; m=23.0; // various given values and constants c= (p*A/m)*10^6; // atoms per unit volume hc=1240; mc2=0.511*10^6; // hc=1240 eV.nm E= ((hc^2)/(2*mc2))*(((3/(8*%pi))*c)^(2/3)); //value of fermi energy printf('The fermi energy for sodium is %f eV',E*10^-18);//multiply by 10^-18 to convert metres^2 term to nm^2
8d6a2e682018a1e6106f20a4a1492bc1aacc05ee
449d555969bfd7befe906877abab098c6e63a0e8
/2126/CH3/EX3.16/16.sce
9d024c5f9f064b0b3c34ba74e4ac9a1d4da1258a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,476
sce
16.sce
clc clear //input data D=0.3 //inner pipe diameter in m Q=1000 //Discharge in m^3/min P2=150 //Exit pressure in kPa T2=293 //Exit temperature in K L1=50 //Length of the pipe in m f=0.005 //frictional factor k=1.4 //Adiabatic constant R=287 //Gas constant in J/kg-K //calculation A=%pi*D^2/4 //Area of duct in m^2 C2=Q/(A*60) //Exit air velocity in m/s a2=sqrt(k*R*T2) //Sound velocity in m/s M2=C2/a2 //Exit mach number p1=1.54 ////Static to Critical pressure ratio at outlet from gas tables,fanno flow tables @M2,k=1.4 Pt=P2/p1 //Critical pressure in kPa t1=1.10 //Static to Critical temperature ratio at outlet from gas tables,fanno flow tables @M2,k=1.4 Tt=T2/t1 //Critical temperature in K X1=0.228 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.4 L2=(X1*D)/(4*f) //Length of the pipe in m L2=L1+L2 //Overall length of pipe from inlet to critical state in m X2=(4*f*L2)/D //frictional constant fanno parameter for M1 M1=0.345 //Inlet Mach number from gas tables fanno flow tables @X2,k=1.4 p2=3.14 //Static to Critical pressure ratio at inlet from gas tables,fanno flow tables @M1,k=1.4 P1=Pt*p2 //Static pressure at inlet in kPa t2=1.17 //Static to Critical temperature ratio at inlet from gas tables,fanno flow tables @M1,k=1.4 T1=Tt*t2 //Static temperature at inlet in K //output printf('(A)Mach number at the exit is %3.3f\n (B)Inlet pressure and temperature are %3.3f kPa and %3.2f K',M2,P1,T1)
ade30e7ca0d3584d051f8a43398ccbd806122a16
449d555969bfd7befe906877abab098c6e63a0e8
/3720/CH12/EX12.6/Ex12_6.sce
30a2d8d53b7201668017911a20ff351ef8e9b66a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
607
sce
Ex12_6.sce
// Example 12_6 clc;clear;funcprot(0); //Given values T_1=400; // K P_1=100; // kPa Ma_1=0.3;// Mach number // Calculation //From table A-13.At the initial Mach number of Ma=0.3, we read // a_1=A1/A*; t_1=T1/T0; p_1=P1/P0;t_2=T1/T0;p_2=P2/P0; a_1=2.031; t_1=0.9823; p_1=0.9395; // A2=0.8*A1; //a_2=(A2/A*)=(A2/A1)*(A1/A*); a_2=0.8*a_1; //From table A-13,for the value of a_2 t_2=0.9703; p_2=0.9000; Ma_2=0.391; T_2=T_1*(t_2/t_1);// K P_2=P_1*(p_2/p_1);// kPa printf('Mach number,Ma_2=%0.3f\n',Ma_2); printf('Temperature,T_2=%0.0f K\n',T_2); printf('Pressure,P_2=%0.1f kPa\n',P_2);
34955f01fcf9ff956f24c68c79b3e9a5eb1233a2
449d555969bfd7befe906877abab098c6e63a0e8
/1595/CH3/EX3.1/ex3_1.sce
747dcdee3791601b245f512a9d661c4aeb51d8dd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
622
sce
ex3_1.sce
// Amplitude Modulation-Reception : example 3-1 : (pg 120) fr=550*10^3; L=10*10^-6; fr1=1550*10^3; a=fr*2*%pi; x=fr1*2*%pi; b=1/a; y=1/x; C1=((b)^2/L); C2=((y)^2/L); fr2=1100*10^3; BW=10*10^3; Q=(fr2/BW); BW1=(fr1/Q); BW2=(fr/Q); //part(a) : calculate C at 550kHz printf("\nfr = 1/2.pi.(LC) \nC1= %.12f F",C1); //at 1550 kHz printf("\nC2 = %.11f F",C2); printf("\nrequired range of capacitance is from 1.06 to 8.37 nF"); //part(b) : Quality factor printf("\nQ = fr/BW \nQ = %.f Hz",Q); //part(c) : Q at 1550 kHz printf("\nBW = fr/Q \nBW = %.f Hz",BW1); // Q at 550 kHz printf("\nBW = %.f Hz",BW2);
5f4db3570ba581877ed24a14741d5437a29b1d87
449d555969bfd7befe906877abab098c6e63a0e8
/1118/CH8/EX8.7/eg8_7.sce
6619456bd4dc5b295582601be8b94eb50fda62b3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
424
sce
eg8_7.sce
clear; clc; sb=100; vb=15; xg=.75; sbg=75; xtf=.1 sbtf=50; xt=100; kvl=220; rl=500; vl=210; xg_pu=xg*(sb/sbg); xtf_pu=xtf*(sb/sbtf); xt_pu=xt*sb/((kvl)^2); rl_pu=rl*sb/((kvl)^2); vpu=vl/kvl i_pu=vpu/rl_pu; v=i_pu*(rl_pu+(%i)*(xg_pu+xt_pu+xt_pu)); vg=round(sqrt(real(v)^2+imag(v)^2)*vb); printf("The terminal voltage per phase is: %.2f kV",vg/sqrt(3)); //difference in answer is due to rounding off
f100dc110043697c615cf24f3bac5ff5ebe9d36e
449d555969bfd7befe906877abab098c6e63a0e8
/1286/CH1/EX1.2/1_2.sce
9ce333975b1880964914da8c7f89b5f8fd1f8b27
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
194
sce
1_2.sce
clc //initialisation of variables n= 1/1000 T= 60 //degrees T1= 100 //degrees //CALCULATIONS r= T-n*T^2 r1= T1-n*T1^2 tl= r*100/r1 //RESULTS printf (' liquid temperature= % 1f C',tl)
8ff40b37eb33ec1ac24a46cc7ae27f2a6e28f8db
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.5/Unix-Windows/scilab-2.5/macros/percent/%p_n_r.sci
f06f3ae197bd4c35372b117e6cea69b4b5460efb
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
188
sci
%p_n_r.sci
function [r]=%p_n_r(l1,l2) //r%p_n_r(l1,l2) <=>r= (l1<>l2 ) l1 polynomial l2 rational //! // Copyright INRIA r=degree(l2('den'))==0 if r then r=l2('num')./coeff(l2('den'))==l1,end r=~r
dfbee39dd0ca4d986fa8b19ea5d9232454717ce2
449d555969bfd7befe906877abab098c6e63a0e8
/2615/CH18/EX99.7/99.sce
7e34d890f85bfca4cd9d4fb053d1e9fd2776c075
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
268
sce
99.sce
clc //initialisation of variables h=400//mm v=540//mm l=900//mm q=60/40//sec a=0.857//sec //CALCULATIONS H=h*v/(2*l)//mm R=H/v//degree Tb=q-a//sec V=h/a*60/1000//m/min V1=h/Tb*60/1000//m/min //RESULTS printf('the average speed of workin =% f m/min',V1)
c0673ee0715453310be6c5b5ebcfe1165ed4e099
978b15852ad0d9219e0cd69e9da3a9140b84aa97
/TPs_CN/Exo3.sce
c72055c617b40f47bef5ea32c64db4087c40db65
[]
no_license
nadine867/TP_CN
cd2acc700471c7f595ada5f2b799b43ca44590ce
fcf09074e27723ca3e9b1eec870386c848b190f9
refs/heads/master
2023-02-03T04:07:38.525606
2020-12-18T20:23:55
2020-12-18T20:23:55
316,060,516
0
0
null
null
null
null
UTF-8
Scilab
false
false
678
sce
Exo3.sce
function [C]=matmat3b(A,B) m=size(A,1); n=size(B,2); p=size(B,1); C=zeros(m,n); for i=1:m for j=1:n for k=1:n C(i,j)=A(i,k)*B(k,j) + C(i,j); end end end endfunction function [C]=matmat2b(A,B) m=size(A,1); n=size(B,2); C=zeros(m,n); for i=1:m for j=1:n C(i, j) = A(i, :)*B(:, j) + C(i,j); end end endfunction function [C]=matmat1b(A,B) m=size(A,1); n=size(B,2); C=zeros(m,n); for i=1:m C(i, :) = A(i,:)*B + C(i, :); end endfunction
f87010abd010cb56fe5b30fac26aa6e4d64dfcbf
717ddeb7e700373742c617a95e25a2376565112c
/3044/CH4/EX4.4/Ex4_4.sce
e1526174ef6ad3d65a55f0bee3dfd558023b4f51
[]
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
389
sce
Ex4_4.sce
//Variable Declaration p = 0.3 // probability of not passing inspection n = 18 // total panels //Calculation function ans = comb(n,r) // returns number of total combination of selecting "r" items out of "n" ans = factorial(n)/(factorial(r)*factorial(n-r)) endfunction p1 = comb(18,6)*(p^6)*((1-p)^12) //Results printf ( "Required probability: %.4f",p1)
86dd85c0c055a4a35ed93b8034db44ccbc9220ec
449d555969bfd7befe906877abab098c6e63a0e8
/34/CH8/EX8.3/Ch8Exa3.sci
78e05fa140a53c73ca838920d3020f6d532f7900
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
586
sci
Ch8Exa3.sci
//Part (a) f= 6.42*(10^13); //frequency of absorbed radiation, Hz Mco= 1.14*(10^(-26)); //mass of CO, kg k= 4*((%pi)^2)*(f^2)*Mco; //using Eqn 8.15, Page 287 disp(k,"The forcs constant for the bond in CO molecule, in N/m, is: ") //Result // The forcs constant for the bond in CO molecule, in N/m, is: // 1854.9604 //Part (b) h= 6.63*(10^(-34)); //Planck's constant, J.s dE= h*f; //separation, J disp(dE,"The separation in its vibrational eergy levels, in J, is: ") //Result // The separation in its vibrational eergy levels, in J, is: // 4.256D-20
15799aec76f3b7a1e45036a24910c37d439eebec
127061b879bebda7ce03f6910c80d0702ad1a713
/Structure/PIL_red_BZ_vec.sci
af41f9b9b7ef6f6e2bcb7f5f3e907d662613da3d
[]
no_license
pipidog/PiLib-Scilab
961df791bb59b9a16b3a32288f54316c6954f128
125ffa71b0752bfdcef922a0b898263e726db533
refs/heads/master
2021-01-18T20:30:43.364412
2017-08-17T00:58:50
2017-08-17T00:58:50
100,546,695
0
1
null
null
null
null
UTF-8
Scilab
false
false
1,164
sci
PIL_red_BZ_vec.sci
// **** Purpose **** // This function calculates the reciprocal lattice vectors of slab structure // **** Variables **** // [lat_vec]: real, 3x3, // <= the row lattice vectors where a1 and a2 defines the slab plane. // [z_axis]: int, 1/2/3 // <= which axis will be the finite size axis // [G0]: real, 3x3, // => the original reciprocal lattice // [Gslab]: real, 2x3 or [] if not found // => the slab reciprocal lattice vectors // **** Version **** // 10/18/2016: 1st version // **** Comment **** function [Gslab,G0]=PIL_red_BZ_vec(lat_vec,z_axis) [lhs,rhs]=argn(); if rhs==1 then z_axis=[]; end G0=PIL_recip_vec(lat_vec); select z_axis case 2 Gslab=PIL_recip_vec(diag([1,1e+6,1])*lat_vec); case 1 Gslab=PIL_recip_vec(diag([1e+6,1,1])*lat_vec); else Gslab=PIL_recip_vec(diag([1,1,1e+6])*lat_vec); end // check if there is any axis becomes zero Gslab_norm=zeros(1,3); for n=1:3 Gslab_norm(n)=norm(Gslab(n,:)); end Gslab=Gslab(find(Gslab_norm>=1e-2),:); if length(Gslab(:,1))~=2 then disp('Warning: slab basis is not defined'); end endfunction
4a37c59c09596ef9c518f2444fbae7043af1d989
262ac6443426f24d5d9b13945d080affb0bd6d9b
/opgaves/2de-grootste/edit-me.sce
128729e52d79920af5b908c598da14f9c977a87d
[]
no_license
slegers/Scilab
9ebd1d486f28cf66e04b1552ad6e94ea4bc98a0b
1b5dc3434def66355dafeb97c01916736a936301
refs/heads/master
2021-01-12T01:42:01.493578
2017-01-09T10:54:09
2017-01-09T10:54:09
78,420,343
0
0
null
null
null
null
UTF-8
Scilab
false
false
155
sce
edit-me.sce
function [max] = solve(ns) m = unique(ns); if (length(m) <= 1) then max = %f; else max = m(length(m) - 1); end endfunction
0bc4312f443e91223a178c0c867f05dd9a0c0dc5
449d555969bfd7befe906877abab098c6e63a0e8
/2339/CH8/EX8.10.1/Ex8_10.sce
a17fbf221b21fe4121ee40902520e03ad1f9b30c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
252
sce
Ex8_10.sce
clc clear IP=15; n=1.2; P1=100; P2=700; x=[(P2/P1)^((n-1)/n)]-1; V1N=[IP*(n-1)*60]/[n*P1*x*2]; LN=150/2; D2=V1N*4/[(22/7)*LN]; D=D2^0.5; L=D*1.5; printf('D= %2.0f mm',D*1000); printf('\n'); printf('L= %2.0f mm',L*1000); printf('\n');
54a45c4493e56a099f24cf6242e40ab29abf9289
449d555969bfd7befe906877abab098c6e63a0e8
/2921/CH13/EX13.1/Ex13_1.sce
5ff997cdd1ed543f965ab03cf9f5dee0dbfdd66e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
529
sce
Ex13_1.sce
clc; clear; mprintf('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-13.1 Page No.280\n'); //Pitch-line velocity Nt=24; Pd=12; Dp=Nt/Pd; n=1750; Vm=%pi*Dp*n/12; mprintf('\n Pitch-line velocity = %f ft/min.',Vm); //Transmitted force hp=5; Ft=33000*hp/Vm; mprintf('\n Transmitted force = %f lb.',Ft); //Axial force psi=15*%pi/180; Fa=Ft*tan(psi); mprintf('\n Axial force = %f lb.',Fa); //Separating force theta=20*%pi/180; psit=atan(tan(theta)/cos(psi)); Fn=Ft*tan(psit); mprintf('\n Separating force = %f lb.',Fn);
35c67a8e22b75c49ff11670c38b007a33161f4f3
3c47dba28e5d43bda9b77dca3b741855c25d4802
/microdaq/macros/client_disconnect.sci
3660093a7d019c4c5ac91754c6dde3af94083797
[ "BSD-3-Clause" ]
permissive
microdaq/Scilab
78dd3b4a891e39ec20ebc4e9b77572fd12c90947
ce0baa6e6a1b56347c2fda5583fb1ccdb120afaf
refs/heads/master
2021-09-29T11:55:21.963637
2019-10-18T09:47:29
2019-10-18T09:47:29
35,049,912
6
3
BSD-3-Clause
2019-10-18T09:47:30
2015-05-04T17:48:48
Scilab
UTF-8
Scilab
false
false
118
sci
client_disconnect.sci
function result = client_disconnect() result = call("sci_client_disconnect", "out", [1, 1], 1, "i"); endfunction
d44c1614fdb6ace21bcbb7ae38f2b3a79f2aee5f
449d555969bfd7befe906877abab098c6e63a0e8
/401/CH6/EX6.3/Example6_3.sce
7d57045ced166c37bd8149ac4b9b3bd73764749f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
428
sce
Example6_3.sce
//Example 6.3 //Program to calculate laser gain coefficient for the cavity clear; clc ; close ; //Given data L=600*10^-4; //cm - CAVITY LENGTH r=0.3; //*100 percent - REFLECTIVITY alpha_bar= 30; //per cm - LOSSES //Laser Gain Coefficient gth_bar=alpha_bar+1/L*log(1/r); //Displaying the Result in Command Window printf("\n\n\t Laser Gain Coefficient is %1.0f per cm.",gth_bar);
679fe05c8c2a09774e8456ca7d4a7c7a781faa5f
449d555969bfd7befe906877abab098c6e63a0e8
/1484/CH5/EX5.16/5_16.sce
b3b198eb15cf6ba4287c6b1cb690099c95d0d1c9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
244
sce
5_16.sce
clc //initialisation of variables H2= 1.5 //ft H1= 1 //ft A= 100 //yards^2 Cd= 0.6 g= 32.2 //ft/sec^2 //CALCULATIONS A1= A*9 T= (1.25*A1/(Cd*sqrt(2*g)))*(H1-(1/H2)^1.5) //RESULTS printf ('time of lowering the surface= %.1f sec',T)
627540f2a7df30e7d6ea2031f973e50de3fefeca
449d555969bfd7befe906877abab098c6e63a0e8
/779/CH12/EX12.12/12_12.sce
a229a66780f8c4b1a3c4bc7d22d27cd6a4049f6b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
891
sce
12_12.sce
// From table and graph h1 = 2792.2; h4 = 122.96; hb = 254.88; hc = 29.98; ha = 355.98; hd = hc; h2 = 1949.27; // m = (h1-h4)/(hb-hc); // Amount of mercury circulating Q1t = m*(ha-hd); W1t = m*(ha-hb) + (h1-h2); Nov = W1t/Q1t ; disp("%",Nov*100,"Overall efficiency of the cycle") S = 50000; // Stem flow rate through turbine in kg/h wm = S*m; disp("kg/h",wm,"Flow through the mercury turbine is") Wt = W1t*S/3600; disp("kW",Wt,"Useful work done in binary vapour cycle is") nm = 0.85; // Internal efficiency of mercury turbine ns = 0.87; // Internal efficiency of steam turbine WTm = nm*(ha-hb); hb_ = ha-WTm; // hb' m_ = (h1-h4)/(hb_-hc); // m' h1_ = 3037.3; // h' Q1t = m_*(ha-hd)+(h1_-h1); x2_ = (6.9160-0.4226)/(8.47-0.4226); h2_ = 121+(0.806*2432.9); WTst = ns*(h1_-h2_); WTt = m_*(ha-hb_)+WTst; Nov = WTt/Q1t; disp("%",Nov*100,"Overall efficiency is")
71d94ead6edace98bf30e13996a7d6d49a44c16e
449d555969bfd7befe906877abab098c6e63a0e8
/2471/CH7/EX7.6/Ex7_6.sce
b90f150bdf0306fe6b83a372d6c28b67258b25dc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
549
sce
Ex7_6.sce
clear ; clc; // Example 7.6 printf('Example 7.6\n\n'); printf('Page No. 209\n\n'); // given P = 150*10^3;// Power of compressor in W F_load = .78;// full load percentage of the time Re = .7;// Heat Recovery T = 2200;//Compressor operating time in h/year C = 20*10^-6;// Energy cost in Pound/Wh H_Re = P*F_load*Re;// in W printf('Heat recovered is %.0f W \n',H_Re) E_save = H_Re*T*C;// in Pound/year printf('Economic Saving is %3.2f Pound per year',E_save) //Deviation in answer is due to some calculation approximation the book
98ff236433c030e1551749eb90f9c02cc8dd7d5c
449d555969bfd7befe906877abab098c6e63a0e8
/1394/CH18/EX18.2.2/Ex18_2_2.sce
eb17625d9b4865165de026dfaf1d0544e2b59515
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
479
sce
Ex18_2_2.sce
clc //initialization of variables P = 1*10^-4 // membrane permeability in cm^2/sec l = 2.3*10^-4 // membrane thickness in cm d = 320*10^-4 // fiber dia in cm E = 0.5 // void fraction c0 = 1// initial concentration c = 0.1// final concentration //Calculations a = 4*(1-E)/d // surface area per module volume in cm^2/cm^3 t = (log(c0/c))*(l/P)/a // t = z/v in seconds , time gas spends in the module in sec //Results printf("The gas spends %.2f sec in the module",t)
7aa0162283cbcd56aaed491684229d351fc05cd3
27be2dd7284eb8d71ea19e6b077993d7ff6afd16
/regula_falsi.sci
05ec2a8ec15f746ec6a2c8680c1e27c4cb7fbd41
[]
no_license
mtxslv/numericalcomputation
3b0ec7d1183c03c91c145de0fb1db9fff0a75e61
15ce639e5e370fb21fb1ce9878004270ee814e73
refs/heads/master
2020-03-26T06:10:14.116677
2019-11-14T11:41:38
2019-11-14T11:41:38
144,592,787
0
0
null
null
null
null
UTF-8
Scilab
false
false
939
sci
regula_falsi.sci
function [c, n_max_it, errr] = regula_falsi(a,b, delta) // code by Mateus de Assis Silva // for more info, go to github.com/mtxslv/numericalcomputation //exec('~\Documents/axis/f.sci') fa = f(a); fb = f(b); n_max_it = 0; c = a - fa*((b-a)/(fb-fa)); errr = (b-a)/a; if (fa*fb)>0 then disp('Same signs, no zero found'); else if (f(c)*f(a)<0) then b = c; else a = c; end n_max_it = n_max_it + 1; end while (errr > delta) c = a - fa*((b-a)/(fb-fa)); fa = f(a); fb = f(b); if(f(c)*f(a)<0) then b = c; else a = c; end n_max_it = n_max_it+1; errr = abs(b-a)/a; disp('x = '); disp(c); disp('iteration ='); disp(n_max_it); end endfunction
be48e4301a9ed772e40f89d0536d4a7a3f4eede2
449d555969bfd7befe906877abab098c6e63a0e8
/443/DEPENDENCIES/17_7_data.sci
40c5a1a6b85e6209e01fa4c26c3cbe8950a0d6e4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
67
sci
17_7_data.sci
//Power rating(in kW) P=4; //Speed of the engine(in rpm) N=1500;
58f0d54dc762de81be3aec8775684187ca88703a
449d555969bfd7befe906877abab098c6e63a0e8
/3129/CH11/EX11.1/Ex11_1.sce
aece3be222ee150697358a612ec1294c7e6e584f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
895
sce
Ex11_1.sce
//Finding the Performances of an AC Voltage Controllers with On-Off Control //Example 11.1(Page No- 502) clc clear //given data R = 10;//Ohm Vs = 120;//V Vm = sqrt(2)*Vs;//V n = 25;//cycles...on m = 75;//cycles...off k = n/(n+m); //part(a) Vo = Vs*sqrt(k); printf('(a)\t The RMS value of output voltage is %dV',Vo); Io = Vo/R; printf('\n \t rms Load current is %.1fA ',Io); //part(b) Po = Io^2*R; VA = Vs*Io; PF = Po/VA;//PF = sqrt(n+(n+m)) printf('\n (b)\t The input Power factor is %.1f(lagging)',PF); //part(c) Im = Vm/R; function y=i(wt); y = (Im*sin(wt))*(n/(2*%pi*(m+n))); endfunction I_A = intg(0,%pi,i); printf('\n (c)\t The average current of thyristor is %.2fA',I_A); function y=i1(wt); y = (Im*(sin(wt)))^2; endfunction I_R = sqrt((n/(2*%pi*(m+n)))*intg(0,%pi,i1)); printf('\n \t The rms current of thyristor is %.2f A',I_R);
35d4f755e0bf4f2edfa6526fc8b6ae8ac5a42cbe
449d555969bfd7befe906877abab098c6e63a0e8
/964/CH4/EX4.4/4_4.sce
24d01cf3ff210061f08673b7616702c305701ee5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
787
sce
4_4.sce
clc; clear; function y=f(x) y=-0.1*(x^4)-0.15*(x^3)-0.5*(x^2)-0.25*(x)+1.2 endfunction x=0.5; h=input("Input h:") x1=x-h; x2=x+h; //forward difference method fdx1=(f(x2)-f(x))/h;//derivative at x et1=abs((fdx1-derivative(f,x))/derivative(f,x))*100; //backward difference method fdx2=(f(x)-f(x1))/h;//derivative at x et2=abs((fdx2-derivative(f,x))/derivative(f,x))*100; //central difference method fdx3=(f(x2)-f(x1))/(2*h);//derivative at x et3=abs((fdx3-derivative(f,x))/derivative(f,x))*100; disp(h,"For h=") disp(et1,"and percent error=",fdx1,"Derivative at x by forward difference method=") disp(et2,"and percent error=",fdx2,"Derivative at x by backward difference method=") disp(et3,"and percent error=",fdx3,"Derivative at x by central difference method=")
38195fbc90a07481f33a1f208a10e72d70f34cb8
6a41f89de459f985313d3c46c14914940107d162
/ElectronicPetFeeder/_guides/phSense/Calc_divisor_TLV431.sce
2658322021ea6fb0d9b2d41c6cbb39c013dd5027
[]
no_license
LPAE/pi3_eng_18_2
39eceebf8f44918df0827f4fec58b7e5e0ce5dea
cd94986d43b54861a7dcff08652dc62af885e92f
refs/heads/master
2020-07-06T04:34:07.322424
2019-08-26T11:46:30
2019-08-26T11:46:30
202,893,560
0
0
null
null
null
null
UTF-8
Scilab
false
false
148
sce
Calc_divisor_TLV431.sce
//Divisor de Tensão // // Vo = (R2/(R2+R1))*Vi R1 = 10E+3; Vo = 0.512 Vi = 1.24 // Vo*R2+Vo*R1 = R2*Vi //R2*(Vi-Vo) = Vo*R1 R2 = (Vo*R1)/(Vi-Vo)
6c2afbd06d4d084d131bb361035c302c367bcd7e
389bd4af3bf5a0f54f51e8aafea5035f568ba445
/while_dögüsü.sce
61343a89a4650adce2b99b7315bd7abe179d7661
[]
no_license
esraatlici/Bilgisayar-Destekli-Matematik
d47f057d9cb7ee987e367c67f8923cfcf02342d8
dae1079f60fc7e0d3b54802b4cbed9182b52fcd7
refs/heads/main
2022-12-25T11:14:25.575530
2020-10-05T15:09:58
2020-10-05T15:09:58
301,447,895
0
0
null
null
null
null
UTF-8
Scilab
false
false
49
sce
while_dögüsü.sce
f=0; g=500; while f<g f=f+1; ; end
91e52a8f6e2e93ca4f9e15310fc680932d3a7dd5
449d555969bfd7befe906877abab098c6e63a0e8
/75/CH9/EX9.13/ex_13.sce
3e7638bd750c61e3b131e8e4daef13c8d014adc1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
120
sce
ex_13.sce
// PG (619) x = %pi/4 R = [cos(x) 0 sin(x);0 1 0;-sin(x) 0 cos(x)] // Planner Rotation Orthogonal Matrix
8942c1d80d5056f6bd41214f3147f71dc5f237e0
449d555969bfd7befe906877abab098c6e63a0e8
/3526/CH11/EX11.5/EX11_5.sce
0c0cb09b4260c1f74e6d949a0ad6278ca26f603a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
617
sce
EX11_5.sce
clc;funcprot(0);//EXAMPLE 11.3 //page 325 // Initialisation of Variables %Sn=61.9;......//Percentage of the Sn in the eutectic alloy in percent %Pb=19;.......//Percentage of the Pb in the alpha phase in percent %Sn2=30;....//Percentage of the Sn in the eutectic alloy in percent //CALCULATIONS %Pa=(%Sn-%Sn2)/(%Sn-%Pb);......//The amount of compositions of primary alpha in Pb-Sn %L=(%Sn2-%Pb)/(%Sn-%Pb);......//The amount of composition of eutectic in Pb-Sn disp(round(%Pa*100),"The amount of compositions of primary alpha in Pb-Sn:") disp(round(%L*100),"The amount of composition of eutectic in Pb-Sn:")
e893f90681524b50fcad5ad1ec32961d89348800
449d555969bfd7befe906877abab098c6e63a0e8
/1367/CH15/EX15.7/15_7.sce
f3887eafa36bbf8682b6b81f22e32d191e8062bb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
386
sce
15_7.sce
//Find Impurity concentration //Ex:15.7 clc; clear; close; d=1*10^-3;//diameter in m a=3.14*(d/2)^2;//area of cross section of rod in sq m r=100;//in ohm l=10*10^-3;//in m p=a*r/l;//in ohm-m c=1/p;//conductivity e=1.602*10^-19;//charge of electron in C u_h=0.19;//mobility of holes in sqm/Vsec n_h=c/(e*u_h); disp(n_h,"Impurity concentration in rod (in per cubic m) = ");
bbb113522c3f7b997a3ac8f98f7335267c2628c6
449d555969bfd7befe906877abab098c6e63a0e8
/2492/CH5/EX5.7/ex5_7.sce
b2a8c17d28b3de36a0429e4b5f42b96eae29a8aa
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
680
sce
ex5_7.sce
// Exa 5.7 format('v',5) clc; clear; close; // GIven data R_L= 10*10^3;// in ohm h_ie = 1.1;// in k ohm h_ie = h_ie * 10^3;// in ohm h_re = 2.5*10^-4; h_fe = 50; h_oe = 24;// in µA/V h_oe = h_oe * 10^-6;// in A/V R_S = 1;// in k ohm R_S = R_S * 10^3;// in ohm Rc = 10;// in k ohm Rc = Rc * 10^3;// in ohm Ai = round(-h_fe/(1+(h_oe*R_L))); disp(Ai,"The value of Ai is"); Ri = h_ie+(h_re*Ai*R_L);// in ohm Ri= Ri*10^-3;// k ohm disp(Ri,"The value of Ri in k ohm is"); Ri= Ri*10^3;// ohm Av = (Ai*R_L)/Ri; disp(Av,"The value of Av is"); Avs = (Av*Ri)/(Ri+R_S); disp(Avs,"The value of Avs is"); Ais = (Ai*R_S)/(Ri+R_S); disp(Ais,"The value of Ais is");
26c97b68194c05cd8d8b875a13d1effa965ce117
449d555969bfd7befe906877abab098c6e63a0e8
/1202/CH17/EX17.6/17_6.sce
db47d36ac31917dd9cef0176d74d53047427f2b9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
4,886
sce
17_6.sce
clear clc //Example 17.6 disp('Example 17.6') //Note that for solving this example there are two ways //One is to do this in xcos which is very easy to do //and one can learn the same from example 17.5's solution //To get the controller outputs at every point in xcos //just add a scope to the leg connecting controller and //zero order hold unit before the continuous time block //The other method is given here so that the reader learns more //of what all can be done in scilab //Here we deal with the controller in time domain rather than z domain z=%z; N=0; a1=-1.5353; a2=0.5866; b1=0.0280; b2=0.0234; G=(b1+b2*z^-1)*z^(-N-1)/(1+a1*z^-1+a2*z^-2); h=0;//no process delay s=%s; lamda=1; Y_Ysp=1/(lamda*s+1);//exp(-h*s) is one because h=0 Eqn 17-62 Ts=1;//sampling time A=exp(-Ts/lamda); //Eqn 17-63 Y_Ysp_d=(1-A)*z^(-N-1)/(1-A*z^-1); G_DC=1/G*(Y_Ysp_d)/(1-Y_Ysp_d); //Eqn 17-61 ysp=[zeros(1,4) ones(1,16)] Gz_CL=syslin('d',G*G_DC/(G*G_DC+1));//Closed loop discrete system yd=flts(ysp,Gz_CL) //Discrete Output due to set point change //plot(yd) e=ysp-yd; //Since we know set point and the output of the system we can use //this info to find out the errors at the discrete time points //note that here we have exploited in a very subtle way the property of a //discrete system that only the values at discrete points matter for //any sort of calculation //Now this error can be used to find out the controller effort e_coeff=coeff(numer(G_DC)); p_coeff=coeff(denom(G_DC)); n=20;//Time in minutes discretized with Ts=1 min p=zeros(1,n); //Controller effort for k=3:n p(k)=(-p_coeff(2)*p(k-1)-p_coeff(1)*p(k-2)+e_coeff*[e(k-2) e(k-1) e(k)]')/p_coeff(3); end subplot(2,2,2) plot2d2(p) xtitle('Fig 17.11 (a)','Time(min)','Dahlin Controller effort (p)'); //Now we simulate the continuous version of the plant to get output in between //the discrete point. This will help us ascertain the efficacy of the controller //at points other than the discrete points //Note that this is required to be checked because deltaT=1. had it been much //smaller like 0.01 it would have been a good approx to a continuous system //thus making this interpolation check redundant s=%s; Gp=syslin('c',1/(5*s+1)/(3*s+1));//continuous time version of process Ts_c=0.01;//sampling time for continuous system t=Ts_c:Ts_c:length([0 p])*Ts; p_c=matrix(repmat([0 p],Ts/Ts_c,1),1,Ts/Ts_c*length([0 p]))//hack for zero order hold //p_c means controller effort which is continous yc=csim(p_c,t,Gp); subplot(2,2,1) plot(t,yc) plot2d2(ysp) legend("Dahlin Controller","Set point",position=4) xtitle('Fig 17.11 (a)','Time(min)','Output'); //=============Now we do calculations for modified Dahlin controller========// //==========================================================================// //Y_Ysp_d=(1-A)*z^(-N-1)/(1-A*z^-1)*(b1+b2*z^-1)/(b1+b2); //Vogel Edgar //Page 362 just after solved example G_DC_bar=(1-1.5353*z^-1+0.5866*z^-2)/(0.0280+0.0234)*0.632/(1-z^-1); //G_DC2=1/G*((1-A)*z^(-N-1))/(1-A*z^-1-(1-A)*z^(-N-1)); //Eqn 17-61 //G_DC=(1-1.5353*z^-1+0.5866*z^-2)/(0.0280+0.0234*z^-1)*0.632/(1-z^-1); ysp=[zeros(1,4) ones(1,16)] Gz_CL=syslin('d',G*G_DC_bar/(G*G_DC_bar+1));//Closed loop discrete system yd=flts(ysp,Gz_CL) //Discrete Output due to set point change //plot(yd) e=ysp-yd; //Since we know set point and the output of the system we can use //this info to find out the errors at the discrete time points //note that here we have exploited in a very subtle way the property of a //discrete system that only the values at discrete points matter for //any sort of calculation //Now this error can be used to find out the controller effort e_coeff=coeff(numer(G_DC_bar)); p_coeff=coeff(denom(G_DC_bar)); n=20;//Time in minutes discretized with Ts=1 min p=zeros(1,n); //Controller effort for k=3:n p(k)=(-p_coeff(2)*p(k-1)-p_coeff(1)*p(k-2)+e_coeff*[e(k-2) e(k-1) e(k)]')/p_coeff(3); end subplot(2,2,4) plot2d2(p) xtitle('Fig 17.11 (b)','Time(min)','Modified Dahlin Controller effort (p)'); //Now we simulate the continuous version of the plant to get output in between //the discrete point. This will help us ascertain the efficacy of the controller //at points other than the discrete points //Note that this is required to be checked because deltaT=1. had it been much //smaller like 0.01 it would have been a good approx to a continuous system //thus making this interpolation check redundant s=%s; Gp=syslin('c',1/(5*s+1)/(3*s+1));//continuous time version of process Ts_c=0.01;//sampling time for continuous system t=Ts_c:Ts_c:length([0 p])*Ts; p_c=matrix(repmat([0 p],Ts/Ts_c,1),1,Ts/Ts_c*length([0 p]))//hack for zero order hold //p_c means controller effort which is continous yc=csim(p_c,t,Gp); subplot(2,2,3) plot(t,yc) plot2d2(ysp) legend("Modified Dahlin Controller","Set point",position=4) xtitle('Fig 17.11 (b)','Time(min)','Output');
73b279f08ea267bfbe972990f87bd4ac28af4d32
449d555969bfd7befe906877abab098c6e63a0e8
/683/CH16/EX16.1/PS_1.sce
6a4707b5093372ecd0f7801445393804be6a8084
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
387
sce
PS_1.sce
// sum 16-1 clc; clear; d=30; W=20*10^3; r1=8; r2=16; p=6; u1=0.2; u2=0.15; dm=d-(p/2); alpha=atan(p/(%pi*dm)); phi=atan(u1); rm=(r1+r2)/2; Ttr=W*((dm*tan(alpha+phi)/2)+(u2*rm)); Ttr=Ttr*10^-3; // printing data in scilab o/p window printf("Ttr is %0.3f Nm ",Ttr); //The answer to Ttr is slightly different than in the book due to rounding-off of values.
fc4e872c5d88680a20e33a752bad8add55ad369b
449d555969bfd7befe906877abab098c6e63a0e8
/1757/CH5/EX5.33/EX5_33.sce
13c05590d8c1b02fc747987610ffb527826a99e1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
694
sce
EX5_33.sce
//Example5.33 // To find Slew rate and closed loop gain of an op-amp clc; clear; close; fu = 1*10^6 ; // Hz // unity gain bandwidth fmax = 5*10^3 ; // KHz // full power bandwidth F3db = 12*10^3 ; // Hz // small signal bandwidth Vp = 10 ; // V // peak volt // the full power bandwidth of an op-amp // fmax=FPBW = (Slew rate/2*3.14*Vp); Slewrate = 2*3.14*Vp*fmax; Slewrate = Slewrate*(10^-6); // *10^-6 because Slewrate is V/u disp('the Slew rate of an op-amp is = '+string(Slewrate)+' V/u sec '); // // the 3-db frequency or small signal band width //f3db = (f/ACL); //the closed loop gain ACL ACL = fu/F3db ; disp('The closed loop gain ACL is = '+string(ACL)+' ');
0bf60dec2516a2d95f940483df98da595d21a4bc
449d555969bfd7befe906877abab098c6e63a0e8
/812/CH12/EX12.02/12_02.sce
9410fab061a6397f3d0b82479a016a87e44fc014
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
691
sce
12_02.sce
//Mass flow// pathname=get_absolute_file_path('12.02.sce') filename=pathname+filesep()+'12.02-data.sci' exec(filename) //Checking for chocking: c=pb/p0; if(c<=0.528) //choked else //Not choked //Therefore pressure at exit = back pressure pe=pb; //Mach number at exit: Me=(((p0/pe)^((k-1)/k)-1)*(2/(k-1)))^0.5 //Temperature at exit(in K): Te=T0/(1+(k-1)/2*Me^2) //Velocity at exit(in m/sec): Ve=Me*sqrt(k*R*Te) //Density at exit(in kg/m^3): de=pe*10^3/R/Te //Mass flow rate of air(kg/sec): m=de*Ve*Ae end; printf("\n\nRESULTS\n\n") printf("\n\nMach number at exit: %.3f\n\n",Me) printf("\n\nMass flow rate of air: %.3f kg/sec\n\n",m)
d084079b40147798da4ec06db57b38880571729c
449d555969bfd7befe906877abab098c6e63a0e8
/3860/CH2/EX2.7/Ex2_7.sce
703161ec953b4f418819702ef38b9597474889cf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
712
sce
Ex2_7.sce
//Example 2.7: Finding POS form from given truth table. clc // Clears the console disp('Given truth table') disp('****************************************') disp("A B C | f f''") disp("0 0 0 | 1 1") disp("0 0 1 | 0 0") disp("0 1 0 | 1 0") disp("0 1 1 | 1 0") disp("1 0 0 | 1 0") disp("1 0 1 | 0 0") disp("1 1 0 | 0 1") disp("1 1 1 | 0 1") disp('f(A,B,C) = summation(1,2,3,4,5)') disp('The complement of function is as given below') disp('f''(A,B,C) = summation(0,6,7)') disp(' = A''B''C'' + ABC'' + ABC ') disp(' = A''B''C'' + AB') disp('f = (A + B + C)(A'' + B''') disp('This is the reduced POS expression')
1353165e99401917546ef9a1054a2d51a1565eca
449d555969bfd7befe906877abab098c6e63a0e8
/1628/CH3/EX3.18/Ex3_18.sce
83daecdb3ba48847170bcea0d35afd0e7e269c53
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
388
sce
Ex3_18.sce
// Examle 3.18 // From the diagram (3.33a) Apply KVL to Bigger loop i.e (For I1 ) // Will get { 10-5(I1-2)-8I1= 0 } // Using loop-circuit analysis I1=20/13; // Current through 8 ohm resistor disp(' Current through 8 ohm resistor (I1) = '+string(I1)+' Amp'); // p 74 3.18
142b441d29926b2529f5663f583efbc22c1be1f1
349b0dbeaccc8b9113434c7bce7b9166f4ad51de
/src/math/afc.sci
f7691b04b710261e7b1201f8404cfe4ac43cd0ca
[]
no_license
jbailhache/log
94a89342bb2ac64018e5aa0cf84c19ef40aa84b4
2780adfe3df18f9e40653296aae9c56a31369d47
refs/heads/master
2021-01-10T08:55:43.044934
2020-01-09T02:57:38
2020-01-09T02:57:38
54,238,064
0
0
null
null
null
null
ISO-8859-1
Scilab
false
false
2,133
sci
afc.sci
/// Ref. Statistique exploratoire multidimensionnelle, ed. Dunod, /// Initiation à l'analyse de données colonnes1 = ["ChBrn", "ChCha", "ChRou", "ChBln"]; lignes1 = ["YeMar", "YeNoi", "YeVer", "YeBle", "YeXxx"]; K1 = [ 68 119 26 7; 15 54 14 10; 5 29 14 16; 20 84 17 94]; colonnes2 = ["Chan", "Rock", "Mcla"]; lignes2 = ["Jeune", "Femme", "Homme", "Vieux"]; K2 = [ 69 41 18; 172 84 127; 133 118 157; 27 11 43]; colonnes = colonnes1; lignes = lignes1; K = K1; [n,p] = size (K); k = sum(K); F = K / k; M = F * ones(p,1); P = ones(1,n) * F; Dn = diag (M); Dp = diag (P); S = F' * inv(Dn) * F * inv(Dp); T = F * inv(Dp) * F' * inv(Dn); MP = M * P; X = (F - MP) ./ sqrt(MP); C = (F - MP) ./ (M * sqrt(P)); [valpr,vecpr] = bdiag (X'*X); valprv = diag(valpr); [valprvo,ordre] = sort (valprv); Cp = vecpr (:,ordre); lambdap = diag(valprvo); Cp1 = Cp * 1/sqrt(lambdap); Cn = C * Cp; [valpr,vecpr] = bdiag (X*X'); valprv = diag(valpr); [valprvo,ordre] = sort (valprv); Cn1 = vecpr (:,ordre); lambdan = diag(valprvo); Cn2 = Cn1 * 1/sqrt(lambdan); xset ("window", 1); plot2d (Cp(:,1), Cp(:,2), 0); for i=1 : p xstring (Cp(i,1), Cp(i,2), colonnes(i)); end plot2d (Cn(:,1), Cn(:,2), 0); for i=1 : n xstring (Cn(i,1), Cn(i,2), lignes(i)); end [valpr,vecpr] = bdiag (S); valprv = diag(valpr); [valprvo,ordre] = sort (valprv); u = vecpr (:,ordre); /// lambda = valpr(:,ordre); lambda = diag(valprvo); [valpr,vecpr] = bdiag (T); valprv = diag(valpr); [valprvo,ordre] = sort (valprv); v = vecpr (:,ordre); psi = inv(Dn) * F * inv(Dp) * u; phi = inv(Dp) * F' * inv(Dn) * v; Gp = u * lambda; /// Gn = v * lambda; /// xset ("window", 1); /// plot2d (psi(:,1), psi(:,2), 0); /// plot2d (Gn(:,1), Gn(:,2), 0); for i=1 : n /// xstring (psi(i,1), psi(i,2), lignes(i)); /// xstring (Gn(i,1), Gn(i,2), lignes(i)); end /// plot2d (phi(:,1), phi(:,2), 0); /// plot2d (Gp(:,1), Gp(:,2), 0); for i=1 : p /// xstring (phi(i,1), phi(i,2), colonnes(i)); /// xstring (Gp(i,1), Gp(i,2), colonnes(i)); end
937fe1695f9315b7ba534859b75f28efeae87860
449d555969bfd7befe906877abab098c6e63a0e8
/1748/CH1/EX1.16/Exa1_16.sce
acf8020ddd37b55284297f3e1c2280b74dddc1d0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
997
sce
Exa1_16.sce
//Exa 1.16 clc; clear; close; //given data OutputPower=1500;//in KVA OutputPower=1500*1000;//in VA V=6600;//in Volt Ra=0.4;//in Ohm Xs=6;//in Ohm per phase pf=0.8;//lagging power factor //Formula : outputPower=sqrt(3)*VL*IL Ia=OutputPower/(sqrt(3)*V);//in Ampere VPerPhase=V/sqrt(3);//in Volts //formula : Induced EMF, E=sqrt((V*cos_fi+Ia*Ra)^2+(V*sin_fi+Ia*Xs)^2) cos_fi=0.8;//Unitless sin_fi=0.6;//Unitless E=sqrt((VPerPhase*cos_fi+Ia*Ra)^2+(VPerPhase*sin_fi+Ia*Xs)^2);//in volt disp(E,"Induced emf in volt : "); disp("As excitation remains constant, E at 4364 volt remains constant."); E=4364;//in Volt disp("Let the terminal voltage for the same excitation and load current at 0.8 power factor leading be V."); disp("4364=sqrt((V*cos_fi+Ia*Ra)^2+(VPerPhase*sin_fi+Ia*Xs)^2)"); disp("V=4743 Volts"); V=4743;//in Volts TerminalVoltage=sqrt(3)*V;//in Volts disp(TerminalVoltage,"Terminal voltage line to line in Volts : "); //Note ans of 1st part is wrong in the book.s
3c0a439732f83d9e8a345f6475159ac7c2beaf0d
ad617742f184bf6d4cceb3e9c99232d8bd52b862
/tests/digest.tst
703c3d0f6762bd73a5d596047bfb96bb163bf3d3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-other-permissive", "BSD-2-Clause" ]
permissive
9track/hyperion
d621343e7eea27c45db49c7c284dd1680491c82c
9ceed2cc7261820eef01c55dac9b9a6ae47636b2
refs/heads/master
2022-09-15T12:19:09.059528
2020-05-28T03:05:29
2020-05-28T03:05:29
268,044,749
3
1
NOASSERTION
2020-05-30T09:03:56
2020-05-30T09:03:55
null
UTF-8
Scilab
false
false
11,248
tst
digest.tst
# This test file was generated from offline assembler source # by text2tst.rexx 2 Dec 2016 12:03:46 # Treat as object code. That is, modifications will be lost. # assemble and listing files are provided for information only. *Testcase digest 20161202 12.03 sysclear archlvl z r 1A0=00010001800000000000000000000616 r 1C0=00020001800000000000000000000000 r 1D0=00020001800000000000000000000000 r 400=6EE3969740E285839985A34C40859583 r 410=99A897A340A685819293A84086969940 r 420=8285A2A34097999697818781A3899695 r 430=6060606060606060 r 438=60606060606060606060606060606060 r 448=60606060606060606060606060606060 r 458=60606060606060604E4E4E4E4E4E4E4E r 468=4E4E4E4E4E4E4E4E r 470=4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E r 480=4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E r 490=6EE3969740E285839985A34C40859583 r 4A0=99A897A340A68581 r 4A8=9293A840869699408285A2A340979996 r 4B8=97818781A38996956060606060606060 r 4C8=60606060606060606060606060606060 r 4D8=6060606060606060 r 4E0=60606060606060606060606060606060 r 4F0=4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E r 500=4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E r 510=4E4E4E4E4E4E4E4E r 518=4E4E4E4E4E4E4E4E r 600=12EEA784000841A0900050A0F14C0DEE r 610=07F90AFF07F9410000804110F200B93E r 620=0002 *Program 6 runtest .1 r 622=410000004110F200B93E0000 *Program 6 runtest program .1 r 62E=B93E00024D90F600 runtest program .1 *Compare r 200.10 *Want F0000000 00000000 40000000 00000000 * * SHA1 * r 220=67452301EFCDAB8998BADCFE10325476 r 230=C3D2E1F00000000000000480 r 636=410000014110F2204120F40041300090 r 646=B93E0002 *Program 6 runtest svc .1 r 64A=41300040B93E00024710F64EB2220040 r 65A=4D90F600 runtest program .1 gpr *Gpr 2 0440 #address *Gpr 3 0000 *Gpr 4 0000 r 220.10 *Want 8FEA16BE 2F911D81 D9F428E2 3BAD6691 r 230.4 *Want 94298417 r 65E=41300050B93F00024710F662B2220040 r 66E=4D90F600 runtest svc .1 gpr *Gpr 2 0490 #address *Gpr 3 0000 *Gpr 4 0000 r 220.10 *Want 666D243D 011EFC7A F7BA3154 41E9752A r 230.4 *Want BC1249FC r 234.8 *Want 00000000 00000480 * * SHA256 * r 240=6A09E667BB67AE853C6EF372A54FF53A r 250=510E527F9B05688C1F83D9AB5BE0CD19 r 260=0000000000000480 r 672=410000024110F2404120F40041300090 r 682=B93E0002 *Program 6 runtest svc .1 r 686=41300040B93E00024710F68AB2220040 r 696=4D90F600 runtest program .1 gpr *Gpr 2 0440 #address *Gpr 3 0000 *Gpr 4 0000 r 240.10 *Want F0A7469C 39FC8746 A28C327F 76118103 r 250.10 *Want 5E07E96A AC689C36 EC17DF1F 88779E4B r 69A=41300050B93F00024710F69EB2220040 r 6AA=4D90F600 runtest svc .1 gpr *Gpr 2 0490 #address *Gpr 3 0000 *Gpr 4 0000 r 240.10 *Want 712F0D37 DD6440BF F9FFE27F 6DD8FBC0 r 250.10 *Want 785A84C6 D352D7A5 D3647682 9FF675E8 r 260.8 *Want 00000000 00000480 * * SHA512 * r 270=6A09E667F3BCC908BB67AE8584CAA73B r 280=3C6EF372FE94F82BA54FF53A5F1D36F1 r 290=510E527FADE682D19B05688C2B3E6C1F r 2A0=1F83D9ABFB41BD6B r 2A8=5BE0CD19137E21790000000000000000 r 2B8=0000000000000900 r 6AE=410000034110F2704120F40041300120 r 6BE=B93E0002 *Program 6 runtest svc .1 r 6C2=41300080B93E00024710F6C6B2220040 r 6D2=4D90F600 runtest program .1 gpr *Gpr 2 0480 #address *Gpr 3 0000 *Gpr 4 0000 r 270.10 *Want 3683E74A DE2CF007 5CB76A7C 9B5386F3 r 280.10 *Want 722122C7 9EC1B0CC E10202B2 13274F27 r 290.10 *Want 17BFB280 F0CEF114 CB9511E5 775F09DC r 2a0.10 *Want 057B9AE0 D25AF58B 161617FD 0E4E7395 r 6D6=413000A0B93F00024710F6DAB2220040 r 6E6=4D90F600 runtest svc .1 gpr *Gpr 2 0520 #address *Gpr 3 0000 *Gpr 4 0000 r 270.10 *Want 24F541F7 9ED7EF7D 703F2F73 4687F0B3 r 280.10 *Want FEE421D4 126933BD 714C0278 3C71FF52 r 290.10 *Want A5D3CEFB 1E32E356 EB021FF4 803293B4 r 2a0.10 *Want 4036039B 61CEC167 D0D5FB43 E1C46250 r 2b0.10 *Want 00000000 00000000 00000000 00000900 * * GHASH * r 2C0=6A09E667BB67AE853C6EF372A54FF53A r 2D0=510E527F9B05688C1F83D9AB5BE0CD19 r 520=000102030405060708090A0B0C0D0E0F r 530=101112131415161718191A1B1C1D1E1F r 540=202122232425262728292A2B2C2D2E2F r 550=3031323334353637 r 558=38393A3B3C3D3E3F r 6EA=410000414110F2C04120F52041300040 r 6FA=B93E00024710F6FA4D90F600 runtest svc .1 gpr *Gpr 2 0560 #address *Gpr 3 0000 *Gpr 4 0000 r 2c0.10 *Want 3835EC6F 7151E73A 2A593988 B05B7E61 r 2d0.10 *Want 510E527F 9B05688C 1F83D9AB 5BE0CD19 *Done
f506a652907651325e264443bc5a1a13008ec09a
449d555969bfd7befe906877abab098c6e63a0e8
/154/DEPENDENCIES/ch11_1.sce
cb812c5998feb8624e00d8fa37fd0bfe15fbabb4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
ch11_1.sce
clc disp("Problem 11.1") printf("\n") printf("Given") disp("Resistance =1000ohm") t=0:0.5:1; i=1;i1=-1; figure a=gca() plot(t,i,t+1,i1,t+2,i,t+3,i1) xtitle("i vs t",'t in ms','i in mA') i=1*10^-3;R=1000; //p=i^2*R p=i^2*R; figure a=gca() plot(t,p) xtitle("p vs t",'t in ms','p in mW')
c03df7fcfeee67cf72bc1aab4acbd78142535498
449d555969bfd7befe906877abab098c6e63a0e8
/3480/CH4/EX4.4/Ex4_4.sce
9c070b8147280c9c269f9c6277dbc2ff132ab648
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
115
sce
Ex4_4.sce
//example 4.4, page 92 clc n=1.6 r1=.080//in cm r2=-0.080 P=(n-1)*((1/r1)-(1/r2)) printf("\n The power is %f D",P)
0b97b474fe31e06c68a945ca07f929a2efe03658
449d555969bfd7befe906877abab098c6e63a0e8
/911/CH5/EX5.11.a/ex_5_11_a1.sce
d15c48ac0a27213f0f8a4b0f5c43f3ab1d29edaa
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
552
sce
ex_5_11_a1.sce
// example 5.11(a)// clc clear ; disp ('Given the truthtable has high output for following conditons : ' ); a =[1 0 0 0; 1 1 0 1 ;1 1 0 0 ; 1 0 0 0 ] //given input conditions for which output is high// disp (a) for (i =1:4) if a(i ,1) ==1 then b(i ,1)= 'A' else b(i ,1)= 'A^ ' end if a(i ,2) ==1 then b(i ,2)= 'B ' else b(i ,2)= 'B^ ' end if a(i ,3) ==1 then b(i ,3)= 'C ' else b(i ,3)= 'C^ ' end end disp ( 'When you OR these products you get : ' ) //displaying sum of products x= strcat ([b(1 ,1) '+' b(3 ,3) ]); disp (x)
ebeee1525f4fcaff8d67c96741aa8af7a4dafabc
c557cd21994aaa23ea4fe68fa779dd8b3aac0381
/test/macro.tst
acd5dba6f898007ca063429b1d752ebfce7dc8cf
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
dougsong/reposurgeon
394001c0da4c3503bc8bae14935808ffd6f45657
ee63ba2b0786fa1b79dd232bf3d4c2fe9c22104b
refs/heads/master
2023-03-09T15:22:45.041046
2023-02-25T08:33:06
2023-02-25T08:33:06
280,299,498
1
0
NOASSERTION
2023-02-25T08:33:08
2020-07-17T01:45:32
Go
UTF-8
Scilab
false
false
435
tst
macro.tst
## Test the macro facility set echo set testmode read <simple.fi set interactive print Test that we can define and see macro definitions define fubar list define print Test that invoking the macro produces output :49 do fubar print Test that undefining the only macro removes it from the internal list undefine fubar define print Test multiline macroexpansion define fubaz { {0} list } do fubaz :49 undefine fubaz print Tests complete
adf63e7acb5d0e63f2d9f027723fe5e624e94604
449d555969bfd7befe906877abab098c6e63a0e8
/125/DEPENDENCIES/ifft2d.sce
cae21fae06dce3f37a4f23bc306cad98fa8003ce
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
410
sce
ifft2d.sce
function [a] =ifft2d(a2) //a2 = 2D-DFT of any real or complex 2D matrix //a = 2D-IDFT of a2 m=size(a2,1) n=size(a2,2) //Inverse Fourier transform along the rows for i=1:n a1(:,i)=exp(2*%i*%pi*(0:m-1)'.*.(0:m-1)/m)*a2(:,i) end //Inverse fourier transform along the columns for j=1:m atemp=exp(2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*(a1(j,:)).' a(j,:)=atemp.' end a = a/(m*n) a = real(a) endfunction
e7b25be3e82720c1f0f5cac34cf14a3007b75510
449d555969bfd7befe906877abab098c6e63a0e8
/1931/CH1/EX1.3/3.sce
71b9bb36d3d7bf50aebeb185716dc8d403e1d207
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
328
sce
3.sce
clc clear //INPUT DATA I=1000//sound intensity of plane leaving the runway in Wm^-2 Io=10^-12//threshold intensity of sound in Wm^-2 //CALCULATION IL=(10*log10(I/Io))//The intensity level of a plane just leaving the runway in dB //OUTPUT printf('The intensity level of a plane just leaving the runway is %i dB',IL)
c2dd5c3ec0773fdb89df07f47770245675023bb1
449d555969bfd7befe906877abab098c6e63a0e8
/339/CH2/EX2.7/ex2_7.sce
79f33fcc7f1b96b69a3178ed07b5dba961e83f43
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
465
sce
ex2_7.sce
L=209.4*10^-9; //line inductance in H/m C=119.5*10^-12; //line capacitance in F/m vp=1/sqrt(L*C); // phase velocity Z0=sqrt(L/C); // characteristic line impedance d=0.1; // line length N=500; // number of sampling points f=1e9+4e9*(0:N)/N; // set frequency range Z=cotg(2*%pi*f*d/vp); // short circuit impedance plot(f/1e9,abs(Z0*Z)); title('Input impedance of an open-circuited line'); xlabel('Frequency , GHz'); ylabel('Input impedance |Z|, {\Omega}');
458b69112fc291639778e5a209d4b29128b80fb1
449d555969bfd7befe906877abab098c6e63a0e8
/1076/CH9/EX9.5/9_5.sce
33edf048a0075b87b2fe61048f384d88a992c29b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
544
sce
9_5.sce
clear clc Y=[ .7-%i*3 -.2+%i -.5+2*%i %inf %inf %inf -.3+2*%i -.5+3*%i %inf %inf %inf -1+4*%i %inf %inf %inf %inf ] disp("inf shows that this value is to be found ") disp(Y,"given") Y(1,4)=round(Y(1,1)+Y(1,3)+Y(1,2)) Y(4,4)=0-Y(1,4)-Y(2,4)-Y(3,4) Y(4,1)=Y(1,4) Y(2,1)=Y(1,2) Y(3,2)=Y(2,3) Y(3,1)=Y(1,3) Y(4,2)=Y(2,4) Y(4,3)=Y(3,4) Y(2,2)=0-Y(2,1)-Y(2,4)-Y(2,3) Y(3,3)=0-Y(3,1)-Y(3,4)-Y(3,2) disp(Y,"completed")
ac2062180781d9ea389ad68ee606187a8a9b2f6f
449d555969bfd7befe906877abab098c6e63a0e8
/3769/CH22/EX22.22/Ex22_22.sce
8efacac86fbf77dba1c6a56c828054f4e798b439
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex22_22.sce
clear //Given a=1.33 //Calculation // ap=atan(a)*180/3.14 //Result printf("\n Angle of incidence is %0.0f Degree",ap)