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
fbefe7c923b68c765cbff8634e59db36c7ee31bd
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.5/Unix-Windows/scilab-2.5/macros/arma/prbs_a.sci
001af69b71e87439d1a392d2f2e44faae23e6653
[ "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
710
sci
prbs_a.sci
function [u]=prbs_a(n,nc,ids) //generation of pseudo random binary sequences //u=[u0,u1,...,u_(n-1)]; //u takes values in {-1,1} and changes at most nc times its sign. //ids can be used to fix the date at which u must change its sign //ids is then an integer vector with values in [1:n]. //! // Copyright INRIA [lhs,rhs]=argn(0) if rhs <=2, rand('uniform'); yy= int(mini(maxi(n*rand(1,nc),1*ones(1,nc)),n*ones(1,nc))); ids=sort(yy);ids=[n,ids,1]; else [n1,n2]=size(ids); ids=[n,mini(n*ones(ids),maxi(sort(ids),1*ones(ids))),1]; end u=0*ones(1,n); [n1,n2]=size(ids); val=1; for i=1:n2-1, if ids(i)<>ids(i+1); u(ids(i+1):ids(i))=val*ones(ids(i+1):ids(i));val=-1*val; end end
c7d5e1b11d16111f5ccc9eae332593e58df606a0
c557cd21994aaa23ea4fe68fa779dd8b3aac0381
/test/unite.tst
a6bd7f597d4302d7a2c5ee45149ae5348e8d390c
[ "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
87
tst
unite.tst
## Test of the unite feature read <bzr.fi read <testrepo.fi unite bzr testrepo write -
c3c63fbf84b9909007f2099d01f4971b65556ab6
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/mget.man.tst
afb0ffd05a370f3a03de72e211c4905de2d837df
[ "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
353
tst
mget.man.tst
clear;lines(0); file1 = 'test1.bin'; file2 = 'test2.bin'; fd1=mopen(file1,'wb'); fd2=mopen(file2,'wb'); mput(1996,'ull',fd1); mput(1996,'ull',fd2); mclose(fd1); mclose(fd2); fd1=mopen(file1,'rb'); if 1996<>mget(1,'ull',fd1) ;write(%io(2),'Bug');end; fd2=mopen(file2,'rb'); if 1996<>mget(1,'ull',fd2) ;write(%io(2),'Bug');end; mclose(fd1); mclose(fd2);
8f32c3618c25219cf1ee986a35f8511116fb16e4
5f4fdac82318f5e872c34c1104dd12d4721229e7
/WebApplication/Examples/ModelInterfaces/tst/ModelInterfaces.tst
bd885c0f82cfaa257fbf0a5984bdd054073eeeb3
[]
no_license
NeVeSpl/NTypewriter.Examples
4698926e843aea863168233ae9abbaf948ca500e
0477a6273318ee7bd69dff4779afd01f6475134f
refs/heads/master
2023-04-26T13:28:51.392199
2021-06-01T08:36:33
2021-06-01T08:38:13
372,547,271
0
0
null
null
null
null
UTF-8
Scilab
false
false
126
tst
ModelInterfaces.tst
module Models { $Classes(*Model)[ export interface $Name$TypeParameters {$Properties[ $name: $Type;] }] }
aaeedb8b7423c009d8c4966f525f5cf09cdfabc2
449d555969bfd7befe906877abab098c6e63a0e8
/671/CH4/EX4.37/4_37.sce
dcf69a414a993e6240ce1f4dbf50615c16c4a8a1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
4_37.sce
function Zeq=parallel(Z1,Z2) Zeq=Z1*Z2/(Z1+Z2) endfunction function [x,y]=polar_to_cart(r,theta) theta=theta/180*%pi x=r*cos(theta) y=r*sin(theta) endfunction [Ir,Ic]=polar_to_cart(20,60) I=complex(Ir,Ic) w=5000 R=3000 L=1 C=0.25E-6 Xl=w*L*%i Xc=1/(w*C*%i) Z=parallel(R+Xl,Xc) V=I*Z disp(V)
a662320261534c57a1b710cba74811d5c71f94a1
449d555969bfd7befe906877abab098c6e63a0e8
/1427/CH35/EX35.8/35_8.sce
37dcaa4d53ea575416a4def7ece2c92f8a74f803
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
286
sce
35_8.sce
//ques-35.8 //Calculating frequency of oxygen and hydrogen bond clc k=770;//force constant (in N/m) r_m=1.563*10^-27;//reduced mass (in kg) f=(1/(2*%pi))*sqrt(k/r_m); w_n=f/(3*10^8); printf("The frequency required is %.3f*10^14 Hz and wave number is %d /cm.",f*10^-14,w_n/100);
036fd04647552fbc163011bb2b2ba7f9ae4cfb28
449d555969bfd7befe906877abab098c6e63a0e8
/284/CH13/EX13.7/ex7.sce
2909d12af8822e9baf0422e3808be36b440ea9e2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
426
sce
ex7.sce
// Chapter 13_Optical Devices //Caption_PIN Photodiode //Ex_7//page 618 e = 1.6*10^-19; W=20*10^-4 //intrinsic region width phio=10^17 //photon flux alpha=10^3 //absorption coefficient GL1=alpha*phio //generation rate of electron hole pair at the front region GL2=GL1*exp(-alpha*W) JL=1000*e*phio*(1-exp(-alpha*W)) //photocurrent density printf('The photocurrent density in PIN photodiode is %1.1f mA/cm^2 ',JL)
8f7964cada9dcd04b6713a88cb55455bb7a53412
449d555969bfd7befe906877abab098c6e63a0e8
/3872/CH3/EX3.8/Ex3_8.sce
7645ebfa4f64c6bacfcc03b97d4d1e2634540786
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,514
sce
Ex3_8.sce
//Book - Power system: Analysisi & Design 5th Edition //Authors - J. Duncan Glover, Mulukutla S. Sarma, and Thomas J.Overbye //Chapter-3 ;Example 3.8 //Scilab Version - 6.0.0; OS - Windows clc; clear; Sr=200 //rated power of transformer in MVA VT1p=345 // rated voltage of transformer primary side in kV VT1s=34.5 // rated voltage of transformer secondary side in kV Xeq=0.08 // leakage reactance of transformer in ohms pf=0.8 //lagging power factor Irated=1.0 //rated current in Amperes Irated1=1.0*exp(%i*(-36.87)*(%pi/180)) //consider real and imaginary value of rated current VAN=1.0 //source voltage in Volts Vdrop=Irated*Xeq //per unit magnitudes of transformer voltage drop Van=VAN-(%i*Xeq)*Irated1 //per unit magnitudes of transformer voltage at low voltage terminals Isc=VAN/Xeq //per unit magnitudes of transformer fault current printf('The magnitude of transformer voltage drop in per unit is %.4f pu \n',Vdrop); printf('The magnitude of transformer voltage at low voltage terminal in per unit is %.4f and its angle is %.4f degrees\n',abs(Van),atand(imag(Van),real(Van))); printf('The magnitude of fault current in per unit is %.4f pu\n',Isc);
fbfbe6d2e39524473ba436fd02826fbd3ffa9b23
449d555969bfd7befe906877abab098c6e63a0e8
/63/CH10/EX10.5/Exa10_5.sci
7b5deac1b757de045516a5270e1bbc67538f2db6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
294
sci
Exa10_5.sci
//Determine the formula for the cutoff wavelength in a standard rectangular waveguide for the TM11 mode m = 1; n = 1; a = 1; b = a/2; lambda0 = 2/sqrt((m/a)^2 + (n/b)^2); disp('*a', lambda0, 'Formula for the cutoff wavelength in a standard rectangular waveguide for the TM11 mode',)
522662c1b3084defe587a5ebaa9910e640d5913c
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.4.1/macros/util/g_cos.sci
31f419e04f434b735ee32badda2b493f1b82a784
[ "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
57
sci
g_cos.sci
function sp=g_cos(a) // Copyright INRIA sp=cos(full(a))
02c21c497325cb75fa73339ebf3d741c043a176a
6227c5ef4e1c5d72cdebd6eac81f82161dda7e17
/digi_dc_dc/Scilab/ConverterModels/Boost_matrix.sci
12f9ec0cee1df97f5c4e5f13c356094895ff57fe
[]
no_license
maxsimmonds1337/Scilab
b4e8a03a9fbeda4d8f6e51e07d205bcf51addce8
b413659e2b697565c24ad440d158f5bd28203570
refs/heads/master
2022-11-04T23:17:50.045864
2020-06-13T20:35:24
2020-06-13T20:35:24
272,081,285
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,084
sci
Boost_matrix.sci
// function for extracting the discrete model for a Boost converter //Taken from "Digital control of high frequency PWM converters" p.14 // It will generate the Matrixes function [A1,A0,b1,b0,c1,c0,V]=Boost_matrix(L,rl,C,rc,Vg,D,Vload,Iload,Rload) //Outputs are the matrixes and the input vector //iput parameters are inductance L, inductance parasisitc resistor rl, capacitor C, resistance in capacitor rC, input voltage Vg, //Voltage on load Vload, current Iload, load Resistance Rload, //Definition of state Matrixes taken from insert 3.4 //Input vector V=[Vg;Iload;Vload]; rpar=rc/(1+rc/Rload); //Combination of the ESR of cap and Rload //States with closed Switch A1=[-1/L*rl 0; 0 -1/C*1/(Rload+rc)]; b1=[1/L 0 0; 0 -1/C*1/(1+rc/Rload) 1/C*1/(Rload+rc)]; c1=[1 0; 0 1/(1+rc/Rload)]; //States with open switch A0=[-1/L*(rpar+rl) -1/(1+rc/Rload)*1/L; 1/C*1/(1+rc/Rload) -1/C*1/(Rload+rc)]; b0=[1/L rpar/L -1/(1+Rload/rc)*1/L; 0 -1/C*1/(1+rc/Rload) 1/C*1/(Rload+rc)]; c0=[1 0; rpar 1/(1+rc/Rload)]; endfunction
2838e52768cae5a1669273721f551e0b1054c519
449d555969bfd7befe906877abab098c6e63a0e8
/257/CH7/EX7.27/example_7_27.sce
8616a1efc28616b1b49e797d6b1e77c38bacf683
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
329
sce
example_7_27.sce
syms s G= 100/(s^2*(s+2)*(s+5)) syms s Kp=limit(s*y/s,s,0) //Kp= position error coefficient Kv=limit(s*G*H,s,0) //Kv= velocity error coefficient Ka=limit(s^2*G*H,s,0) //Ka= accelaration error coefficient disp(Ka ,"Ka = ") disp(Kv ,"Kv = ") disp(Kp ,"Kp = ") Ess=1/(1+Kp) + (1/Kv) + (4/Ka) disp(Ess, "Ess = ")
65ef551175e89e83769820eaa70d821b2e6b506d
449d555969bfd7befe906877abab098c6e63a0e8
/1949/CH3/EX3.11/Ex3_11.sce
32c7458750795f992e672caea04a1c5ebcadf49d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
524
sce
Ex3_11.sce
//Chapter-3,Example 3_11,Page 3-22 clc() //Given Data: u1=1.54 //R.I. of Core u2=1.5 //R.I.of Cladding lam=1.3*10^-6 //wavelength in meter a=25*10^-6 //core radius in meter //Calculations: NA=sqrt(u1^2-u2^2) //Formula to find Numerical Aperture V=2*%pi*a*NA/lam //cut off parameter printf('Cut off parameter of Fibre is =%.2f \n \n',V) N=(V^2)/2 //Number of modes printf(' Number of modes of Fibre is =%.0f \n',N)
1ea1c68f04153eca7f6855751981d44358448d6e
449d555969bfd7befe906877abab098c6e63a0e8
/1022/CH14/EX14.4/14_4.sce
a6718775babeb9bf5220a40babe4830859568f61
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
354
sce
14_4.sce
clc //initialisation of variables T= 100 //F T1= 2000 //F W= 3.2*10^4 //Btu/hr ft^2 W1= 140 //Btu/hr ft^2 s= 0.17*10^-8 //Btu/hr ft^2 R^4 //CALCULATIONS alpha= W/(s*(T1+460)^4) b= W1/(s*(T+460)^4) //RESULTS printf ('Average absorptivity of the body at 100 F = %.2f ',alpha) printf (' \n Average absorptivity of the body at 2000 F= %.2f ',b)
28a25fc1ac13f220a2021b9def5720bcd40b6b8a
c5a5b51d0d9d4bb57cc4508c2ffc453ccf47aeba
/istrellis/test_istrellis.sce
6ced6f8cef7a3aee5621de373c217102192c6827
[]
no_license
PolaPriyanka/ScilabCommunication
2adca45f772b2ca6a602e10e4801576eeb0da33d
5b5c704e591f20be6944800a1b4b25cf06f56592
refs/heads/master
2021-01-01T18:22:48.761766
2015-12-16T07:26:29
2015-12-16T07:26:29
42,721,104
1
0
null
null
null
null
UTF-8
Scilab
false
false
479
sce
test_istrellis.sce
// Valid trellis structure trellis.numInputSymbols = 4; trellis.numOutputSymbols = 4; trellis.numStates = 3; trellis.nextStates = [0 1 2 1;0 1 2 1; 0 1 2 1]; trellis.outputs = [0 0 1 1;1 1 2 1; 1 0 1 1]; [isok,status] = istrellis(trellis) //Inavlid trellis structure trellis.numInputSymbols = 3; trellis.numOutputSymbols = 3; trellis.numStates = 3; trellis.nextStates = [0 1 2 ;0 1 2 ; 0 1 2 ]; trellis.outputs = [0 0 1 ;1 1 2 ; 1 0 1 ]; [isok,status] = istrellis(trellis)
e66ae0dce4c2a6b308d6c570a557dfe714692e51
449d555969bfd7befe906877abab098c6e63a0e8
/1808/CH3/EX3.2/Chapter3_Exampl2.sce
8b0234adee6545c0c9c03112e9c507f42d30896a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
611
sce
Chapter3_Exampl2.sce
clc clear //INPUT DATA Tl=150;//engine temprature in Degree C Th=1100;//engine temprature in Degree C Qs=4000;//Heat is added in kJ/min //CALCULATIONS nc=((Th-Tl)/(Th+273))*100;//Efficiency of carnot cycle in percentage wd=nc*Qs/100;//workdone in kJ/min P=wd/(60);//power developed in kJ/s Qr=Qs-wd;//Quality of heat rejected in kJ/min ds=(Qs-wd)/(Tl+273);//Change in entropy during heat rejection in kJ/min //OUTPUT printf('(a)power developed in the engine is %3.2f kJ/s \n (b)Quality of heat rejected is %3.2f kJ/min \n (c)Change in entropy during heat rejection is %3.2f kJ/min',P,Qr,ds)
57b20d59cae5a08c3bcd5d3717a29876b9041d6a
91bba043768342a4e23ee3a4ff1aa52fe67f7826
/cs/142/1/tests/test27.tst
83f8846d8cb2fd6f05dd3f6a8126edb54a8c2e2f
[]
no_license
MaxNanasy/old-homework
6beecc3881c953c93b847f1d0d93a64ec991d6de
48b7997a49a8f111344f30787c178e1661db04bd
refs/heads/master
2016-09-08T04:37:44.932977
2010-03-02T00:48:59
2010-03-02T00:48:59
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
38
tst
test27.tst
type x = array 100 of void;main () { }
c1149e525c72c0ae23cc8c2cd98e764e465fea71
449d555969bfd7befe906877abab098c6e63a0e8
/2855/CH6/EX6.6/Ex6_6.sce
431e1567af7531baa2fd894bebba94dac84fee59
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
574
sce
Ex6_6.sce
//chapter 6 //page no155 //Ex6_6 //given clear; clc; Impd1=250; //in microA Impd0=25; //in microA Iref=(1/16)*Impd1*10^-6; printf("\n Reference current is %0.3f microA",Iref*10^6) Rref=1.5/Iref; printf("\n External bias resistor value Rref1is %0.0f kohm",Rref/1000) //or Rref1=24/Impd1/10^-6; printf("\n Also,Rref1=24/Impd \n External bias resistor value is %0.0f kohm",Rref1/1000) Irefz=(1/4)*Impd0; printf("\n Ref0 current is %0.2f microA",Irefz) Rrefz=1.5/Irefz/10^-6; printf("\n External bias resistor value Rrefz is %0.0f kohm",Rrefz/1000)
5c8d87036b9b746a442bd8d08fb3d036a627610d
449d555969bfd7befe906877abab098c6e63a0e8
/2489/CH9/EX9.3/9_3.sce
830f4892c9d5e8d89cd746422a1f70204f515db7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
217
sce
9_3.sce
clc //Intitalisation of variables clear Kf= 5.12 m= 0.911 //gms m1= 50 //gms dT= 0.603 //deg //CALCULATIONS M2= Kf*1000*m/(m1*dT) //RESULTS printf ('Molecular weight of carbon tetra chloride = %.f gms',M2)
80b5704053712dcfd75a769a453414e3250d97e9
b9c6de66a61d6f9a57edaa44baf92266ccbab3db
/macros/distfun_binopdf.sci
2f95af440ed231494e2a317d61b639ed756b8a51
[]
no_license
papriwalprateek/distfun-scilab
81b3edef0af1d1908e05472dfb15b0a55f61571d
82fd34521d1e6ebb6513773264b54a0d48f5f3f9
refs/heads/master
2016-09-03T07:08:47.605240
2013-10-13T05:53:43
2013-10-13T05:53:43
null
0
0
null
null
null
null
ISO-8859-15
Scilab
false
false
5,024
sci
distfun_binopdf.sci
// Copyright (C) 2012 - Michael Baudin // Copyright (C) 2012 - Prateek Papriwal // // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt function y = distfun_binopdf(varargin) // Binomial PDF // // Calling Sequence // y = distfun_binopdf(x,N,pr) // // Parameters // x : a 1x1 or nxm matrix of doubles, the number of Bernoulli trials after in which success occurs . x belongs to the set {0,1,2,3,...,N} // N : a 1x1 or nxm matrix of doubles , the total number of binomial trials . N belongs to the set {1,2,3,4,.......} // pr : a 1x1 or nxm matrix of doubles, the probability of success in a Bernoulli trial // y : a nxm matrix of doubles, the probability density. // // Description // Computes the probability distribution function of // the Binomial distribution function. // // Any scalar input argument is expanded to a matrix of doubles // of the same size as the other input arguments. // // The function definition is: // //<latex> //\begin{eqnarray} //f(x,N,pr) = \binom{N}{x} p_r^x (1-p_r)^{N-x} //\end{eqnarray} //</latex> // // Analysis of the random variable. // // Assume that we perform a Bernoulli trial, where // the probability of success is pr and the probability // of failure is 1-pr. // Each time we make the experiment, we replace the // ball in the urn, i.e. this is an experiment with // replacement. // We repeat this experiment N times. // Let X be the number of successes. // Then the random variable X has a binomial distribution with parameters // N and pr. // // Instead, when the sampling is done without replacement, // the hypergeometric distribution must be // considered. // However, when X is much smaller than N, then // the binomial distribtion is a good approximation. // //Examples // // Check with x scalar, N scalar, pr scalar //y = distfun_binopdf(0,200,0.02) //expected = 0.0175879 // // // Check with expanded x //computed = distfun_binopdf([5 15],100,0.05) //expected = [0.1800178 0.0000988] // // // Check with expanded N //computed = distfun_binopdf(5,[50 100],0.05) //expected = [0.0658406 0.1800178] // // // Check with two arguments expanded //computed = distfun_binopdf([5 10],[50 100],0.05) //expected = [0.0658406 0.0167159] // // // Check with all the arguments expanded //computed = distfun_binopdf([5 10],[50 100],[0.05 0.1]) //expected = [0.0658406 0.1318653] // // // Check y = distfun_binopdf(x,N,pr) with large value of N // computed = distfun_binopdf(2,1000,0.5) // expected = 4.66165177442386078D-296 // // // Plot the function // scf(); // N1 = 20; // x = 0:N1; // y1 = distfun_binopdf(x,N1,0.5); // plot(x,y1,"bo-") // N2 = 20; // x = 0:N2; // y2 = distfun_binopdf(x,N2,0.7); // plot(x,y2,"go-") // N3 = 40; // x = 0:N3; // y3 = distfun_binopdf(x,N3,0.5); // plot(x,y3,"ro-") // legend(["pr=0.5, N=20","pr=0.7, N=20","pr=0.5, N=40"]); // xtitle("Binomial PDF","x","P(x)") // // Bibliography // http://en.wikipedia.org/wiki/Binomial_distribution // http://forge.scilab.org/index.php/p/specfun/source/tree/HEAD/macros/specfun_nchoosek.sci // Boost C++ librairies, Binomial Coefficients, 2006 , 2007, 2008, 2009, 2010 John Maddock, Paul A. Bristow, Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan Råde, Gautam Sewani and Thijs van den Berg // // Authors // Copyright (C) 2012 - Prateek Papriwal // Copyright (C) 2012 - Michael Baudin [lhs,rhs] = argn() apifun_checkrhs("distfun_binopdf",rhs,3) apifun_checklhs("distfun_binopdf",lhs,0:1) // x = varargin(1) N = varargin(2) pr = varargin(3) // // Check type apifun_checktype("distfun_binopdf",x,"x",1,"constant") apifun_checktype("distfun_binopdf",N,"N",2,"constant") apifun_checktype("distfun_binopdf",pr,"P",3,"constant") // // Check size : nothing to do // [x,N,pr] = apifun_expandvar(x,N,pr) if (x == []) then y=[] return end // Check content apifun_checkrange("distfun_binopdf",x,"x",1,0,N) apifun_checkflint("distfun_binopdf",N,"N",2) apifun_checkgreq("distfun_binopdf",N,"N",2,1) apifun_checkrange("distfun_binopdf",pr,"P",3,0,1) r = ones(N) i = find(N>x) if (i<>[]) then r(i) = 1 ./ ((N(i)-x(i)) .* beta(x(i)+1, N(i)-x(i))) end r = round ( r ) lny = log(r) + x .* log(pr) + (N-x) .* specfun_log1p(-pr) y = exp(lny) endfunction
826336299490d36cf1694377514fb7facac3a6b8
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.4.1/macros/metanet/supernode.sci
8ebee5a4f92d20aaa5ce9c7d6c071886800979da
[ "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
2,551
sci
supernode.sci
function [g1]=supernode(v,g) // Copyright INRIA [lhs,rhs]=argn(0) if rhs<>2 then error(39), end // check v s=size(v) if s(1)<>1 then error('First argument must be a row vector') end // check g check_graph(g) //set of nodes v replaced by one n=g('node_number'); vv=-sort(-v); w=vv(2:$)-vv(1:($-1)); [ir,ic]=find(w==0); vv(ic)=[]; if (vv(1)<1)|(vv($)>n) then error('A number in first argument is not a node number') end if vv($)==n then error('The graph must not be reduced to one node') end g1=g;ne=size(g('tail'),2); a=g('tail');b=g('head'); a1=a;b1=b; vta=[];vhe=[]; ndel=size(vv,2); for i=1:ndel, ii=vv(i); [ir,ic]=find(a==ii); vta=[vta ic]; [ir,ic]=find(b==ii); vhe=[vhe ic]; end if (size(vv,2)>1) then for i=size(vv,2):-1:2, ii=vv(i); [ir,ic]=find(a1>ii); if ic <> [] then a1(ic)=a1(ic)-1; end; [ir,ic]=find(b1>ii); if ic <> [] then b1(ic)=b1(ic)-1; end; end end a1(vta)=vv(1)*ones(vta);b1(vhe)=vv(1)*ones(vhe); [ir,ic]=find((a1==vv(1))&(b1==vv(1))); a1(ic)=[];b1(ic)=[]; noe=[1:ne];noe(ic)=[]; g1=make_graph('foo',g('directed'),(n+1-ndel),a1,b1); idel=vv(2:$);ivv=vv(1); a=g('node_type');a(idel)=[];g1('node_type')=a; a=g('node_x');a(ivv)=sum(a(vv))/ndel;a(idel)=[];g1('node_x')=a; a=g('node_y');a(ivv)=sum(a(vv))/ndel;a(idel)=[];g1('node_y')=a; a=g('node_color');a(idel)=[];g1('node_color')=a; // if g('node_diam') <> [] then a=g('node_diam');nd1=[g('default_node_diam') a(ivv)]; a(ivv)=2.*max(nd1);a(idel)=[];g1('node_diam')=a; end; // if g('node_border') <> [] then a=g('node_border');nd1=[g('default_node_border') a(ivv)]; a(ivv)=2.*max(nd1);a(idel)=[];g1('node_border')=a; end; // a=g('node_font_size');a(idel)=[];g1('node_font_size')=a; // if g('node_demand') <> [] then a=g('node_demand'); a(ivv)=sum(a(vv));a(idel)=[];g1('node_demand')=a; end; // if g('node_label') <> [] then a=g('node_label');g1('node_label')=a(noe); end; // a=g('edge_name');g1('edge_name')=a(noe); a=g('edge_color');g1('edge_color')=a(noe); a=g('edge_width');g1('edge_width')=a(noe); a=g('edge_hi_width');g1('edge_hi_width')=a(noe); a=g('edge_font_size');g1('edge_font_size')=a(noe); a=g('edge_length');g1('edge_length')=a(noe); a=g('edge_cost');g1('edge_cost')=a(noe); a=g('edge_min_cap');g1('edge_min_cap')=a(noe); a=g('edge_max_cap');g1('edge_max_cap')=a(noe); a=g('edge_q_weight');g1('edge_q_weight')=a(noe); a=g('edge_q_orig');g1('edge_q_orig')=a(noe); a=g('edge_weight');g1('edge_weight')=a(noe); if size(g('edge_label'),2) <> 0, a=g('edge_label');g1('edge_label')=a(noe); end;
a6ae00aa0ce93b618dbd08dc236bbe5d58987741
449d555969bfd7befe906877abab098c6e63a0e8
/172/CH16/EX16.3/ex3.sce
01cc047eb6b9a867fc071b5d7745f8c68ec6ad95
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
ex3.sce
//ques3 //calculating equilibrium constant clear clc dG1=-457.166;//change in gibbs free energy at temp 298 K from example2 in kJ dG2=-271.040;;//change in gibbs free energy at temp 2000 K from example2 n kJ T1=298;//K T2=2000;//K R=8.3145;//gas constant K1=dG1*1000/(R*T1); K2=dG2*1000/(R*T2); printf('Equilibrium constant at %.0f K = %.3f \n',T1,K1); printf(' Equilibrium constant at %.0f K = %.3f \n',T2,K2);
0f8e5b8784e4a0702359cd2676d46fac95c3cdaf
23573b967e8324d44226379d70559b8f0ea34905
/code/linprog/MultiStage_Planning_Problem.sce
51d37ddca4f1c0d21f86427a14139bd6ca65a92d
[]
no_license
FOSSEE/FOT_Examples
91c8b8e9dc58545604b2c2af41a7e22f702b78f3
75947a7aa5a3955fe5a72e09f55bbdc05e3b8751
refs/heads/master
2020-03-22T09:00:48.306061
2018-07-24T04:49:25
2018-07-24T04:49:25
139,807,736
0
0
null
null
null
null
UTF-8
Scilab
false
false
6,386
sce
MultiStage_Planning_Problem.sce
//Reference : Bradley, Hax, and Magnanti,"Applied Mathematical Programming", Addison-Wesley, 1977, chapter 5 // The data given in the Multi-stage planning problem are as follows //An automobile tire company has the ability to produce both nylon and fiberglass tires. During the next three months they have agreed to deliver tires as follows // ========================================= // Date Nylon Fiberglass // ----------------------------------------- // June 30 4000 1000 // July 31 8000 5000 // August 31 3000 5000 // ========================================= //The company has two presses, a Wheeling machine and a Regal machine, and appropriate molds that can be used to produce these tires, with the following production hours available in the upcoming months // ================================================ // Wheeling Machine Regal Machine // ------------------------------------------------ // June 700 1500 // July 300 400 // August 1000 300 // ================================================ //The production rates for each machine-and-tire combination, in terms of hours per tire, are as follows: //====================================================== // Wheeling Machine Regal Machine //------------------------------------------------------ //Nylon 0.15 0.16 //Fiberglass 0.12 0.140 //====================================================== //The variable costs of producing tires are $5.00 per operating hour, regardlessof which machine is being used or which tire is being produced. There is also an inventory-carrying charge of $0.10 per tire per month. How should the production be scheduled in order to meet the delivery requirements at minimum costs? //Reported solution: //X = [1867 7633 3500 0 5500 2500 0 2500 2500 0 0 2667 333 5000 0]; //=========================================================================== // Copyright (C) 2015 - IIT Bombay - FOSSEE // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt // Author: Remya Kommadath // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in //============================================================================ clc; nProducts = 2; nMachines = 2; nPeriods = 3; Demand = [4000 1000;8000 5000; 3000 5000]; AvailMachineTime = [700 1500;300 400; 1000 300]; ProdRate = [0.15 0.16;0.12 0.14]; OperatingCost = 5; InventoryCost = 0.1; nVar = nProducts*nMachines*nPeriods + (nPeriods-1)*nProducts; // Dimension of the problem is determined // Linear equality constraints // Demand constraints nEqConstraints = nProducts*nPeriods Aeq = zeros(nEqConstraints,nVar); // Demand constraints for period 1 Aeq1 = zeros(nProducts,nVar); for i = 1:nProducts index1 = (i-1)*nProducts+1:i*nProducts; Aeq1(i,index1) = 1; index2 = nMachines*nProducts+i; Aeq1(i,index2) = -1; beq1(i,1) = Demand(1,i); end // Demand constraints for period 2 to (nPeriods-1)th period Aeq2 = zeros(nProducts,nVar); for i = 2:nPeriods-1 for j = 1:nProducts index3 = (i-1)*(nProducts*nMachines+nProducts)+(j-1)*nMachines+1:(i-1)*(nProducts*nMachines+nProducts)+(j-1)*nMachines+nMachines; Aeq2(j,index3) = 1; index4 = (i-1)*(nProducts*nMachines+nProducts) - nProducts+j; Aeq2(j,index4) = 1; index5 = i*(nProducts*nMachines+nProducts)- nProducts+j Aeq2(j,index5) = -1; beq2(j,1) = Demand(i,j); end end // Demand constraints for last period Aeq3 = zeros(nProducts,nVar); for i = 1:nProducts index6 = (nProducts*nMachines+nProducts)*(nPeriods-1)+(i-1)*nProducts+1:(nProducts*nMachines+nProducts)*(nPeriods-1)+i*nProducts Aeq3(i,index6) = 1; index7 = (nProducts*nMachines+nProducts)*(nPeriods-1) - nProducts+i; Aeq3(i,index7) = 1; beq3(i,1) = Demand(nPeriods,i); end Aeq = [Aeq1;Aeq2;Aeq3]; beq = [beq1;beq2;beq3]; // Linear inequality constraints // Machine time constraints for i = 1:nPeriods for j = 1:nProducts Cindex = (i-1)*(nProducts*nMachines+nProducts)+j:nProducts:(i-1)*(nProducts*nMachines+nProducts)+nMachines+j; Rindex = (i-1)*nProducts+j; A(Rindex,Cindex) = ProdRate(:,j)'; b(Rindex,1) = AvailMachineTime(i,j); end end // Objective function TotalProductionCost = []; for j = 1:nProducts TotalProductionCost = [TotalProductionCost ProdRate(j,:)*OperatingCost]; end for i = 1:nPeriods index = (i-1)*(nProducts*nMachines+nProducts)+1:(i-1)*(nProducts*nMachines+nProducts)+nProducts*nMachines; nindex = length(index); cost(index,1) = TotalProductionCost'; cost(index(nindex)+1:index(nindex)+nProducts,1) = InventoryCost; end cost(nVar+1:nVar+nProducts,1) = []; lb = zeros(1,nVar); [xopt,fopt,exitflag,output,lambda]=linprog(cost, A, b, Aeq, beq, lb,[]); //Result representation select exitflag case 0 disp(" Optimal Solution Found") M = [" "]; for m = 1:nMachines M = [M strcat(["Machine",string(m)])]; end P = []; for p = 1:nProducts P = [P;strcat(["Product ",string(p)])]; end for i = 1:nPeriods Sol = []; for j = 1:nProducts Ind1 = (i-1)*(nProducts*nMachines + nProducts)+(j-1)*nProducts+1:(i-1)*(nProducts*nMachines + nProducts)+j*nProducts; Sol = [Sol;xopt(Ind1)']; end disp(strcat(["Production schedule for the Period ", string(i)])); disp([M; [P string(Sol)]]); end for i = 1:nPeriods-1 ind = i*(nProducts*nMachines+1:nProducts*nMachines+nProducts); inventory = xopt(ind); disp(strcat(["Inventory at the Period ", string(i)])); disp([P string(inventory)]); end disp(["The optimal cost is ", string(fopt)]) case 1 disp("Primal Infeasible") case 2 disp("Dual Infeasible") case 3 disp("Maximum Number of Iterations Exceeded. Output may not be optimal") case 4 disp("Solution Abandoned") case 5 disp("Primal objective limit reached") case 6 disp("Dual objective limit reached") end
f47eff37b1117667fc231526cbadf5791923fd72
449d555969bfd7befe906877abab098c6e63a0e8
/2837/CH13/EX13.1/Ex13_1.sce
fe9fe34b30021bb0c0523f9004344ec59867144a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
610
sce
Ex13_1.sce
clc clear //Initialization of variables P=70 //psia Pt=110 //psia V=20 //cu ft R0=1545 //Universal gas constant T=540 //R M=32 //Molecular weight of Oxygen M2=28 //Molecular weight of Nitrgoen //calculations N=P*V*144/(R0*T) mo=M*N Pn=Pt-P N2=Pn*V*144/(R0*T) mn=N2*M2 Vo=N*R0*T/(144*Pt) Vn=N2*R0*T/(144*Pt) Vn2=V-Vo //results printf("Mass of oxygen = %.2f lb",mo) printf("\n Mass of nitrogen = %.2f lb",mn) printf("\n Partial volume of oxygen = %.2f cu ft",Vo) printf("\n Partial volume of nitrogen = %.2f cu ft",Vn) printf("\n In case 2, Partial volume of nitrogen = %.2f cu ft",Vn2)
5b12d57b1679ac6a0ad096f5ae1265ed2790e9f1
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/sgrid.man.tst
02bdc1e956310f677b6753046cbd431a68afb130
[ "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
118
tst
sgrid.man.tst
clear;lines(0); H=syslin('c',352*poly(-5,'s')/poly([0,0,2000,200,25,1],'s','c')); evans(H,100) sgrid() sgrid(0.6,2,7)
5259140affc95154998c273f5049bf4155d55a7e
449d555969bfd7befe906877abab098c6e63a0e8
/1382/CH6/EX6.9/EX_6_9.sce
49d7dcbb1b009cb58a7c755aab3be0b64fa66438
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
571
sce
EX_6_9.sce
// Example 6.8;// INPUT VOLTAGE ,distortion AND close loop gain clc; clear; close; Vs=10;//output voltage in milli volts A=1000;//amplifier gain without feedback D=0.1;//distortion without feedback BetaAd=40;//FEEDBACK FACTOR IN dB BetaA=10^(BetaAd/20);// feedback ratio Df= ((D/(1+BetaA)))*100;//distortion in percentage with feedbck Af= (A/(1+(BetaA)));//GAIN WITH FEEDBACL Vo= Vs*(1+BetaA)*10^-3;//new output volate in volts disp(Vo,"new output volate in volts") disp(Df,"distortion in percentage with feedbck is") disp(Af,"gain with feedback is")
d5ec4b107327df6aacb072db792c3c28d84db405
6cb9e819eeeec94f4180602ba9707c879af925fc
/ElNet_ss_16/Labor_5/5_protokoll_readLTspice.sci
d08e6bacbc83c81bcb8dddb524d3746e3762bc6d
[]
no_license
shinroo/TUB_Programs
ddc6a1e04c3a6f93221ac00abba93977fc5a1ca9
aae3afa488ad43fbcbcf592285bdd79fcacfb10e
refs/heads/master
2021-01-19T03:27:29.597735
2018-01-23T17:26:54
2018-01-23T17:26:54
54,027,264
1
0
null
null
null
null
UTF-8
Scilab
false
false
5,580
sci
5_protokoll_readLTspice.sci
//---------------------------------------------------------------// //---------------------------------------------------------------// //-------------------------- TU Berlin --------------------------// //--------- Fakultaet IV: Elektrotechnik und Informatik ---------// //---------------------------------------------------------------// //--------- Fachgebiet fuer Energieversorgungsnetze und ---------// //---------- Integration erneuerbarer Energien (SENSE) ----------// //---------------------------------------------------------------// //-------------------- Elektrische Netzwerke --------------------// //-------------------------- Praktikum --------------------------// //---------------------------------------------------------------// //---------------------------------------------------------------// //----- Einlese-Funktion fuer aus LTspice exportierte Daten -----// //---------------------------------------------------------------// //-------- Autor: Martin Otto -----------------------------------// //-------- Version: 1.0 -----------------------------------------// //-------- Stand: 03.05.2016, 15.15 Uhr -------------------------// //---------------------------------------------------------------// //---------------------------------------------------------------// clc; clear; xdel(winsid()); function [M]=readLTspice(fileName, selector, nTraces) //Format: Zeitbereich if selector=="Time" | selector=="time" then tempFileName = part(fileName, 1:$-4) + "_Temp.txt"; textOriginal = mgetl(fileName); [nRows,nColumns] = size(textOriginal); textKorrigiert = strsubst(textOriginal(2:nRows), ascii(9), ","); mputl(textKorrigiert, tempFileName); M = read(tempFileName, -1, 1+nTraces); deletefile(tempFileName); //Format: Polarform (dB,deg) elseif selector=="Bode" | selector=="bode" then tempFileName = part(fileName, 1:$-4) + "_Temp.txt"; textOriginal = mgetl(fileName); [nRows,nColumns] = size(textOriginal); textKorrigiert = strsubst(textOriginal(2:nRows), "°", ""); textKorrigiert = strsubst(textKorrigiert, "dB", ""); textKorrigiert = strsubst(textKorrigiert, "(", ""); textKorrigiert = strsubst(textKorrigiert, ")", ""); textKorrigiert = strsubst(textKorrigiert, ascii(9), ","); mputl(textKorrigiert, tempFileName); M = read(tempFileName, -1, 1+2*nTraces); deletefile(tempFileName); //Format: kartesische Form (Re,Im) elseif selector=="Nyquist" | selector=="nyquist" then tempFileName = part(fileName, 1:$-4) + "_Temp.txt"; textOriginal = mgetl(fileName); [nRows,nColumns] = size(textOriginal); textKorrigiert = strsubst(textOriginal(2:nRows), ascii(9), ","); mputl(textKorrigiert, tempFileName); M = read(tempFileName, -1, 1+2*nTraces); deletefile(tempFileName); //falsche Eingabe else M = zeros(10,10); disp("Falsche Angabe für Format der Datenreihen!"); disp("--- Art der Datenreihe:"); disp(selector); disp("--- Betroffene Datei:"); disp(fileName); end endfunction M = readLTspice("/home/shinroo/Documents/ElNet2016/Labor_5/lab5datei.txt", "bode",6); T = M(:,1); H1 = M(:,2); H2 = M(:,4); H3 = M(:,6); P1 = M(:,3); P2 = M(:,5); P3 = M(:,7); H4 = M(:,8); H5 = M(:,10); H6 = M(:,12); P4 = M(:,8); P5 = M(:,10); P6 = M(:,12); // UNCOMMENT WHOLE SECTION TO SWITCH //// -------------------------------VERSTARKUNG 100 M Ohm--------------------- // //plot2d("ln", T, [H1,H2,H3]); //el = gce(); //el1 = el.children(1); //el1.thickness=2; //el1.foreground=2; // //el2 = el.children(2); //el2.thickness=2; //el2.foreground=3; // //el3 = el.children(3); //el3.thickness=2; //el3.foreground=4; // //title("Verstärkung in dB mit Messwiderstand 100M Ohm"); //legend("Pot auf a = 0", "Pot auf a = 0.5","Pot auf a = 1"); // //xlabel("f (Hz)"); //ylabel("H (dB)"); // -------------------------------VERSTARKUNG 1 M Ohm----------- //plot2d("ln", T, [H4,H5,H6]); //el = gce(); //el1 = el.children(1); //el1.thickness=2; //el1.foreground=2; // //el2 = el.children(2); //el2.thickness=2; //el2.foreground=3; // //el3 = el.children(3); //el3.thickness=2; //el3.foreground=4; // //title("Verstärkung in dB mit Messwiderstand 1M Ohm"); //legend("Pot auf a = 0", "Pot auf a = 0.5","Pot auf a = 1"); // //xlabel("f (Hz)"); //ylabel("H (dB)"); // -------------------------------Phasenwinkel 100 M Ohm--------------- plot2d("ln", T, [P1,P2,P3]); el = gce(); el1 = el.children(1); el1.thickness=2; el1.foreground=2; el2 = el.children(2); el2.thickness=2; el2.foreground=3; el3 = el.children(3); el3.thickness=2; el3.foreground=4; title("Phasenwinkel mit Messwiderstand 1M Ohm"); legend("Pot auf a = 0", "Pot auf a = 0.5","Pot auf a = 1"); xlabel("f (Hz)"); ylabel("Phasenwinkel (Grad)"); // -------------------------------Phasenwinkel 100 M Ohm--------------- // //plot2d("ln", T, [P4,P5,P6]); //el = gce(); //el1 = el.children(1); //el1.thickness=2; //el1.foreground=2; // //el2 = el.children(2); //el2.thickness=2; //el2.foreground=3; // //el3 = el.children(3); //el3.thickness=2; //el3.foreground=4; // //title("Phasenwinkel mit Messwiderstand 1M Ohm"); //legend("Pot auf a = 0", "Pot auf a = 0.5","Pot auf a = 1"); // //xlabel("f (Hz)"); //ylabel("Phasenwinkel (Grad)"); xgrid(1, 1, 3);
1579be963b44ea452b001b1037dfb6f956b1a6dc
449d555969bfd7befe906877abab098c6e63a0e8
/2234/CH1/EX1.15/ex1_15.sce
33e9bce3100ddc70f034566cd5c75177a04dd329
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
298
sce
ex1_15.sce
clc; p=1/8; //power disipation per resistor v=sqrt(100/8); //voltage across each resistor disp(14.14,"a)Voltage in Series in Ohm = "); //displaying result disp(v,"b)Voltage in Parallel in Ohm ="); //displaying result disp(7.07,"c)Voltage in Series-Parallel in Ohm = "); //displaying result
c935a6f9d2fdaf24dfd7202a6b4c35064ab43cea
872b5ff8852c926ca1261037de07449db7ac51db
/area-02/flops-resumo.sci
0488e38112fec5a33a14ffa7b82754958b2de6b0
[]
no_license
BerdaSantos/numeric-calculus
20e4c50d9f66f8582e89533a5101f597df6665ec
0698409e7fa4158d6f7dd7e4d60f8a38538b3335
refs/heads/master
2020-05-14T18:07:02.017600
2018-11-23T01:50:38
2018-11-23T01:50:38
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,260
sci
flops-resumo.sci
/**[Q1] Sendo: A uma matriz 10x33 (M x N) B uma matriz 33x30 (N x P) quantos flops são necessários para calcular A.B (produto escalar) >>> (2N-1) * M * P ************************************************************************/ /** [Q2] * Quantos flops (+,-,*,/) são necessários no algoritmo * S=0 * for k=1:29 * S=S+A(k,1:k)*A(1:k,k) * end */ k=1:29 a=k.*2 numero_flops=sum(k.*2) /***********************************************************************/ /** Flops de * e / APENAS S=0 for k=1:158 for j=1:158 S = S+A(k:k+2,j:j+2)*B(1:3,1:3) end end k=158 j=158 S= A(1:158, 1:160) A = [1 1 1] B(1 1 1, 1 1 1 1 1 1) 160*3*2*160 iteracao M_B Operacoes de multiplicao no B 158*158 * 3*3 * 3 = 674028 k=158 (linhas) j=158 (colunas) B(a b c d e f g h i) 3->linhas de B 3->colunas de B [A(1)*B(1) + A(2)*B(2) + A(3)*B(3)] -> Maximo pro B -> 3 multiplicacoes /***********************************************************************/ /** [Q4] x: vetor com 183 elementos Quantos flops em y = (3-5*x)./(x.*x+1)? 5 operacoes * 183 = 915 flops ************************************************************************/
bf2e0703e4a51a2ea57ee756130f46be874b044f
e176c804d3e82d065a9c9635dad92da21c1483a9
/libs/readpbm.sci
e8e1983785f14d2e427bd8efc8f22e67b42ed9f5
[ "MIT" ]
permissive
Exia-Aix-2016/ExoLife
38f7d5e54a1fd26333f19d99a8b63f0d64cc4c4c
a88d4bc3b852f8a85b6c8cc0979ced29fb28b751
refs/heads/master
2021-09-07T01:47:04.742247
2018-02-15T11:57:47
2018-02-15T11:57:47
120,471,380
1
0
null
null
null
null
UTF-8
Scilab
false
false
443
sci
readpbm.sci
// reading image PGM RAW (8 bits) (PBM) // usage: img = readpbm('image.pbm'); function image=readpbm(filename) [u,err]=mopen(filename,'rb') if err<>0 then error('Error opening file '+filename), end if mgetl(u,1)~='P5' error('Unrecognized format'), end z=mgetl(u,1), while part(z,1)=='#', z=mgetl(u,1), end n=strtod(z) z=mgetl(u,1) n=[n strtod(z) ] mgetl(u,1) image=matrix(mget(n(1)*n(2),'uc',u),n) mclose(u) endfunction
50be3aa2c620d85d2f3db723ef2193f6d2850fd5
449d555969bfd7befe906877abab098c6e63a0e8
/3281/CH9/EX9.7/ex9_7.sce
a1ad3bb3a5bf841183bca7ef545ba635c5194c48
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
185
sce
ex9_7.sce
//Page Number: 457 //Example 9.7 clc; //Given S11=0.90; S12=0; S21=2.40; S22=0.80; Gmax=(S21*S21)/((1-(S11)^2)*(1-(S22)^2)); Gdb=10*log10(Gmax); disp(Gdb,'Maximum gain:');
f6dd642c741999f29b6fcc19e336c136ffb13c3f
449d555969bfd7befe906877abab098c6e63a0e8
/3819/CH4/EX4.18/Ex4_18.sce
2e70e873abb9730c31932ce526fae686258cb05a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
173
sce
Ex4_18.sce
// A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal // Chapter 4-Buoyancy and Floatation //// Problem 4.18 //Derivation required(Theoretical Work)
3b6dbccf7d8aa7e839c8f617c18a910739eab500
1fae7245be81874d6649e567839442516f2aaa82
/airplanes.sce
f9932722b3b9e09962f95f3a0568b3abe8c2faf3
[]
no_license
haalogen/airplanes
406de56307e8bbd89c939995f38b03d2bf103c22
1669d2dcea780973dad0ab967a2f690a00f553ff
refs/heads/master
2020-12-24T06:26:20.626171
2016-12-18T10:59:21
2016-12-18T10:59:21
73,485,838
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,932
sce
airplanes.sce
//0. Load MorIARTy-toolbox exec("MorIARTy-toolbox/loader.sce"); BIG_VAL = 2 ^ 100; TIMES = 30; av = 0; MIN_STD = 0.05; MAX_STD = 0.5; STD_LEN = 10; stds = linspace(MIN_STD, MAX_STD, STD_LEN); // x, y coordinates plane_coords = [ .. 144, 446; .. 197, 430; .. 365, 398; .. 486, 366]; radius = 5; // radius 3px file_num_err = mopen("num_errors.txt", "w"); for s = 1 : length(stds) num_errors = 0; bad_times = 0; for t = 1 : TIMES std = stds(s); if t == 1 std end t //1. Load image of airport and image of plane f = imread(fullpath(MorIARTyPath() + "/images/svo/airplane.png")); f = im2double(rgb2gray(f)); // Add noise to f f = imnoise(f, "salt & pepper", std); V = MCreateMosaicShape(f, "grayscale"); P = MCreateProjection(V); V0 = MCreateMosaicShape(zeros(f), "grayscale"); E = MCreateProjection(V0); g = imread(fullpath(MorIARTyPath() + "/images/svo/svo.png")); g = im2double(g); // Add noise to g g = imnoise(g, "gaussian", av, std.^2); options = struct(); options.translation = "fft"; options.window_size = size(f); options.data_size = size(g); options; PN = MPrepareProjectionNorm(P, options); EN = MPrepareProjectionNorm(E, options); N = MPrepareNorm(options, "grayscale"); PNg = MCalculateProjectionNorm(PN, g); ENg = MCalculateProjectionNorm(EN, g); Ng = MCalculateNorm(N, g); func = ones(Ng) * BIG_VAL; if (PNg.^2 - ENg.^2) ~= 0 then func = (Ng.^2 - PNg.^2) ./ (PNg.^2 - ENg.^2); else end if t == 1 then imwrite(func < 4 * min(func), "results/air_denstd" + string(std) + .. "_time" + string(t) + ".jpg"); end plane_val = max( .. min(func(plane_coords(1, 2) - radius : plane_coords(1, 2) + radius, .. plane_coords(1, 1) - radius : plane_coords(1, 1) + radius)), .. min(func(plane_coords(2, 2) - radius : plane_coords(2, 2) + radius, .. plane_coords(2, 1) - radius : plane_coords(2, 1) + radius)), .. min(func(plane_coords(3, 2) - radius : plane_coords(3, 2) + radius, .. plane_coords(3, 1) - radius : plane_coords(3, 1) + radius)), .. min(func(plane_coords(4, 2) - radius : plane_coords(4, 2) + radius, .. plane_coords(4, 1) - radius : plane_coords(4, 1) + radius)) .. ); if t == 1 then imwrite(func <= plane_val, "results/air_denstd" + string(std) + .. "_time" + string(t) + ".jpg"); end func(plane_coords(1, 2) - radius : plane_coords(1, 2) + radius, .. plane_coords(1, 1) - radius : plane_coords(1, 1) + radius) = .. ones(2 * radius + 1, 2 * radius + 1) * BIG_VAL; func(plane_coords(2, 2) - radius : plane_coords(2, 2) + radius, .. plane_coords(2, 1) - radius : plane_coords(2, 1) + radius) = .. ones(2 * radius + 1, 2 * radius + 1) * BIG_VAL; func(plane_coords(3, 2) - radius : plane_coords(3, 2) + radius, .. plane_coords(3, 1) - radius : plane_coords(3, 1) + radius) = .. ones(2 * radius + 1, 2 * radius + 1) * BIG_VAL; func(plane_coords(4, 2) - radius : plane_coords(4, 2) + radius, .. plane_coords(4, 1) - radius : plane_coords(4, 1) + radius) = .. ones(2 * radius + 1, 2 * radius + 1) * BIG_VAL; failure_mask = func(); failure_mask = failure_mask(func <= plane_val); if length(failure_mask) == length(func) then disp("length(failure_mask) == length(func)"); bad_times = bad_times + 1; else num_errors = num_errors + length(failure_mask); end // imshow(f); // tmp = input("Enter smth"); // imshow(g); // tmp = input("Enter smth"); // imshow(func < 4 * min(func)); // tmp = input("Enter smth"); end // for t num_errors = num_errors / (TIMES - bad_times) mputl(string(num_errors), file_num_err); end // for s mclose(file_num_err);
27085a8ff5620e4d1d8c52eb3b39be9f5162d9b4
717ddeb7e700373742c617a95e25a2376565112c
/3044/CH3/EX3.19/Ex3_19.sce
118f38f75df18d9b21e680b05d6fecc8210969e4
[]
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
457
sce
Ex3_19.sce
//Variable Declaration p1 = 0.65 // probability of event C p2 = 0.40 // probability of event D p3 = 0.40 // probability of event C and D both Occuring symultanously //Calculation // two events are independent if P(C)*P(D)=P(C and D) Mul = p1*p2 //Results if(Mul==p3) then printf ( "%.2f is equal to %.1f Thus C and D are INDEPENDENT EVENTS",p1*p2,p3) else printf ( "%.2f is not equal to %.1f Thus C and D are DEPENDENT EVENTS",p1*p2,p3) end
f234eb6b443690073d5ab6376782109c22dacd8d
7fa099e9d565bee9cdd572755843852769c99498
/tests/CDSG.tst
1fc3dd8d93342b260eecc2975338d0a526c70f20
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-other-permissive", "BSD-2-Clause" ]
permissive
Peter-J-Jansen/SDL-hyperion
0d2a16f1d837fa27b8f0aaa927dc84a8ebdb44f6
58578601d7a34fc11f050b0ac4fd425a4c0422eb
refs/heads/master
2023-04-27T03:42:18.421272
2022-11-27T00:16:06
2022-11-27T00:16:06
238,422,138
2
0
null
null
null
null
UTF-8
Scilab
false
false
248
tst
CDSG.tst
*Testcase cmpxchg16 as used by CDSG, STPQ and LPQ instructions mainsize 1 numcpu 2 sysclear archlvl z/Arch loadcore "$(testpath)/CDSG.core" runtest 1 v 900.38 v 940.70 #v 960.100 *Done numcpu 1 # (reset back to default)
a393c3c30621d22de18ce4deaafda2a2aacef262
449d555969bfd7befe906877abab098c6e63a0e8
/3640/CH1/EX1.5/Ex1_5.sce
51978a0ce099367c764ca0a5d074a8db44df1cee
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
346
sce
Ex1_5.sce
clc Pk=75 //core loss of transfomer in watts R=0.048 //internal resistance in ohms V2=240// secondary voltage in volts I2=sqrt(Pk/R)//secondary current in amperes mprintf("I2=%f A\n",I2)//ans may vary due to roundoff error mprintf("|S|=V2*I2=%d VA",V2*I2)//The answer in the textbook is wrong //output volt ampere of transformer
ecf27b25634ed51fb359fe09b9ffa02a06969178
b29e9715ab76b6f89609c32edd36f81a0dcf6a39
/ketpicscifiles6/Kyorihensuu.sci
a07a89d1e73336b1a9d091035ae8e93c169ed72b
[]
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
535
sci
Kyorihensuu.sci
function Kyorihensuu(varargin) if length(varargin)==0 FL='default'; else FL=varargin(1); if FL=='' FL='tmp.tex' end end StrM=[... '\newlength{\Width}%',... '\newlength{\Height}%',... '\newlength{\Depth}%'... ]; if FL~='default' Fid=mopen(FL,'w'); mprintf('%s\n\n','Writing to '+FL); end; for I=1:size(StrM,2) Str=StrM(I); mprintf('%s\n',Str); if FL~='default' mfprintf(Fid,'%s\n',Str); end end if FL~='default' mclose(Fid) end endfunction
98bdd029a8a712d3fb7ce700521e37bd9af9b724
c8a2ce0dd5898c7a0eaad60dccdeca114a7a612c
/RPG/bin/scene/center1.sce
f5cc046693ff4fc81c3e188659b93b609b61dce6
[]
no_license
youlanhai/Lazy2D
5b34b9e57f5a8c405824dbb7f977059f441f67c5
84fa6634729599348018e5ba4b9ed07e2387b414
refs/heads/master
2021-05-16T04:13:52.288447
2015-04-12T07:36:04
2015-04-12T07:36:04
105,855,169
0
0
null
null
null
null
UTF-8
Scilab
false
false
204
sce
center1.sce
map/center.map sprit/centersprit.spr 1 sound/center.mid 1 416 700 288 0 64 32 scene/up.sce 1 570 352 0 192 32 64 scene/left.sce 1 64 384 612 96 32 64 scene/right.sce 1 480 64 224 448 64 32 scene/down.sce
4c81a7a4f1fef87a67685a311660005ed4038557
69835ac69cb9e2776ab82c8bb1abc7a4ff2188e0
/Newton_vs_fct2 (1).sce
1399d5eef9566e58beff3d77927690f7f2ba47b9
[]
no_license
ilyes025/PROJET-DOPTIMISATION
b393b7854dec3036103be0db101fc4b2a2b7d3d5
6cd2ac050c95b21294b10ee6af8cfa2eb77024b5
refs/heads/main
2023-06-18T13:05:32.516772
2021-07-16T11:34:30
2021-07-16T11:34:30
386,613,959
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,647
sce
Newton_vs_fct2 (1).sce
clear; clf; // Définition de la fonction de Rosenbrock function [f]= fct1(x,y) f=(1-x)^2+100*(y-x^2)^2 endfunction //Définition du gradiant function j = grad(x) j(1)=400*x(1)^3-400*x(1)*x(2)+2*x(1)-2; j(2)=200*(x(2)-x(1)^2); endfunction //Définition de la hessienne function [H]= hessi(x) H(1,1)=1200*x(1)^2-400*x(2)+2 ; H(1,2)=-400*x(1); H(2,1)=-400*x(1); H(2,2)=200; endfunction // Représentation des lignes des niveaux pour la fonction de Rosenbrock k=linspace(-3,3); y=linspace(-3,3); z=feval(k,y,fct1); xset("fpf"," "); subplot(121) plot3d(k,y,z) subplot(122) contour(k,y,z,80) // La méthode de newton function [sol]=newton(x0,grad,hessi) N=10^6; eps=10^-4; xx=x0; i=0; tic(); while(i<N) i=i+1; H = hessi(xx); xn = xx - inv(H)*grad(xx); plot(xn(1),xn(2),'g.'); printf("iteration %d",i); disp(xn); printf("\n"); if(norm(grad(xn))<eps) then // solution trouvée t=toc(); printf("la solution est"); disp(xn); printf("atteinte apres %d iterations \n",i); printf("et apres %f secondes",t); sol=resume(xn); end; xx=xn; end; sol=xn printf('pas de convergence apres %d iterations \n',i); abort; // L'exécution s'arrêtera ici endfunction //intialisation x=[-1,1.5]'; [sol]=newton(x);
303bac5c4505f5a6cf7a877b63b5bfa4e79fd17b
449d555969bfd7befe906877abab098c6e63a0e8
/2276/CH2/EX2.8/chapter2_ex8.sce
8998d7fb55500edfb025a142671e4ae58924e580
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
572
sce
chapter2_ex8.sce
clc clear //input a=2500; //area of hysteresis loop in square millimeter H=16;//magnetising force in ampere/mater per mm when hysteresis loop is plotted on a graph B=0.02;//flux density in tesla per mm when hysteresis loop is plotted on a graph hloss=24;//desired hysteresis loss n=50;//cycles of magnetisation //calculations e=B*H;//energy represented by square millimeter l=a*e;//loss/cubic meter/cycle Vmax=hloss/(l*n);//maximum volume core in cubic meter //output mprintf('the permissible volume of the transformer core is %3.10f cubicmeter',Vmax)
8aa87139df1c09cc3339771dad7d50ce8639c821
449d555969bfd7befe906877abab098c6e63a0e8
/1184/CH19/EX19.1/Ex19_1.sce
0ab038bc9b646a7c08eda188f411131fda611c7d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
162
sce
Ex19_1.sce
//Example 19-1,page No - 760 clear clc NA = 0.29 critical_angle = sin (0.29) printf('The critical angle is %.2f degree',critical_angle*(180/3.14))
acc842d3c1de2b539f01f61f6901d9addc6b0841
449d555969bfd7befe906877abab098c6e63a0e8
/52/CH2/EX2.16/Example2_16.sce
8dd5a5a1091554f14f47beb3fbfea29f6af00155
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
160
sce
Example2_16.sce
//Example 2.16 //To find input h(n) //a=[1 2 -4 1], b=[1] clear; clc ; close ; z=%z; a=z^3+2*(z^(2))-4*(z)+1; b=z^3; h =ldiv(a,b,4); disp (h,"h(n)=");
f88bc0d813bd82b7191d7273fcecbedbbd34b7e1
449d555969bfd7befe906877abab098c6e63a0e8
/1994/CH10/EX10.18/Example10_18.sce
07296916ec7e355a01f6ab9a59ab13cc500c0e03
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
611
sce
Example10_18.sce
//Chapter-10,Example10_18,pg10_57 Vl=1000 f=50 K=3.6 R2=0.01 X2=0.2 E1line=1000 E1=E1line/sqrt(3) E2=E1/K //at start,s=1 I2=160.37/sqrt((R2^2)+(X2^2)) pf=R2/sqrt((R2^2)+(X2^2)) printf("rotor current at start\n") printf("I2=%.2f A\n",I2) printf("rotor power factor\n") printf("pf=%.3f lagging (answer in book is wrong)\n",pf) //at s=0.03 s=0.03 I2r=s*160.37/sqrt((R2^2)+((s*X2)^2)) printf("rotor current at slip 0.03\n") printf("I2r=%.2f A\n",I2r) I2=200 R21=sqrt(((E2/I2)^2)-(X2^2)) Rex=R21-R2 printf("external resistance \n") printf("Rex=%.4f ohm/ph (answer in book is wrong)",Rex)
d771bd4e70092136ae34a0800bebb4ecd07b8c37
449d555969bfd7befe906877abab098c6e63a0e8
/98/CH2/EX2.2/example2_2.sce
a6ef90c59af846c11380186378760d0f4390ddae
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
534
sce
example2_2.sce
//Chapter 2 //Example 2.2 //Page 17 clear; clc; max_demand = 20000; n_boiler = 0.85; coal_consumption = 0.9; load_factor = 40; n_turbine = 0.90; cost_per_ton = 300; //Calculation of thermal efficiency printf("(i) Thermal efficiency = %.2f %%\n\n", n_boiler*n_turbine*100); printf("(ii) Units generated per annum = %.3f kWh\n", max_demand*load_factor*8760); printf("\t Coal consumption/annum = %.3f tons\n", coal_consumption*7008*1e4/1000); printf("\t Annual coal bill = Rs %.4f\n", cost_per_ton*coal_consumption*7008*1e4/1000);
f007837683d13eb9abb4c5878e9b27b326abfa09
449d555969bfd7befe906877abab098c6e63a0e8
/2126/CH1/EX1.19/19.sce
59f9c38955aea1c751663b59c60dcba3b2c7ddc5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
19.sce
clc clear //Input data P=200 //Pressure in kPa d=2.9 //Density in kg/m^3 C=50 //Velocity in m/s mol=32 //Molecular weight of oxygen in kg/mol k=1.4 //Adiabatic constant Ri=8314 //Ideal gas constant in J/mol-K //Calculation R=Ri/mol //Specific gas Constant in J/kg-k T=(P*10^3)/(R*d) //Temperature in K a=sqrt(k*R*T) //Velocity of sound in m/s M=C/a //Mach number //Output printf('Mach number is %3.4f',M)
b3677f25556f2a0efe1d331982565bf158b680e2
95beaf56de829d390a567f241221c582c4b682ed
/MP and OMP.sce
023b67d73e033fbeb35fe5560ca04ddf3064a2f2
[]
no_license
the-mousaillon/compressive-sensing
85d5d5ce814ad8ec20271a3b932144e35e640041
bfa3acf166be6a8141d1eb2064523e7de8f19db7
refs/heads/master
2020-04-17T15:02:05.840745
2019-03-20T12:55:21
2019-03-20T12:55:21
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,786
sce
MP and OMP.sce
clear function y= selection_atome(dic, R) s = size(dic) m=1 maxi=abs(dic(:,1)'*R)/norm(dic(:,1)) for i=2:s(2) tmp = abs(dic(:,i)'*R)/norm(dic(:,i)) if tmp > maxi then maxi=tmp m=i end end y=m endfunction function y = matching_pursuit(dic, X, K) s = size(dic) alpha = zeros(s(2),1) R=X for i=1:K m = selection_atome(dic, R) zmK = ((dic(:,m)'*R))/(norm(dic(:,m))^2) R = R - zmK*dic(:,m) alpha(m) = alpha(m) + zmK end y = alpha endfunction function y = ortogonal_MP(dic, X, K, epsilon) s = size(dic) alpha = zeros(s(2),1) R=X i=1 // on stockera les indices des atomes choisis dans p p = [] while (i<=K) && (norm(dic*alpha-X)>epsilon) m = selection_atome(dic, R) p=[p;m] phi(:, p) = dic(:, p) zmK = X'*phi(:, p)*inv(phi(:, p)'*phi(:, p)) alpha(p) = zmK' R=X-dic*alpha i=i+1 end y = alpha endfunction // exemple 1 D1 = [1/2*sqrt(2) 1/3*sqrt(3) 1/3*sqrt(6) 2/3 -1/3 -1/2*sqrt(2) -1/3*sqrt(3) -1/6*sqrt(6) 2/3 -2/3 0 -1/3*sqrt(3) 1/6*sqrt(6) 1/3 2/3 ] X1 = [4/3-1/2*sqrt(2); 4/3 + 1/2*sqrt(2);2/3] // exemple 2 D2 = [ 1 1 2 5 0 0 3 -2 1 2 2 2 0 -1 -1 1 0 0 5 0 2 2 7 -1 1 1 1 5 1 2 2 1 1 1 1 5 1 5 2 2 5 0 -4 5 1 5 0 0 0 2 2 1 1 0 0 0 0 4 -1 -2 -1 2 2 2 -2 -3 -4 1 1 1 1 0 ] X2 = [-10;-10;1;21;0;9] // disp("solution exemple 1 : ") disp("MP : ") disp(matching_pursuit(D1, X1, 10)) disp("OMP : ") disp(ortogonal_MP(D1, X1, 10, 0.001)) disp("solution exemple 2 : ") disp("MP : ") sol = matching_pursuit(D2, X2, 6) disp(matching_pursuit(D2, X2, 1000)) disp("OMP : ") disp(ortogonal_MP(D2, X2, 1000, 0.0000001)) solotho = ortogonal_MP(D2, X2, 6, 0.0000001)
ac306ce6e86fa58daf26c435d28b33ef9b956295
449d555969bfd7befe906877abab098c6e63a0e8
/1092/CH4/EX4.19/Example4_19.sce
018da33d4f3893855bde3da154f63a312b8dfd13
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,143
sce
Example4_19.sce
// Electric Machinery and Transformers // Irving L kosow // Prentice Hall of India // 2nd editiom // Chapter 4: DC Dynamo Torque Relations-DC Motors // Example 4-19 clear; clc; close; // Clear the work space and console. // Given data // From the calculations of Ex.4-16 , Ex.4-17 , Ex.4-18 we get no-load and // full-load speeds as follows S_n1 = 1810 ; // No-load speed in rpm (Ex.4-16) S_f1 = 1603 ; // Full-load speed in rpm (Ex.4-16) S_n2 = 1806 ; // No-load speed in rpm (Ex.4-17) S_f2 = 1231 ; // Full-load speed in rpm (Ex.4-17) S_n3 = 1311 ; // No-load speed in rpm (Ex.4-18) S_f3 = 505 ; // Full-load speed in rpm (Ex.4-18) // Calculations SR_1 = ( S_n1 - S_f1 ) / S_f1 * 100 ; // Speed regulation for shunt motor SR_2 = ( S_n2 - S_f2 ) / S_f2 * 100 ; // Speed regulation for compound motor SR_3 = ( S_n3 - S_f3 ) / S_f3 * 100 ; // Speed regulation for series motor // Display the results disp("Example 4-19 Solution : "); printf(" \n a: SR(shunt) = %.1f percent \n ", SR_1 ); printf(" \n b: SR(compound) = %.1f percent \n ", SR_2 ); printf(" \n c: SR(series) = %.1f percent \n ", SR_3 );
c4bdf39dc3683385ca1cfbda270ad5b5786f7b42
449d555969bfd7befe906877abab098c6e63a0e8
/1859/CH7/EX7.30/exa_7_30.sce
8bac2cf4bd073f51f72295e475aa64d2acc0c4b0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
369
sce
exa_7_30.sce
// Exa 7.30 clc; clear; close; // Given data f1= 800;// in kHz f1=f1*10^3;// in Hz f2= 2.5;// in MHz f2=f2*10^6;// in Hz C1=95;// in pF C1=C1*10^-12;// in F // L= 1/(omega1^2*(C1+Cd)) (i) // L= 1/(omega2^2*Cd) (ii) // From eq(i) and eq(ii) Cd= f1^2*C1/(f2^2-f1^2);// in F disp(Cd*10^12,"Self capacitance of the radio coil in pF");
75b429b547e0f9acba25a2487f291679555f7b07
ad83b0d5959ff5ccc6ccffe929c9c007345d02c0
/calculadoraDeVelocidades.sce
8e5e7780614a9fa5e1a7543fc4b194e74cbae7e0
[]
no_license
rodolfostark/Experimento3CN
5146116b866a7e110ccef5ccff918730683f569a
8253245c50d76917d8442481b40fb039789d8aef
refs/heads/master
2020-03-28T21:16:03.786439
2018-09-30T23:01:32
2018-09-30T23:01:32
149,142,776
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,456
sce
calculadoraDeVelocidades.sce
//recuperando dados de arquivos/implementações anteriores exec('C:\Users\bennb\OneDrive\Área de Trabalho\Experimento3CN\tabelaComPosicoesDeCadaEsfera.sce') exec('C:\Users\bennb\OneDrive\Área de Trabalho\Experimento3CN\tabelaComAngulosDeCadaEsfera.sce') //iremos concatenar os vetores e usaremos apenas as colunas relativas às duas primeiras fotos X = [x_vermelha(:,[1,2]); x_verde(:,[1,2]); x_azul(:,[1,2])]; //concatenação dos vetores x em uma única matriz X de forma a facilitar as operações Y = [y_vermelha(:,[1,2]); y_verde(:,[1,2]); y_azul(:,[1,2])] //concatenação dos vetores y em uma única matriz Y de forma a facilitar as operações [nl,nc] = size(X); //inicializando vetor que recebe as velocidades médias de cada esfera. //Sua unidade é unidades_de_comprimento/segundos vetorVelocidades = zeros(3,1) /* Perceba que cada esfera percorreu um dado caminho que pode ser calculado utilizando-se o tamanho de uma hipotenusa (dado que temos duas posições no espaço bidimensional) e o tempo necessário para cruzar-se esse comprimento. */ tt = tempo(2) - tempo(1) //tempo transcorrido for i=1:1:nl x = X(i,2) - X(i,1); y = Y(i,2) - Y(i,1); comprimento = sqrt(x*x + y*y); vetorVelocidades(i) = comprimento/tt; end /* Resultado encontrado: vetorVelocidades = [206.53149 610.48824 138.67623] o primeiro item refere-se à esfera vermelha, o segundo à verde e a última à azul. */
61e46d67e7852f0db2f201e2ecf6892d7affe621
b1b2e80029cc5546ff903cab102cf2f635407fda
/tp2.sci
ad0cc1aa31148c253f889f83f1bc395d2fd9d3e5
[ "MIT" ]
permissive
walidzbiri/zip-code-classification
abc3f0e84400b66ea1e13304ef6353e683e085e5
f46b4196ba87afc9eff3ad598a40657999860bf4
refs/heads/main
2023-03-22T22:56:10.434583
2021-03-20T21:22:51
2021-03-20T21:22:51
349,837,025
0
0
null
null
null
null
UTF-8
Scilab
false
false
766
sci
tp2.sci
function [M,V,CT]=train(Image) I_gray=rgb2gray(Image); seuil=imgraythresh(I_gray); I_bw=~im2bw(I_gray,seuil); str=imcreatese('ellipse',2,2); I_erode=imerode(I_bw,str); I_dilate=imdilate(I_bw,str); M=[]; V=[]; [L,N]=imlabel(I_dilate); [A,BB,CT] = imblobprop(L); for k= 1:N objet=(L==k); [surface_central_normalise,surface_ouest_normalise,surface_est_normalise,surface_sud_normalise,surface_nord_normalise]=cavite(objet); M=[M;surface_central_normalise,surface_ouest_normalise,surface_est_normalise,surface_sud_normalise,surface_nord_normalise]; end for j=1:5 S=0; for i=1:5 S=S+M(i,j); end V=[V S/5]; end endfunction;
2cfbb3ff1e7c9a43c0b622d6160de8133f99f73c
449d555969bfd7befe906877abab098c6e63a0e8
/2414/CH12/EX12.6/Ex12_6.sce
4aef70e5f810ca2dba2341a39c1c73cc3df65840
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
237
sce
Ex12_6.sce
clc; close(); clear(); //page no 406 //prob no. 12.6 //data from ex 12.5 B=2*10^6; //Hz R=50 ; //ohm G=10^6; //gain kT0=4*10^-21; Nav=kT0*B; No=G*Nav; //ex12.6 Vrms=(No*50)^0.5; mprintf('Vrms=%.1f micro-V',Vrms*10^6);
c3100764fda34613d2f77ac36372abe88892273f
449d555969bfd7befe906877abab098c6e63a0e8
/929/CH3/EX3.6/Example3_6.sce
616a9dba68656b2897eaf7351836a67717c8d9ae
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
703
sce
Example3_6.sce
//Example 3.6 clear; clc; GdB=40; GdBf2=GdB+20; Gf2=10^(GdBf2/20); //->((R2+R3)/R1)=Gf2 C2=10*10^(-9);//Assumed Value of C2 f1=500; f2=50; f3=2122; w1=2*%pi*f1; w2=2*%pi*f2; w3=2*%pi*f3; R2=(1/(w2*C2))-2309.8862; C3=((1/R2)-(w1*C2))/(w1-w3); R3=(1/(w3*C3))+(0.94*10^3); R1=((R2+R3)/Gf2)-4; C1=(1/(2*%pi*20*R1))+(10*10^(-6));//Here f=20 Hz as it is the lower limit of the audio range printf("Designed RIAA phono Amplifier :"); printf("\nR1=%.f ohms",R1); printf("\nR2=%.f kohms",R2*10^(-3)); printf("\nR3=%.1f kohms",R3*10^(-3)); printf("\nC1=%.f uF",C1*10^6); printf("\nC2=%.f nF",C2*10^9); printf("\nC3=%.1f nF",(C3*10^9)-0.1);
c875f15649efd4d1238eb4ce2cbc6ebb4622a008
3ceea5ed341418c03cd22c0f002b437c6e4750fd
/integral.sci
7fdddcd499bd0124557e883fb9bf1bf2b9532c40
[]
no_license
ottony/cn_labs
30ed904a76addf0047caf6a3298691172eca32de
f2afa7d8650536f1ff4174549e6608f8887a786b
refs/heads/master
2020-03-29T15:11:11.996791
2014-10-29T01:31:38
2014-10-29T01:31:38
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
949
sci
integral.sci
function area = trapezio(Function, a, h) area = h*( (Function(a) + Function(a + h))/2 ) endfunction function [area, h] = trapezio_compost(Function, a, b, n) h = (b-a)/n; area = 0; for i = a:h:b-h area = area + trapezio(Function, i, h); end endfunction function area = simpson1_3(Function, a, h) area = (h/3)*(Function(a) + 4*Function(a + h) + Function(a + 2*h)); endfunction function [area, h] = simpson1_3_compost(Function, a, b, n) h = (b-a)/(2*n); area = 0; step = 2*h; for i = a:step:b-step area = area + simpson1_3(Function, i, h); end endfunction function area = simpson3_8(Function, a, h) const = (3*h)/8 area = const*(Function(a) + 3*Function(a + h) + 3*Function(a + 2*h) + Function(a + 3*h)); endfunction function [area, h] = simpson3_8_compost(Function, a, b, n) h = (b-a)/(3*n); area = 0; step = 3*h; for i = a:step:b-step area = area + simpson3_8(Function, i, h); end endfunction
f86f9891ac8eb5e4e9c9c9ca12b45a6dfc6c3762
564beb66e232557765505973f93cc322a394133a
/KONA/scilab/adams_bashforth.sce
798cf7c956b9cbdd0b5e174e1f866707f8452381
[]
no_license
KeithEvanSchubert/Keith_On
2442bb74b9d531c96d9f10da8df1dede54423094
fe8dd1e90e695957346aa176b7e0d0fea30171e3
refs/heads/master
2021-01-18T22:08:18.862471
2019-09-04T17:39:58
2019-09-04T17:39:58
51,767,267
0
0
null
null
null
null
UTF-8
Scilab
false
false
299
sce
adams_bashforth.sce
function [x]=adams_bashforth(funct_name,x0,h,t0,tn) if min(size(x0))=1 then n=(tn-to)/h; m=max(size(x0)); if size(x0,1)=1 then x0=x0'; end x=zeros(m,n+1); x(1,:)=x0; fo=execstr(funct_name); for i=2:n+1 fn=1 x(i+1,:)=x(i,:)+(3*fn-fo)/(2*h); fo=fn; end end endfunction
e971d24f5fa53d3c421c2e7155df3ec20547b1e6
efc2fec9dd841d0ca834702c904e00c52762a9f9
/PeopleDetector/peopleDetector5.sce
773efa4cb41ccf0a4a84965f5e483991a7f637c3
[]
no_license
surajch77/Scilab-Computer-Vision-Toolbox-TestCases
64c8e0382e8b9d416c4c27c1ed4272f49bf45b51
969f9bcddefea05b42c623aeebe2e0cdcffd6eeb
refs/heads/master
2021-01-20T20:24:14.345296
2016-06-29T15:16:52
2016-06-29T15:16:52
61,932,313
0
0
null
null
null
null
UTF-8
Scilab
false
false
139
sce
peopleDetector5.sce
// read the image vintage.jpg I = imread("vintage.jpg"); bboxes = peopleDetector(I) // output: // bboxes: // 309. - 1. 244. 549.
34a543627a6bf398df75a6002a27ab4d3caa1031
449d555969bfd7befe906877abab098c6e63a0e8
/154/DEPENDENCIES/ch14_1.sce
4737b796ad6452a3a4f3f2112224711959f2f7de
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
495
sce
ch14_1.sce
clc disp("Example 14.1") printf("\n") s=%s; //Applying KVL equation to the two loops we get //V1=2*I1+s*(I1+I2) //V2=3*I2+s*(I1+I2) //On solving we get disp("(s+2)*I1+s*I2=V1 (1)"); disp("s*I1+(s+3)*I2=V2 (2)"); //The equations which contain Z parameters are //V1=Z11*I1+Z12*I2 //V2=Z21*I1+Z22*I2 //On comparing (1) and (2) with above equations Z11=s+2; Z12=s; Z21=s; Z22=s+3; disp(Z11,"Z11=") disp(Z12,"Z12=") disp(Z21,"Z21=") disp(Z22,"Z22=")
034a4acc1b9f63a0d771c99e14c0d53b23bd2da3
fcd4bce0080771389b4a69338ed6443153942183
/cores/n64/mupen64plus-rsp-paraLLEl/lightning/check/varargs.tst
11131d9b283d6415df633efd2dd20740bf06de99
[ "LGPL-3.0-only", "GPL-3.0-only", "GFDL-1.1-or-later", "GPL-1.0-or-later", "LicenseRef-scancode-other-copyleft", "GFDL-1.1-only", "MIT", "LGPL-2.1-only", "MPL-1.1", "LicenseRef-scancode-mame", "Zlib", "GPL-2.0-only", "LGPL-2.1-or-later", "MPL-2.0", "CC-PDDC", "LicenseRef-scancode-public...
permissive
wulfebw/retro
d4fcf9229b257b3c495f54b1aeb3ea36004ae4aa
dad4b509e99e729e39a2f27e9ee4120e3b607f58
refs/heads/master
2022-10-23T07:17:55.320585
2020-06-12T01:38:06
2020-06-12T01:38:06
260,832,205
8
1
MIT
2020-06-12T01:38:08
2020-05-03T05:06:17
C
UTF-8
Scilab
false
false
7,166
tst
varargs.tst
.data 1024 ifmt: .c "%d %d %d %d %d %d %d %d %d %d\n" .align 4 ichk: .i 9 8 7 6 5 4 3 2 1 0 dfmt: .c "%.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f\n" lfmt: .c "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf\n" .align 8 dchk: .d 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 1.0 0.0 idfmt: .c "%d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f\n" ldfmt: .c "%d %lf %d %lf %d %lf %d %lf %d %lf %d %lf %d %lf %d %lf %d %lf %d %lf\n" difmt: .c "%.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d %.1f %d\n" dlfmt: .c "%lf %d %lf %d %lf %d %lf %d %lf %d %lf %d %lf %d %lf %d %lf %d %lf %d\n" .align 8 buff: .size 256 .code prolog /* sprintf(buff, "%d %d %d %d %d %d %d %d %d %d\n", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9); */ prepare pushargi buff pushargi ifmt ellipsis pushargi 0 pushargi 1 pushargi 2 pushargi 3 pushargi 4 pushargi 5 pushargi 6 pushargi 7 pushargi 8 pushargi 9 finishi @sprintf /* sscanf(buff, "%d %d %d %d %d %d %d %d %d %d\n", ichk+0, ichk+1, ichk+2, ichk+3, ichk+4, ichk+5, ichk+6, ichk+7, ichk+8, ichk+9); */ movi %v0 ichk prepare pushargi buff pushargi ifmt ellipsis pushargr %v0 /* 0 */ addi %v0 %v0 4 pushargr %v0 /* 1 */ addi %v0 %v0 4 pushargr %v0 /* 2 */ addi %v0 %v0 4 pushargr %v0 /* 3 */ addi %v0 %v0 4 pushargr %v0 /* 4 */ addi %v0 %v0 4 pushargr %v0 /* 5 */ addi %v0 %v0 4 pushargr %v0 /* 6 */ addi %v0 %v0 4 pushargr %v0 /* 7 */ addi %v0 %v0 4 pushargr %v0 /* 8 */ addi %v0 %v0 4 pushargr %v0 /* 9 */ finishi @sscanf movi %v0 ichk movi %r0 0 loopi: ldr_i %r1 %v0 beqr nexti %r0 %r1 calli @abort nexti: addi %r0 %r0 1 bgei outi %r0 10 addi %v0 %v0 4 jmpi loopi outi: prepare pushargi buff ellipsis finishi @printf /* sprintf(buff, "%.1f %.1f %.1f %.1f %.1f " "%.1f %.1f %.1f %.1f %.1f\n", 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0); */ prepare pushargi buff pushargi dfmt ellipsis pushargi_d 0.0 pushargi_d 1.0 pushargi_d 2.0 pushargi_d 3.0 pushargi_d 4.0 pushargi_d 5.0 pushargi_d 6.0 pushargi_d 7.0 pushargi_d 8.0 pushargi_d 9.0 finishi @sprintf /* sscanf(buff, "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf\n", dchk+0, dchk+1, dchk+2, dchk+3, dchk+4, dchk+5, dchk+6, dchk+7, dchk+8, dchk+9); */ movi %v0 dchk prepare pushargi buff pushargi lfmt ellipsis pushargr %v0 /* 0 */ addi %v0 %v0 8 pushargr %v0 /* 1 */ addi %v0 %v0 8 pushargr %v0 /* 2 */ addi %v0 %v0 8 pushargr %v0 /* 3 */ addi %v0 %v0 8 pushargr %v0 /* 4 */ addi %v0 %v0 8 pushargr %v0 /* 5 */ addi %v0 %v0 8 pushargr %v0 /* 6 */ addi %v0 %v0 8 pushargr %v0 /* 7 */ addi %v0 %v0 8 pushargr %v0 /* 8 */ addi %v0 %v0 8 pushargr %v0 /* 9 */ finishi @sscanf movi %v0 dchk movi_d %f0 0.0 loopd: ldr_d %f1 %v0 beqr_d nextd %f0 %f1 calli @abort nextd: addi_d %f0 %f0 1.0 bgei_d outd %f0 10.0 addi %v0 %v0 8 jmpi loopd outd: prepare pushargi buff ellipsis finishi @printf /* sprintf(buff, "%d %.1f %d %.1f %d %.1f %d %.1f %d %.1f " "%d %.1f %d %.1f %d %.1f %d %.1f %d %.1f\n", 0, 0.0, 1, 1.0, 2, 2.0, 3, 3.0, 4, 4.0, 5, 5.0, 6, 6.0, 7, 7.0, 8, 8.0, 9, 9.0); */ prepare pushargi buff pushargi idfmt ellipsis pushargi 0 pushargi_d 0.0 pushargi 1 pushargi_d 1.0 pushargi 2 pushargi_d 2.0 pushargi 3 pushargi_d 3.0 pushargi 4 pushargi_d 4.0 pushargi 5 pushargi_d 5.0 pushargi 6 pushargi_d 6.0 pushargi 7 pushargi_d 7.0 pushargi 8 pushargi_d 8.0 pushargi 9 pushargi_d 9.0 finishi @sprintf /* sscanf(buff, "%d %lf %d %lf %d %lf %d %lf %d %lf " "%d %lf %d %lf %d %lf %d %lf %d %lf\n", ichk+0, dchk+0, ichk+1, dchk+1, ichk+2, dchk+2, ichk+3, dchk+3, ichk+4, dchk+4, ichk+5, dchk+5, ichk+6, dchk+6, ichk+7, dchk+7, ichk+8, dchk+8, ichk+9, dchk+9); */ movi %v0 ichk movi %v1 dchk prepare pushargi buff pushargi ldfmt ellipsis pushargr %v0 /* 0 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 1 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 2 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 3 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 4 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 5 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 6 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 7 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 8 */ addi %v0 %v0 4 pushargr %v1 addi %v1 %v1 8 pushargr %v0 /* 9 */ pushargr %v1 finishi @sscanf movi %v0 ichk movi %v1 dchk movi %r0 0 movi_d %f0 0.0 loopid: ldr_i %r1 %v0 beqr checkd %r0 %r1 calli @abort checkd: ldr_d %f1 %v1 beqr_d nextid %f0 %f1 calli @abort nextid: addi %r0 %r0 1 addi_d %f0 %f0 1.0 bgei outid %r0 10 addi %v0 %v0 4 addi %v1 %v1 8 jmpi loopid outid: prepare pushargi buff ellipsis finishi @printf /* sprintf(buff, "%.1f %d %.1f %d %.1f %d %.1f %d %.1f %d " "%.1f %d %.1f %d %.1f %d %.1f %d %.1f %d\n", 0.0, 0, 1.0, 1, 2.0, 2, 3.0, 3, 4.0, 4, 5, 5.0, 6.0, 6, 7.0, 7, 8.0, 8, 9.0, 9); */ prepare pushargi buff pushargi difmt ellipsis pushargi_d 0.0 pushargi 0 pushargi_d 1.0 pushargi 1 pushargi_d 2.0 pushargi 2 pushargi_d 3.0 pushargi 3 pushargi_d 4.0 pushargi 4 pushargi_d 5.0 pushargi 5 pushargi_d 6.0 pushargi 6 pushargi_d 7.0 pushargi 7 pushargi_d 8.0 pushargi 8 pushargi_d 9.0 pushargi 9 finishi @sprintf /* sscanf(buff, "%lf %d %lf %d %lf %d %lf %d %lf %d " "%lf %d %lf %d %lf %d %lf %d %lf %d \n", dchk+0, ichk+0, dchk+1, ichk+1, dchk+2, ichk+2, dchk+3, ichk+3, dchk+4, ichk+4, dchk+5, ichk+5, dchk+6, ichk+6, dchk+7, ichk+7, dchk+8, ichk+8, dchk+9, ichk+9); */ movi %v0 dchk movi %v1 ichk prepare pushargi buff pushargi dlfmt ellipsis pushargr %v0 /* 0 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 1 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 2 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 3 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 4 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 5 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 6 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 7 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 8 */ addi %v0 %v0 8 pushargr %v1 addi %v1 %v1 4 pushargr %v0 /* 9 */ pushargr %v1 finishi @sscanf movi %v0 ichk movi %v1 dchk movi %r0 0 movi_d %f0 0.0 loopdi: ldr_i %r1 %v0 beqr check_d %r0 %r1 calli @abort check_d: ldr_d %f1 %v1 beqr_d nextdi %f0 %f1 calli @abort nextdi: addi %r0 %r0 1 addi_d %f0 %f0 1.0 bgei outdi %r0 10 addi %v0 %v0 4 addi %v1 %v1 8 jmpi loopdi outdi: prepare pushargi buff ellipsis finishi @printf ret epilog
0aafe438c9fb9af4ef02f2694b87a8d5140be279
1489f5f3f467ff75c3223c5c1defb60ccb55df3d
/tests/test_btree_1_b.tst
a28412515a052fe7293f10f8b3f8b6fe2403ba51
[ "MIT" ]
permissive
ciyam/ciyam
8e078673340b43f04e7b0d6ac81740b6cf3d78d0
935df95387fb140487d2e0053fabf612b0d3f9e2
refs/heads/master
2023-08-31T11:03:25.835641
2023-08-31T04:31:22
2023-08-31T04:31:22
3,124,021
18
16
null
2017-01-28T16:22:57
2012-01-07T10:55:14
C++
UTF-8
Scilab
false
false
1,895
tst
test_btree_1_b.tst
Total index levels = 2 Total number of nodes = 11 Total number of items = 26 Dumping level #0 [Node 9] flags = 0, dge_link = 8 lft_link = -1, rgt_link = -1 Item #0, data = o, link = 2 Dumping level #1 [Node 2] flags = 0, dge_link = -1 lft_link = -1, rgt_link = 8 Item #0, data = f, link = 0 Item #1, data = i, link = 10 Item #2, data = l, link = 7 Item #3, data = o, link = 6 [Node 8] flags = 0, dge_link = 1 lft_link = 2, rgt_link = -1 Item #0, data = r, link = 5 Item #1, data = u, link = 4 Item #2, data = x, link = 3 Dumping level #2 [Node 0] flags = 1, dge_link = -1 lft_link = -1, rgt_link = 10 Item #0, data = a, link = -1 Item #1, data = b, link = -1 Item #2, data = c, link = -1 Item #3, data = d, link = -1 Item #4, data = e, link = -1 [Node 10] flags = 1, dge_link = -1 lft_link = 0, rgt_link = 7 Item #0, data = f, link = -1 Item #1, data = g, link = -1 Item #2, data = h, link = -1 [Node 7] flags = 1, dge_link = -1 lft_link = 10, rgt_link = 6 Item #0, data = i, link = -1 Item #1, data = j, link = -1 Item #2, data = k, link = -1 [Node 6] flags = 1, dge_link = -1 lft_link = 7, rgt_link = 5 Item #0, data = l, link = -1 Item #1, data = m, link = -1 Item #2, data = n, link = -1 [Node 5] flags = 1, dge_link = -1 lft_link = 6, rgt_link = 4 Item #0, data = o, link = -1 Item #1, data = p, link = -1 Item #2, data = q, link = -1 [Node 4] flags = 1, dge_link = -1 lft_link = 5, rgt_link = 3 Item #0, data = r, link = -1 Item #1, data = s, link = -1 Item #2, data = t, link = -1 [Node 3] flags = 1, dge_link = -1 lft_link = 4, rgt_link = 1 Item #0, data = u, link = -1 Item #1, data = v, link = -1 Item #2, data = w, link = -1 [Node 1] flags = 3, dge_link = -1 lft_link = 3, rgt_link = -1 Item #0, data = x, link = -1 Item #1, data = y, link = -1 Item #2, data = z, link = -1
86d46197ba2ce13266790faa0278a5ce3b5d1e12
449d555969bfd7befe906877abab098c6e63a0e8
/2609/CH10/EX10.1/Ex10_1.sce
60c8cc65e008c27e52ebf8f77d436c8eb5212df5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex10_1.sce
////Ex 10.1 clc; clear; close; format('v',5); t=0:0.01:5;//sec(Assumed) Vin=5*sin(2*%pi*t);//V VCC=15;//V R2=1;//kohm R1=6.8;//kohm VEE=-15;//V Vsat=13;//V Vref=R2*VCC/(R1+R2);//V disp(Vref,"Reference Voltage(V)") disp(Vsat,"If Vin>Vref , Vout (V):"); disp(-Vsat,"If Vin<Vref , Vout (V):");
d1b3a9a4df63ec0bb9b8521b206bf6ef4df60d3a
449d555969bfd7befe906877abab098c6e63a0e8
/2015/CH4/EX4.8/4_8.sce
58fd68ffc5b67ed7d75ffc41f2a9b4c614e3f820
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
569
sce
4_8.sce
clc //initialisation of variables h1=2990 //kj/kg h2=2710 //kj/kg h3=2325 //kj/kg h4=152 //kj/kg h5=152 //kj/kg h7=505 //kj/kg wo=612 //kj/kg qs=2485 //kj/kg //CALCULATIONS m=(h7-h4)/(h2-h4) mph=m*30000 ip=((h1-h2)+(1-m)*(h2-h3))*(30000/3600) teff=wo/qs //when there is no feeding eff=(h1-h3)/(h1-h4) sc=(3600/(h1-h3))*ip //RESULTS printf('internal powers is %2fkw',ip) printf('\nthermal efficiency when feeding is there is %2f',teff) printf('\nwhen there is no feeding,thermal efficiency is %2f',eff) printf('\nsteam consumption is %2fkg/h',sc)
03cae750db3038bb18d99f74b4435064252b728f
449d555969bfd7befe906877abab098c6e63a0e8
/1775/CH3/EX3.4/Chapter3_Example4.sce
0e8ea93ce340c7d0d5667a28cd220bd787d7a9f3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,876
sce
Chapter3_Example4.sce
//Chapter-3, Illustration 4, Page 142 //Title: Internal Combustion Engines //============================================================================= clc clear //INPUT DATA Hm=21;//Mean height of indicator diagram in mm isn=27;//indicator spring number in kN/(m^2)/mm Vs=14;//Swept volume in litres N=6.6;//Speed of engine in rev/s Pe=77;//Effective brake load in kg Re=0.7;//Effective vrake radius in m mf=0.002;//fuel consumed in kg/s CV=44000;//Calorific value of fuel in kJ/kg mc=0.15;//cooling water circulation in kg/s Ti=311;//cooling water inlet temperature in K To=344;//cooling water outlet temperature in K C=4.18;//specific heat capacity of water in kJ/kg-K Ee=33.6;//Energy to exhaust gases in kJ/s g=9.81;//Acceleration due to geravity in m/(s^2) //CALCULATIONS imep=isn*Hm;//Indicated mean efective pressure in kN/(m^2) IP=(imep*Vs*N)/(2000);//Indicated Power in kW BP=(2*3.1415*N*g*Pe*Re)/1000;//Brake Power in kW nM=(BP/IP)*100;//Mechanical efficiency Ef=mf*CV;//Eneergy from fuel in kJ/s Ec=mc*C*(To-Ti);//Energy to cooling water in kJ/s Es=Ef-(BP+Ec+Ee);//Energy to surroundings in kJ/s p=(BP*100)/Ef;//Energy to BP in % q=(Ec*100)/Ef;//Energy to coolant in % r=(Ee*100)/Ef;//Energy to exhaust in % w=(Es*100)/Ef;//Energy to surroundings in % //OUTPUT mprintf('Indicated Power is %3.1f kW \n Brake Power is %3.0f kW \n Mechanical Efficiency is %3.0f percent \n \nENERGY BALANCE kJ/s Percentage \nEnergy from fuel %3.0f 100\nEnergy to BP %3.0f %3.0f\nEnergy to coolant %3.01f %3.1f\nEnergy to exhaust %3.1f %3.1f\nEnergy to surroundings, etc %3.1f %3.1f',IP,BP,nM,Ef,BP,p,Ec,q,Ee,r,Es,w) //==============================END OF PROGRAM=================================
a8a1dd3ba80b5de5d22a020c3fd25a8ffa091272
449d555969bfd7befe906877abab098c6e63a0e8
/548/DEPENDENCIES/3_02data.sci
de42fdc4d144e80ce59e1de0b77b345ca8078e88
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
sci
3_02data.sci
//datas are all taken from standard table of variation of temperature,pressure and density with height. //Pressure at the flying altitude: P=4.72*10^4;//in N/m^2 P1=6;//height corresponding to pressure P in Km //Temperature at the flying altitude: T=255.7;//in Kelvin T1=5//height corresponding to temperature T in Km D=P/(R*T)//density at that height D1=6.24//height corresponding to density D in Km
c0489157f5772a9945cf837e5ae25695d5c5790e
449d555969bfd7befe906877abab098c6e63a0e8
/2333/CH6/EX6.15/15.sce
cf0a3d7c4f3cdf04d282ee07b8fea714b7e77c3e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
435
sce
15.sce
clc // Given that l = 10 // length of fiber in kilo meter P_in = 900 // Power of input signal in micro watt alpha = 2.3 // attenuation loss in dB // Sample Problem 15 on page no. 281 printf("\n # PROBLEM 15 # \n") P_out = P_in*10^(-alpha) // Power at output in microwatt printf("\n Standard formula used \n alpha=10/L*log(Pi/Po).\n") printf("\n Power at output end is %f micro Watt.",P_out) // Answer given in book is 1.79 micro Watt
f16dac40caac925bd8837b5f5a31fe9edacdd5ea
449d555969bfd7befe906877abab098c6e63a0e8
/196/CH5/EX5.2/example_5_2.sce
231bd0b722784ae61992c2c1c28717325ec086ad
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
261
sce
example_5_2.sce
//Chapter 5 //Example 5-2 //ProbOnInputResistance //Page 121,122, Figure 5-1 clear;clc; //Given Efs = 5 ;//Full scale Voltage Ifs = 50*10^-6;//Full scale Meter Current Ri = Efs / Ifs ;// Input Resistance printf ( "\n\n Input Resistance = %.4f ", Ri )
8a3b0fc39c920b797fdafdf55668058fa737bf07
449d555969bfd7befe906877abab098c6e63a0e8
/1859/CH2/EX2.19/exa_2_19.sce
7b796f5cfd0660c29b733dcf52b473924ea147d0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
exa_2_19.sce
// Exa 2.19 clc; clear; close; // Given data E= 200;// in V del_E_by_E= 1; R=1000;// in ohm del_R_by_R= 5; P=E^2/R;// in watt disp(P,"Normal power consumed in watt") LimError= 2*del_E_by_E+del_R_by_R;// in % disp(LimError,"Relative limiting error in measurement of power in percentage") LimError= LimError*P/100;//in watt disp(LimError,"Limiting error of power in watt")
3a4c63d52cb6286400e1ed4e5d88fcf5a6708211
a32457bc76e1a5fe9898d7f84b937381d3bcb80d
/experiment3.sce
b4eeb3720e39f4884852c342e2ed4f860c648f35
[]
no_license
kunalsparkx10/signal-and-systems
90d80c4b279b3c44ddd328fbf088ddbbc1ca9b5f
97164f97bd59b1d8b302efeab6a7f6a2640c0a57
refs/heads/main
2023-01-14T10:44:22.315838
2020-11-25T18:24:57
2020-11-25T18:24:57
316,021,693
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,066
sce
experiment3.sce
clc; clear all; close; clf; t=0:0.01:100 x=cos(2*%pi*0.02*t) subplot(2,2,1) plot(t,x) xlabel("t") ylabel("x") //case 1 fs=0.002; n=0:1:100 x1=cos(2*%pi*0.02*(n/fs)) subplot(2,2,2) plot2d3(n,x1) //case 2 fs=0.04; n=0:1:10 x1=cos(2*%pi*0.02*(n/fs)) subplot(2,2,3) plot2d3(n,x1) //case 3 fs=0.4; n=0:1:100 x1=cos(2*%pi*0.02*(n/fs)) subplot(2,2,4) plot2d3(n,x1) clc; figure; n=0:2:100; fs=0.002; fm=5 A=1; x=A*cos((2*%pi*fm*(n/fs))); subplot(2,2,1) plot2d3(n,x); //figure; n=0:2:100; fs=0.04; fm=45 A=1; x=A*cos((2*%pi*fm*(n/fs))); subplot(2,2,2) plot2d3(n,x); //figure n=0:2:100; fs=0.4; fm=55 A=1; x=A*cos((2*%pi*fm*(n/fs))); subplot(2,2,3) plot2d3(n,x); t=0:0.01:1 x1=cos(2*%pi*5*t) subplot(1,3,1) plot(t,x1) x2=cos(2*%pi*45*t) subplot(1,3,2) plot(t,x2) x3=cos(2*%pi*55*t) subplot(1,3,3) plot(t,x3) fs=50; n=0:1:50 x4=cos(2*%pi*5*(n/fs)) subplot(1,3,1) plot2d3(n,x4) x5=cos(2*%pi*45*(n/fs)) subplot(1,3,2) plot2d3(n,x5) x6=cos(2*%pi*55*(n/fs)) subplot(1,3,3) plot2d3(n,x6)
b629c60b687703cab8fe9ed411265bd1f3b82a31
449d555969bfd7befe906877abab098c6e63a0e8
/3516/CH10/EX10.2/Ex10_2.sce
21a235c4b6880b31de16fa361eb753c3303dbaeb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
3,650
sce
Ex10_2.sce
printf("\t example 10.2 \n"); printf("\t approximate values are mentioned in the book \n"); T1=250; // inlet hot fluid,F T2=250; // outlet hot fluid,F t1=95; // inlet cold fluid,F t2=145; // outlet cold fluid,F W=16000; // lb/hr w=423; // lb/hr printf("\t 1.for heat balance \n"); printf("\t for kerosene \n"); c=0.5; // Btu/(lb)*(F) Q=((W)*(c)*(t2-t1)); // Btu/hr printf("\t total heat required for kerosene is : %.0f Btu/hr \n",Q); printf("\t for steam \n"); l=945.5; // Btu/(lb) Q=((w)*(l)); // Btu/hr printf("\t total heat required for steam is : %.2e Btu/hr \n",Q); delt1=T2-t1; //F delt2=T1-t2; // F printf("\t delt1 is : %.0f F \n",delt1); printf("\t delt2 is : %.0f F \n",delt2); LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1)))); printf("\t LMTD is :%.0f F \n",LMTD); tc=((t1)+(t2))/2; // caloric temperature of cold fluid,F printf("\t caloric temperature of cold fluid is : %.0f F \n",tc); printf("\t hot fluid:shell side,steam \n"); ho=(1500); // condensation of steam Btu/(hr)*(ft^2)*(F) printf("\t individual heat transfer coefficient is : %.0f Btu/(hr)*(ft^2)*(F) \n",ho); printf("\t cold fluid:inner tube side,kerosene \n"); Nt=86; n=2; // number of passes L=12; //ft at1=0.594; // flow area, in^2,from table 10 at=((Nt*at1)/(144*n)); // total area,ft^2,from eq.7.48 printf("\t flow area is : %.3f ft^2 \n",at); Gt=(W/(.177)); // mass velocity,lb/(hr)*(ft^2) printf("\t mass velocity is : %.2e lb/(hr)*(ft^2) \n",Gt); mu2=1.36*2.42; // at 145F,lb/(ft)*(hr) D=(0.87/12); // ft Ret1=((D)*(Gt)/mu2); // reynolds number printf("\t reynolds number is : %.0f \n",Ret1); mu3=1.75*2.42; // at 120F,lb/(ft)*(hr) D=(0.87/12); // ft Ret2=((D)*(Gt)/mu3); // reynolds number printf("\t reynolds number is : %.1e \n",Ret2); Z1=331; // Z1=(L*n/D) jH=3.1; // from fig 24 mu4=1.75; // cp and 40 API Z2=0.24; // Z2=((k)*(c*mu4/k)^(1/3)), from fig 16 Hi=((jH)*(1/D)*(Z2)); // using eq.6.15a,Btu/(hr)*(ft^2)*(F) printf("\t Hi is : %.2f Btu/(hr)*(ft^2)*(F) \n",Hi); ID=0.87; // ft OD=1; //ft Hio=(Hi*(ID/OD)); //Btu/(hr)*(ft^2)*(F), from eq.6.5 printf("\t Hio is : %.2f Btu/(hr)*(ft^2)*(F) \n",Hio); tw=(tc)+(((ho)/(Hio+ho))*(T1-tc)); // from eq.5.31 printf("\t tw is : %.0f F \n",tw); muw=1.45; // lb/(ft)*(hr),at 249F from fig.14 phyt=(mu3/muw)^0.14; printf("\t phyt is : %.1f \n",phyt); // from fig.24 hio=(Hio)*(phyt); // from eq.6.37 printf("\t Correct hio to the surface at the OD is : %.1f Btu/(hr)*(ft^2)*(F) \n",hio); delt=tw-tc; //F printf("\t delt is : %.0f F \n",delt); printf("\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \n"); s=0.8; row=50; // lb/ft^3, from fig 6 s1=0.810; // at 95F s2=0.792; // at 145F bita=((s1^2-s2^2)/(2*(t2-t1)*s1*s2)); // /F printf("\t beta is : %.6f /F \n",bita); G=((D^3)*(row^2)*(bita)*(delt)*(4.18*10^8)/(mu3^2)); printf("\t G is : %.1e \n",G); psy=((2.25)*(1+(0.01*G^(1/3)))/(log10(Ret2))); printf("\t psy is : %.2f \n",psy); hio1=(hio*psy); printf("\t corrected hio1 is : %.1f Btu/(hr)*(ft^2)*(F) \n",hio1); Uc=((hio1)*(ho)/(hio1+ho)); // clean overall coefficient,Btu/(hr)*(ft^2)*(F) printf("\t clean overall coefficient is : %.1f Btu/(hr)*(ft^2)*(F) \n",Uc); A2=0.2618; // actual surface supplied for each tube,ft^2,from table 10 A=(Nt*L*A2); // ft^2 printf("\t total surface area is : %.0f ft^2 \n",A); UD=((Q)/((A)*(delt))); printf("\t actual design overall coefficient is : %.1f Btu/(hr)*(ft^2)*(F) \n",UD); Rd=((Uc-UD)/((UD)*(Uc))); // (hr)*(ft^2)*(F)/Btu printf("\t actual Rd is : %.2f (hr)*(ft^2)*(F)/Btu \n",Rd); // end
26a9186435cc24badc0a205f8cf13ee9d2bbe4ab
449d555969bfd7befe906877abab098c6e63a0e8
/1946/CH4/EX4.25/Ex_4_25.sce
1d903ad9c3cbbf71598bee890783b6732dd7c17d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
394
sce
Ex_4_25.sce
// Example 4.25;//birefringence clc; clear; close; Lbc1=0.5;//beat length mm h=1.3;//wavelength in micro meter Bf1=((h*10^-6)/(Lbc1*10^-3));// birefringence when beat length = 0.5mm Lbc2=60;//beat length meter Bf2=((h*10^-6)/(Lbc2));// birefringence when beat length = 60 meter disp(Bf1,"birefringence when beat length = 0.5mm") disp(Bf2,"birefringence when beat length = 60 meter")
0f4934ea53debde212c367c6e5c99faa8e5b06f1
449d555969bfd7befe906877abab098c6e63a0e8
/69/CH11/EX11.3/11_3.sce
5adae3423823f3a285ac44f6d728240acdf32c0f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
208
sce
11_3.sce
clear; clc; close; Rf = 470*10^(3); R1 = 4.3*10^(3); R2 = 33*10^(3); R3 = 33*10^(3); Vi = 80*10^(-6); A = ((1+(Rf/R1))*(-Rf/R2)*(-Rf/R3)); Vo = A*Vi; disp(Vo,'Output voltage(Volts) = ');
bcd22bf0593aa3ba8ab74bb5daaece52875bed2d
449d555969bfd7befe906877abab098c6e63a0e8
/3547/CH10/EX10.7/EX10_7.sce
ef8dc9d8016bb1fb113214c3ad8b239da903002a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,196
sce
EX10_7.sce
// Example 10.7 // Calculation of the variance of (a) linear phase noise, (b) nonlinear phase noise at the receiver // Page no 477 clc; clear; close; //Given data alpha=0.0461; // Loss coeffient na=20; // No of amplifiers L=80; // Amplifier spacing tb=25*10^-12; // Pulse width P=2*10^-3; // Peak power c=3*10^8; // Velocity of light lambda=1550*10^-9; n=1.5; // Spontaneous emission factor h=6.626*10^-34; // Planck constant r0=1.1*10^-3; // Nonlinear coefficient // a) linear phase noise at the receiver G=exp(alpha*L); f=c/lambda; R=h*f*(G-1)*n; E=P*tb; rl=(na*R)/(2*E); rl=rl*10^3; // (b) nonlinear phase noise at the receiver Le=(1-exp(-alpha*L))/alpha; rnl=((na-1)*na*(2*na-1)*R*E*r0^2*Le^2)/(3*tb^2); rnl=rnl*10^9; t=rl+rnl; //Displaying results in the command window printf("\n The linear phase noise at the receiver = %0.2f rad^2 ",rl); printf("\n The nonlinear phase noise at the receiver = %0.2f rad^2 ",rnl); printf("\n The total variance = %0.2f X 10^-3 rad^2 ",t);
f94e485d8276e94d2626cd4644185781315dab45
4b1558e166b13f0e90c889b11ee516e4925626ed
/aula13.sce
dffadbe6bf799d270ef4cc8734150c7ebb961a24
[]
no_license
dalpendre/EI_matematica_discreta
a4712b5c7ea085eb5238a0e45c89733ba25a64b6
93cf0c75c41a231aadf919293089ce240695bf10
refs/heads/master
2022-08-09T18:27:37.572002
2020-05-21T13:00:22
2020-05-21T13:00:22
254,603,532
0
0
null
null
null
null
UTF-8
Scilab
false
false
847
sce
aula13.sce
//Aula Prática 13 function y=blargura(A,vert) //A-matriz de adjacências //vert->vértice inicial //algoritmo de busca em largura L=size(A,1); estado=ones(1,L); //colocar todos os vértices com estado 1 Fila=list(vert); estado(vert)=2; //Colocar o 1º vértice com estado 2 visitado=list(); while length(Fila) ~= 0 visitado($+1)=Fila(1) //O vértice que se encontra an 1ª posição da fila estado(Fila(1))=3; disp(visitado) //estudar os sucessores com estado 1 for 1:L if A(Fila(1),i)==1 & estado(Fila(1))==1 Fila($+1)=i; estado(i)=2 end end //eliminar o 1º elemento da fila Fila(1)=null(); end V=visitado; endfunction excel=readxls('Grafo_f8.xls');
e635075b21655ad4ca35b33e8cb85d7776aaa711
449d555969bfd7befe906877abab098c6e63a0e8
/608/CH45/EX45.01/45_01.sce
37fbae79e1fa6b87e907de92190cee75df173028
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,026
sce
45_01.sce
//Problem 45.01: A 500 nF capacitor is connected in series with a 100 kohm resistor and the circuit is connected to a 50 V, d.c. supply. Calculate (a) the initial value of current flowing, (b) the value of current 150 ms after connection, (c) the value of capacitor voltage 80 ms after connection, and (d) the time after connection when the resistor voltage is 35 V. //initializing the variables: C = 500E-9; // in Farad R = 100000; // in Ohm V = 50; // in VOlts ti = 0.15; // in sec tc = 0.08; // in sec Vrt = 35; // in Volts //calculation: //Initial current, i0 = (V/R) //when time t = 150ms current is i150 = (V/R)*%e^(-1*ti/(R*C)) //capacitor voltage, Vc Vc = V*(1 - %e^(-1*tc/(R*C))) //time, t tvr = -1*R*C*log(Vrt/V) printf("\n\n Result \n\n") printf("\n initial value of current flowing is %.2E A",i0) printf("\n current flowing at t = 150ms is %.2E A",i150) printf("\n value of capacitor voltage at t = 80ms is %.2f V",Vc) printf("\n the time after connection when the resistor voltage is 35 V is %.4f sec",tvr)
4c4beae50b3a24ea6989378bc9f191a239a9c881
814f1fb7876c113556c8a80e257bc16eb7cdf530
/old stuff/get_pages_from_ogg.sci
9f8d8e137560a2c6798a11d7930d6834cabac416
[]
no_license
jamiepg1/Vorbis_decoder
10d6847120efce98684092ad1d4c812290faf9e1
6cabd547539ac607e625f90e1f72023526de0672
refs/heads/master
2018-05-12T18:54:09.244192
2013-07-30T21:51:27
2013-07-30T21:51:27
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,034
sci
get_pages_from_ogg.sci
function pageStruc = get_pages_from_ogg(source) s = length(source); pageCount = 0; pageStruc = struct( 'capture_pattern', 0,... 'stream_structure_version', 0,... 'header_type_flag', 0,... 'absolute_granule_pos', 0,... 'stream_serial_number', 0,... 'page_sequence_no', 0,... 'page_checksum', 0,... 'page_segments', 0,... 'segment_table', 0,... 'packet', 0); elementCount = 1; err_cnt = 0; // Page start string - OggS - capture pattern page_start = ascii('OggS'); i = 1; packetCount = 1; while(i <= s-4) // for now get only 5 pages - TODO improve performance if(pageCount > 5) break; end //if(source(i) == ascii('O') & source(i+1) == ascii('g') & source(i+2) == ascii('g') & source(i+3) == ascii('S')) if( isequal(source(i:i+3), page_start) ) pageCount = pageCount + 1; elementCount = 1; packetCount = 1; packet = 1; printf('.'); pageStruc(pageCount).capture_pattern = source(i:i+3); pageStruc(pageCount).stream_structure_version = source(i+4); pageStruc(pageCount).header_type_flag = source(i+5); pageStruc(pageCount).absolute_granule_pos = sum(source(i+6:i+13)); pageStruc(pageCount).stream_serial_number = sum(source(i+14:i+17)); pageStruc(pageCount).page_sequence_no = sum(source(i+18:i+21)); pageStruc(pageCount).page_checksum = sum(source(i+22:i+25)); // TODO add CRC check pageStruc(pageCount).page_segments = source(i+26); pageStruc(pageCount).segment_table = source(i+27:i+pageStruc(pageCount).page_segments+26); i = i + pageStruc(pageCount).page_segments + 26 + 1; currentSegmentCount = pageStruc(pageCount).segment_table(packetCount); totalSegmentCount = pageStruc(pageCount).page_segments; end; //pageData(pageCount,elementCount) = source(i); //elementCount = elementCount + 1; packet(packetCount,elementCount) = source(i); elementCount = elementCount + 1; i = i + 1; if(elementCount >= currentSegmentCount) packet(packetCount,elementCount) = source(i); pageStruc(pageCount).packet = packet; packetCount = packetCount + 1; i = i + 1; if(packetCount < totalSegmentCount) currentSegmentCount = pageStruc(pageCount).segment_table(packetCount); else err_cnt = err_cnt + 1; end; elementCount = 1; end; end endfunction
208bd7aa6b24504eb639ee960a272cd8bca37d6c
449d555969bfd7befe906877abab098c6e63a0e8
/46/CH19/EX19.2/Example19_2.sce
126b65204b72237c13fda8c6826b4f38ca14710b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,042
sce
Example19_2.sce
//Example 19.2 clc s=%s; syms t Kc tauI; Gc=Kc*(1+1/(tauI*s)) G=1/(s+1)^4; G=syslin('c',G) Gs=Gc*G/(1+Gc*G)//Overall transfer function Us=1/s; Cs=G*Us; //Cohen-Coon method Ct=ilaplace(Cs,s,t) Ct1=diff(Ct,t) Ct2=diff(Ct1,t) disp('=0',Ct2) //On solving the equation we get t=linsolve(-1,3) S=dbl(Ct1) C3=dbl(Ct) //From the figure 19.10 (B Vs t) y2=0.353; y1=0; x2=3; Td=3-(y2-y1)/S Bu=1;//ultimate value of B //From Eq.(19.4) T=Bu/S Kp=1; //From Table 19.2 Kc=T*(0.9+Td/(12*T))/(Kp*Td) tauI=Td*(30+3*Td/T)/(9+20*Td/T) //By Z-N method clf bode(G) show_margins(G) //From Bode diagrams we get Kcu=4; Pu=2*%pi; //Since Gc is a PI controller, by Z-N rules Kc=0.45*Kcu tauI=Pu/1.2 //By fitting the process reaction curve to a first order wit transport lag model by means of a least square fitting procedure. Applying the least square fit procedure out to t=5 produced the following results Td=1.5; T=3; //By applying Cohen-Coon rules, we get Kc=T*(0.9+Td/(12*T))/(Kp*Td) tauI=Td*(30+3*Td/T)/(9+20*Td/T)
0215a50e8f5c283f6a035d40170a271374325ca1
449d555969bfd7befe906877abab098c6e63a0e8
/3683/CH3/EX3.10/Ex3_10.sce
52802c086b4e699b5db1ed5094d5904c181feb7d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,066
sce
Ex3_10.sce
Bf=1300//width of flange, in mm Df=100//thickness of flange, in mm d=500//effective depth, in mm sigma_cbc=5//in MPa sigma_st=275//in MPa m=18.66//modular ratio Ast=1570//in sq mm Asc=1256//in sq mm top_cover=30//in mm //to find critical depth of neutral axis Xc=d/(1+sigma_st/(m*sigma_cbc))//in mm //assume x>Df; equating moments of area on compression and tension sides about N.A. x=(m*Ast*d+Bf*Df^2/2+(1.5*m-1)*Asc*top_cover)/(m*Ast+Bf*Df+(1.5*m-1)*Asc)//in mm //as x<Xc, beam is under-reinforced sigma_cbc=sigma_st/m*x/(d-x)//in MPa sigma_cbc_dash=sigma_cbc*(x-top_cover)/x//stress in concrete at level of compression steel, in MPa sigma_cbc_double_dash=sigma_cbc*(x-Df)/x//stress in concrete at the underside of the slab, in MPa //to find lever arm z=round(d-(sigma_cbc+2*sigma_cbc_double_dash)/(sigma_cbc+sigma_cbc_double_dash)*Df/3)//in mm //taking moments about tensile steel Mr=Bf*Df*(sigma_cbc+sigma_cbc_double_dash)*z/2+(1.5*m-1)*Asc*sigma_cbc_dash*(d-top_cover)//in N-mm mprintf("Moment of resistance of the beam=%f kN-m", Mr/10^6)
2b6c6df06c64c7f20ed0747ad719a61eca99700c
527c41bcbfe7e4743e0e8897b058eaaf206558c7
/Positive_Negative_test/Netezza-Base-HypothesisTesting/FLtDist-TD-01.tst
b60f8b6158c4fe5357e8faa4db7d5eb984002291
[]
no_license
kamleshm/intern_fuzzy
c2dd079bf08bede6bca79af898036d7a538ab4e2
aaef3c9dc9edf3759ef0b981597746d411d05d34
refs/heads/master
2021-01-23T06:25:46.162332
2017-07-12T07:12:25
2017-07-12T07:12:25
93,021,923
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,033
tst
FLtDist-TD-01.tst
-- Fuzzy Logix, LLC: Functional Testing Script for DB Lytix functions on Teradata -- -- Copyright (c): 2014 Fuzzy Logix, LLC -- -- NOTICE: All information contained herein is, and remains the property of Fuzzy Logix, LLC. -- The intellectual and technical concepts contained herein are proprietary to Fuzzy Logix, LLC. -- and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade -- secret or copyright law. Dissemination of this information or reproduction of this material is -- strictly forbidden unless prior written permission is obtained from Fuzzy Logix, LLC. -- -- -- Functional Test Specifications: -- -- Test Category: Hypothesis Testing Functions -- -- Test Unit Number: FLtDist-TD-01 -- -- Name(s): FLtDist -- -- Description: Function that evaluates the T-Statistic. Return P-Value of a -- T-Statistic given degree of freedom. -- -- Applications: -- -- Signature: FLTDist(InVal DOUBLE PRECISION, Df BIGINT, NumTails BIGINT) -- -- Parameters: See Documentation -- -- Return value: Double Precision -- -- Last Updated: 01-31-2014 -- -- Author: <Joe.Fan@fuzzyl.com> -- -- BEGIN: TEST SCRIPT .run file=../PulsarLogOn.sql -- BEGIN: NEGATIVE TEST(s) ---- Validate the parameters ---- Case 1a: Validate degrees of freedom SELECT FLtDist(10, 0, 1); -- Result: Fuzzy Logix specific error message SELECT FLtDist(10, -1, 1); -- Result: Fuzzy Logix specific error message ---- Case 1b: Validate tails SELECT FLtDist(10, 5, 0); -- Result: Fuzzy Logix specific error message SELECT FLtDist(10, 5, -1); -- Result: Fuzzy Logix specific error message SELECT FLtDist(10, 5, 3); -- Result: Fuzzy Logix specific error message ---- Case 1c: Validate that the first argument is positive SELECT FLtDist(0, 5, 1); -- Result: returns 0.5 SELECT FLtDist(-1, 5, 1); -- Result: Fuzzy Logix specific error message -- END: NEGATIVE TEST(s) -- BEGIN: POSITIVE TEST(s) -- Test with normal and extreme scale factor values ---- Compare the values with R -- Case 1a: SELECT a.SerialVal, FLtDist(a.SerialVal, 3, 1) FROM fzzlSerial a WHERE a.SerialVal <= 10 ORDER BY 1; -- Result: standard output (matches R to 9 decimal places) -- R: 1-pt(c(1,2,3,4,5,6,7,8,9,10),3) ---- Case 1b: Test with very large values SELECT FLtDist(1, 500, 1); -- Result: standard output (matches R) -- R: 1-pt(1,500) SELECT FLtDist(1, 5000, 1); -- Result: standard output (matches R) -- R: 1-pt(1,5000) SELECT FLtDist(1, 50000, 1); -- Result: standard output (matches R) -- R: 1-pt(1,50000) SELECT FLtDist(100, 5, 1); -- Result: standard output (matches R) -- R: 1-pt(100,5) SELECT FLtDist(1000, 5, 1); -- Result: off by a little bit (9.43689570931383E-015 vs 9.547918e-15 in R) -- R: 1-pt(1000,5) SELECT FLtDist(10000, 5, 1); -- Result: standard output (matches R) -- R: 1-pt(10000,5) --Case 2 a --increase the DF to > 10000 to see if function fails SELECT FLtDist(4, 100000, 1) AS FLtDist; -- END: POSITIVE TEST(s) -- END: TEST SCRIPT
f2994dc1ca840ecd9e80ed018e8b3ed7cce890e6
449d555969bfd7befe906877abab098c6e63a0e8
/896/CH7/EX7.9/9.sce
05d97530fb8455f80a515443d7d7e8d0df86c2a4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
200
sce
9.sce
clc //Example 7.9 //Calculate the specific impulse for a rocket Vy_exh=-3000//m/s in negative y direction Isp=-Vy_exh/1000//KN.s/Kg printf("The specific impulse on the rocket is %f KN.s/Kg",Isp);
51ca3d5c8f782bd22156cce6bfe72538ad99f310
449d555969bfd7befe906877abab098c6e63a0e8
/1646/CH15/EX15.4/Ch015Ex4.sce
f9ec39bbecec0d9867f068ff884a15450f31e3a0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
459
sce
Ch015Ex4.sce
// Scilab code Ex15.4 : Pg:772(2011) clc;clear; function octal = decimal_octal(n) // Function to convert decimal to octal i=1; octal = 0; while (n<>0) rem = n-fix(n./8).*8; octal = octal + rem*i; n = int(n/8); i = i*10; end endfunction n = 278; // Initialize the octal number printf("The octal equivalent of %d = %d", n, decimal_octal(n)); // Result // The octal equivalent of 278 = 426
64d139ce52ed6da1fb246ab988a664525b08a4bc
34dcfd0a3d3a661a623ba00e305d50592ca2e9cf
/Secante.sce
a0680d79022f41909e89b761e27080462e496eec
[]
no_license
kelly-santos/M-todo-N-merico
65bc023d4a705c83037634540d2b6ae1ed967242
9ae1c6d1eeb8bb855b8d911e896d2a918762c66b
refs/heads/main
2022-12-27T10:17:16.964964
2020-10-12T17:12:15
2020-10-12T17:12:15
303,458,411
1
0
null
null
null
null
UTF-8
Scilab
false
false
425
sce
Secante.sce
function y =t0(x) y = -481 +408 +589.64 * x + (-2349.163 * x^2)/2 endfunction a = 0 b = 0.835 x= a xOld = b contador = 0 while(1) xaux = xOld xOld = x; x= xOld - (t0(xOld)*(xaux - xOld))/(t0(xaux)-t0(xOld)) Er = abs((x-xOld)/x) contador = contador +1 if (Er < 10^-3) then break end if(t0(a)*t0(x) < 0) b= x else a=x end end
72578605618105261b31a55077f06fdc9ac77126
78d7674f9dbae91af479e09422148a47f232bb78
/diagrama_fases_novo.sce
40cc4af5b48f01e21c819ad0644b53c5f9289079
[]
no_license
gusplatt/teste
0f2bda1c69d3c72c0f81c64c77e909ddbe66862d
910d76f1a40b368fa6d2b9abc4e19a9fc798ae33
refs/heads/master
2021-01-19T19:02:33.781218
2017-08-23T13:55:36
2017-08-23T13:55:36
101,183,810
0
0
null
null
null
null
UTF-8
Scilab
false
false
7,155
sce
diagrama_fases_novo.sce
clc clear function psat = antoine(T) A = [4.02832 ; 5.24677]; B = [1268.636 ; 1598.673]; C = [-56.199 ; -46.424]; //psat = 10^(A - B./(T+C)); //psat em bar T em Kelvin A1 = [6.89677 ; 8.1122]; B1 = [1264.9 ; 1592.864]; C1 = [216.544 ; 226.184]; psat = 10^(A1 - B1./(T-273.15 + C1))*0.0013604323308265306 endfunction function coef_ativ = gama_rk(x,T) denset = 0.7956; maset = 40; denshep = 0.68867; mashep = 100; R = 1.987; v1=mashep/denshep; v2=maset/denset; v2 = 58 V = [v1 ; v2] x2 = 1 - x; x = [x ; x2]; azinho = [617 ; 2096]; //azinho = [935.36;1593.97]; Gama = [(V(2)/V(1))*exp(-azinho(1)/(1.987*T));(V(1)/V(2))*exp(-azinho(2)/(1.987*T))]; MiE_RT1 = -log(x(1) + Gama(1)*x(2)) + x(2)*((Gama(1)/(x(1) + Gama(1)*x(2)))-(Gama(2)/(x(2)+Gama(2)*x(1)))); MiE_RT2 = -log(x(2) + Gama(2)*x(1)) - x(1)*((Gama(1)/(x(1) + Gama(1)*x(2)))-(Gama(2)/(x(2)+Gama(2)*x(1)))); MiE_RT = [MiE_RT1;MiE_RT2]; //coef_ativ = exp(MiE_RT) //coef_ativ = [1;1] teta = azinho; x1 = x(1); x2 = x(2); lambda_12 = v2/v1*exp(-teta(1)/(R*(T))) //aqui, T deve estar em Kelvin lambda_21 = v1/v2*exp(-teta(2)/(R*(T))) beta_aux = (lambda_12/(x1+lambda_12*x2) - lambda_21/(lambda_21*x1 + x2)) gama1 = exp(-log(x1+lambda_12*x2)+x2*beta_aux) gama2 = exp(-log(x2+lambda_21*x1)-x1*beta_aux); coef_ativ = [gama1 ; gama2]; //coef_ativ = [1;1] endfunction function [gama1,gama2] = wilson(T,x1,x2) denset = 0.7956 maset = 40 denshep = 0.68867 mashep = 100 R = 1.987 v1=mashep/denshep; //v2=maset/denset; v2 = 58; teta = [746 ; 658]; lambda_12 = v2/v1*exp(-teta(1)/(R*(T))) //aqui, T deve estar em Kelvin lambda_21 = v1/v2*exp(-teta(2)/(R*(T))) beta_aux = (lambda_12/(x1+lambda_12*x2) - lambda_21/(lambda_21*x1 + x2)) gama1 = exp(-log(x1+lambda_12*x2)+x2*beta_aux) gama2 = exp(-log(x2+lambda_21*x1)-x1*beta_aux) endfunction function F = sistema_bolha(P,x,teta) y = teta(1); T = teta(2); coef_ativ = gama_rk(x,T); psat = antoine(T); F1 = x*coef_ativ(1)*psat(1) - y*P; F2 = (1 - x)*coef_ativ(2)*psat(2) - (1-y)*P; F = [F1 ; F2]; endfunction function F = sistema_orvalho(P,y,teta) x = teta(1); T = teta(2); coef_ativ = gama_rk(x,T); psat = antoine(T); F1 = x*coef_ativ(1)*psat(1) - y*P; F2 = (1 - x)*coef_ativ(2)*psat(2) - (1-y)*P; F = [F1 ; F2]; endfunction function F = sistema_azeo(P,teta) x = teta(1); T = teta(2); coef_ativ = gama_rk(x,T); psat = antoine(T); F1 = coef_ativ(1)*psat(1) - P; F2 = coef_ativ(2)*psat(2) - P; F = [F1 ; F2]; endfunction function F = sistema_banco(P,teta,q) x = teta(1); T = teta(2); coef_ativ = gama_rk(x,T); psat = antoine(T); F1 = coef_ativ(1)*psat(1) - P - q(1); F2 = coef_ativ(2)*psat(2) - P - q(2); F = [F1 ; F2]; endfunction function J = jacobiana_bolha(P,x,teta) J = []; h = 1e-5; for k = 1:2 teta_adv = teta teta_adv(k) = teta_adv(k) + h; der = (sistema_bolha(P,x,teta_adv) - sistema_bolha(P,x,teta))/h; J = [J der]; end endfunction function J = jacobiana_orvalho(P,y,teta) J = []; h = 1e-5; for k = 1:2 teta_adv = teta teta_adv(k) = teta_adv(k) + h; der = (sistema_orvalho(P,y,teta_adv) - sistema_orvalho(P,y,teta))/h; J = [J der]; end endfunction function J = jacobiana_azeo(P,teta) J = []; h = 1e-5; for k = 1:2 teta_adv = teta teta_adv(k) = teta_adv(k) + h; der = (sistema_azeo(P,teta_adv) - sistema_azeo(P,teta))/h; J = [J der]; end endfunction function J = jacobiana_banco(P,teta,q) J = []; h = 1e-5; for k = 1:2 teta_adv = teta teta_adv(k) = teta_adv(k) + h; der = (sistema_banco(P,teta_adv,q) - sistema_banco(P,teta,q))/h; J = [J der]; end endfunction function teta_bolha = newton_bolha(P,x,teta0) erro = 1 while erro > 1e-8 J = jacobiana_bolha(P,x,teta0); F = sistema_bolha(P,x,teta0); novoteta = teta0 - 0.5*inv(J)*F erro = norm(novoteta - teta0); teta0 = novoteta end teta_bolha = novoteta; endfunction function teta_orvalho = newton_orvalho(P,y,teta0) erro = 1 while erro > 1e-8 J = jacobiana_orvalho(P,y,teta0); F = sistema_orvalho(P,y,teta0); novoteta = teta0 - 0.5*inv(J)*F erro = norm(novoteta - teta0); teta0 = novoteta end teta_orvalho = novoteta; endfunction function teta_azeo = newton_azeo(P,teta0) erro = 1 while erro > 1e-8 J = jacobiana_azeo(P,teta0); F = sistema_azeo(P,teta0); novoteta = teta0 - inv(J)*F erro = norm(novoteta - teta0); teta0 = novoteta end teta_azeo = novoteta; endfunction function teta_azeo = newton_banco(P,teta0,q) erro = 1 while erro > 1e-8 J = jacobiana_banco(P,teta0,q); F = sistema_banco(P,teta0,q); novoteta = teta0 - inv(J)*F erro = norm(novoteta - teta0); teta0 = novoteta end teta_azeo = novoteta; endfunction teta_azeo = newton_azeo(1.0133,[.3; 65+274]) pause // gerando as curvas de ponto de bolha vx_b = []; vT_b = []; P = 0.8; teta0 = [.1;450]; for x = 0.01:0.001:0.999 teta_bolha = newton_bolha(P,x,teta0); vx_b = [vx_b ; x]; vT_b = [vT_b ; teta_bolha(2)]; teta0 = teta_bolha; end plot(vx_b,vT_b-273.15,'b-') xtitle('Wilson Model','$x_1, y_1$','$T(ºC)$') ; vx_o = []; vT_o = []; teta0 = [.1;350]; for y = 0.01:0.001:0.999 teta_orvalho = newton_orvalho(P,y,teta0); vx_o = [vx_o ; y]; vT_o = [vT_o ; teta_orvalho(2)]; teta0 = teta_orvalho; end plot(vx_o,vT_o-273.15,'r-') experimento(:,1)=[0.0172742 0.0263820 //0.0272851 0.0293095 //0.0355040 //0.0423977 0.0448166 0.0573863 0.1002261 //0.1249792 0.1666204 0.2028871 0.2251639 0.2827184 //0.2946279 //0.3504181 0.3706239 0.4551522 0.7977160 //0.8056999 0.9053357 //0.9256985 //0.9279876 0.9279876 //0.9582398 //0.9653529 //0.9845673 //0.9869946 //0.9894275 ] experimento(:,2)=[0.0256672 0.0638794 //0.0957119 0.0864437 //0.1081857 //0.1404002 0.1712420 0.2028871 0.2682215 //0.2773022 0.3214778 0.3180105 0.3188743 0.3180105 //0.2780705 //0.2586680 0.2842822 0.2811618 0.3302897 //0.2922124 0.4621636 //0.5151488 //0.8036969 0.4780102 //0.9511765 //0.8680246 //0.6190385 //0.6462330 //0.7761423 ]; experimento(:,3)=273.15 + [72.4 70.125 //69.25 69.52 //69 //68.09 67.13 65.99 65.1 //64.72 64.49 64.34 64.31 64.25 //64.19 //64.05 64.15 63.83 64.41 //65.52 69.19 //74.88 //85.02 70.33 //90.34 //88.37 //78.02 //79.59 //84.09 ] plot(experimento(:,1),experimento(:,3)-273.15,'bo') plot(experimento(:,2),experimento(:,3)-273.15,'bx')
cea427b9346fbd2834f1b133de06d030cb90efe5
e806e966b06a53388fb300d89534354b222c2cad
/macros/getgaussiankernel.sci
4fcf144f8f6089fb710b267efad858813fdb594f
[]
no_license
gursimarsingh/FOSSEE_Image_Processing_Toolbox
76c9d524193ade302c48efe11936fe640f4de200
a6df67e8bcd5159cde27556f4f6a315f8dc2215f
refs/heads/master
2021-01-22T02:08:45.870957
2017-01-15T21:26:17
2017-01-15T21:26:17
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
129
sci
getgaussiankernel.sci
function output = getGaussianKernel(ksize, sigma, ktype) output = opencv_getGaussianKernel(ksize, sigma, ktype) endfunction
4440dfcd1fbb5e275ef424af99e25c7841dce58c
449d555969bfd7befe906877abab098c6e63a0e8
/2621/CH2/EX2.13/Ex2_13.sce
2a4fa0579965d6b82e42e50140dd7b9ad6305cb6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
556
sce
Ex2_13.sce
// Example 2.13 clc; clear; close; // Given data format('v',6); SR= 6;// slew rate in V/µs SR= 6*10^6;// in V/s // Part (i) For Vmax= 1V Vmax= 1;// in V fmax= SR/(2*%pi*Vmax);// limiting frequency in Hz fmax= fmax*10^-6;// in MHz disp(fmax,"Part (i) : The limiting frequency for maximum voltage of 1V in MHz is : "); // Part (ii) For Vmax= 10V Vmax= 10;// in V fmax= SR/(2*%pi*Vmax);// limiting frequency in Hz fmax= fmax*10^-3;// in kHz disp(fmax,"Part (ii) : The limiting frequency for maximum voltage of 10V in kHz is : ");
1f8c86e5e47ebf6b12091c46651cb15401f9bf74
449d555969bfd7befe906877abab098c6e63a0e8
/2150/CH5/EX5.3/ex5_3.sce
83f41d57aeca9bbf3aafcd20f5895cf9719e6e29
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
ex5_3.sce
// Exa 5.3 clc; clear; close; // Given data A_V = 117; r_e = 22.7;// in ohm bita = 300; Zin_base = bita*r_e;// in ohm R1 = 2.2*10^3;// in ohm R2 = 10*10^3;// in ohm Zin_stage = (Zin_base*R1*R2)/(Zin_base*R1+R1*R2+R2*Zin_base);// in ohm R = 600;// in ohm V = 2;// in mV V_in = (Zin_stage/(R+Zin_stage))*V;// in mV V_out = A_V * V_in;// in mV disp(round(V_out),"The output voltage in mV is");
1cbd2014e480fe8c2e3d595a54049eac8e00aae3
449d555969bfd7befe906877abab098c6e63a0e8
/1958/CH15/EX15.1/Chapter15_example1.sce
48cc6de4dfcdcf871a5384fc7c1577653d4f8d23
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Chapter15_example1.sce
clc clear //Input data E=5000//Intensity of electric field in N/C d=0.02//Distance in m e=(1.6*10^-19)//Charge of the electron in C m=(9.1*10^-31)//Mass of the electron in kg //Calculations v=sqrt(2*e*E*d/m)/10^6//Speed of the electron in m/s *10^6 //Output printf('Speed of the electron is %3.2f *10^6 m/s',v)
00ebe032547a93b0ab329709ddc42a3e5d85dcba
449d555969bfd7befe906877abab098c6e63a0e8
/3785/CH8/EX8.2/Ex8_2.sce
0aa710cc43b2b210301fc986ed4f5aa4a047acbd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
430
sce
Ex8_2.sce
// Example 8_2 clc;funcprot(0); // Given data D=2;// The diameter of the pipe in inch h_in=10;// Elevation in m Q=425;// The volumetric flow rate in gal/min g=9.807;// The acceleration due to gravity in m/s^2 // Calculation D=D*2.54*10^-2;// m Q=(Q*3.785*10^-3)/60;// The volumetric flow rate in m^3/s V=(4*Q)/(%pi*D^2);// m/s deltah=h_in-(V^2/(2*g));// m printf("The reduction in head,h_in-h_out=%1.3f m",deltah);
ebb685363440394a347d425246c0584124469e58
449d555969bfd7befe906877abab098c6e63a0e8
/3204/CH14/EX14.22/Ex14_22.sce
8aad11eba987b7796fcc97208778bdb223952b86
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
483
sce
Ex14_22.sce
// Initilization of variables P=50 // N // Weight of the car Q=100 // N // Weight of the rectangular block g=9.81 // m/s^2 // acc due to gravity b=25 // cm // width of the rectangular block d=50 // cm // depth of the block // Calculations a=(Q*g)/(4*P+2*Q) // m/s^2 // from eq'n 4 W=(Q*(P+Q))/(4*P+Q) // N // from eq'n 6 // Resuts clc printf('The maximum value of weight (W) by which the car can be accelerated is %f N \n',W) printf('The acceleration is %f m/s^2 \n',a)
8b99865531c8b685112509a91df37c850bf99c3c
449d555969bfd7befe906877abab098c6e63a0e8
/1835/CH3/EX3.12/Ex3_12.sce
0d754dbe6892f07f54a10bb86a5f671b04091e95
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,195
sce
Ex3_12.sce
//CHAPTER 3 ILLUSRTATION 12 PAGE NO 109 //TITLE:FRICTION clc clear //=================================================================================== //INPUT DATA PI=3.147 d2=.30// DIAMETER OF SHAFT IN m W=200000// LOAD AVAILABLE IN NEWTONS N=75// SPEED IN rpm U=.05// COEFFICIENT OF FRICTION p=300000// PRESSURE AVAILABLE IN N/m^2 P=16200// POWER LOST DUE TO FRICTION IN WATTS //==================================================================================== //CaLCULATION T=P*60/2/PI/N// TORQUE INDUCED IN THE SHFT IN N-m //LET X=(r1^3-r2^3)/(r1^2-r2^2) X=(3/2*T/U/W) r2=.15// SINCE d2=.30 m c=r2^2-(X*r2) b= r2-X a= 1 r1=( -b+ sqrt (b^2 -4*a*c ))/(2* a);// VALUE OF r1 IN m d1=2*r1*100// d1 IN cm n=W/(PI*p*(r1^2-r2^2)) //================================================================================ //OUTPUT printf('\nEXTERNAL DIAMETER OF SHAFT =%3.3f cm\nNO OF COLLARS REQUIRED =%.3f or %.0f',d1,n,n+1)
33baeefde2eeb7d3408e9a68df8b61487b31c2ee
449d555969bfd7befe906877abab098c6e63a0e8
/2216/CH11/EX11.1/ex_11_1.sce
ed1cc9666533946e2abf926b20da87c15074f87c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
211
sce
ex_11_1.sce
//Example 11.1:interaction length clc; clear; close; format('v',6) po=1;//assume p1=po/2;// p2=p1;// kl=asin(sqrt(p1));//in degree disp(kl,"interaction length is") //answer is in the form of pi in the textbook
6b2452ce2fc6bff515d5918ded65a7163f821377
449d555969bfd7befe906877abab098c6e63a0e8
/1187/CH10/EX10.6/6.sce
42953504ee27ebdfa99b6d9aab288e97de3ff439
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
167
sce
6.sce
clc g=9.81; // m/s^2 T=12; // s c=g*T/(2*%pi); lambda=c*T; disp("Phase velocity =") disp(c) disp("m/s") disp("Wavelength =") disp(lambda) disp("m")
20a7fe8c30352d01014bae107ef2de6fb0a2cdf9
b24d354cfcd174c92760535d8b71e22ced005d81
/DSP functions/tf2cl/test_4.sce
1b988acb87186575a783b2f4bb46c9f7b3ee9b91
[]
no_license
shreniknambiar/FOSSEE-Signal-Processing-Toolbox
57ad8e2a71d64f95c4ccfd131e00095cf2b9c6f8
143cf61eff31240870dc0c4f61e32818a4482365
refs/heads/master
2021-01-01T18:25:34.435606
2017-07-25T18:23:47
2017-07-25T18:23:47
98,334,322
0
0
null
2017-07-25T17:48:00
2017-07-25T17:47:59
null
UTF-8
Scilab
false
false
371
sce
test_4.sce
// Test # 4 : When numerator is neither symmetric or anti-symmetric exec('./tf2cl.sci',-1); //[d1,d2,b]=tf2cl([0.4 0.5 0.31],[6 32.4 -3]) //!--error 10000 //Numerator coeffcients must be either be symmetric or antisymmetric //at line 71 of function tf2ca called by : //at line 46 of function tf2cl called by : //[d1,d2,b]=tf2cl([0.4 0.5 0.31],[6 32.4 -3])
d63efbcc26faa745fc1df775bb2b229c92d5186e
93ef4e961aa26ff00c7a6f85d31e3141346c5555
/SerialDbg-copyFromDuma.sce
93cf502d5862f00af77188dd2dc371693c4209c7
[]
no_license
mjankovec/FW_Respirator_CtrlSTM32G474RE
20abbd58f6e3dc2bc9c5716ae521320c0a01e7a4
88022ad08b09cabd12faf00e41e1d03080caf1bf
refs/heads/master
2022-10-09T12:24:09.047374
2020-06-08T13:46:55
2020-06-08T13:46:55
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,210
sce
SerialDbg-copyFromDuma.sce
clear, clc, xdel(winsid()) h=openserial(14,"1000000,n,8,1") writeserial(h,"s") tic() i=0 mprintf("\nStart\n") buf2="" Nb=0 cnt0=0 while toc() < 5 do xpause(10000) //microseconds buf2 = buf2 + readserial(h) if (length(buf2)>Nb) then mprintf("\r%d*",i); cnt0=0 else mprintf("%d ",i); cnt0=cnt0+1; if (cnt0 >2) then break end end Nb=length(buf2) i=i+1 if i>500 then mprintf(" timeout?") break end end mprintf("\nStop\n"); result=closeserial(h) if result == 0 then mprintf("\nClose OK\n\n") else mprintf("\nClose ERR\n\n") end DW=4 dbg=csvTextScan(buf2) dbg=dbg(1:length(dbg)-1) Nd=length(dbg)/DW dbg=matrix(dbg,length(dbg)/DW,DW).' //d=dbg(:,2) ov=dbg(1,:) sig=dbg(2,:) start=dbg(3,:) delta=dbg(4,:) stop=start+delta fig1=scf(); fig1.figure_size=[1920,1000] fig1.figure_position=[0,0] plot((0:(length(sig)-1)).'/40000,abs(sig),'k') plot((0:(length(ov)-1)).'/40000,ov,'b') plot((0:(length(start)-1)).'/40000,start,'r') plot((0:(length(stop)-1)).'/40000,stop,'r:') //disp([stdev(sig) min(sig) max(sig)]) //fig1.children.data_bounds=[0,min(sig);1000,max(sig)] //fig1.children.grid = [1,-1]
f4d6e0f58432ef6c414c9b5dc79c8e5a390eb993
a159f59d19e2b03b234e9c2977ba4a932180e648
/Software/GreenScilabV0.9/bin/gl_disp_curve.sci
8dcf4134c84f2e288031ccfb0636459ab86448c0
[]
no_license
OpenAgricultureFoundation/openag_sim
e052bbcc31b1d7f9b84add066327b479785f8723
425e678b55e24b5848d17181d25770175b8c2c3f
refs/heads/master
2021-07-01T06:25:08.753260
2017-09-20T21:44:18
2017-09-20T21:44:18
80,540,145
0
1
null
null
null
null
UTF-8
Scilab
false
false
13,498
sci
gl_disp_curve.sci
function []=writeTo(directory,iteration) //output curve QO_T=zeros(OrganType,N+1); QO_T(:,:)=sum(QO,2);//biomass for organs in each cycle dim1=size(QO_T); //disp(dim1); QST=cumsum(Q);//accumulated biomass production dim2=size(QST); //disp(dim2); QO_TS=zeros(OrganType,N+1); //accumulated biomass for organs in each cycle for id=1:OrganType; QO_TS(id,:)=cumsum(QO_T(id,:)); end; dim3=size(QO_TS); //disp(dim3); QV=QO_TS(3,:);//biomass or volume of internode= pith+layer QV(1,2:N)=QV(1,2:N)+QO_TS(6,1:N-1); dim4=size(QV); //disp(dim4); QTp=zeros(OrganType,maxp); QTp(:,:)=sum(QO,3); dim5=size(QTp); //disp(dim5); QT=zeros(OrganType,1);QT(:,1)=sum(QTp,2); dim6=size(QT); //disp(dim6); Color_O = [0.2,0.6,0.4;0.2,0.9,0.4;0.6,0.2,0;1,0,0;1,1,0;1,0.5,0;0,0.2,0.4]; if Flag_biomass_fig==1 then //f = scf() ; //f.figure_name='Biomass repartition'; //total ////i = 1:size(Q,1); ///********** MODIFIED *********** //i = 1 : (size(Q,1)-1); //for j = 1 : (size(Q,1)-1) // TQ(j)=Q(j+1); //end* ////i=1:N; ////h=plot2d(i,Q(1:N),style=1); // h=plot2d(i,TQ,style=1); ///************ END ************8 //organs //disp(QO_T); [fres1,err]=mopen(directory+string(iteration)+"BiomassRepartition.sci","w"); disp("the following is fres"); disp(fres1); disp(err); disp("end fres"); mfprintf(fres1,"%6s %6s %6s %6s %6s %6s","blade","petiole","pith","female fruit","male fruit","ring"); mfprintf(fres1,"\n"); mfprintf(fres1,"%6.5f %6.5f %6.5f %6.5f %6.5f %6.5f\n",QO_T(:,1:7)); mfprintf(fres1,"%6.5f %6.5f %6.5f %6.5f %6.5f %6.5f\n",QO_T(:,8:14)); mfprintf(fres1,"%6.5f %6.5f %6.5f %6.5f %6.5f %6.5f\n",QO_T(:,15:21)); mfprintf(fres1,"%6.5f %6.5f %6.5f %6.5f %6.5f %6.5f\n",QO_T(:,22:28)); mclose(fres1); //i = 1:N; //plot2d(i,QO_T(1,i),style=13); // green blade //i = 1:N; //plot2d(i,QO_T(2,i),style=18); //green petiole //i = 1:N; //plot2d(i,QO_T(3,i),style=26); //brown pith(internode) //i = 2:N; //plot2d(i,QO_T(4,i),style=21); //red female fruit //i = 2:N; // plot2d(i,QO_T(5,i),style=2); //blue male fruit //i = 2:N; // plot2d(i,QO_T(6,i),style=22); //purple ring // i = 1:N; // for id = 1:6; // if id<4 then // plot2d(i,QO_T(id,i),style=id+1); // else // i = 2:N; // plot2d(i,QO_T(id,i),style=id+1); // end; // end; //a=gca(); // a.children(1).children.thickness=4; // for i=2:7; // a.children(i).children.thickness=3; // end // a.title.text="Biomass production and repartition" ; // a.title.font_size=3; // a.x_label.text="Plant Age" ; // a.x_label.font_size=2; // a.y_label.text="Biomass" ; // a.y_label.font_size=2; // a.data_bounds=[1,0;N,max(Q)]; // if N>=3 // if Q(2) > Q(3) then // legends(["total";"blade";"petiel";"pith";"female flower";"male flower";"ring"],[1 13 18 26 21 2 22],opt="ur"); // else // legends(["total";"blade";"petiel";"pith";"female flower";"male flower";"ring"],[1 13 18 26 21 2 22],opt="ul"); // end; // else // legends(["total";"blade";"petiel";"pith";"female flower";"male flower";"ring"],[1 13 18 26 21 2 22],opt="ur"); // end; end if Flag_bioprod_fig==1 then // draw the value of Q(n-1) / D(n) //f = scf() ; // f.figure_name='Production / Demand'; //total ////i = 1:size(Q,1); ///********** MODIFIED *********** //i = 1 : (size(Q,1)-1); //for j = 1 : (size(Q,1)-1) // TQ(j)=Q(j); // end [fres2,err]=mopen(directory+string(iteration)+"prodDemand.sci","w"); QD=[]; for k=1:length(Demand) if Demand(1,k) == 0 break end end if k<length(Demand) for j=1:k-1 QD(j)=Q(j)/Demand(1,j); end else if Demand(1,k)==0 for j=1:k-1 QD(j)=Q(j)/Demand(1,j); end else for j=1:length(Demand) QD(j)=Q(j)/Demand(1,j); end end end i=1:length(QD); ////h=plot2d(i,Q,style=1); mfprintf(fres2,"%6s","Q/D"); mfprintf(fres2,"%6.5f\n",QD); mclose(fres2); //h=plot2d(i,QD,style=1); ///************ END ************8 //a=gca(); // a.children(1).children.thickness=4; // a.title.text="Biomass production devided by Demand" ; // a.title.font_size=3; // a.x_label.text="Plant Age" ; // a.x_label.font_size=2; // a.y_label.text="Q/D" ; // a.y_label.font_size=2; // a.data_bounds=[1,0;N,max(QD)]; end; if Flag_biomass_fig_a==1 then //f = scf() ; //f.figure_name='Accumulated Biomass repartition'; //total i = 1:size(QST,1); ///********** MODIFIED *********** //i = 1 : (size(QST,1)-1); // for j = 1 : (size(QST,1)-1) // TSQ(j)=QST(j); // end //h = plot2d(i,QST,style=1); //h = plot2d(i,TSQ,style=1); ///********* END **************** [fres3,err]=mopen(directory+string(iteration)+"accumulatedBiomassRepartition.sci","w"); //disp(fres3); mfprintf(fres3,"%6s %6s %6s %6s %6s %6s","blade","petiole","pith","female fruit","male fruit","ring"); mfprintf(fres3,"\n"); mfprintf(fres3,"%6.5f %6.5f %6.5f %6.5f %6.5f %6.5f\n",QO_TS(:,1:7)); mfprintf(fres3,"%6.5f %6.5f %6.5f %6.5f %6.5f %6.5f\n",QO_TS(:,8:14)); mfprintf(fres3,"%6.5f %6.5f %6.5f %6.5f %6.5f %6.5f\n",QO_TS(:,15:21)); mfprintf(fres3,"%6.5f %6.5f %6.5f %6.5f %6.5f %6.5f\n",QO_TS(:,22:28)); mclose(fres3); //organs // i = 1:N; // plot2d(i,QO_TS(1,i),style=13); // green blade // i = 1:N; // plot2d(i,QO_TS(2,i),style=18); //green petiole // i = 1:N; // plot2d(i,QO_TS(3,i),style=26); //brown pith(internode) // i = 2:N; // plot2d(i,QO_TS(4,i),style=21); //red female fruit // i = 2:N; // plot2d(i,QO_TS(5,i),style=2); //blue male fruit // i = 2:N; // plot2d(i,QO_TS(6,i),style=22); //purple ring //i = 1:N; //for id = 1:6; // if id<4 then // h = plot2d(i,QO_TS(id,i),style=id+1); // else // i = 2:N; // h = plot2d(i,QO_TS(id,i),style=id+1); // end; // end; //a=gca(); // a.children(1).children.thickness=4; // for i=2:7; // a.children(i).children.thickness=3; // end // a.title.text="Accumulated biomass production and repartition" ; // a.title.font_size=3; // a.x_label.text="Plant Age" ; // a.x_label.font_size=2; // a.y_label.text="Biomass" ; // a.y_label.font_size=2; // a.data_bounds=[1,0;N,max(QST)]; // legends(["total";"blade";"petiel";"pith";"female flower";"male flower";"ring"],[1 13 18 26 21 2 22],opt="ul") end; //display leaf area index case of field crop if Flag_disp_LAI==1 then B_ST=zeros(1,N); for J=1:N for p = 1:maxp; for i = 1:J; if B_S(p,i,J)>0 & i<=Tu_O(1,1,p) then // leaf exist and still function B_ST(J)=B_ST(J)+B_S(p,i,J)*Nb_O(1,1,i,J,J,p); end; end; end end if Flag_field==1 then LAI=zeros(1,N); for J=1:N LAI(J)=B_ST(J)/Sp; end; //f = scf() ; //f.figure_name='leaf area index'; J=1:N; dimTest=size(LAI(1)); //disp(LAI(:)); [fres4,err]=mopen(directory+string(iteration)+"LeafAreaIndex.sci","w"); mfprintf(fres4,"%6s","LAI"); mfprintf(fres4,"\n"); mfprintf(fres4,"%6.5f\n",LAI(:)); mclose(fres4); //h=plot2d(J,LAI,style=1); //a=gca(); // a.children(1).children.thickness=4; // a.title.text="Leaf area index" ; // a.title.font_size=3; // a.x_label.text="Plant Age" ; // a.x_label.font_size=2; // a.y_label.text="LAI" ; // a.y_label.font_size=2; // a.data_bounds=[1,0;N,max(LAI)]; else //f = scf() ; // f.figure_name='Plant leaf area '; // J=1:N; // h=plot2d(J,B_ST,style=1); // // a=gca(); // a.children(1).children.thickness=4; // a.title.text="Leaf area" ; // a.title.font_size=3; // a.x_label.text="Plant Age" ; // a.x_label.font_size=2; // a.y_label.text="Leaf area (cm2)" ; // a.y_label.font_size=2; // a.data_bounds=[1,0;N,max(B_ST)]; end end //%%%%%%%% curve of size of organs B_S,I_H,I_S,F_V %%%%%%% //for p=1:maxp // //[fres,err]=mopen(directory+string(iteration)+"OrganSizes.sci","w"); // //mfprintf(fres,"%6s","Blade Surface"); // // if Flag_size_fig_phy(p)==1 then // // f = scf() ; // f.figure_name=strcat(['Organ size--Physiological age-',string(p)]); // f.visible='off'; // // //blade surface // subplot(2,2,1); // // for J=1:N ; // i = 1:J; // //mfprintf(fres,"%6.5f\n",B_S(p,i,J)); // h = plot2d(J-i+1,B_S(p,i,J),style=13); // a=gca(); // a.children(1).children.thickness=4; // a.y_location="right"; // a.x_label.text="Plant Age" ; // a.y_label.text="leaf surface" ; // a.data_bounds=[1,0;N,max(B_S(p,:,J))]; // end; // //internode length // subplot(2,2,2); // for J=1:N ; // i = 1:J; // //mfprintf(fres,"\n"); // //mfprintf(fres // h = plot2d(J-i+1,I_H(p,i,J),style=26); // a=gca(); // a.children(1).children.thickness=4; // // a.x_label.text="Plant Age" ; // a.y_label.text="I_H" ; // a.data_bounds=[1,0;N,max(I_H(p,:,J))]; // end; // //internode section area // subplot(2,2,4); // for J =1:N; // i = 1:J; // h = plot2d(J-i+1,I_S(p,i,J,J),style=26); // a=gca(); // a.children(1).children.thickness=4; // a.x_label.text="Plant Age" ; // a.y_label.text="I_Section_area" ; // a.data_bounds=[1,0;N,max(I_S(p,:,J,J))]; // end; // // //fruit volume // subplot(2,2,3); // for J = 1:N; // i = 1:J; // h =plot2d(J-i+1,Ff_V(p,i,J),style=21); // a=gca(); // a.children(1).children.thickness=4; // a.y_location="right"; // a.x_label.text="Plant Age" ; // a.y_label.text="V_Ff" ; // end; // f.visible='on'; // // end; // //end; //if Flag_demo==0 then // x_message('Curve Finished'); //end //for p=1:maxp // // if Flag_biomass_fig_phy(p)==1 then // // f = scf() ; // f.figure_name=strcat(['Organ weight--Physiological age-',string(p)]); // f.visible='off'; // // //blade weight // subplot(3,2,1); // for J=1:N ;//plant age // i = 1:min(J,Nu_Ma(p)); //pos // h = plot2d(i,matrix(q_O(1, p,J-i+1, J),1,min(J,Nu_Ma(p))),style=13); // a=gca(); // a.children(1).children.thickness=4; // a.y_location="right"; // a.x_label.text="Phytomer rank" ; // a.y_label.text="Blade weight(g)" ; // a.data_bounds=[1,0;min(N,Nu_Ma(p)),max(q_O(1, p,J-i+1, J))]; // end; // // //petiole weight // subplot(3,2,2); // for J=1:N ;//plant age // i = 1:min(J,Nu_Ma(p)); //pos // h = plot2d(i,matrix(q_O(2, p,J-i+1, J),1,min(J,Nu_Ma(p))),style=13); // a=gca(); // a.children(1).children.thickness=4; // a.y_location="left"; // a.x_label.text="Phytomer rank" ; // a.y_label.text="Petiole weight(g)" ; // a.data_bounds=[1,0;min(N,Nu_Ma(p)),max(q_O(2, p,J-i+1, J))]; // end; // //pith weight // subplot(3,2,3); // for J=1:N ;//plant age // i = 1:min(J,Nu_Ma(p)); //pos // h = plot2d(i,matrix(q_O(3, p,J-i+1, J),1,min(J,Nu_Ma(p))),style=26); // a=gca(); // a.children(1).children.thickness=4; // a.y_location="right"; // a.x_label.text="Phytomer rank" ; // a.y_label.text="Pith weight(g)" ; // a.data_bounds=[1,0;min(N,Nu_Ma(p)),max(q_O(3, p,J-i+1, J))]; // end; // //internode weight // subplot(3,2,4); // for J=1:N ;//plant age // data=[]; // for i = 1:min(J,Nu_Ma(p));//pos // ageGU=J-i+1; // QL=0;//weight of layer in this GU // for k=0:ageGU-1 // QL=QL+q_L(p,ageGU-k,J-k,J-k); // end // tmp=q_O(3, p,ageGU,J)+QL; // data=[data tmp]; // end // i = 1:min(J,Nu_Ma(p)); // h = plot2d(i,data,style=26); // a=gca(); // a.children(1).children.thickness=4; // a.y_location="left"; // a.x_label.text="Phytomer rank" ; // a.y_label.text="Internode weight(g)" ; // a.data_bounds=[1,0;min(N,Nu_Ma(p)),max(data)]; // end; // //female weight // subplot(3,2,5); // for J=1:N ;//plant age // i = 1:min(J,Nu_Ma(p)); //pos // h = plot2d(i,matrix(q_O(4, p,J-i+1, J),1,min(J,Nu_Ma(p))),style=21); // a=gca(); // a.children(1).children.thickness=4; // a.y_location="right"; // a.x_label.text="Phytomer rank" ; // a.y_label.text="Female weight(g)" ; // a.data_bounds=[1,0;min(N,Nu_Ma(p)),max(q_O(4, p,J-i+1, J))]; // end; // subplot(3,2,6); // for J=1:N ;//plant age // i = 1:min(J,Nu_Ma(p)); //pos // h = plot2d(i,matrix(q_O(5, p,J-i+1, J),1,min(J,Nu_Ma(p))),style=21); // a=gca(); // a.children(1).children.thickness=4; // a.y_location="left"; // a.x_label.text="Phytomer rank" ; // a.y_label.text="Male weight(g)" ; // a.data_bounds=[1,0;min(N,Nu_Ma(p)),max(q_O(5, p,J-i+1, J))]; // end; // // f.visible='on'; // end; // //end; endfunction
38a5d6321e720884bc1608be5d061142a0702e50
449d555969bfd7befe906877abab098c6e63a0e8
/635/CH13/EX13.4/Ch13Ex4.sci
f643e71644d1c75182456e42fd49c58d9a9dfa69
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
834
sci
Ch13Ex4.sci
// Scilab Code Ex13.4 Comparison of intrinsic carrier densities of two semiconductors at room temperature Page-433 (2010) eV = 1.6e-019; // Joule equivalent of 1 eV m = 9.1e-031; // Rest mass of an electron, kg m_e = m; // Effective mass of electron, kg m_h = m; // Effective mass of electron, kg Eg_A = 0.36; // Energy gap of A, eV Eg_B = 0.72; // Energy gap of B, eV k = 1.38e-023; // Boltzmann constant, J/mol/K h = 6.626e-034; // Planck's constant, Js k_T = 0.052/2; // Thermal energy, eV // As n_i_ratio = ni_A/ni_B = exp(-Eg_A/(2*k_T))/exp(-Eg_A/(2*k_T)) n_i_ratio = exp(-Eg_A/(2*k_T))/exp(-Eg_B/(2*k_T)); // Intrinsic carrier density ratio of A and B printf("\nThe ratio of intrinsic carrier density = %4d ", n_i_ratio); // Result // The ratio of intrinsic carrier density = 1015
0319161585725016b9a6beb27a84f5701ec81354
449d555969bfd7befe906877abab098c6e63a0e8
/3856/CH4/EX4.10/Ex4_10.sce
c2a01538563695b035dd30c8cd8899d41f91032f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
715
sce
Ex4_10.sce
//Calculate the standard Enthalpy for the reaction three Oxygen molecule givs two Ozone molecule //Example 4.10 clc; clear; delrH298deg=285.4; //standard enthalpy at 298 k in kJ mol^-1 Cp1=29.4; //molar heat capacity for O2 at constant pressur in J K^-1 Cp2=38.2; //molar heat capacity for O3 at constant pressur in J K^-1 delCp=2*Cp2-3*Cp1; //change in molar heat capacity for reaction in J K^-1 T2=380; //final temperature in K T1=298; //initial temperature in K delT=T2-T1; //change in temperature in K delrH380deg=((delCp*delT)/1000)+delrH298deg; //standard Enthalpy for the reaction at 380 K in kJ mol^-1 printf("Standard Enthalpy = %.1f kJ mol^-1",delrH380deg);
6163bb2f29ee83bc4433287fb5ae1ba4d67a8de5
449d555969bfd7befe906877abab098c6e63a0e8
/3850/CH46/EX46.3/Ex46_3.sce
2533c24ba9c8632c83e18a4a30c3b1e8489da660
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
333
sce
Ex46_3.sce
//To calculate the mass excess of Hydrogen //Example 46.3 clear; clc; u=931;//1 Atomic Mass Unit in MeV/c^2 m=1.00783;//Mass of Hydrogen atom in atomic mass unit A=1.0;//Atomic Mass of Hydrogen atom in atomic mass unit Me=u*(m-A);//Mass excess of Hydrogen printf("The mass excess of Hydrogen = %.2f MeV",Me);
5b1daeab6dfb7b314dc34e728b82a232b1ab3cc7
449d555969bfd7befe906877abab098c6e63a0e8
/3683/CH5/EX5.12/Ex5_12.sce
2ff93fdfe792c1ba8f9e230df81e65e0eeecca4b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,519
sce
Ex5_12.sce
b=450//width, in mm D=900//depth, in mm c=80//cover, in mm d=D-c//in mm Asc=4000//in sq mm Ast=Asc//in sq mm P=500//in kN e=600//in mm m=18.66 //equation for x is: x^2 + (k1 - k2 / sigma_cbc_dash) x - k3 = 0 k1=2/b*((1.5*m-1)*Asc+m*Ast) k2=2*P*10^3/b k3=2/b*(c*(1.5*m-1)*Asc+d*m*Ast) //equation for sigma_cbc_dash is: sigma_cbc_dash = Q1 x /(Q2 x^2 (d - x/3) + Q3 (x - c)) Q1=P*10^3*(e+d-D/2) Q2=b/2 Q3=(1.5*m-1)*(d-c)*Asc sigma_cbc_dash=7//assume, in MPa //solving equation for x p=1 q=(k1-k2/sigma_cbc_dash) r=-k3 x=(-q+sqrt(q^2-4*p*r))/2/p//in mm sigma_cbc_dash = Q1*x/(Q2*x^2*(d-x/3)+Q3*(x-c))//in MPa //this process is repeated till convergence //solving equation for x p=1 q=(k1-k2/sigma_cbc_dash) r=-k3 x=(-q+sqrt(q^2-4*p*r))/2/p//in mm sigma_cbc_dash = Q1*x/(Q2*x^2*(d-x/3)+Q3*(x-c))//in MPa //solving equation for x p=1 q=(k1-k2/sigma_cbc_dash) r=-k3 x=(-q+sqrt(q^2-4*p*r))/2/p//in mm sigma_cbc_dash = Q1*x/(Q2*x^2*(d-x/3)+Q3*(x-c))//in MPa //solving equation for x p=1 q=(k1-k2/sigma_cbc_dash) r=-k3 x=(-q+sqrt(q^2-4*p*r))/2/p//in mm sigma_cbc_dash = Q1*x/(Q2*x^2*(d-x/3)+Q3*(x-c))//in MPa //solving equation for x p=1 q=(k1-k2/sigma_cbc_dash) r=-k3 x=(-q+sqrt(q^2-4*p*r))/2/p//in mm sigma_cbc_dash = Q1*x/(Q2*x^2*(d-x/3)+Q3*(x-c))//in MPa //solving equation for x p=1 q=(k1-k2/sigma_cbc_dash) r=-k3 x=(-q+sqrt(q^2-4*p*r))/2/p//in mm sigma_sc=m*sigma_cbc_dash*(x-c)/x//in MPa sigma_st=m*sigma_cbc_dash*x/(d-x)//in MPa //answer in textbook is incorrect
d27dab6f87d8202fc09611959152e14b525e4dfa
c164ae1cf1404fb2f02d74b44668bc58770c1bde
/default.tst
c0d2652aad2e6727dc4863fb44fa060f0847713f
[]
no_license
usnistgov/LV_Config_class
5c714f88dc661b398c5e3b3f9f5a433150c5aea3
596c6f3525d93e21a7c50a6c764d62df18890805
refs/heads/master
2023-02-17T06:12:32.965969
2021-01-06T18:47:51
2021-01-06T18:47:51
97,616,088
0
1
null
null
null
null
UTF-8
Scilab
false
false
3,365
tst
default.tst
[Bus1] EvtPluginINIFilePath = "C37EvtPlugin/C37EventPlugin.ini" EvtParams.<size(s)> = "13 6" EvtParams 0 = "70" EvtParams 1 = "70" EvtParams 2 = "70" EvtParams 3 = "20" EvtParams 4 = "20" EvtParams 5 = "20" EvtParams 6 = "60" EvtParams 7 = "60" EvtParams 8 = "60" EvtParams 9 = "60" EvtParams 10 = "60" EvtParams 11 = "60" EvtParams 12 = "0" EvtParams 13 = "-120" EvtParams 14 = "120" EvtParams 15 = "0" EvtParams 16 = "-120" EvtParams 17 = "120" EvtParams 18 = "0" EvtParams 19 = "0" EvtParams 20 = "0" EvtParams 21 = "0" EvtParams 22 = "0" EvtParams 23 = "0" EvtParams 24 = "0" EvtParams 25 = "0" EvtParams 26 = "0" EvtParams 27 = "0" EvtParams 28 = "0" EvtParams 29 = "0" EvtParams 30 = "0" EvtParams 31 = "0" EvtParams 32 = "0" EvtParams 33 = "0" EvtParams 34 = "0" EvtParams 35 = "0" EvtParams 36 = "0" EvtParams 37 = "0" EvtParams 38 = "0" EvtParams 39 = "0" EvtParams 40 = "0" EvtParams 41 = "0" EvtParams 42 = "0" EvtParams 43 = "0" EvtParams 44 = "0" EvtParams 45 = "0" EvtParams 46 = "0" EvtParams 47 = "0" EvtParams 48 = "0" EvtParams 49 = "0" EvtParams 50 = "0" EvtParams 51 = "0" EvtParams 52 = "0" EvtParams 53 = "0" EvtParams 54 = "0" EvtParams 55 = "0" EvtParams 56 = "0" EvtParams 57 = "0" EvtParams 58 = "0" EvtParams 59 = "0" EvtParams 60 = "0" EvtParams 61 = "0" EvtParams 62 = "0" EvtParams 63 = "0" EvtParams 64 = "0" EvtParams 65 = "0" EvtParams 66 = "0" EvtParams 67 = "0" EvtParams 68 = "0" EvtParams 69 = "0" EvtParams 70 = "0" EvtParams 71 = "0" EvtParams 72 = "0" EvtParams 73 = "0" EvtParams 74 = "0" EvtParams 75 = "0" EvtParams 76 = "0" EvtParams 77 = "0" EvtConfig.UTC Time 0 = "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" EvtConfig.Nominal Frequency = "60" EvtConfig.Reporting Rate = "60" EvtConfig.Fsamp = "960" EvtConfig.PosSeq = "FALSE" BusNumber = "1" Start Time = "0.000000" End Time = "10.000000" PmuImpairPluginINIFilePath = "C37BehaviourPlugin/C37BehaviourPlugin.ini" PmuImpairParams .<size(s)> = "0 0" PmuImpairConfig.FilterType = "Hamming" PmuImpairConfig.bPosSeq = "FALSE" NetImpPluginINIFilePath = "NetworkPlugin/NetworkPlugin.ini" NetImpParams.<size(s)> = "0 0" FlagImpPluginINIFilePath = "C37.118FlagImpairPlugin/C37.118FlagImpairPlugin.ini" FlagImpParams.<size(s)> = "0 0" [AppData] AppData.AppPluginIniFilePath = "AppPluginBaseClass/AppPluginBase.ini" AppData.Config = "" [OutToFileConfig] OutToFileConfig.OutputToFilePluginINIFilePath = "OutputToFileBasePlugin/OutputToFileBasePlugin.ini" OutToFileConfig.Output File Path = "Output" OutToFileConfig.clConfigOptions.TIME_BASE = "\00\00\00\00\00\0FB@" OutToFileConfig.clConfigOptions.STN = "Bus_1" OutToFileConfig.clConfigOptions.IDCODE = "0" OutToFileConfig.clConfigOptions.rdoPolRect = "Rectangular" OutToFileConfig.clConfigOptions.rdoFloatInt = "Float" OutToFileConfig.clConfigOptions.PHUNIT = "\00\00\00\00\00\0FB@" OutToFileConfig.clConfigOptions.rdoFreqDfreq = "Float" OutToFileConfig.clConfigOptions.CHNAM.<size(s)> = "8" OutToFileConfig.clConfigOptions.CHNAM 0 = "VA" OutToFileConfig.clConfigOptions.CHNAM 1 = "VB" OutToFileConfig.clConfigOptions.CHNAM 2 = "VC" OutToFileConfig.clConfigOptions.CHNAM 3 = "V+" OutToFileConfig.clConfigOptions.CHNAM 4 = "IA" OutToFileConfig.clConfigOptions.CHNAM 5 = "IB" OutToFileConfig.clConfigOptions.CHNAM 6 = "IC" OutToFileConfig.clConfigOptions.CHNAM 7 = "I+" OutToFileConfig.clConfigOptions.chkCfg2Prefix = "TRUE"
9c2bb57341de915ac4550cfcefa6035a496e762a
449d555969bfd7befe906877abab098c6e63a0e8
/2087/CH4/EX4.55/example4_55.sce
a8ddb153e655f915bb6b12dcf5f2c3bcd91e49ea
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
520
sce
example4_55.sce
//example 4.55 //calculate relation between R and P clc;funcprot(0); //given P=[4 22 28 15 12 8 4 15 10 5]; //Precipitation R=[0.2 7.1 10.9 4.0 3.0 1.3 0.4 4.1 2.0 0.3]; //runoff for i=1:10 Ps(i)=P(i)^2; Rs(i)=R(i)^2; PR(i)=P(i)*R(i); end s=0;t=0;u=0;q=0;w=0; for i=1:10 s=s+Ps(i); t=t+Rs(i); u=u+PR(i); q=q+P(i); w=w+R(i); end N=10; a=(N*u-q*w)/(N*s-q^2); b=(w-a*q)/N; a=round(a*10000)/10000; b=round(b*10000)/10000; mprintf("Equation is:\n%fP%f.",a,b);
5ede072aa59788408de1c5a9f3decd44b0ed69f5
848985a0f79ca7b51ae07d2a69da499a3093257a
/Assignment-2/1.sce
485d901b527f60a9878d9d9002ac3c92c5d344db
[]
no_license
Gituser143/Linear-Alegebra-SciLab-Assignment
db69f6cf6a2431e553dbd1f067a329dcb7979f41
6eef13de5aa3b2f45b0faaff826648738985377a
refs/heads/master
2020-12-30T04:18:21.185190
2020-04-04T07:24:22
2020-04-04T07:24:22
238,857,772
2
1
null
null
null
null
UTF-8
Scilab
false
false
565
sce
1.sce
//Assignment a=[0 0 0;0 0 0;0 0 0] for i=1:3 for j=1:3 a(i,j) = input("Enter the values:") end end disp(a) b=a disp('Now we reduce the matrix to upper triangular form:') a(2,:) = a(2,:)-(a(2,1)/a(1,1))*a(1,:) a(3,:) = a(3,:)-(a(3,1)/a(1,1))*a(1,:) disp(a) a(3,:) = a(3,:)-(a(3,2)/a(2,2))*a(2,:) disp(a) //disp(b) disp('The column space is:') f=0 for i=1:3 for j=i:3 if a(j,i)~=0 then disp(b(:,i)) f=1 break end end end if f==0 then disp([0 0 0]) end
7d1c4bb752268499bfbce171826fed4e55fc396e
449d555969bfd7befe906877abab098c6e63a0e8
/2840/CH4/EX4.1/ex4_1.sce
d9e0adf5a57ae36ebba36765c9ef139344b54ba8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
235
sce
ex4_1.sce
clc; clear all; r=1.278*1e-8 ;//atomic radius in cm M=63.5; //atomic weight N=6.023*1e23; //avogadro number n=4//for fcc n=4 a=4*r/(sqrt(2)); density=n*M/(N*a^3);//Density of copper disp(+'g/cc',density,'Density of copper =')