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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
841d95293d6b2c0986a02ed301b0ccba6b5d0066 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1370/CH5/EX5.18/exp5_18.sce | da8a668625a4086545c3df6d237e149c5aa1061e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 316 | sce | exp5_18.sce | //Example 5.18
clc
disp("P = 8, f = 50 Hz, f_s = 1.5 Hz")
disp("f_s = s*f")
s=1.5/50
format(5)
disp(s,"Therefore, s = ...Slip")
ns=(120*50)/8
format(4)
disp(ns,"N_s(in r.p.m) = 120f/P =")
n=750*(1-0.03)
format(6)
disp(n,"N(in r.p.m) = N_s*(1-s_m) = ...Speed of the motor")
|
205f06fb68c711265196de8d4957e4fcba82e20e | 449d555969bfd7befe906877abab098c6e63a0e8 | /761/CH3/EX3.8/3_8.sce | ba3f09d6d58ff17f6c4cc2eda951865f94700f7f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 372 | sce | 3_8.sce | clc;
// page no 328
// prob no 8.6
//2 kHz tone is present on channel 5 of group 3 of supergroup
//signal is lower sided so
fc_channel_5=92*10^3;
fg=fc_channel_5 - (2*10^3);// 2MHz baseband signal
// we know group 3 in the supergroup is moved to the range 408-456 kHz with a suppressed carrier frequency of 516kHz
f_s_carr=516*10^3;
fsg=f_s_carr - fg;
disp(fsg); |
2888313c5dea31d4978322f020c7fea86335b9cb | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set9/s_Engineering_Physics_K._V._Kumar_3537.zip/Engineering_Physics_K._V._Kumar_3537/CH7/EX7.13/Ex7_13.sce | 7acc5f9e2769e6a8ca5e5aa20468206fe19e57cb | [] | 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 | 205 | sce | Ex7_13.sce | errcatch(-1,"stop");mode(2);//Example 7_13
;
;
//To calculate the refractive index of the core
NA=0.39
delta=0.05
n1=NA/sqrt(2*delta)
printf("The refractive index of the core is %.3f",n1)
exit();
|
eb1598ae41f1e81cec7c1f52964aa41f32ddf0c6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3755/CH12/EX12.1/Ex12_1.sce | 4db44ca4995454ef4274bf8ae94f539942002833 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 436 | sce | Ex12_1.sce | clear
//
//
//
//Variable declaration
e=1.6*10^-19; //charge(coulomb)
c=3*10^8; //velocity of matter wave(m/s)
h=6.62*10^-34; //plank's constant(Js)
lamda=6328*10^-10; //wavelength(m)
//Calculation
E=h*c/(lamda*e); //energy of photon(eV)
p=h/lamda; //momentum of photon(kg m/s)
//Result
printf("\n energy of photon is %0.2f eV",E)
printf("\n momentum of photon is %0.2f *10^-27 kg m/s",p*10^27)
|
37197ad0e3f04a65faf90b6eb0556a0cf155a23a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1913/CH6/EX6.5/ex5.sce | 42d6bfa0e63c5d694c6895fa375214ae2a975b61 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,038 | sce | ex5.sce | clc
clear
//Input data
L1=0.225;//Thickness of the brick in m
K1=4.984;//Thermal conductivity of brick in kJ/hr m C/m
L2=0.125;//Thickness of insulating brick in m
K2=0.623;//Thermal conductivity of insulating brick in kJ/hr m C /m
Ti=1650;//Temperature inside the furnace in degree centigrade
hl=245.28;//Conductance at inside wall in kJ/hr m^2 C
ho=40.88;//Conductance at outside wall in kJ/hr m^2 C
To=27;//Temperature of surrounding atmosphere in degree centigrade
//Calculations
R=((1/hl)+(L1/K1)+(L2/K2)+(1/ho));//Total resistance of the wall in C hr/kJ
q=(Ti-To)/R;//Rate of heat loss per m^2 of the wall in kJ/hr m^2
T1=Ti-(q*(1/hl));//Inner surface temperature in degree centigrade
T3=Ti-(q*((1/hl)+(L1/K1)+(L2/K2)));//Outer surface temperature in degree centigrade
//Output
printf('(a)The rate of heat loss per sq m of the wall q = %3.2f kJ/hr m^2 \n (b)The temperature at the inner surface T1 = %3.2f degree centigrade \n (c)The temperature at the outer surface T3 = %3.2f degree centigrade ',q,T1,T3)
|
865eefdd8bf831e8eed0eb41f6337f52258a0b3d | 72bdc6d649588b61192529e7d1420ddc18d1a67a | /tema1/Ejemplo2Tema1.sce | 7fc88005c9289268ec3a2e50a21471e6d8cb4daf | [] | 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 | 423 | sce | Ejemplo2Tema1.sce | function x=distancia(vo,alfa,t),x=vo*cos(alfa)*t,endfunction
function y=altura(vo,alfa,g,t),y=vo*sin(alfa)*t-g*t^2/2,endfunction
vo=10;
g=10;
alfa1=%pi/6;
alfa2=%pi/3;
t1=0:0.01:1;
x1=distancia(vo,alfa1,t1);
y1=altura(vo,alfa1,g,t1);
t2=0:0.01:sqrt(3);
x2=distancia(vo,alfa2,t2);
y2=altura(vo,alfa2,g,t2);
plot(x1,y1,x2,y2)
title('Tiro parabólico rasante (en azul) y por elevación (en verde)')
xlabel('x')
ylabel('y') |
fe818604e05a90dd4b66da55f8fbe1e20f50e65d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2510/CH24/EX24.15/Ex24_15.sce | 760db22c0afa988896db7794f59dfc56e89923f9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 670 | sce | Ex24_15.sce | //Variable declaration:
t = 273 //Standard temperature (K)
v = 0.0224 //Volume of air occupied by 1 gmol of ideal gas (m^3)
V = 1100 //Volume of heat exchanger (m^3)
T = 22+273 //Temperature of heat exchanger (K)
x1 = 0.75 //gmols of hydrocarbon leaking from the exchanger (gmol)
//Calculation:
n = V*(1/v)*(t/T) //Total number of gmols of air in the room (gmol)
xHC = (x1/(n+x1))*10**6 //The mole fraction of hydrocarbon in the room (ppm)
ans = round((xHC*1000)*10**-1)/10**-1
//Result:
printf("1. The mole fraction of hydrocarbon in the room is : %f ppb .",ans)
|
fc32fb6bcb848421e3bba1ea0f7e22c1d50e86cb | 717ddeb7e700373742c617a95e25a2376565112c | /2474/CH6/EX6.6/Ch06Ex06.sce | 1d72e11dd9a70b5c1709b3d0fc2a6ed298f91f11 | [] | 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 | 808 | sce | Ch06Ex06.sce | // Scilab code Ex6.6: Pg.255 (2008)
clc; clear;
h = 6.626e-034; // Planck's constant, Js
m = 9.1e-031; // Mass of the electron, kg
h_cross = h/(2*%pi); // Reduced Planck's constant, Js
V_0 = 2*1.6e-019; // Height of potential step, J
E = 0.1*V_0; // Energy of incident electron, J
C = 2*sqrt(E)/(sqrt(E)+sqrt(E-V_0)); // Wave equation constant
alpha = sqrt(2*m*(V_0-E))/h_cross;
psi_square = zeros(100);
i = 1; // Index for array
for index = 0:0.1e-010:10e-010
x(i) = index
psi_square(i) = abs(C)^2*exp(-2*alpha*x(i));
i = i + 1;
end
clf()
plot2d(x, psi_square); // Plot psi_square vs x
title('Plot of |psi_square| vs x', 'fontsize', 4);
xlabel('x', 'fontsize', 3);
ylabel('|psi_square|', 'fontsize', 3);
// The attached graph shows the phenomenon |
d72bab2dba28f2bc86b9ab74f5a891f04e7102f2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3014/CH2/EX2.13/Ex2_13.sce | e7e5df6d9e1fa68e051b660fddd1a06915bd6ce9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 354 | sce | Ex2_13.sce | clc
//given that
del_x = 2e-9 // Uncertainty in position in m
h = 6.63e-34 // Plank constant
m = 9.1e-31 // mass of electron in Kg
printf("Example 2.13")
h_bar = h / (2*%pi) // constant
del_p = h_bar/(2*del_x) // Calculation of uncertainty in momentum
del_v = del_p/m
printf("\n Uncertainty in velocity of particle is %e m/s.\n\n\n",del_v)
|
b52df643290f6f4c6b7c7f8f151f2fbbe8876f52 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2045/CH1/EX1.20/Ex1_20.sce | 00b29d03f6d6ed910e16c66f74be340b239a145e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 505 | sce | Ex1_20.sce | //pagenumber 37 example 20
clear
un=1300;//centimetre square per velocity second
//at 300kelvin
ni=1.5*10^10;
u=500;//centimetre square per velocity second
conduc=1.6*10^-19*1.5*10^10*(un+u);
q=1/conduc;
//impurity of 1 atom included per 10^5 atoms
disp("resistivity at 300kelvin = "+string((q))+"ohm centimetre");
n=5*10^22/10^5;
p=ni^2/n;
q=1/(1.6*10^-19*(un*n+(u*p)));
disp("resistivity at impurity of 1 atom included per 10^5 atoms = "+string((q))+"ohm centimetre");
|
f158fd4f41a48537a5e94ac574a7610356c14006 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3020/CH12/EX12.3/ex12_3.sce | 39d8b93cc3fb33f9a17d57fab35ba40fa94ec1f6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 193 | sce | ex12_3.sce | clc;
clear all;
n1 = 1.55; // Refractive index of core
n2 = 1.50; // Refractice index of clad
NA = sqrt(n1^2-n2^2); // Numerical Aperture
disp('',NA,'The numerical aperture of fiber is')
|
78f6ce920182cc142362d944e2f58b69261d5d54 | 449d555969bfd7befe906877abab098c6e63a0e8 | /764/CH12/EX12.10.b/solution12_10.sce | f91e5cd0085e1d1294c966fb8fafd1efe66a7081 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 961 | sce | solution12_10.sce |
//Obtain path of solution file
path = get_absolute_file_path('solution12_10.sce')
//Obtain path of data file
datapath = path + filesep() + 'data12_10.sci'
//Clear all
clc
//Execute the data file
exec(datapath)
//Calculate the tension in the band on tight side P1 (N)
P1 = sigmat * w * t
//Calculate the tension in the band on the loose side P2 (N)
P2 = P1/(%e^(mu * theta * %pi/180))
//Calculate the actuating force on the lever P (N)
P = (P2 * d1 - P1 * d2)/(d3 + d1)
//Calculate the torque capacity of the brake Mt (N-m)
Mt = (P1 - P2)*R
//Check self-locking
if ((d1 / d2)>(%e^(mu * theta * %pi/180)))
printf("\nThe brake is not self-locking\n")
else
printf("\nThe brake is self-locking\n")
end
//Print results
printf("\nTension in the band on the tight side(P1) = %f N\n",P1)
printf("\nTension in the band on the loose side(P2) = %f N\n",P2)
printf("\nActuating force(P) = %f N\n",P)
printf("\nTorque capacity of the brake(Mt) = %f N-m\n",Mt/1000)
|
a3a6074540c78e94301bc0481eeae1e261b8face | 449d555969bfd7befe906877abab098c6e63a0e8 | /1332/CH1/EX1.31/1_31.sce | bc6ac9c61ad2f2f15ff3d3873a436c9723a9f7e2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 135 | sce | 1_31.sce | //Example 1.31
//Add
//Page no. 26
clc;clear;close;
a=0.4532e5;b=0.5427e7;
c=a+b
printf('Addition of %.4g and %.6g = %.6g',a,b,c) |
06c6d17b43f3dbbc809939c299907d7e145af472 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2990/CH5/EX5.8/Ex5_8.sce | cb28b1429013e4001cae4bedf5828d505844d605 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 716 | sce | Ex5_8.sce |
funcprot(0);
// Initialization of Variable
function[dms]=degtodms(deg)
d = int(deg)
md = abs(deg - d) * 60
m = int(md)
sd = (md - m) * 60
sd=(round(sd*100)/100)
dms=[d m sd]
endfunction
del1=75+14.0/60+20.0/3600;//declination in degrees
del2=70+12.0/60+30.0/3600;//declination in degrees
d=del1-del2;//difference in degrees
//calculation
k=cos(del1*%pi/180)/cos(del2*%pi/180);
A2=%pi/2-atan((cos(d*%pi/180)-k)/sin(d*%pi/180));
A2=A2*180/%pi;
A2=120+15.0/60+10.0/3600-A2;
CR=360-A2;
A2=degtodms(A2);
CR=degtodms(CR);
disp(A2,"azimuth of angle R in degree,minites,seconds respectively");
disp(CR,"true bearing of CR in degree,minites,seconds respectively");
clear()
|
f304ba7fa846669db7e3138dad1ec78d20718fda | 449d555969bfd7befe906877abab098c6e63a0e8 | /845/CH7/EX7.3/Ex7_3.sce | 1d02509dfd304fd08085f33fc801dd6b704a0838 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 907 | sce | Ex7_3.sce | //Example 7.3
clc
clear
x = 0:4;
y = [6.9897 7.4036 7.7815 8.1281 8.451];
n = length(x);
del = %nan*ones(n,5);
del(:,1) = y';
for j = 2:6
for i = 1:n-j+1
del(i,j) = del(i+1,j-1) - del(i,j-1);
end
end
del(:,1) = [];
n0 = length(del(1,:));
X = 2;
i = find(x==X);
dowy = 0;
for j = 1:n0
if j==2*int(j/2) then
add = del(i,j);
else
add = (del(i-1,j) + del(i,j))/2;
i = i-1;
if i==0 then
break
end
end
if add == %nan then
break
else
dowy(j) = add;
end
end
mprintf("%5s %6s %10s %9s %9s %9s",'x','y','dy','d2y','d3y','d4y')
disp([x' y' del])
mu = 1;
h = x(2) - x(1);
dy2 = mu/h*(dowy(1) - 1/6*dowy(3));
d2y2 = mu/h^2*(dowy(2)-1/12*dowy(4));
dy2 = round(dy2*10^4)/10^4;
d2y2 = round(d2y2*10^4)/10^4;
disp(dy2,"y''(2) = ")
disp(d2y2,"y''''(2) = ")
|
0434de9d279d3ffd1ad35b7b8d2f8c6d9b7a5e7e | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set14/s_Linear_Algebra_And_Its_Applications_G._Strang_70.zip/Linear_Algebra_And_Its_Applications_G._Strang_70/CH8/EX8.2.2/8_2_2.sci | 8693fb24e1257ef712ad98d95335d003cc231570 | [] | 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 | 214 | sci | 8_2_2.sci | errcatch(-1,"stop");mode(2);//page 238
;
;
A=[1 0 1 6 2;0 1 1 0 3];
b=[8 9]';
c=[0 0 7 -1 -3]';
lb=[0 0 0 0 0]'
ub=[];
[x,lagr,f]=linpro(c,A,b,lb,ub);
disp(x,'New corner:');
disp(f,'Minimum cost:');
//end
exit();
|
a10a9df81c10b54fa7bdf0ebe143b827cb1257f9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3669/CH6/EX6.8/8.sce | 42531043144f1909b5f311a44a7b4019020a3bc4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 608 | sce | 8.sce |
//Variable declaration
epsilon0=8.85*10**-12;
epsilonr=1.0000684; //dielectric constant of material
N=2.7*10**25; //number of atoms(per m**3)
E=10**6; //electric field(V/m)
e=1.6*10**-19;
Z=2; //atomic number
//Calculation
alpha_e=epsilon0*(epsilonr-1)/N; //electronic polarizability(F m**2)
r=(alpha_e/(4*%pi*epsilon0))**(1/3); //radius(m)
d=alpha_e*E/(Z*e); //displacement(m)
//Result
printf('radius is %0.3f *10**-11 m \n',(r*10**11))
printf('answer varies due to approximating off errors\n')
printf('displacement is %0.3f *10**-16 m \n',(d*10**16)) |
54400ab486c5fcb45a01eb4ca2c60a8a9627cc4d | 2cec6f9a0388bc4824a9c3e4395b0d14020c611a | /laboratorios/5/Grupo8.sci | 55b7adb29cd333673bb644895f18ab11df177d1b | [
"Artistic-2.0"
] | permissive | nandotorterolo/calculoNumerico | f281be6a984d4c7824633627e2c73ae8af75750d | dbc1431748aaed145f4bc44956c64a5dcc795c34 | refs/heads/master | 2021-01-21T04:53:56.844334 | 2016-06-27T13:50:02 | 2016-06-27T13:50:02 | 53,941,141 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 959 | sci | Grupo8.sci | // *****************************************
// * Universidad Católica del Uruguay
// * Cálculo Numérico 2016
// * Laboratorio 5
// * Eduardo Senturión - Federico González
// *****************************************
// Esta función se utiliza para saber quienes son los participantes del grupo
function Grupo=AlumnosDelGrupo()
Grupo = {};
Grupo.Nombre1 = "FernandoTorterolo";
Grupo.Nombre2 = "MartinDaRosa";
Grupo.Nombre3 = "PabloFernandez";
endfunction
// Implementacion de método iterativo general para sistemas lineales.
// A Matriz sparse [nxn]
// b Vector [nx1]
// x resultado de Ax = b
function x = ResolverTridiagonal(A, b)
[n m] = size(A)
AA = A
bb = b
for i=2:n
AA(i,2) = AA(i,2) - AA(i,1) * AA(i-1,3) / AA(i-1,2)
bb(i) = bb(i) - AA(i,1) * bb(i-1) / AA(i-1,2)
end
x(n) = bb(n) / AA(n,2);
for i = n-1:-1:1
x(i) = (bb(i)-AA(i,3)*x(i+1)) / AA(i,2)
end
x
endfunction
|
60ee2a05af8785f29ab2f826fef482029399a2e7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3204/CH16/EX16.11/Ex16_11.sce | ab81ec3122a30cf8f6c7ac2656a365f14c7d7965 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 376 | sce | Ex16_11.sce | // Initilization of variables
M=10 // kg // Here M=M_1=M_2
g=9.81 // m/s^2 // acc due to gravity
// Calculations
// Consider the respective F.B.D
// Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,
v=sqrt((M*g*4)/(25)) // m/s
// Results
clc
printf('The velocity of mass M_2 is %f m/s \n',v)
|
92e3b8284cc13fe6a4c720b738fffdfd5f2dc576 | 449d555969bfd7befe906877abab098c6e63a0e8 | /758/CH2/EX2.4/Ex_2_4.sce | fb1bcd1bf9aa0030e8fb0a0a5f9336e0ac0e0881 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,031 | sce | Ex_2_4.sce | //Example 2.4
clc;clear;close;
A=1;T=2;
w0=2*%pi/T;
//Calculation of trignometric fourier series co-efficients
a0=4*A/T*(integrate('t-0.5*T','t',-T/2,-T/4)+integrate('t','t',-T/4,T/4)+integrate('-t+0.5*T','t',T/4,T/2));
for n=1:10;
a(1,n)=2*4*A/T*(integrate('(t-0.5*T)*cos(n*w0*t)','t',-T/2,-T/4)+integrate('t*cos(n*w0*t)','t',-T/4,T/4)+integrate('(-t+0.5*T)*cos(n*w0*t)','t',T/4,T/2));
b(1,n)=2*4*A/T*(integrate('(t-0.5*T)*sin(n*w0*t)','t',-T/2,-T/4)+integrate('t*sin(n*w0*t)','t',-T/4,T/4)+integrate('(-t+0.5*T)*sin(n*w0*t)','t',T/4,T/2));
end
//Displaying fourier coefficients
disp(T,'fundamental period T= ',A,'Assumption: Amplitude A= ');
disp('Tignometric fourier series co-efficients:');
disp(a0,'a0= ');disp(a,'an= ');disp(b,'bn= ');
t=-T/2:0.01*T:T/2;
x=[-4*A/T*t(1:25)-2*A 4*A/T*t(26:75) -4*A/T*t(76:101)+2*A];
subplot(311);plot(t,x);
title('x(t)');xlabel('time t');
subplot(312);plot2d3(a);
title('Coefficients an');xlabel('n');
subplot(313);plot2d3(b);
title('Coefficients bn');xlabel('n'); |
fd75609bab11f8843f45e35e88830d58959a2417 | 13d93c2922005af35056d015f1ae3ebebe05ee31 | /scilab/physique/electromag/mvt_particule/meca_rfd_vec_particule.sce | 0d97b22db015b8fe115ec9621fe2f9ff6206fd19 | [] | no_license | scls19fr/openphysic | 647cc2cdadbdafd050d178e02bc3873bd2b07445 | 67bdb548574f4feecb99b60995238f12f4ef26da | refs/heads/master | 2021-04-30T23:16:26.197961 | 2020-11-16T20:21:17 | 2020-11-16T20:21:17 | 32,207,155 | 1 | 1 | null | null | null | null | ISO-8859-1 | Scilab | false | false | 10,093 | sce | meca_rfd_vec_particule.sce | // Mvt d'une particule dans un chp E et B
//
// Technique : application de la RFD
// méthode d'Euler
// par Sébastien CELLES
// Commencé le 06/02/2004
//
// Hyp : Terre = réf gali
// Système : particule chg
// Forces : Fe=qE
// Fm->=q v-> vectoriel B->
// Système de coordonnées : cartésien [ux uy uz]
// Horloge : t
//
// z
// / \ | ->
// / | \ \|/ g
// |
// | y
// | \
// +------------
// / O /
// | /
// |/
// x ---
//
clear
function [v]=crossP(v1,v2)
// le produit vectoriel en vectoriel...
// v1 et v2 doivent etre des matrices (3,n)
v=zeros(v1)
v(1,:) = v1(2,:).*v2(3,:) - v1(3,:).*v2(2,:)
v(2,:) = v2(1,:).*v1(3,:) - v2(3,:).*v1(1,:)
v(3,:) = v1(1,:).*v2(2,:) - v1(2,:).*v2(1,:)
endfunction
printf("\n");
printf("\n");
printf("Resolution d un probleme de mecanique terrestre en 3 dimensions \n");
printf("\n");
printf("\n");
printf("Calcul en cours... Patientez !\n");
printf("\n");
t_ini=0; // MODIFIABLE defaut : t_ini=0;
t_pas=1E-13; // MODIFIABLE defaut : t_pas=0.1;
t_fin=1E-10; // MODIFIABLE defaut : t_fin=10;
// Testé sur ATHLON-XP-2100 avec 2000 pts en même pas 1 seconde !
// Exemples
// Obus dang g
// t_ini = 0;
// t_pas = 0.001;
// t_fin = 1.2;
// m=1;
// q=0;
// g=9.81;
// OM_ini=[0 0 0];
// V0=10;
// %alfa=30;
// v_ini = [0 V0*cos(%alfa*2*%pi/360); V0*sin(%alfa*2*%pi/360)];
// e- dans B
// t_ini = 0;
// t_pas = 0.001;
// t_fin = 1.2;
// m = me;
// q = qe;
// h1 = 0;
// h2 = 0;
// g0 = 0;
// OM_ini = [0 0 0];
// V0 = 10
// %alfa = 5
// v_ini = [V0*sin(%alfa*2*%pi/360) 0 V0*cos(%alfa*2*%pi/360)];
// B=[0 0 1];
// A faire
// e- dans E
// e- dans E et B
t=[t_ini:t_pas:t_fin]'; // le prime sert à transposer pour avoir un vecteur colonne
N=size(t,'r');
// Constantes
g0 = 0; //9.81
g = [0 0 -g0]; // Accélération de la pesanteur MODIFIABLE defaut : g=[0 0 -9.81]; (9.81m*s^-2)
h1 = 0; // Coefficient de frottement visqueux Fv=h1*v
h2 = 0; // Coefficient de frottement fluide Ff=h2*v^2
qe = 1.6E-19; // Charge élémentaire
me = 9.109389E-31; // Masse d'un électron
mp = 1.672623E-27; // Masse d'un proton
mn = 1.676928E-27; // Masse d'un neutron
// k = ; // Constante de raideur du ressort Fr=k*(l-l0)
// l0 = 0.10; // Longueur à vide du ressort
// Gc = 6.67259E-11; // Constante de la loi de gravitation
// R1 = // Rayon de la planète 1
// M1 = // Masse de la planète 1
// R2 = // Rayon de la planète 2
// M2 = // Masse de la planète 2
// %epsilon_0 = 1/(4*%pi*8.98755178737E9);
// %mu_0 = 4*%pi*100E-9
// Système
m = me; // Masse MODIFIABLE defaut : m=1; (1kg)
q = qe;
// Conditions initiales
OM_ini = [0 0 0]; // Position initiale (MODIFIABLE)
V0 = 10;
%alfa = 5; // degré
//v_ini = [0 V0*cos(%alfa*2*%pi/360) V0*sin(%alfa*2*%pi/360)]; // Vitesse initiale (MODIFIABLE)
v_ini = [V0*sin(%alfa*2*%pi/360) 0 V0*cos(%alfa*2*%pi/360)];
F_ini = [0 0 0]; //m*g; // Penser à modifier la "force initiale" F(t=0) pour plus de précision et surtout dans la boucle
a_ini = F_ini/m; // RFD
// Initialisation
t_0=t_ini; // Instant courant
OM_t0=OM_ini; // Position courante
v_t0=v_ini; // Vitesse courante
a_t0=a_ini; // Accélération courante
F_t0=F_ini; // Force courante
OM_tm1=OM_ini; // Position précédente (t moins 1)
v_tm1=v_ini; // Vitesse précédente (t moins 1)
a_tm1=a_ini; // Accélération précédente (t moins 1)
F_tm1=F_ini; // Force précédente (t moins 1)
OM_tm2=OM_ini; // Position précédente (t moins 2)
v_tm2=v_ini; // Vitesse précédente (t moins 2)
a_tm2=a_ini; // Accélération précédente (t moins 2)
F_tm2=F_ini; // Force précédente (t moins 2)
OM_tp1=[0 0 0]; // Position suivante (t plus 1)
v_tp1=[0 0 0]; // Vitesse suivante (t plus 1)
a_tp1=[0 0 0]; // Accélération suivante (t plus 1)
F_tp1=[0 0 0]; // Force suivante (t plus 1)
OM=OM_ini; // Matrice des positions [x_0 y_0 z_0]
// [x_1 y_1 z_1]
// [x_2 y_2 z_2]
// [ . . . ]
v=v_ini; // Matrice des vitesses [vx_0 vy_0 vz_0]
// [vx_1 vy_1 vz_1]
// [vx_2 vy_2 vz_2]
// [ . . . ]
a=a_ini; // Matrice des accélérations [ax_0 ay_0 az_0] // A voir
// [ax_1 ay_1 az_1]
// [ax_2 ay_2 az_2]
// [ . . . ]
F=F_ini; // Matrice des forces [Fx_0 Fy_0 Fz_0]
// [Fx_1 Fy_1 Fz_1]
// [Fx_2 Fy_2 Fz_2]
// [ . . . ]
// Boucle sur la durée de l'expérience
k=0;
while N <> size(OM,'r') //t_0<=t_fin,
//****printf("*********** Nouvel instant t ***********\n");
t_0 = t_0 + t_pas;
k = k+1;
printf(".");
//****t_0
// Forces (MODIFIABLE mais ATTENTION !)
// Poids
P = m*g;
// Force de frottement visqueux
// Fv=-h1*v
Fv = - h1*v_t0;
// Force de frottement fluide
// Ff=-h2*v^2
if norm(v_t0)<>0
uv_t0 = v_t0/norm(v_t0); // Vecteur unitaire selon la direction de v à l'instant courant
else
uv_t0 = [0 0 0]; // cas où norm(v_t0) = 0
end
Ff = - h2*(v_t0*v_t0')*uv_t0;
// Force EM Fe + Fb
// Fe = q * E
E = [0 0 0]; // Champ électrique
Fe = q*E;
// Fb = q * (v vectoriel B) // Le produit vectoriel n'existe pas dans SciLab il faut "le faire" voir crossP
B = [0 0 1]; // Champ magnétique
Fb = q*((crossP(v_t0',B'))');
// Somme des forces
F_t0 = P + Fv + Ff + Fe + Fb;
// Relation Fondamentale de la Dynamique
// Somme des forces = m * accélération
// F=m*a
// a=F/m
a_t0=F_t0/m;
// Intégration 1 : vitesse
// a = (v_tp1-v_t0)/t_pas
v_tp1 = a_t0*t_pas + v_t0;
// Intégration 2 : position
// v = (M_tp1-M_t0)/t_pas
OM_tp1 = v_t0*t_pas + OM_t0;
// Mise à jour des matrices position, vitesse, force
//
//
//
OM = [OM ; OM_tp1];
v = [v ; v_tp1];
a = [a ; a_t0];
F = [F ; F_t0];
// Décalage
OM_t0=OM_tp1;
v_t0=v_tp1;
// a_t0=a_tp1;
// F_t0=F_tp1;
OM_tm1=OM_t0;
v_tm1=v_t0;
// a_tm1=a_t0;
// F_tm1=F_t0;
OM_tm2=OM_tm1;
v_tm2=v_tm1;
// a_tm2=a_tm1
// F_tm2=F_tm1;
end
// Fin de boucle
printf("\n"); // Retour à la ligne
printf("\n"); // Saut de ligne
printf("Fin des calculs !\n");
printf("\n");
// Mise en forme des résultats
// t (déja mis en forme)
xbasc() // ou xclear() permet d'effacer l'écran graphique
// x y z
x=OM(:,1); // (rem sur TI on ne peut pas récupérer les colonnes mais uniquement les lignes
y=OM(:,2); // alors (astuce !) on transpose on recupère une ligne et on retranspose)
z=OM(:,3);
//printf("\n");
//printf("Trajectoire dans le plan yz\n");
//plot2d(y,z);
//halt() //c'est une pause mais ça ne s'appelle pas pause() !
//xbasc() // ou xclear() permet d'effacer l'écran graphique
printf("\n");
printf("Trajectoire dans l espace\n"); // bizarrement SciLab n'aime pas l'aspostrophe
param3d(x,y,z);
//plot3d(x,y,z); Trace des surfaces
halt() //c'est une pause mais ça ne s'appelle pas pause() !
xbasc() // ou xclear() permet d'effacer l'écran graphique
// vx vy vz
vx=v(:,1);
vy=v(:,2);
vz=v(:,3);
printf("\n");
printf("Hodographe\n");
param3d(vx,vy,vz);
//printf("Hodographe dans le plan yz\n");
//plot2d(vy,vz)
//plot3d(vx,vy,vz);
halt() //c'est une pause mais ça ne s'appelle pas pause() !
xbasc() // ou xclear() permet d'effacer l'écran graphique
// ax ay az
ax=a(:,1);
ay=a(:,2);
az=a(:,3);
printf("\n");
printf("az = f(ax,ay)\n");
param3d(ax,ay,az);
//printf("az = f(ay)\n");
//plot2d(ay,az);
//plot3d(ax,ay,az);
halt() //c'est une pause mais ça ne s'appelle pas pause() !
xbasc() // ou xclear() permet d'effacer l'écran graphique
// Plan de phase x.=f(x)
// sqrt(vx^2+vy^2+vz^2) donne ||v->|| en fonction de t
// sqrt(x^2+y^2+z^2) donne ||M->|| en fonction de t
printf("\n");
printf("Plan de Phase\n");
NormV = sqrt(vx^2+vy^2+vz^2);
NormM = sqrt(x^2+y^2+z^2);
plot2d(NormM,NormV)
GLOBAL = [t,x,y,z,vx,vy,vz,ax,ay,az]; // Construction d'une variable contenant tous les résultats
halt()
printf("\n");
printf("\n");
printf("Tous les résultats sont dans les variables t,x,y,z,vx,vy,vz,ax,ay,az et GLOBAL\n");
printf("\n");
printf("\n");
printf("Sebastien CELLES\n");
printf("sebastien.celles@ac-limoges.fr\n");
xbasc()
|
dcd9c4360c9fdd52c39bae2af034681ea19c98ec | 449d555969bfd7befe906877abab098c6e63a0e8 | /3760/CH4/EX4.13/Ex4_13.sce | 0e19f3bb0d6dbdc53859efbbb910cfd48bff134f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 684 | sce | Ex4_13.sce | //The answer given in book for this question is wrong.
clc;
P=4;//No of poles
Ia=120;//armature current
A=4;//No of parallel paths for armature conductor
L=0.02//inductance in mH
//Et=L*(di/dt),Transformer emf in coil
//di=2*Ia/A,change of current during commutation
//dt=Tc,time of commutation
//Et=0.02*0.001*(60/Tc) ....(1)
//Er=2*(Bav*l*v),rotational emf in single turn coil
//Er=2*(phi_c/Tc) ....(2),phi_c is the avg value of flux in the commutating zone
//For linear commutation, Er=Et, from equation (1)&(2)
phi_c=60*0.02*0.001/2;//phi_c is the avg value of flux in the commutating zone
printf('THE AVG. VALUE OF FLUX IN THE COMMUTATING ZONE IS %f Wb.',phi_c)
|
5390d8f79f3285245ececbfd78f0c67a2a017702 | 3dbdc1a91ad07ea5fc4c4fa52a6fa2a6870125a6 | /calculo-numerico/gregoryNewton.sce | 0fa810db2b7e927a9c77436ef0056cfca6348641 | [
"Apache-2.0"
] | permissive | geovani-moc/Algoritmos | 226ceea9b599bb1979770ac001f5108a0533bb00 | d2d838c158da62a94946a7af29b24ca7396af34e | refs/heads/master | 2023-01-09T12:40:50.330766 | 2020-11-06T17:46:46 | 2020-11-06T17:46:46 | 256,744,544 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 794 | sce | gregoryNewton.sce | function pontoY = gregoryNewton(eixoX, eixoY, pontoX)
tamanho = length(eixoX);
vetor = eixoY;
for i = 1: tamanho -1
for j = tamanho : -1 : i+1
vetor(j) = vetor(j) - vetor(j-1);
end
end
u = ((pontoX - eixoX(1))/(eixoX(2) - x(1)))
pontoY = vetor(tamanho);
for i = tamanho-1 : -1: 1
pontoY = pontoY * (u - i + 1)/ i + vetor(i);
end
endfunction
x = 1 : 2 : 20;
y = x.**3 + x - 1;
resposta = gregoryNewton(x, y, 4);
disp(resposta);
x = 0 : 1 : 5;
y = [1 2 21 76 185 366];
resposta = gregoryNewton(x, y, 3.2);
disp(resposta);
x = [1.1 1.3 1.4 1.6 1.7 1.9];
y = [0.9048 0.7408 0.6703 0.5488 0.4966 0.4066];
resposta = gregoryNewton(x, y, 1.33);
disp(resposta); |
5dfdb0d870d0e001e65e3e62b0011bf3641ee3e4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3720/CH3/EX3.9/Ex3_9.sce | e5f18dc02dbc56845917b28fc1f60631681f64e7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex3_9.sce | //Example 3_9
clc;clear;funcprot(0);
// Properties
rho=1000; // The density of water in kg/m^3
g=9.81; // The acceleration due to gravity in m/s^2
// Given values
R=0.8;// Radius of solid cylinder in m
h_bottom=5;// m
A=0.8*1;// m^2
s=4.2;
h_c=s+R/2;// m
// Calculation
// (a)
F_x=(rho*g*h_c*A)/1000;//kN
printf('(a)Horizontal force on vertical surface F_x=%0.1f kN\n',F_x);
F_y=(rho*g*h_bottom*A)/1000;// kN
V=(R^2-(%pi*(R^2)/4))*1;// m^3
W=(rho*g*V)/1000;// kN
F_v=F_y-W;// kN
F_r=sqrt(F_x^2+F_v^2);// kN
theta=atand(F_v/F_x);// degree
printf('The hydrostatic force acting on the cylinder,F_r=%0.1f kN\n',F_r);
printf('The direction of the hydrostatic force acting on the cylindrical surface,theta=%0.1f degree\n',theta);
//(b)
W_cyl=F_r*sind(theta);// kN
printf('(b)The weight of the cylinder per m length,W_cyl=%0.1f kN\n',W_cyl);
|
d290133a0821e7225f4aad1212458b6f531dcee4 | b29e9715ab76b6f89609c32edd36f81a0dcf6a39 | /ketpic2escifiles6/Bowdata.sci | 48154cf1d81f6698b4e2d81154f7c0057921b5b0 | [] | no_license | ketpic/ketcindy-scilab-support | e1646488aa840f86c198818ea518c24a66b71f81 | 3df21192d25809ce980cd036a5ef9f97b53aa918 | refs/heads/master | 2021-05-11T11:40:49.725978 | 2018-01-16T14:02:21 | 2018-01-16T14:02:21 | 117,643,554 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 956 | sci | Bowdata.sci | //
// 08.05.22
// 08.08.24
function Pd=Bowdata(varargin)
global BOWMIDDLE BOWSTART BOWEND
Nargs=length(varargin);
PA=varargin(1);
PB=varargin(2);
Cut=0;
D=1/2*Vecnagasa(PB-PA);
if Nargs>=3
H=varargin(3)*D*0.2;
else
H=D*0.2;
end
H=min(H,D);
if Nargs>=4
Cut=varargin(4);
end
Ydata=MakeBowdata(PA,PB,H);
C=Mixop(1,Ydata);
r=Mixop(2,Ydata);
R1=Mixop(3,Ydata);
R2=Mixop(4,Ydata);
Rng='R=['+string(R1)+','+string(R2)+']';
Theta=(R1+R2)*0.5;
BOWMIDDLE=MixS([C(1)+r*cos(Theta),C(2)+r*sin(Theta)],Theta);
M=Mixop(1,BOWMIDDLE);
ThetaM=Mixop(2,BOWMIDDLE);
BOWSTART=PA;
BOWEND=PB;
if Cut==0
Pd=Circledata(C,r,Rng);
else
Alpha=R1; Beta=ThetaM-Cut/(2*r);
Rng='R=['+string(Alpha)+','+string(Beta)+']';
Pd=Circledata(C,r,Rng);
Alpha=ThetaM+Cut/(2*r); Beta=R2;
Rng='R=['+string(Alpha)+','+string(Beta)+']';
Tmp=Circledata(C,r,Rng);
Pd=[Pd;%inf,%inf;Tmp];
end
endfunction
|
7addbb14c8795a91afcd996d46e35f00674b34cd | 449d555969bfd7befe906877abab098c6e63a0e8 | /3774/CH7/EX7.10/Ex7_10.sce | 459f61a1765f4dcfd6d8310901e6b371478da41f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,111 | sce | Ex7_10.sce | // exa 7.10 Pg 212
clc;clear;close;
// Given Data
d=35;// mm
d2=125;// mm
n=6;// factor of safety
T=800;// N.m
N=350;// rpm
tau_s=63;// MPa
tau_b=56;// MPa
tau_CI=10;// MPa
tau_k=46;// MPa
// Diameter of bolts:
F=2*T*10**3/d2/n;// N
//%pi/4*db**2*tau_b=F
db=sqrt(F/(%pi/4*tau_b));// mm
printf('\n (i) Diameter of bolts = %.2f mm. Use 8 mm.',db)
// Flange thickness
d1=2*d;// mm
//T=%pi/2*d1**2*t2*tau_CI
t2=T*1000/(%pi/2*d1**2*tau_CI);// mm
printf('\n (ii) Flange thickness = %.1f mm. Use t2 = 12 mm',t2)
t2=12;// mm
//Key dimensions
b=10;// mm (width of key)
t=7;// mm (from tables)
//T=l*b*tau_k*d/2
l=T*10**3/(b*tau_k*d/2);// mm
l=ceil(l);// mm
printf('\n (iii) Length of key = %.f mm\n\t\td=%.f mm\n\t\tb=%.f mm',l,d,b)
// Hub length
lh=l;// mm (length of hub)
printf('\n (iv) Hub length = %.f mm',l)
tau_c=T*10**3/(%pi/16*(d1**4-d**4)/d1);// N/mm.sq.
printf('\n shear stress in hub = %.2f N/mm.sq.',tau_c)
printf('It is nearly equal to %.f N/mm.sq.',tau_CI)
printf('\n hence design parameters are fine.')
// Power transmitted
P=2*%pi*N*T/60/10**3;// kW
printf('\n (v) Power transmitted = %.2f kW',P)
|
8f15734a1aa08b07e470e62c852e77f865df7338 | 449d555969bfd7befe906877abab098c6e63a0e8 | /605/CH3/EX3.6/3_6.sce | 1b4eca845c70f14847a16e89199fb84da54f916d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 405 | sce | 3_6.sce | //data
Zin=45 //ohm
ZL=20 //ohm
b=0.5/2 //cm
Er=2.1
L=200*10^-9 //H
f=3*10^9 //Hz
C=55.63*Er*10^-12 //F
//formulas and result
printf("\nresult:-")
Zo=sqrt(Zin*ZL)
printf("\nZo=%.0f ohm",Zo)
k=30/sqrt(200*10^-9/(55.63*Er*10^-12))
a=b/exp(k)
printf("\na=%f cm",a)
lambda=1/(f*sqrt(L*C))
printf("\nlambda=%f m",lambda)
d=lambda/4
printf("\nd=%f m =%f cm",d,d*100) |
f4d961bfa5bb9c9d4e64fc37b996d57c314834e9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1322/CH15/EX15.1/114ex1.sce | d93082c01683ea324091a479ea6d81fdaf9fdc9f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 515 | sce | 114ex1.sce |
//simplify (a+b)/(a^2-b^2)
clear;
clc;
close;
//as, by formula,(a^2-b^2)=(a+b)(a-b)
mprintf("\n (a+b)/((a+b)(a-b)) => 1/(a-b) \n")
|
f9e50474db2ca67c22d7e3bc5a6b1aecb9fe0ad9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1892/CH1/EX1.3/Example1_3.sce | 2aa9445b78cc139c1c5cc670a81ae65d608c2b56 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 263 | sce | Example1_3.sce | // Example 1.3
clear; clc; close;
format('v',6);
// Given data
P=4;//No. of poles
f=50;//in Hz
N=1470;//in rpm
//Calculations
Ns=120*f/P;//in rpm
S=(Ns-N)/Ns;//Slip
fr=S*f;//induced emf frequency in Hz
disp(fr,"Induced emf frequency in Hz : ");
|
a934f0ca97983af979e0574587d1c6561d259c50 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1910/CH6/EX6.10/Chapter610.sce | a082fd288195ce858e425ba1ac203230e92ed1f0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,286 | sce | Chapter610.sce | // Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
clear;
clc;
disp("Introduction to heat transfer by S.K.Som, Chapter 6, Example 10")
//Wind at a speed of U=36km/hr blows over a flat plate of length,L=6m .If the density and kinematic viscosity of air are rho=1.2kg/m^3 and mu=1.5*10^-5m^2/s respectively.
U=36;
L=6;
rho=1.2;
mu=1.5*10^-5;
//Wind velocity in m/s is Uinf
disp("Wind velocity(Uinf)in m/s is")
Uinf=U*1000/3600
//Reynolds number is given by ReL=L*Uinf/mu
disp("Reynolds number is")
ReL=L*Uinf/mu
//We consider that transition of boundary layer takes place from laminar to turbulent takes place at ReL=5*10^5.
//Therfore the corresponding friction coefficient is given by CbarfL=(0.074-ReL^(1/5))-(1742/ReL)
disp("Friction coefficient is")
CbarfL=(0.074/ReL^(1/5))-(1742/ReL)
//Drag force on one side of the plate per unit metre width is given by FD=CbarfL*rho*Uinf^2*L/2
disp("Drag force on one side of the plate per unit metre width in Newton is ")
FD=CbarfL*rho*Uinf^2*L/2
//The turbulent boundary layer thickness at the trailing edge is given by delta=L*(0.379/ReL^(1/5))
disp("The turbulent boundary layer thickness at the trailing edge in metre is ")
delta=L*(0.379/ReL^(1/5))
|
fb537ea43d72886af8f681c0114e4404217f2328 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3369/CH2/EX2.8/Ex2_8.sce | 887ff754ee620ebe48bded6325d7e6d4ea366107 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 775 | sce | Ex2_8.sce | //Chapter 2, Exmaple 8, page 70
//Calculate the volume of the insulator
clc
clear
//Thinkness of graded design
V = 150*sqrt(2)
Ebd = 50
T = V/Ebd
printf("\nThickness of graded design= %e cm \n",T)
//Based on figure 2.24
r = 2 // radius of the conductor
l = 10 //length of graded cylinder; The textbook uses 10 instead of 20
zr = l*(T+r)
printf("Curve = %e cm^2 \n",zr)
//Volume of graded design V1
V1 = 4*%pi*zr*(zr-r)
printf("V1 = %e cm^3 \n",V1) //Unit is wrong in the textbook
//Thickness of regular design as obtained form Eq.2.77
pow = V/(2*Ebd)
t = 2*(%e^pow-1)
printf("Thickness of regular design = %e cm \n",t)
//Volume of regular design V2
V2 = %pi*((2+t)^2-4)
printf("V2 = %e cm^3 \n",V2)//unit not mentioned in textbook
//Answers may vary due to round off error
|
b812f9ea459c63d7d4c5f1475f944283b141e23e | d8c4bf9ddb7db18c69e9e5e543d546b8dd4338d2 | /userland/bin/utils/e/expr/test/backup/precedence1.tst | f6b5fc83516021f34da6ae44c9762c8a11fd589f | [] | no_license | r-tty/QRV | aac7bb7167f8dc630be54c041169a4867e8e963f | 87d22fc3c3b8e14902643fa987af8ba06bda2a8a | refs/heads/master | 2022-07-27T13:40:02.469769 | 2021-12-09T12:57:19 | 2021-12-09T12:57:19 | 322,424,788 | 2 | 2 | null | null | null | null | UTF-8 | Scilab | false | false | 1,328 | tst | precedence1.tst | expr 12 \| 34 \| 12 \| 34
expr 12 \| 34 \| \( 12 \| 34 \)
expr \( 12 \| 34 \) \| 12 \| 34
expr \( 12 \| 34 \) \| \( 12 \| 34 \)
expr 12 \| 34 \& 34 \& 13
expr 12 \| 34 \& \( 34 \& 13 \)
expr \( 12 \| 34 \) \& 34 \& 13
expr \( 12 \| 34 \) \& \( 34 \& 13 \)
expr 12 \| 34 != 12 = 34
expr 12 \| 34 != \( 12 = 34 \)
expr \( 12 \| 34 \) != 12 = 34
expr \( 12 \| 34 \) != \( 12 = 34 \)
expr 34 \& 13 \& 34 \& 13
expr 34 \& 13 \& \( 34 \& 13 \)
expr \( 34 \& 13 \) \& 34 \& 13
expr \( 34 \& 13 \) \& \( 34 \& 13 \)
expr 34 \& 13 != 12 = 34
expr 34 \& 13 != \( 12 = 34 \)
expr \( 34 \& 13 \) != 12 = 34
expr \( 34 \& 13 \) != \( 12 = 34 \)
expr 34 \& 13 - 12 + 34
expr 34 \& 13 - \( 12 + 34 \)
expr \( 34 \& 13 \) - 12 + 34
expr \( 34 \& 13 \) - \( 12 + 34 \)
expr 12 = 34 != 12 = 34
expr 12 = 34 != \( 12 = 34 \)
expr \( 12 = 34 \) != 12 = 34
expr \( 12 = 34 \) != \( 12 = 34 \)
expr 12 = 34 - 12 + 34
expr 12 = 34 - \( 12 + 34 \)
expr \( 12 = 34 \) - 12 + 34
expr \( 12 = 34 \) - \( 12 + 34 \)
expr 12 = 34 / 4 \* 6
expr 12 = 34 / \( 4 \* 6 \)
expr \( 12 = 34 \) / 4 \* 6
expr \( 12 = 34 \) / \( 4 \* 6 \)
expr 12 + 34 - 12 + 34
expr 12 + 34 - \( 12 + 34 \)
expr \( 12 + 34 \) - 12 + 34
expr \( 12 + 34 \) - \( 12 + 34 \)
expr 12 + 34 / 4 \* 6
expr 12 + 34 / \( 4 \* 6 \)
expr \( 12 + 34 \) / 4 \* 6
expr \( 12 + 34 \) / \( 4 \* 6 \)
|
b8d8157a7fec4a0de854cdcfe8d069d4966969f4 | 01697f0dc71290a6b6e233849a73d19a883845f1 | /sem01/lab01/q10.sce | cb9bbda110513e87d663f0cab9a985c7fa3979d4 | [] | no_license | aaruni96/Math-Lab | 5d83a13547308bd9d1b7daa28be29a49e1020fbd | 488469c9aba9251f5725e0851fb19e2aef38d234 | refs/heads/master | 2021-01-12T06:29:53.790743 | 2018-04-27T09:21:40 | 2018-04-27T09:21:40 | 77,370,232 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 88 | sce | q10.sce | //sum of naturals between x and y
clc;
clear;
x=70;
y=25;
(x*(x+1)/2) - (y*(y+1)/2) + y
|
850abbd70e912ce6ac3a9f7560aa556238dc8771 | 2ae858a680a4ccf8a2ec89a45a1e48a0292d8eab | /macros/imgaussfilt3.sci | 1e8064946c5aec7860151f14e77945835a45f4a5 | [] | no_license | shreyneil/FOSSEE-Image-Processing-Toolbox | f315a82c325b2d6cbd0611689f3e30071a38490d | dd1cbd0dcbe0c3dd11d6ce1ab205b4b72011ae56 | refs/heads/master | 2020-12-02T16:26:13.755637 | 2017-07-07T19:22:33 | 2017-07-07T19:22:33 | 96,552,147 | 0 | 0 | null | 2017-07-07T15:32:15 | 2017-07-07T15:32:15 | null | UTF-8 | Scilab | false | false | 1,749 | sci | imgaussfilt3.sci | // Copyright (C) 2015 - IIT Bombay - FOSSEE
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Author: Shreyash Sharma
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
function [outputImg]=imgaussfilt3(inputImage, filter_height, filter_width, sigmaX, sigmaY)
// This function is used for 3-D Gaussian filtering of 3-D images
//
// Calling Sequence
// B=imgaussfilt3(A, filter_height, filter_width, sigmaX, sigmaY)
//
// Parameters
// A: image matrix of the source image.
// filter_height: height of the Gaussian filter, specified as a scalar
// filter_width: width of the Gaussian filter, specified as a scalar
// sigmax: Standard deviation in x of the Gaussian distribution, specified as a numeric, real, positive scalar.
// sigmay: Standard deviation in y of the Gaussian distribution, specified as a numeric, real, positive scalar
// B : output image with it's histogram matching similar to a given reference image.
//
// Description
// imgaussfilt3(___,Value,...) filters 3-D image A with a 3-D Gaussian smoothing kernel with parameters used to control aspects of the filtering.
//
// Examples
// img = imread("lena.jpeg");
// imshow(img);
// filtered_img = imgaussfilt3(img, 9, 9, 3, 3);
// imshow(filtered_img);
//
inputList=mattolist(inputImage);
outputList=raw_imgaussfilt3(inputList, filter_height, filter_width, sigmaX, sigmaY);
for i=1:size(outputList)
outputImg(:,:,i)=outputList(i)
end
endfunction
|
124232483374de4617eac90ec42c2337cb3f6369 | 449d555969bfd7befe906877abab098c6e63a0e8 | /191/CH5/EX5.3/Example5_3.sce | bb5c0e703c1db1817b6fe997503e4d96e8fccd6f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 777 | sce | Example5_3.sce | //Divided difference for the functin = ln(x)
clc;
clear;
close();
format('v',9);
x = [1 1.5 1.75 2];
fx = [0 0.40547 0.55962 0.69315];
fab(1) = (fx(2)-fx(1))/(x(2)-x(1));
fab(2) = (fx(3)-fx(2))/(x(3)-x(2));
fab(3) = (fx(4)-fx(3))/(x(4)-x(3));
fabc(1)= (fab(2)-fab(1))/(x(3)-x(1));
fabc(2)= (fab(3)-fab(2))/(x(4)-x(2));
fabcd(1)= (fabc(2)-fabc(1))/(x(4)-x(1));
disp(fx',fab,fabc,fabcd,'Divided difference columns : ')
//We can redraw the table, the existing entries does not change
x(5)=1.1;
fx(5)=0.09531;
fab(4) = (fx(5)-fx(4))/(x(5)-x(4));
fabc(3)= (fab(4)-fab(3))/(x(5)-x(3));
fabcd(2)= (fabc(3)-fabc(2))/(x(5)-x(2));
fabcde(1)=(fabcd(2)-fabcd(1))/(x(5)-x(1));
disp(fx',fab,fabc,fabcd,fabcde,'Divided difference columns after addition of an entry : ') |
856d07a2ed9c0629afbab934d9d9cb73ee502bda | 449d555969bfd7befe906877abab098c6e63a0e8 | /181/CH6/EX6.9/example6_9.sce | 273bac7df7ad3c1033fd2b40b5e22e26164078a6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 663 | sce | example6_9.sce | // Find Id,Vgs,Vds,region of operation
// Basic Electronics
// By Debashis De
// First Edition, 2010
// Dorling Kindersley Pvt. Ltd. India
// Example 6-9 in page 277
clear; clc; close;
// Given data
Idss=4*10^-3; // Drain current in mA
Vp=-2; // Peak voltage in V
Vdd=10; // Supply voltage in V
Vgs=0; // Gate source voltage in V
// Calculation
Id=Idss*(1-(Vgs/Vp));
printf("(a)Id = %0.0e A\n",Id);
printf("(b)Since Id=Idss, Vgs=0 V\n");
Vds=10-Vgs;
printf("(c)Vds = %0.0f V\n",Vds);
printf("Since Vds=10V>Vgs-Vp=2V,Active region operation of upper JFET is confirmed");
// Result
// (a) Id = 4 mA,
// (b) Vgs = 0 V,
// (c) Vds = 10 V |
175259ca290d3f8ea57a79cb9a90bf92936ecb8c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3504/CH2/EX2.7/Ex2_7.sce | 23cebb3d6a9a5c1e33e62db14f4d761d23d48249 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 295 | sce | Ex2_7.sce | //To calculate the power delivered by the source in the given circuit.
clc;
Z=[3+%i*1 -%i -2;-%i 2+%i*3 -%i*2;-2 %i*2 3+%i*1]
D=det(Z)
Z_1=[15.7 -%i -2;0 2+%i*3 -%i*2;0 %i*2 3+%i*1]
D_1=det(Z_1)
V_1=D_1/D
//Power delivered =V_1*I*cos(theta)=Real(V_1*I),which on simplification equals 100 watts.
|
75b3927dfc7e3be3b6227aef25bbd2a1b64d395a | fbeda28462ab76013926f23ca12636fbd69c9828 | /Q2CAAT-Old/Resources/Files/sfdxurl.TST | 86ad2c078f7695d8e34c70e22f24f79a6909f0d1 | [] | no_license | QuestTestAutomation/RobotFrameworkTraining | 207e0e82550ac379623dbbf8b5f5e8c0ebb3d9ac | 54d83ac2d41612e1ce353497b08c7d9bacbd466d | refs/heads/master | 2021-02-09T21:39:39.015994 | 2020-04-03T06:47:35 | 2020-04-03T06:47:35 | 244,326,729 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 154 | tst | sfdxurl.TST | force://PlatformCLI::5Aep861kyKookAQmYCEui02X5nflcbf1myl4gETUaiedXrf.QFlZ2KtPeJ_NDX4RJXDwGzp0TMFSmYKP1M.EdzN@questsoftware--SFDCTST.cs23.my.salesforce.com |
82a4fe32583a24ff8a339b6469cd5f3c051bb148 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1409/CH8/EX8.14/8_14.sce | aa566fbf8b6f207e7d79fadb782f90554709aede | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,173 | sce | 8_14.sce | clc;
//page no 8-52
//Example 8.14
//Let Csmax/Csmin be denoted by C
fmin=500;//in kHz
fmax=1600;//in kHz
IF=465;//in kHz
C=(fmax/fmin)^2;
fomin=fmin+IF;
fomax=fmax+IF;
disp(C,'Csmax/Csmin=');
disp(+'kHz',fomin,'fomin=');
disp(+'kHz',fomax,'fomax=');
//Let Comax/Comin be denoted by C1
C1=(fomax/fomin)^2;
disp(C1,'Comax/Comin=');
Csmax=350//in pF
Csmin=Csmax/C;
disp(+'pF',Csmin,'Csmin=');
//We know that
//C=[Csmax(Csmin+Cp)/Csmin(Csmax+Cp)]
//4.58=350/34.2*((34.2+Cp)/(350+Cp))
Cp=221.3;//in pF
Comax=(Csmax*Cp)/(Csmax+Cp);
Comin=(Csmin*Cp)/(Csmin+Cp);
disp(+'pF',Comax,'Comax=');
disp(+'pF',Comin,'Comin=');
//Rounding Comax
Comax1=135.5;
//The oscillator coil frequency can be calculated as
Lo=[1/[(2*%pi*(fomin*10^3))^2*(Comax1*10^-12)]]*10^6;//Answer was given wrong in the text book
disp(+'microHenry',Lo,'Oscillator coil frequency is');
//At 1000 kHz
f=1000;//in kHz
fomid=f+IF;
Comid=Comax/(fomax/fomid)^2;
Comid1=68.2;
disp(+'pF',Comid,'Comid=');
Csmid=1/[(1/Comid1)-(1/Cp)];
disp(+'pF',Csmid,'Csmid=');
fsmid=fmax/sqrt(Csmax/Csmid);
disp(+'kHz',fsmid,'fs"'mid=");
Terr=fsmid-f;
disp(+'kHz',Terr,'Tracking error is');
|
b4ed614128c6024763e04055da37f945f36ae9a3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2495/CH8/EX8.23.4/Ex8_23_4.sce | 47f17da5fe8ce278641eaf8e9c478ef2a56be661 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 269 | sce | Ex8_23_4.sce | clear
clc
K1=1;//
K2=1.66*10^6;//in dm^3/mol
Keq=(K1/K2);//equilibrium constant in mol/dm^3
RT_F=0.05913;//in V
n=1;//
Ecell=RT_F/n*(log10(Keq))
printf('Ecell=%.4f V',Ecell)
E_h=0.337;//
n2=2
Ecell_2=n2*E_h
printf('\nEcell_2=%.3f V',Ecell_2)
//page 544
|
7094d88042ae7fd4a1c57026248b0bf810d6312a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1640/CH1/EX1.20/1_20.sce | 711e1d7748fd136a072c2e789adf9922b7e1dcc8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 386 | sce | 1_20.sce | clc
//initialisation of variables
l= 5 //ft
h= 20 //in
n= 1/15
AG= 50 //in
x= 30 //in
w= 62.4 //lb/ft^3
//CALCULATIONS
AG1= AG/(1+n)
G1G2= n*x/(1+n)
W= l^2*w*(l/2)
h1= 32 //in
BK= h1/2
GK= 10 //in
G1K= (AG+GK)-AG1
BG1= BK-G1K
BM= (l^4/12)*2*12/(l^3*BK*n)
G1M= BM+BG1
o= atand(G1G2/G1M)
//RESULTS
printf ('angle through which the cube will tilt = %.f degrees ',o)
|
307af76b6ed6ecbba3008f5a25945a7f0be79727 | 449d555969bfd7befe906877abab098c6e63a0e8 | /32/CH11/EX11.20/11_20.sce | e729be4bc1486eb5171dd2908df4654a9399b087 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,268 | sce | 11_20.sce | //pathname=get_absolute_file_path('11.20.sce')
//filename=pathname+filesep()+'11.20-data.sci'
//exec(filename)
//Height of chimney(in m):
H=45
//Temperature of burnt gases(in K):
Tg=630
//Air requirement(in kg air per kg of fuel burnt):
m=15
//Ambient air temperature(in K):
Ta=300
//Minimum temperatre of artificial draught(in K):
Tga=150+273
//Specific heat of flue gases(in kJ/kg.K):
Cpg=1.005
//Calorific value of fuel(in kJ/kg):
C=30000
//Draught (in mm of water column):
hw=353*H*(1/Ta-(m+1)/(m*Tg))
//Draught (in metres of hot gas column):
hg=H*(m/(m+1)*Tg/Ta-1)
//Temperature of chimney for maximum discharge(in K):
Tgmax=Ta*2*(m+1)/m
//Chimney efficiency:
n=9.81*H*(m/(m+1)*Tg/Ta-1)/(Cpg*(Tg-Tga)*10^3)*100
//Extra heat carried away by flue gases(in kJ):
Q=(m+1)*Cpg*(Tg-Tga)
//Percentage heat spent in natural draught:
nn=Q/C*100
printf("\n RESULT \n")
printf("\nDraught = %f mm of water",hw)
printf("\nDraught = %f metres of hotgas column",hg)
printf("\nTemperature of chimney gases for maximum discharge = %d K",Tgmax)
printf("\nChimney efficiency = %f percent",n)
printf("\nExtra heat carried away by flue gases per kg of fuel burnt = %f kJ",Q)
printf("\nPercentage heat carried away in natural draught = %f percent",nn) |
50f0e0e244d48cf332c04274b4739f255e633ac0 | 13c3ed7bef4d80dabd836219bbf4396f07cb934a | /myfun.sci | f787a5dca3892bbfc961445a412d9886cfc74dd3 | [] | no_license | Mushirahmed/scilab_workspace | 99f489a110a5e295ce9fca9991122d14840018d3 | f58b91b87bb0357fff82dcb97b05541e7e976eca | refs/heads/master | 2021-01-10T15:48:40.576771 | 2016-02-10T10:32:46 | 2016-02-10T10:32:46 | 43,348,489 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 79 | sci | myfun.sci | function[x,y] = myfun(a,b)
m=a^2+b^2
x = m+b;
y = m-b;
endfunction
|
e55323301f9cdd9250868f58e673c9c9b94ff223 | 093c81dec9d9f129f6b39e0cd1271068a60950b5 | /util.sce | ed87b1dec979b4472253223cda2576f3b200b8c0 | [] | no_license | Erffa/scilab | 8757d722358a8f8aa0c9ed9c2af65822cc2c7f6f | cabae3f7f0a4a967040043dca86d7238498af148 | refs/heads/master | 2020-06-01T20:36:03.768920 | 2019-07-12T09:30:20 | 2019-07-12T09:30:20 | 190,919,208 | 0 | 0 | null | 2019-07-12T09:33:07 | 2019-06-08T18:00:06 | Scilab | UTF-8 | Scilab | false | false | 4,924 | sce | util.sce |
/////////////////////////////////////////////////////////////////
// LA FONCTION ETUDIE : EGGHOLDER
/////////////////////////////////////////////////////////////////
function [y]=f_eh(x)
x1 = x(1)
x2 = x(2)
//y=-(x2-47)*sin(sqrt(abs(x2+x1/2+47))) - x1*sin(sqrt(abs(x1-(x2+47))))
y=-(x(2,:)+47).*sin(sqrt(abs(x(1,:)./2 + x(2,:) + 47))) - x(1,:).*sin(sqrt(abs(x(1,:) - x(2,:) - 47)))
// c'est bon pour le moral
//y=-20*exp(-.2*sqrt(.5*(x1*x1 + x2*x2)) ) - exp(.5*cos(2*%pi*x1+2*%pi*x2)) + %e + 20
endfunction
B_eh=[-512 512;-512 512];
//B_eh=[-5 5;-5 5];
sol_eh=[512 ; 404.2319];
/////////////////////////////////////////////////////////////////
// CREATION D ECHANTILLON
/////////////////////////////////////////////////////////////////
// Créer un ensemble aléatoire de n vecteurs dans l'espace bornés défini par B
// INPUT
// B : matrice d*2 : bornes de l'ensemble de la forme B=[xmin xmax ; ymin ymax ; ...]
// n : nombre de vecteurs aléatoires créer
// OUTPUT
// X : matrice d*N : ensemble des vecteurs aléatoires créés
function [X]=samp_alea(B,n)
[d,_]=size(B);
X=zeros(d,n);
for li=1:d do
X(li,:)=B(li,1)+(B(li,2)-B(li,1))*rand(1,n);
end
endfunction
// Créer un ensemble aléatoire de n points dans l'espace bornés défini par B respectant
// les conditions d'un carré latin : même espacement selon coords, coordonnées uniques
// INPUT
// B : matrice d*2 : bornes de l'ensemble de la forme B=[xmin xmax ; ymin ymax ; ...]
// n : nombre de vecteurs aléatoires créer
// OUTPUT
// X : matrice d*N : ensemble des vecteurs aléatoires créés
function [X]=LatinHypercube(B,n)
[d,_]=size(B);
X=zeros(d,n);
for li=1:d do
X(li,:) = samwr( n , 1 , linspace(B(li,1),B(li,2),n) )';
end
endfunction
function test_LatinHypercube()
n=5;
B=[0 10 ; 0 5];
LH=LatinHypercube(B,n);
clf
gca().tight_limits=['on','on'];
gca().data_bounds= [B(1,1)-1 B(2,1)-1 ; B(1,2)+1 B(2,2)+1];
gca().isoview='on';
gca().auto_scale='off';
plot(LH(1,:),LH(2,:), "+");
for i=1:n do
// ligne horizontale
plot( B(1,:) , [LH(2,i),LH(2,i)] );
// ligne verticale
plot( [LH(1,i),LH(1,i)] , B(2,:) );
end
endfunction
////////////////////////////////////////////////////
// DDELETE TOUS LES TAGS
////////////////////////////////////////////////
// Permet de supprimer tous les éléments graphiques d'un certain tag
// INPUT
// tag : le tag rechercher
function destroy(tag)
f = findobj(tag);
while f<>[] do
delete(f);
f=findobj(tag);
end
endfunction
/////////////////////////////////////////////////////////////////
// CALCUL DE LA PSO
/////////////////////////////////////////////////////////////////
// RECHERCHE MINIMUM
////////////////////////////
function [a,b] = mincol(x,f)
[n,m]=size(x)
a=x(:,1)
b=1
for i = 1:m
if f(a) > f(x(:,i)) then
a=x(:,i)
b=i
end
end
endfunction
function [a,b] = mincol_abs(x,f)
//
[n,m]=size(x)
a=x(:,1)
b=1
for i = 1:m
if abs(f(a)) > abs(f(x(:,i))) then
a=x(:,i)
b=i
end
end
endfunction
/////////////////////////////////////
// CRITERE CONVERGENCE
////////////////////////////
// Calcul le centre gravité d'un nuage de points P de poids W
// INPUT
// P : matrice d*n : les n vecteurs colonnes de dim d
// W : matrice 1*n : les poids des vecteurs
// OUTPUT
// G : matrice d*1 : position du centre de gravité
function G=GravityCenter(P,W)
// somme des poids
p=sum(W)
// pondération des points
Ppond=P*diag(W)
// somme pondérée
sumPond=sum(Ppond,"c")
// moyenne pondere
G=sumPond/p
endfunction
// Calculer le cercle de centre le centre de gravité d'un nuage de point et qui
// encercle tous les points
// INPUT
// P : matrice d*n : les n vecteurs de dim d à encercler
// OUTPUT
// G : matrice d*1 : position du centre de gravité
// r : rayon du cercle entourant tous les points
function [G,r]=Surround(P)
//
[d,n]=size(P)
// définit le centre de masse
// par défaut, poids à 1 -> donner masse plus importante aux sols proches ?
W=ones(n,1)
G=GravityCenter(P,W)
// on calcule la distance (carré entre les points et le centre du cercle à la recherche
// de la distance maximale, qui donnera rayon cercle
// R2 : liste des rayons au carré
dif = P-kron(ones(1,n),G)
R2 = sum(dif.*dif, "r")
r = sqrt(max(R2))
endfunction
//////////////////////////////////////
// BORNER LES POINTS
//////////////////////////
// x : matrice d,n : les n points de dimensions d à borner
// b : matrice d,2 : pour chaque coef, la borne inf et sup
function bx=bound_x(x,b)
bx=x
[d,n]=size(bx)
for li=1:d do
bx(li,:)=min(b(li,2),max(b(li,1),bx(li,:)))
end
endfunction
|
a552b62f6f6b1ff7ed806c1ebab5c51fbf55b36c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1892/CH4/EX4.6/Example4_6.sce | 801233c1c22557f8e1f9b84b6f69ac2104c0a0d8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 743 | sce | Example4_6.sce | // Example 4.6
clear; clc; close;
format('v',9);
// Given data
lm=6*10^-3;//magnet length in m
g=2*10^-3;//in m
Tph=200;//turns
Br=0.3;//in T
l=50*10^-3;//in m
n=25*10^-3;//in m
I=10*10^-3;//in A
N=200;//turns
mo=4*%pi*10^-7;//permittivity
//Calculations
Am=(2/3)*%pi*[n-g-lm/2]*l;//in m^2
Ag=[(2/3)*%pi*(n-g/2)+2*g]*(l+2*g);//in m^2
Cfi=Am/Ag;//unitless
//For normal BLDG motor, HC=606 KA/M
HC=606;//in KA/M
Hm=N*I/l;//KA/M
Bm=Br*[1-Hm/HC];//in T
Mrec=(Br-Bm)*10^-3/(4*%pi*10^-7*40);
Pmo=mo*Mrec*Am/lm;//in m-Wb/AT
Pmo=Pmo*10^-3;//in Wb/AT
Kc=1.05;//given constant
g_dash=Kc*g;//in m
Rg=g_dash/mo/Am;
Bg=Cfi*Br/(1+Pmo*Rg);//in T
Torque=2*Tph*Bg*l*n*I;//in N-m
disp(Torque,"Torque per phase in N-m : ");
|
ce9920b393d0ae54307d477d25a86a7dd95efa5c | 449d555969bfd7befe906877abab098c6e63a0e8 | /122/CH7/EX7.a.12/exaA_7_12.sce | baeae1dc01293a595f1fe5cf6a05f4aad0b03630 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 328 | sce | exaA_7_12.sce | // Example A-7-12
// Nyquist plot for positive omega
clear; clc;
xdel(winsid()); //close all windows
s = %s /2 /%pi;
num = 20 * ( s^2 + s + 0.5);
den = s * (s + 1) * (s + 10);
G = syslin('c',num,den);
a = gca();
a.clip_state = 'on';
nyquist(G,0.01,1000);
xgrid(color('gray'));
a.data_bounds = [-3 -5 ; 3 1];
a.box = 'on';
|
fc9f29d6fcd5a835b86e3d2ef38b8de6919c2c8b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1427/CH5/EX5.5/5_5.sce | d44f1bf87e1c4d3cd12123098692fcafe85ad4c2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 181 | sce | 5_5.sce | //ques-5.5
//Calculating activity of solution
clc
C=0.992;//molarity of NaCl
y=0.782;//activity coefficient
a=y*C;//activity
printf("The activity of solution is %.3f M.",a);
|
c6a41ebc66e01b0237d6e589db1568e1812842bb | 449d555969bfd7befe906877abab098c6e63a0e8 | /3557/CH4/EX4.2/Ex4_2.sce | 27c20033017a8257d36dcadba9933b4d0c11dfcc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 427 | sce | Ex4_2.sce | //Example4.2//
a=4;//body-centered cubic as given in table 3.3
b=sqrt(3); //body-centered cubic as given in table 3.3
c=1;// as we take R common from the equation
ri=(1/2)*(a/b)-c
mprintf("ri = %f R",ri)
//from the appendix 2, R=0.124nm giving
R=0.124;//nm //atomic radius of iron
ri1=ri*R
mprintf("\nri1 = %f nm",ri1)
rC=0.077;//nm //atomic radius of carbon from the appendix 2
R1=rC/ri1
mprintf("\nR1 = %f ",R1)
|
8b2eb8c6fc61c0585f18dff70bd9e4ff5de38451 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3772/CH14/EX14.12/Ex14_12.sce | a3c5c58841d46127e29a937bf0f6aec09e3bdafe | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,116 | sce | Ex14_12.sce | // Problem no 14.12,Page No.340
clc;clear;
close;
H=6 //m //height of dam
a=1.5 //m //top width
b=3.5 //m //Bottom width
rho_s=16 //KN/m**3 //density of soil
rho_mason=22.5 //KN/m**3 //density of mason
phi=30 //Degree //angle of repose
//Calculations
//Let Length of dam ,L=1 m
L=1 //m
//weight of dam
W=(a+b)*2**-1*L*H*rho_mason
//Rankine's coeff earth pressure
K=((1-sin(30*%pi*180**-1))*(1+sin(phi*%pi*180**-1))**-1)
//Lateral thrust
P=rho_s*H**2*L*2**-1*K
//Distance of Line of action from vertical base
x_bar=(b**2+b*a+a**2)*(3*(b+a))**-1
//distance of pt where resultant cuts the base
x=P*W**-1*H*3**-1
//Eccentricity
e=x_bar+x-b*2**-1
//Pressure at heel B
sigma1=W*b**-1*(1-6*e*b**-1)
//Pressure at heel C
sigma2=W*b**-1*(1+6*e*b**-1)
//Result
printf("The Max Intensities of soil at the wall is %.2f",sigma2);printf(" KN/m**2")
printf("\n The Min Intensities of soil at the wall is %.2f",sigma1);printf(" KN/m**2")
//Plotting the Shear Force Diagram
X1=[0,L,L]
Y1=[sigma2,sigma1,0]
Z1=[0,0,0]
plot(X1,Y1,X1,Z1)
xlabel("Length x in m")
ylabel("Shear Force in kN")
title("the Shear Force Diagram")
|
8fd8bbdef3ce3f9859a4c6e9b50db57a6fcd5e35 | 449d555969bfd7befe906877abab098c6e63a0e8 | /149/CH35/EX34.15/ex15.sce | 286953621425b6d622189f18caa7c434b4d33286 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | ex15.sce | clear
clc
n=11
disp('the first row denotes the boy no. ')
A(1,:)=[1 2 3 4 5 6 7 8 9 10 11];
disp('the second row denotes the marks in test I (x1) ')
A(2,:)=[23 20 19 21 18 20 18 17 23 16 19];
disp('the third row denotes the marks in test I (x2) ')
A(3,:)=[24 19 22 18 20 22 20 20 23 20 17];
disp('the fourth row denotes the difference of marks in two tests (d)')
for i=1:11
A(4,i)=A(3,i)-A(2,i);
end
disp('the fifth row denotes the (d-1) ')
for i=1:11
A(5,i)=A(4,i)-1;
end
disp('the sixth row denotes the square of elements of fourth row')
for i=1:11
A(6,i)=A(4,i)^2;
end
A
a=0;
disp('the sum of elements of fourth row= ')
for i=1:11
a=a+A(4,i);
end
a
b=0;
disp('the sum of elements of sixth row= ')
for i=1:11
b=b+A(6,i);
end
b
disp('standard deviation')
d=(b/(n-1))^0.5
t=(1-0)*(n)^0.5/2.24 |
5fa917d08ce56b8acdaa43ee43ec02278f9665b3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2195/CH4/EX4.19.5/ex_4_19_5.sce | 7e08cc30e1162094ede65d85710fa8dabfe25a00 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 331 | sce | ex_4_19_5.sce | //Example 4.19.5: resistance
clc;
clear;
close;
//given data :
V1=1;//in V
I=1.5*10^-3;//in A
rd=200*10^3;// in ohm
Rm=50;// in ohm
Rs=600*10^3;// in ohm
gm=0.005;//in mho
rd1=rd/((gm*rd)+1);
V0=gm*((rd1*Rs)/(rd1+Rs))*V1
R0=(2*Rs*rd1)/(Rs+rd1)
R_cal=(V0/I)-Rm-R0;
disp(R_cal,"resistance ,R_cal(ohm) = ")
// answer is wrong in book
|
ece857aa7c331940bb9cc79fa502a0075a8acb06 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1322/CH6/EX6.9/53ex3.sce | 42b71789d6ecfaae9ca2baebe0a0305ede33470b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 260 | sce | 53ex3.sce | clear;
clc;
close;
x=poly(0,'x');
//let x be amount of increase in pence
mans_new_wage=480+x;
womens_new_wage=370+x;
for x=1:500
if((480+x) == (6*(370+x)/5))//by given data
mprintf("the weekly increase is %ip \n",x)
end
end
|
85abacdc212dfefee1d9ce2cf596c2b21cb947ba | 449d555969bfd7befe906877abab098c6e63a0e8 | /52/CH5/EX5.11/Example5_11.sce | 7dcefcda2321b0e0520f740079f0a4254cceedcf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Example5_11.sce | //Example 5.11
//To Design the Filter using Impulse Invarient Method
clear;
clc ;
close ;
s=%s;
T=1;
HS=(2)/(s^2+3*s+2);
elts=pfss(HS);
disp(elts,'Factorized HS = ');
//The poles comes out to be at -2 and -1
p1=-2;
p2=-1;
z=%z;
HZ=(2/(1-%e^(p2*T)*z^(-1)))-(2/(1-%e^(p1*T)*z^(-1)))
disp(HZ,'HZ = '); |
fc44161c8f27d509459ab0c5e4848d766fceb8db | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set10/s_Fluid_Mechanics_I._A._Khan_1962.zip/Fluid_Mechanics_I._A._Khan_1962/CH1/EX1.11/example1_11.sce | 35d306627ad0e8514ed3a2ba530581847078427a | [] | 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 | 274 | sce | example1_11.sce | errcatch(-1,"stop");mode(2);//example 1.11
//page 31
; funcprot(0);
//initialisation of variable
sigma=0.022//from table
Gamma=9789//unit weight
S=0.79;//from table
d=2/1000;//diameter
h=4*sigma/Gamma/S/d;
disp(h*1000,"rise of height of alcohol(mm):");
exit();
|
44272f86268de0a7aae022ab375d2171f65a34c5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1299/CH2/EX2.3/example2_3.sce | 31e09288077661bf73f8b088628e6c84d60bac29 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 257 | sce | example2_3.sce | //Example 2.3
//computing initial value using scilab
clear;clc;
xdel(winsid());
s=%s
n3=(3*s+2)
d3=s*(s^2+4*s+5)
F=n3/d3
//Applying initial value theorem
//when limit "s" tends to infinity, final value of "F" becomes "0"
disp(0,"Final value=")
|
8c046a2fb365c491965f17b0e93ce620657d0210 | 449d555969bfd7befe906877abab098c6e63a0e8 | /409/CH8/EX8.7/Example8_7.sce | 2ee55f22636e83e2341ea9447df2b772c0ff2535 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,864 | sce | Example8_7.sce | clear ;
clc;
// Example 8.7
printf('Example 8.7\n\n');
// Page no. 213
// Solution
// Write given data
B_in = 1.1 ;// Flow rate in of blood -[L/min]
B_out = 1.2;// Flow rate out of blood -[L/min]
S_in = 1.7;// Flow rate in of solution -[L/min]
// Composition of input blood
B_in_CR = 2.72 ;//[g/L]
B_in_UR = 1.16 ;//[g/L]
B_in_U = 18 ;//[g/L]
B_in_P = 0.77 ;//[g/L]
B_in_K = 5.77 ;//[g/L]
B_in_Na = 13.0 ;//[g/L]
B_in_water = 1100 ;//[mL/min]
// Composition of output blood
B_out_CR = 0.120 ;//[g/L]
B_out_UR = 0.060;//[g/L]
B_out_U = 1.51 ;//[g/L]
B_out_P = 0.040 ;//[g/L]
B_out_K = 0.120 ;//[g/L]
B_out_Na = 3.21 ;//[g/L]
B_out_water = 1200 ;//[mL/min]
n_un = 7 ;// Number of unknowns in the given problem
n_ie = 7 ;// Number of independent equations
d_o_f = n_un-n_ie ;// Number of degree of freedom
printf('Number of degree of freedom for the given system is %i .\n\n',d_o_f);
// Water balance in grams, assuming 1 ml is equivalent to 1 g
S_in_water = 1700 ;//[ml/min]
S_out_water = B_in_water+ S_in_water - B_out_water;
S_out = S_out_water/1000 ;//[L/min]
printf(' Flow rate of water in output solution is %.2f L/min.\n\n',S_out);
// The component balance in grams for CR,UR,U,P,K and Na are
S_out_CR = (B_in*B_in_CR - B_out*B_out_CR)/S_out;
S_out_UR = (B_in*B_in_UR - B_out*B_out_UR)/S_out;
S_out_U = (B_in*B_in_U - B_out*B_out_U)/S_out;
S_out_P = (B_in*B_in_P - B_out*B_out_P)/S_out;
S_out_K = (B_in*B_in_K - B_out*B_out_K)/S_out;
S_out_Na = (B_in*B_in_Na - B_out*B_out_Na)/S_out;
printf(' Component Concentration(g/L) in output Dialysis solution \n');
printf(' UR %.2f \n',S_out_UR);
printf(' CR %.2f \n',S_out_CR);
printf(' U %.2f \n',S_out_U);
printf(' P %.2f \n',S_out_P);
printf(' K %.2f \n',S_out_K);
printf(' Na %.2f \n',S_out_Na); |
241cdbe0848eae3480ef0b37b136acc2d415a4f0 | 9889e7fd73314382fb2f9e8f63d92cf3254b75fb | /Vaango/src/orderAccuracy/test_config_files/MPMICE/Compare_burn_rates/VolumeFraction.tst | 407e7f227f5349fb27313bcd471e59a97dc85a58 | [] | no_license | bbanerjee/ParSim | 0b05f43cff8e878658dc179b4a604eabd873f594 | 87f87816b146f40013a5e6648dfe20f6d2d002bb | refs/heads/master | 2023-04-27T11:30:36.252023 | 2023-04-13T22:04:50 | 2023-04-13T22:04:50 | 13,608,512 | 16 | 3 | null | null | null | null | UTF-8 | Scilab | false | false | 2,548 | tst | VolumeFraction.tst | <start>
<upsFile>BurnRate.ups</upsFile>
<!-- NOTE....... plotScript2 is hard coded!!!!!-->
<gnuplot>
<script>plotScript.gp</script>
<title>Burn Rates vs Pressure At 298K</title>
<ylabel>Burn Rate (m/s)</ylabel>
<xlabel>Pressure (Pa)</xlabel>
</gnuplot>
<AllTests>
</AllTests>
<Test>
<Title>VolumeFraction1</Title>
<sus_cmd>mpirun -np 1 ./sus -svnDiff -svnStat </sus_cmd>
<postProcess_cmd>compare_burn_rates.m -pDir 1 -mat 1 -rho_CC 1832 </postProcess_cmd>
<x>25</x>
<replace_values>
/Uintah_specification/MaterialProperties/MPM/material/geom_object/volumeFraction :1.0
/Uintah_specification/MaterialProperties/ICE/material/geom_object/volumeFraction :0.0
</replace_values>
</Test>
<Test>
<Title>VolumeFraction0.9</Title>
<sus_cmd>mpirun -np 1 ./sus -svnDiff -svnStat </sus_cmd>
<postProcess_cmd>compare_burn_rates.m -pDir 1 -mat 1 -rho_CC 1832 </postProcess_cmd>
<x>25</x>
<replace_values>
/Uintah_specification/MaterialProperties/MPM/material/geom_object/volumeFraction :0.9
/Uintah_specification/MaterialProperties/ICE/material/geom_object/volumeFraction :0.1
</replace_values>
</Test>
<Test>
<Title>VolumeFraction0.8</Title>
<sus_cmd>mpirun -np 1 ./sus -svnDiff -svnStat </sus_cmd>
<postProcess_cmd>compare_burn_rates.m -pDir 1 -mat 1 -rho_CC 1832 </postProcess_cmd>
<x>25</x>
<replace_values>
/Uintah_specification/MaterialProperties/MPM/material/geom_object/volumeFraction :0.8
/Uintah_specification/MaterialProperties/ICE/material/geom_object/volumeFraction :0.2
</replace_values>
</Test>
<Test>
<Title>VolumeFraction0.7</Title>
<sus_cmd>mpirun -np 1 ./sus -svnDiff -svnStat </sus_cmd>
<postProcess_cmd>compare_burn_rates.m -pDir 1 -mat 1 -rho_CC 1832 </postProcess_cmd>
<x>25</x>
<replace_values>
/Uintah_specification/MaterialProperties/MPM/material/geom_object/volumeFraction :0.7
/Uintah_specification/MaterialProperties/ICE/material/geom_object/volumeFraction :0.3
</replace_values>
</Test>
<Test>
<Title>VolumeFraction0.6</Title>
<sus_cmd>mpirun -np 1 ./sus -svnDiff -svnStat </sus_cmd>
<postProcess_cmd>compare_burn_rates.m -pDir 1 -mat 1 -rho_CC 1832 </postProcess_cmd>
<x>25</x>
<replace_values>
/Uintah_specification/MaterialProperties/MPM/material/geom_object/volumeFraction :0.6
/Uintah_specification/MaterialProperties/ICE/material/geom_object/volumeFraction :0.4
</replace_values>
</Test>
</start>
|
3c66990a84622602a12a7bfd940babc7ac69973a | 881ffb027c7a05e95cd38ac9efc94f08969b4701 | /teoriaColas.sce | 0b9330c74131305a34283d589f2c1c32ac9cd017 | [] | no_license | wilmercastrillon/scripts-scilab | 754c40a950774041c1152ced887f90cfd9d6f634 | de1e9989340a6bed25a48a02696a00f16321c39c | refs/heads/master | 2020-03-06T21:23:13.880315 | 2018-05-10T04:04:46 | 2018-05-10T04:04:46 | 127,076,243 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,716 | sce | teoriaColas.sce | function teoriaDeColas(lamda, s, u, n, pob, c)//n = capacidad del sistema, pob = poblacion
if(c <> 0)
if(s == 1)
cn = CnServicioCambiante(lamda, u, c)
else
cn = CnServicioCambianteMS(lamda, s, u, c)
end
else
if(n == %inf && pob == %inf)
cn = Cn(lamda, s, u, n);
else
if(n <= s && pob == %inf)
cn = Cn(lamda, s, u, n);
else
if(pob <> %inf)
cn = CnPoblacionFinita(lamda, s, u, n, pob);
else
printf("Caso aun no definido\n");
return;
end
end
end
end
pn = Pn(cn);
printf("Eficiencia = %.7f\n", lamda/(s*u));
printf("P0 = %.7f\n", P0(cn));
l = sum(L(pn));
printf("L = %.7f\n", l);
vlq = Lq(pn, s);
printf("Lq = %.7f\n", sum(vlq));
printf("W = %.7f\n", l/lamda);
printf("Wq = %.7f\n", sum(Wq(vlq,lamda)));
printf("P{Wq > 0} = %.7f\n", 1-sum(pn(1:s)));
endfunction
function x=CnPoblacionFinita(lamda, s, u, N, pob)
n = 0:s;
x = (factorial(N)./(factorial(N-n).*factorial(n))).*((lamda/u).^n);
epsilon = 1e-7;
aux = s+1;
while(%t)
p = factorial(N)/(factorial(N-aux)*factorial(s)*(s^(aux-s)));
p = p * ((lamda/u)^aux);
aux = aux + 1;
if(p < epsilon || aux > N)
break;
end
x = [x,p];
if(p == %nan || p == %inf || p == -%inf)
x = [0];
return;
end
end
endfunction
function x=CnServicioCambiante(lamda, u, c)//
n = 0;
x = [];
epsilon = 1e-7;
while(%t)
p = ((lamda/u)^n)/(factorial(n)^c);
if(p < epsilon)
break;
end
x = [x,p];
n = n + 1;
if(p == %nan || p == %inf || p == -%inf)
x = [0];
return;
end
end
endfunction
function redesDeColas(lamdas, ss, us, p)//vector de lamdas, servidores y u, matriz de transicion
lamdaT = sum(lamdas);
for i=1:length(ss)
lamdai = lamdas(i) + sum(p(:,i)'.*lamdas);
printf("### Para sub-sistema %d\n", i);
teoriaDeColas(lamdai, ss(i), us(i),%inf,%inf,0);
printf("\n");
end
endfunction
function x=CnServicioCambianteMS(lamda, s, u, c)
n = 0:s;
x = ((lamda/u).^n)./factorial(n);
epsilon = 1e-7;
aux = s + 1;
while(%t)
p = (lamda/u)^aux;
p = p/(factorial(s)* ((factorial(aux)/factorial(s))^c)* (s^((1-c)*(aux-s))) );
if(p < epsilon)
break;
end
x = [x,p];
n = n + 1;
if(p == %nan || p == %inf || p == -%inf)
x = [0];
return;
end
aux = aux + 1;
end
endfunction
function x=Cn(lamda, s, u, capacidad)//
aux = 0:s;
x = (lamda.^aux)./(factorial(aux).*(u.^aux))
if(capacidad <= s)
return;
end
n = s+1;
epsilon = 1e-7;
while(%t)
p = (lamda^n)/(factorial(s).*(u^s).*((s*u)^(n-s)));
if(p < epsilon)
break;
end
x = [x,p];
n = n + 1;
if(p == %nan || p == %inf || p == -%inf)
x = [0];
return;
end
end
endfunction
function y=P0(cn)
sumatoria = sum(cn);
y = 1/(sumatoria);
endfunction
function z=Pn(cn)
p0 = 1/sum(cn);
z = p0.*cn;
endfunction
function z=L(pn)
n = 0:length(pn)-1;
z = pn.*n;
endfunction
function z=Lq(pn, s)
ini = length(pn);
pn = pn(s+1:length(pn));
n = s:ini-1;
z = (n-s).*pn;
endfunction
function z=Wq(lq, lamda)
z = lq/lamda;
endfunction
|
532b36329643cf6b5b382a018805b0995f535e8b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1085/CH11/EX11.3/ex11_3.sce | e8a3e9b32d56ccfa81f088f9d66fef3d1c30a59e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 301 | sce | ex11_3.sce | //Exam:11.3
clc;
clear;
close;
D=0.002;//Grain diameter(in mm)
d=D*10^(-3);//Grain diameter(in m)
K=0.63;//Constant(in MNm^(-3/2))
sigma_i=80;//in MNm^-2
sigma_y=sigma_i+K*d^(-1/2);//Yield stress for a polycrystalline alloy
disp(sigma_y,'Yield stress for a polycrystalline alloy(in MN/m^2)'); |
c5e15a5c294a98e8e7b73f979fe7bcac01210631 | 449d555969bfd7befe906877abab098c6e63a0e8 | /884/CH4/EX4.9/Example4_9.sce | 5771e40b597a2a215d9a31b2b8f24dee37a2565c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 503 | sce | Example4_9.sce | // Gravimetric Analysis
clear;
clc;
printf("\t Example 4.9\n");
mSample=0.5662;//mass of sample, g
Cl=35.5;//mol mass of Cl, g
AgCl=143.4;//mol mass of AgCl, g
mAgCl=1.0882;//mass of AgCl formed, g
%Cl(AgCl)=Cl/AgCl*100;//percent Cl in AgCl
mCl=%Cl(AgCl)*mAgCl/100;//mass of Cl in AgCl, g
//the same amount of Cl is present in initial sample
%Cl=mCl/mSample*100;//percent Cl in initial sample
printf("\t the percentage of Cl in sample is : %4.2f percent\n",%Cl);
//End
|
487d3120a93efad52db4c0f08d8f6289d162d5fb | 449d555969bfd7befe906877abab098c6e63a0e8 | /3472/CH7/EX7.1/Example7_1.sce | 116a3826e3d1d5c464f66ef47ee29e12348d5fe6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,056 | sce | Example7_1.sce | // A Texbook on POWER SYSTEM ENGINEERING
// A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar
// DHANPAT RAI & Co.
// SECOND EDITION
// PART I : GENERATION
// CHAPTER 7: TARIFFS AND ECONOMIC ASPECTS IN POWER GENERATION
// EXAMPLE : 7.1 :
// Page number 73
clear ; clc ; close ; // Clear the work space and console
// Given data
connected_load = 450.0*10**3 // Connected load(kW)
maximum_demand = 250.0*10**3 // Maximum demand(kW)
units_generated = 615.0*10**6 // Units generated per annum(kWh)
// Calculations
// Case(i)
demand_factor = maximum_demand/connected_load // Demand factor
// Case(ii)
hours_year = 365.0*24 // Total hours in a year
average_demand = units_generated/hours_year // Average demand(kW)
load_factor = average_demand/maximum_demand*100 // Load factor(%)
// Results
disp("PART I - EXAMPLE : 7.1 : SOLUTION :-")
printf("\nCase(i) : Demand factor = %.3f ", demand_factor)
printf("\nCase(ii): Load factor = %.1f percent", load_factor)
|
be0d0975f70934298376e45c82d6d76b161b67e2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3507/CH12/EX12.2/Ex12_2.sce | 4527c8cfdfa03acde6429a10358e651ef9142630 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 250 | sce | Ex12_2.sce | //chapter12
//example12.2
//page236
Vcc=13 // V
V_knee=1 // V
Rc=4 // kilo ohm
gain_beta=100
V_Rc=Vcc-V_knee
Ic=V_Rc/Rc
Ib=Ic/gain_beta
Vs=Ic/5 // since Ic/Vs = 5 mA/V given
printf("maximum input signal voltage = %.3f V or %.3f mV \n",Vs,Vs*1000)
|
98549e9d3c3154201189da7073d031326e922607 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2384/CH11/EX11.7/ex11_7.sce | a30573d2e269c8b36afde06c6ba74adfe5ec39ed | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 543 | sce | ex11_7.sce | // Exa 11.7
clc;
clear;
close;
format('v',6)
// Given data
V_L = 230;// in V
f = 50;// in Hz
N = 950;// in rpm
E2 = 100;// in V
Ns =1000;// in rpm
// Ns = 120*f/P;
P = (120*f)/Ns;
disp(P,"The Number of ploes is");
s = ((Ns-N)/Ns)*100;// %s in %
disp(s,"The percentage of full load slip in % is");
// The rotor induced voltage at full load
E2r = (s/100)*E2;// in V
disp(E2r,"The rotor induced voltage in V is");
// The rotor frequency at full load
f_r = (s/100)*f;// in Hz
disp(f_r,"The frequency at full load in Hz is");
|
38ce6634679e0d429129837e70bfa476eadbf406 | 6820a7d383b5c1ecfc487ab8b92158771267fd25 | /song.tst | b24f5f944a12ded681e63792efd90f1d9663ccd7 | [] | no_license | Vik-toryia/test | 65546206a63ddd5e1f5d5a00aeb7045a25023fde | ab658cb5911fd9b52e46d9c32f496d466142e29b | refs/heads/main | 2023-03-22T19:51:56.574009 | 2021-03-18T12:13:11 | 2021-03-18T12:13:11 | 349,015,628 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 222 | tst | song.tst | Yesterday, all my troubles seemed so far away
Now it looks as though they're here to stay
Oh, I believe in yesterday
Suddenly, I'm not half the man I used to be
There's a shadow hanging over me
Oh, yesterday came suddenly |
bc680c04c2d1432ca9d711b59f4b0daeb277c4d6 | 527c41bcbfe7e4743e0e8897b058eaaf206558c7 | /NZFunctions/StatisticalFunctions/SP_Perc-NZ-UM-01.tst | 1a1d6039687322ac6e9325b7d450028c8f9327fe | [] | no_license | kamleshm/intern_fuzzy | c2dd079bf08bede6bca79af898036d7a538ab4e2 | aaef3c9dc9edf3759ef0b981597746d411d05d34 | refs/heads/master | 2021-01-23T06:25:46.162332 | 2017-07-12T07:12:25 | 2017-07-12T07:12:25 | 93,021,923 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,111 | tst | SP_Perc-NZ-UM-01.tst | -- The intellectual and technical concepts contained herein are proprietary to Fuzzy Logix, LLC.
-- and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
-- secret or copyright law. Dissemination of this information or reproduction of this material is
-- strictly forbidden unless prior written permission is obtained from Fuzzy Logix, LLC.
-- Functional Test Specifications:
--
-- Test Category: Statistical Functions
--
-- Last Updated: 05-30-2017
--
-- Author: <kamlesh.meena@fuzzyl.com>
--
-- BEGIN: TEST SCRIPT
-- BEGIN: TEST(s)
-----*******************************************************************************************************************************
-----****************************************************************
---SP_Perc
-----****************************************************************
DROP TABLE FinStockPricePerc;
EXEC SP_Perc('FinStockPrice',
'CLOSEPRICE',
'TICKERSYMBOL',
'0.1,0.3,0.5,0.7,0.9',
'FinStockPricePerc');
SELECT *
FROM FinStockPricePerc
LIMIT 20;
|
76ba2be5bf18d11735c834286d905477217382f3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3492/CH1/EX1.5/Ex1_5.sce | f9dcef837c75e0be583bac2774a04872c1f4533e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 452 | sce | Ex1_5.sce | clc
//Chapter1
//Ex_1.5
//Given
L=100*10^-6//in Henry
C=100 *10^-12 //in Farad
T=300 // in Kelvin
R=200*10^3 //in ohms
k=1.38*10^-23 //in J/K
fo=1/(2*%pi*sqrt(L*C))//resonant frequency
Q=2*%pi*fo*C*R//quality factor
B=fo/Q //Bandwidth of tuned RLC
//Acc. to Johnson resistor noise equation
Vrms=sqrt(4*k*T*R*B) //in volts
Vrms=Vrms/10^-6 //in micro volts
disp(Vrms," Minimum rms radio signal that can be detected in micro volts is")
|
8ebd766d8e4ec16744e99492638eb20a193a579e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3784/CH7/EX7.10/Ex7_10.sce | 14d53a8982fbc6347eb2f22d1bf35bd0eaa1dcd5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,712 | sce | Ex7_10.sce | clc
//Variable initialisation
V=400//Supply voltage in volts
f=50//Supply Frequency in Hz
P=6//No of poles
Rs=0.2//stator resistance in ohm
Rr=0.07//Rotor resistance in ohm
Xs=0.4//Stator impedance in ohm
Xr=0.4//Rotor impedance in ohm
Sm1=0.25//Maximum Slip at 25% speed range
N1=750//Speed in rpm
a1=130
am=150//maximum Firing Angle
n=2//Stator to rotor turns ratio
Rd=0.02//Dc link resistance in ohm
N2=950//Speed in rpm
N3=850//Speed in rpm
//Solution
V1=V/sqrt(3)
Ns=120*f/P//Synchronous speed in rpm
Wms=Ns*2*%pi/60
a=-Sm1/cosd(am)//At 25% speed Range
m=2/a//Transformer Turns Ratio
S1=(Ns-N1)/Ns
Vd11=3*sqrt(6)*S1*V1/(%pi*n)
Vd21=3*sqrt(6)*V1*cosd(a1)/(%pi*m)
Rs1=Rs/(n^2)
Rr1=Rr/(n^2)
Id1=(Vd11+Vd21)/(2*((S1*Rs1)+Rr1)+Rd)//The answers vary due to round off error
T1=abs(Vd21)*Id1/(S1*Wms)//The answers vary due to round off error
S2=(Ns-N2)/Ns
Tr=(3/Wms)*V1^2*(Rr/S2)/((Rs+(Rr/S2))^2+(Xs+Xr)^2)//Rated torque in N-m
Thr=Tr/2//Half rated Torque in N-m
S3=(Ns-N3)/Ns
X=poly(0,'X')//let X=cos(a2)
Vd12=3*sqrt(6)*S3*V1/(%pi*n)
Vd22=3*sqrt(6)*V1*X/(%pi*m)
Id2=(Vd12+Vd22)/(2*((S3*Rs1)+Rr1)+Rd)
T2=abs(Vd22)*Id2/(S3*Wms)
//Equating T2 to Thr
0==5547.31*X^2-2878.788*X+349.52//Polynomial Equation in X
X1=(2878.788+sqrt((2878.788^2)-4*5547.31*349.52))/(2*5547.31)//Roots of polynomial eqn
X2=(2878.788-sqrt((2878.788^2)-4*5547.31*349.52))/(2*5547.31)//Roots of polynomial eqn
a11=acosd(-X1)
a22=acosd(-X2)
printf('\n\n Transformer Turns Ratio=%0.1f \n\n',m)
printf('\n\n Torque for 750rpm and alpha 130=%0.1f N-m\n\n',T1)
printf('\n\n The Field Current=%0.1f \n\n',a11)
printf('\n\n The Field Current=%0.1f \n\n',a22)
//The answers vary due to round off error
|
c7b41a3b08d0d56265f24f8e7a16893f4a7900f9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2453/CH2/EX2.14/2_14.sce | f7da5d8696ff39a9de96709f46d5bae6e247a825 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 251 | sce | 2_14.sce | //To calculate the miller indices of a plane
//plane intercepts at a,b/2,3*c
//therefore intercepts are (1 1/2 3)
//reciprocal of the intercepts is (1/2 2 1/3)
//thus miller indices are (3 6 1)
printf("miller indices of the plane are (3 6 1)");
|
93c40edb307af764f8e2b96ac6574bfd18488cc3 | eec3a6e2cd91307fd7a55b7fc83bb86b35f86a6c | /stlfiles/macros/stlwrite.sci | 678189449fd5bdf322c2c0d036f0a165c122f5ee | [] | 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 | 2,265 | sci | stlwrite.sci | function stlwrite(t, filename, fmt)
[lhs,rhs] = argn(0);
if rhs < 3 then
error("Not enough input argument")
end
if type(t) <> 16 then
error("First argument must be a typed list (tlist)")
end
if strcmp(typeof(t), 'stldata') <> 0 then
error("First argument must be a stldata tlist")
end
if type(filename) <> 10 then
error("File name must be a string")
end
if type(fmt) <> 10 then
error("STL file format must be a string")
end
if members(fmt, ["ascii" "binary"]) == 0 then
error("...")
end
if strcmp(fileext(filename), ".stl") <> 0 then
filename = filename + ".stl"
end
if strcmp(fmt, "ascii", "i") == 0 then
fd = mopen(filename, "wt")
[err, msg] = merror(fd)
if (err <> 0) then
error(msg)
end
if strcmp(part(t.header, 1:5), "solid") <> 0 then
mfprintf(fd, "solid %s\n", t.header)
else
mfprintf(fd, "%s\n", t.header)
end
for n = 1:size(t.x, "c")
mfprintf(fd, ..
" facet normal %f %f %f\n outer loop\n vertex %f %f %f\n vertex %f %f %f\n vertex %f %f %f\n endloop\n endfacet\n", ..
t.normals(1,n), t.normals(2,n), t.normals(3,n), ..
t.x(1,n), t.y(1,n), t.z(1,n), ..
t.x(2,n), t.y(2,n), t.z(2,n), ..
t.x(3,n), t.y(3,n), t.z(3,n))
end
mfprintf(fd, "endsolid")
mclose(fd)
else
fd = mopen(filename,"wb")
[err, msg] = merror(fd)
if (err <> 0) then
error(msg)
end
if strcmp(part(t.header, 1:5), "solid") == 0 then
t.header = part(t.header, 7:$)
mputstr(part(t.header, 7:86), fd)
else
mputstr(part(t.header, 1:80), fd)
end
mput(size(t.x, "c"), "ui", fd)
for n = 1:size(t.x, "c")
mput([t.normals(1,n) t.normals(2,n) t.normals(3,n)], "f", fd)
mput([t.x(1,n) t.y(1,n) t.z(1,n)], "f", fd)
mput([t.x(2,n) t.y(2,n) t.z(2,n)], "f", fd)
mput([t.x(3,n) t.y(3,n) t.z(3,n)], "f", fd)
mput(0 , "us", fd)
end
mclose(fd)
end
endfunction
|
7a4f35a3f1bbd814e64830f100c3fbc0d2f41110 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1895/CH11/EX11.17/EXAMPLE11_17.SCE | 64d2074f0825d8cf22cfbf3939e3d120f92c16ac | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 623 | sce | EXAMPLE11_17.SCE | //ANALOG AND DIGITAL COMMUNICATION
//BY Dr.SANJAY SHARMA
//CHAPTER 11
//Information Theory
clear all;
clc;
printf("EXAMPLE 11.17(PAGENO 498)");
//given
Px_1 = 1/2;//probability of first symbol
Px_2 = 1/4;//probability of second symbol
Px_3 = 1/8;//probability of third symbol
Px_4 = 1/16;//probability of fourth symbol
Px_5 = 1/16;//probability of fifth symbol
r = 16//outcomes per second
//calculations
H_X = Px_1*log2(1/Px_1) + Px_2*log2(1/Px_2) + Px_3*log2(1/Px_3) + Px_4*log2(1/Px_4) + Px_5*log2(1/Px_5);
R = r*H_X;//information rate
//result
printf("\n\nRate of information = %.2f bits/sec",R);
|
5c9efff95dc32f4bbcbf4cbdc887e1f158886764 | 4a1effb7ec08302914dbd9c5e560c61936c1bb99 | /Project 2/Experiments/AdaBoost/results/AdaBoost.NC-C.coil2000-10-1tra/result2s0.tst | 9e0b775086fdcc038c15fad1af7b38abbbdd0705 | [] | 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 | 7,389 | tst | result2s0.tst | @relation coil2000
@attribute MOSTYPE integer[1,41]
@attribute MAANTHUI integer[1,10]
@attribute MGEMOMV integer[1,6]
@attribute MGEMLEEF integer[1,6]
@attribute MOSHOOFD integer[1,10]
@attribute MGODRK integer[0,9]
@attribute MGODPR integer[0,9]
@attribute MGODOV integer[0,5]
@attribute MGODGE integer[0,9]
@attribute MRELGE integer[0,9]
@attribute MRELSA integer[0,7]
@attribute MRELOV integer[0,9]
@attribute MFALLEEN integer[0,9]
@attribute MFGEKIND integer[0,9]
@attribute MFWEKIND integer[0,9]
@attribute MOPLHOOG integer[0,9]
@attribute MOPLMIDD integer[0,9]
@attribute MOPLLAAG integer[0,9]
@attribute MBERHOOG integer[0,9]
@attribute MBERZELF integer[0,5]
@attribute MBERBOER integer[0,9]
@attribute MBERMIDD integer[0,9]
@attribute MBERARBG integer[0,9]
@attribute MBERARBO integer[0,9]
@attribute MSKA integer[0,9]
@attribute MSKB1 integer[0,9]
@attribute MSKB2 integer[0,9]
@attribute MSKC integer[0,9]
@attribute MSKD integer[0,9]
@attribute MHHUUR integer[0,9]
@attribute MHKOOP integer[0,9]
@attribute MAUT1 integer[0,9]
@attribute MAUT2 integer[0,9]
@attribute MAUT0 integer[0,9]
@attribute MZFONDS integer[0,9]
@attribute MZPART integer[0,9]
@attribute MINKM30 integer[0,9]
@attribute MINK3045 integer[0,9]
@attribute MINK4575 integer[0,9]
@attribute MINK7512 integer[0,9]
@attribute MINK123M integer[0,9]
@attribute MINKGEM integer[0,9]
@attribute MKOOPKLA integer[1,8]
@attribute PWAPART integer[0,3]
@attribute PWABEDR integer[0,6]
@attribute PWALAND integer[0,4]
@attribute PPERSAUT integer[0,9]
@attribute PBESAUT integer[0,7]
@attribute PMOTSCO integer[0,7]
@attribute PVRAAUT integer[0,9]
@attribute PAANHANG integer[0,5]
@attribute PTRACTOR integer[0,7]
@attribute PWERKT integer[0,6]
@attribute PBROM integer[0,6]
@attribute PLEVEN integer[0,9]
@attribute PPERSONG integer[0,6]
@attribute PGEZONG integer[0,3]
@attribute PWAOREG integer[0,7]
@attribute PBRAND integer[0,8]
@attribute PZEILPL integer[0,3]
@attribute PPLEZIER integer[0,6]
@attribute PFIETS integer[0,1]
@attribute PINBOED integer[0,6]
@attribute PBYSTAND integer[0,5]
@attribute AWAPART integer[0,2]
@attribute AWABEDR integer[0,5]
@attribute AWALAND integer[0,1]
@attribute APERSAUT integer[0,12]
@attribute ABESAUT integer[0,5]
@attribute AMOTSCO integer[0,8]
@attribute AVRAAUT integer[0,4]
@attribute AAANHANG integer[0,3]
@attribute ATRACTOR integer[0,6]
@attribute AWERKT integer[0,6]
@attribute ABROM integer[0,3]
@attribute ALEVEN integer[0,8]
@attribute APERSONG integer[0,1]
@attribute AGEZONG integer[0,1]
@attribute AWAOREG integer[0,2]
@attribute ABRAND integer[0,7]
@attribute AZEILPL integer[0,1]
@attribute APLEZIER integer[0,2]
@attribute AFIETS integer[0,4]
@attribute AINBOED integer[0,2]
@attribute ABYSTAND integer[0,2]
@attribute CARAVAN{0,1}
@inputs MOSTYPE,MAANTHUI,MGEMOMV,MGEMLEEF,MOSHOOFD,MGODRK,MGODPR,MGODOV,MGODGE,MRELGE,MRELSA,MRELOV,MFALLEEN,MFGEKIND,MFWEKIND,MOPLHOOG,MOPLMIDD,MOPLLAAG,MBERHOOG,MBERZELF,MBERBOER,MBERMIDD,MBERARBG,MBERARBO,MSKA,MSKB1,MSKB2,MSKC,MSKD,MHHUUR,MHKOOP,MAUT1,MAUT2,MAUT0,MZFONDS,MZPART,MINKM30,MINK3045,MINK4575,MINK7512,MINK123M,MINKGEM,MKOOPKLA,PWAPART,PWABEDR,PWALAND,PPERSAUT,PBESAUT,PMOTSCO,PVRAAUT,PAANHANG,PTRACTOR,PWERKT,PBROM,PLEVEN,PPERSONG,PGEZONG,PWAOREG,PBRAND,PZEILPL,PPLEZIER,PFIETS,PINBOED,PBYSTAND,AWAPART,AWABEDR,AWALAND,APERSAUT,ABESAUT,AMOTSCO,AVRAAUT,AAANHANG,ATRACTOR,AWERKT,ABROM,ALEVEN,APERSONG,AGEZONG,AWAOREG,ABRAND,AZEILPL,APLEZIER,AFIETS,AINBOED,ABYSTAND
@outputs CARAVAN
@data
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 1
1 1
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 1
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
1 1
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 1
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 1
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 1
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
1 0
1 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
1 1
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
0 1
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 1
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 1
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
|
e3ea6c87e6276ee9cb648e9ca0d04da97a3156f4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /509/CH6/EX6.2/6_2.sci | 824de17ff3ddd183e052b17457e9d0c418c8107a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,115 | sci | 6_2.sci | //Chapter 6 Example 2//
clc
clear
//total discharge during weeks=td//
w1=500;w2=500;w3=350;w4=200;w5=300;w6=800;w7=1100;w8=900;w9=400;w10=200;
// these are the weekly discharges respectively for 10 weeks//
td=w1+w2+w3+w4+w5+w6+w7+w8+w9+w10;
printf("\n Total Discharge = %.2f m^3/sec\n",td);
//average weekly discharge=wd//
wd=td/10;
printf("\n Average weekly discharge = %.2f m^3/sec\n",wd);
// to plot the hydrograph//
x=[1,2,3,4,5,6,7,8,9,10];
y=[500,500,350,200,300,800,1100,900,400,200];
plot2d(x,y,style=2,rect=[0,0,10,1100]);
xtitle("Hydrograph","Time(Weeks)","Q(m^3/sec)");
xset('window',1);
// to plot flow duration graph//
a=[10,20,30,50,60,70,90,100];
b=[1100,900,800,500,400,350,300,200];
plot2d(a,b,style=3,rect=[0,0,100,1100]);
xtitle("Flow duration curve","Percentage of time","Q(m^3/sec)");
// to plot mass curve//
xset('window',2);
c=[1,2,3,4,5,6,7,8,9,10];
d=[3500,7000,9450,10850,12950,18550,26250,32550,35350,36750];
plot2d(c,d,style=4,rect=[0,0,10,40000]);
xtitle("Mass Curve","Time(weeks)","Cumulative flow(day-sec-metre)");
legend("Mass Curve","Ordinary Curve"); |
d51dae11fbbca2191f81c27fc60b3ef93a04191f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3768/CH8/EX8.10/Ex8_10.sce | 29cde7622658863dcc3573a4065886ce267fc8e0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 427 | sce | Ex8_10.sce | //Example number 8.10, Page number 173
clc;clear;
close;
//Variable declaration
h=200; //hysteresis loss per cycle(J/m**3)
M=7650; //atomic weight(kg/m**3)
n=100; //magnetisation cycles per second
//Calculation
hpl=h*n; //hysteresis power loss per second(watt/m**3)
pl=hpl/M; //power loss(watt/kg)
//Result
printf("hysteresis power loss per second is %.f W/m^3",hpl)
printf("\n power loss is %.3f W/kg",pl)
|
6079fd01e725ed39a6226c3ee4d196272c11315f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2921/CH3/EX3.2/Ex3_2.sce | ca43440b78d6bc1dafde7e2a10876e969390282e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,740 | sce | Ex3_2.sce | clc;
clear;
mprintf('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-3.2 Page No.43\n');
b=2; //[in] Width of beam
h=2; //[in] Height of beam
I=(b*h^3)/12; //[in^4] Moment of inertia
F=3000; //[lb] Load applied to beam
L=36; //[in] Length of beam
c=1; //[in] Distance of outer most fiber from neutral axis
E=30*10^6; //[lb/in^2] Modulus of elasticity
Sy=30000; //[lb/in^2] Yield strength
Su=55000; //[lb/in^2] Ultimate strength
SF=2; //[] Safety factor based on ultimate stress
M=F*L/4; //[lb*in] Bending moment
S=(M/I)*c; //[lb/in^2] Bending stress
//Note-In the book I=1.33 in^4 is used instead of I=1.3333333 in^2
mprintf('\na. The maximum stress in beam is %f lb/in^2',S);
delta=-F*L^3/(48*E*I); //[in] Maximum deflection in this beam
mprintf('\nb. The maximum deflection in this beam is %f in.',delta);
if Sy>S then
mprintf('\nc. Yes, the stress of %f lb/in^2 is less than the yield of Sy=%f lb/in^2.',S,Sy);
else
mprintf('\nc. No, the stress of %f lb/in^2 is greater than the yield of Sy=%f lb/in^2',S,Sy);
end
Sall=Su/SF; //[lb/in^2] Allowable stress
if Sall>S then
mprintf('\nd. It is acceptable because allowable stress is greater than the acttual stress of %f lb/in^2.',S);
else
mprintf('\nd. Design is not acceptable because allowable stress is less than the actual stress of %f lb/in^2.',S)
end
//Note: The deviation of answer from the answer given in the book is due to round off error.(In the book values are rounded while in scilab actual values are taken)
|
d853819628a268688a95065d1b2f9f2afe3a0199 | 44dccf35d0d05580e3fc20af3b7697b3c638d82d | /macros/retrieveImages.sci | f5056d32eab421913d4d6b916a5767447bedbb26 | [] | no_license | surirohit/Scilab-Image-Processing-Toolbox-Unclean | 213caacd69badd81ec0f99a800f44a2cf8f79b5d | 3a8057f8a8d05e7efd83704a0e732bdda23fa3a0 | refs/heads/master | 2020-04-09T07:31:20.042501 | 2016-06-28T09:33:57 | 2016-06-28T09:33:57 | 60,406,367 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,846 | sci | retrieveImages.sci | function [varargout] = retrieveImages(QueryImage, IndexImage, varargin)
/// varargout(1) = index
/// varargout(2) = score
/// varargout(3) = Imageword
[ lhs rhs ] = argn(0)
if rhs > 6 then
error(msprintf("Too many input arguments"))
end
if lhs > 3 then
error(msprintf("Too many output arguments"))
end
QueryImage_list = mattolist(QueryImage)
if lhs == 1 then
select rhs
case 2 then
index = opencv_retrieveImages(QueryImage_list, IndexImage)
case 4 then
index = opencv_retrieveImages(QueryImage_list, IndexImage, varargin(1), varargin(2))
case 6 then
index = opencv_retrieveImages(QueryImage_list, IndexImage, varargin(1), varargin(2), varagin(3), varargin(4))
end
varargout(1) = index
elseif lhs == 2 then
select rhs
case 2 then
[index, score] = opencv_retrieveImages(QueryImage_list, IndexImage)
case 4 then
[index, score] = opencv_retrieveImages(QueryImage_list, IndexImage, varargin(1), varargin(2))
case 6 then
[index, score] = opencv_retrieveImages(QueryImage_list, IndexImage, varargin(1), varargin(2), varagin(3), varargin(4))
end
varargout(1) = temp
varargout(2) = score
elseif lhs == 3 then
select rhs
case 2 then
[index, score, Imageword] = opencv_retrieveImages(QueryImage_list, IndexImage)
case 4 then
[index, score, Imageword] = opencv_retrieveImages(QueryImage_list, IndexImage, varargin(1), varargin(2))
case 6 then
[index, score, Imageword] = opencv_retrieveImages(QueryImage_list, IndexImage, varargin(1), varargin(2), varagin(3), varargin(4))
end
varargout(1) = index
varargout(2) = score
del = struct("WordIndex", Imageword(1), "Location", Imageword(2), "Vocab_size", Imageword(3), "Count", Imageword(4))
varargout(3) = del
end
endfunction
|
c86a4ed0c81e24f2403ba26af389e650489789c7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /323/CH7/EX7.5/ex7_5.sci | caad20e4f6318998269d4fd402d23b533a7f970e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | sci | ex7_5.sci | //Chapter7,Ex7.5,Pg7.15
clc;
B=50
Ib=20 //Base current in microamperes
Ic=B*Ib
printf("\n Ic=%.0f mA \n",Ic*10^-3)
Ie=Ic+Ib
printf("\n Ie=%.2f mA \n",Ie*10^-3)
|
750056e6ac4c775a9040ba37a6434b6ab659640f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2753/CH9/EX9.2/Ex9_2.sce | a3571b03b1bb6eb3ffde696bd10ffc83aa70030c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 433 | sce | Ex9_2.sce | //Example 9.2:
clc;
clear;
close;
//given data :
Va=300;// in V
Vm=300*sqrt(2);//in V
Rl=50;//in ohm
theta1=90;//firing angle in degree
idc=((Vm/(2*%pi*Rl))*(1+cosd(theta1)));//in A
format('v',6)
disp((idc),"(i) the dc load current is ,(A)=")
irms=Va/(2*Rl);//in A
format('v',4)
disp(round(irms),"(ii) the rms load current is ,(A)=")
P=irms^2*Rl;//in W
format('v',5)
disp(round(P),"(iii) the power dissipated by the load is ,(W)=")
|
6d65ca188c1b55b01f8c90f45cc23072abe7ae0a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2339/CH9/EX9.1.1/Ex9_1.sce | 8afe6593fc43bd3a9f2f5a6cddb44a3f7b142e10 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 404 | sce | Ex9_1.sce | clc
clear
D=0.3;
L=0.6;
N=60;
Hs=5;
Hd=10;
Ep=0.8;
Qa=0.075;
A=(22/7)*(1/4)*D*D;
Rho=1000;
g=9.81;
F1=Rho*g*Hs*A;
F2=Rho*g*Hd*A;
TF=F1+F2;
printf('Total Force Required: %2.2f kN',TF/1000);
printf('\n');
Q=(2*L*A*N)/60;
Qa=0.075;
Slip=(Q-Qa)/Q;
printf('Percentage Slip: %2.2f Percent',Slip*100);
printf('\n');
Cd=Qa/Q;
P=(Rho*g*Qa*(Hs+Hd))/Ep;
printf('Power input: %2.2f kW',P/1000);
printf('\n');
|
9c321ae2426f8c9b912efa804cb7c46fbf9c9d5e | 449d555969bfd7befe906877abab098c6e63a0e8 | /545/CH5/EX5.1/ch_5_eg_1.sce | a39754f4094140fdce5fc84a9dbb19eb5632a2f4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 607 | sce | ch_5_eg_1.sce | clc
//finite difference method
disp("the solution of eg 5.1-->Discretization in 1-D space");
//given d2y_by_dx2-2=0 hence it is dirichlet's problem
x_1=0, y_1=0 //initial boundary conditions
x_3=1, y_3=0
delta_x=.5 //since we have to find y_2 at x=.5 so x_2=.5
//in the central difference method substituting i=2 we have
//(y_3-2*y_2+y_1)/(delta_x)^2=2
//since y_1 & y_3=0 as per B.C.
y_2=(y_3+y_1-2*delta_x^2)/2
disp(y_2,"the value of y at x=.5 from finite difference method is");
x=.5
y_exact=x^2-x
disp(y_exact,"the value of y from exact soln at x=.5 is"); |
b52877e9618973f1486b102474094e33007b6516 | 449d555969bfd7befe906877abab098c6e63a0e8 | /68/CH5/EX5.7/ex7.sce | 78c483e01ade7ca6c1f76f1834d9e4b7fdfda2bd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 594 | sce | ex7.sce | // Example 5.7: Analyse the circuit to find node voltages and branch currents
V_CC=-10; // (V)
R_E=2000; // (ohm)
R_C=1000; // (ohm)
V_EE=10; // (V)
V_E=0.7; // (V) emitter base junction will be forward biased with V_E=V_EB=0.7V
disp(V_E,"Emitter base junction is forward biased with V_E (V)")
I_E=(V_EE-V_E)/R_E;
disp(I_E,"Emitter current (A)")
B=100; // Assuming beta 100
a=B/(B+1);
I_C=a*I_E; // Assuming the transistor to operate in active mode
disp(I_C,"Collector current (A)")
V_C=V_CC+I_C*R_C;
disp(V_C,"Collector voltage (V)")
I_B=I_E/(B+1);
disp(I_B,"Base current (A)") |
4afddf4ccac5015042977a2f1690fa5547d00adc | 449d555969bfd7befe906877abab098c6e63a0e8 | /3594/CH11/EX11.10/Ex11_10.sce | d918cc885e10121479a42a3fc388948bff3fa40c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 348 | sce | Ex11_10.sce |
clc
//given
s1=26
s2=24
s3=23
sr=31
i1=70
i2=72
i3=61
ir=71
t=1500//lb in
k1=-i3/s3//Ns3-Ni2/(Ni3-Ni2)=k
//S3 is fixed thus
k2=1-(1/k1)//k2=Ni3/Ni2
k3=-i2/s2//k3=Ns2-Ni3/(Ni2-Ni3)
k4=(1/k2-1)*k3+1//k4=Ns2/Ni3 ; reducing using k2 and k3
k5=-i1/s1//Ns1-Nf/(Ni1-Nf)
k6=(1-k5)/(1-k5/k4)//k6=Ns1/Nf
printf("\n Ns1/Nf = %.2f",k6)
|
796bc89793e8d9d2784b3bbe47a18ff13d2f390b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3020/CH8/EX8.5/ex8_5.sce | 500613f34a932919e2881f42c553e3ab1eb60915 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 238 | sce | ex8_5.sce | clc;
clear all;
t = 12.5e-6; // Thickness in meters
d = 0.01; // Difference in principal refractive index (uo-ue)
lambda = 2*t*d;//The wavelength of light
disp('m',lambda,'The wavelength of light is')
//rounding off due to scilab
|
b44549d7ec26b0ac7d587e8196c53b0b2e89fe01 | b0aff14da16e18ea29381d0bd02eede1aafc8df1 | /mtlbSci/macros/moc_unique.sci | 1942efb8ba3eec71eee7e65fd403db44237e22bf | [] | no_license | josuemoraisgh/mtlbSci | 5d762671876bced45960a774f7192b41124a13ed | 5c813ed940cccf774ccd52c9a69f88ba39f22deb | refs/heads/main | 2023-07-15T23:47:11.843101 | 2021-08-26T17:52:57 | 2021-08-26T17:52:57 | 385,216,432 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,600 | sci | moc_unique.sci | function [y, i, j] = moc_unique (x,param)
// Return the unique elements of x, sorted in ascending order.
// Calling Sequence
// moc_unique (x)
// moc_unique (x, "rows")
// moc_unique (..., "first")
// umoc_nique (..., "last")
// [y, i, j] = moc_unique (...)
// Description
// If x is a row vector, return a row vector, but if x
// is a column vector or a matrix return a column vector.
//
// If the optional argument "rows" is supplied, return the unique
// rows of x, sorted in ascending order.
//
// If requested, return index vectors i and j such that
// x(i)==y and y(j)==x.
//
// Additionally, one of "first" or "last" may be given as
// an argument. If "last" is specified, return the highest
// possible indices in i, otherwise, if "first" is
// specified, return the lowest. The default is "last".
// See also
// moc_ismember
// Authors
// Copyright (C) 2008, 2009 Jaroslav Hajek
// Copyright (C) 2000, 2001, 2005, 2006, 2007 Paul Kienzle
// H. Nahrstaedt 2010,2011
//
// This file is part of Octave.
//
// Octave is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or (at
// your option) any later version.
//
// Octave is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Octave; see the file COPYING. If not, see
// <http://www.gnu.org/licenses/>.
[nargout,nargin]=argn(0);
if (nargin < 1)
error ("One Argument is needed!");
end
if nargin==1
optfirst = 0;
optrows = 0;
else
optfirst = (param=="first");
optlast = param=="last"
optrows = param=="rows" & size (x, 2) > 1;
end
if (optrows)
n = size (x, 1);
dim = 1;
else
n = size (x,'*');
dim = (size (x, 1) == 1) + 1;
end
y = x;
if (n < 1)
i = [];
j = [];
return;
elseif (n < 2)
i = 1;
j = 1;
return;
end
if (optrows)
[y, i] = gsort(y,'r','i');
match = and (y(1:n-1,:) == y(2:n,:), 2);
idx = find (match);
y(idx,:) = [];
else
if (size (y, 1) ~= 1)
y = y(:);
end
//[y, i] = mtlb_sort (y);
[y, i] = gsort (y,'g','i')
match = (y(1:n-1) == y(2:n));
idx = find (match);
y(idx) = [];
end
if (nargout >= 3)
j = i;
if (dim == 1)
j(i) = cumsum ([1; ~match]);
else
j(i) = cumsum ([1, ~match]);
end
end
if (optfirst)
i(idx+1) = [];
else
i(idx) = [];
end
endfunction
//assert(unique([1 1 2; 1 2 1; 1 1 2]),[1;2])
//assert(unique([1 1 2; 1 0 1; 1 1 2],'rows'),[1 0 1; 1 1 2])
//assert(unique([]),[])
//assert(unique([1]),[1])
//assert(unique([1 2]),[1 2])
//assert(unique([1;2]),[1;2])
//assert(unique([1,NaN,Inf,NaN,Inf]),[1,Inf,NaN,NaN])
//assert(unique({'Foo','Bar','Foo'}),{'Bar','Foo'})
//assert(unique({'Foo','Bar','FooBar'}'),{'Bar','Foo','FooBar'}')
//test
// [a,i,j] = unique([1,1,2,3,3,3,4]);
// assert(a,[1,2,3,4])
// assert(i,[2,3,6,7])
// assert(j,[1,1,2,3,3,3,4])
//
//test
// [a,i,j] = unique([1,1,2,3,3,3,4]','first');
// assert(a,[1,2,3,4]')
// assert(i,[1,3,4,7]')
// assert(j,[1,1,2,3,3,3,4]')
//
//test
// [a,i,j] = unique({'z'; 'z'; 'z'});
// assert(a,{'z'})
// assert(i,[3]')
// assert(j,[1,1,1]')
//
//test
// A=[1,2,3;1,2,3];
// [a,i,j] = unique(A,'rows');
// assert(a,[1,2,3])
// assert(A(i,:),a)
// assert(a(j,:),A)
|
33aaa21f15a90b5742d5b0471879dd6d6cbe1805 | 5bc3a272ac3972765259062ed2c4abd8ac31eb84 | /EE 324 controls lab/lab4/q1.sce | 6c21c4ad5845931d9b63a3e6fb0604ea1230a72b | [] | no_license | ishan-2404/Duaon-mei-yaad-rakhna-XD | 51a268cb15695d78a1bd086d958f402fe6ee093d | bf702ac84c18f7d677a35f9f850e3bfb63a32625 | refs/heads/main | 2023-07-13T17:10:57.650902 | 2021-08-14T07:06:22 | 2021-08-14T07:06:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 715 | sce | q1.sce | s = poly(0,'s');
t = 0:.001:10;
// PART A
h1 = 1/s^2;
h2 = 50*s/(s^2+s+100);
h3 = s-2;
h4 = h1*h2*h3;
Heq = syslin('c', h4/(1+h4));
// PART B
h1 = s;
h2 = 1/s;
h3 = h1*h1+h2; // inner series + parallel connection
h4 = h3/(h3+1)*h2; // taking care of upper feedback loop
Heq_b = syslin('c', h1*h4/(1+h1*h4)); // very similar to a part (just there is additional multiplication in feedback loop), this Heq itslf works like a syslin object would
//PART C
h1 = s;
h2 = 2*s;
h3 = 1/(s+1);
h4 = 4;
G1 = h1+h2;
G2 = h1/(1+h1);
G3 = h1/(G1); // 1/s+2
G4 = G1*G2+ h2;
G5 = 4*G3/(1+4*G3);
G6 = G4*G5;
Heq = syslin('c', G6/(1+G6));
|
01a1b368be96e0bdebd731780a5811940629b2e3 | 931df7de6dffa2b03ac9771d79e06d88c24ab4ff | /bowtie.sce | 88366ee5fd60292c3de32cf40d0262b217372c2b | [] | no_license | MBHuman/Scenarios | be1a722825b3b960014b07cda2f12fa4f75c7fc8 | 1db6bfdec8cc42164ca9ff57dd9d3c82cfaf2137 | refs/heads/master | 2023-01-14T02:10:25.103083 | 2020-11-21T16:47:14 | 2020-11-21T16:47:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 28,294 | sce | bowtie.sce | Name=bowtie
PlayerCharacters=1
BotCharacters=2.bot
IsChallenge=true
Timelimit=90.0
PlayerProfile=1
AddedBots=2.bot
PlayerMaxLives=0
BotMaxLives=10
PlayerTeam=1
BotTeams=2
MapName=vertex.map
MapScale=4.0
BlockProjectilePredictors=true
BlockCheats=true
InvinciblePlayer=false
InvincibleBots=false
Timescale=1.0
BlockHealthbars=false
TimeRefilledByKill=0.0
ScoreToWin=1000.0
ScorePerDamage=1.0
ScorePerKill=0.0
ScorePerMidairDirect=0.0
ScorePerAnyDirect=0.0
ScorePerTime=1.0
ScoreLossPerDamageTaken=0.0
ScoreLossPerDeath=0.0
ScoreLossPerMidairDirected=0.0
ScoreLossPerAnyDirected=0.0
ScoreMultAccuracy=false
ScoreMultDamageEfficiency=false
ScoreMultKillEfficiency=false
GameTag=Tracking
WeaponHeroTag=Tracking Beam
DifficultyTag=2
AuthorsTag=faiNt`
BlockHitMarkers=false
BlockHitSounds=false
BlockMissSounds=true
BlockFCT=false
Description=HEADSHOTS ONLY // ADS
GameVersion=1.0.7.2
ScorePerDistance=0.0
[Aim Profile]
Name=At Feet
MinReactionTime=0.3
MaxReactionTime=0.4
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=15.0
TrackSpeed=3.5
TrackError=3.5
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=40.0
ShootFOV=15.0
VerticalAimOffset=-200.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Aim Profile]
Name=Low Skill At Feet
MinReactionTime=0.35
MaxReactionTime=0.45
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=20.0
TrackSpeed=3.0
TrackError=5.0
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=60.0
ShootFOV=25.0
VerticalAimOffset=-200.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Aim Profile]
Name=Low Skill
MinReactionTime=0.35
MaxReactionTime=0.45
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=20.0
TrackSpeed=3.0
TrackError=5.0
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=60.0
ShootFOV=25.0
VerticalAimOffset=0.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Aim Profile]
Name=Default
MinReactionTime=0.3
MaxReactionTime=0.4
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=15.0
TrackSpeed=3.5
TrackError=3.5
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=40.0
ShootFOV=15.0
VerticalAimOffset=0.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Bot Profile]
Name=2
DodgeProfileNames=Long Strafe FB
DodgeProfileWeights=1.0
DodgeProfileMaxChangeTime=2.0
DodgeProfileMinChangeTime=1.5
WeaponProfileWeights=1.0;1.0;2.0;1.0;0.0;0.0;0.0;0.0
AimingProfileNames=At Feet;Low Skill At Feet;Low Skill;Default;Default;Default;Default;Default
WeaponSwitchTime=3.0
UseWeapons=false
CharacterProfile=Watcher
SeeThroughWalls=false
NoDodging=false
NoAiming=false
[Character Profile]
Name=1
MaxHealth=300.0
WeaponProfileNames=gun;;;;;;;
MinRespawnDelay=1.0
MaxRespawnDelay=5.0
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=2.0
CameraOffset=X=0.000 Y=0.000 Z=80.000
HeadshotOnly=false
DamageKnockbackFactor=4.0
MovementType=Base
MaxSpeed=700.0
MaxCrouchSpeed=500.0
Acceleration=5000.0
AirAcceleration=16000.0
Friction=4.0
BrakingFrictionFactor=2.0
JumpVelocity=800.0
Gravity=3.0
AirControl=0.25
CanCrouch=true
CanPogoJump=false
CanCrouchInAir=true
CanJumpFromCrouch=false
EnemyBodyColor=X=0.771 Y=0.000 Z=0.000
EnemyHeadColor=X=1.000 Y=1.000 Z=1.000
TeamBodyColor=X=1.000 Y=0.888 Z=0.000
TeamHeadColor=X=1.000 Y=1.000 Z=1.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=0.0
MainBBType=Cylindrical
MainBBHeight=320.0
MainBBRadius=58.0
MainBBHasHead=false
MainBBHeadRadius=45.0
MainBBHeadOffset=0.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=320.0
ProjBBRadius=55.0
ProjBBHasHead=false
ProjBBHeadRadius=45.0
ProjBBHeadOffset=0.0
ProjBBHide=true
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=;;;
HideWeapon=true
AerialFriction=0.0
StrafeSpeedMult=1.0
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.5
AllowBufferedJumps=true
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.0
ThirdPersonCamera=false
TPSArmLength=300.0
TPSOffset=X=0.000 Y=150.000 Z=150.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
[Character Profile]
Name=Watcher
MaxHealth=100.0
WeaponProfileNames=;;;;;;;
MinRespawnDelay=0.1
MaxRespawnDelay=5.0
StepUpHeight=45.0
CrouchHeightModifier=0.69
CrouchAnimationSpeed=2.0
CameraOffset=X=0.000 Y=0.000 Z=20.000
HeadshotOnly=true
DamageKnockbackFactor=3.0
MovementType=Base
MaxSpeed=200.0
MaxCrouchSpeed=270.0
Acceleration=10000.0
AirAcceleration=16000.0
Friction=100.0
BrakingFrictionFactor=0.0
JumpVelocity=300.0
Gravity=1.0
AirControl=0.16
CanCrouch=true
CanPogoJump=false
CanCrouchInAir=true
CanJumpFromCrouch=false
EnemyBodyColor=X=0.000 Y=0.000 Z=0.000
EnemyHeadColor=X=1.000 Y=0.888 Z=0.000
TeamBodyColor=X=1.000 Y=0.888 Z=0.000
TeamHeadColor=X=1.000 Y=1.000 Z=1.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=0.0
MainBBType=Cylindrical
MainBBHeight=130.0
MainBBRadius=18.0
MainBBHasHead=true
MainBBHeadRadius=10.0
MainBBHeadOffset=40.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=160.0
ProjBBRadius=26.0
ProjBBHasHead=false
ProjBBHeadRadius=20.0
ProjBBHeadOffset=15.0
ProjBBHide=true
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=;;;
HideWeapon=true
AerialFriction=0.0
StrafeSpeedMult=1.0
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.1
AllowBufferedJumps=true
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.0
ThirdPersonCamera=false
TPSArmLength=300.0
TPSOffset=X=0.000 Y=150.000 Z=150.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
[Dodge Profile]
Name=Long Strafe FB
MaxTargetDistance=100000.0
MinTargetDistance=0.0
ToggleLeftRight=true
ToggleForwardBack=true
MinLRTimeChange=0.5
MaxLRTimeChange=2.0
MinFBTimeChange=1.0
MaxFBTimeChange=2.0
DamageReactionChangesDirection=false
DamageReactionChanceToIgnore=0.5
DamageReactionMinimumDelay=0.15
DamageReactionMaximumDelay=0.18
DamageReactionCooldown=1.0
DamageReactionThreshold=0.0
DamageReactionResetTimer=0.1
JumpFrequency=0.0
CrouchInAirFrequency=0.0
CrouchOnGroundFrequency=0.0
TargetStrafeOverride=Ignore
TargetStrafeMinDelay=0.125
TargetStrafeMaxDelay=0.25
MinProfileChangeTime=0.0
MaxProfileChangeTime=0.0
MinCrouchTime=0.3
MaxCrouchTime=0.6
MinJumpTime=0.3
MaxJumpTime=0.6
LeftStrafeTimeMult=1.0
RightStrafeTimeMult=1.0
StrafeSwapMinPause=0.0
StrafeSwapMaxPause=0.0
BlockedMovementPercent=0.8
BlockedMovementReactionMin=0.05
BlockedMovementReactionMax=0.1
[Weapon Profile]
Name=gun
Type=Hitscan
ShotsPerClick=1
DamagePerShot=1.0
KnockbackFactor=0.0
TimeBetweenShots=0.046
Pierces=false
Category=FullyAuto
BurstShotCount=1
TimeBetweenBursts=0.5
ChargeStartDamage=10.0
ChargeStartVelocity=X=500.000 Y=0.000 Z=0.000
ChargeTimeToAutoRelease=2.0
ChargeTimeToCap=1.0
ChargeMoveSpeedModifier=1.0
MuzzleVelocityMin=X=2000.000 Y=0.000 Z=0.000
MuzzleVelocityMax=X=2000.000 Y=0.000 Z=0.000
InheritOwnerVelocity=0.0
OriginOffset=X=0.000 Y=0.000 Z=0.000
MaxTravelTime=5.0
MaxHitscanRange=100000.0
GravityScale=1.0
HeadshotCapable=true
HeadshotMultiplier=1.0
MagazineMax=0
AmmoPerShot=1
ReloadTimeFromEmpty=0.5
ReloadTimeFromPartial=0.5
DamageFalloffStartDistance=100000.0
DamageFalloffStopDistance=100000.0
DamageAtMaxRange=7.0
DelayBeforeShot=0.0
HitscanVisualEffect=Tracer
ProjectileGraphic=Ball
VisualLifetime=0.05
WallParticleEffect=None
HitParticleEffect=None
BounceOffWorld=false
BounceFactor=0.0
BounceCount=0
HomingProjectileAcceleration=0.0
ProjectileEnemyHitRadius=1.0
CanAimDownSight=true
ADSZoomDelay=0.0
ADSZoomSensFactor=0.7
ADSMoveFactor=1.0
ADSStartDelay=0.0
ShootSoundCooldown=0.08
HitSoundCooldown=0.08
HitscanVisualOffset=X=0.000 Y=0.000 Z=-80.000
ADSBlocksShooting=false
ShootingBlocksADS=false
KnockbackFactorAir=0.0
RecoilNegatable=false
DecalType=0
DecalSize=30.0
DelayAfterShooting=0.0
BeamTracksCrosshair=true
AlsoShoot=
ADSShoot=
StunDuration=0.0
CircularSpread=true
SpreadStationaryVelocity=0.0
PassiveCharging=false
BurstFullyAuto=true
FlatKnockbackHorizontal=0.0
FlatKnockbackVertical=0.0
HitscanRadius=0.0
HitscanVisualRadius=1.0
TaggingDuration=0.0
TaggingMaxFactor=1.0
TaggingHitFactor=1.0
ProjectileTrail=None
RecoilCrouchScale=1.0
RecoilADSScale=1.0
PSRCrouchScale=1.0
PSRADSScale=1.0
ProjectileAcceleration=0.0
AccelIncludeVertical=true
AimPunchAmount=0.0
AimPunchResetTime=0.1
AimPunchCooldown=0.5
AimPunchHeadshotOnly=false
AimPunchCosmeticOnly=true
MinimumDecelVelocity=0.0
PSRManualNegation=false
PSRAutoReset=true
AimPunchUpTime=0.05
AmmoReloadedOnKill=0
CancelReloadOnKill=false
FlatKnockbackHorizontalMin=0.0
FlatKnockbackVerticalMin=0.0
ADSScope=No Scope
ADSFOVOverride=77.139999
ADSFOVScale=Apex Legends
ADSAllowUserOverrideFOV=true
IsBurstWeapon=false
ForceFirstPersonInADS=true
ZoomBlockedInAir=false
ADSCameraOffsetX=0.0
ADSCameraOffsetY=0.0
ADSCameraOffsetZ=0.0
QuickSwitchTime=0.1
Explosive=false
Radius=500.0
DamageAtCenter=100.0
DamageAtEdge=0.0
SelfDamageMultiplier=0.5
ExplodesOnContactWithEnemy=false
DelayAfterEnemyContact=0.0
ExplodesOnContactWithWorld=false
DelayAfterWorldContact=0.0
ExplodesOnNextAttack=false
DelayAfterSpawn=0.0
BlockedByWorld=false
SpreadSSA=1.0,1.0,-1.0,0.0
SpreadSCA=1.0,1.0,-1.0,0.0
SpreadMSA=1.0,1.0,-1.0,0.0
SpreadMCA=1.0,1.0,-1.0,0.0
SpreadSSH=1.0,1.0,-1.0,0.0
SpreadSCH=1.0,1.0,-1.0,0.0
SpreadMSH=1.0,1.0,-1.0,0.0
SpreadMCH=1.0,1.0,-1.0,0.0
MaxRecoilUp=0.0
MinRecoilUp=0.0
MinRecoilHoriz=0.0
MaxRecoilHoriz=0.0
FirstShotRecoilMult=1.0
RecoilAutoReset=false
TimeToRecoilPeak=0.05
TimeToRecoilReset=0.35
AAMode=0
AAPreferClosestPlayer=false
AAAlpha=0.05
AAMaxSpeed=1.0
AADeadZone=0.0
AAFOV=30.0
AANeedsLOS=true
TrackHorizontal=true
TrackVertical=true
AABlocksMouse=false
AAOffTimer=0.0
AABackOnTimer=0.0
TriggerBotEnabled=false
TriggerBotDelay=0.0
TriggerBotFOV=1.0
StickyLock=false
HeadLock=false
VerticalOffset=0.0
DisableLockOnKill=false
UsePerShotRecoil=false
PSRLoopStartIndex=0
PSRViewRecoilTracking=0.45
PSRCapUp=9.0
PSRCapRight=4.0
PSRCapLeft=4.0
PSRTimeToPeak=0.095
PSRResetDegreesPerSec=40.0
UsePerBulletSpread=false
PBS0=0.0,0.0
[Map Data]
reflex map version 8
global
entity
type WorldSpawn
String32 targetGameOverCamera end
UInt8 playersMin 1
UInt8 playersMax 16
brush
vertices
-150.000000 710.000000 1854.000000
-86.000000 710.000000 1854.000000
-86.000000 710.000000 336.000000
-150.000000 710.000000 336.000000
-150.000000 -8.000000 1854.000000
-86.000000 -8.000000 1854.000000
-86.000000 -8.000000 336.000000
-150.000000 -8.000000 336.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
-174.000000 0.000000 1856.000000
830.000000 0.000000 1856.000000
830.000000 0.000000 318.000000
830.000000 -16.000000 1856.000000
-174.000000 0.000000 318.000000
-174.000000 -16.000000 318.000000
-174.000000 -16.000000 1856.000000
830.000000 -16.000000 318.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 1 0 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 4 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 3 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 5 4 2 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 6 5 7 0x00000000
brush
vertices
414.000000 0.000000 864.000000
382.000000 0.000000 706.000000
414.000000 40.000000 706.000000
382.000000 0.000000 864.000000
414.000000 0.000000 706.000000
382.000000 40.000000 706.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 3 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 1 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 5 3 0 2 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 1 5 0x00000000
brush
vertices
320.000000 0.000000 1056.000000
409.095398 0.000000 921.649780
431.722839 40.000000 944.277222
297.372498 0.000000 1033.372559
431.722839 0.000000 944.277222
409.095398 40.000000 921.649780
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 3 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 1 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 5 3 0 2 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 1 5 0x00000000
brush
vertices
296.000000 0.000000 1034.000000
206.904480 0.000000 1168.349854
184.277100 40.000000 1145.722900
318.627441 0.000000 1056.627075
184.277100 0.000000 1145.722900
206.904480 40.000000 1168.349854
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 3 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 1 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 5 3 0 2 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 1 5 0x00000000
brush
vertices
296.000000 0.000000 1304.000000
430.349854 0.000000 1393.095581
407.722900 40.000000 1415.722900
318.627075 0.000000 1281.372559
407.722900 0.000000 1415.722900
430.349854 40.000000 1393.095581
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 3 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 1 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 5 3 0 2 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 1 5 0x00000000
brush
vertices
317.999939 0.000000 1280.000000
183.649780 0.000000 1190.904541
206.277222 40.000000 1168.277100
295.372559 0.000000 1302.627441
206.277222 0.000000 1168.277100
183.649780 40.000000 1190.904541
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 3 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 1 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 5 3 0 2 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 1 5 0x00000000
brush
vertices
154.216675 200.000000 1162.123291
147.145447 200.000000 1169.194214
400.288208 200.000000 1422.340332
407.359375 200.000000 1415.269287
154.216675 0.000000 1162.123291
147.145447 0.000000 1169.194214
400.288208 0.000000 1422.340332
407.359375 0.000000 1415.269287
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
146.802338 200.000000 1169.194336
153.873322 200.000000 1176.265625
408.433563 200.000000 921.708740
401.362518 200.000000 914.637512
146.802338 0.000000 1169.194336
153.873322 0.000000 1176.265625
408.433563 0.000000 921.708740
401.362518 0.000000 914.637512
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
206.802338 202.000000 1169.194336
213.873322 202.000000 1176.265625
468.433563 202.000000 921.708740
461.362518 202.000000 914.637512
206.802338 2.000000 1169.194336
213.873322 2.000000 1176.265625
468.433563 2.000000 921.708740
461.362518 2.000000 914.637512
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
212.802307 200.000000 1161.194336
205.731140 200.000000 1168.265259
460.288055 200.000000 1422.825562
467.359100 200.000000 1415.754517
212.802307 0.000000 1161.194336
205.731140 0.000000 1168.265259
460.288055 0.000000 1422.825562
467.359100 0.000000 1415.754517
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
442.000000 200.000000 1402.000000
432.100342 200.000000 1392.100586
396.744873 200.000000 1427.456055
406.644409 200.000000 1437.355469
442.000000 0.000000 1402.000000
432.100342 0.000000 1392.100586
396.744873 0.000000 1427.456055
406.644409 0.000000 1437.355469
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
206.686432 202.000000 1167.313843
184.058929 202.000000 1144.686401
160.017029 202.000000 1168.728027
182.644409 202.000000 1191.355469
206.686432 2.000000 1167.313843
184.058929 2.000000 1144.686401
160.017029 2.000000 1168.728027
182.644409 2.000000 1191.355469
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
412.000000 200.000000 906.000000
402.100586 200.000000 915.899780
437.456055 200.000000 951.255371
447.355347 200.000000 941.355469
412.000000 0.000000 906.000000
402.100586 0.000000 915.899780
437.456055 0.000000 951.255371
447.355347 0.000000 941.355469
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
608.000000 0.000000 1144.000000
608.000000 100.000000 1200.000000
608.000000 100.000000 1144.000000
600.000000 0.000000 1144.000000
608.000000 0.000000 1200.000000
600.000000 0.000000 1200.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 1 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 2 3 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 0 4 5 0x00000000
brush
vertices
608.000000 0.000000 1200.000000
608.000000 100.000000 1200.000000
608.000000 100.000000 1192.000000
552.000000 0.000000 1200.000000
608.000000 0.000000 1192.000000
552.000000 0.000000 1192.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 0 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 1 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 0 3 5 0x00000000
brush
vertices
552.000000 0.000000 1136.000000
608.000000 100.000000 1144.000000
608.000000 100.000000 1136.000000
608.000000 0.000000 1144.000000
608.000000 0.000000 1136.000000
552.000000 0.000000 1144.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 3 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 2 0 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 4 3 5 0x00000000
brush
vertices
536.000000 112.000000 1200.000000
550.000000 112.000000 1200.000000
550.000000 112.000000 1136.000000
536.000000 112.000000 1136.000000
536.000000 0.000000 1200.000000
550.000000 0.000000 1200.000000
550.000000 0.000000 1136.000000
536.000000 0.000000 1136.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
614.000000 114.000000 1206.000000
614.000000 114.000000 1192.000000
550.000122 114.000000 1192.000000
550.000122 114.000000 1206.000000
614.000000 2.000000 1206.000000
614.000000 2.000000 1192.000000
550.000122 2.000000 1192.000000
550.000122 2.000000 1206.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
614.000000 116.000000 1144.000000
614.000000 116.000000 1130.000000
550.000122 116.000000 1130.000000
550.000122 116.000000 1144.000000
614.000000 4.000000 1144.000000
614.000000 4.000000 1130.000000
550.000122 4.000000 1130.000000
550.000122 4.000000 1144.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
entity
type CameraPath
UInt8 posLerp 2
UInt8 angleLerp 2
entity
type PlayerSpawn
Vector3 position 582.000000 0.000000 1168.000000
Vector3 angles 630.000000 0.000000 0.000000
Bool8 teamB 0
Bool8 initialSpawn 0
Bool8 modeCTF 0
Bool8 modeFFA 0
Bool8 modeTDM 0
Bool8 mode1v1 0
Bool8 modeRace 0
Bool8 mode2v2 0
entity
type PlayerSpawn
Vector3 position 312.000000 6.000000 1040.000000
Vector3 angles 405.000000 0.000000 0.000000
Bool8 teamA 0
Bool8 initialSpawn 0
Bool8 modeCTF 0
Bool8 modeFFA 0
Bool8 modeTDM 0
Bool8 mode1v1 0
Bool8 modeRace 0
Bool8 mode2v2 0
entity
type PlayerSpawn
Vector3 position 316.000000 8.000000 1304.000000
Vector3 angles 495.000000 0.000000 0.000000
Bool8 teamA 0
Bool8 initialSpawn 0
Bool8 modeCTF 0
Bool8 modeFFA 0
Bool8 modeTDM 0
Bool8 mode1v1 0
Bool8 modeRace 0
Bool8 mode2v2 0
|
6b1fa6b588e48186facd3e863d2ae06f101fb49f | ae90aa32e949a5eab9665f526f886f05860161d2 | /code/nand2tetris/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst | 57336cbc8d4edd34ed90547ef35305acf4cfbe51 | [
"CC-BY-SA-3.0",
"MIT"
] | permissive | cccbook/sp | 4097ab760cfb013b689dc4739a439de29d85d324 | aff23e6b18ba6221022b14b024fd562427c46d9a | refs/heads/master | 2022-05-22T03:31:33.324045 | 2019-06-06T07:04:37 | 2019-06-06T07:04:37 | 156,299,694 | 257 | 96 | MIT | 2022-03-19T08:48:32 | 2018-11-05T23:56:37 | Assembly | UTF-8 | Scilab | false | false | 667 | tst | SimpleFunctionVME.tst | // This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst
load SimpleFunction.vm,
output-file SimpleFunction.out,
compare-to SimpleFunction.cmp,
output-list RAM[0]%D1.6.1 RAM[1]%D1.6.1 RAM[2]%D1.6.1
RAM[3]%D1.6.1 RAM[4]%D1.6.1 RAM[310]%D1.6.1;
set sp 317,
set local 317,
set argument 310,
set this 3000,
set that 4000,
set argument[0] 1234,
set argument[1] 37,
set argument[2] 9,
set argument[3] 305,
set argument[4] 300,
set argument[5] 3010,
set argument[6] 4010,
repeat 10 {
vmstep;
}
output;
|
80ca8a7954958d6b514d8fa05bcf57eb216cb91f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3782/CH10/EX10.9/Ex10_9.sce | a7a4c2060a4e721e5d7496babab94fca9f5b253a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 239 | sce | Ex10_9.sce |
//
//
t1=80-70
l=50
k=1/(cos(20*(%pi/180)))
k1=k*(sin(t1*(%pi/180)))
t3=asin(k1)
t3=t3*(180/(%pi))
printf("\n theta 3= %0.3f ",t3)
t3=180-t3
t2=180-(t3+t1)
r=l*(sin(t1*(%pi/180)))/(sin(0.6*(%pi/180)))
printf("\n Radius R= %0.3f ",r)
|
084461034ab2af9e059a03bfb49368883a84784d | 449d555969bfd7befe906877abab098c6e63a0e8 | /63/CH18/EX18.1/Exa18_1.sci | 9e6163c81c25ee615dac6f6999e2a46e01cb2ec1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 214 | sci | Exa18_1.sci | //Determine the critical angle of incidence between two substances with different refractive indexes
n1 = 1.5;
n2 = 1.46;
thetaC = asind((1.46*n2)/(1.5*n1));
disp(thetaC, 'Critical angle is (in degrees)') |
bad0c625523f1d518ea282a361e04e4c76c59e08 | 449d555969bfd7befe906877abab098c6e63a0e8 | /273/CH15/EX15.10/ex15_10.sce | 598f808e70e1106a3c672d7455882ac7ccbf60b1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 477 | sce | ex15_10.sce | clc;clear;
//Example 15.10
//calculation of crosssection
//given values
t=.01*10^-3;//thickness in m
n=10^13;//no of protons bombarding target per s
NA=6.02*10^26;//avogadro's number
M=7;//atomic mass of lithium in kg
d=500;//density of lithium in kg/m^3
n0=10^8;//no of neutrons produced per s
//calculation
n1=d*NA/M;//no of target nuclei per unit volume
n2=n1*t;//no of target nuclei per area
A=n0/(n*n2);
disp(A,'crosssection(in m^2) for this reaction is'); |
6a6110e85edda062940adba68de083f68bdadf77 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3755/CH1/EX1.2/Ex1_2.sce | 2769e7b1516a535b33bc9477b1e23e0ee66b1da3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 556 | sce | Ex1_2.sce | clear
//
//
//
//Variable declaration
e=1.6*10^-19; //charge(coulomb)
x=9*10^9;
r0=3.56*10^-10; //equilibrium distance(m)
A=1.763; //madelung constant
n=10.5; //repulsive exponent value
IE=3.89; //ionisation energy(eV)
EA=-3.61; //electron affinity(eV)
//Calculations
U0=-(x*A*e/r0)*(1-1/n); //ionic cohesive energy(eV)
U=U0+IE+EA; //atomic cohesive energy(eV)
//Result
printf("\n ionic cohesive energy is %0.2f eV",U0)
printf("\n atomic cohesive energy is %0.2f eV",U)
|
6e571863f1624c29d1e968c5ff9e7cccd0710bbe | 449d555969bfd7befe906877abab098c6e63a0e8 | /1172/CH6/EX6.16/Example6_16.sce | 2ce93464bb3427a11e927c2465146be1e02835b2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 420 | sce | Example6_16.sce | clc
//Given that
c = 3e8 // speed of light in m/s
v = 0.9 * c // velocity of rod wrt laboratory
proper_time = 2.5e-8 // proper mean life time of mesons
// sample problem 16 page No. 228
printf("\n \n\n # Problem 16 # \n")
printf("\n Standard formula used \n t = t_o /sqrt ( 1- (v/c)^2)")
t = proper_time / sqrt (1 - (v / c)^2) // calculation of New mean life time
printf ("\n New mean life time is %e s.",t )
|
fb275fc929358e13f420c3e0252e93ecfcbdf06d | 449d555969bfd7befe906877abab098c6e63a0e8 | /1910/CH6/EX6.7/Chapter67.sce | 5057daaa036aece661e96e8d33413c9f7aaa3461 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,030 | sce | Chapter67.sce | // Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
clear;
clc;
disp("Introduction to heat transfer by S.K.Som, Chapter 6, Example 7")
//A flat plate B=1.2m wide and of length L is kept parallel to a uniform stream of air of velocity Uinf=3m/s in a wind tunnel.
Uinf=3;
B=1.2;
//If it is desired to have a laminar boundary layer only on the plate
//Assume that the laminar flow exists up to a reynold number(ReL)=5*10^5.Take density of air as rhoair=1.2kg/m^3 and viscosity of air as nuair=1.5*10^-5 m^2/s.
nuair=1.5*10^-5;
rhoair=1.2;
ReL=5*10^5;
//For maximum length of the plate reynolds number is ReL=Uinf*L/nuair
//so L=ReL*nuair/Uinf
disp("The maximum length of plate in m is ")
L=ReL*nuair/Uinf
//The average skin friction coefficient is cfL=1.328/(ReL)^(1/2)
disp("The average skin friction coefficient is")
cfL=1.328/(ReL)^(1/2)
//Fd is drag force
disp("Drag force on one side of plate in N is")
Fd=cfL*(rhoair*Uinf^2/2)*B*L
|
fad0faa8a4db97e5c75f1b1bcfabfb5fcbe171a4 | da5b40d917ec2982828bd9bdf06b18b7bf189f26 | /sim/scripts/00_styreneIdeal.tst | 21a152f47ac3fac880e4baa2daa4799e5566c5cd | [] | no_license | psy007/NNPC-CHEMICAL-SIM- | 4bddfc1012e0bc60c5ec6307149174bcd04398f9 | 8fb4c90180dc96be66f7ca05a30e59a8735fc072 | refs/heads/master | 2020-04-12T15:37:04.174834 | 2019-02-06T10:10:20 | 2019-02-06T10:10:20 | 162,587,144 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,814 | tst | 00_styreneIdeal.tst | units VMG
$thermo = VirtualMaterials.IdealLiquid/Ideal/HC
/ -> $thermo
/LiquidPhases = 2
/thermo + TOLUENE ETHYLBENZENE STYRENE MESITYLENE alpha-METHYLSTYRENE n-PROPYLBENZENE
#Feed
S1 = Stream.Stream_Material()
/S1.In.T = 317.75 K
/S1.In.P = 220 mmHg
/S1.In.Fraction = 0.80 51.00 47.77 0.06 0.13 0.20
/S1.In.MoleFlow = 99.96 kgmole/h
#Tower 1
T1 = Tower.DistillationColumn()
/T1.TryToSolve = 0
/S1.Out -> /T1.Feed_1_feed
/T1.Stage_0 + 49
/T1.Stage_50.feed.ParentStage = 9
#Total cond and P prof
delete /T1.Stage_0.condenserV
/T1.LiquidDraw_0_condenserL.P = 40 mmHg
/T1.LiquidDraw_51_reboilerL.P = 270 mmHg
#More specs and solve
/T1.LiquidDraw_0_condenserL.MoleFlow = 52 kgmole/h
/T1.Variable_0_Reflux.Generic = 2.5
/T1.TryToRestart = 0
/T1.TryToSolve = 1
/T1.TryToRestart = 1
/T1.TryToSolve = 0
#Add liquid draw and solve
/T1.Stage_20.L = Tower.LiquidDraw()
/T1.LiquidDraw_20_L.MoleFlow = 11 kgmole/h
/T1.TryToRestart = 1 /T1.TryToSolve = 1
#Energy, distillate, draw and bottoms streams for T1
S2 = Stream.Stream_Material()
/T1.LiquidDraw_0_condenserL -> /S2.In
S3 = Stream.Stream_Material()
/T1.LiquidDraw_20_L -> /S3.In
S4 = Stream.Stream_Material()
/T1.LiquidDraw_51_reboilerL -> /S4.In
Q1 = Stream.Stream_Energy()
/T1.EnergyFeed_0_condenserQ -> /Q1.In
Q2 = Stream.Stream_Energy()
/Q2.Out -> /T1.EnergyFeed_51_reboilerQ
#Tower2
T2 = Tower.DistillationColumn()
/T2.TryToSolve = 0
/S4.Out -> /T2.Feed_1_feed
/T2.Stage_0 + 49
/T2.Stage_50.feed.ParentStage = 30
#Total cond and P prof
delete /T2.Stage_0.condenserV
/T2.LiquidDraw_0_condenserL.P = 40 mmHg
/T2.LiquidDraw_51_reboilerL.P = 250 mmHg
#more specs and solve
/T2.LiquidDraw_0_condenserL.MoleFlow = 16 kgmole/h
/T2.Variable_0_Reflux.Generic = 2.5
/T2.TryToRestart = 0
/T2.TryToSolve = 1
/T2.TryToRestart = 1
/T2.TryToSolve = 0
#Add liquid draw and solve
/T2.Stage_20.L = Tower.LiquidDraw()
/T2.LiquidDraw_20_L.MoleFlow = 7 kgmole/h
/T2.TryToRestart = 0
/T2.TryToSolve = 1
/T2.TryToRestart = 1
/T2.TryToSolve = 0
#Energy, distillate, draw and bottoms streams for T2
S5 = Stream.Stream_Material()
/T2.LiquidDraw_0_condenserL -> /S5.In
S6 = Stream.Stream_Material()
/T2.LiquidDraw_20_L -> /S6.In
S7 = Stream.Stream_Material()
/T2.LiquidDraw_51_reboilerL -> /S7.In
Q3 = Stream.Stream_Energy()
/Q3.Out -> /T2.EnergyFeed_51_reboilerQ
Q4 = Stream.Stream_Energy()
/T2.EnergyFeed_0_condenserQ -> /Q4.In
#Connect recycle and spec estimates
/T2.LiquidDraw_0_condenserL ->
/T1.Stage_44.feed = Tower.Feed()
/T1.Feed_44_feed -> /S5.Out
/S5.In.T ~= 350 K
/S5.In.P ~= 26.6644
/S5.In.MoleFlow ~= 0
/S5.In.Fraction ~= 1 0 0 0 0 0
/T2.LiquidDraw_0_condenserL -> /S5.In
#Final solve
/T1.TryToRestart = 1
/T1.TryToSolve = 1
/T2.TryToRestart = 1
/T2.TryToSolve = 1
|
cce836b461ce1bbce1158b6738b916b3464e2e84 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3760/CH4/EX4.33/Ex4_33.sce | a0cb162e5255d88281cd229a177a9a533e97d9d5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,606 | sce | Ex4_33.sce | //ANSWER GIVEN IN THE BOOK FOR THIS QUESTION IS INCORRECT.
clc;
//Neglecting armature reaction & magnetic saturation
//Assuming rotational losses to remain constant
V=230;//Supply voltage
P=15000;//power rating of dc series motor in watts
Il_1=80;//line current rated
Il_2=40;//line current assuming that motor draws half the rated current at rated voltage
Ia_1=Il_1;//armature current at line current equal to 80 A.
Ia_2=Il_2;//armature current at line current equal to 40 A.
n1=1000;//rated speed in rpm
//Full load losses expressed as percentage of motor input:-
//Armature ohmic loss=2.8%(including brush loss)
//Field ohmic loss=2.2%
//Rotational loss=2.2%
P_ip=V*Il_1;//full load input
P_ohmic=P_ip*(5.4/100)//As percent of total ohmic losses=2.2+2.8=5.4%
//But P_ohmic=Il*Il*(Ra+Rs); where (Ra+Rs)=(armature + series field) resistance
//(Ra+Rs)=P_ohmic/(Il*Il)=0.115 ohms
//Let, r=(Ra+Rs)
r=0.115;
//PART(a)-
Ea1=V-(Ia_1*r);//counter emf at line current = 80 A
Ea2=V-(Ia_2*r);//counter emf at line current = 40 A
//Since the magnetic saturation is neglected, phi_1=k*80 & phi_2=k*40; where k=constant & phi_1 & phi_2 are flux per pole at line currents 80 & 40 A respectively.
//(Ea1/Ea2)=(n1*phi_1)/(n2*phi_2) or (220.8/225.4)=(1000*80)/(n2*40); where Ea1=220.8 V Ea2=225.4 V.
n2=(1000*80*225.4)/(40*220.8);//speed in rpm
printf('The speed of rotation of motor when the motor draws half the rated current at rated voltage is %f rpm.',round(n2));
//PART(b)-
Pr=P_ip*(2.2/100);//rotational losses
Psh=Ea2*Ia_2-Pr;
printf('\nThe shaft output power is %f W.',Psh);
|
47c8bef9cda8df425f0a32b88eecf16efd43d01d | ffda72af53128fa90b1d8ad1a8772b965c2e3442 | /Monty Hall/monty.sce | ce5d06573011cd2e2b5d2699136fc7c5d952a97a | [
"MIT"
] | permissive | linux-man/The-Travelling-Salesman-Problem | 5ca99a3b0024273ed1f6404000fb28785ee18a9f | 6e6d1020b3ae86dc928aeaeea773065d3a9145d7 | refs/heads/main | 2023-03-07T06:04:59.935447 | 2021-02-16T12:52:32 | 2021-02-16T12:52:32 | 333,133,666 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,060 | sce | monty.sce | player_keep_win_list = list()
player_switch_win_list = list()
player_keep_win = 0
player_switch_win = 0
doors = 3
clf
title("Mounty Hall Problem: " + string(doors) + " doors")
xlabel("Games")
ylabel("% Win")
for n = 1:1000
car = int(rand() * doors) + 1
door = int(rand() * doors) + 1
openned_door = int(rand() * doors) + 1
while openned_door == car | openned_door == door do
openned_door = int(rand() * doors) + 1
end
if door == car then
player_keep_win = player_keep_win + 1
end
player_keep_win_list($ + 1) = player_keep_win
new_door = int(rand() * doors) + 1
while new_door == door | new_door == openned_door do
new_door = int(rand() * doors) + 1
end
if new_door == car then
player_switch_win = player_switch_win + 1
end
player_switch_win_list($ + 1) = player_switch_win
x = 1:length(player_switch_win_list)
plot(list2vec(player_switch_win_list)'./x, "r")
plot(list2vec(player_keep_win_list)'./x, "g")
hl=legend(['Switch door';'Keep door']);
end
|
c8939db044deba9f03032e48f946158499198a56 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3866/CH11/EX11.1/Ex11_1.sce | 89754ed565936a1e6d165f4fd2c36382664f45ad | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 301 | sce | Ex11_1.sce | clc; clear; close;
t=10;//in years
A=2*(10^7);//in hr-cm^2/amp
delH=0.85;//in eV
T=398;//in kelvin
t50=10*t*365*24;
k=8.62*(10^(-5));
Jmax=sqrt(A*exp(delH/(k*T))/t50);
disp(Jmax,'max tolerable current density for electromigration(in A/cm^2)=');
//the answer given in the textbook is wrong
|
f34dc1a1dbdfed0e200236f4461fb0c8cd13918c | 449d555969bfd7befe906877abab098c6e63a0e8 | /905/CH9/EX9.1/9_1.sce | 0c0b1efa67c00981b99aae1c87082c33b41b4e5d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,314 | sce | 9_1.sce | clear;
clc;
// Illustration 9.1
// Page: 508
printf('Illustration 9.1 - Page: 508\n\n');
// solution
//*****Data*****//
// A-solute B-solvent
ci_f = 50; // [feed side concentration, mole/cubic m]
ci_p = 15; // [permeate side concentration, mole/cubic m]
t = 2*10^-4; // [membrane thickness, cm]
q_A = 176; // [permeability, barrer]
D = 4*10^-1; // [tube inside diameter, cm]
D_A = 5*10^-5; // [diffusuvity, square cm/s]
Re = 20000; // [reynolds number]
Sc = 450; // [Schmidt number]
mtc_p = 0.12; // [square cm/s]
//*****//
// From equation 9.6, 1 barrer = 8.3*10^-9 square cm/s
// Therefore
q_A = q_A*8.3*10^-9; // [square cm/s]
Q_A = q_A/t; // [permeance, cm/s]
// The mass-transfer coefficient on the feed side is from equation (2-75) for turbulent flow of a liquid inside a circular pipe:
Sh = 0.023*Re^0.83*Sc^(1/3);
// Now mass transfer coefficient
k_af = Sh*D_A/D; // [cm/s]
// Total resistance to mass transfer
res_total = (1/k_af)+(1/Q_A)+(1/mtc_p); // [s/cm]
// Transmembrane flux of solute A
N_A = (ci_f-ci_p)/(res_total*100); // [mole/square m.s]
printf("The transmembrane flux of solute A is %e mole/square m.s\n\n",N_A);
percent_mem_res = ((1/Q_A)/res_total)*100; // [%]
printf("Membrane resistance is %f percent of the total\n\n",percent_mem_res); |
c36acefba17b65017571926a0c4d1a7481817b13 | 449d555969bfd7befe906877abab098c6e63a0e8 | /443/DEPENDENCIES/20_5_data.sci | e08ef4ddbbce003b4267f256522ae6c8865e6eb5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 509 | sci | 20_5_data.sci | //No of cylinders
k=6
//Speed (in rpm)
s=720
//Diameter (in cm)
d=(20*10^(-2));
//Stroke Lenght (in cm)
l=(25*(10^(-2)));
//Compression ratio
cr=20;
//Exhaust Pressure (in bar)
ep=(1.04*(10^5));
//Ambient temperature (in kelvin)
t=300;
//Universal gas constant
r=287;
//Scavanger Efficiency
nsc=0.85
//Scavanger ratio
Rsc=1.2
//Specific heat of gas at constant pressure
cp=1.005
//Brake Power
bp = (120*k)
//bsfc in kg/kWh
bsfc = 0.21
//Calorific Value (in calorie)
CV = 44000/3600 |
98be6e3b5090113cd21f3ac986597171c34c7480 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2175/CH2/EX2.5/2_5.sce | ace9ecc7e01b5f086b1ef082f337f4c12bb13b30 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 439 | sce | 2_5.sce | clc;
//from tables;
v_a=0.1115;//m^3/kg
p_b=20;//bar
v_d=0.4743;//m^3/kg
hf=763;//kJ/kg
h=2650;//kJ/kg
h_fg=2015;//kJ/kg
x=(h-hf)/h_fg;
vg=0.1944;//m^3/kg
v_c=x*vg;
clf();
x=linspace(0.05,0.5,1000);
y=(0.09957*20)*((x)^(-1));
plot2d(x,y,style=1);
y=20;
plot(x,y)
y=10;
plot(x,y);
y=(0.4743*6)*((x)^(-1));
plot2d(x,y,style=4);
y=(0.1115*20)*((x)^(-1));
plot2d(x,y,style=2);
y=6;
plot2d(x,y,style=4)
|
af7d078221fa94fb887c810309c1ca6f6f6853ef | 4e9df66700bcf9688afe22df0009cdf4a17bc61f | /Scilab_Lab/examples/f2t.sci | 75fb83cf15b9aa43fd859906f9f28f686a901de1 | [] | no_license | vmebus/workspace | e18947a1f967e6a3a7dfbc5cce6f92380d8637fc | f251b8a8e6cec30a77c7ef7b4103c5ee6e6d1393 | refs/heads/master | 2021-01-09T21:53:45.183564 | 2015-10-03T06:42:23 | 2015-10-03T06:42:23 | 36,120,248 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 197 | sci | f2t.sci | function a=f2t(S,fs)
N=length(S);
T=1/fs*N;
t=[-(T/2):1/fs:(T/2-1/fs)];
temp1=fft(S)/T;
temp2=N*ifft(S)/T;
a(1:N/2)=temp1(N/2+1:-1:2);
a(N/2+1:N)=temp2(1:N/2);
a=a.*exp((-%i*%pi)*fs*t);
endfunction |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.