blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 214 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 6 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 21 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 141k 586M ⌀ | star_events_count int64 0 30.4k | fork_events_count int64 0 9.67k | gha_license_id stringclasses 8 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 50 values | src_encoding stringclasses 23 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 1 class | length_bytes int64 5 10.4M | extension stringclasses 29 values | filename stringlengths 2 96 | content stringlengths 5 10.4M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
743b61566c44dcc00b817e19e841b6043f1122ba | 449d555969bfd7befe906877abab098c6e63a0e8 | /3751/CH7/EX7.9/Ex7_9.sce | e86f4aeb8c64ecd4bfde8534dd9a2abacdbca838 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 979 | sce | Ex7_9.sce | //Fluid Systems- By Shiv Kumar
//Chapter 7- Performance of Water Turbine
//Example 7.9
// To Determine the Performance of the Turbine Under a Head of 20 m
clc
clear
//Given:-
//Condition 1:
H1=25; //Head, m
N1=200; //Speed, rpm
Q1=9; //Discharge, m^3/s
eta_o=90/100; //Overall Efficiency
//Condition 2:
H2=20; //Head, m
//Data Required:-
rho=1000; //Density of Water, Kg/m^3
g=9.81; //Acceleration due to Gravity, m/s^2
//Calculations:-
P1=rho*Q1*g*H1*eta_o/1000; //KW
N2=N1*sqrt(H2/H1); //rpm
Q2=Q1*sqrt(H2/H1); //m^3/s
P2=P1*(H2/H1)^(3/2); //KW
//Results:-
printf("At Condition 2 (Under a Head of 20 m):\n")
printf("\tSpeed, N2=%.2f rpm\n Discharge, Q2=%.2f m^3/s\n Power Developed, P2=%.2f kW",N2,Q2,P2) //The Answer vary due to Round off Error
|
2af599dc0f7a0de670ebbfbc337e41a1430d57f9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1448/CH8/EX8.1.e/E8_1.sce | fff71ba3ffef636d67bafb5647970515b0a076d5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 219 | sce | E8_1.sce | clc
//Initialization of variables
C=0.15 //M
Ka=1.8*10^-5
//calculations
x=sqrt(C*Ka)
f=x/C
percent=f*100
//results
printf("percent of acetic acid molecules that have donated a proton = %.1f percent",percent)
|
fd29a645c4cb16fde51fb18d600ca510a4dd16c9 | 717ddeb7e700373742c617a95e25a2376565112c | /3044/CH5/EX5.22/Ex5_22.sce | 163d7e8d0c331ac90f3e96e1350a8af2d4e1faec | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 604 | sce | Ex5_22.sce | // Variable declaration
Mean1 = 4 // Mean of X1
Variance1 = 9 // Variance of X1
Mean2 = -2 // Mean of X2
Variance2 = 5 // Variance of X2
// Calculation
// (A) E(2*X1 + X2 - 5)
Mean = 2*Mean1 + Mean2 - 5 // Required Mean
// (B) Var(2*X1 + X2 - 5)
Variance = (2^2)*Variance1 + Variance2 // Required Variance
// Result
printf ( "Mean of (2*X1 + X2 - 5) : %d",Mean)
printf ( "Variance of (2*X1 + X2 - 5) : %d",Variance)
|
012663b49456588f2ad8431a44e8d2da172dbeb3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1595/CH8/EX8.2/ex8_2.sce | 17a94a25c570450421e8c5dcd4d43cf36fd45203 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | ex8_2.sce | //Digital Communication-Coding Techniques : example 8-1 : (pg 362)
dr=55;
n=(dr/6.02);
x=(1.76+(6.02*10));//signal-to-noise ratio for digitizing system
l=2^10;
y=10*log10(3*(l^2));//signal-to-quantization-noise level
printf("\nDR = 6.02dB/bit(n) \n n= %.3f",n);
printf("\nS/N = %.2f dB",x);
printf("\nL = 2^10 = %.f",l);
printf("\n(S/N)q(dB) = 10log3L^2 = %.2f dB",y); |
39a365c3c15c6358ed1bbb261c7867170e1bc598 | 449d555969bfd7befe906877abab098c6e63a0e8 | /797/CH1/EX1.3e/1_03_example.sci | bd899e57386dd9021842499a5a77bd6d80a3b69b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 122 | sci | 1_03_example.sci | //Example 1-03 Obtaining Formulas from Unit Considerations
rho = 850 //density of oil [kg/m^3]
V = 2 //volume of oil [m^3] |
19fbb00a148f2befa1daa49de9a93bc0433154d0 | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/pchip/pchip3.sce | 6e5ea7de5434c7f7a26503a1f3d515af04b15790 | [] | no_license | deecube/fosseetesting | ce66f691121021fa2f3474497397cded9d57658c | e353f1c03b0c0ef43abf44873e5e477b6adb6c7e | refs/heads/master | 2021-01-20T11:34:43.535019 | 2016-09-27T05:12:48 | 2016-09-27T05:12:48 | 59,456,386 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 230 | sce | pchip3.sce | x=[0 1 2 3 4 5];
y=[1 0 1 0 1 0];
xx=-3:.01:3;
v=pchip(x, y);
disp(v);
//output
// 0. 1. - 2. 1.
// - 2. 3. 0. 0.
// 2. - 3. 0. 1.
// - 2. 3. 0. 0.
// 0. - 1. 0. 1.
//
|
2601ddfc01cc8a1800c30d78856198a8398ee7b4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1919/CH10/EX10.5/Ex10_5.sce | b76a80d05a11f0d4286e4115d58eb46e33d08b1c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 733 | sce | Ex10_5.sce |
// Theory and Problems of Thermodynamics
// Chapter 10
// Chemical Thermodynamics
// Example 5
clear ;clc;
//Given data
T = 298 // reaction temperature in K
H_C2H4 = 52.51 // heat of formation of C2H4 in kJ
H_CO2 = -393.51 // heat of formation of CO2 in kJ
H_H2O = -241.82 // heat of formation of H2O in kJ
L_H2O = 43.97 // latent heat of vaporization of H2O at 298K in kJ
// 1) C2H4(g) + 3O2(g) => 2CO2(g) + 2H2O(g)
del_H_1 = 2*H_H2O + 2*H_CO2 - H_C2H4
// 2) H2O(g) => H2O(l)
del_H_2 = -2*(L_H2O)
// C2H4(g) + 3O2(g) => 2CO2(g) + 2H2O(l)
del_H = del_H_1 + del_H_2
// Output Results
mprintf('Heat of formation of reaction = %4.2f kJ' , del_H);
|
2c33ac1ca20f9dac6059a5b72559fcf98f04ba0f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3630/CH12/EX12.16/Ex12_16.sce | d34f867f5471aea6a8a6983953c862db974d73af | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 726 | sce | Ex12_16.sce | clc;
Vgs1=-0.5
Vgs2=-5;
Gm01=0.002;
Gm02=0.006;
Vgsoff1=-2;
Vgsoff2=-8;
Gm1=Gm01*(1-(Vgs1/Vgsoff1));
Gm2=Gm02*(1-(Vgs2/Vgsoff2));
Rs=5100;
RL=20000;
rS=(Rs*RL)/(Rs+RL);
Avmin=rS/(rS+(1/Gm1));
Avmax=rS/(rS+(1/Gm2));
disp(' ',Avmax,"Avmax=")//The answers vary due to round off error
disp(' ',Avmin,"Avmin=")//The answers vary due to round off error
Gm11=1/667;
Gm22=1/444;
Zoutmax=(Rs/Gm11)/(Rs+(1/Gm11));
Zoutmin=(Rs/Gm22)/(Rs+(1/Gm22));
disp('Ohm',Zoutmax,"Zoutmax=")//The answers vary due to round off error
disp('Ohm',Zoutmin,"Zoutmin=")//The answers vary due to round off error
R1=1000000;
R2=1000000;
Zin=(R1*R2)/(R1+R2);
disp('KOhm',Zin/1000,"Zin=")//The answers vary due to round off error
|
6ba28b24b3f70a30bffcc8098c9dc9d6aa451a33 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1026/CH6/EX6.14/Example6_14.sce | d45c6d4f388262afad40d688e10cc2d337b0c6d2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 194 | sce | Example6_14.sce | //chapter6,Example6_14,pg 136
J2=0.2*10^-6
e=1.6*10^-19
V=0.1
K=1.38*10^-23
T=300
J=J2*(e^((e*V)/(K*T)))//as e^((e*v)/KT)>>1
printf("forward bias current flow\n")
disp(J) |
1b4acff85b15a32c7e16cb7bf2455e7435ababf7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2213/CH1/EX1.1/ex_1_1.sce | fe70f8621f15745bc166cab806e491cab95169cd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 446 | sce | ex_1_1.sce | //Example 1.1 power drawn
clc;
clear;
close;
format('v',6)
r1=100;//in ohms
r2=r1;// in ohms
V=250;// ac supply in volts
rp=((1)/((1/r1)+(1/r2)));// equivalent resistance in ohms
pp=((V^2)/rp);//power drawn in watts
disp("part (a) ")
disp(pp,"power drawn when elements are in parallel,(W)=")
rs=r1+r2;// equivalent resistance in ohms
ps=((V^2)/rs);//power drawn in watts
disp("part (b) ")
disp(ps,"power drawn when elements are in series ,(W)=")
|
99d427fc7d3ab3457da0863cca6817165bfb8f65 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2939/CH8/EX8.5/Ex8_5.sce | aba7ac4051a737922b9cfa300d2feb578fefeeae | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex8_5.sce |
// Ex8_5
clc;
// Given:
ma1=3600;// counts in 3 min
mb1=2400;// counts in 5 min
mab1=9900;// counts in 6 min
// Solution:
ma=ma1/3;
mb=mb1/5;
mab=mab1/6;
t1=(ma+mb-mab)/(mab^2-ma^2-mb^2);
t2=t1*60;// in seconds
t=t2*1000000;// in microseconds
printf("The resolving time of the given system in microseconds is = %f",t)
|
8f65774007e3b0ad7da4eea29bc496c5bd671d5e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3871/CH16/EX16.10/Ex16_10.sce | a90c0ffdb99d9b79885f954f0e5704f9e67bfc7f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 412 | sce | Ex16_10.sce | //=====================================================================================
//Chapter 16 example 10
clc;clear all;
//variable declartion
wy = 3; //positive Y-axis in pattern
wx = 2; //positive X-axis in pattern
//calculations
f =wy/(wx); //frequency of vertical and horizontal signal
//result
mprintf("frequency of vertical and horizontal signal = %3.1f",f);
|
884ce16a8ee76c57178e91556641713d7c0fb889 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set6/s_Electric_Machinery_And_Transformers_B._S._Guru_And_H._R._Hiziroglu_380.zip/Electric_Machinery_And_Transformers_B._S._Guru_And_H._R._Hiziroglu_380/CH8/EX8.3/Ex8_3.sce | 2127f152e7f00928ab89b8ac3115b232b42473ff | [] | no_license | hohiroki/Scilab_TBC | cb11e171e47a6cf15dad6594726c14443b23d512 | 98e421ab71b2e8be0c70d67cca3ecb53eeef1df6 | refs/heads/master | 2021-01-18T02:07:29.200029 | 2016-04-29T07:01:39 | 2016-04-29T07:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 857 | sce | Ex8_3.sce | errcatch(-1,"stop");mode(2);//Caption:Find (a) power factor (b) power angle (c) line to line excitation voltage (d) torque developed
//Exa:8.3
;
;
V=440;//in volts
V_a=V/sqrt(3);//per phase voltage
w_m=188.5;//rad/sec
X_s=(%i)*(36/3);//per phase reactance
E_ao=560/sqrt(3);//per-phase excitation voltage
P_d=9000;//power developed (in Watts)
delta=asind(-P_d*12/(3*V_a*E_ao));
E_a=E_ao*(cosd(delta)+(%i)*sind(delta));
I_a=(V_a-E_a)/X_s;
alpha=atand(imag(I_a)/real(I_a));
disp(cosd(alpha),'(a) Power factor=');
disp(delta,'(b) power angle (in Degree)=');
E_L=(sqrt(3))*E_a*(cosd(30)+((%i)*sind(30)));
disp(abs(E_L),'(c) line to line excitation voltage (in Volts)=');
disp(atand(imag(E_L)/real(E_L)),'phase angle of line to line excitation voltage (in Degree)');
T_d=P_d/w_m;
disp(T_d,'(d) Torque developed (in Newton-meter)=');
exit();
|
ab9b7fd3c874ab444d417719578dce370b1c8227 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3825/CH6/EX6.11/Ex6_11.sce | b1391983d29c8f796161c3173973c8dcb0eae197 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 364 | sce | Ex6_11.sce | clc
Pf=30*10^5 //pressure in pascal
P0=50*10^5 //pressure in pascal
T0=300 //temperature in Kelvin
gama=1.4
Tf=T0*((Pf/P0)^((gama-1)/gama))
mprintf("Tf=%fK\n",Tf)//ans vary due to roundoff error
V=0.1 //volumme in metre-cube
M=28.97*10^-3 //molar mass of air
R=8.314
mprintf("m0-mf=%fkg",(M*V/R)*((P0/T0)-(Pf/Tf)))//ans vary due to roundoff error
|
7464ab4235703d15dfbb15adf35d625d29e6ae27 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2276/CH9/EX9.9/chapter9_ex9.sce | 6aa510cf31a7f3ed61c4a6cbd79f29b716874db8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 784 | sce | chapter9_ex9.sce | clc
clear
//input
kva=20000;//kVA rating of the transformer in VA
vp=1100;//primary voltage in volts
vs=240;//secondary voltage in volts
pi=500;//iron losses in watts
pc=600;//full load copper losses in watts
pf=0.8;//lagging power factor
//calculations
out=kva*pf;//full load output in watts
fll=pi+pc;//full load losses in watts
n=out/(out+fll);//efficiency in perunits
hfl=kva/2;//unity power factor
cp=pc*(1/(2*2));//copper loss in watts
n1=(hfl/1000)/((hfl/1000)+0.5+(cp/1000));//efficiency in per units
kvat=(kva*((pi/pc)^0.5))/1000;// total kVA
//output
mprintf('the efficiencies on full load,at 0.8 lag and 0.5*full load,at unity power factor are %3.3f p.u. and %3.2f p.u. respectively.\n the loading for maximum efficiency is %3.2f kVA',n,n1,kvat)
|
1b51357fd6facb0568d060550b3a78249f20fe2a | 449d555969bfd7befe906877abab098c6e63a0e8 | /858/CH2/EX2.32/example_32.sce | 459b9b9a4bbf7ffbb6ba612e7331ce37828c8d4e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 832 | sce | example_32.sce | clc
clear
printf("example 2.32 page number 84\n\n")
//to find the properties of humid air
p = 4.24 //in kPa
H_rel = 0.8;
p_partial = p*H_rel;
molal_H = p_partial/(100-p_partial);
printf("initial molal humidity = %f\n\n",molal_H)
//part 2
P = 200 //in kPa
p_partial = 1.70 //in kPa
final_H = p_partial/(P-p_partial);
printf("final molal humidity = %f\n\n",final_H)
//part 3
p_dryair = 100 - 3.39;
v = 100*(p_dryair/101.3)*(273/303);
moles_dryair = v/22.4;
vapor_initial = molal_H*moles_dryair;
vapor_final = final_H*moles_dryair;
water_condensed = (vapor_initial-vapor_final)*18;
printf("amount of water condensed = %f \n\n",water_condensed)
//part 4
total_air = moles_dryair+vapor_final;
final_v = 22.4*(101.3/200)*(288/273)*total_air;
printf("final volume of wety air = %f \n\n",final_v)
|
3e511e9801ea7d16021cf2857bb447a5c1f4f1b5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1850/CH8/EX8.14/exa_8_14.sce | e1ecb2471e8c36dc66b3d5b3a1238ba3af831ba6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 886 | sce | exa_8_14.sce | // Exa 8.14
clc;
clear;
close;
//given data
f=75;// in MHz
f=f*10^6;// in Hz
// For an 8-bit converter reference voltage
V_REF= 100;// in volt
// For setting D7=1
Vo_7= V_REF*2^7/2^8;//in volt
// For setting D6=1
Vo_6= V_REF*2^6/2^8;//in volt
// For setting D7=1 and D6=1
Vo_76= Vo_7+Vo_6;//in volt
// For setting D5=1 D6=1 and D7=1
Vo_5= V_REF*2^5/2^8+Vo_7+Vo_6;//in volt
disp(Vo_7,"For setting D7=1 output voltage in volt is :")
disp(Vo_6,"For setting D6=1 output voltage in volt is :")
disp(Vo_76,"For setting D7=1 and D6=1 output voltage in volt is :")
disp(Vo_5,"For setting D5=1, D6=1 and D7=1 output voltage in volt is :")
disp("All other digits will be set to zero or 1. Output will be accordingly indicated as a resul of successive approximation. The converted 8-bit digital form will be 1110010")
T=1/f;// in sec
disp(T*10^9,"Conversion time in ns")
|
4d1747250babb45d313d83793e1341c37ff40f2a | bdbafbcce90eb6b9aa54964c32057b8117961b58 | /OracleDG.sci | fa8df7dc41de10255480c6d98225ed487e94df2c | [] | no_license | Rachine/Tp_Optim | 617191c586b46d8d44fc1bd24b24e3d3b760c851 | 68cabcb55cd4f343796d6f0f3823e4aa03edbe25 | refs/heads/master | 2016-09-05T09:23:21.650931 | 2015-05-10T20:37:58 | 2015-05-10T20:37:58 | 34,060,544 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 741 | sci | OracleDG.sci | function[qdiese]= get_qdiese (lambda)
qdiese = abs((r.^(-1)).*(Ar'*pr+Ad'*lambda));
qdiese=qdiese.^(1/2);
qdiese = qdiese.*(-sign((r.^(-1)).*abs(Ar'*pr+Ad'*lambda)));
endfunction
function [z] = lulu(lambda)
qdiese = get_qdiese(lambda);
Membre2=abs(qdiese).*qdiese.*r;
Membre3=pr;
Membre4=Ar*qdiese;
Membre5=Ad*qdiese-fd;
z = (qdiese'*Membre2)/3 + Membre3'*Membre4+lambda'*Membre5;
z=-z;
endfunction
function [y] = deriv(lambda)
qdiese=get_qdiese(lambda);
y=Ad*qdiese-fd;
y=-y;
endfunction
function [F, G, ind] = OracleDG (qc , ind)
select ind,
case 2 then [F,G]=(lulu(qc),0),
case 3 then [F,G]=(0,deriv(qc)),
case 4 then [F,G]=(lulu(qc),deriv(qc)),
end
endfunction
|
7540e39704de73f34c2c6a155d2883358db1418a | 717ddeb7e700373742c617a95e25a2376565112c | /1379/CH2/EX2.1.4/example2_4.sce | 25d9c8379683c515c360c2b738ce565b6bdbff58 | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 606 | sce | example2_4.sce |
//exapple 2.4
clc; funcprot(0);
// Initialization of Variable
M=28.05/1000;
gamm=1.23;
R=8.314;
atm=101.3*1000;
P1=3*atm;
//calculation
//part1
P2=P1*(2/(gamm+1))^(gamm/(gamm-1));
disp(P2/1000,"pressure at nozzle throat (kPa):")
//part2
temp=273+50;
nu1=R*temp/P1/M;
G=18;//mass flow rate
nu2=nu1*(P2/P1)^(-1/gamm);
A=G^2*nu2^2*(gamm-1)/(2*gamm*P1*nu1*(1-(P2/P1)^((gamm-1)/gamm)));
d=sqrt(4*sqrt(A)/pi);
disp(d*100,"diameter required at nozzle throat in (cm)")
//part3
vel=sqrt(2*gamm*P1*nu1/(gamm-1)*(1-(P2/P1)^((gamm-1)/gamm)));
disp(vel,"sonic velocity at throat in(m/s):");
|
434fa0ad7debade042307864cff1cf3405961b0f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3523/CH4/EX4.10.1/Ex4_1.sce | dbb15ecd17e35b916be99d40f301144a0614cc62 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex4_1.sce | //Example 1// Ch 4
clc;
clear;
close;
// given data
I1 = 2.7*10^-8;//steady state current in Amperes
V = 10; //voltage in kV
d1 = 0.005; //spacing between the plane electrodes in meters
d2 = 0.01; // spacing incresed in meters
I2 = 2.7*10^-7;//increased steady state current in amperes
e = 1.6*10^-19;
x = 1/(d2-d1);
y = log(I2/I1);
alpha = x*y;//ionization coefficient
printf("ionization coefficient %f m^-1",alpha)
I0 = I1*exp(-alpha*d1);//photoelctric current
printf("photoelectric current %e A",I0)
n0 = I0/e;
printf("no of electrons emitted from cathode %e electrons/s",n0)
|
39e1c2dd93b650d4d8e7b5dc617c54218190bddb | e82d1909ffc4f200b5f6d16cffb9868f3b695f2a | /Lista 8/Lista Barão/Questao4.sci | 75c898f2afb119f0d4f9b12c1c303820dbaf97c0 | [] | no_license | AugustoCam95/Computational-Linear-Algebra | eb14307dd3b45ccc79617efe74d1faca639c36c5 | 99b1a1f9499fbc4343bd5c878444e9e281952774 | refs/heads/master | 2020-03-30T22:26:23.790763 | 2018-10-05T03:34:06 | 2018-10-05T03:34:06 | 151,666,289 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 568 | sci | Questao4.sci | function Questao4()
//Cria a matrix 7x7
A=rand(7,7);
//gera números randômicos e adiciona na matrix
// for i = 1 : 7
// for j = i : 7
// A(i,j)=rand()
// A(j,i)=A(i,j)
// end
// end
// para ser simetrica
A = A *A';
//x recebe os autovalores do método de Rutishauser
x = Rutis(A,0.000001)
//y recebe os autovalores do método de Francis
y = Francis(A,0.0001)
// mostra os autovalores obtidos
disp(x)
disp(y)
endfunction
|
9ddc7df4c23be1d340d74d79e268b0da6b0fe594 | 86b07272c2e128fdec8e3fb2a793cd56b3f8876d | /test/scenarios/post-base-1.sce | a8e1e45285704431b0ef907c9ef4c6af185ff643 | [
"MIT"
] | permissive | jimjag/ls-qpack | f582623269c38006f997ab5ac1bd597d960dcc19 | 79c136923681d7187feade455225543335525c3f | refs/heads/master | 2023-06-01T08:21:41.291968 | 2023-05-26T12:37:58 | 2023-05-26T12:37:58 | 211,070,438 | 0 | 0 | MIT | 2019-09-26T11:13:34 | 2019-09-26T11:13:34 | null | UTF-8 | Scilab | false | false | 111 | sce | post-base-1.sce | TABLE_SIZE=256
AGGRESSIVE=1
RISKED_STREAMS=1
QIF=$(cat<<'EOQ'
dude nude
dude nude
dude where is my car?
EOQ
)
|
f9da50b0c1e086cd64260666be93a6a88f0672f3 | 717ddeb7e700373742c617a95e25a2376565112c | /68/CH5/EX5.10/ex10.sce | 0adcdcaedafc0c37eda356b6cd25046579e03509 | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 667 | sce | ex10.sce | // Exampe 5.10 : Analyse the circuit to find node voltages and branch currents
V_CC=15; // (V)
R_C=5000; // (ohm)
R_B1=100*10^3; // (ohm)
R_B2=50*10^3; // (ohm)
R_E=3000; // (ohm)
V_BE=0.7; // (V)
B=100; // beta value
V_BB=V_CC*R_B2/(R_B1+R_B2);
disp(V_BB,"V_BB (V)")
R_BB=R_B1*R_B2/(R_B1+R_B2);
disp(R_BB,"R_BB (ohm)")
I_B=I_E/(B+1);
disp(I_B,"Base current (A)")
I_E=(V_BB-V_BE)/(R_E +(R_BB/(B+1)))
disp(I_E,"Emiter current (A)")
I_B=I_E/(B+1)
disp(I_B,"Base current (A)")
V_B=V_BE+I_E*R_E;
disp(V_B,"Base voltage (V)")
a=B/(B+1); // alpha value
I_C=a*I_E
disp(I_C,"Collector current (A)")
V_C=V_CC-I_C*R_C;
disp(V_C,"Collector voltage (V))") |
14f066dad364cdff4def56cf381a2ba2229fe8d5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1301/CH10/EX10.7/ex10_7.sce | b610ff7d5465944e2b187177f52e1568ae51f05c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 109 | sce | ex10_7.sce | clc;
tk=6000; //temperature in Kelvin
disp(tk-273,"Temperature in celcius = "); //displaying result |
8c1868a28a83d0d2f23e1bb7eb1b02b4f76acf55 | 717ddeb7e700373742c617a95e25a2376565112c | /1766/CH5/EX5.30/EX5_30.sce | 3da12d1a6778151df64f3a656fe1178738ecec9d | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 897 | sce | EX5_30.sce | clc;funcprot(0);//Example 5.30
//Initilisation of Variables
m=21.6;.........//Mass flow rate of water in m/s
Tmi=475;.....//Inlet Temperature of liquid metal in K
D=0.1;...//Diameter of tube in m
Tw=515;...........//Temperature of wall in K
//Properties of metal
rho=7.7*10^3;......//Density in kg/m^3
mu=8*10^-8;......//Viscocity in m^2/s
K=12;........//Thermal conductivity in W/mK
Cp=130;.....//Specific heat capacity in J/kg degrees celcius
Pr=0.011;........//Prandtl number
//calculation
A=%pi*(D^2/4);.......//Area of tube in m^2
Re=(((m*1000)/3600)/(rho*A))*(D/mu);..........//Reynolds number
Nu=0.625*(Re*Pr)^0.4;.......//Nusselt number for fully developed condition
h=Nu*K/D;.........//Heat transfer coefficient when liquid metal flows at rate of 21.6 tones/hr in W/m^2 K
disp(h,"Heat transfer coefficient when liquid metal flows at rate of 21.6 tones/hr in W/m^2 K:")
|
b55049646b95b895a91c0306f1a2b52ab7f80a62 | de14a6897d4397228a52bacb8905b8807370ef4b | /tapis_sierpinski_recursif.sce | c0531d90a94e71eb4acd304480db99faa9679e43 | [] | no_license | JustineMarlow/MT94-RapportLaTeX | 20b670965a47ce85beecc15865d14ec9cc4d305b | 3dfaa665b5691621410f8eafdf76ecaf081b92d1 | refs/heads/master | 2021-09-06T17:54:58.174773 | 2018-02-09T09:57:52 | 2018-02-09T09:57:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,299 | sce | tapis_sierpinski_recursif.sce | function tapis(N,a,b,c,d)
if N<1 then
plot([a(1),b(1)],[a(2),b(2)]); plot([b(1),c(1)],[b(2),c(2)]);
plot([c(1),d(1)],[c(2),d(2)]); plot([d(1),a(1)],[d(2),a(2)]);
else
//calcul des nouveaux sommets
e=[a(1),a(2)+2*(d(2)-a(2))/3];
f=[a(1),a(2)+(d(2)-a(2))/3];
g=[a(1)+(b(1)-a(1))/3,a(2)];
h=[a(1)+2*(b(1)-a(1))/3,a(2)];
i=[b(1),a(2)+(c(2)-b(2))/3];
j=[b(1),a(2)+2*(c(2)-b(2))/3];
k=[a(1)+2*(b(1)-a(1))/3,c(2)];
l=[a(1)+(b(1)-a(1))/3,c(2)];
m=[a(1)+(b(1)-a(1))/3,a(2)+2*(d(2)-a(2))/3];
n=[a(1)+(b(1)-a(1))/3,a(2)+(d(2)-a(2))/3];
o=[a(1)+2*(b(1)-a(1))/3,a(2)+(c(2)-b(2))/3];
p=[a(1)+2*(b(1)-a(1))/3,a(2)+2*(c(2)-b(2))/3];
//appels de tapis pour chacun des carres retenus
tapisSierpinski(N-1,a,g,n,f);
tapisSierpinski(N-1,f,n,m,e);
tapisSierpinski(N-1,e,m,l,d);
tapisSierpinski(N-1,l,k,p,m);
tapisSierpinski(N-1,p,j,c,k);
tapisSierpinski(N-1,j,p,o,i);
tapisSierpinski(N-1,b,h,o,i);
tapisSierpinski(N-1,n,o,h,g);
end
endfunction
A=[0,0]; B=[1,0]; C=[1,1]; D=[0,1]; //points du premier carre
N=input("Entrez n, le nombre de niveaux a dessiner : ");
tapis(N,A,B,C,D)
clf isoview(0,1,0,1); //affichage
|
697bc1b2f8b8c2be8b3acc53141d9bc698047ab2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /61/CH4/EX4.1/ex4_1.sce | a0c021c5db39ccc1afba2a26203f9c78327912d3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 190 | sce | ex4_1.sce | //ex4.1
I_C=3.65*10^-3; //collector current in amperes
I_B=50*10^-6; //base current in amperes
B_DC=I_C/I_B;
I_E=I_B+I_C;
disp(B_DC,'B_DC')
disp(I_E,'emitter current in amperes') |
6073530fe99b2332f797986840a84f867cfb0011 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/names.man.tst | 97c60ec7b5c136d8d78ab6dcf7f9d5018f8cb54f | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 117 | tst | names.man.tst | clear;lines(0);
//Valid names
%eps
A1=123
#Color=8
My_Special_Color_Table=rand(10,3)
//Non valid names
//1A , b%, .C
|
48ec9796396f8f0ece6c465a27e6a19ada6cbf5b | a323675b27f62adaa7c5e85c9a5b5315ef80adbc | /scilab/TD1.sce | 9c09609d2bb6efcff9b34c4716ab7aebd27a624b | [] | no_license | henrirespaudbouny/poo-school-stuff | 1ab4dff17c366c0989a07af660a53d94a49c772b | 49a920764a18daf6f94c16f45d92e04399150a72 | refs/heads/master | 2021-01-17T17:51:08.755301 | 2016-10-20T21:52:23 | 2016-10-20T21:52:23 | 70,629,349 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,126 | sce | TD1.sce | // TF de x
function X1 = tf(f,q)
f0= 30
X1 = 1/2*((q*(q^2+4*(%pi^2)*(f-f0).^2).^(-1))+(q*(q^2+4*(%pi^2)*(f+f0).^2).^(-1)))
endfunction
//q = 5
f = [-100:1:100]
//x = tf(f,q)
//subplot (211)
//plot(f,x)
q = 15
//x2 = tf(f,q)
//subplot (212)
//plot(f,x2)
// Q3
function X2 = SE(f,q,Te)
somme = 0
for n = -100:100
somme = somme + tf((f-n*Te.^(-1)),q)
end
X2 = 1*(Te.^(-1)) * somme
endfunction
//Te = 1*120.^(-1)
//f = [-1*(2*Te).^(-1):1:1*(2*Te).^(-1)]
//x = SE(f,q,Te)
//subplot (311)
//plot(f,x)
//
//Te = 1*70.^(-1)
//f = [-1*(2*Te).^(-1):1:1*(2*Te).^(-1)]
//x = SE(f,q,Te)
//subplot (312)
//plot(f,x)
//
//Te = 1*30.^(-1)
//f = [-1*(2*Te).^(-1):1:1*(2*Te).^(-1)]
//x = SE(f,q,Te)
//subplot (313)
//plot(f,x)
// Q4
Te = 1*70.^(-1)
f = [-1*(Te).^(-1):1:1*(Te).^(-1)]
// Filtre passe-bas
function X3 = PB()
passeBas = tf(f,q)
passeBas = find(passeBas<35)
passeBas = find(passeBas>-35)
X3 = passeBas
endfunction
//x ˆ (f )
x = tf(f,q)
subplot (211)
plot(f,x)
//T e X ˆ e (f ).
x = (1*70.^(-1))*SE(f,q,Te)
subplot (211)
plot(f,x)
x = PB()
subplot (212)
plot(f,x)
|
c1379df3c684fde2e52b1cc827e582156246ea07 | b6cf003e2be5ca13661ebe6ba87ee4bafd46f80e | /valeursManquantes.sce | e31a3d3da1586d671078bb4463695dbb477cb005 | [] | no_license | labatvalen/CompressiveSensing | ea11ccf07078d809bf50f0bc53d9c3c47b7f8f59 | e06a160bae04bdc8ee2778238f0f1bce74a41f7e | refs/heads/main | 2023-04-05T00:37:31.774162 | 2021-04-15T09:48:48 | 2021-04-15T09:48:48 | 358,204,909 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,552 | sce | valeursManquantes.sce | /*-------------------------------------------------
Auteur : Manon Cassagne & Valentin Labat
Vous trouverez ci-dessous les fonctions de reconstruction du vecteur avec valeurs manquantes
---------------------------------------------------*/
////////////////// Partie sur zr/////////////////
// On importe les fichiers scilab nécessaires
exec("COSAMP.sce")
exec("Procede.sce")
exec("irls.sce")
// On lit les valeurs dans les csv associés
z = read_csv("Donnees/z.csv",";")
// On enlève la première ligne, qui est la légende des colonnes
z = z(2:86,:)
z = strtod(z,",") // On remplace les valeurs de X qui sont considérés comme des chaines de caractère par des nombres, et on définit le séparateur "," qui est le séparateur du fichier csv
D = read_csv('Resultats/Dico.csv',";")
D = strtod(D,".")
[lignesD,colonnesD] = size(D)
[lignes, colonnes] = size(z)
// On calcules les phis nécessaires
phi2 = phi2(lignes,lignesD)
phi4 = phi4(lignes,lignesD)
// Calcul des dictionnaires
Dico2 = phi2 * D
Dico4 = phi4 * D
signal = z
eps = 1e-4
parcimonie = 108
kmax = 150
// Calcul des alphas par cosamp et irls
[alpha_COSAMP2, iterations_COSAMP2, residuel_COSAMP2] = COSAMP(signal, Dico2, parcimonie, eps, kmax)
[alpha_COSAMP4, iterations_COSAMP4, residuel_COSAMP4] = COSAMP(signal, Dico4, parcimonie, eps, kmax)
// Reconstruction des vecteurs
zr2cosamp = Dico2 * alpha_COSAMP2
zr4cosamp = Dico4 * alpha_COSAMP4
// Ecriture dans csv
csvWrite(zr2cosamp, "Resultats/z/zr2cosamp.csv", ";")
csvWrite(zr4cosamp, "Resultats/z/zr4cosamp.csv", ";")
|
5ec54d5a2cb7e1200f05d65bafb28bd14c393a00 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH3/EX3.32/Ex3_32.sce | 7728d8c63a02e531e5765e890cec88805bfb5166 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 931 | sce | Ex3_32.sce | //Example 3_32
clc;
clear;
close;
format('v',6);
//given data :
V=110;//V
f=50;//Hz
ZA=2;//ohm
ZB=3+%i*4;//ohm
ZC=2-%i*2;//ohm
ZAB=ZA*ZB/(ZA+ZB);//ohm
ZP=ZAB*ZC/(ZAB+ZC);//ohm
ZD=1+%i*1;//ohm
z=ZP+ZD;//ohm
zmag=abs(z);//A
zang=atand(imag(z)/real(z));//degree
disp(zang,zmag,"(a) Total impedence, magnitude(ohm) & Angle(degree) are");
I=V/abs(z);//A
format('v',5);
disp(I,"(b) Current taken by circuit(A)");
format('v',7);
ID=I;//A
RD=real(ZD);//ohm
PD=ID^2*RD;///W
disp(PD,"Power Consumed by branch D(W)");
//VPQ=I*ZP;
IA=I*abs(ZP)/abs(ZA);//A
RA=2;//ohm
PA=IA^2*RA;//W
disp(PA,"Power Consumed by branch A(W)");
IB=I*abs(ZP)/abs(ZB);//A
RB=3;//ohm
PB=IB^2*RB;//W
disp(PB,"Power Consumed by branch B(W)");
IC=I*abs(ZP)/abs(ZC);//A
RC=2;//ohm
PC=IC^2*RC;//W
disp(PC,"Power Consumed by branch C(W)");
P=PA+PB+PC+PD;//W
disp(P,"Total Power Consumed(W)");
//Answer is not accurate in the book.
|
a3e1ac22be129e3f7b7b90eda1c928d36006e5a5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1541/CH1/EX1.26/Chapter1_Example26.sce | e3656089e24cecc14765ad034c12285338d7af91 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 866 | sce | Chapter1_Example26.sce | //Chapter-1, Example 1.21, Page 1.49
//=============================================================================
clc
clear
//INPUT DATA
V=220;//Terminal voltage in V
ILo=5;//No load current in A
Ra=0.3;//Armature resistance in ohm
Rsh=220;//Field resistance in ohm
IL=50;//Load current in A
//CALCULATIONS
Lo=(ILo*V);//No load losses in W
Ish=(V/Rsh);//Shunt current in A
Iao=(ILo-Ish);//No load armature current in A
Lco=((Iao^2*Ra)+(Ish^2*Rsh));//No load copper losses in W
Ifl=(Lo-Lco);//Iron and friction losses in W
Ia=(IL-Ish);//Armature current in A
Vl=(Ia^2*Ra);//Variable losses in W
Tl=(Vl+Lco+Ifl);//Total losses in W
P=(V*IL);//Input power in W
n=((P-Tl)/P)*100;//Efficiency
//OUTPUT
mprintf('Efficiency of the motor is %3.1f percent',n)
//=================================END OF PROGRAM==============================
|
056f444c77ef70bd12434eba2dcecb677ad81946 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.4.1/macros/percent/%hm_x_hm.sci | e43b68ea0744bbe0ecfb434ad1d259414fb2a489 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 187 | sci | %hm_x_hm.sci | function M2=%hm_x_hm(M1,M2)
// Copyright INRIA
if and(M1('dims')==M2('dims')) then
M2('entries')=M1('entries').*M2('entries')
else
error('inconsistent element-wise operation')
end
|
e83fde4f4d5b07ff01697ba560017000f25dbb6e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2708/CH3/EX3.4/ex_3_4.sce | 31c08fd3ae161cbeeef7d523000db8319177bf56 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 409 | sce | ex_3_4.sce | //Example 3.4 // Thickness of half wave plate
clc;
//given data :
Uo=1.54;//Refractive index for Ordinary light
r=1.007;//ratio of velocity of ordinary to extraordinary
Ue=r*Uo;//refractive index for extraordinary light
w=5893D-10;// wavelength of light used in m
t=w/(2*(Uo-Ue));// thickness of half wave plate in m
t=abs(t);// thickness always positive
disp(t,"Thickness of half wave plate in m")
|
e590efc6385837106d910f80a7866d4e76d1e452 | 449d555969bfd7befe906877abab098c6e63a0e8 | /23/CH11/EX11.7/Example_11_7.sce | bdc41f4dd36de6f93366cddac684d790a8e31e31 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 740 | sce | Example_11_7.sce | clear;
clc;
//To find Approx Value
function[A]=approx(V,n)
A=round(V*10^n)/10^n;//V-Value n-To what place
funcprot(0)
endfunction
//Example 11.7
//Caption : Program to Find the Fugacity Coefficient for the mixture
T=200;//[K]
P=30;//[bar]
R=83.14;
x1=0.4;//[N2]
x2=1-x1;//[CH4]
B11=-35.2;//[cm^3/mol]
B22=-105;//[cm^3/mol]
B12=-59.8;//[cm^3/mol]
delta_12=approx((2*B12)-B11-B22,1);
si_1=approx(exp((P/(R*T))*(B11+(x2^2*delta_12))),4);
si_2=approx(exp((P/(R*T))*(B22+(x1^2*delta_12))),4);
B=approx((x1^2*B11)+(2*x1*x2*B12)+(x2^2*B22),2);
Z=approx(1+((B*P)/(R*T)),2);
disp(si_1,si_2,'Fugacity Coefficients are ')
disp(B,'Second Viral coefficient is ')
disp(Z,'Compressibility Factor is ')
//End |
b98ceb66f9f808f5e8c445c4aea148d0515ce9ff | 449d555969bfd7befe906877abab098c6e63a0e8 | /1928/CH2/EX2.22.2/ex2_22_2.sce | 31e847f420ebc0a51580cdd32953a29c067a8717 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 409 | sce | ex2_22_2.sce | //Chapter-2,Example2_22_2,pg 2-50
T=300 //temp in kelvin
K=8.62*10^-5 //Boltzman constant in eV
m=0.012 //energy level(Ef-E)
a=(m/(K*T))
//probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))
p=1/(1+exp(a))
p1=1-p
printf("probability of an energy level not being occupied by an electron=")
disp(p1)
|
88b8f9d33ad97e5940b94451bca285cdd5a14de7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2300/CH6/EX6.11.5/Ex6_5.sce | 38ad3fee12b4874db987657c8f0ca9073103a0f1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,592 | sce | Ex6_5.sce | //scilab 5.4.1
//Windows 7 operating system
//chapter 6 Diode Circuits
clc
clear
//For a full wave rectifier
//L-type LC filter
f=50//f=line frequency in Hz
w=2*%pi*f
Vdc=10//Vdc=dc output voltage
Idc=100*10^-3//Idc=load current in Amperes
y=0.02//y=allowable ripple factor
//y=sqrt(2)/(12*(w^2)*L*C)
//Let L*C=a...............(1)
a=sqrt(2)/(y*12*(w^2))
RL=Vdc/Idc//RL=load resistance
//Lc=critical inductance
//Lc=RL/(3*w)
//For line frequency of 50Hz,Lc=RL/(300*%pi)
//Lc=RL/950
Lc=RL/950
format("v",4)
L=0.1//Assumed inductance in henry
C=a/L//C=capacitance calculated from equation (1)
format("v",4)
L1=1//Assumed inductance in henry
C1=a/L1//C1=capacitance calculated from equation (1)
format("v",4)
Rb=950*L1//Rb=bleeder resistance for good voltage regulation
disp("The designed values of the components for a full wave rectifier with L-type LC filter are")
disp("ohm",RL,"The load resistance RL is =")
disp("H",Lc,"The critical inductance Lc is =")
disp("H",L,"The inductance L is=")
disp("µF",C/10^-6,"The capacitance C is")//C is converted in terms of microfarad
//In textbook 957µF is approximately taken as 600µF
disp("H",L1,"But if the inductance L designed is of the value =")
disp("µF",C1/10^-6,"the capacitance C will be of the value =")//C1 is converted in terms of microfarad
disp("So,a standard value of 50µF can be used in practice")
disp("ohm",Rb,"The bleeder resistance Rb for good voltage regulation is=")
disp("As Rb is much greater than RL,little power is wasted in Rb.This reflects the advantage of selecting L>Lc")
|
8a5ea76b7ce3cc05f43be622a7ab16944f1bc25d | 8c10cc54e1fd2419c94f9b977006b324cf755fa4 | /SV_Assignments/Assignment_3/Tests/Task3unique_db.tst | 2a313f66a18a0c1089e318b6d8d27c70c8579ca6 | [] | no_license | Meena92/SV | 8eb398299fbf113f557317dbb634933187cd0448 | ff0cab3b56bfda20a229e77edc4728281f747817 | refs/heads/master | 2020-03-29T01:43:37.998389 | 2018-09-19T06:33:16 | 2018-09-19T06:33:16 | 149,403,318 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,934 | tst | Task3unique_db.tst | <?xml version="1.0" encoding="UTF-8"?>
<TestCase name="Task3unique_db" version="5">
<meta>
<create author="admin" buildNumber="10.0.0.431" date="06/20/2017" host="inbasdpc10722" version="10.0.0"/>
<lastEdited author="admin" buildNumber="10.0.0.431" date="06/20/2017" host="inbasdpc10722" version="10.0.0"/>
</meta>
<id>5689E886558111E7BB81D8CB8A8AB1DA</id>
<Documentation>Put documentation of the Test Case here.</Documentation>
<IsInProject>true</IsInProject>
<sig>ZWQ9NSZ0Y3Y9LTEmbGlzYXY9MTAuMC4wICgxMC4wLjAuNDMxKSZub2Rlcz0xMjU3MDcwOTg1</sig>
<subprocess>false</subprocess>
<initState>
</initState>
<resultState>
</resultState>
<Node log="" name="JDBC_unique" next="end" quiet="false" think="500-1S" type="com.itko.lisa.jdbc.JDBCNode" uid="5A8FDFFC558111E7BB81D8CB8A8AB1DA" useFilters="true" version="1">
<driver>org.apache.derby.jdbc.ClientDriver</driver>
<dataSourceConnect>false</dataSourceConnect>
<jndiFactory/>
<jndiServerURL/>
<jndiDataSourceName/>
<connect>jdbc:derby://localhost:1528/database/lisa.db</connect>
<user>sa</user>
<password_enc>l91d84efecea722e4d0e158b165c41e822bedfdd0a68564de91b842c4290b782a9262</password_enc>
<onSQLError>abort</onSQLError>
<resultSet>true</resultSet>
<maxRows>-1</maxRows>
<keepOpen>false</keepOpen>
<usePool>true</usePool>
<sql>select * from emp_utab</sql>
<IsStoredProc>false</IsStoredProc>
</Node>
<Node log="" name="end" next="fail" quiet="true" think="0h" type="com.itko.lisa.test.NormalEnd" uid="5689E88C558111E7BB81D8CB8A8AB1DA" useFilters="true" version="1">
</Node>
<Node log="" name="fail" next="abort" quiet="true" think="0h" type="com.itko.lisa.test.Abend" uid="5689E88A558111E7BB81D8CB8A8AB1DA" useFilters="true" version="1">
</Node>
<Node log="" name="abort" next="" quiet="true" think="0h" type="com.itko.lisa.test.AbortStep" uid="5689E888558111E7BB81D8CB8A8AB1DA" useFilters="true" version="1">
</Node>
</TestCase> |
b55d7ea99eb847e8349b04b02fadd17a9e8f65e5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1640/CH5/EX5.10/5_10.sce | 37afbb0fe34f061f15ab56a2bd553893caaf53bb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 576 | sce | 5_10.sce | clc
//initialisation of variables
pb= 20 //lb/in^2
w= 62.4 //lb/ft^3
Q= 1.96 //cfs
d1= 0.5 //ft
d2= 1 //ft
f= 0.005
g= 32.2 //ft/sec^2
l1= 300 //ft
H= 14.015 //ft of water
//CALCULATIONS
v1= Q/(%pi*d1^2/4)
v2= Q/(%pi*d2^2/4)
hf1= 4*f*l1*v1^2/(2*g*d1)
hf2= 4*f*l1*v2^2/(2*g*d2)
h= (v1-v2)^2/(2*g)
h1= v1^2/(2*g)
h2= v2^2/(2*g)
P= H*w/144
//RESULTS
printf ('Loss of head at C = %.3f ft ',h)
printf ('\n Loss of head at C = %.2f ft ',h1)
printf ('\n Loss of head at C = %.3f ft ',h2)
printf ('\n Pressure differnece at discharge end = %.2f lb/in^2 ',P)
|
4862a9593f9bff61801b195d11b2ebce3c735100 | c9e04373e33a2721547c7ae2be20ee84f115be1c | /evaluationData/MDlinkUtilization.sce | fdc93219ca039eea44c94486a0b850e82df61162 | [] | no_license | lspxian/junsp | f944ce163267608cb9cdb939a0ac809f724fb396 | ca1571bbc30e6a9a183fa8d675567e169288acf4 | refs/heads/master | 2021-01-23T14:10:34.141815 | 2017-10-06T17:03:10 | 2017-10-06T17:03:10 | 34,068,408 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 708 | sce | MDlinkUtilization.sce | figure();
linkutilization= read("MultiDomainRanking_linkUtilization.txt",-1,2);
time = linkutilization(:,$-1);
linkutilization = linkutilization(:,$);
plot(time,linkutilization, 'r-o');
linkutilization= read("Shen2014_linkUtilization.txt",-1,2);
time = linkutilization(:,$-1);
linkutilization = linkutilization(:,$);
plot(time,linkutilization, 'b-+');
linkutilization= read("MultiDomainAsOneDomain_linkUtilization.txt",-1,2);
time = linkutilization(:,$-1);
linkutilization = linkutilization(:,$);
plot(time,linkutilization, 'k->');
//linkutilization= read("MDasOD2_linkUtilization.txt",-1,2);
//time = linkutilization(:,$-1);
//linkutilization = linkutilization(:,$);
//plot(time,linkutilization, 'g-*');
|
f81f6e1f46bf783f5f92c6400d6677e6b36f264c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1892/CH1/EX1.18/Example1_18.sce | e1ef7175f0a604f0c2322c84e3942928f4869665 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 384 | sce | Example1_18.sce | // Example 1.18
clear; clc; close;
format('v',6);
// Given data
P=4;//in poles
f=50;//in Hz
Pout=30;//in HP
VL=400;//in volt
Eta=0.8;//Efficiency
cosfi=0.75;//lagging power factor
//Calculations
Pout=Pout*735.5;//in Watts
Pin=Pout/Eta;//in Watts
//Formula : Pin=sqrt(3)*VL*IL*cosfi
IL=Pin/sqrt(3)/VL/cosfi;//in Ampere
disp(IL,"Current by the mains in ampere : ");
|
087f66dab4ffceb2aebaaf4f47aa72abf03223cd | 449d555969bfd7befe906877abab098c6e63a0e8 | /1388/CH3/EX3.13/3_13.sce | 9135a200bb2eb758bb73702011f05a668e263074 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 3_13.sce | clc
//initialisation of variables
H= -21.8 //kcal
H1= 3.3 //kcal
//CALCULATIONS
H2= H-H1
//RESULTS
printf (' Enthalpy = %.1f kcal ',H2)
|
836821f7e335418f6836df9fcf95dd9306b9d2e5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1016/CH9/EX9.4/ex9_4.sce | 17051430f2e66cd35f4564a03eddcada33aa023e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 332 | sce | ex9_4.sce | clc;clear;
//Example 9.4
//given data
e=1.6*10^-19;//the charge on electron in C
m=9.12*10^-31;//mass of electron in kg
c=3*10^8;//speed of light in m/s
h=6.625*10^-34;//Plank's constant
//calculations
E=m*c^2;
mp=1836*m;
//(0.5*m*v^2)=E
mv=sqrt(E*2*mp);
W=h/mv;
disp((W/10^-10),'de broglie wavelength in Angstrom') |
510f7657458171abf67c6f37f590aa79b7fe71f8 | e8dbcf469ba8a31d6926ba791ebc5dcccd50282b | /Scripts/DML/Consultas/Test/personas_por_estado_civil.tst | 80310103d3f21e5f8d80f65765d2b834b21eaccb | [] | no_license | bryanjimenezchacon/bryanjimenezchacon.github.io | 5f2a0f1dbfbc584a65dece48f98b1c13d755512f | 7062d1860934808265c05491007c83f69da1112a | refs/heads/master | 2021-01-23T17:20:11.542585 | 2015-10-10T05:52:52 | 2015-10-10T05:52:52 | 41,244,377 | 2 | 0 | null | 2015-08-26T15:46:04 | 2015-08-23T09:52:06 | JavaScript | UTF-8 | Scilab | false | false | 237 | tst | personas_por_estado_civil.tst | PL/SQL Developer Test script 3.0
5
begin
-- Call the procedure
personas_por_estado(pestado_civil_id => :pestado_civil_id,
p_recordset => :p_recordset);
end;
2
pestado_civil_id
1
1
4
p_recordset
1
<Cursor>
116
0
|
700c5bc9463768e0fe46c1d2d63a57f78a3c6c25 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2333/CH3/EX3.4/4.sce | 9234dddca42a6cb72e3d79d822c685b07e615bf4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 464 | sce | 4.sce | clc
// Given that
e = 0.2 // Width of slit in mm
y = 0.5 // Separation between second dark bend and center in cm
d = 2 // Linear distance in mm
// Sample Problem 4 on page no. 140
printf("\n # PROBLEM 4 # \n")
printf(" Standard formula used \n")
printf(" lambda = e*sin(theta) \n")
theta = y*1e-2/2 // Calculation of angle in radian
lambda = theta*e*1e-3 // Calculation of wavelength
printf("\n Calculation of wavelength %d angstrom.",lambda*1e+10)
|
c5866025b401f68f2ea1b562b10edadc3e2df734 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/fprintf.man.tst | 5a11f3e0f356e8c7ea17501e5525fb8c711c8ba4 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 210 | tst | fprintf.man.tst | clear;lines(0);
u=file('open','results','unknown') //open the result file
t=0:0.1:2*%pi;
for tk=t
fprintf(u,'time = %6.3f value = %6.3f',tk,sin(tk)) // write a line
end
file('close',u) //close the result file
|
0b41b77eb5fe440d4abfbb676a1a8b333b0d4d87 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3812/CH8/EX8.3.c/8_3_c.sce | d1d3ea992733400ea9f65a3b42dbae1dce991cd2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 270 | sce | 8_3_c.sce | //Example 8_3 <c>
//determine whether the Nyquist criteria satisfy or not
//Ws>=2Wmax
//fs>=2fmax
clc;
clear all;
Ts=10^-4;
Wc=1000
Fs=1000
Ts_test=1/Fs;
if (Ts<=Ts_test) then
disp('Nyquist Criteria Satify')
else
disp('Nyquist Criteria NOT Satify ');
end
|
7e34724ccbe53a18d0ca18f83ea7e5131374dd84 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1319/CH5/EX5.3/5_3.sce | 6592dda92adcc271424f388a638fba7f4a0a96ce | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 520 | sce | 5_3.sce | // To calculate resistance of primary interms of secondary and vice versa
clc;
clear;
N1=90;
N2=180;
R2=0.233;
R1=0.067;
n=N2/N1; // Transformation ratio
R1w2=(n^2)*R1;
R2w1=R2/(n^2);
Rt=R1+R2w1; // Total resistance in terms of primary
printf('a) Resistance of primary in terms of the secondary = %f ohms \n',R1w2)
printf('b) Resistance of secondary in terms of the primary = %f ohms \n',R2w1)
printf('c) Total resistance of the transformer in terms of the primary winding =%f ohms \n',Rt)
|
ce3f6ac53744bce12374382a1d73afdcf5e22b1b | 449d555969bfd7befe906877abab098c6e63a0e8 | /42/CH11/EX11.8/sadiku_11_8.sce | 9ad5bb7f7f5f5dc7dea15105c1dfbd88c9e26b96 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 108 | sce | sadiku_11_8.sce | clear;
clc;
Zg=100,Zo=50,Zl=200,u=3*10^8,l=100,Vg=12;
Tg=(Zg-Zo)/(Zg+Zo);
Tl=(Zl-Zo)/(Zl+Zo);
t1=l/u;
|
4b6ac550463cf7ae36e14f3ba1842be0a16f1141 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2465/CH18/EX18.3/Example_3.sce | b3e14c5d3f1c6689e1d9bdb7f3802c5f5b283cef | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Example_3.sce | //Chapter-18,Example 3,Page 405
clc();
close();
H=0.77
W= 395 //water equivalent of bomb calorimeter
w= 3500 //weight of water taken
T1=26.5 //temperature
T2=29.2 //temperature
m= 0.83 //weight of fuel burnt
L =587 //latent heat of steam
HCV=((W+w)*(T2-T1))/m
NCV=HCV-(0.09*H*L)
printf("HCV = %.2f cal/g",HCV)
printf("\n NCV = %.2f cal/g",NCV)
//calculation mistake in textbook
|
8708874be6593a583b158b6d153b009733167e4b | 449d555969bfd7befe906877abab098c6e63a0e8 | /413/CH8/EX8.4/Example_8_4.sce | 829bb9cad6aa178cf72b1450433c68cedc2f7eb2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 446 | sce | Example_8_4.sce | clc
clear
for i=1:35
for j=1:35
A(i,j)=0
end
end
for i=1:35
A(i,i)=-4
end
for i=1:34
A(i,i+1)=1
end
for i=2:34
A(i,i-1)=1
end
for i=6:5:30
A(i,i-1)=0
end
for i=1:30
A(i,i+5)=1
end
for i=1:30
A(i+5,i)=1
end
for i=5:5:35
A(i,i+1)=0
end
disp(A)
for i=1:35
B(i,1)=-2
end
X=A\B
disp(X)
for i=1:5:35
T=[ X(i,1), X(i+2,1),X(i+3, 1), X(i+4,1), X(i+5,1)]
disp(T)
end |
4284690046706b44bed7cb70d39a1342458fd6f6 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.3/macros/percent/%lssls.sci | aa8849d1dc76ad8adeca5ae694fe5a10af8bd50c | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 45 | sci | %lssls.sci | function s=%lssls(s1,s2)
//!
s=inv(s1)*s2
|
33c8177dd3b480099b65fe8428169064a62e356f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2438/CH6/EX6.13/Ex6_13.sce | 6a0ec4b51bd90207009f1567d2c5ee78d5dd73db | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 966 | sce | Ex6_13.sce | //===============================================================================================================================================
// chapter 6 example 13
clc;
clear;
//input data
a = 110*10^-3; //area in m^2
d = 2; //thickness in mm
er = 5; //relative permitivity
E = 12.5*10^3; //electric field strength in V/mm
e0 = 8.854*10^-12; //charge of electron in coulombs
//calculations
A = a*a; //area in m^2
C = e0*((er*A)/(d*10^-3)) //capacitance in F
V = E*(d);
Q = (C)*(V) //charge on capacitor in C
// result
mprintf('capacitance =%3.2e.F\n',C);
mprintf(' charge=%3.4e C\n',Q);
//==============================================================================================================================================
|
b552c4fc405af80d48e01ba520233ff20ea47ca3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2132/CH7/EX7.1/Example7_1.sce | 176403e5605169234cf2747d98217bf508c965aa | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 997 | sce | Example7_1.sce | //Example 7.1
clc;
clear;
close;
format('v',9);
disp("Part(i)");
disp("Absolute unit of viscosity(in C.G.S) is Poise.");
disp("Poise=1 dyne-sec/cm^2");
disp("Gravitational unit of viscosity is 1 gm-sec/cm^2.");
disp("On equating we get, 1 gm = 981 dyne");
//Let x=1kg-sec/m^2
x=1*10^3/10^4;//g-sec/cm^2
x=x*981;//dyne-sec/cm^2 or Poise(Putting 1gm=981 dyne)
disp("1 kg-sec/m^2 = "+string(x)+" Poise");
one_Poise=1/x;//kg-sec/m^2
one_Poise=1/x*9.81;//N-sec/m^2 or Pa-sec(as 1Pa=1N/m^2)
disp("1 Poise = "+string(one_Poise)+" N-sec/m^2 or Pa-sec");
disp("Part(ii)");
disp("Kinematic viscosity = viscosity/specific_gravity");
disp("Kinematic viscosity C.G.S unit is cm^2/sec. 1cm^2/sec=1stoke");
disp("Kinematic viscosity M.K.S unit is m^2/sec");
//let x=1;//m^2/sec
x=1;//m^2/sec
x=x*10^4;//cm^2/sec or stokes
disp("1 m^2/sec = "+string(x)+" cm^2/sec or stoke");
one_stoke=1/x;//m^2/sec
disp("1 stoke = "+string(one_stoke)+" m^2/sec");
disp("1 stoke = 100 centi-stokes");
|
2311e1d3e57c17e749cceeab6269e7863fb3e44a | d01bf962afff16bc1ce292c49da5923ebbe59775 | /Maths/Lotka-Volterra.sce | 245b7c46e38699fd1386541d1c091a852d63ed59 | [] | no_license | fredkerdraon/Reference-research | 71d0af22f84605ed0c53907acd6b248400c47388 | 1f48fdfebbe766bbd268b4f1853ab98162f57425 | refs/heads/master | 2023-05-05T12:18:18.655367 | 2020-02-08T22:08:15 | 2020-02-08T22:08:15 | 71,020,179 | 0 | 0 | null | 2023-04-19T18:37:49 | 2016-10-15T23:49:14 | POV-Ray SDL | UTF-8 | Scilab | false | false | 1,310 | sce | Lotka-Volterra.sce | //********************************************************************
// Modèle de Lotka-Volterra
// Dominique Lefebvre Octobre 2012
// TangenteX.com
//********************************************************************
// système différentiel de Lotka-Volterra
//y1 = population des proies, y2 = population des prédateurs
function [w] = LotkaVolterra(t,y)
w(1) = a*y(1) - b*y(1)*y(2);
w(2) = c*y(1)*y(2) - d*y(2);
endfunction
// paramètres initiaux des populations
a = 3; // taux de reproduction des proies isolées
b = 1; // taux de mortalité des proies en présence de prédateurs
c = 1; // taux de mortalité des prédateurs isolés
d = 2; // taux de reproduction des prédateurs en présence de proies
// paramètres de simulation
t0 = 0;
tmax = 20;
dt = 0.1;
x0 = 5; // population initiale des proies
y0 = 2; // population initiale des prédateurs
// initialisation des vecteurs
t = [t0:dt:tmax];
y0 = [x0;y0]; // population initiale proies et prédateurs
// résolution du système
y = ode(y0,t0,t,LotkaVolterra);
// tracé
subplot(2,1,1);plot2d(t,y(1,:),style = 2);xtitle('Evolution des populations','Temps','Population');
subplot(2,1,1);plot2d(t,y(2,:), style = 3);
subplot(2,1,2);plot2d(y(1,:),y(2,:), style = 5);xtitle('Portrait de phase','Proies','Prédateurs');
|
e2d2b525faaeda8865f11a00d550109ecb55543b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2411/CH3/EX3.d.302/Ex3d_2.sce | e05907a2c1a231cf185e6981e1bb699a85caee4b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 497 | sce | Ex3d_2.sce | // Scilab Code Ex3d.2: Page-205 (2008)
clc; clear;
f = 20; // Focal length of the lens, cm
a = 0.06; // Slit width, cm
n = 2; // Order of diffraction
lambda = 6e-005; // Wavelength of light used, cm
x = 2*lambda*f/a; // Separation between the second minima on either side of the central maximum, cm
printf("\nThe separation between the second minimum an central maximum = %4.2f cm", x);
// Result
// The separation between the second minimum an central maximum = 0.04 cm |
d5ab017e7c41fb26488792788684f7ddae26e815 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1847/CH2/EX2.37/Ch02Ex37.sce | f1c8d20738de7d78fa427f1626b83dfa9d71b2e8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 720 | sce | Ch02Ex37.sce | // Scilab Code Ex2.37:: Page-2.28 (2009)
clc; clear;
mu = 1.6; // Refractive index of the mica plate
r = 60; // Angle of refraction of the light ray on the mica plate, degrees
lambda = 5500e-008; // Wavelength of light used, cm
n = 1; // Order of interference for minimum thickness
// For dark fringe in reflected pattern,
// 2*mu*t*cosd(r) = 2*n*lambda, solving for t
t = n*lambda/(2*mu*cosd(r)); // Minimum thickness of the plate that will appear dark in the reflection pattern
printf("\nThe minimum thickness of the plate that will appear dark in the reflection pattern = %4.2e cm", t);
// Result
// The minimum thickness of the plate that will appear dark in the reflection pattern = 3.44e-05 cm
|
0f27c1800de734ce9cf3aeb4002a815e4d449670 | 6e257f133dd8984b578f3c9fd3f269eabc0750be | /ScilabFromTheoryToPractice/CreatingPlots/testgetgraphicentity.sce | da55ab7206d78b88811d9aa39b79c3ecb6942997 | [] | no_license | markusmorawitz77/Scilab | 902ef1b9f356dd38ea2dbadc892fe50d32b44bd0 | 7c98963a7d80915f66a3231a2235010e879049aa | refs/heads/master | 2021-01-19T23:53:52.068010 | 2017-04-22T12:39:21 | 2017-04-22T12:39:21 | 89,051,705 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 116 | sce | testgetgraphicentity.sce | clf //to delete
surf()
lines(10)//to delete
F=gcf() // figure
A=gca() // axes
E=gce() // handle of type Fac3D
|
ed126f25c04e2e287e0a94483fec8cdc456074d1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2223/CH18/EX18.43/Ex18_43.sce | 6d1a279dc719bf07e3f1344fee73bd310c7f87c0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,256 | sce | Ex18_43.sce | // scilab Code Exa 18.43 Francis turbine 250 rpm
NS=0.4; //specific speed
N=250; // Speed in RPM
H=75; // net head in m
beta3=25; // exit angle of the runner blades
n_o=0.81; // overall efficiency
g=9.81; // gravitational acceleration in m/s2
rho=1000; // density in kg/m3
// part(a)
u2=0.6*sqrt(2*g*H);
cr2=0.21*sqrt(2*g*H);
omega=%pi*2*N/60;
Q=(NS^2)*(H^(3/2))/((0.1804^2)*(omega^2));
disp("m3/s",Q,"(a)the discharge rate for the turbine is")
// part(b)
d2=u2*60/(%pi*N);
disp("m",d2,"(b)outer diameter of the runner blade ring is")
cr3=cr2;
cx3=cr3;
//Euler work,w_ET=u2*c_theta2
c_theta2=((g*H)-(0.5*(cx3^2)))/u2;
u3=cx3/(tand(beta3));
d3=u3*60/(%pi*N);
disp("m",d3,"and inner diameter of the runner blade ring is")
// part(c)
alpha2=atand(cr2/c_theta2);
disp("degree",alpha2,"(c)the inlet guide vane exit angle is")
beta2=atand(cr2/(c_theta2-u2));
disp("degree",beta2,"and inlet angle of the runner blades is beta2= ")
// part(d)
n_h=(u2*c_theta2)/(g*H);
disp("%",n_h*1e2,"(d)the hydraulic efficiency is")
// part(e)
P=n_o*rho*g*Q*H;
disp("MW",P*1e-6,"(e)the output power is")
disp("comment: the calculation for c_theta2 is done wrongly in the book. hence the values of alpha2,beta2, n_h differs from the book.")
|
577c44d9c54d66671839508868c1215f19d7e234 | 4a1effb7ec08302914dbd9c5e560c61936c1bb99 | /Project 2/Experiments/C45-C/results/C45-C.abalone-10-1tra/result0.tst | 1c99f22c5c0c991ad59d3b09e37eabfef435e89f | [] | no_license | nickgreenquist/Intro_To_Intelligent_Systems | 964cad20de7099b8e5808ddee199e3e3343cf7d5 | 7ad43577b3cbbc0b620740205a14c406d96a2517 | refs/heads/master | 2021-01-20T13:23:23.931062 | 2017-05-04T20:08:05 | 2017-05-04T20:08:05 | 90,484,366 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,601 | tst | result0.tst | @relation abalone
@attribute Sex{M,F,I}
@attribute Length real[0.075,0.815]
@attribute Diameter real[0.055,0.65]
@attribute Height real[0.0,1.13]
@attribute Whole_weight real[0.002,2.8255]
@attribute Shucked_weight real[0.001,1.488]
@attribute Viscera_weight real[5.0E-4,0.76]
@attribute Shell_weight real[0.0015,1.005]
@attribute Rings{15,7,9,10,8,20,16,19,14,11,12,18,13,5,4,6,21,17,22,1,3,26,23,29,2,27,25,24}
@inputs Sex,Length,Diameter,Height,Whole_weight,Shucked_weight,Viscera_weight,Shell_weight
@outputs Rings
@data
19 13
9 9
10 11
15 8
7 8
6 6
14 10
15 21
15 13
10 8
9 8
14 9
4 4
13 10
8 9
5 6
14 16
9 9
10 10
9 6
11 15
6 9
9 7
14 14
6 9
6 6
10 11
14 13
8 7
5 5
11 10
5 5
7 7
12 15
14 8
14 9
22 9
20 16
13 11
18 11
17 14
16 11
20 17
11 10
10 9
7 7
16 10
13 10
12 11
21 11
11 13
23 14
10 7
11 9
17 11
13 9
4 4
13 12
9 13
7 9
18 16
19 16
8 10
15 9
5 10
6 4
15 19
11 10
12 13
8 10
10 9
6 4
6 5
7 6
7 6
7 7
8 8
8 8
10 10
9 9
12 14
11 9
10 11
5 6
7 7
6 7
6 7
8 7
8 8
7 7
9 7
8 9
8 9
11 9
9 9
9 15
12 12
3 4
4 5
5 5
7 10
7 8
6 8
8 8
8 9
9 8
8 10
8 9
9 10
8 10
10 11
10 10
11 10
12 10
10 13
7 6
9 7
6 6
9 9
7 8
9 8
9 9
9 10
8 11
10 10
10 10
9 10
10 11
10 9
10 11
12 12
10 10
10 10
7 7
8 9
8 11
9 9
9 8
9 9
10 10
9 9
11 12
11 14
10 11
10 12
6 7
7 8
8 5
7 6
8 7
8 13
7 8
9 15
10 9
11 10
9 11
8 8
8 10
7 9
12 10
12 11
9 10
10 9
10 11
12 11
9 9
14 11
11 9
13 19
10 19
11 11
10 13
12 12
8 9
8 9
11 11
10 9
5 4
7 7
8 11
7 9
8 7
8 15
9 8
8 9
8 10
8 9
9 9
7 7
10 8
13 8
10 11
10 9
11 10
9 8
10 11
9 12
11 11
10 11
11 11
10 10
9 10
10 11
10 10
5 4
6 5
7 6
6 7
8 6
10 10
8 7
7 9
8 8
11 15
9 9
10 11
10 9
7 8
27 15
7 9
10 13
19 12
9 10
6 4
9 8
15 10
13 9
8 8
16 18
13 10
13 15
11 12
13 10
14 10
13 11
8 8
10 8
10 12
12 9
9 13
17 9
12 7
11 8
14 10
15 14
11 10
16 11
12 9
8 8
15 12
7 7
6 7
8 8
9 15
6 6
6 7
6 10
8 7
10 14
9 11
11 11
7 8
8 8
9 8
9 9
9 11
10 9
9 9
10 9
9 10
7 7
8 8
8 8
6 5
7 7
11 8
11 19
8 9
11 9
12 11
10 11
4 8
7 7
8 7
9 8
9 9
8 9
10 8
11 11
9 11
13 11
12 11
9 8
13 10
9 8
9 11
9 8
8 8
11 9
11 8
9 9
11 9
10 11
12 10
9 11
9 9
7 12
6 5
11 9
18 16
17 18
17 11
10 8
12 8
12 9
14 19
15 13
15 11
9 9
12 11
11 10
16 13
16 13
12 8
17 9
10 10
10 7
13 7
13 15
18 11
9 9
13 9
8 9
6 7
9 10
11 10
4 5
9 13
11 9
11 12
7 16
7 7
8 15
8 7
9 7
10 9
11 11
7 7
8 8
8 9
11 9
10 10
11 9
12 11
7 7
10 10
6 4
5 6
6 7
9 9
9 7
9 8
10 8
11 12
11 10
7 8
7 8
10 15
9 10
5 6
8 7
9 11
11 10
11 10
13 11
9 7
12 9
8 7
10 12
12 13
14 10
7 10
8 8
9 11
6 7
9 8
9 6
16 16
12 12
11 9
10 7
13 14
15 20
14 20
13 14
9 10
4 6
6 11
10 10
11 11
5 5
10 8
9 9
8 9
10 14
11 8
12 11
10 11
8 7
11 15
11 11
9 7
11 10
11 12
13 9
7 7
10 9
8 8
|
f1f158997f36a6b8b64e7e10bdd7aca79b483719 | 0fea4b1807b35c0ef50433aa99f483c2de5777df | /assignment 2/span_column_space.sce | 6c668aec8e68bac3ff1cd0e755bbe479cc168743 | [] | no_license | shivansh8/Scilab | 319fdfcbec1cc24b4c3c9d4385112ade99419c73 | 7922ffe14c554718cc7682b6419db9bce8261213 | refs/heads/master | 2020-12-29T06:10:48.542794 | 2020-04-05T14:19:06 | 2020-04-05T14:19:06 | 238,486,140 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 717 | sce | span_column_space.sce |
function colspace(a)
disp(a,'the given matrix is ')
a(2,:)=a(2,:)-(a(2,1)/a(1,1))*a(1,:)
a(3,:)=a(3,:)-(a(3,1)/a(1,1))*a(1,:)
disp(a)
a(3,:)=a(3,:)-(a(3,2)/a(2,2))*a(2,:)
disp(a)
a(1,:)=a(1,:)/a(1,1)
a(2,:)=a(2,:)/a(2,2)
disp(a)
for i=1:3
for j=i:3
if(a(i,j)<>0)
disp("is a pivot column",j,'column')
break
end
end
end
endfunction
str = input("Enter a space-separated 3x3 matrix in this order a11 a12 a13 ..... a32 a33 ", "string")
v = evstr(strsplit(str, " "))
a11=v(1)
a12=v(2)
a13=v(3)
a21=v(4)
a22=v(5)
a23=v(6)
a31=v(7)
a32=v(8)
a33=v(9)
a=[a11 a12 a13;a21 a22 a23;a31 a32 a33]
colspace(a);
|
8856d4c2b8a3fa627e9dbfa55da5e6e0544f214e | 3655c97e8146a7ca97eaf60c4eb20ced2238eacb | /scilab/Eight Queens/crossover2.sci | 4e6b9ae9da8d69f1fa6d835facffad11acf2b278 | [] | no_license | edielsonpf/genetic-algorithm | 99ae112982b6fee77ecfc55cbd10172b381e1dde | 94c599a23fa3b2f477c7a5062f65248a93cc395a | refs/heads/master | 2020-04-05T22:02:45.016605 | 2018-12-24T14:36:40 | 2018-12-24T14:36:40 | 32,630,334 | 0 | 1 | null | 2019-03-25T12:23:16 | 2015-03-21T11:45:11 | Python | UTF-8 | Scilab | false | false | 406 | sci | crossover2.sci | function [new_individual1,new_individual2]=crossover2(x,y)
n=length(x);
c = grand(1, 1, "uin", 1, n);
//concatenate the two fathers in the C element choosen randomnly
new_individual1=[x(1:c) y(c+1:n)];
new_individual2=[y(1:c) x(c+1:n)];
disp("crossing point");
disp(c);
disp("New idividuals generated");
disp(new_individual1);
disp(new_individual2);
endfunction
|
191decaa35142a0aa4977cee9bb00122ba7ba14d | a674f7b984545698214f8164107cc4e15916c573 | /A/A.4/A4_Script.sce | edb9883194ff9e0b61e2e02b6834fe2f7df4c10e | [] | no_license | enzo-billis/Projet_CESI_Scilab_Missions | 6bb843b68b64660f8ed235cde4213dd4d3343375 | 07434c89170e237aff6a78ad4d59034b6e47f382 | refs/heads/master | 2021-03-16T10:27:15.255047 | 2018-03-05T08:02:40 | 2018-03-05T08:02:40 | 120,597,704 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,248 | sce | A4_Script.sce | function Mission_A4()
//Chargement des coordonnées des pixels dans des tableaux
Jup1=readpbm("Jupiter1.pbm")
Jup2=readpbm("Jupiter2.pbm")
//Récupération de la taille des images
[hauteur1, largeur1]=size(Jup1)
[hauteur2, largeur2]=size(Jup2)
//On utilise une boucle FOR pour prendre l'ensemble de l'image sauf un pixel sur chaque bord (A cause de la selection du Filtre median qui créerait une erreur)
for x=1:hauteur1
for y=1:largeur1
if Jup1(x,y)==255 & Jup2(x,y)<>255 then
Jup1(x,y)=Jup2(x,y)
end
end
end
for x=2:hauteur2-1
for y=2:largeur2-1
//On selection chaque valeur autour de notre pixel et notre pixel
medianValue=[Jup1(x,y),Jup1(x-1,y-1),Jup1(x-1,y);Jup1(x-1,y+1),Jup1(x,y-1),Jup1(x,y+1);Jup1(x+1,y-1),Jup1(x+1,y),Jup1(x+1,y+1)]
//La fonction median permet de prendre la valeur au milieu, et ce sera la valeur de notre pixel a présent
Jup1(x,y)=median(medianValue)
end
end
//Affichage de l'image final
display_gray(Jup1)
//Sauvegarde de l'image final
writepbm(Jup1, "Jupiter_final.pbm")
endfunction
|
1f3ec9acdd37ecbb0a467cd12ca7f303be44e435 | db6c77c95fe7a97b791d5689c2ac3b39e791ea17 | /tests/cases/europepmc-json_011.tst | eeba3dfb2c51ecdd0d546701cdf8fc9bbfe07919 | [] | no_license | sauliusg/bibliophile | 9623cd5e8b163d36a253eaa36b558ed87666450a | 1e6f63b1e08209af5c6c87ee05098d8fa53a4345 | refs/heads/master | 2021-01-19T05:49:43.075428 | 2018-11-20T19:30:36 | 2018-11-20T19:30:36 | 100,584,633 | 1 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 99 | tst | europepmc-json_011.tst | Tests '--help' option. Especially usefull for checking if it was updated after
adding new options.
|
bc97cf1cda87b2a5dacbb6b1483fb93f61b32470 | 449d555969bfd7befe906877abab098c6e63a0e8 | /965/CH2/EX2.25/25.sci | 6e23da513b3af06e72406d502232ec0803e4542a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 653 | sci | 25.sci | clc;
clear all;
disp("heat flux calculation")
La=0.2;//m thickness of chrome bricks
Lb=0.1;//m thickness of kaolin bricks
Lc=0.1;//m thickness of masonary bricks
kA=1.25;//W/(m*C)
kB=0.074;//W/(m*C)
kC=0.555;//W/(m*C)
hhf=74;//W/(m^2*C)
thf=1670;// degree C temperature of hot fluid
t4=70;// temperature of outer surafce
q= (thf-t4)/(1/hhf+La/kA+Lb/kB+Lc/kC);
disp("W/m^2",q,"rate of heat flow per m^2 = ")
//q=(thf-t1)/(1/hhf)=(t1-t2)/(La/kA)=(t2-t3)/(Lb/kB)
t1=thf-q/hhf;
disp ("degree C",t1,"temperature t1 = ")
t2=t1-q*La/kA;
disp ("degree C",t2,"temperature t2 = ")
t3=t2-q*Lb/kB;
disp ("degree C",t3,"temperature t3 = ")
|
55b9b7480a834a5ba301379dc83f2244b62497eb | 449d555969bfd7befe906877abab098c6e63a0e8 | /534/CH5/EX5.7/5_7_Spherical_Tumor.sce | 3104f49327e34093d65042d34650ebc27d249cab | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,552 | sce | 5_7_Spherical_Tumor.sce | clear;
clc;
printf('FUNDAMENTALS OF HEAT AND MASS TRANSFER \n Incropera / Dewitt / Bergman / Lavine \n EXAMPLE 5.7 Page 293 \n'); //Example 5.7
// Spherical Tumor
//Operating Conditions
k = .5; //[W/m.K] Thermal Conductivity Healthy Tissue
kappa = .02*10^3; //[m] extinction coefficient
p = .05; // reflectivity of skin
D = .005; //[m] Laser beam Dia
rho = 989.1 ; //[kg/m^3] Density
c = 4180 ; //[J/kg.K] Specific Heat
Tb = 37+273; //[K] Temp of healthy tissue
Dt = .003 ; //[m] Dia of tissue
d = .02 ; //[m] depth beneath the skin
Ttss = 55+273 ; //[K] Steady State Temperature
Tb = 37+273 ; //[K] Body Temperature
Tt = 52+273 ; //[K] Tissue Temperature
q = .170 ; //[W]
//Case 12 of Table 4.1
q = 2*%pi*k*Dt*(Ttss-Tb);
//Energy Balancing
P = q*(D^2)*exp(kappa*d)/((1-p)*Dt^2);
//Using Eqn 5.14
t = rho*(%pi*Dt^3/6)*c*(Tt-Tb)/q;
alpha=k/(rho*c);
Fo = 10.3;
//Using Eqn 5.68
t2 = Fo*Dt^2/(4*alpha);
printf("\n (a) Heat transferred from the tumor to maintain its surface temperature at Ttss = 55 degC is %.2f W \n\n (b) Laser power needed to sustain the tumor surface temperautre at Ttss = 55 degC is %.2f W \n\n (c) Time for tumor to reach Tt = 52 degC when heat transfer to the surrounding tissue is neglected is %.2f sec \n\n (d) Time for tumor to reach Tt = 52 degC when Heat transfer to thesurrounding tissue is considered and teh thermal mass of tumor is neglected is %.2f sec" ,q,P,t,t2);
//END |
d32b71b9a70fc8cccb28e9712eccaffd77b26e51 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2417/CH2/EX2.15/Ex2_15.sce | b658e33b052bdd64bfdb80231a4d31d495857397 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 479 | sce | Ex2_15.sce | clear;
clc;
printf("\t\t\tProblem Number 2.15\n\n\n");
// Chapter 2: Work, Energy, and Heat
// Problem 2.15 (page no. 79)
// Solution
//p1*v1=p2*v2
p1=200*1000; //p1=Initial Pressure //Unit:Pa
p2=800*1000; //p2=Final Pressure //Unit:Pa
v1=0.1; //v1=Initial Special Volume //Unit:m^3/kg
v2=(p1/p2)*v1; //v1=final Special Volume //Unit:m^3/kg
w=p1*v1*log(v2/v1); //workdone //Unit:kJ/kg
printf("Work done per kilogram of gas is %f kJ/kg (into the system)",w/1000);
|
e2321b3f021112036d53430e31eec6a314aa342f | f8bb2d5287f73944d0ae4a8ddb85a18b420ce288 | /Scilab/subfile.sce | c6def38a784bfa21a5d3e4419ec37c7c322374b1 | [] | no_license | nishizumi-lab/sample | 1a2eb3baf0139e9db99b0c515ac618eb2ed65ad2 | fcdf07eb6d5c9ad9c6f5ea539046c334afffe8d2 | refs/heads/master | 2023-08-22T15:52:04.998574 | 2023-08-20T04:09:08 | 2023-08-20T04:09:08 | 248,222,555 | 8 | 20 | null | 2023-02-02T09:03:50 | 2020-03-18T12:14:34 | C | UTF-8 | Scilab | false | false | 466 | sce | subfile.sce | function xdot = subfile(t,X)
global A B D S xi Xt Xbox Tbox i h hit
n = i;
i = i+1;
sigma = S*X;
if sigma < 0
v = 1;
end
if sigma > 0
v = -1;
end
if sigma == 0
v = 0;
end
if t > h
delay = t-h;
for j = hit:n
if Tbox(1,j) > delay
Xt = Xbox(:,j-1);
hit = j-1;
break;
end
end
end
Xbox(:,i) = X;
Tbox(1,i) = t;
u = (S*B)*((S*A*X)+(S*D*Xt)-xi*v)
xdot = A*X+D*Xt+B*u
endfunction |
f6e4961c9e2a84f9182bcafb46396955ccc7cd1d | 717ddeb7e700373742c617a95e25a2376565112c | /3165/CH4/EX4.9/Ex4_9.sce | eb7c6e7b7d5305b0bd5ff9f05205bee6c14721ad | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 368 | sce | Ex4_9.sce | //Example 4 . 9
//MAXIMA SCILAB TOOLBOX REQUIRED FOR THIS PROGRAM
//Program to Ca l c u l a t e Group Delay and Phase Delay
// y ( n ) =0.25 x ( n )+x ( n1)+0.25 x ( n2)
clc ;
//w=po l y ( 0 , "w") ;
syms w;
theeta =-w;
gd= -diff( theeta ,w); //Group Delay
pd=- theeta /w; // Phase Delay
disp (gd , 'GROUP DELAY =' );
disp (pd , 'PHASE DELAY =' );
|
b32a2a0f30e09c9f10811b7b6412bfa813fe4feb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2792/CH3/EX3.11/Ex3_11.sce | 29ee0c42699b71b09a052e6fadb5dc56e041ea75 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 679 | sce | Ex3_11.sce | clc
alpha1=(-10^(4))
disp("Alpha1 = "+string(alpha1)+"cm^-1") //initializing value of absorption coefficient near the bandedges of GaAs
alpha2=(-10^(3))
disp("alpha2 = "+string(alpha2)+"cm^-1") //initializing value of absorption coefficient near the bandedges of Si
Iabs_by_Iinc = 0.9
disp("Iabs/Iinc= "+string(Iabs_by_Iinc)+"C")//initializing value of amount of light absorbed
L1 = (1/alpha1)*log(1-(Iabs_by_Iinc))
disp("The thickness of a sample GaAs is ,L = (1/alpha1)*log(1-Iabs/Iinc) = "+string(L1)+"cm")//calculation
L2 = (1/alpha2)*log(1-(Iabs_by_Iinc))
disp("The thickness of a sample Si is ,L = (1/alpha2)*log(1-Iabs/Iinc) = "+string(L2)+"cm")//calculation
|
2a71313e3b00017946b0290ef8751ff708477baa | 6fceb8a7cf65333dfe75020d8e295f16381216d8 | /Thesis/codes/binary_tree_reliability.sce | 5bb5a66d5e50e01266716359f9560377dfb48cf5 | [] | no_license | eamanu/ThesisDesarrolloInformaticoDeAplicacionEspacial | 69fd4e253c7c85166cc9abbabc7d316dfe90c896 | 313af0b4b793a9912a3dfc7d02232eed5fcce2b5 | refs/heads/master | 2020-04-05T00:09:14.555117 | 2018-10-27T11:31:54 | 2018-10-27T11:32:41 | 156,385,548 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,358 | sce | binary_tree_reliability.sce | function [R_sys] = reliabilityCalc(lambda, c, n)
//open a file
fid = mopen("data.txt", "w");
if (fid==-1) then
error("cannot open the file")
end
t = [0:0.0001:1];
//calc of reliability
R = %e^(lambda*-t);
//calc of reliability without redundancy
R_nr = R .^ ((2^n)-1);
//write file
sR = size(R_nr);
mfprintf(fid, "%ld\n",-255) ;
for i = 1:sR(2)
mfprintf(fid, "%f ", R_nr(i));
end
//calc Reliability of system with redundance for different c
// figure();
// set(gca(),"auto_clear","off");
//xlabel("time");
// ylabel("Reliability");
//plot(t, R_nr, "black");
R_sys = null;
r_int = 1;
for j = 0:(n-1)
k = j;
r_int = r_int .* ((2^k * c + 1) - 2^k * c * R);
end
R_sys = R_nr .* r_int;
//size of R_sys
sR = size(R_sys);
mfprintf(fid, "%d\n", -255);
for k = 1 : sR(2)
mfprintf(fid, "%f", R_sys(k));
end
plot (t, R_sys, "r-");
xlabel("Tiempo adimensional")
ylabel("Confiabilidad")
f=get("current_figure")
f.background = 8;
legend(['R(sys) con c = 1']);
mclose(fid)
return R_sys;
//////////////////////////////////////////////////////////////////////
l = size(c);
for i = 1:l(2)
R_sys =null;
r_int=1;
for j = 0:(n-1)
k = j;
r_int = r_int .* (( 2^k * c(i) + 1) - 2^k * c(i) * R);
end
R_sys = R_nr .* r_int;
//size of R_sys
sR = size(R_sys);
mfprintf(fid, "%d\n", -255);
//c = 0.98
if i==1 then
for k=1:sR(2)
mfprintf(fid, "%f ", R_sys(k));
end
plot(t, R_sys,"r--");
end
//c = 0.99
if i==2 then
for k=1:sR(2)
mfprintf(fid, "%f ", R_sys(k));
end
plot(t, R_sys,"b-.");
end
//c = 1
if i==3 then
for k=1:sR(2)
mfprintf(fid, "%f ", R_sys(k));
end
plot(t, R_sys,"cyan-+");
end
end
legend(['R Not redundant';'C=0.98'; 'c=0.99'; 'c=1']);
mclose(fid)
endfunction
|
9e7391466fe1414fe9aad352c81abd2b585bc420 | 449d555969bfd7befe906877abab098c6e63a0e8 | /249/CH24/EX24.1/24_01.sce | 9165db40a283702b69025a1b54faeb24ca2f79a1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 528 | sce | 24_01.sce | clear
clc
kag_a=0.32;//mol/hr.m3.Pa
kal_a=0.1;//hr
HA=12.5;//Pa.m3/mol
Fg=10^5;//mol/hr.m2
Fl=7*10^5;//mol/hr.m2
Ct=56000;//mol/m3
P=10^5;//Pa
//pA3-pA1=(Fl*P)*(CA3-CA1)/(Fg*CT)
//CA3=0.08*PA3-1.6
inv_Kag_a=inv(kag_a)+HA/(kal_a);
Gfilm_res=(inv(kag_a))/inv_Kag_a;
Lfilm_res=(HA/(kal_a))/inv_Kag_a;
Kag_a=1/inv_Kag_a;
//d=PA-PA*
//p=PA-HA*(0.08*PA-1.6);
d=20;
h=(Fg/(P*Kag_a))*integrate('1/20','dp',20,100);
printf("\n The height of the tower required for countercurrent operartions is % f",h)
printf("m")
|
1e08fb14f8eff203ed1ebe2efb8aa6bf22b7acd9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1946/CH10/EX10.9.b/Ex_10_9_b.sce | ed4f37719e346e1a25d613fbcf8dba78692a070a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 425 | sce | Ex_10_9_b.sce | // Example 10.9.b;//thermal noise
clc;
clear;
close;
K=1.38*10^-23;//boltzman constt
Ra=4*10^6;//input resistane in ohms
Rb=4*10^6;//matched bias resistane in ohms
Ct=6*10^-12;//total capicatance in farad
T=300;//TEMPERATURE IN KELVIN
Rtl=(Ra*Rb)/(Ra+Rb);//total resistance
B=(1/(2*%pi*Rtl*Ct));//Maximum bandwidth inhertz
it=(((4*K*T)/(Rtl)));//thermal noise
disp(it,"thermal noise in ampere square per hertz")
|
6c23445a2762b6fd33a88ba3cd4f604086d1525c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3720/CH14/EX14.3/Ex14_3.sce | 587ff118c8e73d677541e137e4d0ca185de14d22 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,898 | sce | Ex14_3.sce | //Example 14-3
clc;clear;
// Given values
P_atm=101.3*1000; // Pa
g=9.81;// m/s^2
alpha=1.05;
eps=0.02*0.0254;//Roughness in m
D=4*0.0254;// in 'm' converted from 'in'
L=10.5*0.3048;//in 'm' converted from 'ft'
gradz=1.219;// grad z=(z_1-z_2) in m
// Calculation
A=((%pi*D^2)/4);//Area in m^2
v=300:10:700;//Volume flow rate in gpm
T=[25 60];//Temperature matrix
for j=1:1:length(T)
//Water properties at T = 25°C and 60°C respectively
if T(j)==25 then
rho=997.0;// kg/m^3
nu=8.91*10^-4;// Kinematic viscosity in kg/m.s
mu=nu/rho;
P_v=3.169*1000;// Pa
else
rho=983.3;// kg/m^3
nu=4.67*10^-4;// Kinematic viscosity in kg/m.s
mu=nu/rho;
P_v=19.94*1000;// Pa
end
for i=1:1:length(v);
v_(i)=(6.309*10^-5)*v(i); //Volume flow rate in m3^s converted from gpm
V(i)=v_(i)/A;//Velocity in m/s
Re=(4*v_(i))/(mu*%pi*D);//Reynolds number
function [X]=fric(f)
X=-2.0*log10(((eps)/(3.7*D))+((2.51)/(Re*sqrt(f))))-1/sqrt(f); //Friction factor as a implicit function of Re using Colebrook equation
endfunction
f=0.00001; //Initial guess to solve X
fr=fsolve(f,fric);//Calculating friction factor
sigmaK_l=0.5+(3*0.3)+6.0;// Minor losses
H_l=((fr*L)/D+sigmaK_l)*(V(i)^2/(2*g));//The required net head of the fan at the minimum flow rate
NPSH(j,i)=((P_atm-P_v)/(rho*g))+(gradz)-(H_l)-((alpha-1)*(V(i)^2)/(2*g));
end
end
F=[300 400 500 600 680];//Flow rate in gpm
N=[3.8 4.44 5.06 6.13 7.0];//minimum NPSH required approximately taken from Fig.14-21
plot(v',NPSH'*3.28,'r',F,N,'-o');
xlabel('v,gpm');
ylabel('NPSH,ft');
legend('Available NPSH, 25°C','Available NPSH, 60°C','Required NPSH');
printf('\nCavitation occurs at flow rates above approximately 600 gpm. \nThe maximum volume flow rate without cavitation decreases with temperature.')
|
5c912bd43af5d3ccba140d2ecc6c259390f142fa | 449d555969bfd7befe906877abab098c6e63a0e8 | /503/CH3/EX3.23/ch3_23.sci | 8994386dcac44a0159e121ed91a36e9784bb3ae2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 845 | sci | ch3_23.sci | // to calculate (a)reactance in ohms(b)line voltage,kva rating,series reactance for Y/Y and Y/D conn
clc;
Xpu=0.12; // of 1-ph transformer
function [X]=Xohm(kv,MVA)
X=(Xpu*kv^2)/MVA;
endfunction
disp('(a)');
MVAa=75*10^-3;
Vhv=6.6;
Vlv=.4;
Xhv=Xohm(Vhv,MVAa); disp(Xhv,'X(ohm)of hv side');
Xlv=Xohm(Vlv,MVAa); disp(Xlv,'X(ohm)of lv side');
disp('(b)');
disp('Y/Y');
MVAb=MVAa*3;
Vhv=6.6*sqrt(3); disp(Vhv,'V_hv(kV)');
Vlv=.4*sqrt(3); disp(Vlv,'V_lv(kV)');
Xhv=Xohm(Vhv,MVAb); disp(Xhv,'X(ohm)of hv side');
Xlv=Xohm(Vlv,MVAb); disp(Xlv,'X(ohm)of lv side');
disp('Y/D');
MVAb=MVAa*3;
Vhv=6.6*sqrt(3); disp(Vhv,'V_hv(kV)');
Vlv=.4; disp(Vlv,'V_lv(kV)');
Xhv=Xohm(Vhv,MVAb); disp(Xhv,'X(ohm)of hv side');
Xlv=Xohm(Vlv,MVAb); disp(Xlv,'X(ohm)of lv side');
|
518624a2bf2e897892896640cdefc0b7f561b20a | 72bdc6d649588b61192529e7d1420ddc18d1a67a | /tema2/Tema2_2parte_Scilab.sce | 66584d0c0712521ccfe7e852e35686f856aa70e4 | [] | no_license | jgpATs2w/scilab-examples | c3fcff648f720a8e909b2af0ec9ab70fb90dfcd2 | 59522a5ae1abbadf6f62bff16095f4b74c707918 | refs/heads/master | 2020-09-27T23:41:06.927931 | 2020-02-11T08:54:24 | 2020-02-11T08:54:24 | 226,637,785 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 11,790 | sce | Tema2_2parte_Scilab.sce | //**************************************************************************
//FUNCIONES CON SCILAB.
//FUNCIONES INCORPARADAS EN SCILAB.
//Pongamos algunas; para ver su sintaxis
//utilizamos help o apropos
//**************************************************************************
//abs, acos, acosh, acoshm, acosm, addf, adj2sp, amell, and,
//asinh, asinhm, asinm, atan, atanh, atanhm, atanm, besseli,
//besselj, besselk, bessely, binomial, bloc2exp, bloc2ss, calerf,
//ceil, cmb_lin, conj, cos, cosh, coshm, cosm, cotg, coth, cothm,
//cumprod, cumsum, delip, diag, dlgamma, double, erf, erfc,
//erfcx, eval, eye, fix, floor, frexp, full, gamma, gammaln,
//gsort, imag, int, int16, int32, int8, integrate, interp,
//interpln, intersect, intsplin, inttrap, isdef, isinf, isnan,
//isreal, kron, ldivf, lex_sort, linspace, log, log10, log2,
//logm, logspace, max, maxi, mean, median, min, mini, minus,
//modulo, mps2linpro, mtlb_sparse, mulf, nnz, norm, not, ones,
//or, pen2ea, pertrans, pmodulo, prod, rand, rat, rdivf, real,
//round, sign, signm, sin, sinh, sinhm, sinm, size, smooth,
//solve, sort, sp2adj, sparse, spcompack, speye, spget, splin,
//spones, sprand, spzeros, sqrt, sqrtm, squarewave, ssprint,
//ssrand, st_deviation, subf, sum, sysconv, sysdiag, syslin, tan,
//tanh, tanhm, tanm, toeplitz, trfmod, trianfml, tril, trisolve,
//triu, typeof, uint16, uint32, uint8, union, unique, zeros.
//*************************************************************
//FUNCIONES BÁSICAS
//sin(x);cos(x);tan(x);cot(x);asin(x);acos(x);atan(x),acot(x)
//***************************************************************
//*************************************************************
//TRIGONOMETRICAS
//sin(x);cos(x);tan(x);cot(x);asin(x);acos(x);atan(x),acot(x)
//sind(x);cosd(x);tand(x);atand(x),etc
//***************************************************************
y=tan(2) //ten en cuenta que 2 está en radianes
y=tan(%pi/4)
sin(%pi),cos(%pi),tan(%pi)
z=[sin(%pi/3),cos(%pi/3),tan(%pi/3)]
z1=[sind(30),cosd(30),tand(30)]
t=[asin(0.5),acos(0.5),atan(0.5)]
t1=[asind(0.5),acosd(0.5),atand(0.5)]
//************************************************************
//COMPLEJOS CON SCILAB
//************************************************************
z1= 4-3*%i,
z2=3+4*%i,
[real(z1),imag(z1),conj(z1),abs(z1)]
z1*z2,
z1/z2
//*************************************************************
//POLINOMIOS
//definir a partir de coeficientes o raíces
//*************************************************************
polinomio1=poly([6,-7,0,1],'x','c')// Def polinomio por coeficientes (grado creciente)
raicespolinomio1=roots(polinomio1)// Calcular raíces de un polinomio
polinomio2=poly([1,2,-3],'x','r')// Def polinomio conociendo sus raices
raicespolinomio2=roots(polinomio2)
polinomio3=polinomio1*polinomio2
coeficientes=coeff(polinomio3)
polinomio3
horner(polinomio3,0) //valor numérico de un polinomio, función horner
horner(polinomio1,z1)
horner(polinomio1,polinomio2)//ampliación función horner
//********************************************************
//COMANDOS Y OTRAS FUNCIONES
//*********************************************************
// comandos help o apropos; clear, clc; pwd, quit
help format
apropos complex
//*********************************************************
// listar variables actuales
//***********************************************************
who
whos
//***********************************************************
//FUNCIONES DE ENTRADA SALIDA
//***************************************
//asignar entrada por consola a variable
x=input("cómo te llamas ","string"),
Cadena=input("introducir una cadena ","string"),
//muestra por pantalla
disp(x)
//escribe variable Cadena en fichero1
print('fichero1',Cadena)
//**************************************
//eliminar variables
//**************************************
//clear variable;
x=12; y=3;
x,y
clear y
x,y
//*****************************************
//OTRAS FUNCIONES
//*****************************************
clear;clc;
v=3:1.5:10 //vector formado por elementos inicio:incremento:final
w=linspace(1,10,5) //linspace(inicio, final, numero valores). Vector de
// n valores equiespaciados entre inicio y final, inclusives.
//ndgrid y meshgrid
x=[11,12,13,14];//vector o matriz de tipo (4,1)
y=[4,5];//vector de tipo (2,1)
[X,Y]=meshgrid(x,y)//X e Y matrices de 2 x 4; se repite 2 veces el vector x
// se repite 4 veces el vector y' (4 columnas)
[A,B]=ndgrid(x,y)//A y B matrices de 4 x 2; se repite 2 veces el vector x'
// se repite 4 veces el vector y
// Valor absoluto t=abs(x), si x es complejo se obtiene el módulo
abs([5,5*%i,-5,-5*%i,3+4*%i])
int([1.3 1.5 1.7 2.5 3.7])//parte entera y=int(X)
int([-1.3 -1.5 -1.7 -2.5 -3.7])
//Redonder al entero más cercano y=round(x)
round([1.3 1.5 1.7 2.5 3.7])
round([-1.3 -1.5 -1.7 -2.5 -3.7])
//Exponencial, Logarílogtmica y=exp(X)
x=[1,2,3,10];
log(x),log10(x)
2^x
2^x'
exp(x)
//máximo y mínimo y=max(x) y=min(x)
max(x)
min(x)
//factorizar factor(x)
factor (48)
clear
clc
//********************************************************
//FUNCIONES CREADAS POR EL USUARIO
//Sintaxis 1:
//function [<salida1>,...]=<mi-funcion>(<entrada1>,...),
// <instrucciones>
// endfunction
//Sintaxis 2:
//deff('[artumentos salida]=nombrefuncion(argumento entrada)',
//'instrucciones de la función')
//********************************************************
// f1:RxR--->R
//********************************************************
function [y1]=fun1(a,b), y1=a*b-5,endfunction
valor1=fun1(2,3);
disp(salida);
function [y2]=fun2(x), y2=2*x+1, endfunction
valor2=fun2(3)
disp(valor2)
//********************************************************
// f1:RxR--->RxR
//********************************************************
function [s1,s2]=fun3(a,b),
//las variables a, b son locales.
s1=a+b,
s2=a-b,
endfunction
[s1,s2]=fun3(0,3)
disp(s1,s2)
clear
//********************************************************
// Otra sintaxis para definir las mismas funciones
//********************************************************
deff('[y1]=fun1(a,b)','y1=a*b-5')
y1=fun1(2,3)
disp(y1)
deff('[y2]=fun2(x)','y2=2*x+1')
y2=fun2(3)
disp(y2)
deff('[s1,s2]=fun4(a,b)','s1=a+b,s2=a-b')
[s1,s2]=fun4(0,3)
disp(s1,s2)
clear
clc
//*******************************************************
//GRAFICOS CON SCILAB
//Es conveniente selecciones renglón a renglón
//y copies con <contro>+c después con
// <contro>+p pegues en la consolla de scilab
// y con intro ves el resultado.
//*******************************************************
//funcion plot()
//Para realizar un gráfico con Scilab se utiliza el comando
//plot que tiene la siguiente sintaxis plot(x,y) siendo
//x es el vector que contiene los valores de x
//y es el valor de la funcion para los valores de x
// el vector x ha de estar concorde con el vector y
//si x en filas y en filas, si x columnas y columnas
//*********************************************************
//EJEMPLOS
//********************************************************
// Dibujar la poligonal
//(1,1);(2,3);(3,2);(4,7);(5,2);(6,3)
//observa que por defecto x=1,2,3...
y=[1 3 2 7 2 3],plot(y)
//cierra el gráfico anterior
clf()
//********************************************************
//Dibujar la poligonal
//(1,-1);(3,3);(5,5);(6,4);(9,0)
x=[1,3,5,6,9],y=[-1,3,5,4,0],plot(x,y);
clf // borra el gráfico anterior
x=[-1,3,5,6,9]',y=[4,0,1,4,0]',plot(x,y)
clf
//*****************************************************
//EJEMPLO LINSPACE E INICIO:INCREMENTO:FINAL
//linspace(inicio, fin, valores)
//Observa la expresión 6:2:14 --> 6,8,10,12,14
//[6:2:14]; [6:2:14]'
//******************************************************
x=[6:2:15], y=2+x, plot(x,y)
clf,
x=6:2:15, y=2+x, plot(x',y')
clf,
//******************************************************
x=linspace(2,15,10), y=2+x, plot(x,y)
clf,
//******************************************************
x=linspace(-3,3,10), y=x.^2+1, plot(x,y)
clf,
//******************************************************
//Representar una circunferencia
//******************************************************
clf
t=[0:0.1:2*%pi];
x=cos(t);y=sin(t);plot(x,y)
//******************************************************
//representemos la función seno y mostrar rejilla
//*****************************************************
clf
x=0:0.01*%pi:2*%pi;y=sin(x); plot(x,y);xgrid
//*****************************************************
//dibujar gráfico y poner títulos
//xtitle(título,[x_label,[y_label,[z_label],<opts_args>)
//*******************************************************
clf
t=0:1:10; // valores del del tiempo
x=2*t; // movimiento en eje x
y=2*t-5*t^2; // movimiento en eje y
plot(x,y) // graficar
xgrid // poner rejilla
xtitle('GRAFICA PARÁBOLA','Distancia x','Distancia y')
//ALTERNATIVA A xtitle
//xlabel('Distancia x')
//ylabel('Distancia y')
//legend('GRAFICA PARÁBOLA')
//**************************************************
//multiple gráficos, espacio entre distintos gráficos
// Las funciones a reprsentar han de estar en columna
//
//******************************************************
clf
x=[0:0.1:2*%pi]';
plot(x,[sin(x) sin(2*x) sin(3*x)])
xtitle('varios gráficos','x','y')
legend('sin(x)','sin(2*x)','sin(3*x)',3);
//*****************************************************
//GRÁFICOS 3D
// FUNCIÓN plot3d (x,y,z)
//x:x1,..xm,; y=y1,...yn; z11....zmn (matriz mxn)
//ejemplo simple
//grafica (x,y,x*y)
//*****************************************************
clf
x=[1 2 3]',
y=[3,4,5],
z=x*y,
plot3d(x,y,z)
//******************************************************
//Por ejemplo para grafica la función z = sin(x)*cos(x)
//grafica (t,t,sin(t))
//******************************************************
clf
t=[0:0.2:2*%pi]';
z=sin(t)*cos(t');
plot3d(t,t,z)
//******************************************************
//función [a,b]=ndgrid(vector1,vector2)
//construye dos matrices de igual tamaño
//repite el vector1' la dimensión de vector2-->a matriz
//repite el vector2 la dimensión de vector1-->b matriz
//*****************************************************
x=[1,2,10]
y=[3,4,5,-1]
[a,b]=ndgrid(x,y)
//******************************************************
//ejemplo simple
//grafica (x,y,x*y)
//******************************************************
clf
x=[1 2 3];
y=[3,4,5];
[xm,ym]=ndgrid(x,y),
z=xm.*ym
plot3d(x,y,z)
//******************************************************
//grafica z=(x+y)^2
//observa la dificultad para conseguir z
//******************************************************
clf
x=[-2:0.1:2];
y=[-2:0.1:2];
[xm,ym]=ndgrid(x,y);
z=(xm+ym).^2;
plot3d(x,y,z)
//******************************************************
//grafica z=x^2+y^2
//******************************************************
clf
x=[-2:0.1:2];
y=[-2:0.1:2];
[xm,ym]=ndgrid(x,y);
z=xm.^2+ym.^2;
plot3d(x,y,z)
//*****************************************************
//gráficas con fplot3d
//fplot3d(vector1,vector2,f,[theta,alpha,leg,flag,ebox])
//theta, alpha =ángulo de observción en esféricas
//leg =etiquetar ejes
//flag=[mode,type, box]
//ebox=Especifica los límites de la gráfica [xmin, xmax, ymin, ymax, zmin, zmax].
//*****************************************************
//
clf
deff('z=fun(x,y)','z=x^2+y^2')
x=-2:0.1:2; y=x ;
fplot3d(x,y,fun)
//*******************************************************
x=-2:0.1:2 ;y=x ;
clf
deff('z=f(x,y)','z=(x+y)^2')
x=-2:0.1:2 ;y=x ;
fplot3d(x,y,f,alpha=45,theta=45,leg='X@Y@Z')
clf
deff('z=f(x,y)','z=x^2+y^2')
x=[-2:0.1:2];y=x;
fplot3d(x,y,f,alpha=45,theta=45)
//*****************************************************
//CURVAS DE NIVEL
//contour(vector1,vector2,f,ncurvas)
//*****************************************************
clf
x=[-2:0.1:2];
y=[-2:0.1:2];
[xm,ym]=ndgrid(x,y);
z=xm.^2+ym.^2;
contour(x,y,z,10)
|
66e87ab9aa8c8a4103cba3f819a08678fa392d7a | 48d313982e11468e3406524c01f1cba2700a2db5 | /Calcul numeric/ResurseTemaCalculNumeric/New folder/Mcmp/LevenbergMarquardt/data.sce | a170bb909ab4a8f32194f14157411929d4649399 | [] | no_license | albanionut/University | b8e918a192c131647099c57e1b2caa231de98d6d | b3d3dfe3cf64d0cddfaeb570151adf7d4c9ad0b7 | refs/heads/master | 2021-07-13T11:31:29.880681 | 2020-10-10T15:07:00 | 2020-10-10T15:07:00 | 214,223,943 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 65 | sce | data.sce | function [t,y]=data(m)
t=1:m;
y=2*exp(-t);
endfunction
|
76ba2541b4b66013098a02f023e0940485b3a9ee | eec3a6e2cd91307fd7a55b7fc83bb86b35f86a6c | /EarthOrbiterSystem.sce | 3abb3f33abf96b9a2a79428afa4694c153961798 | [] | no_license | Matthieu-71/PowerSubsystemSimulation | d1a5171ff763ca42db9d701f893d3ab257a1b882 | cdcff61d4a11509f5d9023fb295af6b8092a3c66 | refs/heads/master | 2020-03-16T23:33:28.836945 | 2018-05-24T00:10:57 | 2018-05-24T00:10:57 | 133,082,402 | 2 | 2 | null | null | null | null | UTF-8 | Scilab | false | false | 9,710 | sce | EarthOrbiterSystem.sce | // EarthOrbiterSystem v 0.1.0
// This program models the orbital trajectory of a CAD model about the Earth
// Authours : Arvin T. Matthieu D. Jessie A.
// Created on 11 May 2018
// Last modified 18 May 2018
// Table of contents
// Part 1 : Definition of proprietary functions
// Part 1a : trace_traj function
// Part 1b : plot_sphere function
// Part 2 : Definition of global variables
// Part 2a : initialization of frame related variables
// Part 2b : initialization of orbit related variables
// Part 2c : time and perturbation related parameters
// Part 2d : initialization of 3D spacecraft model related variables
// Part 3 : Output Data
// Part 3a : Ground Track
// Part 4 : Creation of the solar system environment
// Part 4a : Creation of the Earth spheroid
// Part 4b : Creation of the 'space' environment
// Part 4c : Insertion of the orbital trajectory
// Part 4d : Motion of the satellite
CL_init(); // Importation of celestLab library
// PART 1 --- DEFINITION OF PROPRIETARY FUNCTIONS ----------------------------
// Part 1a --- trace_traj function -------------------------------------------
function trace_traj(traj,F,col,th)
// Copyright (c) CNES 2008
// This software is part of CelestLab, a CNES toolbox for Scilab
// This function traces great cr
param3d(F*traj(1,:), F*traj(2,:), F*traj(3,:));
e=gce();
e.foreground=col;
e.thickness=th;
endfunction
// Part 1b --- plot_sphere function ------------------------------------------
function [] = plot_sphere(r,n,d)
// Copyright (c) York University 2018 Authors: Matthieu D. and Jessie A.
// This function plots the surface of a sphere
// Inputs: r - radius of the sphere [km], n - number of divisions, d - change in size along axes [km]
lat = linspace(-%pi/2,%pi/2,n +1);
lon = linspace(0,2*%pi,n*2 + 1);
x = r*(cos(lat)'*cos(lon)) + d(1);
y = r*(cos(lat)'*sin(lon)) + d(2);
z = r*(sin(lat)'*ones(lon)) + d(3);
plot3d2(x,y,z);
e = gce();
e.color_flag = 2;
e.color_mode = 12; // Sets the colour of the surfaces
e.foreground = 18; // Sets the colour of the lines seperating each surface
trace_traj(r*[cos(lat);zeros(lat);sin(lat)], F=1, col=16, th=1); // Plots meridian
trace_traj(r*[cos(lon);sin(lon);zeros(lon)], F=1, col=16, th=1); // Plots equator
a = gca();
a.isoview = 'on'; // Changes the view to isometric
a.grid = [1 1]; // Adds grid lines to the graphical object
endfunction
clc // Clear unimportant warnings from console
// PART 2 --- DEFINITION OF GLOBAL VARIABLES ----------------------------------
// Part 2a --- initialization of frame related parameters ---------------------
// Changing grav. parameter, solar constant, and radius, depending on master body
//Grav. Parameter [m^3/s^2]
//radius [km]
//S [W/m^2]
L = 3.828e26; //Luminosity of the sun, in W
select bodyStr
case 'Mercury'
mu = CL_dataGet("body.Mercury.mu");
r = CL_dataGet("body.Mercury.eqRad")/1000;
case 'Venus'
mu = CL_dataGet('body.Venus.mu');
r = CL_dataGet("body.Venus.eqRad")/1000;
case 'Earth'
mu = CL_dataGet('body.Earth.mu');
r = CL_dataGet("body.Earth.eqRad")/1000;
case 'Moon'
mu = CL_dataGet('body.Moon.mu');
r = CL_dataGet("body.Moon.eqRad")/1000;
case 'Mars'
mu = CL_dataGet('body.Mars.mu');
r = CL_dataGet("body.Mars.eqRad")/1000;
case 'Jupiter'
mu = CL_dataGet('body.Jupiter.mu');
r = CL_dataGet("body.Jupiter.eqRad")/1000;
case 'Saturn'
mu = CL_dataGet('body.Saturn.mu');
r = CL_dataGet("body.Saturn.eqRad")/1000;
case 'Uranus'
mu = CL_dataGet('body.Uranus.mu');
r = CL_dataGet("body.Uranus.eqRad")/1000;
case 'Neptune'
mu = CL_dataGet('body.Neptune.mu');
r = CL_dataGet("body.Neptune.eqRad")/1000;
case 'Pluto'
mu = CL_dataGet('body.Pluto.mu');
r = CL_dataGet("body.Pluto.eqRad")/1000;
end
AU = CL_dataGet("au")/10^3 // Definition of an astronomical unit [km]
frame = 1e4; // Dimension of the data bounds [km]
// Part 2b --- initialization of orbit related parameters ---------------------
// This part promts the user to input the Keplerian orbital element, by default the program uses that of the ISS
desc = list(..
CL_defParam("Semimajor axis", val = 6782.4744e3, units=['m','km']),..//aa is stored in METRES
CL_defParam("Eccentricity", val = 0.0003293),..
CL_defParam("Inclination", val = 51.6397, units=['deg']),..
CL_defParam("RAAN", val = 196.5549, units=['deg']),..
CL_defParam("Argument of Perigee", val = 67.2970, units=['deg']),..
CL_defParam("Mean anomaly at epoch", val = 292.8531, units=['deg']));
[aa, ec, in, ra, wp, ma] = CL_inputParam(desc)
TP = 2*%pi*sqrt(aa^3/mu);//orbital period [seconds]
//kepCoeff0 stores the elements in this specific order for the J2 function,
//aa is required to be in metres and all angles in radians
// (we should consider changing the user input to radians and m, although this may be inconvenient for the user...)
kepCoeff0 = [aa; ec; in*(%pi)/180; wp*(%pi)/180; ra*(%pi)/180; ma*(%pi)/180]; // Keplerian elements of the orbit
// aa-semimajor axis [km], ec-eccentricity, in-inclination [deg], ra-right ascension of the ascending node [deg], wp-argument of perigee [deg], ma-mean anomaly [deg]
// Part 2c----time and perturbation related parameters----------------------;
dt = getdate()
desc2 = list(..
CL_defParam("Start year", val = dt(1)),..
CL_defParam("Start month", val = dt(2)),..
CL_defParam("Start day", val = dt(6)),..
CL_defParam("Start hour", val = 12),..
CL_defParam("Start minute", val = 0),..
CL_defParam("Start second", val = 0),..
CL_defParam("Mission duration", val = 3/24, units = ['days']),..
CL_defParam("Time step", val = 10, units = ['seconds']));
[YYYY, MM, DD, HH,tMin,tSec,xduration,tstep] = CL_inputParam(desc2);
//cjd0-Mission Start Date
cjd0 = CL_dat_cal2cjd(YYYY,MM,DD,HH,tMin,tSec);//Calendar date to modified Julian Day
//cjd is 1xn array, where n is number of timesteps throughout mission duration
cjd = cjd0 + (0 : tstep/86400 : xduration);
//input initial orbital elements into J2 Perturbation model
//Output is a 6xn array of orbital elements, for n timesteps of mission duration
// i.e stores the changing trajectory at each timestep
kepCoeff = CL_ex_propagate("j2sec", "kep", cjd0, kepCoeff0, cjd, "m"); // "m" for mean, may be changed to "o" for osculating
kepCoeff(1,:) = kepCoeff(1,:)/1000;//changing semi major axis to kilometres, to keep with dimensions of section 1b
[pos_eci,vel_eci] = CL_oe_kep2car(kepCoeff); // State Vector in ECI frame
// Part 2d --- initialization of variables related to the 3D model of the spacecraft
enlarge = 10; // Enlargement factor to increase the volume of the model
// PART 3 --- MISSION DATA OUTPUT ----------------------------------
// Part 3a-----Ground Track-----------------------------------------
pos_ecf = CL_fr_convert("ECI", "ECF", cjd, pos_eci);//Position vector in ECF frame
fig1 = scf();
orbitstep = TP/tstep;//number of tsteps in one orbit
intorbits = floor((length(cjd)*tstep)/TP);//integer number of full orbits
CL_plot_earthMap(color_id=color("seagreen"));// Plot Earth map
CL_plot_ephem(pos_ecf, color_id=color("indianred1"));// Plot ground tracks
// PART 4 --- CREATION OF THE SOLAR SYSTEM AND SIMULATION --------------------
// Part 4a --- Creation of the 'space' environment ---------------------------
pos_sun = CL_eph_sun(cjd);//Sun position in ECI coordinates
exec(pwd()+'\PanelPower.sce',-1)//execute Power output
// Part 4b --- Creation of the Earth spheroid --------------------------------
scf();
//plot_sphere(REarth,50,[0 0 0]) // Plots the Earth as a sphere
exec(pwd()+'\plot_sphere.sci',-1); // Executes attitude script
// Part 4c --- Insertion of the orbital trajectory ---------------------------
param3d(pos_eci(1,:),pos_eci(2,:),pos_eci(3,:));
// Part 4d --- Motion of the satellite ----------------------------------------
for i = 1:max(size(pos_eci)) // For mission duration
if i > 1 // Make sure spacecraft has done one orbit
delete(h.children(1)) // Deletes the Sun-earth vector
delete(h.children(1)) // Deletes the last STL
end
misstime=i*tstep;
timestring=string(misstime)
[xAtt,yAtt,zAtt] = AttitudeAdjust(xAtt,yAtt,zAtt,[],[],[pos_eci(1,i) pos_eci(2,i) pos_eci(3,i)],[vel_eci(1,i) vel_eci(2,i) vel_eci(3,i)]);
xIns = (xAtt*enlarge) - pos_eci(1,i); // |
yIns = (yAtt*enlarge) + pos_eci(2,i); // | Changes the position of all vertices to place the object in the frame
zIns = (zAtt*enlarge) + pos_eci(3,i); // |
normPos_sun = norm([pos_sun(1,i) pos_sun(2,i) pos_sun(3,i)]); // Calculate the magnitude of the Sun-Earth vector
for j = 1:3
sun_vect(j) = 1.5*frame*(pos_sun(j,i)/normPos_sun); // Assign the components to the Sun-Earth Vector
end
xarrows([0 sun_vect(1)],[0 sun_vect(2)],[0 sun_vect(3)],20000,color(255,179,0)) //Create Sun-Earth vector
xtitle(['t+ ',timestring,'seconds']);
h = gca(); // Gets the current graphic axes
h.auto_clear = "off"; // Equivalent of MATLAB's hold on command
plot3d(-xIns,yIns,list(zIns,tcolor)); // Plots the STL model in the frame
h.isoview="on";//easier on the eyes, isometric view of plot
sleep(1000/60) // Pauses the loop for 16.6-7 ms (60 Hz animation)
end
|
3965d835522e0b0af7c532596b1473024086166b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1697/CH3/EX3.9/Exa3_9.sce | 20070fbcc228efcc4a53d25ecb36805f4bcc7fe8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 166 | sce | Exa3_9.sce | //Exa 3.9
clc;
clear;
close;
//given data :
lambda=10;//in m
D=80;//unitless
Aem=D*lambda^2/(4*%pi);//in m^2
disp(Aem,"Maximum effective aperture in m^2 : "); |
afa7b92924495f0c3470116352c67736f544e44c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1871/CH8/EX8.10/Ch08Ex10.sce | d2b16d10eae5f3c33543f00d897b4aca55b5282e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,183 | sce | Ch08Ex10.sce | // Scilab code Ex8.10 : Pg:335(2008)
clc;clear;
function [bini]= decimal_binary(ni) // Function to convert decimal to binary
bini = 0;
i = 1;
while (ni <> 0)
rem = ni-fix(ni./2).*2;
ni = int(ni/2);
bini = bini + rem*i;
i = i * 10;
end
endfunction
function [deci]= binary_decimal(ni) // Function to convert binary to decimal
deci = 0;
i = 0;
while (ni <> 0)
rem = ni-fix(ni./10).*10;
ni = int(ni/10);
deci = deci + rem*2.^i;
i = i + 1;
end
endfunction
// Function to convert a vector with binary elements to a binary number
function vtob = vector_to_bin(vector)
cnt = 1; vtob = 0;
for i = 1:1:length(vector)
vtob = vtob + vector(i)*cnt;
cnt = cnt*10;
end
endfunction
function bin_cmp = ones_cmp(bin) // Function to perform ones complement
binc = zeros(5);
i = 1;
while(i <= 5)
rem = bin-fix(bin./10).*10;
if rem == 1 then
rem = 0;
else
rem = 1;
end
bin = int(bin/10);
binc(i)=rem;
i = i+1;
end
bin_cmp = vector_to_bin(binc);
endfunction
function plus_one_res = twos_cmp(r) // Function to perform twos complement
onec = zeros(5);
i = 1;
while(i <= 5)
rem = r-fix(r./10).*10;
r = int(r/10);
onec(i)=rem;
i = i+1;
end
plus_one_res = vector_to_bin(onec);
plus_one_res = binary_decimal(plus_one_res)+1;
endfunction
function fr = check_result(res) // Function to check the occurence of end-around carry
max_result = 11111;
if binary_decimal(res) > binary_decimal(max_result) then
fr = decimal_binary(twos_cmp(res));
else
fr = ones_cmp(res);
end
endfunction
sub = 11011; // Initialize the first binary number
men = 01101; // Initialize the second binary number
result = decimal_binary(binary_decimal(sub)+binary_decimal(ones_cmp(men)));
final_result = check_result(result);
printf("%5d - 0%4d = 0%4d", sub, men, final_result);
// Result
// 11011 - 01101 = 01110
|
9fd903f7be2000255bbed6a5422b1913314c906a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH6/EX6.17/Ex6_17.sce | 8d22faa7af8da9be5241465cb5ae70b51bcbc06d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 290 | sce | Ex6_17.sce | //Example 6_17
clc;
clear;
close;
format('v',5);
//given data :
RL=3.15;//kohm
rf=20;//ohm
//v=230*sin(314*t)
Vm=230;//V
f=50;//Hz
Irms=0.707*Vm/(rf+RL*1000);//A
Im=Vm/(rf+RL*1000);//A
Idc=0.637*Im
Gamma=sqrt((Irms/Idc)^2-1);//Ripple factor
disp(Gamma,"Ripple factor : ");
|
456b9ad265b004bf206a65c48961662e43a7b6a9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /371/CH5/EX5.7/5_7.sci | 92a76ce37ebe6b306ba703cbb49c143b2f7e842a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 424 | sci | 5_7.sci | //Line commuted Converters//
//Example 5.7//
E2=230;//input voltage in volts//
Emax=sqrt(2)*E2;//maximum value of dc voltage//
A=%pi/6;
Edc=Emax*(1+cos(A))/(2*%pi);
printf('Average value of dc voltage=Edc=%fvolts',Edc);
Eeff=Emax*sqrt((%pi-A)/(4*%pi)+(sin(2*A)/(8*%pi)));
printf('\nEffective value of voltage=Eeff=%fvolts',Eeff);
R=10;//total impedance in ohms//
Id=Edc/R;
printf('\nLoad current=Id=%famps',Id);
|
f45be4595171a3b93508f8567a3bd4cd9dea506c | 089894a36ef33cb3d0f697541716c9b6cd8dcc43 | /NLP_Project/test/blog/bow/bow.10_20.tst | da30724c157f62495964145d0bf4afe935494bb4 | [] | no_license | mandar15/NLP_Project | 3142cda82d49ba0ea30b580c46bdd0e0348fe3ec | 1dcb70a199a0f7ab8c72825bfd5b8146e75b7ec2 | refs/heads/master | 2020-05-20T13:36:05.842840 | 2013-07-31T06:53:59 | 2013-07-31T06:53:59 | 6,534,406 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 3,441 | tst | bow.10_20.tst | 10 55:0.16666666666666666 56:1.0
10 2:0.05 4:0.3333333333333333 13:1.0 88:0.5 143:1.0
10 13:1.0 27:1.0 29:0.1111111111111111 42:0.5 45:1.0 68:0.2 69:0.2 70:1.0 71:1.0 73:1.0 108:0.5 115:1.0 165:1.0 169:0.3333333333333333 211:0.5 282:1.0 469:0.5 548:1.0 558:1.0 580:1.0 1189:1.0 1390:1.0
10 2:0.05 17:1.0 32:0.3333333333333333 1615:1.0
10 2:0.05 4:0.3333333333333333 169:0.3333333333333333 184:1.0
10 29:0.1111111111111111 74:1.0
10 2:0.05 57:1.0 68:0.2 114:0.5 116:1.0 408:1.0 450:1.0 636:1.0 652:1.0
10 2:0.05 8:1.0 371:1.0
10 2:0.05 4:0.3333333333333333 32:0.6666666666666666 34:0.5 125:0.5 233:1.0 305:1.0 311:1.0 560:1.0 1315:1.0
10 34:0.5 556:1.0
10 639:1.0
10 55:0.16666666666666666 56:1.0
10 29:0.1111111111111111 31:1.0 32:0.3333333333333333 222:1.0 343:1.0 436:1.0
10 2:0.05 4:0.3333333333333333 17:1.0 23:1.0 29:0.1111111111111111 31:2.0 32:0.6666666666666666 57:1.0 118:1.0 130:0.25 144:1.0 153:0.5 253:1.0 292:0.2 1065:1.0
10 2:0.05 4:0.3333333333333333 13:1.0 32:0.3333333333333333 63:1.0 115:0.5 118:1.0 308:0.5 338:0.5 502:1.0 541:1.0
10 8:1.0 12:0.5 15:0.024390243902439025 23:1.0 32:1.0 68:0.2 104:0.058823529411764705 115:0.5 116:1.0 121:1.0 127:1.0 153:0.5 283:1.0 346:1.0 355:1.0 581:1.0 848:1.0 1015:0.3333333333333333
10 269:0.3333333333333333 639:1.0
10 55:0.16666666666666666 56:1.0
10 15:0.024390243902439025 32:0.3333333333333333 161:1.0 228:0.07142857142857142 711:1.0
10 4:0.3333333333333333 12:0.5 15:0.024390243902439025 32:0.3333333333333333 37:1.0 112:1.0 153:0.5 1327:1.0
10 12:0.5 15:0.024390243902439025 618:1.0
10 71:1.0 72:1.0 118:1.0 143:1.0 165:1.0 269:0.3333333333333333 270:1.0 503:1.0 1403:1.0
10 2:0.05 12:0.5 15:0.024390243902439025 19:0.3333333333333333 68:0.2 121:1.0 450:1.0 640:0.3333333333333333 694:1.0 776:1.0 1119:1.0 1365:1.0
10 4:0.3333333333333333 22:0.14285714285714285 26:1.0 29:0.1111111111111111 239:1.0
10 4:0.3333333333333333 12:1.0 13:1.0 15:0.07317073170731707 26:1.0 31:1.0 32:0.3333333333333333 37:1.0 90:1.0 100:0.5 114:0.5 115:1.5 180:0.5 209:0.25 216:1.0 336:1.0 382:1.0 450:1.0 525:1.0 580:1.0 655:1.0 662:1.0 1133:1.0 1178:1.0 1390:1.0
10 4:0.6666666666666666 12:0.5 15:0.04878048780487805 16:1.0 31:2.0 32:0.3333333333333333 58:1.0 115:0.5 118:1.0 143:2.0 146:0.5 148:1.0 209:0.75 225:1.0 235:0.25 249:1.0 262:1.0 305:1.0 371:1.0 502:1.0 1370:1.0
10 4:0.3333333333333333 15:0.04878048780487805 16:1.0 22:0.14285714285714285 29:0.1111111111111111 32:0.3333333333333333 68:0.2 83:1.0 216:1.0 222:1.0 251:1.0 305:1.0 609:1.0 1138:1.0
10 12:0.5 15:0.04878048780487805 43:1.0 108:1.0 110:0.5 544:1.0 580:1.0 609:1.0 1146:2.0 1625:1.0
10 12:0.5
10 12:0.5 104:0.058823529411764705 108:0.5 641:1.0
10 13:1.0 31:1.0 92:1.0
10 15:0.024390243902439025 16:1.0 37:1.0 84:1.0 222:1.0
10 4:0.3333333333333333 27:1.0 143:1.0 150:1.0 176:1.0 292:0.2 305:1.0 773:1.0 1615:1.0
10 639:1.0
10 55:0.16666666666666666 84:1.0 130:0.25
10 2:0.15 4:1.0 13:1.0 19:0.6666666666666666 23:1.0 29:0.1111111111111111 32:0.6666666666666666 68:0.2 76:2.0 92:1.0 104:0.058823529411764705 108:0.5 110:0.5 119:1.0 131:1.0 145:1.0 148:1.0 179:1.0 216:1.0 222:1.0 464:1.0 496:1.0 580:1.0 851:1.0 1416:2.0 1455:1.0 1463:1.0
10 2:0.05 4:0.3333333333333333 15:0.024390243902439025 22:0.14285714285714285 32:0.3333333333333333 68:0.2 76:2.0 104:0.058823529411764705 172:1.0 229:1.0 288:1.0 974:1.0 1325:1.0
10 2:0.05 15:0.024390243902439025 83:1.0
10 2:0.05 15:0.024390243902439025 16:1.0 108:0.5 115:0.5 171:0.2
|
293162ca413b3d4228c1103e30c0b30b8d5c819a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1280/CH5/EX5.1/5_1.sce | 84f30d02e96d49bb5db9450476f88f83f1d29475 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 272 | sce | 5_1.sce | clc
//initialisation of variables
Q= 40 //gpm
d= 2 //in
d1= 4 //in
//CALCULATIONS
v1= Q*4/(%pi*d^2*3.12)
v2= %pi*v1*4/(%pi*d1^2)
//RESULTS
printf ('velocity of fluid in the conductor = %.2f fps',v1)
printf (' \n velocity of fluid in a maniflod = %.2f fps',v2)
|
da3b1973873f605ea2e1b90f780fed0b4ceb91de | 8ca39fc7c4179449d99b38ccebe00146c22b6925 | /SciLab/Libaray.sci | 0c2dd03e70a0241bb9c890319c1d332f8f1be0f9 | [] | no_license | goluckyryan/programmings | 8cc03ac6c0158560a7149eca2ef923dca4f00e81 | c4e2a5084dd957cfa4dd5f33f5f42a6339a5ff59 | refs/heads/master | 2021-07-17T14:04:13.348287 | 2021-02-18T04:40:58 | 2021-02-18T04:40:58 | 48,151,691 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,076 | sci | Libaray.sci | //right hand rotation matric around origin
//Latex $R\cdot \vec{v}$
// $R={cos(\theta),-sin(\theta)}$
//
//
clear
function u=Rotation2D(v,theta)
u=[cos(theta),-sin(theta);sin(theta),cos(theta)]*v
endfunction
function R=Rotz(theta)
R=[cos(theta),-sin(theta),0;sin(theta),cos(theta),0;0,0,1]
endfunction
function R=Rotx(theta)
R=[1,0,0;1,cos(theta),-sin(theta);0,sin(theta),cos(theta)]
endfunction
function R=Roty(theta)
R=[cos(theta),0,sin(theta);0,1,0;-sin(theta),0,cos(theta)]
endfunction
function angle=polarangle(k)
b=sqrt(k(1)^2+k(2)^2);
theta=atan(b,k(3));
phi=atan(k(2),k(1));
angle={phi,theta}
endfunction
function angle=polarangle4D(k)
b=sqrt(k(2)^2+k(3)^2);
theta=atan(b,k(4));
phi=atan(k(3),k(2));
angle={phi,theta}
endfunction
function u=Rotation3D(v,k,rot)
angle=polarangle(k)
u=(Rotz(angle(1))*Roty(angle(2))*Rotz(rot)*Roty(-angle(2))*Rotz(-angle(1))*(v'))'
endfunction
function u=Rot4D(k,rot)
angle=polarangle(k);
utemp=Rotz(angle(1))*Roty(angle(2))*Rotz(rot)*Roty(-angle(2))*Rotz(-angle(1));
u=eye(4,4);
for i=2:4
for j=2:4
u(i,j)=utemp(i-1,j-1);
end
end
endfunction
function u=Rotation4D(v,k,rot)
angle=polarangle(k);
utemp=Rotz(angle(1))*Roty(angle(2))*Rotz(rot);
u=eye(4,4);
for i=2:4
for j=2:4
u(i,j)=utemp(i-1,j-1);
end
end
u=(u*v')'
endfunction
function Lz=Lz4D(b)
g=1/sqrt(1-b**2);
Lz={g,0,0,g*b;
0,1,0,0;
0,0,1,0;
g*b,0,0,g}
endfunction
function p=Pmomemtum4(m,T,theta,phi)
momt=sqrt(2*m*T+T**2);
p={m+T,momt*cos(phi)*sin(theta),momt*sin(phi)*sin(theta),momt*cos(theta)}
endfunction
function u=KE(p,m)
u=p(1)-m
endfunction
function u=SphericalDist(id)
if(id==3) then
u={acos(2*rand()-1),2*%pi*(rand()-0.5)}
elseif id==1 then
u=acos(2*rand()-1)
elseif id==2 then
u=2*%pi*(rand()-0.5)
end
endfunction
|
e9d7241007be30a07a6b2f16f16df1746271d5ed | 449d555969bfd7befe906877abab098c6e63a0e8 | /24/CH11/EX11.2/Example11_2.sce | 4d96da78d27a989b81e57a078bb51c84c2a4ff84 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Example11_2.sce | //Given that
alpha = 0.335 //in rad/s^2
Wo = -4.6 //in rad/s
Ao = 0 //in rad
Af = 5* 2*%pi //in rad
//Sample Problem 11-2a
printf("**Sample Problem 11-2a**\n")
//Using newton's second equation of motion
t = poly(0, 't')
p = Ao + Wo*t + 0.5*alpha*t^2 - Af
to = roots(p)
printf("At time equal to %fsec, the reference line will be at given position\n", to(2))
//Sample Problem 11-2c
printf("\n**Sample Problem 11-2c**\n")
p = Wo + alpha*t
ts = roots(p)
printf("At time equal to %fsec, the disk momentarily stops", ts) |
d93ad6b4883afb87c02138e8c3f9d1bc46db6f55 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1445/CH8/EX8.13/Ex8_13.sce | 8512b6a9e502c569414424496cd7dd76f34c6d3c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 839 | sce | Ex8_13.sce | //CHAPTER 8- DIRECT CURRENT MACHINES
//Example 13
clc;
disp("CHAPTER 8");
disp("EXAMPLE 13");
//VARIABLE INITIALIZATION
P=4; //number of poles
v_t=220; //in Volts
I_l=42; //load current in Amperes
r_a=0.1; //in Ohms
r_f=110; //in Ohms
drop=1; //contact drop per brush
//SOLUTION
//solution (i)
A=P; //for lap winding
I_f=v_t/r_f; //I_f is same as I_sh
I_a=I_l+I_f;
I_c=I_a/A; //conductor current
disp(sprintf("The current in each conductor of the armature is %d A",I_c));
//solution (ii)
v_a=I_a*r_a; //armature voltage drop
v_b=2*drop; //brush drop
emf=v_t+v_a+v_b;
disp(sprintf("The total emf generated is %f V",emf));
//END
|
9320c232528c55eb7114634fff77663578fb0378 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2135/CH3/EX3.10/Exa_3_10.sce | bb5feb769849bf27bd46413b0f89b506d9f74b81 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 313 | sce | Exa_3_10.sce | //Exa 3.10
clc;
clear;
close;
format('v',7);
//Given Data :
m=0.8;//Kg
hi=335;//KJ/Kg-water
T1=24+273;//K
T2=0+273;//K
Wdot=400;//W
Wdot=Wdot/1000;//KW
Q2=m*hi;//KJ
ActualCOP=T2/(T1-T2)*30/100;
Q2dot=ActualCOP/Wdot;//KJ/s
T=Q2/Q2dot;//sec
disp(T,"Time required to freeze the water in sec : ");
|
1c39e011e0cc90c1db99a1e72ada170405250d35 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2744/CH10/EX10.1/Ex10_1.sce | 9c5d2753ad76e0affffb9147c7b2b9385f9ad484 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 185 | sce | Ex10_1.sce | clear;
clc;
d = 2;// feet
p = 250;// lb/in^2
f = 12000;// lb/in^2
t_limit = p*d*12/(2*f) ;// inches
printf('The necessary thickness of metal for seamless pipe is %.2f inches',t_limit);
|
de77426a402d87cc465fc87c5c742cfaef404ae8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2252/CH14/EX14.2/Ex14_2.sce | f43a852edfa1eaea53bcfee1da2969897c473241 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex14_2.sce |
//calculating no. of turns in secondary winding
Es=500//no load voltage of low voltage winding
phi=.06//flux
f=50//frequency in Hz
Ns=round(Es/(4.44*f*phi))
mprintf("No. of turns in low voltage winding=%f\n",Ns)
//calculating no. of turns in primary winding
Np=Ns*6600/500
mprintf("Np=%f(not possible)\n",Np)
//Here, the no. of turns finally taken is 500 and not 502
mprintf("No. of turns finally taken is 500 ,because the high voltage winding will be split up into a no. of coils")
|
dc37f6f4d8d44045b11a844251e4d966df1b7692 | 449d555969bfd7befe906877abab098c6e63a0e8 | /275/CH3/EX3.3.76/Ch3_3_76.sce | 96a16411976d25c5cad7c367da955471cc528961 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 567 | sce | Ch3_3_76.sce | clc
disp("Example 3.76")
printf("\n")
disp("Design a Voltage divider bias circuit")
printf("Given\n")
//given
Vce=5
Ve=Vce
Ic=5*10^-3
Vcc=15
hFE=100
Vbe=0.7
//emitter resistance
Re=Ve/Ic
//collector resistance
Rc=(Vcc-Vce-Ve)/Ic
//current through resistor R2
I2=Ic/10
//base voltage
Vb=Vbe+Ve
//resistance 1
R1=(Vcc-Vb)/I2
//resistance 2
R2=Vb/I2
printf("Collector resistance %f ohm \n",Rc)
printf("emitter resistance %f ohm \n",Re)
printf("base voltage %f volt \n",Vb)
printf("voltage divider resistance R1 & R2 %f ohm\n %f ohm\n",R1,R2)
|
7afd5731724f6c85113d2dc07ddbe8c53cdf7ed6 | c557cd21994aaa23ea4fe68fa779dd8b3aac0381 | /test/delete.tst | abf0e1c8155b02d844a312f5799d3779abf68c5d | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | dougsong/reposurgeon | 394001c0da4c3503bc8bae14935808ffd6f45657 | ee63ba2b0786fa1b79dd232bf3d4c2fe9c22104b | refs/heads/master | 2023-03-09T15:22:45.041046 | 2023-02-25T08:33:06 | 2023-02-25T08:33:06 | 280,299,498 | 1 | 0 | NOASSERTION | 2023-02-25T08:33:08 | 2020-07-17T01:45:32 | Go | UTF-8 | Scilab | false | false | 239 | tst | delete.tst | ## Test if delete command can delete all types of objects
set echo
# Use --quiet so that adding commits to the test files doesn't break the test
read <liftlog.fi
1..$ delete --quiet
inspect
read <testrepo.fi
1..$ delete --quiet
inspect
|
6853c24b24cda8453bd17a5a1a05a98a979f4de0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /40/CH10/EX10.3cd/Exa_10_3cd.sce | 0a2e920434478f33939038db36cd0b75fe0ba8f6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,158 | sce | Exa_10_3cd.sce | //Design of high pass FIR filter with specifications
//fp=4kHZ;fs=2kHZ;Ap=2dB;As=40dB
fp=2;fs=4;Ap=2;As=40;S=20;
Fp=fp/S;Fs=fs/S;
Ft=0.1;
Fc=0.15
N1=3.47/(Fs-Fp);//hamming
N1=int(N1)+1
N2=5.71/(Fs-Fp);//blackman
N2=int(N2)+1
[hn1]=eqfir(N1,[0 0.1;0.2 0.5],[0 1],[1 1]);
[HF1,fr1]=frmag(hn1,512);
Hf1=20*log10(HF1);
[hn2]=eqfir(58,[0 0.1;0.2 0.43],[0 1],[1 1]);
[HF2,fr2]=frmag(hn2,512);
Hf2=20*log10(HF2);
a=gca();
plot2d(fr1,Hf1,rect=[0 -120 0.5 4]);
plot2d(fr2(1:length(fr2)-5),Hf2(1:length(fr2)-5),rect=[0 -120 0.5 4]);
xlabel('Digital Frequency F');
ylabel('Magnitude [dB]');
xtitle('High pass filter using Hamming and Blackmann windows LPP Fc=0.35');
//Minimum Length Design
[hn3]=eqfir(22,[0 0.1;0.2 0.43],[0 1],[1 1]);
[HF3,fr3]=frmag(hn3,512);
Hf3=20*log10(HF3);
[hn4]=eqfir(29,[0 0.1;0.2 0.5],[0 1],[1 1]);
[HF4,fr4]=frmag(hn4,512);
Hf4=20*log10(HF4);
xset('window',1);
a=gca();
plot2d(fr3(1:length(fr3)-5),Hf3(1:length(fr3)-5),rect=[0 -120 0.5 4]);
plot2d(fr4,Hf4,rect=[0 -120 0.5 4]);
xlabel('Digital Frequency F');
ylabel('Magnitude [dB]');
xtitle('Hamming LPP Fc=0.3293 N=22;Blackmann LPP Fc=0.3277 N=29');
|
430bf1569341b09b8fd47116e82b5665efaf6df4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2870/CH10/EX10.1/Ex10_1.sce | e5af001b8cad22ce883e5e8a405aab398c8b9e97 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 429 | sce | Ex10_1.sce | clc;clear;
//Example 10.1
//given data
P1=75;
P2=3000;//in kPa
P3=P2;
T3=350;
P4=P1;
//from steam tables
//at state 1
v1=0.001037;
h1=384.44;
//at state 3
h3=3116.1;
s3=6.7450;
//at state 4
s4=s3;
sf=1.2132;
sfg=6.2426;
hf=384.44;
hfg=2278;
//calculations
win=v1*(P2-P1);
h2=h1+win;
x4=(s4-sf)/sfg;
h4=hf+x4*hfg;
qin=h3-h2;
qout=h4-h1;
nth=1-(qout/qin);
disp(nth*100,'thermal efficency % is')
|
45cdce2aaf61de3744a197e5009d63de4370994d | 449d555969bfd7befe906877abab098c6e63a0e8 | /3507/CH17/EX17.6/Ex17_6.sce | d13c95412f8302197f7b1a398d167102db3b48ef | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 317 | sce | Ex17_6.sce | //chapter17
//example17.6
//page387
// frequency is inversely proportional to thickness
// so if thickness is reduced by 1%, frequency increases by 1%
printf("If thickness of crystal is reduced by 1 percent, then \nfrequency is increased by 1 percent \nbecause frequency is inversely proportional to thickness \n")
|
35a304f9c6d1a2b736b5d36d85ab8e6988d19f83 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1553/CH18/EX18.4/18Ex4.sce | 16840c2b2ef01950d7037fceb0db8425f892edf7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 168 | sce | 18Ex4.sce | //chapter 18 Ex 4
clc;
clear;
close;
s_t=68; s_m=8; d_t=150;
s_relative=(s_t-s_m)*5/18;
t=d_t/s_relative;
printf("The train will pass the man in %d sec",t);
|
b053434ce59d9c1f858ae0ba6debbb7496f4d55c | 449d555969bfd7befe906877abab098c6e63a0e8 | /830/CH8/EX8.2.3/FIR_LPF.sce | e4df90e79784ce914a9c76eb90eb7aac522db9ba | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 803 | sce | FIR_LPF.sce | //Graphical//
//Example 8.2.3
//Low Pass FIlter of length M = 61
//Pass band Edge frequency fp = 0.1 and a Stop edge frequency fs = 0.15
// Choose the number of cosine functions and create a dense grid
// in [0,0.1) and [0.15,0.5)
//magnitude for pass band = 1 & stop band = 0 (i.e) [1 0]
//Weighting function =[1 1]
clear;
clc;
close;
hn=eqfir(61,[0 .1;.15 .5],[1 0],[1 1]);
[hm,fr]=frmag(hn,256);
disp('The Filter Coefficients are:')
hn
figure
plot(fr,hm)
xlabel('Normalized Digital Frequency fr');
ylabel('Magnitude');
title('Frequency Response of FIR LPF using REMEZ algorithm M=61')
figure
plot(.5*(0:255)/256,20*log10(frmag(hn,256)));
xlabel('Normalized Digital Frequency fr');
ylabel('Magnitude in dB');
title('Frequency Response of FIR LPF using REMEZ algorithm M=61')
|
9dde1baf46502316beb0cbca96cafb63c6a751aa | 449d555969bfd7befe906877abab098c6e63a0e8 | /2231/CH1/EX1.14/Ex_1_14.sce | c3e0c884cca3cb70d11d73ca2fdfa8e3b355b06d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 330 | sce | Ex_1_14.sce | //Example 1_14
clc;
clear;close;
//Given data:
Iavg=200;//A
period1=2*%pi;
period2=%pi;
Vth1=1.8;//V
I1=200;//A
Vth2=1.9;//V
I2=400;//A
//part (a)
Ploss1=I1*Vth1*period1/2/%pi;//W
disp(Ploss1,"(a) Average power loss (in W) : ");
Ploss2=I2*Vth2*period2/2/%pi;//W
disp(Ploss2,"(b) Average power loss (in W) : ");
|
f0fda5e1cb14b675ca03616fb8a1e49c151731e0 | 584105ff5b87869494a42f632079668e4c3f82de | /TestCases/calib3d/initCameraMatrix2D/test2.sce | ebc09027fcbfa9b1910eedf5fd479b0607504eca | [] | no_license | kevgeo/FOSSEE-Computer-Vision | 0ceb1aafb800580498ea7d79982003714d88fb48 | 9ca5ceae56d11d81a178a9dafddc809238e412ba | refs/heads/master | 2021-01-17T21:11:31.309967 | 2016-08-01T14:45:40 | 2016-08-01T14:45:40 | 63,127,286 | 6 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 526 | sce | test2.sce | //Checking if error message pops up when objectPoints matrix is a 2D point set instead 0f a 3D point set
//2D as in x & y coordinate values, 3D as in x,y & z coordinate values
a = [18.0 18.0 0;
25.0 110.0 0;
26.0 226.0 0;
29.0 327.0 0];
imagePoints = list(a);
b = [144.00 1011.0;
237.0 801.0;
242.0 583.0;
271.0 421.0];
objectPoints = list(b);
[output1] = initCameraMatrix2D(1,objectPoints,imagePoints,1280,1024,0);
//output->
// !--error 999
//Please enter an objectPoints matrix which is of N x 3 dimension.
|
e357a53529cf8c8f12afa54d37243df4110cf191 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2126/CH2/EX2.20/20.sce | 087525281b1f4dd15cff8829dba58cf4e0eb51cd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,024 | sce | 20.sce | clc
clear
//Input data
C1=200 //Inlet velocity in m/s
Po1=400 //Stagnation pressure at entry in kPa
To1=500 //Stagnation temperature at inlet in K
C2=100 //Exit velocity in m/s
eff=0.9 //Nozzle efficiency
k=1.4 //Adiabatic Constant
Cp=1005 //Specific heat capacity at constant pressure in J/kg-K
//Calculation
T1=To1-(C1^2/(2*Cp)) //Inlet temperature in K
t1=T1/To1 //Temperature ratio
P1=Po1*t1^(k/(k-1)) //Inlet pressure in kPa
To2s=(eff*(To1-T1))+T1 //Exit Stagnation temperature at isentropic state in K
To2=To2s //Exit Stagnation temperature in K, Since adiabatic
T2=To2-(C2^2/(2*Cp)) //Exit temperature in K
t2=To2s/T1 //Temperature ratio
Po2=P1*t2^(k/(k-1)) //Stagnation pressure at exit in kPa
t3=T2/To2 //Temperature ratio
P2=Po2*t3^(k/(k-1)) //Exit pressure in kPa
Cpr=(P2-P1)/(Po1-P1) //Pressure raise coefficient
ar=(P1*T2*C1)/(P2*T1*C2) //Ratio of exit to inlet area
//Output
printf('(A)Pressure raise coefficient is %3.3f\n (B)Ratio of exit to inlet area is %3.3f',Cpr,ar)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.