Dataset Viewer
Auto-converted to Parquet
blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
6
214
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
87
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
6 values
visit_date
timestamp[us]date
2016-08-04 21:00:17
2023-09-04 18:06:17
revision_date
timestamp[us]date
2006-11-21 14:53:12
2023-08-28 19:50:26
committer_date
timestamp[us]date
2006-11-21 14:53:12
2023-08-28 19:50:26
github_id
int64
955k
471M
star_events_count
int64
0
907
fork_events_count
int64
0
379
gha_license_id
stringclasses
5 values
gha_event_created_at
timestamp[us]date
2012-11-16 11:45:07
2023-08-16 20:49:37
gha_created_at
timestamp[us]date
2012-08-01 11:36:17
2021-07-30 17:53:14
gha_language
stringclasses
13 values
src_encoding
stringclasses
10 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
10
7.66M
extension
stringclasses
1 value
filename
stringlengths
5
96
content
stringlengths
10
7.66M
147120be5dee7265cfdb0f4301f014c9e724d2f1
449d555969bfd7befe906877abab098c6e63a0e8
/3311/CH12/EX12.2/Ex12_2.sce
bd7a36d5d8100dc240b4f31ea1be85e7edcac6e0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
2,115
sce
Ex12_2.sce
// chapter 12 // example 12.2 // fig. 12.8 // Determine resonant frequency, maximum operating frequency,Peak thyristor current, average thyristor current, rms thyristor current, rms load current and average supply current // page-760-762 clear; clc; // given C1=4; // in uF C2=4; // in uF Lr=40; // in uH R=2; // in ohm Edc=120; // in V (input voltage) t_q=20; // in us (SCR turn-off time) // calculate Lr=Lr*1E-6; // changing unit from uH to H t_q=t_q*1E-6; // changing unit from us to s Ceq=C1+C2; Ceq=Ceq*1E-6; // changing unit from uF to F wr=sqrt((1/(Lr*Ceq))-R^2/(4*Lr^2)); // calculation of resonant angular frequency fr=wr/(2*%pi); // calculation of resonant frequency tr=1/fr; // calculation of resonant time-period fr_max=1/(2*t_q); // calculation of maximum frequency f0=0.4*fr; // calculation of output frequency T0=1/f0; // calculation of output period td=T0/2-tr; // calculation of delay time tp=(1/wr)*atan(2*wr*Lr/R); // calculation of time at which peak current is obtained Ec1=Edc/(exp(R*2*%pi/(2*Lr*wr))+1); // calculation of initial capacitor voltage Ip=(Edc+Ec1)/(wr*Lr)*sin(wr*tp)*exp(-R*tp/(2*Lr)); // calculation of peak current I_av_SCR=(Edc+Ec1)/(wr*Lr)*(1/T0)*integrate('sin(wr*t)*exp(-R*t/(2*Lr))','t',0,tr/2); // calculation of average thyristor current I_rms_SCR=(Edc+Ec1)/(wr*Lr)*sqrt((1/T0)*(integrate('(sin(wr*t))^2*exp(-R*t/Lr)','t',0,tr/2))); // calculation of rms thyristor current I0=2*I_rms_SCR; // calculation of rms load current P0=I0^2*R; // calculation of output power Is=P0/Edc; // calculation of average supply current printf("\nThe resonant frequency is \t\t\t fr=%.3f KHz",fr*1E-3); printf("\nThe maximum possible operating frequency is \t fr_max=%.f KHz",fr_max*1E-3); printf("\nThe Peak thyristor current is \t\t\t Ip=%.2f A",Ip); printf("\nThe average thyristor current is \t\t I_av_SCR=%.3f A",I_av_SCR); printf("\nThe rms thyristor current is \t\t\t I_rms_SCR=%.2f A",I_rms_SCR); printf("\nThe rms load current is \t\t\t I0=%.1f A",I0); printf("\nThe average supply current is \t\t\t Is=%.2f A",Is); // Note : The answers vary slightly due to precise calculation
4553ddfff9ca13c06f12cda03c1826b45928b941
449d555969bfd7befe906877abab098c6e63a0e8
/3204/CH12/EX12.7/Ex12_7.sce
13059d1b93aa03cc9fb0b8b2ffd54c661e07be4a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
538
sce
Ex12_7.sce
// Initilization of variables A= 50 // cm^2 // area of the shaded portion J_A=22.5*10^2 // cm^4 // polar moment of inertia of the shaded portion d=6 // cm // Calculations J_c=J_A-(A*d^2) // substuting the value of I_x from eq'n 2 in eq'n 1 we get, I_y=J_c/3 // cm^4 // M.O.I about Y-axis // Now from eq'n 2, I_x=2*I_y // cm^4 // M.O.I about X-axis // Results clc printf('The centroidal moment of inertia about X-axis (I_x) is %f cm^4 \n',I_x) printf('The centroidal moment of inertia about Y-axis (I_y) is %f cm^4 \n',I_y)
ff2b2f0212d404e54b094ecb52814db0c88ef06b
449d555969bfd7befe906877abab098c6e63a0e8
/3710/CH4/EX4.3/Ex4_3.sce
3f143509db81db406f426aa1d9ff7dc51bfa77d9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,246
sce
Ex4_3.sce
//Example 4.3, Page Number 158 //The Function fpround(dependency) is used to round a floating point number x to n decimal places clc; d=0.2*(10**-3) //Chip Diameter in meter d1=1 //Distance in Meter l=550*(10**-9 ) //Wavelength in Meter q=0.001 //External Quantum Efficiency i=50*(10**-3) //Operational Current h=6.6*(10**-34)//Plancks Constant c=3*(10**8)//Speed of Light e=1.6*(10**-19)//Charge of an electron theta=(d/2) mprintf("Angle Theta of Emitting Area :%f\n",theta) mprintf(" Since theta is less than one, the LED acts as a Point Source\n") W=((h*c)/l)*q*(i/e) //W is the Total Radiant Power W=fpround(W,6) mprintf(" The Total Radiant Power is :%.2e W\n",W) //From the graph(Fig 1.24 Page No.33) l1=600 //Average Luminosity lf=W*l1 //lf is the luminous flux from the source lf=fpround(lf,3) mprintf(" The Luminous Flux from the source is:%.2e lm\n",lf) li=lf/(2*3.14)//li is the luminous intensity at normal incidence since flux is distributed over angle 2PI li=fpround(li,4) mprintf(" The Luminous Intensity at normal incidence is: %.2e candela\n",li) X = [400,500,555,600,650,700] V = [0.0,0.3,1.0,0.7,0.3,0.0] plot(X,V); xlabel("Wavelength in nm") ylabel("V") title("Fig 1.24")
bba581d482483adf1aac3470846152ac65a73005
449d555969bfd7befe906877abab098c6e63a0e8
/401/CH3/EX3.7/Example3_7.sce
081047e80d4e0cdfff01e7d7c1ea2f7520995f32
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
731
sce
Example3_7.sce
//Example 3.7 //Program to estimate rms pulse broadening per kilometer for the fiber clear; clc ; close ; //Given data lambda=0.85*10^(-6); //metre - WAVELENGTH L=1; //km - DISTANCE MD=0.025;//MATERIAL DISPERSION = mod(lamda^2*[del^2(n1)/del(lamda)^2) c=2.998*10^8; //m/s - VELOCITY OF LIGHT IN VACCUM sigma_lambda_by_lambda=0.0012;// sigma_lambda/lambda //Material Dispersion Parameter M=MD/(lambda*c); //R.M.S. Spectral Width sigma_lambda=sigma_lambda_by_lambda*lambda; //R.M.S. pulse broadening per kilometer sigma_m=sigma_lambda*L*M; //Displaying the Result in Command Window printf("\n\n\t R.M.S. pulse broadening per kilometer is %0.2f ns/km.",sigma_m/10^(-12));
d7cd385a2ace5b07e56046ddd7b1c526047a180b
449d555969bfd7befe906877abab098c6e63a0e8
/2513/CH14/EX14.5/14_5.sce
ee69c21d49d40a139f1ef83d1bf54904adcaed4d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
499
sce
14_5.sce
clc //initialisation of variables d1=0.67//ft h1=2.00//ft h2=4.04//ft hv1=0.062//ft hv2=0.254//ft d=0.19//ft h=0.2//ft h1=0.04//ft q=0.644//ft q1=0.65//ft v=0.92//ft d2=6.5//ft v1=3.69//ft d3=0.542//ft hv3=0.21//ft delv=0.15//ft d4=0.02//ft //CALCULATIONS H=d1+hv1//ft H1=d1+hv2//ft he=h*d//ft hi=d+h1//ft H2=d3+hv3//ft he1=h*delv//ft S=d4+h1//ft //RESULTS printf('the required slope=% f ft',hi) printf('the lower sewer and the invert drop in the transition=% f ft',S)
6861bacb671cfa6dfe6db8039f1b19103726b8a8
449d555969bfd7befe906877abab098c6e63a0e8
/24/CH42/EX42.3/Example42_3.sce
963a9d4a9bcb69eb4d5d371aec65c235c702df84
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
395
sce
Example42_3.sce
//Given that E = 7 //in ev V = 2*10^-9 //in m^3 density = 2*10^28 //in m^3/ev deltaE = 3*10^-3 //in ev //Sample Problem 42-3a printf("**Sample Problem 42-3a**\n") n = density*V printf("The number of states are equal to %1.2e per ev\n", n) //Sample Problem 42-3b printf("\n**Sample Problem 42-3b**\n") n = n*deltaE printf("The number of states are equal to %1.2e per ev\n", n)
1b7a48afe6f0657c305f7c8eb4db799c9fbc0b87
449d555969bfd7befe906877abab098c6e63a0e8
/2561/CH10/EX10.6/Ex10_6.sce
b1b9776b89e3f9b69f7262fb9c2db29dd7551e62
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
155
sce
Ex10_6.sce
//Ex10_6 clc x='110'; disp("Octal number="+string(x))// octal value str=oct2dec(x)//octal to decimal disp("Eqivalent Decimal number="+string(str))
780ab8fa1e903eedf5b8ceaedf5dc96c5ef1cff4
449d555969bfd7befe906877abab098c6e63a0e8
/866/CH6/EX6.2/6_2.sce
e956e8573ad4bab294636e8d1ac639b2a1e29679
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
653
sce
6_2.sce
clc //initialisation of variables W= -10 //KN/m Yac= 7 //m xad= -7.5 //m xac= -15 //m xcb= 10 //m //CALCULATIONS k= Yac/((xac)^2) yb= k*(xcb)^2 hb= Yac-yb yd= k*(xad)^2 hd= Yac-yd A=[(xcb-xac),(hb);(xcb),(-yb)] b=[-W*(-xac)*(-xad);0] c= A\b Rbv= c(1,1) Rbh= c(2,1) Rah= Rbh Rav= -Rbv-W*(-xac) dybydx= 2*k*xad alpha= atand(-2*k*xad) Nd= -Rav*sind(alpha)-Rah*cosd(alpha)+((-W)*(-xad)*sind(alpha)) Sd= -Rav*cosd(alpha)+Rah*sind(alpha)+((-W)*(-xad)*cosd(alpha)) Md= Rav*(-xad)-Rah*hd+W*(-xad)*(-xad/2) //RESULTS printf ('Normal force= %.2f kN',Nd) printf ('\n Shear force=%.2f KN',Sd) printf (' \n Bending moment=%.1f KNm',Md)
23b79b4e7c237c7d5cba33a025a23088e924c985
ac4e0c7ecf872bf33401feeb94567319345f1d91
/Culvert_design.sce
75eb59470e8de6eec9941be54295d13d9424bd2f
[]
no_license
namanmaheshwari97/Circular-Culvert-Design-Analysis
91a47220ca8ff7c3c3dc04b598aa1b2532b07304
260c00fa43a36915c3de352da2bf30929a6cb81e
refs/heads/master
2021-01-20T20:56:56.559000
2016-07-08T17:53:43
2016-07-08T17:53:43
62,906,453
0
1
null
2020-10-05T08:15:54
2016-07-08T17:43:39
Scilab
UTF-8
Scilab
false
false
7,417
sce
Culvert_design.sce
disp("15CS101L"); disp("Programming Laboratory"); disp("Internet Programming lab"); disp("Culvert Design and Analysis"); disp("Mr. M. Mohamed Rabik"); disp("Aryaman Dhanda , RA1511003010481"); disp("Naman Maheshwari , RA1511003010471"); disp("Sidharth Suresh , RA1511003010477"); disp("Select Pipe material and inlet type"); disp("1. Concrete. Square edge inlet with headwall."); disp("2. Concrete. Groove end inlet with headwall."); disp("3. Concrete. Groove end projecting at inlet."); disp("4. Corrugated metal (CMP). Headwall at inlet."); disp("5. Corrugated metal (CMP). Mitered to slope at inlet."); disp("6. Corrugated metal (CMP). Projecting at inlet"); pipeMaterial = input("Enter the number corresponding to the pipe Material. (0 to 6) :"); //np = Pipe manning n coefficient. //C1,C2,C3,C4,C5 = constants for inlet control equations //Ke = Minor loss coefficient for pipe inlet select(pipeMaterial) case 1 then np = 0.013; C1 = 0.0098; C2 = 2.0; C3 = -0.5; C4 = 0.0398; C5 = 0.67; Ke = 0.5; case 2 then np = 0.013; C1 = 0.0078; C2 = 2.0; C3 = -0.5; C4 = 0.0292; C5 = 0.74; Ke = 0.2; case 3 then np = 0.013; C1 = 0.0045; C2 = 2.0; C3 = -0.5; C4 = 0.0317; C5 = 0.69; Ke = 0.2; case 4 then np = 0.022; C1 = 0.0078; C2 = 2.0; C3 = -0.5; C4 = 0.0379; C5 = 0.69; Ke = 0.5; case 5 then np = 0.022; C1 = 0.0210; C2 = 1.33; C3 = 0.7; C4 = 0.0463; C5 = 0.75; Ke = 0.7; case 6 then np = 0.022; C1 = 0.0340; C2 = 1.50; C3 = -0.5; C4 = 0.0553; C5 = 0.54; Ke = 0.9; else disp("Entered value is incorrect. Please recheck !"); end disp("Choose the channel material : "); disp("1. Clean and Straight"); disp("2. Major Rivers"); disp("3. Sluggish with Deep pools."); disp("4. Clean"); disp("5. Gravelly"); disp("6. Weedy"); disp("7. Stony, Cobbles"); disp("8. Pasture, Farmland"); disp("9. Light Brush"); disp("10. Heavy Brush"); disp("11. Trees"); channelMaterial = input("Enter the values from 1-11 :"); select(channelMaterial) case 1 then nc = 0.030; case 2 then nc = 0.035; case 3 then nc = 0.040; case 4 then nc = 0.022; case 5 then nc = 0.025; case 6 then nc = 0.030; case 7 then nc = 0.035; case 8 then nc = 0.035; case 9 then nc = 0.050; case 10 then nc = 0.075; case 11 then nc = 0.15; else disp("Entered value is incorrect. Please recheck ! "); end A=input("Flow area :"); Ac=input("Flow area in one pipe based on critical depth : "); Av=input("Flow area in one pipe used for computing outlet velocity : "); b=input("Width of channel bottom :"); D=input("Diameter of each pipe : "); Ei1=input("Elevation of road crest relative to pipe outlet invert : "); Er=input("Elevation of road (or dam) crest relative to pipe outlet invert :"); g=input("Acceleration due to gravity : "); H=input("Head loss computed from outlet control equation : "); Lp=input("Pipe length : "); Lw=input("Weir length : "); N=input("Number of pipes next to each other : "); P=input("Wetted perimeter : "); Qp=input("Flowrate through each pipe : "); Qr=input("Flowrate over the road : "); Sc=input("Slope of existing channel : "); Sp=input("Pipe slope : "); Tc=input("Top width of flow in one pipe based on critical depth : "); theta = 0; Vc=input("Pipe velocity based on critical depth : "); Yavg=input("Average water depth : "); Yc=input("Critical water depth : "); Yf=input("Fall : "); Yh=input("Headwater depth : "); Yo=input("Water outlet depth : "); Yt=input("Tailwater depth : "); Yv=input("Depth used for computing outlet velocity : "); Z1=input("Left side slope of existing natural channel : "); Z2=input("Right side slope of existing natural channel : "); //General Equations Qt=Qr+N*Qp; Sp=Sc-Yf/Lp; Ei=Lp*Sp; Eh=Ei+Yh; V=Qp/Av; //Tailwater Depth //Manning's Equation is used for computing Yt Qt=((1.49*A*sqrt(Sc))/(nc))*(A/P)^(0.67); A=Yt*b+(Yt^2/2)*(Z1+Z2); P=b+Yt*(sqrt(1+Z1^2)+sqrt(1+Z2^2)); //Headwater depth //Yh is computed Independently based on inlet and outlet control equations //Inlet control-Outlet velocity(v) is computer based on what we call the velocity depth,Yv) if Yh<D then Yh=Yc+Vc^2/(2*g)+D*(C1*((4*Qp/(3.14*D^(2.5))))^C2+C3*Sp); Yc=0.42195*sqrt(Qp)/(D*0.26); Tc=2*sqrt(Yc*(D-Yc)); theta=2*asind(Tc/D); elseif Yc>D/2 then theta=2*3.14-theta; Ac=((D^2)/8)*(theta-sin(theta)); Vc=Qp/Ac; elseif Yh>=D then Yh=D((4*((4*Qp/(3.14*D^2.5)))^2+C5+C3*Sp)); //outlet control elseif Yt<=Y then Yv=Yc; elseif Yt>Yc & Yt<D then Yv=Yt; elseif Yt>=D then Yv=D; elseif Yh<0.93*D then T=2*sqrt(Yh*(D-Yh)); theta=2*asind(T/D); elseif Yh>D/2 then theta=2*3.14-theta; A=((D^2)/8)*(theta-sin(theta)); P=(theta*D)/2; Qp=((1.49*A*sqrt(Sp))/np)*((A/P)^0.67); elseif Yh>=0.93D then H=[1+Ke+29*n^2*Lp*(4/D)^1.33]*(8*Qp^2)/(g*3.14*3.14*D^4); elseif Yc<D then Yavg=(Yc+D)/2; elseif Yc>=D then Yavg=D; Yo=Max(Yt,Yavg); Yh=Yo+H-Ei; end //flow rate Qr=3*Lw*((Eh-Er)^1.5); //Error Messages and Validity //Input checks in top half of calculation. // If one of these messages appears, the calculation is halted. if Qt>=0 & Qt<10000 then disp("Total flow canot be negative or must be less than 10,000 m^3/s"); elseif N>0 & N<1001 then disp("Must have at least one pipe,but no more than 1000 pipes"); elseif D>0 & D<100 disp("Pipe diameter must be positive and less than 100"); elseif Lp>0 & Lp<10000 disp("Pipe length must be positive and less than 10,000"); elseif np>0 & np<0.05 disp("Pipe Manning n must be positive and less than 0.05"); elseif Yt<Er disp("Tailwater depth cannot be higher than the road crest"); elseif (Ei+D)<Er disp("Upstream pipe invert plus culvert diameter cannot exceed road crest elevation"); elseif (Ei+D)>Er disp("Not acceptable as the top of the culvert is pushing through the road"); elseif Lw>0 & Lw<10000 disp(" Weir length of road must be positive and less than 10,000m"); elseif Yt<10000 disp("Tailwater depth must be less than 10,000.Negative values are acceptable.Negatives simulate culverts discharging to a lower channel"); elseif Sc<0.5 disp("Channel bottom slope cannot exceed 0.5m/m.This is the longitdinal slope,not the sides slopes"); elseif Sc>0 disp("Channel cannot be horizontal"); elseif b>0 & b<10000 disp("Channel bottom width must be positive and less than 10,000"); elseif (Z1>0 & Z1<10000)|(Z2>0 & Z2>10000) disp("Channel side slopes can be neither exactly vertical(z=0)nor nearly flat (z>10000) z is defined as horizontal to vertical ratio"); elseif Sp>10^-7 & Sp<0.5 disp("Pipe slope must be between these limits"); end
eea1ab22592932b9f7e53374732d900a3f1b84c6
449d555969bfd7befe906877abab098c6e63a0e8
/1073/CH3/EX3.37/3_37.sce
23d8550868b67d75999bd4309559c4be1693fe44
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,247
sce
3_37.sce
clc; clear; //Example 3.37 k=0.03 //W/(m.K) Npr=0.697 //Prandtl number v=2.076*10^-6 //m^2/s Beta=0.002915 //K^-1 D=25 ; //[Diameter in cm] D=D/100 //[m] Tf=343 //Film temperature in [K] A=%pi*(D/2)^2 //Area in [m^2] P=%pi*D //Perimeter [m] T1=293 //[K] T2=393 //[K] g=9.81 //[m/s^2] //Case (i) HOT SURFACE FACING UPWARD L=A/P //Characteristic length in [m] Beta=1/Tf; //[K^-1] dT=T2-T1 //[K] Ngr=(g*Beta*dT*(L^3))/(v^2) //Grashoff number Nra=Ngr*Npr Nnu=0.15*(Nra^(1.0/3.0)) //Nusselt number h=Nnu*k/L //[W/m^2.K] Q=h*A*dT //[W] printf("\nHeat transferred when disc is horizontal with hot surface facing upward is %f W\n",Q); //Case-(ii) HOT FACE FACING DOWNWARD Nnu=0.27*(Nra^(1/4)) //Nusselt number h=Nnu*k/L //W/(m^2.K) Q=h*A*dT //[W] printf("\nHeat transferred when disc is horizontal with hot surface facing downward is %f W\n",Q); //Case-(iii)-For disc vertical L=0.25 //Characteristic length[m] D=L //dia[m] A=%pi*((D/2)^2) //[sq m] Ngr=(g*Beta*dT*(L^3))/(v^2) //Grashoff number Npr=0.697 Nra=Ngr*Npr Nnu=0.10*(Nra^(1/3)) //Nusselt number h=Nnu*k/D //[W/(m^2.K)] Q=h*A*dT //[W] printf("For vertical disc,heat transferred is %f W",Q);
073122559c1d3581b7fd7ae1227eb3825648d64f
449d555969bfd7befe906877abab098c6e63a0e8
/2441/CH2/EX2.20/Ex2_20.sce
bbcac8e1564a44052e36c711970f15631a3d95f0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
406
sce
Ex2_20.sce
//exa 2.20 clc;clear;close; format('v',6); //F1=0.004*P1^2+2*P1+80;//Rs./hr //F2=0.006*P2^2+1.5*P2+100;//Rs./hr P=250;//MW P1=poly(0,'P1');P2=poly(0,'P2'); dF1bydP1=2*0.004*P1+2; dF2bydP2=2*0.006*P2+1.5; //Let loads are P1 & P-P1 //Economical loading lambda1=lambda2 eqn=2*0.004*P1+2-2*0.006*(P-P1)-1.5; P1=roots(eqn);//MW P2=P-P1;//MW disp(P1,"Load P1(MW) : "); disp(P2,"Load P2(MW) : ");
291700e7b1e6453af5951fc921c2306d16374f06
e0124ace5e8cdd9581e74c4e29f58b56f7f97611
/3913/CH9/EX9.3/Ex9_3.sce
abec6d1f4d24d8043eddbae9d54cd2deaef85fa7
[]
no_license
psinalkar1988/Scilab-TBC-Uploads-1
159b750ddf97aad1119598b124c8ea6508966e40
ae4c2ff8cbc3acc5033a9904425bc362472e09a3
refs/heads/master
2021-09-25T22:44:08.781000
2018-10-26T06:57:45
2018-10-26T06:57:45
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
775
sce
Ex9_3.sce
//Chapter 9 : Eigenvalues and Eigenvectors //Example 9.3 //Scilab 6.0.1 //Windows 10 clear; clc; A=[-3 1 -1;-7 5 -1;-6 6 -2]; disp(A,'A=') eig=spec(A) disp(eig,'eigen values are:') e4=A-4*eye(3,3) mprintf('\n(A-4I3)x=') disp('*',e4) mprintf(' [x\n y\n z]=') z=zeros(3,1) disp(z) mprintf('\nthis reduces to x=0,y-z=0') mprintf('\nE4 is spanned by ') mprintf('\n x=\n [0\n y\n y]') mprintf('eigenspace E4 is of dimension 1 with basis') mprintf('\n [0\n 1\n 1]') e2=A+2*eye(3,3) mprintf('\n(A+2I3)x=') disp('*',e2) mprintf(' [x\n y\n z]=') z=zeros(3,1) disp(z) mprintf('\nthis reduces to x=y,z=0') mprintf('\nE2 is spanned by ') mprintf('\n x=\n [x\n x\n 0]') mprintf('\neigenspace E2 is of dimension 1 with basis') mprintf('\n [1\n 1\n 0]')
4e0371c2896fea9567f1607729a523d93993acac
449d555969bfd7befe906877abab098c6e63a0e8
/32/CH17/EX17.02/17_02.sce
16759b06db83566a6b2e67de9b28ceee06a50d8d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
453
sce
17_02.sce
//pathname=get_absolute_file_path('17.02.sce') //filename=pathname+filesep()+'17.02-data.sci' //exec(filename) //Indicator diagram area & length(in m^2 & m): A=40*10^(-4) l=0.08 //Bore(in m): D=0.15 //Stroke(in m): L=0.20 //Rpm of motor: N=100 //Spring constant(in Pa/m): k=1.5*10^8 //Mep(in Pa): mep=A*k/l //Indicated power(in kW): IP=(%pi*D^2/4*L*mep*N/60*2)/10^3 printf("\n RESULT \n") printf("\nPower required to drive =%f kW",IP)
0fded5ba01cadcba38a6419a7427c9cf12a67c52
449d555969bfd7befe906877abab098c6e63a0e8
/1970/CH6/EX6.12/Ch06Exa12.sce
c5d2891ff977176c01ac829277d84480b3330718
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
810
sce
Ch06Exa12.sce
// Scilab code Exa6.12: : Page-244(2011) clc; clear; h_kt = 1.05457e-34; // Reduced planck's constant, joule sec c = 3e+08; // velocity of light, metre per sec m_e = 9.1e-31; // Mass of the electron, Kg ft_O = 3162.28; // Comparative half life for oxygen ft_n = 1174.90; // Comparative half life for neutron M_f_sqr = 2 // Matrix element g_f = sqrt(2*%pi^3*h_kt^7*log(2)/(m_e^5*c^4*ft_O*M_f_sqr)); // Coupling constant, joule cubic metre C_ratio = (2*ft_O/(ft_n)-1)/3; // Ratio of coupling strength printf("\nThe value of coupling constant = %6.4e joule cubic metre\nThe ratio of coupling constant = %5.3f", g_f, C_ratio); // Result // The value of coupling constant = 1.3965e-062 joule cubic metre // The ratio of coupling constant = 1.461
ceb1ee947f561cb5b4db392a8418709f5f8af3bf
449d555969bfd7befe906877abab098c6e63a0e8
/1979/CH9/EX9.9/Ex9_9.sce
13b06996a69a0bcad720b77a959e622d74ea638e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
675
sce
Ex9_9.sce
//chapter-9 page 412 example 9.9 //============================================================================== clc; clear; //For an IMPATT diode Lp=0.5*10^(-9);//Inductance in Henry Cj=0.5*10^(-12);//Capacitance in Farad Ip=0.8;//RF peak current in A Rl=2;//Load Resistance in ohms Vbd=100;//Breakdown Voltage in V Ib=0.1;//dc Bias current in A //CALCULATION f=(1/(2*(%pi)*sqrt(Lp*Cj)))/10^9;//Resonant Frequency in GHz n=((Rl*Ip^2)/(2*Vbd*Ib))*100;//Efficiency in Percentage //OUTPUT mprintf('\nResonant Frequency is f=%2.0f GHz \nEfficiency is n=%1.1f percentage',f,n); //=========================END OF PROGRAM===============================
dd95a6cb281dfe990dee8c1a63d04d50fb7310bd
449d555969bfd7befe906877abab098c6e63a0e8
/3872/CH14/EX14.2/EX14_2.sce
df7fb91ddc54f9b4759beb52958ddc286c56723c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,446
sce
EX14_2.sce
//Book - Power System: Analysis & Design 5th Edition //Authors - J. Duncan Glover, Mulukutla S. Sarma, and Thomas J. Overbye //Chapter - 14 ; Example 14.2 //Scilab Version - 6.0.0 ; OS - Windows clc; clear; MVAtr1=40; //MVA FOA rating of transformer 1 MVAtr2=40; //MVA FOA rating of transformer 2 normal=1.28; //Factor for normal summer operation emergency2hr=1.70; //Factor for two hour emergency operation emergency30day=1.55; //Factor for thirty days emergency operation unequalloadingfactor=0.95; //Factor to account for unequal transformer loading MVAstation=normal*(MVAtr1+MVAtr2)*unequalloadingfactor; //MVA rating of thr station MVAstationemergency2hr=emergency2hr*MVAtr1; //MVA rating of a single transformer for two hour emergency MVAstationemergency30day=emergency30day*MVAtr1; //MVA rating of a single transformer for thirty days emergency printf('\nThe summer normal rating of the station is %f MVA',MVAstation); printf('\nThe emergency rating of the single transformer for two hours is %f MVA',MVAstationemergency2hr); printf('\nThe emergency rating of the single transformer for thirty days is %f MVA',MVAstationemergency30day)
d134852d495e34f3223ec0024f8bffd9e90d9dac
449d555969bfd7befe906877abab098c6e63a0e8
/2438/CH6/EX6.3/Ex6_3.sce
34a47fcc2e091ed37aff3adced9a59e4c8583f48
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
621
sce
Ex6_3.sce
//========================================================================== // chapter 6 example 3 clc; clear; //input data t1 = 20; // temperature in °C alpha = 5*10^-3; //average temperature coefficient at 20°C R1 = 8; //resistance in ohm R2 = 140; //resistaance in ohm //calculation t2 = t1+((R2-R1)/(R1*alpha)); //temperature in C //result mprintf('Hence temperature under normal condition is %3.2f°C\n',t2); //============================================================================
cc33f671cc87fec1a12d3a2ec959bbaefed414ac
449d555969bfd7befe906877abab098c6e63a0e8
/2339/CH7/EX7.5.1/Ex7_5.sce
ff9d8119b034a3b0668d3e15ad06a724bbef4e43
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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
sce
Ex7_5.sce
clc clear Vc=5*(10^-4); D=0.15; L=0.2; Vs=(22/7)*D*D*L*(1/4); r=(Vc+Vs)/Vc; G=1.4; Ea=[1-(1/(r^(G-1)))]; Eith=0.3; Erel=Eith/Ea; printf('Erel= %3.2f Percent',Erel*100); printf('\n'); Pm=500; //in kPa n=1000/2; IP=(Pm*Vs*n)/60; printf('IP= %3.2f kW',IP); printf('\n');
c36897c296fed0095d35f74bf5e6b96feb5fb9f7
449d555969bfd7befe906877abab098c6e63a0e8
/1484/CH6/EX6.17/6_17.sce
d9bf1bd0f6ef06ed6d7c7555cd8200707edc8d49
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
415
sce
6_17.sce
clc //initialisation of variables f= 0.008 l= 2000 //ft p1= 34 //ft p2= 8 //ft p3= 4 //ft g= 32.2 //ft/sec^2 d= 18 //in P= 140 //ft l1= 9500 //ft //CALCULATIONS v= sqrt((p1-p2-p3)*2*g/((d/12)+(4*f*l/(d/12)))) Q= %pi*(d/12)^2*v/4 v1= sqrt(P*2*g/((d/12)+(4*f*l1/(d/12)))) Q1= %pi*(d/12)^2*v1/4 //RESULTS printf ('Quantity discharge= %.f cuses',Q) printf ('\n Quantity discharge= %.2f cuses',Q1)
206a90ea8a95b78d3380390a9293293aa3b37b87
449d555969bfd7befe906877abab098c6e63a0e8
/1673/CH1/EX1.8/1_8.sce
bb2bb3e3682eff83e064972a8af8bd07c6fe3f34
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
229
sce
1_8.sce
//difference in 3 significant figures //example 1.8 //page 11 clc;clear;close; X1=sqrt(6.37); X2=sqrt(6.36); d=X1-X2;//difference between two numbers printf('the differencecorrected to 3 significant figures is %0.3g',d);
364d495cd6ae5537c05baebf024616054636a0d1
449d555969bfd7befe906877abab098c6e63a0e8
/61/CH2/EX2.10/ex2_10.sce
031ba3f42b699296e7abfa5cd745ebca0ef438ea
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
909
sce
ex2_10.sce
//Ex2.10 //let input wave be V_in=V_p_in*sin(2*%pi*f*t) f=1; //Frequency is 1Hz T=1/f; R_1=100; //Resistances in ohms R_L=1000; //Load V_p_in=10; //Peak input voltage V_th=0.7; //knee voltage of diode clf(); V_p_out=V_p_in*(R_L/(R_L+R_1)); //peak output voltage disp(V_p_out,'peak output voltage in volts') //let n be double the number of cycles of output shown in graph for n=0:1:6 t=T.*n/2:0.0005:T.*(n+1)/2 //time for each half cycle V_in=V_p_in*sin(2*%pi*f.*t); Vout=V_in*(R_L/(R_L+R_1)); if modulo(n,2)==0 then //positive half, diode reverse biased y=Vout; else //negative half, diode forward biased a=bool2s(Vout<-0.7); //puts zero to elements for which diode will conduct b=bool2s(Vout>-0.7); y=-V_th*a+b.*Vout; end plot(t,y) end xtitle('Negative limiter graph')
6fe780c4d843bf673636f81d796a3743c02e6296
449d555969bfd7befe906877abab098c6e63a0e8
/632/CH4/EX4.5/example4_5.sce
972bcf1b4e4d1be663dc2c02ba3445b2b10e88b6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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
example4_5.sce
//clc() V = 250;//L T = 300;//K V1 = 1000;//L P1 = 100;//kPa T1 = 310;//K P = T * P1 * V1 /(T1 * V); disp("kPa",P,"Original pressure in the cylinder = ")
84aadb739e4c2d9ce5108e1aeef3a1bc3f90736d
449d555969bfd7befe906877abab098c6e63a0e8
/3392/CH15/EX15.2/Ex15_2.sce
da2f42dbdf1d8ba8f7d6c8cc61f3eb4d28ef84ce
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
593
sce
Ex15_2.sce
clc // initialization of variables clear d=250 //mm c=30 //mm t=25 //mm // part (a) a=5 //mm lambda=a/(2*c) f1l=1.22 //from the tble f2l=1.02 //We don't know P yet so say P=1 P=1 Sfl=P/(t*2*c)*f1l+3*280*P*f2l/(2*t*c^2) K_IC=59*sqrt(1000) P=K_IC/(Sfl*sqrt(a*%pi)) printf('part (a)') printf('\n P = %.1f kN',P/10^3) // part (b) a=10 //mm lambda=a/(2*c) f1l=1.33 //from the tble f2l=1.05 // We don't know P yet so say P=1 P=1 Sfl=P/(t*2*c)*f1l+3*280*P*f2l/(2*t*c^2) K_IC=59*sqrt(1000) P=K_IC/(Sfl*sqrt(a*%pi)) printf('\n part (b)') printf('\n P = %.1f kN',P/10^3)
76d419cb99d60785cc1f67d7ddbdf9d6938cf79a
449d555969bfd7befe906877abab098c6e63a0e8
/29/CH1/EX1.6.4/exa1_6_4.sce
c18a9026b3190b58c0a15d60d6c37dc038c6fba8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
349
sce
exa1_6_4.sce
//Caption:solution_of_differential_equation // example 1.6.4 //page 10 //after taking laplace transform and applying given condition, we get : //Y(s)=(6*s+6)/((s-1)*(s+2)*(s+3)) s=%s; syms t [A]=pfss((6*s+6)/((s-1)*(s+2)*(s+3))) F1 = ilaplace(A(1),s,t) F2 = ilaplace(A(2),s,t) F3 = ilaplace(A(3),s,t) F=F1+F2+F3; disp (F,"f(t)=")//result
ebf2ad31e4de3ba900b6b852f76a31af7548d80b
449d555969bfd7befe906877abab098c6e63a0e8
/551/CH4/EX4.28/28.sce
9e9f9002c072d89dae426611a2b658f42f3db664
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
392
sce
28.sce
clc p1=1.02*10^5; //Pa T1=295; //K V1=0.015; //m^3 p2=6.8*10^5; //Pa y=1.4; disp("(i) Final temperature") T2=T1*(p2/p1)^((y-1)/y); t2=T2-273; disp("t2=") disp(t2) disp("°C") disp("(ii) Final volume :") V2=V1*(p1/p2)^(1/y); disp("V2=") disp(V2) disp("m^3") disp("(iii)Work done") R=287; m=p1*V1/R/T1; W=m*R*(T1-T2)/(y-1)/10^3; disp("W=") disp(W) disp("kJ")
66de03264c0f8ffabef559e24d4a5d9bf0e3b95c
449d555969bfd7befe906877abab098c6e63a0e8
/2912/CH6/EX6.9/Ex6_9.sce
0269cc49188e9219784cf70a039cdf25382a5500
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
688
sce
Ex6_9.sce
//chapter 6 //example 6.9 //Calculate average drift velocity of electrons //page 149 clear; clc; //given I=4; // in A (current in the conductor) e=1.6E-19; // in C (charge of electron) A=1E-6; // in m^2 (cross-sectional area) N_A=6.02E23; // in atoms/gram-atom (Avogadro's number) p=8.9; // in g/cm^3 (density) M=63.6; // atomic mass of copper //calculate n=N_A*p/M; // Calculation of density of electrons in g/cm^3 printf('\nThe density of copper atoms is \tn=%1.2E atoms/m^3',n); n=n*1E6; // changing unit from g/cm^3 to g/m^3 printf('\n\t\t\t\t =%1.2E atoms/m^3',n); v_d=I/(n*A*e); printf('\n\nThe average drift velocity of free electrons is \tv_d=%1.1E m/s',v_d);
4e20eaa2ca5f8972ae11899943961c72727bb475
449d555969bfd7befe906877abab098c6e63a0e8
/257/CH7/EX7.14/example_7_14.sce
3a71f7bb82c47d4d579097072eb3c830557d61e3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
137
sce
example_7_14.sce
s=%s; T=20/(s+10) syms t s; y=ilaplace(T,s,t); T1=20/((s+10)*s) c1=ilaplace(T1,s,t) T2=20/((s+10)*s^2) c2=ilaplace(T2,s,t)
6ceb8f69f67278800830eda199094f088b9276d3
449d555969bfd7befe906877abab098c6e63a0e8
/1757/CH11/EX11.8/EX11_8.sce
f94436d4346641d6815985f377217140a76f0da3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,790
sce
EX11_8.sce
//Example11.8 // determine the feed back current If and analog output voltage clc; clear; close; Vref = 5 ; BI = 101 ; BI = 011 ; BI = 100 ; BI = 001 ; Rf = 25*10^3 ; R = 0.2*Rf ; // The output current of given R-2R ladder D/A converter is defined as // If = -(Vref/2*R)*(2^0*b0+2^-1*b1+2^-2*b2) ; // If = -(Vref/2*R)*(b0+2^-1*b1+2^-2*b2) ; // for the given value Rf,R and Vref the output current // If = (0.5*10^-3)*(b0+2^-1*b1+2^-2*b2) ; // for the binary input 101 the feedback current If is given by b2 = 1 ; b1 = 0 ; b0 = 1 ; If = (0.5*10^-3)*(b0+2^-1*b1+2^-2*b2) ; disp('for the binary input 101 analog output is = '+string(If)+ ' A '); // An analog output voltage Vo is Vo = -If*Rf ; disp('An analog output voltage Vo is = '+string(Vo)+ ' V '); // for the binary input 011 the feedback current If is given by b2 = 0 ; b1 = 1 ; b0 = 1 ; If = (0.5*10^-3)*(b0+2^-1*b1+2^-2*b2) ; disp('for the binary input 011 analog output is = '+string(If)+ ' A'); // the An analog output voltage Vo is Vo = -If*Rf ; disp('An analog output voltage Vo is = '+string(Vo)+ ' V '); // for the binary input 100 the feedback current If is given by b2 = 1 ; b1 = 0 ; b0 = 0 ; If = (0.5*10^-3)*(b0+2^-1*b1+2^-2*b2) ; disp('for the binary input 100 analog output is = '+string(If)+ ' A '); // the An analog output voltage Vo is Vo = -If*Rf ; disp('An analog output voltage Vo is = '+string(Vo)+ ' V '); // for the binary input 001 the feedback current If is given by b2 = 0 ; b1 = 0 ; b0 = 1 ; If = (0.5*10^-3)*(b0+2^-1*b1+2^-2*b2) ; disp('for the binary input 001 analog output is = '+string(If)+ ' A '); // the An analog output voltage Vo is Vo = -If*Rf ; disp('An analog output voltage Vo is = '+string(Vo)+ ' V ');
dcfa9b9bde4e3329d07e6ec9501f5cdd2b24b894
449d555969bfd7befe906877abab098c6e63a0e8
/1529/CH21/EX21.10/21_10.sce
7ddf8131b509f7d302131ce08207cfa674b70e68
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
517
sce
21_10.sce
//Chapter 21, Problem 10 clc; f=50; //frequency n1=25; //primary turns n2=300; //secondary turns A=300e-4; //cross-sectional area of the core v1=250; //primary voltage phim=v1/(4.44*f*n1); //flux Bm=phim/A; //maximum flux density v2=v1*(n2/n1); //secondary voltage printf("(a) Maximum flux density= %.2f T\n\n",Bm); printf("(b) Secondary winding voltage = %d V",v2);
b564374d1271f38a80413df2f44acb5c13b2451e
449d555969bfd7befe906877abab098c6e63a0e8
/32/CH11/EX11.04/11_04.sce
af55ee893eb6e87fa056827b36a4e45bde9347bb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
889
sce
11_04.sce
//pathname=get_absolute_file_path('11.04.sce') //filename=pathname+filesep()+'11.04-data.sci' //exec(filename) //Height of chimney(in m): H=60 //Ambient air temperature(in K): Ta=17+273 //Temperature of burnt gases(in K): Tg=300+273 //Temperature of the artificial burnt gases(in K): Tga=150+273 //Mass per kg of fuel required for complete combustion(in kg): m=19 //Specific heat of hot gases(in kJ/kg.K): Cpg=1.0032 //Calorific value of burnt fuel(in kJ/kg): c=32604 //Draught (in mm of water column): hw=353*H*(1/Ta-(m+1)/(m*Tg)) //Chimney efficiency: n=9.81*H*(m/(m+1)*Tg/Ta-1)/(Cpg*(Tg-Tga)*10^3)*100 //Extra heat carried away by flue gases(in kJ): Q=(m+1)*Cpg*(Tg-Tga) printf("\n RESULT \n") printf("\nDraught = %f mm of water",hw) printf("\nChimney efficiency = %f percent",n) printf("\nExtra heat carried away by flue gases per kg of fuel burnt = %f kJ",Q)
71c90007065f65adadd62b0c1d8c1b91c795c2fb
449d555969bfd7befe906877abab098c6e63a0e8
/2534/CH1/EX1.10/Ex1_10.sce
b34a720bfe240f28c7d6ba15e3d140a28d42384c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
264
sce
Ex1_10.sce
//Ex1.10 clc B = 2*10^-6 //magnetic flux density V = 4*10^6 //electron velocity e= 1.6*10^-19//elcetron charge disp("B ="+string(B)+"ax wb/m.sq") disp("V ="+string(V)+"az m/s") disp("e = "+string(e)+ "C") disp("F = e[VxB] ="+string(e*V*B)+"ay N")//force
9364c0ec23a8e183a3faea2b8f2a05802f5b857d
449d555969bfd7befe906877abab098c6e63a0e8
/1439/CH9/EX9.4/9_4.sce
4160b792f41ce7f0720492a4ffabbadf4b1f8931
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
252
sce
9_4.sce
clc //initialisation of variables M1= 208.3 //gms g= 2.69 //gms R= 0.08205 //l-atm mole^-1 deg^-1 T= 250 //C P= 1 //atm V= 1 //lit //CALCULATIONS M2= g*R*(273.1+T)/(P*V) a= (M1-M2)/M2 Kp= a^2*P/(1-a^2) //RESULTS printf ('Kp= %.2f ',Kp)
7a8add09b650a5fd23cc08f3178bf11c134b743d
449d555969bfd7befe906877abab098c6e63a0e8
/3411/CH7/EX7.7.u1/Ex7_7_u1.sce
33c3700a103cc2dd18d76a7dacd94174ffed6b00
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
263
sce
Ex7_7_u1.sce
//Example 7_7_u1 clc(); clear; //To calculate the fiber length alpha=0.5 //units in db/KM it=2*10^-6 //units in W i0=1.5*10^-3 //units in W l=-1*(10/alpha)*log10(it/i0) //units in KM printf("The length of the fiber is L=%.1f KM",l)
49e809d35930124ed70bc2540bae7057abb4623c
449d555969bfd7befe906877abab098c6e63a0e8
/3838/CH6/EX6.4.c/EX6_4_C.sce
1f3fa7788fac4f134b21e4fd60567cdb997342d1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
227
sce
EX6_4_C.sce
//example 6.4.C //check the signal is periodic or not clc ; n=-15:0.01:15; y =(1+cos(2*(%pi)*n/8)/2); xlabel('n') ylabel('x(n)') plot(n,y); disp ( 'Plot shows that given signal is periodic of fundamental period=4 samples' ) ;
c4e7b1829ff05a11989d74b65e49f1fc2a7baa9f
449d555969bfd7befe906877abab098c6e63a0e8
/2990/CH4/EX4.42/Ex4_42.sce
9fc9b0cd8a963bc151cc258e3f13c76d01316e7d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
441
sce
Ex4_42.sce
funcprot(0); // Initialization of Variable function[dms]=degtodms(deg) d = int(deg) md = abs(deg - d) * 60 m = int(md) sd = (md - m) * 60 sd=round(sd*100)/100 dms=[d m sd] endfunction Long=30.0;//longitude in degrees GAT=13+15.0/60+10.0/3600;//GAT in hr ET=6.0/60+15.35/3600+0.3/3600*1.25278;//ET in hr //calculation LMT=GAT+ET-Long/15.0; LMT=degtodms(LMT); disp(LMT,"LMT in hr min sec"); clear()
a4ce57e5d45d8a3115e282d76206538297d28049
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/rssq/rssq1.sce
a44db63105f04aa12e1202a143b18c34d547f67b
[]
no_license
deecube/fosseetesting
ce66f691121021fa2f3474497397cded9d57658c
e353f1c03b0c0ef43abf44873e5e477b6adb6c7e
refs/heads/master
2021-01-20T11:34:43.535000
2016-09-27T05:12:48
2016-09-27T05:12:48
59,456,386
0
0
null
null
null
null
UTF-8
Scilab
false
false
133
sce
rssq1.sce
//check o/p when the i/p is a cosine value t = 0:0.001:1-0.001; X = cos(2*%pi*100*t); r = rssq(X); disp(r); //output // 22.36068
b18e7706d3e8d8deb7bfebc3fe415ee2b0f99ed1
449d555969bfd7befe906877abab098c6e63a0e8
/2144/CH8/EX8.1/ex8_1.sce
995376682b5a018183d653c0b272da1d25add3c7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
463
sce
ex8_1.sce
// Exa 8.1 clc; clear; close; // Given data C= 85;// in % H= 12.5;// in % H1 = 35000;// heat liberated by carbon in kJ H2 = 143000;// heat liberated by hydrogen in kJ HCV = (C*H1+H*H2)/100;// Higher calorific value in kJ/kg disp(HCV,"Higher calorific value in kJ/kg is"); ms = 9; LCV= HCV -(ms*H*2442)/100 ;// Lower calorific value in kJ/kg disp(LCV,"Lower calorific value in kJ/kg is"); // Note: The calculated value in the book is not accurate
fa1e68d98aa8d8965109a5a9c39ef88b145e4c2a
449d555969bfd7befe906877abab098c6e63a0e8
/2384/CH3/EX3.2/ex3_2.sce
ce2081795c04d73210d1ecd07b0f6fba10fa1ca8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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
ex3_2.sce
// Exa 3.2 clc; clear; close; format('v',7) // Given data Im = 141.4;// in A t = 3;// in ms t = t * 10^-3;// in sec disp(Im,"The maximum value of current in A is"); omega = 314;// in rad/sec // omega = 2*%pi*f; f = round(omega/(2*%pi));// in Hz disp(f,"The frequency in Hz is"); T = 1/f;// in sec disp(T,"The time period in sec is"); i = 141.4 * sin(omega*t);// in A disp(i,"The instantaneous value in A is");
df74f1eb59251b915a4e719678c837aa9629e576
449d555969bfd7befe906877abab098c6e63a0e8
/545/CH3/EX3.5/ch_3_eg_5.sce
9c10e1c204ee61d6628e352a767819be25f8fcea
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
2,125
sce
ch_3_eg_5.sce
clc disp("the soln of eg 3.5-->Flash calc. using Modified Raoult law"); a12=292.66*4.18, a21=1445.26*4.18, v1=74.05*10^-6, v2=18.07*10^-6, R=8.314 t=100,z1=.3, z2=1-z1 a1=14.39155, a2=16.262, b1=2795.82, b2=3799.89, c1=230.002, c2=226.35 e1=1,e2=1,e3=1,e4=1,e5=1,e6=1,vnew=0 //calc of BPP x1=z1, x2=z2 p1sat=exp(a1-(b1/(t+c1))) p2sat=exp(a2-(b2/(t+c2))) h12=v2*exp(-a12/(R*(t+273.15)))/v1 h21=v1*exp(-a21/(R*(t+273.15)))/v2 m=(h12/(x1+x2*h12))-(h21/(x2+x1*h21)) g1=exp(-log(x1+x2*h12)+x2*m) g2=exp(-log(x2+x1*h21)-x1*m) p=x1*g1*p1sat+x2*g2*p2sat disp(p,"the bubble point pressure is"); bpp=p, gb1=g1, gb2=g2 //g1 & g2 are activity co-efficients //calc of DPP y1=z1, y2=z2 g1=1, g2=1 pnew=1/(y1/(g1*p1sat)+y2/(g2*p2sat)) g1n=g1, g2n=g2 while e1>.0001 do pold=pnew,while e2>.0001& e3>.0001 do g1=g1n, g2=g2n, x1=y1*pold/(g1*p1sat) x2=y2*pold/(g2*p2sat) x1=x1/(x1+x2) x2=1-x1 g1n=exp(-log(x1+x2*h12)+x2*m) g2n=exp(-log(x2+x1*h21)-x1*m) e2=abs(g1n-g1), e3=abs(g2n-g2) end pnew=1/(y1/(g1n*p1sat)+y2/(g2n*p2sat)) e1=abs(pnew-pold) end disp(pnew,"the dew point pressure is"); dpp=pnew, gd1=g1n, gd2=g2n p=200 v=(bpp-p)/(bpp-dpp) g1=((p-dpp)*(gb1-gd1))/(bpp-dpp)+gd1 g2=((p-dpp)*(gb2-gd2))/(bpp-dpp)+gd2 //calc of distribution co-efficients while e4>.0001 & e5>.0001 do g1n=g1,g2n=g2, k1=g1n*p1sat/p k2=g2n*p2sat/p while e6>.00001 do v=vnew, function f=fv(v), y1=(k1*z1)/(1-v+v*k1) y2=(k2*z2)/(1-v+v*k2) x1=y1/k1 x2=y2/k2 f=y1-x1+y2-x2 endfunction derv=derivative(fv,v) vnew=v-fv(v)/derv e6=abs(vnew-v) end h12=v2*exp(-a12/(R*(t+273.15)))/v1 h21=v1*exp(-a21/(R*(t+273.15)))/v2 m=(h12/(x1+x2*h12))-(h21/(x2+x1*h21)) g1=exp(-log(x1+x2*h12)+x2*m) g2=exp(-log(x2+x1*h21)-x1*m) e4=abs(g1-g1n), e5=abs(g2-g2n) end disp(v,"the no. of moles in vapour phase is"); disp(y1,x1,"x1 and y1 respectively are");
0b4dc2dcb724d5caa04bbba04223a91c9f30b327
449d555969bfd7befe906877abab098c6e63a0e8
/978/CH12/EX12.2/Example12_2.sce
0ef0b12dd00c33a4e1280a5a7951d3e472d9d4a6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
598
sce
Example12_2.sce
//chapter-12,Example12_2,pg 383 fc=10^6//carrier frequency m=0.4//modulation index fs=100//signal frequency V=2//(+/-)2V range delfc1=m*fc//frequency deviation for FS(full scale) //(+/-) 2V corresponds to delfc Hz deviation assuming linear shift, for (+/-)1V delfc2=delfc1/V//frequency deviation for (+/-)1V range sig=(delfc1/fs)//deviation factor printf("frequency deviation for FS\n") printf("delfc1=%.2f Hz\n",delfc1) printf("frequency deviation for given range\n") printf("delfc2=%.2f Hz\n",delfc2) printf("deviation factor\n") printf("sig=%.2f",sig)
6964f90401f8b34c4a7d5eb50a88773058828968
449d555969bfd7befe906877abab098c6e63a0e8
/1394/CH4/EX4.2.2/Ex4_2_2.sce
2097e2fe470d27c833b55730a8780e64518d4e80
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
323
sce
Ex4_2_2.sce
clc //initialization of variables d = 10 //cm s = 3 // km v = 500 //cm/sec nu = 0.15 // cm^2/sec //Calculations E = 0.5*d*v // cm^2/sec c1 = 1000 // m/km c2 = 1/100 // m/cm z = sqrt(4*E*c1*c2*s/v) percent = z*100/(s*c1) //Results printf(" The percent of pipe containing mixed gases is %.1f percent",percent)
0a7dd69bd34bec7a0f74bdbfb8de12bb1e3156d9
449d555969bfd7befe906877abab098c6e63a0e8
/1271/CH18/EX18.13/example18_13.sce
eb8a2cabf6018cd3f4123eb7f7fb96b7864af2c0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
552
sce
example18_13.sce
clc // Given that N = 6.5e25 // no. of atom per m^3 T = 300 // room temperature in K mu_ = 4 * %pi * 1e-7 // magnetic permittivity of space k = 1.38e-23 // Boltzmann's constant in J/K m = 9.1e-31 // mass of electron in kg e = 1.6e-19 // charge in an electron in C h = 6.62e-34 // Planck constant in J sec // Sample Problem 13 on page no. 18.25 printf("\n # PROBLEM 13 # \n") printf("Standard formula used \n ") printf(" Chi = mu_0*N*M^2 /(3*k*t) \n") M = (e * h) / (4 * %pi * m) X = (mu_ * N * M^2) / (3 * k * T) printf("\n Susceptibility is %e",X)
8de029f7d99477ed78c3ffbca7eaa5253bdfbb12
449d555969bfd7befe906877abab098c6e63a0e8
/2333/CH3/EX3.21/21.sce
111430afcc187bfd10ed53277a811c546af9ae8d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
761
sce
21.sce
clc // Given that lambda = 6000 // wavelength of light in angstrom N = 200 // Grating element n = 3 // order d = 0.025 // diameter of wire in mm // Sample Problem 21 on page no. 165 printf("\n # PROBLEM 21 # \n") printf(" Standard formula used \n") printf(" n*lambda= sin(theta)/N \n") theta = 180/%pi*asin(N*n*lambda*1e-8) theta_deg = floor(theta) theta_min = (theta - theta_deg)*60// Angle of diffraction e = 1/N - d*1e-1 // width of slit ratio = 1/(N*e) m = 1 n1 = ratio*m printf(" \n Angle of diffraction for third order spectrum is %d degree and %f minute.\n",theta_deg, theta_min ) printf("\n For n = %d, m = 1 is considered \n because the higher value of m results the order \nof absent spectrum more than given order %d.",n1,n)
7dfce70ef876bed495e928687b0ec789073379ad
449d555969bfd7befe906877abab098c6e63a0e8
/1226/CH20/EX20.48/EX20_48.sce
4f7027e525678e8f4a76cf887d6d1b85f78769d5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,903
sce
EX20_48.sce
clc;funcprot(0);//EXAMPLE 20.48 // Initialisation of Variables rp=4;........//Stagnation pressure ratio etaisen=0.85;.....//Stagnation isentropic efficiency p1=1;.............//Inlet stagnation pressure in bar t1=300;...........//Inlet stagnation temperature in K Rd=0.5;............//Degree of reaction Cu=180;...........//Mean blade speed in m/s Wd=0.9;...........//Work done factor htr=0.42;.......//Hub tip ratio al1=12;be2=al1;.......//Relative air angle at rotor inlet in degrees al2=32;be1=al2;........//Relative air angle at rotor at outlet in degrees ga=1.4;...........//Ratio of specific heats cp=1.005;..........//Specific heat capacity at constant pressure in kJ/kgK R=287;..........//Gas constant in J/kgK m=19.5;..........//Mass flow in kg/s //Calculations tN1=t1*(rp^((ga-1)/ga));......//Temperature at the end of compression stage due to isentropic expansion in K tN=((tN1-t1)/etaisen)+t1; etap=log(rp^((ga-1)/ga))/log(tN/t1);...........//Stagnation polytropic efficiency disp(etap*100,"Stagnation polytropic efficiency in %:") Cf=Cu/(tan(al1*%pi/180)+tan(be1*%pi/180)); Cw1=Cf*tan(al1*%pi/180);Cw2=Cf*tan(al2*%pi/180); wcps=Cu*(Cw2-Cw1)*Wd/1000;.............//Work consumed per stage in kJ/kg wc=cp*(tN-t1);...............//Work consumed by compressor in kJ/kg N=round(wc/wcps);.......//No of stages disp(N,"No of stages:") C1=Cf/cos(al1*%pi/180);.......//Absolute velocity at exit from guide vanes in m/s ti=t1-((C1*C1)/(2*cp*1000));..........//Inlet temperature in K disp(ti,"Inlet temperature in K:") pi=p1*((ti/t1)^(ga/(ga-1)));......//Inlet pressure in bar disp(pi,"Inlet pressure in bar:") rho1=(pi*10^5)/(R*ti);.............//Density of air approaching the first stage r1=sqrt(m/(rho1*%pi*Cf*(1-(htr^2))));rh=r1*htr; l=r1-rh;............//Height of the blade in the first stage in m disp(l*100,"Height of the blade in the first stage in cm:")
4900d58f73bba5b428f59f76d700c7a36f0c99ca
449d555969bfd7befe906877abab098c6e63a0e8
/2066/CH2/EX2.6/2_6.sce
4126099f397e071d463f27ddb9a175edd6d38150
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
853
sce
2_6.sce
clc clear //Initialization of variables gam=62.4 x1=4 //ft x2=6 //ft y1=6 //ft z=8 //ft dy=1 //ft angle=60 //degrees //calculations A1=x1*x2 A2=1/2 *y1^2 yc = (A1*(x1+x2+dy) + A2*(x1+x2))/(A1+A2) hc=yc*sind(angle) F=hc*gam*(A1+A2) ic1=1/12 *x1*y1^3 ic2=1/36*y1*x2^3 ad1=A1*(x1+x2+dy-yc)^2 ad2=A2*(x1+x2-yc)^2 It=ic1+ic2+ad1+ad2 ydc=It/(yc*(A1+A2)) function m= momen(u) m= gam*sind(angle) *(2*x1+u)*0.5*(x2-u)*(y1-u) endfunction MED=intg(0, y1, momen) FEDC=gam*sind(angle) *A2*(x1+x2) xed=MED/FEDC xp= (A1*2*(x1+x2+dy) + (x1+x2)*(A2)*(x1+xed))/(A1*(x1+x2+dy) + A2*(x1+x2)) //results printf("Magnitude of total force = %d lb",F) printf("\n Vertical location of force = %.3f ft",ydc) printf("\n Horizontal location of force = %.2f ft from AB",xp) printf("\n Direction of force is perpendicular to the plane surface")
a01999cd5e35ae3407ffa7795c48265415339436
a557f90da8513f81cafd8f65e37e2c0d66449a2f
/Bilinear_trans_using_butterworth.sce
0c2b967545c6149576294b3026543c9fafdf46e7
[]
no_license
Sahil966121/SCI
484cd77d6247e54fe87d36b4f112965c83ab5d96
cf2921861486a4f2e2e83c3ca813a4e7710d3508
refs/heads/main
2023-03-03T17:43:08.236000
2021-02-03T05:19:43
2021-02-03T05:19:43
324,413,192
0
0
null
null
null
null
UTF-8
Scilab
false
false
631
sce
Bilinear_trans_using_butterworth.sce
clc; F1=input("Enter the pass band edge (Hz)="); F2=input("Enter the stop band edge (Hz)="); kp=input("Enter the pass band attenuation (-dB)="); ks=input("Enter the stop band attenuation (-dB)="); Fs=input("Enter the sampling rate (Hz)="); w1=2*%pi*F1*1/Fs; w2=2*%pi*F2*1/Fs; o1=2*Fs*tan(w1/2); o2=2*Fs*tan(w2/2); num=log10(((10^(-kp/10))-1)/((10^(-ks/10))-1)); den=2*log10(o1/o2); N=ceil(num/den); oc=o2/((10^(-ks/10)-1)^(1/(2*N))); hs=analpf(N,'butt',[],oc); wc=2*atan(oc/(2*Fs)); cutoff=wc/(2*%pi); hz=iir(N,'lp','butt',cutoff,[]); [hzm fr]=frmag(hz,256); fr_rad=fr* 2*%pi; gain_db=20*log10(hzm); figure;plot2d(fr_rad,gain_db);
5f05c21d78e65afcd8faa263c9c0da6cdb6b4309
449d555969bfd7befe906877abab098c6e63a0e8
/2384/CH4/EX4.23/ex4_23.sce
56d82aa21193a958df308357f16b763f6c761741
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
582
sce
ex4_23.sce
// Exa 4.23 clc; clear; close; format('v',6) // Given data V=230;// in V f= 50;// in Hz Z1= 10*expm(-30*%i*%pi/180);// in ohm Z2= 20*expm(60*%i*%pi/180);// in ohm Z3= 40*expm(0*%i*%pi/180);// in ohm Y1= 1/Z1;// in S Y2= 1/Z2;// in S Y3= 1/Z3;// in S Y= Y1+Y2+Y3;// in S phi= atand(imag(Y),real(Y));// in ° Z=1/Y;// in ohm P= V^2*abs(Y);// in W disp("The circuit admittance is : "+string(abs(Y))+" mho"); disp("The circuit impedance is : "+string(abs(Z))+" Ω"); disp(P,"The power consumed in W is : ") disp("The power factor is : "+string(cosd(phi))+" lead")
cb1315e1acf1fabacc94e04514cbded7d47f6b26
449d555969bfd7befe906877abab098c6e63a0e8
/278/CH24/EX24.14/ex_24_14.sce
1ca9da8cb805d1da6c5f6573b21d322730207d6b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
438
sce
ex_24_14.sce
//find.. clc //solution //given P=15000//W N=900//rpm n=4 R=0.15//m u=0.25 //let m be the mass w=2*%pi*N/60//rad/s w1=(3/4)*w//rad/s r=0.12//m //Pc=m*w^2*r=1066*m//N //Ps=m*w1^2*r=600m//N T=P*60/(2*%pi*N)//N-m //T=u*(Pc-Ps)*R*n=70m m=T/70//kg printf("mass of shoes is,%f kg\n",m) a=%pi/3 l=R*a*1000//mm //A=l*n=157*b//mm^2 //F=A*p=15.7*b//N //15.7*b=Pc-Ps=466m b=466*m/(15.7)//mm printf("face width is,%f mm\n",b)
33047c0153624020c0db34d1fd6e9064924ec0b1
449d555969bfd7befe906877abab098c6e63a0e8
/572/CH9/EX9.12/c9_12.sce
bd0679c9ec2bc5e2d22a80fa675eae27bfe88b26
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,249
sce
c9_12.sce
//(9.12) Air enters a turbojet engine at 0.8 bar, 240K, and an inlet velocity of 1000 km/h (278 m/s). The pressure ratio across the compressor is 8. The turbine inlet temperature is 1200K and the pressure at the nozzle exit is 0.8 bar. The work developed by the turbine equals the compressor work input. The diffuser, compressor, turbine, and nozzle processes are isentropic, and there is no pressure drop for flow through the combustor. For operation at steady state, determine the velocity at the nozzle exit and the pressure at each principal state. Neglect kinetic energy at the exit of all components except the nozzle and neglect potential energy throughout. //solution //variable initialization Ta = 240 //in kelvin pa = .8 //in bar Va = 278 //in m/s PR = 8 //pressure ratio across the compressor T3 = 1200 //in kelvin p5 = .8 //in bar //from table A-22 ha = 240.02 //in kj/kg h1 = ha + ((Va^2)/2)*10^-3 //in kj/kg //Interpolating in Table A-22 gives pr1 = 1.070 pra = .6355 p1 = (pr1/pra)*pa //in bars p2 = PR*p1 //in bars //Interpolating in Table A-22, we get h2 = 505.5 //in kj/kg //At state 3 the temperature is given as T3 = 1200 K. From Table A-22 h3 = 1277.79 //in kj/kg //using assumption 'There is no pressure drop for flow through the combustor', p3 = p2 //with the help of assumption, 'The turbine work output equals the work required to drive the compressor.', h4 = h3+h1-h2 //in kj/kg //Interpolating in Table A-22 with h4, gives pr4 = 116.8 //pr data from table A-22 gives pr4 = 116 pr3 = 238 p4 = p3*(pr4/pr3) //in bars //The expansion through the nozzle is isentropic to p5 = .8 //in bars pr5 = pr4*(p5/p4) //from table A-22 h5 = 621.3 //in kj/kg V5 = sqrt(2*(h4-h5)*10^3) //the velocity at the nozzle exit in m/s printf('the velocity at the nozzle exit in m/s is: %f',V5) printf('\npa in bars = %f',pa) printf('\np1 in bars = %f',p1) printf('\np2 in bars = %f',p2) printf('\np3 in bars = %f',p3) printf('\np4 in bars = %f',p4) printf('\np5 in bars = %f',p5)
e6be3abeefb0737c0c00e2664504c39f8c3915f5
449d555969bfd7befe906877abab098c6e63a0e8
/2132/CH7/EX7.15/Example7_15.sce
68584c633bda08faafc864d2d6b0cb195f6dd8bd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
600
sce
Example7_15.sce
////Example 7.15 clc; clear; close; format('v',6); //Given data : g=9.81;//gravity constant D1=50/1000;//meter D2=100/1000;//meter l1=100;l2=100;//meter hf1=10;//meter(level difference) f=0.008;//coeff. of friction Q2BYQ1=sqrt((l1/l2)*(D2/D1)^5);//as hf1=hf2 Q1=sqrt(hf1/f/l1*(3.0257*D1^5));//m^3/sec Q2=Q2BYQ1*Q1;//m^3/sec or cumec disp(Q1,"Rate of flow of pipe 1(m^3/sec)"); disp(Q2,"Rate of flow of pipe 2(m^3/sec)"); Q=Q1+Q2;//m^3/sec(Total Discharge) d=(f*l1*Q^2/3.0257/hf1)^(1/5);//meter disp(d*1000,"Diameter of single pipe(mm) : "); //Answer in the book is not accurate.
c21977d99074045cb5c20ce45a9b6afa2225a994
449d555969bfd7befe906877abab098c6e63a0e8
/2234/CH1/EX1.20/ex1_20.sce
e9ab6f732e8629fe0887063df8d9a4df73cf917e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
239
sce
ex1_20.sce
clc; p=200; //power in Watt v=12; //voltage in volt i=p/v; //calculating current in Ampere I=p/6; //calculating disp(i,"Current in Ampere = "); //displaying disp(I,"Current in Ampere if voltage were 6V = "); //displaying result
b464a20cb3150de1266184dfcc709566e4057454
449d555969bfd7befe906877abab098c6e63a0e8
/3772/CH4/EX4.9/Ex4_9.sce
71d2696cbbd2ca8822a1e2b6c4b5288f7e3ab6e2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,551
sce
Ex4_9.sce
// Problem no 4.4.9,Page No.99 clc;clear; close; M_C=40 //KNM //Moment at Pt C w=20 //KNm //u.d.l on L_AD L=10 //m //Length of beam L_CB=5 //m //Length of CB L_DC=1 //m //Length of DC L_AD=4 //m //Length of AD //Calculations //Let R_A & R_B be the reactions at A & B //R_A+R_B=80 //Taking Moment at A //M_A=0=R_B*L-M-w*L_AD**2*2**-1 R_B=(w*L_AD**2*2**-1+M_C)*L**-1 R_A=80-R_B //Shear Force Calculations //Shear Force at B V_B=R_B //Shear Force at C V_C=V_B //Shear Force at D V_D=V_C //Shear Force at A V_A=V_D-w*L_AD //Pt of contraflexure //Let E be the pt and BE=x //V_E=0=R_B-w*(L_BE-L_DC-L_CB) L_BE=R_B*w**-1+L_DC+L_CB; x=L_BE //Bending Moment Calculations //Bending Moment at B M_B=0 //Bending Moment at C M_C1=R_B*L_CB M_C2=M_C1-M_C //Bending Moment at D M_D=R_B*(L_CB+L_DC)-M_C //Bending Moment at A M_A=R_B*L-M_C-w*L_AD**2*2**-1 //Bending Moment at E L_ED=L_BE-(L_DC+L_CB) M_E=R_B*L_BE-M_C-w*L_ED**2*2**-1 //Result printf("The Shear Force and Bending Moment Diagrams are the results") //Plotting the Shear Force Diagram subplot(2,1,1) X1=[0,L_CB,L_CB+L_DC,L_CB+L_DC+L_AD,L_CB+L_DC+L_AD] Y1=[V_B,V_C,V_D,V_A,0] Z1=[0,0,0,0,0] plot(X1,Y1,X1,Z1) xlabel("Length x in m") ylabel("Shear Force in kN") title("the Shear Force Diagram") //Plotting the Bending Moment Diagram subplot(2,1,2) X2=[0,L_CB,L_CB,L_CB+L_DC,L_CB+L_DC+L_ED,L_CB+L_DC+L_AD] Y2=[M_B,M_C1,M_C2,M_D,M_E,M_A] Z2=[0,0,0,0,0,0] plot(X2,Y2,X2,Z2) xlabel("Length in m") ylabel("Bending Moment in kN.m") title("the Bending Moment Diagram")
75f89fd75cab350ac75b271a11c9b9c16955a9c2
449d555969bfd7befe906877abab098c6e63a0e8
/132/CH5/EX5.1/Example5_1.sce
6605ed6a4c994e5fa6982158d2ee813896e3991f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
434
sce
Example5_1.sce
//Example 5.1 //Program to Calculate Collector and Base Currents clear; clc ; close ; //Given Circuit Data alpha=0.98; //alpha(dc) Ico=1*10^(-6); //Ampere Ie=1*10^(-3); //Ampere //Calculation Ic=alpha*Ie+Ico; //Collector Current Ib=Ie-Ic; //Base Current //Displaying The Results in Command Window printf("\n\t The Collector Current is Ic= %f mA .",Ic/10^(-3)); printf("\n\t The Base Current is Ib= %f uA .",Ib/10^(-6));
f0419efb110b2039ef1e682411b3c5a3deb9b526
449d555969bfd7befe906877abab098c6e63a0e8
/2132/CH11/EX11.3/Example11_3.sce
c87c3830bdf2137ccc81b736c0f07615c6803d5d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
590
sce
Example11_3.sce
//Example 11.3 clc; clear; close; format('v',9); //Given data : l=2;//meter d0=0;//meter d1=0.3;//meter d2=1.0;//meter d3=1.2;//meter d4=1.6;//meter d5=2.0;//meter d6=1.4;//meter d7=1.0;//meter d8=0.4;//meter d9=0.3;//meter d10=0.2;//meter V0=0;//meter V1=0.5;//meter V2=0.7;//meter V3=0.8;//meter V4=1.0;//meter V5=1.2;//meter V6=0.9;//meter V7=0.8;//meter V8=0.6;//meter V9=0.5;//meter V10=0.3;//meter Q=l/3*(d0*V0+4*d1*V1+2*d2*V2+4*d3*V3+2*d4*V4+4*d5*V5+2*d6*V6+4*d7*V7+2*d8*V8+4*d9*V9+2*d10*V10+d0*V0);//cum/sec disp(Q,"Rate of discharge in cum/sec : ");
7c60b0891c0012538e5e95dd888b419b7fb8ad9a
449d555969bfd7befe906877abab098c6e63a0e8
/2699/CH3/EX3.12/Ex3_12.sce
498e170cefe44f3678549637c71e288e2a0226eb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
636
sce
Ex3_12.sce
//EX3_12 PG-3.39 clc Rl=5e3; N1toN2=2;//transformer turns ratio Ep=460;//rms value of primary voltage Es=Ep/N1toN2; Esm=sqrt(2)*Es;//peak value of the secondary voltage Im=Esm/Rl;//We neglect forward diode resistance Idc=2*Im/%pi; printf("\n Therefore DC load current is %f A \n",Idc) Edc=Idc*Rl; printf("\n DC load voltage is %.3f V \n",Edc) Rf=.482;//ripple factor for full bridge rectifier Vrip=Rf*Edc;//ripple voltage printf("\n Therefore ripple voltage is %.1f V \n",Vrip) disp(" Peak value of bridge rectifier=PIV rating of each diode") PIV=Esm; printf("\n Therefore PIV rating of each diode is %.2f V",PIV)
02d79903aed34eee323d806c0b6a8946e01e82d8
8712e7b4614b1ab648f19bcce8ca17e378876546
/Scilab Com Interface Grafica/Engine/B8_Salva_Dados.sce
4b0be306c31fc2e32c47771d2fea838434a5cfbb
[]
no_license
Diogo-Rossi/Mestrado-Diogo-Rossi
d0d476d878c729c44778ea8f364c50c5464fc751
d544d3bce094931eb96a6031aaa1ae1a833d2b04
refs/heads/master
2022-08-26T22:28:04.339000
2022-07-11T00:25:21
2022-07-11T00:25:21
236,889,761
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,182
sce
B8_Salva_Dados.sce
Arquivo = uiputfile(["*.dinam","Arquivos de Análise Dinâmica"], ... fileparts(pwd()),"Salvar dados da análise"); if ~isempty(Arquivo) then [Path,Name,Extension] = fileparts(Arquivo); Arquivo = Path + Name + ".dinam" EditBoxData = [] Campos = {MaterialData SectionData DampingData NewmarkBeta DeltaT_CTS ATS_Bergan ATS_Hulbert ATS_Cintra} k=1 for i=1:size(Campos,"*") for j=1:size(Campos{i},"*") EditBoxData(k) = Campos{i}(j).string k=k+1 end end if ~isempty(EditBoxData); save(Arquivo, "EditBoxData","-append") end if ~isempty(Barras); BarrasData = Barras.data; save(Arquivo, "BarrasData","-append") end if ~isempty(Barras); BarrasData = Barras.data; save(Arquivo, "BarrasData","-append") end if ~isempty(Cargas); CargasData = Cargas.user_data; save(Arquivo, "CargasData","-append") end if ~isempty(Restricoes); ApoiosData = {Restricoes.data Restricoes.user_data}; save(Arquivo, "ApoiosData","-append") end end
5339f60f7ed9a444ea1abfab1e86821092f24754
449d555969bfd7befe906877abab098c6e63a0e8
/1448/CH11/EX11.1.e/E11_1.sce
68195150d98657422881f261b8b2ecc0eb60a072
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
666
sce
E11_1.sce
clc //Initialization of variables S=[10 20 40 80 120 180 300] v=[0.32 0.58 0.9 1.22 1.42 1.58 1.74] //calculations bys=1000/S byv=1/v n=size(S) x=bys y=byv disp("From graph,") m=26.17 c=0.476 //Sx =sum(x); //Sxx =sum(x.*x); //Sy =sum(y); //Syy =sum(y.*y); //Sxy =sum(x.*y); //m =(n*Sxy-(Sx*Sy))/(n*Sxx-(Sx*Sx)); //c =(Sy/n)-(m*Sx/n); //disp(m) //disp(c) //y=zeros(7) //for i =1:n(1) // y(i)=m*bys(i)+c //end //clf(); //plot(x,y); //xtitle("","x ","y "); //legend(["measure points", "fitted curve"], 2); vmax=1/c Km=m/c //results printf("Max. velocity = %.2f mumol/L s",vmax) printf("\n Michaelis constant = %.1f mumol/L",Km)
93d6ee64777cfad107046ff6d8871919d5469680
449d555969bfd7befe906877abab098c6e63a0e8
/1574/CH3/EX3.18/M_Ex_3_18.sce
4279b01a7fdb308e1c5330bec26eca76efe0744b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
246
sce
M_Ex_3_18.sce
clc //Chapter3: Modulation //Example3.18, page no 172 //Given deltaF=1e6// max freq deviation fm=10e3//modulating freq mf=(2*deltaF)/fm// modulation coefficient BW=mf*fm// bandwidth mprintf('The approximate bandwidth is: %d MHz',BW/1e6)
4f62ac48898f867be73af51096a8f40c12458719
449d555969bfd7befe906877abab098c6e63a0e8
/67/CH6/EX6.27.b/example627b.sce
580c868503b7f48ac8fde4cdf8252bcdecc493d0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
82
sce
example627b.sce
//Example 6.27b //x(t)=(cos(3t))^3 clc; syms t; x=(cos(3*t))^3; X=laplace(x);
f69c340853016af21b55ad40e188a876d7bc0fa6
262ac6443426f24d5d9b13945d080affb0bd6d9b
/opgaves/vpw-pole-position/edit-me.sce
d834508e6b8dda8b6946d4d232fc334577f5a428
[]
no_license
slegers/Scilab
9ebd1d486f28cf66e04b1552ad6e94ea4bc98a0b
1b5dc3434def66355dafeb97c01916736a936301
refs/heads/master
2021-01-12T01:42:01.493000
2017-01-09T10:54:09
2017-01-09T10:54:09
78,420,343
0
0
null
null
null
null
UTF-8
Scilab
false
false
391
sce
edit-me.sce
function [rs] = solve(ns,ds) // Reken de startpositie uit van de wagens rs = ns a = length(ns) b = max(ns) for i = 1:a for u = 1:b if ds(1,i) == u then x = rs(1,i) rs(1,i) = rs(1,i+u) rs(1,i+u) = x end end end // Dummy toekenningen aan outputvariabelen endfunction
0b6ba3d5cec9fce4344a6538e51cdf80a34ef8ba
449d555969bfd7befe906877abab098c6e63a0e8
/1571/CH4/EX4.20/Chapter4_Example20.sce
14c57c54e3f9a8ef1a3ef0fca979a61afff51460
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
289
sce
Chapter4_Example20.sce
clc clear //INPUT k=5.64*10^-14;//kinetic energy of the hydrogen molecule ergs t=273;//temperature of the oxygen molecule in K r=8.32*10^7;//universal gas constant in ergs //CALCULATIONS N=(3/2)*(r*t/k);//avagadro number //OUTPUT mprintf('the avagadro number is %3.2f',N)
767f2a8c0d5d416b23cd0fe61004c6eab7083197
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set9/s_Engineering_Physics_K._V._Kumar_3537.zip/Engineering_Physics_K._V._Kumar_3537/CH5/EX5.16/Ex5_16.sce
4a16c64b6d407f0991d614b42ecc5b335da1c0e2
[]
no_license
hohiroki/Scilab_TBC
cb11e171e47a6cf15dad6594726c14443b23d512
98e421ab71b2e8be0c70d67cca3ecb53eeef1df6
refs/heads/master
2021-01-18T02:07:29.200000
2016-04-29T07:01:39
2016-04-29T07:01:39
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
236
sce
Ex5_16.sce
errcatch(-1,"stop");mode(2);//Example 5_16 ; ; //To calculate the distane between (110) planes a=0.38 //units in nm h=1 k=1 l=0 d=a/sqrt(h^2+k^2+l^2) printf("Distance between (110) planes d = %.2f nm",d) exit();
a63c7f89ffcb35999d2020dad0d022556bf2333d
449d555969bfd7befe906877abab098c6e63a0e8
/1244/CH10/EX10.5/Example105.sce
07f74858c716f58eb4f8ae1e4aac31b94619ff02
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,139
sce
Example105.sce
// Display mode mode(0); // Display warning for floating point exception ieee(1); clc; disp("Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 5") //Acceleration due to gravity in m/s^2 g=9.81; //Length of the tube in meters L=1.5; //Temperature of saturated vapour in Kelvin T_sv=349; //Average tube wall temperature in Kelvin T_s=325; //Average temperature of the condensate film in Kelvin Tf=(T_sv+T_s)/2; //Thermal conductivity of liquid in W/m-K k_l=0.661; //Viscosity of liquid in N s/m^2 mu_l=4.48e-4; //Dendity of liquid in kg/m^3 rho_l=980.9; //Specific heat of liquid in J/kg K c_pl=4184; //Latent heat of condensation in J/kg h_fg=2.349e6; //Density of vapor in kg/m^3 rho_v=0.25; //Modified latent heat of condensation in J/kg h_fg_dash=h_fg+(3/8)*c_pl*(T_sv-T_s); disp("Reynolds number at the lower edge") //Reynolds number Re=(4/3)*(((4*k_l*L*(T_sv-T_s)*rho_l^(2/3)*g^(1/3))/(mu_l^(5/3)*h_fg_dash))^0.75) disp("Since the Reynolds number at the lower edge of the tube is below 2000, the flow of the condensate is laminar")
ca27a4ab017038c3ca46c0f1b206a13d0ec57797
449d555969bfd7befe906877abab098c6e63a0e8
/1910/CH2/EX2.9/Chapter29.sce
1fdf9084994deffdb3da55d99c88ea5d44c1da43
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
2,067
sce
Chapter29.sce
//Display mode mode(0); // Display warning for floating point exception ieee(1); clear; clc; disp("Introduction to heat transfer by S.K.Som, Chapter 2, Example 09") //A thin walled copper tube of outside metal radius r=0.01m carries steam at temprature, T1=400K.It is inside a room where the surrounding air temprature is Tinf=300K. T1=400; Tinf=300; r=0.01; //The tube is insulated with magnesia insulation of an approximate thermal conductivity of k=0.07W/(m*K) k=0.07; //External convective Coefficient h=4W/(m^2*K) h=4; //Critical thickness(rc) is given by k/h disp("The critical thickness of insulation in metre is") rc=k/h //We use the rate of heat transfer per metre of tube length as Q=(Ti-Tinf)/((ln(r2/r1)/(2*%pi*L*k))+(1/(h*2*%pi*r2*L))) where length,L=1m L=1; //When 0.002m thick layer of insulation r1=0.01m,r2=0.01+0.002=0.012m r1=0.01;//inner radius r2=0.012;//outer radius //Let ln(r2/r1)=X X=log(r2/r1)/log(2.718); //The heat transfer rate per metre of tube length is Q disp("The heat transfer rate Q per metre of tube length in W/m is ") Q=(T1-Tinf)/(((X)/(2*%pi*L*k))+(1/(h*2*%pi*r2*L))) //When critical thickness of insulation r1=0.01m,r2=0.0175m r2=0.0175;//outer radius r1=0.01;//inner radius //Let ln(r2/r1)=X X=log(r2/r1)/log(2.718); //The heat transfer rate per metre of tube length is Q disp("The heat transfer rate per metre of tube length Q in W/m is ") Q=(T1-Tinf)/(((X)/(2*%pi*L*k))+(1/(h*2*%pi*r2*L))) //When there is a 0.05 m thick layer of insulation r1=0.01m,r2=.01+0.05=0.06m r1=0.01;//inner radius r2=0.06;//outer radius //Let ln(r2/r1)=X X=log(r2/r1)/log(2.718); //The heat transfer rate per metre of tube length is Q disp("The heat transfer rate per metre of tube length Q in W/m is ") Q=(T1-Tinf)/(((X)/(2*%pi*L*k))+(1/(h*2*%pi*r2*L))) //It is important to note that Q increases by 5.2% when the insulation thickness increases from 0.002m to critical thickness. //Addition of insulation beyond the critical thickness decreases the value of Q (The heat loss).
79c1a1daf074dc886260d3f0fa17051ed2df2ea9
449d555969bfd7befe906877abab098c6e63a0e8
/2438/CH9/EX9.5/Ex9_5.sce
8f4de96bc4c94e490d23ef1f9bf27f3b7256075e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
496
sce
Ex9_5.sce
//========================================================================= // chapter 9 example 5 clc; clear; // Variable declaration dr = 12.8 // original diameter of steel wire in mm df = 10.7; // diameter at fracture in mm // Calculations percent_red = (((%pi*dr*dr) - (%pi*df*df))/(%pi*dr*dr))*100; // Result mprintf('Percent reduction in area = %3.2f percent',percent_red); //========================================================================
2c418d1b531e5b5ee18bfda5cd9113b157b340f1
449d555969bfd7befe906877abab098c6e63a0e8
/2414/CH3/EX3.8/Ex3_8.sce
6858826b3595e66491b5255bee14f5eb1cddb6d5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
309
sce
Ex3_8.sce
clc; clear all; //chapter 3 //page no 90 //example 3.8 mprintf('(a) The RF burst frequency is 500 MHz\n'); mprintf(' (b) The pulse repetition rate is 1 MHz\n'); f0=10*10^6; //Zero crossing frequency in Hz tau=1/f0; //in second mprintf(' (c) The pulse width is %.1f micro second\n',tau*10^6);
5d3f13a6edfb6439baa87aa3bdb1ded07b4260e5
59ca8642f974b397e1747edc1015fce8b8e6c59f
/puntofijo.sce
313644e08136b4051d973102f6ace4525370b36f
[]
no_license
mcortex/scilab-code
c6a367b216e531d0ebe3cda5d4a84156b23d2085
2709299d60d9e72294b274773bdadb4126a25ba9
refs/heads/master
2020-05-26T05:49:42.441000
2019-12-06T02:06:49
2019-12-06T02:06:49
188,126,346
0
0
null
null
null
null
UTF-8
Scilab
false
false
751
sce
puntofijo.sce
function y=g(x) //y=x^4+2*x^2-x-3; //y=(-2*x^2+x+3)^(1/4); //y=2 ./(3*x)+(2/3)*x; // Si pongo 2/x oscila y no termina ojo! //y=%pi+0.5*sin(x/2); //y=3/(x^3-3) //y=(x+((3*x+3)/x^3))/2 //y=(x+1)./x^2; //y=(3*x+3)^(1/4) //y=(4*x+1)^(1/4) //y=(3+x-2*x^2)^(1/4) y=((3*x^2.+3)/x)^(1/3) endfunction //Grafico f(x) x=-10:0.1:10; // desde -5 hasta 5 yendo de 1 en 1 //plot2d(x, g(x)); //muestra grilla xgrid(3,1,7); function x=puntofijo(x0,E) i=1; Error(1)=100; x(1)=x0; while (abs(Error(i))>=E)&i<100 x(i+1) = g(x(i)); Error(i+1) = abs(x(i+1)-x(i)); i=i+1; end printf(' i \t X(i) Error aprox (i) \n'); for j=1:i; printf('%2d \t %11.7f \t %7.3f \n',j-1,x(j),Error(j)); end endfunction
d6cd551b7e00312db434549eca43fc249069f3c7
449d555969bfd7befe906877abab098c6e63a0e8
/3511/CH6/EX6.10/Ex6_10.sce
c50ed2574dac480649f0f6aaf368020398f2e871
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
673
sce
Ex6_10.sce
clc; eff_C=0.85; // Isentropic efficiency of the compressor rp=4; // Pressure ratio r=1.4; // specific heat ratio eff_pc=(((r-1)/r)*log (rp))/log (((rp^((r-1)/r)-1)/eff_C)+1); disp ("%",eff_pc*100,"Polytropic efficiency = "); disp ("variation of compressor efficiency with compression ratio is shown in window1"); xset('window',1); function eff_c=f(rc) eff_c=(rc^0.286-1)/(rc^0.326-1); endfunction rc=linspace (2,10,4); plot(rc,f); title ("variation of compressor efficiency with compression ratio","fontsize",4,"color","blue"); xlabel("compression ratio (rc)","fontsize",4,"color","blue"); ylabel ("Compressor efficiency","fontsize",4,"color","blue");
9d91aa709773672508556bb9140678391a18f641
449d555969bfd7befe906877abab098c6e63a0e8
/839/CH27/EX27.1/Example_27_1.sce
856e8ce70ce1c6fd17a123466b2e05959051e350
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
780
sce
Example_27_1.sce
//clear// clear; clc; //Example 27.1 //Given T = 60; //[F] wA = 0.30; //[MgSO4] wB = 0.70; //[H2O] //Solution //From Fig. 27.3 it is noted that the crystals are MgSO4.7H2O //and that the concentration of the mother liquid is xA = 0.245; //[anhydrous MgSO4] xB = 0.755; //[H2O] //Bases: F_in = 1000; //[kg] H2O_in = F_in*wB; //[kg] H2O_evp = 0.05*H2O_in; //[kg] M1 = 120.4; //[MgSO4 molecular weight] M2 = 246.5; //[MgSO4.7H2O molecular weight] M2_in = wA*F_in*M2/M1; //[kg] H2O_free = F_in-H2O_evp-M2_in; //[kg] ML = 100; //[kg] M2_in100 = ML*xA*M2/M1; //[kg] H2O_free100 = ML - M2_in100; //[kg] M2_ML = M2_in100/H2O_free100*H2O_free; //[kg] FC = M2_in - M2_ML; //[kg] disp(FC,'kilograms of crystals obtained per kilogram of original mixture = ')
b579feaf69a9e78d38df53a0887d0e2c8cef95b3
449d555969bfd7befe906877abab098c6e63a0e8
/43/CH5/EX5.2.a/ex5_2a.sce
fa459c101f6f1334cda543f598084985836891e0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
129
sce
ex5_2a.sce
//Ex 5.2a clc; syms T; disp('x(t)=1+cos(20%pi*t)'); w=20*%pi; f=w/(2*%pi); T=1/(2*f); disp(T,'minimun sampling interval');
5bb51dec62ee1bd3f7f60d6473829abd0234186a
449d555969bfd7befe906877abab098c6e63a0e8
/773/DEPENDENCIES/ztransfer.sce
87a5dc9c1c0a2486237df87d00d78ceb562f005d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
144
sce
ztransfer.sce
//function// function [Ztransfer]=ztransfer(sequence) z = poly(0, 'z', 'r') Ztransfer=sequence*(1/z)^[0:(length(sequence)-1)]' endfunction
406991da88ce00f3161b39320dcbe481952c2b89
449d555969bfd7befe906877abab098c6e63a0e8
/1754/CH5/EX5.9/Exa5_9.sce
859a3a7c09a903cfa8a46a9014b6d70aa3d92adc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
476
sce
Exa5_9.sce
//Exa 5.9 clc; clear; close; //Given data : A=200;//gain without feedback(unitless) Ri=2;//in kOhm Ro=12;//in kOhm Beta=0.02;//feedbak ratio(unitless) //Part (i) : Af=A/(1+A*Beta);//gain with feedback(unitless) disp(Af,"(i) Gain with Negative Feedback :"); //Part (ii) : Rif=Ri*(1+A*Beta);//in kOhm disp(Rif,"(ii) Input resistance with feedback in kOhm :"); //Part (ii) : Rof=Ro/(1+A*Beta);//in kOhm disp(Rof,"(ii) Output resistance with feedback in kOhm :");
d285afeaa0ba026f61e6dbf5c80892a662cd380e
449d555969bfd7befe906877abab098c6e63a0e8
/2870/CH8/EX8.7/Ex8_7.sce
3b2e0f1ed043a89980d2d182007ab16f353281aa
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
331
sce
Ex8_7.sce
clc;clear; //Example 8.7 //given data P1=1000; V=200; T1=300; T0=T1; P0=100; //constants used R=0.287;//in kPa m^3/kg K //calculations m1=P1*V/(R*T1); O1=R*T0*(P0/P1-1)+R*T0*log(P1/P0);// O refers to exergy X1=m1*O1/1000;//factor of 1000 for converting kJ into MJ X1=round(X1); disp(X1,'work obtained in MJ')
e7070ae68aa093f2bf1957a7c8a6aae1733d8339
41b430ed87baf53ab2b4470a5e52b2bf9c644716
/main.sce
fd67c7da808796cc3ead78e8c6b3051bc86c3a81
[]
no_license
Julestevez/Quadrotor-simulator
85db4260a2a3fcb95fcf79e72c4e53a806cb8aac
a775a00fa72fe6e9b0587522b0a09e0e7fd42042
refs/heads/master
2023-07-21T07:30:41.954000
2023-07-19T16:09:18
2023-07-19T16:09:18
251,404,243
0
0
null
null
null
null
UTF-8
Scilab
false
false
25,393
sce
main.sce
clc; clear();close(); exec("catenaria3.sce"); exec("quadrotor.sce"); exec("descenso.sce"); exec("TensVerticales.sci"); exec("quadrotor_izq.sce"); exec("quadrotor_izqmov.sce"); exec("quadrotor_dcha2.sce"); exec("seguidores.sce"); Circuito_x=linspace(0,500,600); Circuito_y=zeros(1,400); Circuito_y(1:150)=linspace(0,50,150); Circuito_y(151:300)=ones(1,150)*50; Circuito_y(300:500)=linspace(50,-100,201); Circuito_y(500:600)=linspace(-100,50,101); //Circuito_y(500:600)=linspace(-100,-50,101); //Circuito_y(500:600)=ones(1,101)*(-100); dt=0.1; dif_tiempo=0.1; angulotheta_objetivo_dch=zeros(1,100); angulotheta_objetivo_cen=zeros(1,100); angulotheta_objetivo_izq=zeros(1,100); //***PARAMÉTROS DINÁMICOS DE DRONES**** L=25; b = 1e-5; I = diag([0.5, 0.5, 1]); //L esta en centimetros k=3e-5; m=0.5; //el momento de inercia está en [N·cm·s2] Sab=240; //PARROT //L=17; b = 3.13e-5; I = diag([86, 86, 172]); //L esta en centimetros //k=7.5e-5; m=0.38; //b=[N·cm·s2] //k=[N·s2] N=600; //N= número de elementos angulo_max=0.7; //estaba 0.7 //***************************// //DRONE DERECHA: defino parametros phi_dcha=zeros(1,N); angulotheta_dcha=zeros(1,N); psi_dcha=zeros(1,N); phi_vel_dcha=zeros(1,N);angulotheta_vel_dcha=zeros(1,N); psi_vel_dcha=zeros(1,N); x_pos_dcha=zeros(1,N); y_pos_dcha=zeros(1,N); x_vel_dcha=zeros(1,N); y_vel_dcha=zeros(1,N); x_acel_dcha=zeros(1,N); y_acel_dcha=zeros(1,N); x_pos_dcha(1)=0; x_pos_dcha(2)=0; x_pos_dcha(3)=0; y_pos_dcha(1)=0; y_pos_dcha(2)=0; y_pos_dcha(3)=0; Thrust_dcha=zeros(1,N); Thrust_dcha(1)=11; Thrust_dcha(2)=11; Thrust_dcha(3)=11; z_dcha=zeros(1,N); z_vel_dcha=zeros(1,N); z_acel_dcha=zeros(1,N); //***************************// //DRONE CENTRAL: defino parametros //CONDICIONES INICIALES DE INESTABILIDAD //phi mueve en eje Y //angulotheta mueve en eje X phi=zeros(1,N); angulotheta=zeros(1,N); psi=zeros(1,N); phi_vel= zeros(1,N); angulotheta_vel= zeros(1,N); psi_vel= zeros(1,N); phi_acel= 0; angulotheta_acel= 0; psi_acel= 0; x_vel2=zeros(1,N); x_pos2=zeros(1,N); x_acel2=zeros(1,N); //x_pos2(1)=120; x_pos2(2)=120; x_pos2(3)=120; //x_pos2(1)=x_pos_dcha(1)-90; x_pos2(2)=x_pos_dcha(2)-90; x_pos2(3)=x_pos_dcha(3)-90; x_pos2(1)=x_pos_dcha(1)-60; x_pos2(2)=x_pos_dcha(2)-60; x_pos2(3)=x_pos_dcha(3)-60; y_acel2=zeros(1,N); y_vel2=zeros(1,N); y_pos=zeros(1,N); y_pos(1)=0; y_pos(2)=0; y_pos(3)=0; z_pos2=zeros(1,N); z_vel2=zeros(1,N); z_acel2=zeros(1,N); //z_pos2(1)=-64.5; z_pos2(2)=-64.5; z_pos2(3)=-64.5; Thrust=zeros(1,N); y_acel=zeros(1,N); y_vel=zeros(1,N); //**********************************// //***************************// //DRON IZQUIERDA: defino parámetros phi_izq=zeros(1,N); angulotheta_izq=zeros(1,N); psi_izq=zeros(1,N); phi_vel_izq=zeros(1,N); angulotheta_vel_izq=zeros(1,N); psi_vel_izq=zeros(1,N); z_vel_izq=zeros(1,N); z_pos_izq=zeros(1,N); z_acel_izq=zeros(1,N); phi_vel_izq=zeros(1,N); angulotheta_vel_izq=zeros(1,N); psi_vel_izq=zeros(1,N); x_acel_izq=zeros(1,N); x_vel_izq=zeros(1,N); x_pos_izq=zeros(1,N); x_vel_izq=zeros(1,N); //x_pos_izq(1)=x_pos_dcha(1)-180; x_pos_izq(2)=x_pos_dcha(2)-180; x_pos_izq(3)=x_pos_dcha(3)-180; x_pos_izq(1)=x_pos_dcha(1)-120; x_pos_izq(2)=x_pos_dcha(2)-120; x_pos_izq(3)=x_pos_dcha(3)-120; y_acel_izq=zeros(1,N); y_vel_izq=zeros(1,N); y_pos_izq=zeros(1,N); //y_pos_izq(1)=-226.27; y_pos_izq(2)=-226.27; y_pos_izq(3)=-226.27; //y_pos_izq(1)=-210; y_pos_izq(2)=-210; y_pos_izq(3)=-210;//modificar por aquí y_pos_izq(1)=0; y_pos_izq(2)=0; y_pos_izq(3)=0;//modificar por aquí //**********************************/// //4º DRONE phi4=zeros(1,N); angulotheta4=zeros(1,N); psi4=zeros(1,N); phi_vel4= zeros(1,N); angulotheta_vel4= zeros(1,N); psi_vel4= zeros(1,N); phi_acel4= 0; angulotheta_acel4= 0; psi_acel4= 0; x_vel4=zeros(1,N); x_pos4=zeros(1,N); x_acel4=zeros(1,N); //x_pos2(1)=120; x_pos2(2)=120; x_pos2(3)=120; x_pos4(1)=x_pos_dcha(1)-270; x_pos4(2)=x_pos_dcha(2)-270; x_pos4(3)=x_pos_dcha(3)-270; y_acel4=zeros(1,N); y_vel4=zeros(1,N); y_pos4=zeros(1,N); y_pos4(1)=165; y_pos4(2)=165; y_pos4(3)=165; z_pos4=zeros(1,N); z_vel4=zeros(1,N); z_acel4=zeros(1,N); //z_pos2(1)=-64.5; z_pos2(2)=-64.5; z_pos2(3)=-64.5; Thrust4=zeros(1,N); //**********************************/// //5º DRONE phi5=zeros(1,N); angulotheta5=zeros(1,N); psi5=zeros(1,N); phi_vel5= zeros(1,N); angulotheta_vel5= zeros(1,N); psi_vel5= zeros(1,N); phi_acel5= 0; angulotheta_acel5= 0; psi_acel5= 0; x_vel5=zeros(1,N); x_pos5=zeros(1,N); x_acel5=zeros(1,N); //x_pos2(1)=120; x_pos2(2)=120; x_pos2(3)=120; x_pos5(1)=x_pos_dcha(1)-360; x_pos5(2)=x_pos_dcha(1)-360; x_pos5(3)=x_pos_dcha(1)-360; y_acel5=zeros(1,N); y_vel5=zeros(1,N); y_pos5=zeros(1,N); y_pos5(1)=165; y_pos5(2)=165; y_pos5(3)=165; //por pitagoras z_pos5=zeros(1,N); z_vel5=zeros(1,N); z_acel5=zeros(1,N); //z_pos2(1)=-64.5; z_pos2(2)=-64.5; z_pos2(3)=-64.5; Thrust5=zeros(1,N); x_vel_deseado=2; //valores del controlador PID Kp=140.6659; Kd=41.36; Ki=0; w=0.01; //Kp=2.008; Kd=4.9687; Ki=0; xB1=120; xB2=120; xB3=120; xB4=120; //DRONE 3+4 vectorX1=linspace(0,xB1,150); vectorX2=linspace(0,xB2,150); vectorX3=linspace(0,xB3,150); //DRONE 3+4 vectorX4=linspace(0,xB4,150); //DRONE 3+4 yB1=0; yB2=0; yB3=0; z1=zeros(1,length(vectorX1)); z2=zeros(1,length(vectorX2)); z3=zeros(1,length(vectorX3)); matriz_y1=zeros(20,150); matriz_y2=zeros(20,150); matriz_y3=zeros(20,150); [y1,x01,y01,c1] = catenaria3(xB1, yB1, Sab, vectorX1); [y2,x02,y02,c2] = catenaria3(xB2, -yB1, Sab, vectorX2); //vectorX2=vectorX1+120; [y3,x03,y03,c3] = catenaria3(xB3, -yB1, Sab, vectorX3); //catenaria nueva [y4,x04,y04,c4] = catenaria3(xB4, yB1, Sab, vectorX4); //catenaria nueva y2=y2+y1(150); [yB2]= descenso(Sab, xB2,w); yB2=-64.54; //OBTENIDO CON WOLFRAMALPHA yB1=yB2; //yB1=-7.5; EL CONTROLADOR PID SIRVE PARA TODAS LAS ALTURAS, Y TAMBIÉN PARA TODAS LAS MASAS //yB2=-7.5; NudoBaja=yB1; vectorX2=linspace(0, xB2, 150); [y1,x01,y01,c1] = catenaria3(xB1, NudoBaja, Sab, vectorX1); [y2,x02,y02,c2] = catenaria3(xB2, -NudoBaja, Sab, vectorX2); vectorX2=vectorX1+120; y2=y2+y1(150); vectorX3=vectorX2+120; //tensiones verticales de los extremos [kg] [TensV_A, TensV_B1, TensH_A, TensH_B1]= TensVerticales(c1,y01,yB1); [TensV_B2, TensV_C, TensH_B2, TensH_C]= TensVerticales(c2,y02,yB2); Thrust(1)=TensV_B1+TensV_B2; Thrust(2)=TensV_B1+TensV_B2; Thrust(3)=TensV_B1+TensV_B2; Thrust_izq(1)=TensV_A; Thrust_izq(2)=TensV_A; Thrust_izq(3)=TensV_A; Thrust4(1)=TensV_A; Thrust4(2)=TensV_A; Thrust4(3)=TensV_A; Thrust5(1)=TensV_A; Thrust5(2)=TensV_A; Thrust5(3)=TensV_A; //********************************* //******************************** //******************************* Matriz_O=zeros(2,1); matriz_x=zeros(2,1); Kxd1=0.76; Kxp1=0.22; Kxd2=0.76; Kxp2=0.22; Kxd3=0.76; Kxp3=0.22; Kxd4=0.76; Kxp4=0.22; Kxd5=0.76; Kxp5=0.22; Kyd1=0.76; Kyp1=0.22; Kyd2=0.76; Kyp2=0.22; Kyd3=0.76; Kyp3=0.22; Kyd4=0.76; Kyp4=0.22; Kyd5=0.76; Kyp5=0.22; //Kxd=0.1; Kxp=0.1; //Kyd=0.1; Kyp=0.1; //matriz_controlador(1)=Kxp; //matriz_controlador(2)=Kxd; dist1=zeros(1,N); dist2=zeros(1,N); dist3=zeros(1,N); altura_nudo_central=zeros(1,N); valores_Kxp1=zeros(1,N); valores_Kxd1=zeros(1,N); valores_Kyp1=zeros(1,N); valores_Kyd1=zeros(1,N); valores_Kxp2=zeros(1,N); valores_Kxd2=zeros(1,N); valores_Kyp2=zeros(1,N); valores_Kyd2=zeros(1,N); valores_Kxp3=zeros(1,N); valores_Kxd3=zeros(1,N); valores_Kyp3=zeros(1,N); valores_Kyd3=zeros(1,N); valores_Kxp4=zeros(1,N); valores_Kxd4=zeros(1,N); valores_Kyp4=zeros(1,N); valores_Kyd4=zeros(1,N); valores_Kxp5=zeros(1,N); valores_Kxd5=zeros(1,N); valores_Kyp5=zeros(1,N); valores_Kyd5=zeros(1,N); x_deseado=340; y_deseado=60; x_actual=x_pos_dcha(1); y_actual=y_pos_dcha(1); x_actual2=x_pos2(1)-90; y_actual2=y_pos(1); x_actual3=x_pos_izq(1)-180; y_actual3=y_pos_izq(1); x_actual4=x_pos_dcha(1)-270; y_actual4=y_pos_dcha(1); x_actual5=y_pos_dcha(1)-360; y_actual5=y_pos_dcha(1); y_vel_deseado=2; //por poner algo yB3=114; //valores de inicialización alpha1 = 0; phi_seguidor1 = 0; alpha2 = 0; phi_seguidor2 = 0; rho1=40; rho2=40; prevLeaderAngle = 0; followerAngle = 0; //estas variables las he creado para el viento. Tienen que estar inicializadas para la primera iteración orient1=%pi/2; orient2=%pi/2; orient3=%pi/2; orient4=%pi/2; orient5=%pi/2; //theta_objetivo=0.2; j=2; beta2=%pi/2; beta3=%pi/2; while (x_vel_dcha(j) ~= x_vel_deseado) while (x_pos_dcha(j)~=x_deseado) while (y_vel_dcha(j) ~= y_vel_deseado) while (y_pos_dcha(j)~=y_deseado) j=j+1; Viento=0; //DRON LÍDER //nuevo x_deseado=Circuito_x(j); y_deseado=Circuito_y(j); //y_deseado=x_deseado-240; x_vel_deseado=(x_deseado-x_actual)/(10*dt); //x_acel_deseado=(x_deseado-x_actual)/(100*dt*dt); x_acel_deseado=(x_vel_deseado-x_vel_dcha(j-1))/(100*dt); //DIRECCIÓN Y y_vel_deseado=(y_deseado-y_actual)/(10*dt); //y_acel_deseado=(y_deseado-y_actual)/(100*dt*dt); y_acel_deseado=(y_vel_deseado-y_vel_dcha(j-1))/(100*dt); theta_objetivo(j)=0.2; //Kd1=1; Kp1=0.8; //valores muy buenos Ux_dcha(j)=x_acel_deseado + Kxd1*(x_vel_deseado - x_vel_dcha(j-1)) + Kxp1*(x_deseado-x_pos_dcha(j-1)); // // a(j)=Ux_dcha(j)*m/(Thrust_dcha(j-1)*cos(angulotheta_dcha(j-1))); así estaba antes a(j)=Ux_dcha(j)*m/(Thrust_dcha(j-1)*cos(phi_dcha(j-1))); //chapuza if (a(j))>angulo_max then a(j)=angulo_max; elseif a(j)<-angulo_max then a(j)=-angulo_max; end theta_objetivo(j)=asin(a(j)); Uy_dcha(j)=y_acel_deseado + Kyd1*(y_vel_deseado - y_vel_dcha(j-1)) + Kyp1*(y_deseado-y_pos_dcha(j-1)); a_(j)=Uy_dcha(j)*m/(Thrust_dcha(j-1)); if a_(j)>angulo_max then a_(j)=angulo_max; elseif a_(j)<-angulo_max then a_(j)=-angulo_max; end phi_objetivo(j)=-asin(a_(j)); //MUEVO EL DRON DCHA //********************************* //calculo tension variable TensV_A xB1=sqrt((x_pos_dcha(j-1)-x_pos2(j-2))^2 + (y_pos_dcha(j-1)-y_pos(j-2))^2); yB1=descenso(Sab, xB1,w); altura_nudo_central(j)=yB1; vectorX1=linspace(0,xB1,150); //PRIMER TRAMO: Catenaria o Spline según distancia if ((xB1<75)|(xB1>165)) //Cubic Spline disp("Cubic spline"); dist1(j)=xB1; else [y1,x01,y01,c1] = catenaria3(xB1, -yB1, Sab, vectorX1); dist1(j)=xB1; [TensV_A, TensV_B1, TensH_A, TensH_B1]= TensVerticales(c1,y01,yB1); //plot(sqrt((x_pos_dcha(j)-x_pos2(j-1))^2 - (y_pos_dcha(j)-y_pos(j-1))^2),'or'); //sirve para ver la distancia real de los hilos end [z_acel_dcha(j), phi_dcha(j), angulotheta_dcha(j), psi_dcha(j), phi_vel_dcha(j), angulotheta_vel_dcha(j), psi_vel_dcha(j), Thrust_dcha(j)] = quadrotor_dcha2(phi_dcha(j-1), angulotheta_dcha(j-1), psi_dcha(j-1), phi_vel_dcha(j-1),phi_vel_dcha(j-2), angulotheta_vel_dcha(j-1),angulotheta_vel_dcha(j-2), psi_vel_dcha(j-1),psi_vel_dcha(j-2), 0, TensV_A, z_vel_dcha(j-1),z_vel_dcha(j-2),z_dcha(j-1), TensH_B1, 0,theta_objetivo(j),phi_objetivo(j-1),Viento,orient1); // Thrust_dcha(j)=Thrust_dcha(j)+(sin(orient1)*sin(angulotheta_dcha(j))*cos(phi_dcha(j))-cos(orient1)*sin(phi_dcha(j)))*Viento; if abs(Thrust_dcha(j))>20 Thrust_dcha(j)=20; end x_acel_dcha(j)=(cos(psi_dcha(j))*cos(angulotheta_dcha(j)))*(TensH_B1)/m + (sin(psi_dcha(j))*sin(phi_dcha(j))+cos(psi_dcha(j))*sin(angulotheta_dcha(j))*cos(phi_dcha(j)))*Thrust_dcha(j)/m + Viento*cos(orient1); x_vel_dcha(j)=x_vel_dcha(j-1)+ x_acel_dcha(j)/2*dt; //x_vel_dcha(j)=x_vel_dcha(j-1)+(x_acel_dcha(j)-x_acel_dcha(j-1))*dt; x_pos_dcha(j)=x_pos_dcha(j-1)+ x_vel_dcha(j)/2*dt; x_actual=x_pos_dcha(j); //muevo en Y y_acel_dcha(j)=(sin(psi_dcha(j))*sin(angulotheta_dcha(j))*cos(phi_dcha(j))-cos(psi_dcha(j))*sin(phi_dcha(j)))*Thrust_dcha(j)/m - Viento*sin(orient1); y_vel_dcha(j)=y_vel_dcha(j-1)+ y_acel_dcha(j)/2*dt; y_pos_dcha(j)=y_pos_dcha(j-1)+ y_vel_dcha(j)/2*dt; y_actual=y_pos_dcha(j); //orientación drone orient1=atan((y_pos_dcha(j)-y_pos_dcha(j-1)),(x_pos_dcha(j)-x_pos_dcha(j-1))); if j>4 then P_ex= (theta_objetivo(j)-angulotheta_dcha(j))/(theta_objetivo(j))*100; if abs(P_ex)> 1 & abs(P_ex)<=3 mu=0.5*P_ex-0.5; Kxd1=abs(Kxd1 + 0.5*mu*(theta_objetivo(j)-angulotheta_dcha(j))); elseif abs(P_ex)>3 & abs(P_ex)<=5 mu=-0.5*P_ex+2.5; Kxd1=abs(Kxd1 + 0.5*mu*(theta_objetivo(j)-angulotheta_dcha(j))); elseif abs(P_ex)>4 & abs(P_ex)<=6.5 mu=(P_ex-4)/2.5; Kxp1=abs(Kxp1 + 0.5*mu*(theta_objetivo(j)-angulotheta_dcha(j))); elseif abs(P_ex)>6.5 & abs(P_ex)<=9 mu=(9-P_ex)/2.5; Kxp1=abs(Kxp1 + 0.5*mu*(theta_objetivo(j)-angulotheta_dcha(j))); end end if j>4 then P_ey=(phi_objetivo(j)-phi_dcha(j))/(phi_objetivo(j))*100; if abs(P_ey)> 1 & abs(P_ey)<=3 mu=0.5*P_ey-0.5; Kyd1=abs(Kyd1 + 0.5*mu*(phi_objetivo(j)-phi_dcha(j))); elseif abs(P_ey)>3 & abs(P_ey)<=5 mu=-0.5*P_ey+2.5; Kyd1=abs(Kyd1 + 0.5*mu*(phi_objetivo(j)-phi_dcha(j))); elseif abs(P_ey)>4 & abs(P_ey)<=6.5 mu=(P_ey-4)/2.5; Kyp1=abs(Kyp1 + 0.5*mu*(phi_objetivo(j)-phi_dcha(j))); elseif abs(P_ey)>6.5 & abs(P_ey)<=9 mu=(9-P_ey)/2.5; Kyp1=abs(Kyp1 + 0.5*mu*(phi_objetivo(j)-phi_dcha(j))); end end valores_Kxp1(j)=Kxp1; valores_Kxd1(j)=Kxd1; valores_Kyp1(j)=Kyp1; valores_Kyd1(j)=Kyd1; disp(j); //********************************* //LE SIGUE EL DRON CENTRAL // x_deseado2=x_pos_dcha(j-1)-120; //si pongo x_deseado=x_pos_dcha(j-1)-120 -> el angulo tetha me sale muy irregular // y_deseado2=y_deseado; //esto lo pongo para inicializar //nuevo x_deseado2=x_pos_dcha(j); y_deseado2=y_pos_dcha(j); //platoon if j>4 //funcion chuck domingo [x_deseado2,y_deseado2,alpha1,phi_seguidor1,rho1]=seguidores(x_pos_dcha(j),x_pos2(j-1),y_pos_dcha(j),y_pos(j-1),x_pos_dcha(j-1),y_pos_dcha(j-1),alpha1, phi_seguidor1,rho1); plot(x_deseado2,y_deseado2,'or'); end x_vel_deseado2=(x_deseado2-x_actual2)/(10*dt); x_acel_deseado2=(x_vel_deseado2-x_vel2(j-1))/(100*dt); y_vel_deseado2=(y_deseado2-y_actual2)/(10*dt); // y_acel_deseado2=(y_deseado2-y_actual2)/(100*dt*dt); y_acel_deseado2=(y_vel_deseado2-y_vel(j-1))/(100*dt); //theta_objetivo=0.2; //CALCULO TENSIONES VARIABLES POR ESTAR MOVIÉNDOSE LOS DRONES xB2=sqrt((x_pos2(j-1)-x_pos_izq(j-2))^2 + (y_pos(j-1)-y_pos_izq(j-2))^2); //yB2=abs(yB1)-abs(yB3); yB2=descenso(Sab,xB2,w); //ponia 200 vectorX2=linspace(0, xB2, 150); //SEGUNDO TRAMO: Catenaria o Spline según distancia if ((xB2<75)|(xB2>150)) //Cubic Spline dist2(j)=xB2; disp("segunda cubic"); else //catenaria [y2,x02,y02,c2] = catenaria3(xB2, yB1, Sab, vectorX2); dist2(j)=xB2; [TensV_B2, TensV_C, TensH_B2, TensH_C]= TensVerticales(c2,y02,yB2); end theta_objetivo2(j)=0.2; //Kd1=1; Kp1=0.8; //valores muy buenos Ux(j)=x_acel_deseado2 + Kxd2*(x_vel_deseado2 - x_vel2(j-1)) + Kxp2*(x_deseado2-x_pos2(j-1)); // a2(j)=Ux(j)*m/(Thrust(j-1)*cos(angulotheta(j-1))); //chapuza if a2(j)>angulo_max then a2(j)=angulo_max; elseif a2(j)<-angulo_max then a2(j)=-angulo_max; end theta_objetivo2(j)=asin(a2(j)); Uy(j)=y_acel_deseado2 + Kyd2*(y_vel_deseado2 - y_vel(j-1)) + Kyp2*(y_deseado2-y_pos(j-1)); a_2(j)=Uy(j)*m/(Thrust(j-1)); if a_2(j)>angulo_max then a_2(j)=angulo_max; elseif a_2(j)<-angulo_max then a_2(j)=-angulo_max; end phi_objetivo2(j)=-asin(a_2(j)); [z_acel2(j), phi(j), angulotheta(j), psi(j), phi_vel(j), angulotheta_vel(j), psi_vel(j), Thrust(j)] = quadrotor_dcha2(phi(j-1), angulotheta(j-1), psi(j-1), phi_vel(j-1),phi_vel(j-2), angulotheta_vel(j-1),angulotheta_vel(j-2), psi_vel(j-1),psi_vel(j-2), 0, TensV_B2+TensV_B1, z_vel2(j-1),z_vel2(j-2),z_pos2(j-1), TensH_B1, TensH_B2 ,theta_objetivo2(j),phi_objetivo2(j),Viento,orient2); // Thrust(j)=Thrust(j)+(sin(orient2)*sin(angulotheta(j))*cos(phi_dcha(j))-cos(orient2)*sin(phi_dcha(j)))*Viento; if Thrust(j)>20 Thrust(j)=20; end x_acel2(j)=(cos(psi(j))*cos(angulotheta(j)))*(TensH_B1-TensH_B2)/m + (sin(psi(j))*sin(phi(j))+cos(psi(j))*sin(angulotheta(j))*cos(phi(j)))*Thrust(j)/m + Viento*cos(orient2); x_vel2(j)=x_vel2(j-1)+ x_acel2(j)/2*dt; //x_vel_dcha(j)=x_vel_dcha(j-1)+(x_acel_dcha(j)-x_acel_dcha(j-1))*dt; x_pos2(j)=x_pos2(j-1)+ x_vel2(j)/2*dt; x_actual2=x_pos2(j); distancia1(j)=x_pos_dcha(j)-x_pos2(j); //distancia entre el dron derecho y el central. Me sirve para calcular la tensión de la catenaria. //DIRECCIÓN Y y_acel(j)=(sin(psi(j))*sin(angulotheta(j))*cos(phi(j))-cos(psi(j))*sin(phi(j)))*Thrust(j)/m - Viento*sin(orient2); y_vel(j)=y_vel(j-1)+ y_acel(j)/2*dt; y_pos(j)=y_pos(j-1)+ y_vel(j)/2*dt; y_actual2=y_pos(j); //orientación drone orient2=atan((y_pos(j)-y_pos(j-1))/(x_pos2(j)-x_pos2(j-1))); if j>4 then P_ex= (theta_objetivo2(j)-angulotheta(j))/(theta_objetivo2(j))*100; if abs(P_ex)> 1 & abs(P_ex)<=3 mu=0.5*P_ex-0.5; Kxd2=abs(Kxd1 + 0.5*mu*(theta_objetivo2(j)-angulotheta(j))); elseif abs(P_ex)>3 & abs(P_ex)<=5 mu=-0.5*P_ex+2.5; Kxd2=abs(Kxd1 + 0.5*mu*(theta_objetivo2(j)-angulotheta(j))); elseif abs(P_ex)>4 & abs(P_ex)<=6.5 mu=(P_ex-4)/2.5; Kxp2=abs(Kxp1 + 0.5*mu*(theta_objetivo2(j)-angulotheta(j))); elseif abs(P_ex)>6.5 & abs(P_ex)<=9 mu=(9-P_ex)/2.5; Kxp2=abs(Kxp1 + 0.5*mu*(theta_objetivo2(j)-angulotheta(j))); end end if j>4 then P_ey=(phi_objetivo2(j)-phi(j))/(phi_objetivo2(j))*100; if abs(P_ey)> 1 & abs(P_ey)<=3 mu=0.5*P_ey-0.5; Kyd2=abs(Kyd1 + 0.5*mu*(phi_objetivo2(j)-phi(j))); elseif abs(P_ey)>3 & abs(P_ey)<=5 mu=-0.5*P_ey+2.5; Kyd2=abs(Kyd1 + 0.5*mu*(phi_objetivo2(j)-phi(j))); elseif abs(P_ey)>4 & abs(P_ey)<=6.5 mu=(P_ey-4)/2.5; Kyp2=abs(Kyp1 + 0.5*mu*(phi_objetivo2(j)-phi(j))); elseif abs(P_ey)>6.5 & abs(P_ey)<=9 mu=(9-P_ey)/2.5; Kyp2=abs(Kyp1 + 0.5*mu*(phi_objetivo2(j)-phi(j))); end // disp(P_ex,P_ey); end valores_Kxp2(j)=Kxp2; valores_Kxd2(j)=Kxd2; valores_Kyp2(j)=Kyp2; valores_Kyd2(j)=Kyd2; //LE SIGUE EL DRON IZQUIERDO //************************************ x_deseado3=x_pos2(j); y_deseado3=y_pos(j); if j>4 [x_deseado3,y_deseado3,alpha2,phi_seguidor2,rho2]=seguidores(x_pos2(j),x_pos_izq(j-1),y_pos(j),y_pos_izq(j-1),x_pos2(j-1),y_pos(j-1),alpha2,phi_seguidor2,rho2); //calculo el ángulo que forman el drone líder y el siguiente end x_vel_deseado3=(x_deseado3-x_actual3)/(10*dt); //x_acel_deseado3=(x_deseado3-x_actual3)/(100*dt*dt); x_acel_deseado3=(x_vel_deseado3-x_vel_izq(j-1))/(100*dt); y_vel_deseado3=(y_deseado3-y_actual3)/(10*dt); //y_acel_deseado3=(y_deseado3-y_actual3)/(100*dt*dt); y_acel_deseado3=(y_vel_deseado3-y_vel_izq(j-1))/(100*dt); theta_objetivo3(j)=0.2; //Kd1=1; Kp1=0.8; //valores muy buenos Ux_izq(j)=x_acel_deseado3 + Kxd3*(x_vel_deseado3 - x_vel_izq(j-1)) + Kxp3*(x_deseado3-x_pos_izq(j-1)); a3(j)=Ux_izq(j)*m/(Thrust_izq(j-1)*cos(angulotheta(j-1))); //chapuza if a3(j)>angulo_max then a3(j)=angulo_max; elseif a3(j)<-angulo_max then a3(j)=-angulo_max; end theta_objetivo3(j)=asin(a3(j)); //DIRECCIÓN Y Uy_izq(j)=y_acel_deseado3 + Kyd3*(y_vel_deseado3 - y_vel_izq(j-1)) + Kyp3*(y_deseado3-y_pos_izq(j-1)); a_3(j)=Uy_izq(j)*m/(Thrust_izq(j-1)); if a_3(j)>angulo_max then a_3(j)=angulo_max; elseif a_3(j)<-angulo_max then a_3(j)=-angulo_max; end phi_objetivo3(j)=-asin(a_3(j)); [z_acel_izq(j), phi_izq(j), angulotheta_izq(j), psi_izq(j), phi_vel_izq(j), angulotheta_vel_izq(j), psi_vel_izq(j), Thrust_izq(j)] = quadrotor_dcha2(phi_izq(j-1), angulotheta_izq(j-1), psi_izq(j-1), phi_vel_izq(j-1),phi_vel_izq(j-2), angulotheta_vel_izq(j-1),angulotheta_vel_izq(j-2), psi_vel_izq(j-1),psi_vel_izq(j-2), 0, TensV_B2+TensV_B1, z_vel_izq(j-1),z_vel_izq(j-2),z_pos_izq(j-1), 0, TensH_B2 ,theta_objetivo3(j),phi_objetivo3(j),Viento,orient3); // Thrust_izq(j)=Thrust_izq(j)+(sin(orient3)*sin(angulotheta_izq(j))*cos(phi_izq(j))-cos(orient3)*sin(phi_izq(j)))*Viento; if Thrust_izq(j)>20 Thrust_izq(j)=20; end x_acel_izq(j)=(cos(psi_izq(j))*cos(angulotheta_izq(j)))*(-TensH_B2)/m + (sin(psi_izq(j))*sin(phi_izq(j))+cos(psi_izq(j))*sin(angulotheta_izq(j))*cos(phi_izq(j)))*Thrust_izq(j)/m + Viento*cos(orient3); x_vel_izq(j)=x_vel_izq(j-1)+ x_acel_izq(j)/2*dt; //x_vel_dcha(j)=x_vel_dcha(j-1)+(x_acel_dcha(j)-x_acel_dcha(j-1))*dt; x_pos_izq(j)=x_pos_izq(j-1)+ x_vel_izq(j)/2*dt; x_actual3=x_pos_izq(j); distancia2(j)=x_pos2(j)-x_pos_izq(j); //distancia entre el dron central y el izquierdo. Me sirve para calcular la tensión vertical de las catenarias. y_acel_izq(j)=(sin(psi_izq(j))*sin(angulotheta_izq(j))*cos(phi_izq(j))-cos(psi_izq(j))*sin(phi_izq(j)))*Thrust_izq(j)/m - Viento*sin(orient3); y_vel_izq(j)=y_vel_izq(j-1)+ y_acel_izq(j)/2*dt; y_pos_izq(j)=y_pos_izq(j-1)+ y_vel_izq(j)/2*dt; y_actual3=y_pos_izq(j); //orientación drone orient3=atan((y_pos_izq(j)-y_pos_izq(j-1))/(x_pos_izq(j)-x_pos_izq(j-1))); if j>4 then //calculo beta3 if (x_pos_izq(j)-x_pos_izq(j-1))<0 if (y_pos_izq(j)-y_pos_izq(j-1))>0 beta3=%pi - atan(abs((y_pos_izq(j)-y_pos_izq(j-1))/(x_pos_izq(j)-x_pos_izq(j-1)))); else beta3=%pi + atan(abs((y_pos_izq(j)-y_pos_izq(j-1))/(x_pos_izq(j)-x_pos_izq(j-1)))); end else if (y_pos_izq(j)-y_pos_izq(j-1))>0 beta3=atan((y_pos_izq(j)-y_pos_izq(j-1))/(x_pos_izq(j)-x_pos_izq(j-1))); else beta3=atan((y_pos_izq(j)-y_pos_izq(j-1))/(x_pos_izq(j)-x_pos_izq(j-1))); end end P_ex= (theta_objetivo3(j)-angulotheta_izq(j))/(theta_objetivo3(j))*100; if abs(P_ex)> 1 & abs(P_ex)<=3 mu=0.5*P_ex-0.5; Kxd3=abs(Kxd3 + 0.5*mu*(theta_objetivo3(j)-angulotheta_izq(j))); elseif abs(P_ex)>3 & abs(P_ex)<=5 mu=-0.5*P_ex+2.5; Kxd3=abs(Kxd3 + 0.5*mu*(theta_objetivo3(j)-angulotheta_izq(j))); elseif abs(P_ex)>4 & abs(P_ex)<=6.5 mu=(P_ex-4)/2.5; Kxp3=abs(Kxp3 + 0.5*mu*(theta_objetivo3(j)-angulotheta_izq(j))); elseif abs(P_ex)>6.5 & abs(P_ex)<=9 mu=(9-P_ex)/2.5; Kxp3=abs(Kxp3 + 0.5*mu*(theta_objetivo3(j)-angulotheta_izq(j))); end end if j>4 then P_ey=(phi_objetivo3(j)-phi_izq(j))/(phi_objetivo3(j))*100; if abs(P_ey)> 1 & abs(P_ey)<=3 mu=0.5*P_ey-0.5; Kyd3=abs(Kyd3 + 0.5*mu*(phi_objetivo3(j)-phi_izq(j))); elseif abs(P_ey)>3 & abs(P_ey)<=5 mu=-0.5*P_ey+2.5; Kyd3=abs(Kyd3 + 0.5*mu*(phi_objetivo3(j)-phi_izq(j))); elseif abs(P_ey)>4 & abs(P_ey)<=6.5 mu=(P_ey-4)/2.5; Kyp3=abs(Kyp3 + 0.5*mu*(phi_objetivo3(j)-phi_izq(j))); elseif abs(P_ey)>6.5 & abs(P_ey)<=9 mu=(9-P_ey)/2.5; Kyp3=abs(Kyp3 + 0.5*mu*(phi_objetivo3(j)-phi_izq(j))); end end valores_Kxp3(j)=Kxp3; valores_Kxd3(j)=Kxd3; valores_Kyp3(j)=Kyp3; valores_Kyd3(j)=Kyd3; end end end end
8bcafc5164fa9a0db75258d05c5ab7de462f91eb
449d555969bfd7befe906877abab098c6e63a0e8
/2093/CH3/EX3.14/exa_3_14.sce
09e5fe2c3322fd390f11dbd1dd0786ae295ef248
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
530
sce
exa_3_14.sce
// Exa 3.14 clc; clear; close; // Given data bita=100; hFE= 100; VCEsat= 0.2;// in V VBEsat= 0.8;// in V VBEactive= 0.7;// in V VBB= 5;// in V VCC= 10;// in V R_C= 3;// in kΩ R_C=R_C*10^3;// in Ω R_B= 50;// in kΩ R_B=R_B*10^3;// in Ω // Formula VCC= ICsat*R_C+VCEsat ICsat= (VCC-VCEsat)/R_C;//A disp(ICsat*10^3,"The value of IC(sat) in mA is : ") IBmin= ICsat/bita;// in A // Apply KVL to input circuit, VBB= IB*R_B+VBEsat IB= (VBB-VBEsat)/R_B;// in A disp(IB*10^6,"Actual base current in µA is : ")
924bb9625d30be28e24373a6c17a0afcbdf0240b
449d555969bfd7befe906877abab098c6e63a0e8
/2300/CH9/EX9.12.9/Ex9_9.sce
50130ecbaf56fb1a5983358f93f1c25f0c115cfd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
774
sce
Ex9_9.sce
//scilab 5.4.1 //Windows 7 operating system //chapter 9 Basic Voltage and Power Amplifiers clc clear Vorms=2//Vorms=rms output voltage in the midband region of an amplifier Pa=42//Pa=power gain in dB Pol=0.4//Pol=power output in W at the lower cut-off frequency 100Hz Ri=10^3//Ri=input resistance in ohms VOrms=2/sqrt(2)//VOrms=rms output voltage at 100Hz format("v",6) disp("V",VOrms,"1. The rms output voltage at 100Hz,which is the lower cutoff frequency,is =") Po=2*Pol//Po=output power in the midband region disp("W",Po,"2. The output power in the midband region is =") //Let Pi=input power //10*log10(Po/Pi)=Pa Pi=Po/(10^(Pa/10)) //Pi=(Vi^2)/Ri where Vi=rms input voltage Vi=sqrt(Pi*Ri) format("v",7) disp("V",Vi,"3. The rms input voltage is =")
084a8491f091ffdd50105a8a604a0a768aef3647
449d555969bfd7befe906877abab098c6e63a0e8
/3825/CH6/EX6.12/Ex6_12.sce
7e6810fcc424e4457ea8615aff7417e2adcc357d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
2,322
sce
Ex6_12.sce
clc m1=1000 //mass of wet steam in kg vg1=0.06663 vf1=0.0012163 V=(2*m1)/((1/vf1)+(1/vg1)) P1=3*10^5 mprintf("V=%fmetre-cube\n",V)//ans vary due to roundoff error\n mf=V/(2*vf1) mg=V/(2*vg1) mprintf("mass of liquid=%fkg\n",mf)//ans vary due to roundoff erorr mprintf("mass of steam=%fkg\n",mg)//ans vary due to roundoff error m2=900 //mass in kg X1=mg/m1 mprintf("X1=%f\n",X1)//ans vary due to roundoff error hg1=2802.3 hf1=1008.4 h1=(X1*hg1)+((1-X1)*hf1) mprintf("h1=%fkJ/kg\n",h1)//ans vary due to roundoff error u1=(h1*10^3)-(P1*(V/m1)) mprintf("u1=%fkJ/kg\n",u1/1000)//ans vary due to roundoff error P2=15*10^5 //pressure assumed vg2=0.1317 vf2=0.0011538 v2=V/m2 mprintf("v2=%fmetre-cube/kg\n",v2)//ans vary due to roundoff error X=(v2-vf2)/(vg2-vf2) mprintf("X=%f\n",X)//ans vary due to roundoff error hg2=2789.8 hf2=844.67 h2=(X*hg2)+((1-X)*hf2) mprintf("h2=%fkJ/kg\n",h2)//ans vary due to roundoff error u2=(h2*10^3)-(P2*v2) mprintf("u2=%fkJ/kg\n",u2/1000)//ans vary due to roundoff error he=(hg1+hg2)/2 LHS=(m1-m2)*he RHS=(m1*u1)-(m2*u2) mprintf("RHS=%fkJ\n",RHS/1000)//ans in textbook is wrong mprintf("LHS=%fkJ\n",LHS)//ans vary due to roundoff error P3=14*10^5 //pressure assumed hg3=2787.8 hf3=830.08 vg3=0.1407 vf3=0.0011489 X=(v2-vf3)/(vg3-vf3) mprintf("X=%f\n",X)//ans vary due to roundoff error h2=(X*hg3)+((1-X)*hf3) mprintf("h2=%fkJ/kg\n",h2)//ans vary due to roundoff error u2=(h2*10^3)-(P3*v2) mprintf("u2=%fkJ/kg\n",u2/1000)//ans vary due to roundoff error he=(hg1+hg3)/2 LHS=(m1-m2)*he RHS=(m1*u1)-(m2*u2) mprintf("LHS=%fkJ\n",LHS)//ans vary due to roundoff error mprintf("RHS=%fkJ\n",RHS/1000)//ans in the textbook is wrong P4=13.8*10^5 //pressure assumed hg4=2787.32 hf4=827 vg4=0.1428 vf4=0.0011478 X=(v2-vf4)/(vg4-vf4) mprintf("X=%f\n",X)//ans vary due to roundoff error h2=(X*hg4)+((1-X)*hf4) mprintf("h2=%fkJ/kg\n",h2)//ans vary due to roundoff error u2=(h2*10^3)-(P4*v2)//ans may vary due to roundoff error mprintf("u2=%fkJ/kg\n",u2/1000)//ans vary due to roundoff error he=(hg1+hg4)/2 LHS=(m1-m2)*he RHS=(m1*u1)-(m2*u2) mprintf("LHS=%fkJ\n",LHS)//ans vary due to roundoff error mprintf("RHS=%fkJ\n",RHS/1000)//ans in textbook is wrong mprintf("Final pressure=%fbar",P4*10^-5)//since LHS and RHS differ by 0.2 percent
0505bf51d1048709ece6c4ff708f08d70dc97a20
449d555969bfd7befe906877abab098c6e63a0e8
/1364/CH6/EX6.3.1/6_3_1.sce
8708d737964b30cdb636a19f9e615f8d24067234
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
207
sce
6_3_1.sce
clc //initialisation of variables p= 60 //lbf/in^2 w= 62.4 //lbf/ft^3 l= 1 //ft g= 32.2 //ft/sec^2 //CALCULATIONS i= p*144/(w*l) a= i*g //RESULTS printf ('accelaration of fluid = %.f ft/sec^2',a)
d5a0d6b61c0e17e4874831843c1f8f3a40186640
449d555969bfd7befe906877abab098c6e63a0e8
/1319/CH1/EX1.7/1_7.sce
d1ef873aa256deff19880b95c249d104cb8454a8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
377
sce
1_7.sce
// To determine circuit impedance and current in a parallel connection of a resistor and capacitor. clc; clear; R=4700; V=240; f=60; w=2*%pi*f; C=2*(10^-6); Xc=-(1/(C*w))*%i;// Reactance in polar form Ir=V/R; Ic=V/Xc; I=Ir+Ic;// Total current Z=V/I; theta=atand(imag(Z)/real(Z)); mprintf('Impedance of the circuit = %f /_ %f ohms',abs(Z),theta)
30306b91fdca304817812d453fb11bf97bd0aa85
449d555969bfd7befe906877abab098c6e63a0e8
/1802/CH5/EX5.12/Exa5_12.sce
6c7651f4126081c99f63c2b228fd06d30bfc12c0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
507
sce
Exa5_12.sce
//Exa 5.12 clc; clear; close; //Given Data : format('v',8); R=2;//in ohm X=3;//in ohm VR=10*1000;//in volt P=1000*10^3;//in watt(power delivered) cos_fir=0.8;//unitless I=P/(VR*cos_fir);//in Ampere Vs=sqrt((VR*cos_fir+I*R)^2+(VR*sqrt(1-cos_fir^2)+I*X)^2);//in volt Reg=(Vs-VR)*100/VR;//in % disp(Reg,"% Regulation : "); losses=I^2*R;//in watts Pr=P*cos_fir;//in wats(Receiving end power) Psend=Pr+losses;//in watts Eff=Pr*100/Psend;//unitless disp(Eff,"Transmission efficiency (in %) :");
f29756631dd04343469b7ad4458bb22ef62c8e22
449d555969bfd7befe906877abab098c6e63a0e8
/1553/CH11/EX11.10/11Ex10.sce
29047e6d9dce5c66efb0acbbdd43e6034627fcad
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
212
sce
11Ex10.sce
//Ex 10 clc; clear; close; n1=6;c=10; n2=4;s=6; n=double(lcm(int32([4,6]))); //Number of bananas cp=(c/n1)*n; sp=(s/n2)*n; lossPercent=(cp-sp)/cp*100; printf("The loss is %d percent",lossPercent);
315bd84043c6b6bb578897f271fdf88d1bdcca63
449d555969bfd7befe906877abab098c6e63a0e8
/2417/CH11/EX11.10/Ex11_10.sce
d43f2bc55df3940ad80affb4141ea71d67f4ab35
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
619
sce
Ex11_10.sce
//scilab 5.4.1 clear; clc; printf("\t\t\tProblem Number 11.10\n\n\n"); // Chapter 11 : Heat Transfer // Problem 11.10 (page no. 566) // Solution //A bare steel pipe ro=90; //Outside diameter //Unit:mm ri=75; //inside diameter //Unit:mm Ti=110; //Inside temperature //Unit:Celcius To=40; //Outside temperature //Unit:Celcius L=2; //Length //Unit:m deltaT=Ti-To; //Change in temperature //Unit:Celcius k=45 //Unit:W/(m*C) //k=proportionality constant //k=thermal conductivity Q=(2*%pi*k*L*deltaT)/log(ro/ri); //The heat loss from the pipe //unit:W printf("The heat loss from the pipe is %f W",Q);
f131963beb4acb31a8df91940dcc425a53e7d32c
449d555969bfd7befe906877abab098c6e63a0e8
/215/CH14/EX14.2/ex14_2.sce
9ea9a089ac4aaf7bb154f1bbb9637b132fad5b66
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
174
sce
ex14_2.sce
//Example 14.2 //Install Symbolic toolbox //Find the Laplace transform syms t s clc z=integ(2*exp(-s*t),t,3,%inf) //The second term will result in zero disp(z,'F(s)=')
4672559cd318de1dda7bd6dbafaf5a51d412460e
6e257f133dd8984b578f3c9fd3f269eabc0750be
/ScilabFromTheoryToPractice/CreatingPlots/testcolorbar.sce
26421b3e9b8f1f85f2ec6cc84518bb6028d7528a
[]
no_license
markusmorawitz77/Scilab
902ef1b9f356dd38ea2dbadc892fe50d32b44bd0
7c98963a7d80915f66a3231a2235010e879049aa
refs/heads/master
2021-01-19T23:53:52.068000
2017-04-22T12:39:21
2017-04-22T12:39:21
89,051,705
0
0
null
null
null
null
UTF-8
Scilab
false
false
189
sce
testcolorbar.sce
// define a grid x=[-1:0.1:1];y=x; // surface computation [X,Y]=meshgrid(x,y); Z=X.^2-Y.^2; //surface display clf; F=gcf();F.color_map=jetcolormap(64); surf(x,y,Z) colorbar(min(Z),max(Z))
507cbc216be31b77d0bbbb1005e48d872e729ce1
449d555969bfd7befe906877abab098c6e63a0e8
/770/CH1/EX1.9/1_9.sce
e6ffcf941ffab6a2c64323ad53c70a7130e06c58
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
872
sce
1_9.sce
clear; clc; //Example - 1.9 //Page number - 26 printf("Example - 1.9 and Page number - 26\n\n"); //Given //Antoine equation for water ln(Psat)=16.262-(3799.89/(T_sat + 226.35)) P = 2;//[atm] - Pressure P = (2*101325)/1000;//[kPa] P_sat = P;// Saturation pressure T_sat = (3799.89/(16.262-log(P_sat)))-226.35;//[C] - Saturation temperature //Thus boiling at 2 atm occurs at Tsat = 120.66 C. //From steam tables,at 2 bar,Tsat = 120.23 C and at 2.25 bar,Tsat = 124.0 C //From interpolation for T_sat = 120.66 C,P = 2.0265 bar //For P_= 2.0265 bar,T_sat, from steam table by interpolation is given by //((2.0265-2)/(2.25-2))=((Tsat-120.23)/(124.0-120.23)) T_sat_0 = (((2.0265-2)/(2.25-2))*(124.0-120.23))+120.23;//[C] printf(" Saturation temperature (Tsat) = %f C which is close to %f C as determined from Antoine equation",T_sat_0,T_sat);
64eec65cf32a7eebfe97520adb3817aac3b1e29c
449d555969bfd7befe906877abab098c6e63a0e8
/1865/CH3/EX3.5/prob_5.sce
ff690addafcf37ff3035daf60595183bc17ab7b4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
413
sce
prob_5.sce
//Problem 5 //calculate the glancing angle for third order reflection clear clc w=0.842*(10)^(-10)//wavelength in m x=8.5833//glancing angle(in degrees) for the first order reflection a=1,b=3//a=1 for 1st order b=3 for 3rd order reflection d=(a*w)/(2*sind(x))//inerplanar spacing for first order reflection y=asind((b*w)/(2*d)) printf('Glancing angle for the third order reflection = %.2f degrees',y)
01f49c3a1affd06f9c6a721b6892f3c80c207a6e
449d555969bfd7befe906877abab098c6e63a0e8
/1964/CH12/EX12.19/ex12_19.sce
2b5671f045138cd6fae8cc4fb502dac9caa856ff
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
523
sce
ex12_19.sce
//Chapter-12, Example 12.19, Page 367 //============================================================================= clc clear //INPUT DATA Rh=200;//Hall-coefficient in cubiccentimeter/C a=10;//conductivity in s/m //CALCULATIONS un=a*Rh;//electron mobility in cm^2/V-s mprintf("electron mobility is %d cm^2/V-s",un) //note:answer given is wrong in textbook //=================================END OF PROGRAM=======================================================================================================
42b02caa2fa0f20f285e05a39b9307119fb6359c
449d555969bfd7befe906877abab098c6e63a0e8
/1826/CH18/EX18.2/ex18_2.sce
069ecb4019a8a35b9b90be8d0dcb358d85fd9b69
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
188
sce
ex18_2.sce
// Example 18.2, page no-460 clear clc r=0.12*10^-9//m eps=8.854*10^-12 alf=4*%pi*eps*r^3 printf("The electronic polarisability of an isolated Se is %.4f * 10^-40 F m^2",alf*10^40)
978fc08fd78a2d130de08169029b592eba49e549
449d555969bfd7befe906877abab098c6e63a0e8
/1655/CH4/EX4.15.2/Example_4_15_2.sce
dcce8401bdeda4a113cc72a193b7bd4db7a15f51
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
830
sce
Example_4_15_2.sce
// Example 4.15.2 page 4.36 clc; clear; L=10; //fiber length in km Pin=100d-6; //input power Pout=5d-6; //output power len=12; //length of optical link interval=1; //splices after interval of 1 km l=0.5; //loss due to 1 splice attenuation=-10*log10(Pin/Pout); //computing attenuation alpha=attenuation/L; signal_attenuation=-alpha*L; //computing signal attenuation splices_loss=(len-interval)*l; //computing splices loss attenuation_loss=-len*alpha //computing attenuation loss total_attenuation=attenuation_loss+splices_loss; //computing total attenuation printf("\nSignal attenuation is %.1f dB/Km.\nOverall attenuation is %d dB for 10 km.\nTotal attenuation is %.1f dBs for 12km.",alpha,signal_attenuation,total_attenuation);
9be2406e79f85cacd71471fc71016053977b031c
449d555969bfd7befe906877abab098c6e63a0e8
/1592/CH4/EX4.4/example_4_4.sce
f69d151a050fbff4cc0ee24b99f1f34c58221643
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
442
sce
example_4_4.sce
//Scilab Code for Example 4.4 of Signals and systems by //P.Ramakrishna Rao clear; clc; //X(f)=A*T/1+j*2*pi*f*T syms f w; A=1; T=1; X=(A^2*T^2)/(1+4*%pi^2*f^2*T^2) disp('Putting f = tan @'); disp('Total Energy:'); Ex=integrate('(A^2*T)/(2*%pi)','w',-%pi/2,%pi/2) disp('Energy Contained in the Output Signal'); Ey=integrate('(A^2*T)/(2*%pi)','w',-%pi/4,%pi/4) e=Ey*100/Ex; disp(e,'Percentage Energy Contained in the Output:');
11b5df2d6822d996da50790c87c27cab3dc0033a
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set9/s_Engineering_Physics_M._R._Srinivasan_3411.zip/Engineering_Physics_M._R._Srinivasan_3411/CH7/EX7.2.u1/Ex7_2_u1.sce
b27e602778d52e4cf502b297e00a0053f5ac31c4
[]
no_license
hohiroki/Scilab_TBC
cb11e171e47a6cf15dad6594726c14443b23d512
98e421ab71b2e8be0c70d67cca3ecb53eeef1df6
refs/heads/master
2021-01-18T02:07:29.200000
2016-04-29T07:01:39
2016-04-29T07:01:39
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
509
sce
Ex7_2_u1.sce
errcatch(-1,"stop");mode(2);//Example 7_2_u1 ; ; //To find the fraction of initial intensity alpha=-2.2 //units in db/Kilo meters //When l=2 Kilo meters l=2 //units in Kilo meters //Case (a) when L=2 Kilo meters It_I0=10^(alpha*l/10) printf("The fraction of initial intensity left when L=2 It/I0=%.3f\n",It_I0) //Case (b) when L=6 Kilo meters l=6 //units in Kilo meters It_I0=10^(alpha*l/10) printf("The fraction of initial intensity left when L=6 It/I0=%.3f\n",It_I0) exit();
0385f3ebf5b2c9e8801cdef5a2c527b992e0da26
449d555969bfd7befe906877abab098c6e63a0e8
/1226/CH17/EX17.8/EX17_8.sce
b6c2ae4a00f21433391f6a0353862b4f03d1fa39
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
338
sce
EX17_8.sce
clc;funcprot(0);//EXAMPLE 17.8 // Initialisation of Variables T=175;.......................//Torque due to brake load in Nm N=500;.........................//Engine speed in rpm //calcuations BP=(2*%pi*N*T)/(60*1000);.......................//Brake power developed by engine in kW disp(BP,"Brake power developed by engine (in kW):")
c62468a313db1a6f4a2ec193bd4f74ddcd53644f
449d555969bfd7befe906877abab098c6e63a0e8
/69/CH15/EX15.16/15_16.sce
05d55968dd8429d20fdd7cf3e49818b17d5e6234
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
126
sce
15_16.sce
clear; clc; close; Vo = 1.25*(1+ (1.8*10^3/240)) + (100*10^(-6))*(1.8*10^3); disp(Vo,'Regulated Output voltage = ');
fd21533a07c14bfd6eea3d76212e1e4b63441896
449d555969bfd7befe906877abab098c6e63a0e8
/1241/CH4/EX4.5/exa4_5.sce
8edc219cbfee9a6c84e3cd63dbae7ae8fe051013
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
731
sce
exa4_5.sce
//Example 4-5// //Reduce a given expression// clc //clears the window// clear //clears all existing variables// //the given expression is as follows// disp(' Given Expression- ((AB''+ABC)''+A(B+AB''))'' ') disp('factorise') disp(' ((A(B''+BC))''+A(B+AB''))'' ') //reduce using laws 18 and 20// disp(' ((A(B''+C))''+A(B+A))'' ') disp('multiply') disp(' ((AB''+AC)''+AA+AB)'' ') //reduce using laws 7,8,11,18// disp(' ((AB''+AC)''+A)'' ') disp('demorganize') disp(' ((A''+B)(A''+C'')+A)'' ') disp('multiply') disp(' (A''A''+A''C''+A''B+BC''+A)'' ') //Reduce using laws 18,8// disp(' (A''(1+C''+B)+BC''+A)'' ') //reduce using law 18,7,11// disp(' 1'' ') disp(' 0 ') //final reduced expression is displayed//
e11de9cbe941ffdc3dfe6cb21d8cc5c6a2a02b7f
449d555969bfd7befe906877abab098c6e63a0e8
/405/CH7/EX7.11/7_11.sce
67d09cc49c5fb44ab05c4ab1cef5423d80ebc72a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,243
sce
7_11.sce
clear; clc; printf("\t\t\tExample Number 7.11 \n\n\n"); // reduction of convection in ar gap // Example 7.11 (page no.-347) // solution Tm = 300;// [K] mean temperature of air dT = 20;// [degree celsius] temperature difference R = 287;// [] universal gas constant g = 9.81;// [m/s^(2)] acceleration due to gravity p_atm = 101325;// [Pa] atmospheric pressure // consulting table 7-13(page no.-344), we find that for gases, a value Grdel_into_Pr<2000 is necessary to reduce the system to one of pure conduction. // at 300 K the properties of air are k = 0.02624;// [W/m degree celsius] Pr = 0.7;// prandtl no. mu = 1.846*10^(-5);// [Kg/m s] Beta = 1/300; // we have Grdel_into_Pr = 2000; // Part A for spacing of 1cm del = 0.01;// [m] spacing between plate p = sqrt((Grdel_into_Pr*((R*Tm)^(2))*mu^(2))/(g*Beta*dT*del^(3)*Pr));// [Pa] // or vacuum vacuum = p_atm-p;// [Pa] printf("vacuum necessary for glass spacings of 1 cm is %f Pa",vacuum); // Part B for spacing of 2cm del1 = 0.02;// [m] spacing between plate p1 = sqrt(Grdel_into_Pr*(R*Tm)^(2)*mu^(2)/(g*Beta*dT*del1^(3)*Pr));// [Pa] // or vacuum vacuum1 = p_atm-p1;// [Pa] printf("\n\n vacuum necessary for glass spacings of 2 cm is %f Pa",vacuum1);
831e6bbeb2c1c1518fb906d021985714d2de4ae0
449d555969bfd7befe906877abab098c6e63a0e8
/1670/CH10/EX10.3/10_3.sce
cc27ccb042db964194d1c8f759473a6e6d45297c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
727
sce
10_3.sce
//Example 10.3 //Taylor Method //Page no. 304 clc;clear;close; deff('y=f1(x,y)','y=1') deff('y=f2(x,y)','y=x*y') deff('y=f3(x,y)','y=x*f1(x,y)+y') deff('y=f4(x,y)','y=x*f2(x,y)+2*f1(x,y)') deff('y=f5(x,y)','y=x*f3(x,y)+3*f2(x,y)') h=0.5;y=0; x=[0.5,1] for i=1:2 if i==1 then k=y; end for j=1:5 if j==1 then k=k+(h^j)*f1((i-1)*h,y)/factorial(j) elseif j==2 k=k+(h^j)*f2((i-1)*h,y)/factorial(j) elseif j==3 k=k+(h^j)*f3((i-1)*h,y)/factorial(j) elseif j==4 k=k+(h^j)*f4((i-1)*h,y)/factorial(j) elseif j==5 k=k+(h^j)*f5((i-1)*h,y)/factorial(j) end end printf('\ny(%g) = %g\n\n',x(i),k) y=k end
e581c781fedcd7ef1332bb4a101f0b8e2bb9436e
449d555969bfd7befe906877abab098c6e63a0e8
/1802/CH2/EX2.12/Exa2_12.sce
079a148226b8203875a3ea9bfbc897e3b7797874
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
973
sce
Exa2_12.sce
//Exa 2.12 clc; clear; close; //Given Data : format('v',8); //Vcon=V;//in volt //pf=cosfi;//unitless //Rcon=R;//in ohm //Part (i) : single phase system disp("Single phase system :"); P1=5*10^6;//in watt //I1=P1/(V*cosfi);//in Ampere disp("Line current,I1="+string(P1)+"/V*cosfi"); //W1=2*I1^2*R;//in Wats(Line losses) disp("Line Losses,W1="+string(2*P1^2)+"R/(V*cosfi)^2"); //Lloss_percent=W1*P1/100;//in % eqn(1) disp("% Line Losses="+string(2*P1^2*100/P1)+"R/(V*cosfi)^2"); //Part (ii) : 3 phase 3 wire system disp("3 phase 3 wire system :"); //I2=P2/(V*cossfi*sqrt(3));//in Ampere disp("Line current,I2="+string(10^6/sqrt(3))+"P2/V*cosfi"); //W1=2*I2^2*R;//in Wats(Line losses) disp("Line Losses,W2="+string(2*(10^6/sqrt(3))^2)+"R*P2^2/(V*cosfi)^2"); //Lloss_percent=W2*P2/100;//in % eqn(2) disp("% Line Losses="+string(3*(10^6/sqrt(3))^2)+"R*P2^2/(V*cosfi)^2"); P2=2*P1;//in watts disp("3 phase load in MW :"+string(P2/10^6));
90f8831c5e51cab4becff3cf1e3690e93f02db5b
449d555969bfd7befe906877abab098c6e63a0e8
/704/CH3/EX3.33/ex3_33.sce
d8f34f1e4cd18fcd0fc8ce3bdf33248e23c7a9ee
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499000
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,296
sce
ex3_33.sce
//Caption:In a transformer find all day efficiency //Exam:3.33 clc; clear; close; KVA=15;//Rating of the transformer(in KVA) E_f=0.98;//Efficiency of the transformer P_F=1;//for unity power factor O_P=KVA*P_F;//Output of the transformer at unity power factor(in KW) I_P=O_P/E_f;//Input to the transformer(in KW) P_T=I_P-O_P;//Total losses(in KW) //At Maximum efficiency P_C=P_T/2;//copper loss for maximum efficiency(in KW) P_I=P_C;//iron losss at maximum efficiency copper loss=iron loss L_1=2;//load for 12 hours (in KW) L_2=12;//load for 6 hours (in KW) L_3=18;//load for next 6 hours (in KW) P_f1=0.5;//Power factor at L_1 load P_f2=0.8;//Power factor at L_2 load P_f3=0.9;//Power factor at L_3 load T_1=12;//Time when L_1 working(in hours) T_2=6;//Time when L_2 working(in hours) T_3=6;//Time when L_3 working(in hours) O_p1=L_1*T_1+L_2*T_2+L_3*T_3;//All day output(in KWh) P_i1=P_I*24;//Iron losses for 24 hours(in KWh) P_c1=T_1*P_C*((L_1/P_f1)/KVA)^2+T_2*P_C*((L_2/P_f2)/KVA)^2+T_3*P_C*((L_3/P_f3)/KVA)^2;//Copper loss for 24 hours(in KWh) P_t=P_c1+P_i1;//Total losses of transformer for 24 hours(in KWh) I_p1=O_p1+P_t;//All day input(in KWh) E_f1=(O_p1/I_p1)*100;//All day efficiency of transformer disp(ceil(E_f1),'All day efficiency of transformer(in %)=');
20fb914c2c0f6686f89db81172da0eb14b3cd20c
d7245f1541674d166d966fddabad26a985a0bbd9
/doc/qpsk_modulation.sce
34ec2de95b6b16ccaf639de780b8276c98980613
[]
no_license
ivan-khavantsev/radio
2c30bd6d659a629dc0ff257241cc55410d5e0d6b
16ea8061070d2f13e7f95ddf62d495d4439f5b23
refs/heads/master
2021-01-16T01:02:07.097000
2014-01-19T13:59:36
2014-01-19T13:59:36
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,007
sce
qpsk_modulation.sce
clc clear close b=[0 1 1 0 1 1 1 0] one=ones(1,100) zero=-ones(1,100) //generation of bodd signal bodd=[] for i=1:2:length(b) if(b(i)==1) bodd=[bodd one] bodd=[bodd one] else bodd=[bodd zero] bodd=[bodd zero] end end //generation of beven signal beven=[] for i=2:2:length(b) if(b(i)==1) then beven=[beven one] beven=[beven one] else beven=[beven zero] beven=[beven zero] end end beven=[zeros(1,100) beven] //resizing bodd n beven signals bodd=bodd(1:length(b)*100) beven=beven(1:length(b)*100) //sin and cos carriers f=1 t=0:0.01:(length(b)-0.01) coscar=cos(2*%pi*f*t) sincar=sin(2*%pi*f*t) //Idata & Qdata idata=beven.*coscar qdata=bodd.*sincar //Qpsk output qpsk=idata+qdata //plot 1 bodd subplot(7,1,1) a=gca() a.data_bounds=[0,-2;length(b),2] a.grid=[1 -1] t=0:0.01:(length(b)-0.01) plot(t,bodd) title('bodd','color','blue','edgecolor','red') //plot 2 beven subplot(7,1,2) a=gca() a.data_bounds=[0,-2;length(b),2] a.grid=[1 -1] t=0:0.01:(length(b)-0.01) plot(t,beven) title('beven','color','blue','edgecolor','red') //coscarrier subplot(7,1,3) a=gca() a.data_bounds=[0,-2;length(b),2] a.grid=[1 -1] t=0:0.01:(length(b)-0.01) plot(t,coscar) title('coscar','color','blue','edgecolor','red') //sincarrier subplot(7,1,4) a=gca() a.data_bounds=[0,-2;length(b),2] a.grid=[1 -1] t=0:0.01:(length(b)-0.01) plot(t,sincar) title('sincar','color','blue','edgecolor','red') //Idata subplot(7,1,5) a=gca() a.data_bounds=[0,-2;length(b),2] a.grid=[1 -1] t=0:0.01:(length(b)-0.01) plot(t,idata) title('idata','color','blue','edgecolor','red') //Qdata subplot(7,1,6) a=gca() a.data_bounds=[0,-2;length(b),2] a.grid=[1 -1] t=0:0.01:(length(b)-0.01) plot(t,qdata) title('qdata','color','blue','edgecolor','red') //QPSK subplot(7,1,7) a=gca() a.data_bounds=[0,-2;length(b),2] a.grid=[1 -1] t=0:0.01:(length(b)-0.01) plot(t,qpsk) title('qpsk','color','blue','edgecolor','red') end
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
39