blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 6 214 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 6 87 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 15 values | visit_date timestamp[us]date 2016-08-04 09:00:04 2023-09-05 17:18:33 | revision_date timestamp[us]date 1998-12-11 00:15:10 2023-09-02 05:42:40 | committer_date timestamp[us]date 2005-04-26 09:58:02 2023-09-02 05:42:40 | github_id int64 436k 586M ⌀ | star_events_count int64 0 12.3k | fork_events_count int64 0 6.3k | gha_license_id stringclasses 7 values | gha_event_created_at timestamp[us]date 2012-11-16 11:45:07 2023-09-14 20:45:37 ⌀ | gha_created_at timestamp[us]date 2010-03-22 23:34:58 2023-01-07 03:47:44 ⌀ | gha_language stringclasses 36 values | src_encoding stringclasses 17 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 1 class | length_bytes int64 5 10.4M | extension stringclasses 15 values | filename stringlengths 2 96 | content stringlengths 5 10.4M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
da3a76260275f1acf976fd56bc1d76f9dca5bfc4 | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/MA19.prev.tst | 632ac0a9d7e5e0333c3830c6c5d083e37be71945 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gfis/ramath | 498adfc7a6d353d4775b33020fdf992628e3fbff | b09b48639ddd4709ffb1c729e33f6a4b9ef676b5 | refs/heads/master | 2023-08-17T00:10:37.092379 | 2023-08-04T07:48:00 | 2023-08-04T07:48:00 | 30,116,803 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 339 | tst | MA19.prev.tst | -chain [[2,2,1,0],[1,1,1,1],[1,2,2,0],[2,3,2,0]] [3,4,5,6] 3 1
[[2,2,1,0],[1,1,1,1],[1,2,2,0],[2,3,2,0]],det=-1 [3,4,5,6], chain 8 => [19,18,21,28] => [95,86,97,134] => [459,412,461,642] => [2203,1974,2205,3076] => [10559,9458,10561,14738] => [50595,45316,50597,70614] => [242419,217122,242421,338332] => [1161503,1040294,1161505,1621046]
|
8dde7a3c1185dd0a6e95494186c0175da7148401 | 449d555969bfd7befe906877abab098c6e63a0e8 | /668/CH6/EX6.2/eg6_2.sce | 7db08c117e5ff272bc2b75a492c590e380d063c7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,166 | sce | eg6_2.sce | Wb = 10^-4;
Vcb1 = 1;
Vcb2 = 5;
q = 1.6*10^-19;
Db = 20;
Vbe = 0.7;
kT = 26*10^-3; //in eV
ni = 1.5*10^10;
Nab = 5*10^16;
Nde = 5*10^15;
eps0 = 8.84*10^-14; //in F/m
eps = 11.9*eps0;
Vbi = kT*log(Nab*Nde/ni^2)
disp(Vbi,"Built in voltage (in V) = ")
dW2 = 2*eps*(Vbi+Vcb1)*Nde/(q*Nab*(Nab+Nde));
dW = sqrt(dW2);
disp(dW,"The extent of depletion into the base side (in cm) = ")
Wbn = Wb - dW;
disp(Wbn,"neutral base width (in cm) = ")
dW1 = (2*eps*(Vbi+Vcb2)*Nde/(q*Nab*(Nab+Nde)))^0.5;
disp(dW1,"When the collector-base voltage increases to 5 V, extent of depletion into the base side (in cm)")
Wbn1 = Wb - dW1;
disp(Wbn1,"neutral base width (in cm) = ")
nbo = ni^2/Nab;
disp(nbo,"base minority carrier concentrations (in per cm cube) = ")
Jc1 = q*Db*nbo/Wbn*exp(Vbe/kT);
disp(Jc1,"For the base-collector bias of 1 V, collector current density (in A/square cm)")
Jc2 = q*Db*nbo/Wbn1*exp(Vbe/kT);
disp(Jc2,"For the base-collector bias of 5 V, collector current density (in A/square cm)")
slope = (Jc2-Jc1)/(Vcb2-Vcb1);
disp(slope,"The slope of the Jc vs. VCE curve = ")
Va = Jc2/slope - (Vcb2+Vbe);
disp(Va, "Early voltage (in V) = ")
|
ade5d7caecf5c41f03163c93a40654d2f445cf56 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3875/CH12/EX12.1/Ex12_1.sce | 36d5a931008f6d22cf82c31236d522b6ebd7a328 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 531 | sce | Ex12_1.sce | clc;
clear;
m=1.67*10^-27 //mass of particle in kPP
L=0.1*10^-9 //width in nm
n=3 //quantum number
h=6.63*10^-34 //Plancks constant in J-s
//calculation
//(1)
E=(n^2*h^2)/(8*m*L^2)
mprintf("The energy of the particle is = %2.2e Joules\n",E)
//The answer provided in the textbook is wrong.
//(2)
lambda=(2*L)/n
p=h/lambda
mprintf("The momentum of the particle is = %1.2e kg-ms^-1\n",p)
//(3)
P=((1/L)*(L/3)) //after integration
mprintf("The probability of finding particle between x=0 and x=L/3 is = %f",P)
|
7ae5907e943dbac28de0867ec6dcb3c709511a42 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3433/CH3/EX3.2/Ex3_2.sce | 0eb25536bad3bfee71bb55f90599afad20f8980c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 932 | sce | Ex3_2.sce | clear all;
clc;
funcprot(0);
//function to calculate m and delta
function [m,delta] = func(a_l,alpha2,theta)
m = 0.23*(2*a_l)^2 + alpha2/500;
delta = m*theta;
endfunction
//given data
alpha1_ = 50;// in deg
alpha2_ = 20;// in deg
a_l = 0.5;//percentage
s_l = 1.0;
eps = 21;//in deg
//Calculations
theta = alpha1_ - alpha2_;
alpha21 = 20;//in deg
[m1,delta1] = func(a_l,alpha21,theta);
alpha22 = 28.1;//in deg
[m2,delta2] = func(a_l,alpha22,theta);
alpha23 = 28.6;//in deg
[m3,delta3] = func(a_l,alpha23,theta);
alpha1 = eps + alpha23;
i = alpha1 - alpha1_;
alpham = (180/%pi)*atan(0.5*(tan(alpha1*%pi/180) + tan(alpha23*%pi/180)));
CL = 2*(s_l)*cos(alpham*%pi/180)*(tan(alpha1*%pi/180) - tan(alpha23*%pi/180));
//Results
printf('The fluid deflection = %d deg.',eps);
printf('\n The fluid incidence = %.1f deg.',i);
printf('\n The ideal lift coefficient at the design point = %.2f',CL);
|
9c5fa078f2f01797a983af4f1f7a69ac82849375 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1640/CH1/EX1.15/1_15.sce | 6d9eedfc0a2637cff9c6cdff811fc1664dfad2a4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 400 | sce | 1_15.sce | clc
//initialisation of variables
w= 15 //ft
D= 15 //ft
W= 62.4 //lb/ft^3
a= 120 //degrees
h1= 15 //ft
h2= 4 ///ft
h3= 18 //ft
//CALCULATIONS
Pu= w*D*W*w/2
hu= ((w*D^3/12)/(w^2*D/2))+w/2
Pd= W*h2*w*h2/2
hd= ((w*h2^3/12)/(h2*h1*(h2/2)))+(h2/2)
P= Pu-Pd
h= (Pu*(h1-hu)-Pd*(h2-hd))/P
F= P/(2*sind(a/4))
RT= F*(h3-(h1/10)-h)/(h3-(h1/5))
RB=F-RT
//RESULTS
printf ('RB = %.f lb ',RB)
|
9affc7d539240fbd5761b3438a681cfba9726e2b | 449d555969bfd7befe906877abab098c6e63a0e8 | /269/CH9/EX9.1/ex1.sce | 41d00bbf098d23059091775238e9f2d4ab255ddb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 369 | sce | ex1.sce | Syms t,s
disp('given')
disp('V=e^-t(sint) R1=1,R2=1,C=0.5,L=2')
disp('laplace transforming the ckt elements')
disp('Total impedance is')
z=((2*s^2+5*s+4)/(2*s^2+s+2))
disp(z)
disp('laplace transformed voltage is')
v=laplace('%e^(-t)*sin(2*t)',t,s)
disp(v)
disp('The current can be found as v/z')
i=v/z
disp(i,"The total current in s domain")
|
0c71a7c5ecf15be22e0457d10f18cc09f15f92c0 | 0812f3bb6f3cc038b570df68ccee4275da04b11f | /models/complexity_1000/Applied_Thermodynamics_and_Engineering/CH4/EX4.7/4_7.sce | 32472ae53af0bd7f5359e6f7843358006f165d75 | [] | no_license | apelttom/20-semester_PhD_thesis | edc0b55580bae9d364599932cd73cf32509f4b7a | ff28b115fcf5e121525e08021fa0c02b54a8e143 | refs/heads/master | 2018-12-26T22:03:38.510422 | 2018-12-14T20:04:11 | 2018-12-14T20:04:11 | 106,552,276 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 279 | sce | 4_7.sce | clc;
s1=1.7189;
v1=0.0978;//m^3
p1=2.01;//bar
p2=10;//bar
lamda=1.1;
v2=v1*(p1/p2)^(1/lamda);
s_1=1.7564;//kJ/kg K
s_2=1.7847;//kJ/kg K
v_1=0.0228;//m^3
v_2=0.0222;//m^3
v_3=0.0233;//m^3
s2=s_1+[(v_1-v_2)/(v_3-v_2)]*(s_2-s_1)
disp("increase in entropy");
disp("kJ/kg K",s2-s1)
|
342aec5a40810c3c8516f981073d2a1930534af6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3885/CH6/EX6.15/Ex6_15.sci | 1f108853280886f3a0f4587cf36206ca7364a4b0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,171 | sci | Ex6_15.sci | //control systems by Nagoor Kani A
//Edition 3
//Year of publication 2015
//Scilab version 6.0.0
//operating systems windows 10
// Example 6.15
clc;
clear;
s=poly(0,'s')
//dominent pole sd=-zeta*w=%i*w*sqrt(1-zeta^2)
zeta=0.9//damping ratio
w=2.5//natural frequency of osciilation in rad/sec
sd=(-zeta*w)+((%i*w)*sqrt(1-zeta^2))
disp(sd,'the dominennt pole is')
d=abs(sd)
disp(d,'the value of d is ')
betaa=phasemag(sd)
disp(betaa,'the value of betaa is;')
h=syslin('c',4/(s+1)*(s+5))//given tranfer function G(s)
//find magnitude and phase of G(s) at s=sd
a=4/((1+sd)*(5+sd))
ad=abs(a)
disp(ad,'the value of ad is')
phid=phasemag(a)
disp(phid,'the value of phid is')
ki=-(d*sind(phid))/(ad*sind(betaa))//integral constant
disp(ki,'the integral constant is')
kp=(-sind(betaa+phid))/(ad*sind(betaa))-(2*ki*cosd(betaa))/d //proportional constant
disp(kp,'the proportional constant is')
hc=syslin('c', 2.02*(s+1.19)/s)//transfer function of PD controller is kpof +kd*s
disp(hc,'transfer function of PI controller is')
hcmp=syslin('c',h*hc)//transfer function compensated system
disp(hcmp,'transfer function compensated system ')
|
a4886ae49a6892cd24d698024b23b78d522625bb | cb619af208f1479837426ba602f8824ec8aa8f82 | /TEST/elist.tst | 9bd3f55096530f2dbac2399c2cc06b569cd56035 | [
"MIT"
] | permissive | ihgazni2/elist | 14c5f2c75d5a39fa6c8478c828485a99adaf43a2 | c2d0bece49a8a5b7701397f8745145de96c4886e | refs/heads/master | 2021-06-08T04:19:46.773170 | 2020-07-18T08:58:23 | 2020-07-18T08:58:23 | 123,671,927 | 0 | 2 | null | null | null | null | UTF-8 | Scilab | false | false | 36,646 | tst | elist.tst |
from elist.elist import *
from xdict.jprint import pobj
from xdict.jprint import pdir
#1. __init__(alist)
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
#2. __repr__
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
l
ltree
pobj(ltree.showlog)
#3. tree(**kwargs)
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
pathlists = ltree.tree()
pathlists
pathlists = ltree.tree(leaf_only=True)
pathlists
pathlists = ltree.tree(leaf_only=True,from_lv=1,to_lv=2)
pathlists
pathlists = ltree.tree(non_leaf_only=True)
pathlists
#4 flatten
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
flat = ltree.flatten()
flat
ltree.flatWidth
ltree.depth
#5. dig
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
depthfirst = ltree.dig()
depthfirst = ltree.dig(2)
depthfirst = ltree.dig(5)
#6. level
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
level = ltree.level(1)
level = ltree.level(1,leaf_only=True)
level = ltree.level(1,non_leaf_only=True)
level = ltree.level(2)
level = ltree.level(3)
#7. include
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
l[3][1][0]
ltree.include(3,1,0)
l[3][1][2]
ltree.include(pathlist = [3,1,2])
#8. __getitem__
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
ltree[1,0]
l[1][0]
ltree[3,1,1]
l[3][1][1]
#9. search
from xdict.TestLib.genrand import gen_random_recursive_only_list_data as randlist
l = randlist()
l = [
'v_4',
'v_7',
'v_6',
'v_8',
[
'v_7',
'v_1',
[
'v_2',
[
[
[
'v_3',
'v_6',
[
'v_1',
'v_7',
[],
'v_3',
'v_2',
'v_8',
'v_3',
'v_8',
'v_8',
'v_7',
[],
'v_6',
'v_8',
'v_2'
],
'v_4',
'v_3',
'v_2',
'v_3',
'v_5',
'v_3',
'v_5',
[
[],
'v_1'
],
'v_8',
'v_4',
'v_7',
'v_6',
[
'v_4',
[],
'v_4',
'v_2',
'v_7',
[],
'v_5',
'v_6',
'v_2',
'v_1',
'v_7',
'v_3',
[]
],
'v_8',
'v_1',
'v_1',
[
'v_8',
'v_3',
[],
'v_6',
'v_7',
'v_2',
'v_2',
'v_1',
'v_5',
'v_7',
[],
'v_4',
'v_5',
'v_7',
'v_7',
'v_3',
'v_4',
'v_5',
'v_7',
'v_8'
]
],
'v_4',
'v_5',
'v_6',
'v_4',
'v_3',
'v_4',
'v_1',
'v_2',
[
'v_2',
'v_2',
'v_8',
[
'v_1',
'v_1',
'v_2',
[],
'v_7',
'v_4',
'v_4',
'v_8',
'v_6',
'v_8',
'v_3',
'v_5',
'v_6',
'v_7'
],
'v_5',
[
'v_4',
'v_7',
'v_1',
[],
'v_8',
[],
'v_5',
'v_6',
'v_3',
'v_1',
'v_6',
'v_2',
[],
'v_5'
],
'v_2',
'v_7'
],
'v_3',
'v_4',
'v_2',
[
[
'v_1',
'v_3',
'v_2',
[],
[]
],
[
'v_8',
'v_6',
'v_6',
'v_5'
],
'v_8',
'v_6',
[
'v_3',
'v_8',
'v_8',
'v_5',
'v_6',
'v_2',
'v_1',
'v_4',
'v_5',
'v_2',
'v_2',
'v_8',
[],
'v_8',
'v_6'
],
'v_4',
'v_1',
'v_3',
'v_4',
[
'v_2',
'v_4',
'v_6',
'v_5',
'v_1'
],
'v_7',
'v_2',
'v_6',
'v_2',
'v_7',
'v_6',
'v_1',
[
'v_1',
[],
[],
'v_8',
'v_1'
],
[
'v_5',
'v_6',
'v_3',
'v_3',
'v_5',
'v_3',
'v_6',
'v_5'
]
],
[
'v_5',
'v_6',
'v_1',
'v_7',
'v_7',
'v_4',
'v_7',
[
'v_4',
'v_1',
'v_8',
'v_1',
'v_1',
'v_2',
'v_5',
[]
],
'v_5'
],
[
'v_5',
'v_7',
'v_1',
'v_8'
],
'v_1',
'v_5',
'v_4'
],
'v_2',
'v_7',
[
'v_1',
'v_8',
'v_6',
'v_3',
'v_1',
[
'v_5',
'v_6',
'v_6',
[
'v_5',
[],
'v_8',
[],
'v_6',
[],
'v_1',
'v_6',
'v_6',
'v_1',
'v_3',
'v_7',
'v_7',
'v_2',
'v_8',
'v_7',
[],
[],
'v_1',
[]
],
'v_7',
'v_4',
'v_3',
[
[],
'v_1',
'v_7',
'v_2',
'v_1',
'v_3',
'v_1',
'v_1',
'v_2',
'v_6',
'v_8',
'v_3'
]
],
'v_7',
'v_1',
'v_4',
'v_2',
'v_2',
'v_7',
'v_3',
'v_4',
[
'v_3',
'v_5',
'v_4',
'v_8',
'v_2',
'v_6',
'v_4',
'v_2',
[
'v_1'
],
'v_8',
'v_7',
'v_5',
'v_6',
[
[],
[],
'v_2',
'v_8',
[],
'v_5',
'v_3',
'v_8',
[],
'v_5'
],
'v_6',
'v_6',
'v_8',
[
'v_7',
'v_7',
'v_3',
'v_7',
'v_1',
'v_8',
'v_6',
[],
'v_4',
'v_2',
'v_2',
'v_3'
],
'v_6'
]
],
'v_3',
'v_1',
'v_2',
'v_7',
'v_8',
'v_1',
'v_7',
'v_4'
],
'v_7',
'v_1',
'v_4',
'v_6'
],
'v_8',
[
'v_4',
'v_2',
'v_6',
'v_4'
],
'v_4',
'v_6',
'v_4',
'v_2',
'v_3',
'v_5',
[
[
'v_7',
'v_8',
'v_7',
'v_2',
'v_8',
'v_2',
'v_6',
'v_4',
'v_6',
'v_6',
[
[
'v_4',
'v_5',
'v_8',
'v_2',
[
'v_1',
'v_1',
'v_5',
[],
'v_6',
'v_3',
'v_3',
'v_2',
'v_1',
'v_1',
'v_1',
[],
'v_4',
'v_8',
'v_8'
]
],
'v_1',
'v_1',
'v_8',
'v_1',
'v_2',
'v_2',
'v_1',
'v_1',
[
[
'v_7'
],
'v_4',
'v_4',
'v_3',
[
[],
'v_4',
'v_7',
'v_1',
'v_6',
'v_6'
],
[
[],
'v_2',
'v_8',
'v_7',
'v_8',
'v_5',
'v_5',
'v_5',
'v_6',
[],
[],
'v_6',
'v_2',
[],
'v_7',
'v_8',
'v_2'
],
[
'v_4',
'v_5',
[],
'v_1',
[],
'v_1',
'v_6',
'v_5',
'v_3',
'v_6',
'v_4',
'v_2',
'v_7',
'v_6',
'v_3',
'v_3',
'v_8',
'v_3',
'v_5',
'v_8'
],
'v_5',
'v_3',
'v_7',
[
'v_5',
[],
'v_2',
'v_3',
'v_8',
'v_5',
'v_1',
'v_4',
'v_5',
'v_5',
'v_3',
'v_4',
'v_5',
'v_2',
[],
'v_7',
'v_1',
'v_1',
'v_3',
'v_3'
],
'v_5',
'v_4',
'v_1',
'v_4',
'v_3',
'v_3',
'v_6'
],
'v_1',
[
'v_8',
'v_3',
'v_5',
'v_4',
'v_4',
'v_6',
'v_5',
[
'v_4',
'v_6',
'v_3',
'v_3'
],
[
'v_5',
'v_7',
'v_3',
'v_7',
'v_1',
'v_4',
'v_3',
'v_7',
'v_5',
'v_6',
'v_3',
'v_6',
[],
[],
'v_6'
],
'v_4',
'v_3',
'v_4'
],
'v_8',
'v_7',
'v_1',
'v_8',
'v_2',
'v_1',
'v_2',
[
'v_6',
'v_5',
'v_2',
'v_5',
'v_2',
'v_7',
'v_3',
'v_5',
'v_2',
[
'v_6',
'v_6',
'v_8',
'v_2',
'v_2',
'v_2',
'v_7',
'v_3',
'v_5',
'v_4',
'v_4',
'v_5'
],
'v_6'
]
],
'v_3',
'v_5',
[
'v_6',
'v_5',
[
'v_4',
'v_3',
'v_6',
'v_7'
],
'v_7',
'v_3',
[
'v_4',
'v_8',
'v_8',
'v_6',
'v_4',
'v_6',
'v_8',
[
'v_4',
'v_8'
],
'v_7',
'v_3',
'v_6',
'v_6',
'v_3',
'v_2',
[
'v_4',
[],
[],
'v_8',
'v_3',
'v_1',
'v_6',
'v_4',
[],
'v_3',
'v_8',
'v_8',
'v_8',
[],
'v_2',
'v_8'
]
],
'v_5',
'v_8',
'v_5',
'v_6',
'v_8',
'v_1',
'v_8',
'v_2',
[
'v_5'
]
],
'v_8'
],
'v_8',
'v_3',
'v_4',
'v_2',
'v_8',
'v_4',
'v_8',
[
'v_1',
[
'v_6',
'v_8',
'v_3',
'v_1',
[
'v_4',
'v_4',
'v_3',
'v_4',
'v_6',
'v_5',
'v_7',
[
[],
'v_4',
'v_5',
'v_5',
'v_7',
'v_8',
'v_2',
'v_4',
'v_7',
[],
'v_1',
'v_1',
'v_6',
'v_6'
],
[
'v_1',
'v_2',
'v_1',
'v_3',
'v_8',
'v_7',
'v_5',
'v_5',
'v_1',
'v_6'
],
'v_6'
],
'v_7',
'v_8',
[
'v_4',
[
[],
'v_8',
'v_8',
[],
'v_6',
'v_3',
'v_8',
'v_3',
'v_4',
'v_2',
[],
'v_4',
[]
],
[
'v_8',
[],
'v_4',
'v_7',
'v_8',
[],
'v_5'
],
'v_1',
'v_4',
'v_7',
'v_5',
[
'v_5',
'v_5',
'v_6',
'v_8',
'v_4',
'v_3',
'v_7',
'v_7',
'v_4',
'v_6',
'v_4',
'v_7',
'v_3',
'v_5',
'v_6'
],
'v_1',
'v_1',
'v_4',
[
'v_4',
'v_5',
'v_7',
'v_7',
'v_4',
[],
[],
'v_8',
'v_1',
'v_2',
'v_6',
[],
'v_6',
'v_1'
],
'v_4'
],
[
'v_5',
'v_4',
'v_1',
[
'v_1',
[],
'v_7',
'v_1',
'v_5',
'v_8',
[],
'v_6',
[],
'v_2',
'v_5',
'v_2',
'v_6',
[]
],
'v_4',
'v_5',
[
'v_5',
'v_2',
'v_4',
'v_4'
],
'v_2',
[
'v_5',
'v_7',
'v_3'
],
'v_7',
'v_7',
[
'v_8',
'v_3'
],
'v_2',
'v_3',
'v_3',
'v_1',
'v_8',
'v_3',
'v_6'
],
'v_1',
'v_5',
'v_8',
'v_3',
'v_6',
'v_2'
],
'v_4',
'v_8',
'v_4',
[
'v_4'
],
'v_5',
[
'v_3',
'v_2',
[
[
'v_5',
'v_4',
'v_1',
'v_7',
'v_2',
'v_7',
'v_2',
'v_3',
[],
[],
'v_8',
'v_1',
'v_7'
],
'v_2',
'v_7',
[
'v_5',
'v_2',
'v_8',
'v_3',
'v_4',
'v_3',
'v_5',
[]
],
'v_5',
'v_8',
'v_5',
[
[],
'v_3',
[],
[],
'v_1',
'v_4',
'v_2',
'v_2',
'v_3',
'v_7',
[]
],
'v_8',
'v_5',
'v_3'
],
'v_2',
'v_1',
'v_7',
'v_6',
'v_3'
],
'v_3',
'v_7',
'v_8',
'v_4',
'v_5',
[
'v_1',
'v_3',
'v_6',
'v_4',
[
'v_5',
[
'v_8',
'v_6',
[],
'v_2'
],
'v_5',
'v_1',
'v_3',
'v_2',
'v_7',
'v_8',
[
'v_8',
[],
'v_6',
'v_4',
'v_7'
]
]
],
'v_3',
[
'v_3',
'v_5',
'v_6',
'v_7',
[
'v_7',
'v_6',
'v_1',
'v_4',
'v_8'
]
],
'v_1'
],
'v_4',
'v_6',
'v_3',
'v_7',
'v_1',
'v_8',
'v_3',
[
[
'v_5',
'v_3',
'v_7',
'v_5',
[
[
'v_2',
'v_7',
'v_5',
'v_4'
],
'v_4',
[
'v_2',
'v_8',
[],
'v_2',
'v_7',
'v_3',
'v_7'
],
'v_1'
],
'v_3',
[
'v_4',
'v_1',
'v_8',
'v_7',
'v_1',
'v_2',
'v_3',
[
[],
'v_3',
'v_4',
'v_2',
'v_5',
'v_5',
'v_7',
'v_6',
'v_1',
'v_1',
'v_2',
'v_8',
[],
'v_4'
],
'v_1',
'v_8',
'v_4',
'v_8',
'v_5',
'v_6',
[
[],
[],
'v_8',
'v_8',
[],
'v_3',
'v_4',
'v_4',
[],
'v_4',
'v_8'
],
'v_4',
[
'v_7',
'v_5',
'v_3',
'v_7',
[],
'v_1'
],
'v_7'
],
'v_1',
[
'v_5',
'v_7',
[
[],
'v_5',
'v_6',
'v_2',
'v_1',
'v_3',
[],
[],
'v_5'
],
'v_5',
'v_3',
'v_8',
'v_5',
'v_7',
'v_3',
'v_3',
'v_2'
],
'v_1',
[
'v_5',
'v_2',
'v_3',
[
'v_6',
'v_4',
'v_3',
'v_1',
[],
'v_6',
'v_5',
[],
'v_1',
'v_6',
'v_8',
'v_4',
'v_7',
'v_1',
'v_4'
],
'v_4',
'v_2',
'v_7',
'v_3',
[
[],
[]
],
'v_1',
[
'v_8',
'v_2',
'v_7',
'v_3',
'v_4',
'v_3',
'v_4',
'v_7',
'v_5',
[],
'v_6',
'v_8',
'v_1',
[]
],
'v_6',
'v_7',
'v_2',
'v_8'
],
[
'v_4',
'v_3',
'v_4',
'v_3',
'v_5',
'v_6',
'v_7',
'v_4',
[
'v_8',
'v_5'
],
'v_3',
'v_8',
'v_1',
[
'v_2',
'v_5',
'v_1',
'v_6',
'v_8',
'v_2',
[],
'v_5',
'v_1',
'v_6',
'v_8',
'v_7',
'v_8',
'v_8',
'v_4',
'v_6'
],
'v_5',
'v_2',
'v_5',
'v_2',
'v_5'
],
'v_4',
'v_4',
[
[
'v_4',
'v_4',
'v_7'
],
'v_3',
'v_7',
[
[]
],
'v_5',
'v_7',
'v_3',
'v_2',
'v_1',
'v_8',
[
[],
'v_2',
'v_3',
'v_4',
[],
'v_4',
'v_7',
'v_5',
'v_5',
'v_3',
'v_2'
],
'v_2',
'v_6',
'v_1',
'v_8',
'v_5',
[
'v_7',
'v_4',
'v_2',
'v_3',
'v_2',
'v_4',
'v_8',
'v_7',
'v_2'
]
],
'v_4'
],
'v_2'
],
'v_7',
'v_1'
],
[
'v_1',
'v_7',
'v_1',
'v_6',
'v_2',
'v_2',
'v_5',
'v_4',
'v_3',
'v_3',
'v_6',
'v_8'
],
'v_5'
],
'v_3',
'v_3',
[
'v_6'
],
'v_7',
'v_2',
'v_3',
[
'v_7',
'v_2',
'v_4',
'v_4',
'v_5',
'v_8',
'v_2',
'v_3',
'v_1',
'v_3',
[
'v_5',
'v_2',
'v_8'
]
]
]
l = ['v_4', 'v_7', 'v_6', 'v_8', ['v_7', 'v_1', ['v_2', [
[
['v_3', 'v_6', ['v_1', 'v_7', [], 'v_3', 'v_2', 'v_8', 'v_3', 'v_8', 'v_8', 'v_7', [], 'v_6', 'v_8', 'v_2'], 'v_4', 'v_3', 'v_2', 'v_3', 'v_5', 'v_3', 'v_5', [
[], 'v_1'
], 'v_8', 'v_4', 'v_7', 'v_6', ['v_4', [], 'v_4', 'v_2', 'v_7', [], 'v_5', 'v_6', 'v_2', 'v_1', 'v_7', 'v_3', []], 'v_8', 'v_1', 'v_1', ['v_8', 'v_3', [], 'v_6', 'v_7', 'v_2', 'v_2', 'v_1', 'v_5', 'v_7', [], 'v_4', 'v_5', 'v_7', 'v_7', 'v_3', 'v_4', 'v_5', 'v_7', 'v_8']], 'v_4', 'v_5', 'v_6', 'v_4', 'v_3', 'v_4', 'v_1', 'v_2', ['v_2', 'v_2', 'v_8', ['v_1', 'v_1', 'v_2', [], 'v_7', 'v_4', 'v_4', 'v_8', 'v_6', 'v_8', 'v_3', 'v_5', 'v_6', 'v_7'], 'v_5', ['v_4', 'v_7', 'v_1', [], 'v_8', [], 'v_5', 'v_6', 'v_3', 'v_1', 'v_6', 'v_2', [], 'v_5'], 'v_2', 'v_7'], 'v_3', 'v_4', 'v_2', [
['v_1', 'v_3', 'v_2', [],
[]
],
['v_8', 'v_6', 'v_6', 'v_5'], 'v_8', 'v_6', ['v_3', 'v_8', 'v_8', 'v_5', 'v_6', 'v_2', 'v_1', 'v_4', 'v_5', 'v_2', 'v_2', 'v_8', [], 'v_8', 'v_6'], 'v_4', 'v_1', 'v_3', 'v_4', ['v_2', 'v_4', 'v_6', 'v_5', 'v_1'], 'v_7', 'v_2', 'v_6', 'v_2', 'v_7', 'v_6', 'v_1', ['v_1', [],
[], 'v_8', 'v_1'
],
['v_5', 'v_6', 'v_3', 'v_3', 'v_5', 'v_3', 'v_6', 'v_5']
],
['v_5', 'v_6', 'v_1', 'v_7', 'v_7', 'v_4', 'v_7', ['v_4', 'v_1', 'v_8', 'v_1', 'v_1', 'v_2', 'v_5', []], 'v_5'],
['v_5', 'v_7', 'v_1', 'v_8'], 'v_1', 'v_5', 'v_4'
], 'v_2', 'v_7', ['v_1', 'v_8', 'v_6', 'v_3', 'v_1', ['v_5', 'v_6', 'v_6', ['v_5', [], 'v_8', [], 'v_6', [], 'v_1', 'v_6', 'v_6', 'v_1', 'v_3', 'v_7', 'v_7', 'v_2', 'v_8', 'v_7', [],
[], 'v_1', []
], 'v_7', 'v_4', 'v_3', [
[], 'v_1', 'v_7', 'v_2', 'v_1', 'v_3', 'v_1', 'v_1', 'v_2', 'v_6', 'v_8', 'v_3'
]], 'v_7', 'v_1', 'v_4', 'v_2', 'v_2', 'v_7', 'v_3', 'v_4', ['v_3', 'v_5', 'v_4', 'v_8', 'v_2', 'v_6', 'v_4', 'v_2', ['v_1'], 'v_8', 'v_7', 'v_5', 'v_6', [
[],
[], 'v_2', 'v_8', [], 'v_5', 'v_3', 'v_8', [], 'v_5'
], 'v_6', 'v_6', 'v_8', ['v_7', 'v_7', 'v_3', 'v_7', 'v_1', 'v_8', 'v_6', [], 'v_4', 'v_2', 'v_2', 'v_3'], 'v_6']], 'v_3', 'v_1', 'v_2', 'v_7', 'v_8', 'v_1', 'v_7', 'v_4'
], 'v_7', 'v_1', 'v_4', 'v_6'], 'v_8', ['v_4', 'v_2', 'v_6', 'v_4'], 'v_4', 'v_6', 'v_4', 'v_2', 'v_3', 'v_5', [
['v_7', 'v_8', 'v_7', 'v_2', 'v_8', 'v_2', 'v_6', 'v_4', 'v_6', 'v_6', [
['v_4', 'v_5', 'v_8', 'v_2', ['v_1', 'v_1', 'v_5', [], 'v_6', 'v_3', 'v_3', 'v_2', 'v_1', 'v_1', 'v_1', [], 'v_4', 'v_8', 'v_8']], 'v_1', 'v_1', 'v_8', 'v_1', 'v_2', 'v_2', 'v_1', 'v_1', [
['v_7'], 'v_4', 'v_4', 'v_3', [
[], 'v_4', 'v_7', 'v_1', 'v_6', 'v_6'
],
[
[], 'v_2', 'v_8', 'v_7', 'v_8', 'v_5', 'v_5', 'v_5', 'v_6', [],
[], 'v_6', 'v_2', [], 'v_7', 'v_8', 'v_2'
],
['v_4', 'v_5', [], 'v_1', [], 'v_1', 'v_6', 'v_5', 'v_3', 'v_6', 'v_4', 'v_2', 'v_7', 'v_6', 'v_3', 'v_3', 'v_8', 'v_3', 'v_5', 'v_8'], 'v_5', 'v_3', 'v_7', ['v_5', [], 'v_2', 'v_3', 'v_8', 'v_5', 'v_1', 'v_4', 'v_5', 'v_5', 'v_3', 'v_4', 'v_5', 'v_2', [], 'v_7', 'v_1', 'v_1', 'v_3', 'v_3'], 'v_5', 'v_4', 'v_1', 'v_4', 'v_3', 'v_3', 'v_6'
], 'v_1', ['v_8', 'v_3', 'v_5', 'v_4', 'v_4', 'v_6', 'v_5', ['v_4', 'v_6', 'v_3', 'v_3'],
['v_5', 'v_7', 'v_3', 'v_7', 'v_1', 'v_4', 'v_3', 'v_7', 'v_5', 'v_6', 'v_3', 'v_6', [],
[], 'v_6'
], 'v_4', 'v_3', 'v_4'
], 'v_8', 'v_7', 'v_1', 'v_8', 'v_2', 'v_1', 'v_2', ['v_6', 'v_5', 'v_2', 'v_5', 'v_2', 'v_7', 'v_3', 'v_5', 'v_2', ['v_6', 'v_6', 'v_8', 'v_2', 'v_2', 'v_2', 'v_7', 'v_3', 'v_5', 'v_4', 'v_4', 'v_5'], 'v_6']
], 'v_3', 'v_5', ['v_6', 'v_5', ['v_4', 'v_3', 'v_6', 'v_7'], 'v_7', 'v_3', ['v_4', 'v_8', 'v_8', 'v_6', 'v_4', 'v_6', 'v_8', ['v_4', 'v_8'], 'v_7', 'v_3', 'v_6', 'v_6', 'v_3', 'v_2', ['v_4', [],
[], 'v_8', 'v_3', 'v_1', 'v_6', 'v_4', [], 'v_3', 'v_8', 'v_8', 'v_8', [], 'v_2', 'v_8'
]], 'v_5', 'v_8', 'v_5', 'v_6', 'v_8', 'v_1', 'v_8', 'v_2', ['v_5']], 'v_8'], 'v_8', 'v_3', 'v_4', 'v_2', 'v_8', 'v_4', 'v_8', ['v_1', ['v_6', 'v_8', 'v_3', 'v_1', ['v_4', 'v_4', 'v_3', 'v_4', 'v_6', 'v_5', 'v_7', [
[], 'v_4', 'v_5', 'v_5', 'v_7', 'v_8', 'v_2', 'v_4', 'v_7', [], 'v_1', 'v_1', 'v_6', 'v_6'
],
['v_1', 'v_2', 'v_1', 'v_3', 'v_8', 'v_7', 'v_5', 'v_5', 'v_1', 'v_6'], 'v_6'
], 'v_7', 'v_8', ['v_4', [
[], 'v_8', 'v_8', [], 'v_6', 'v_3', 'v_8', 'v_3', 'v_4', 'v_2', [], 'v_4', []
],
['v_8', [], 'v_4', 'v_7', 'v_8', [], 'v_5'], 'v_1', 'v_4', 'v_7', 'v_5', ['v_5', 'v_5', 'v_6', 'v_8', 'v_4', 'v_3', 'v_7', 'v_7', 'v_4', 'v_6', 'v_4', 'v_7', 'v_3', 'v_5', 'v_6'], 'v_1', 'v_1', 'v_4', ['v_4', 'v_5', 'v_7', 'v_7', 'v_4', [],
[], 'v_8', 'v_1', 'v_2', 'v_6', [], 'v_6', 'v_1'
], 'v_4'
],
['v_5', 'v_4', 'v_1', ['v_1', [], 'v_7', 'v_1', 'v_5', 'v_8', [], 'v_6', [], 'v_2', 'v_5', 'v_2', 'v_6', []], 'v_4', 'v_5', ['v_5', 'v_2', 'v_4', 'v_4'], 'v_2', ['v_5', 'v_7', 'v_3'], 'v_7', 'v_7', ['v_8', 'v_3'], 'v_2', 'v_3', 'v_3', 'v_1', 'v_8', 'v_3', 'v_6'], 'v_1', 'v_5', 'v_8', 'v_3', 'v_6', 'v_2'
], 'v_4', 'v_8', 'v_4', ['v_4'], 'v_5', ['v_3', 'v_2', [
['v_5', 'v_4', 'v_1', 'v_7', 'v_2', 'v_7', 'v_2', 'v_3', [],
[], 'v_8', 'v_1', 'v_7'
], 'v_2', 'v_7', ['v_5', 'v_2', 'v_8', 'v_3', 'v_4', 'v_3', 'v_5', []], 'v_5', 'v_8', 'v_5', [
[], 'v_3', [],
[], 'v_1', 'v_4', 'v_2', 'v_2', 'v_3', 'v_7', []
], 'v_8', 'v_5', 'v_3'
], 'v_2', 'v_1', 'v_7', 'v_6', 'v_3'], 'v_3', 'v_7', 'v_8', 'v_4', 'v_5', ['v_1', 'v_3', 'v_6', 'v_4', ['v_5', ['v_8', 'v_6', [], 'v_2'], 'v_5', 'v_1', 'v_3', 'v_2', 'v_7', 'v_8', ['v_8', [], 'v_6', 'v_4', 'v_7']]], 'v_3', ['v_3', 'v_5', 'v_6', 'v_7', ['v_7', 'v_6', 'v_1', 'v_4', 'v_8']], 'v_1'], 'v_4', 'v_6', 'v_3', 'v_7', 'v_1', 'v_8', 'v_3', [
['v_5', 'v_3', 'v_7', 'v_5', [
['v_2', 'v_7', 'v_5', 'v_4'], 'v_4', ['v_2', 'v_8', [], 'v_2', 'v_7', 'v_3', 'v_7'], 'v_1'
], 'v_3', ['v_4', 'v_1', 'v_8', 'v_7', 'v_1', 'v_2', 'v_3', [
[], 'v_3', 'v_4', 'v_2', 'v_5', 'v_5', 'v_7', 'v_6', 'v_1', 'v_1', 'v_2', 'v_8', [], 'v_4'
], 'v_1', 'v_8', 'v_4', 'v_8', 'v_5', 'v_6', [
[],
[], 'v_8', 'v_8', [], 'v_3', 'v_4', 'v_4', [], 'v_4', 'v_8'
], 'v_4', ['v_7', 'v_5', 'v_3', 'v_7', [], 'v_1'], 'v_7'], 'v_1', ['v_5', 'v_7', [
[], 'v_5', 'v_6', 'v_2', 'v_1', 'v_3', [],
[], 'v_5'
], 'v_5', 'v_3', 'v_8', 'v_5', 'v_7', 'v_3', 'v_3', 'v_2'], 'v_1', ['v_5', 'v_2', 'v_3', ['v_6', 'v_4', 'v_3', 'v_1', [], 'v_6', 'v_5', [], 'v_1', 'v_6', 'v_8', 'v_4', 'v_7', 'v_1', 'v_4'], 'v_4', 'v_2', 'v_7', 'v_3', [
[],
[]
], 'v_1', ['v_8', 'v_2', 'v_7', 'v_3', 'v_4', 'v_3', 'v_4', 'v_7', 'v_5', [], 'v_6', 'v_8', 'v_1', []], 'v_6', 'v_7', 'v_2', 'v_8'],
['v_4', 'v_3', 'v_4', 'v_3', 'v_5', 'v_6', 'v_7', 'v_4', ['v_8', 'v_5'], 'v_3', 'v_8', 'v_1', ['v_2', 'v_5', 'v_1', 'v_6', 'v_8', 'v_2', [], 'v_5', 'v_1', 'v_6', 'v_8', 'v_7', 'v_8', 'v_8', 'v_4', 'v_6'], 'v_5', 'v_2', 'v_5', 'v_2', 'v_5'], 'v_4', 'v_4', [
['v_4', 'v_4', 'v_7'], 'v_3', 'v_7', [
[]
], 'v_5', 'v_7', 'v_3', 'v_2', 'v_1', 'v_8', [
[], 'v_2', 'v_3', 'v_4', [], 'v_4', 'v_7', 'v_5', 'v_5', 'v_3', 'v_2'
], 'v_2', 'v_6', 'v_1', 'v_8', 'v_5', ['v_7', 'v_4', 'v_2', 'v_3', 'v_2', 'v_4', 'v_8', 'v_7', 'v_2']
], 'v_4'
], 'v_2'
], 'v_7', 'v_1'
],
['v_1', 'v_7', 'v_1', 'v_6', 'v_2', 'v_2', 'v_5', 'v_4', 'v_3', 'v_3', 'v_6', 'v_8'], 'v_5'
], 'v_3', 'v_3', ['v_6'], 'v_7', 'v_2', 'v_3', ['v_7', 'v_2', 'v_4', 'v_4', 'v_5', 'v_8', 'v_2', 'v_3', 'v_1', 'v_3', ['v_5', 'v_2', 'v_8']]]
from xdict.TestLib.genrand import gen_random_recursive_only_list_data as randlist
l = randlist()
ltree = ListTree(l)
pathlists = ltree.search('v_4')
pathlists.__len__()
l[0]
l[4][2][1][0][0][3]
l[4][2][1][0][0][19][11]
l[11][3]
#cond_search
pl1=ltree.search('v_4')
pl1.__len__()
#we found 125 match of "v_4"
pl2=ltree.search('v_8')
pl2.__len__()
#we found 117 match of "v_8"
#the next we need to found "v_4" or "v_8" whose pathlist includes <14>, and the <14> appears at index <4> in the pathlist
def cond_func(ele_value,ele_pathlist,position):
cond1 = ("4" in ele_value) | ("8" in ele_value)
cond2 = (14 in ele_pathlist)
cond3 = False
if(cond2):
cond3 = (ele_pathlist.index(14) == position)
else:
pass
return(cond1 & cond2 & cond3)
position = 4
pl = ltree.cond_search(cond_func=cond_func,cond_func_args=[position])
#lquery
#ancestors
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
ltree
ltree.ancestor_paths(3,1,0)
ltree.ancestors(3,1,0)
l[3]
l[3][1]
#parent
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
ltree
ltree.parent_path(3,1,0)
ltree.parent(3,1,0)
l[3][1]
#descendants
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
ltree
ltree.descendant_paths(3)
ltree.descendants(3)
ltree.descendant_paths(3,leaf_only=True)
ltree.descendants(3,leaf_only=True)
ltree.descendant_paths(3,non_leaf_only=True)
ltree.descendants(3,non_leaf_only=True)
l[3][1]
#prevSib
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
ltree
# ltree.lsib_path
ltree.prevSibPath(3,1,1)
# ltree.lsib
ltree.prevSibling(3,1,1)
ltree.prevSibPath(3,1,0) == None
#l[3][1][0] has no left sibling
#nextSib
l = [1, [4], 2, [3, [5, 6]]]
ltree = ListTree(l)
ltree
# ltree.rsib_path
ltree.nextSibPath(3,1,0)
# ltree.rsib
ltree.nextSibling(3,1,0)
ltree.nextSibPath(3,1,1) == None
#l[3][1][1] has no right sibling
#sibs
l = [1, [4], 2, [3, [5, 6],7,[8,9]]]
ltree = ListTree(l)
ltree
ltree.sib_paths(3,1)
ltree.sibs(3,1)
ltree.sib_paths(3,1,leaf_only=True)
ltree.sibs(3,1,leaf_only=True)
ltree.sib_paths(3,1,non_leaf_only=True)
ltree.sibs(3,1,non_leaf_only=True)
#some_sibs
l = [1, [4], 2, [3, [5, 6],7,[8,9]]]
ltree = ListTree(l)
ltree
#ltree.some_sib_paths
ltree.someSibPaths(3,1,some=[0,3])
#ltree.some_sibs
ltree.someSibs(3,1,some=[0,3])
ltree.someSibPaths(3,1,some=[0,3],leaf_only=True)
ltree.someSibs(3,1,some=[0,3],leaf_only=True)
ltree.someSibPaths(3,1,some=[0,3],non_leaf_only=True)
ltree.someSibs(3,1,some=[0,3],non_leaf_only=True)
#whichSib
l = [1, [4], 2, [3, [5, 6],7,[8,9]]]
ltree = ListTree(l)
ltree
#ltree.which_sib_path
ltree.whichSibPath(3,1,which=2)
#ltree.which_sib
ltree.whichSib(3,1,which=2)
ltree.whichSibPath(3,1,which=1,leaf_only=True)
ltree.whichSib(3,1,which=1,leaf_only=True)
ltree.whichSibPath(3,1,which=1,non_leaf_only=True)
ltree.whichSib(3,1,which=1,non_leaf_only=True)
#precedingSibs
l = [1, [4], 2, [3, [5, 6],7,[8,9]]]
ltree = ListTree(l)
ltree
#ltree.preceding_sib_paths
ltree.precedingSibPaths(3,1)
#ltree.preceding_sibs
ltree.precedingSibs(3,1)
ltree.precedingSibPaths(3,1,leaf_only=True)
ltree.precedingSibs(3,1,leaf_only=True)
ltree.precedingSibPaths(3,1,non_leaf_only=True)
ltree.precedingSibs(3,1,non_leaf_only=True)
#followingSibs
l = [1, [4], 2, [3, [5, 6],7,[8,9]]]
ltree = ListTree(l)
ltree
#ltree.following_sib_paths
ltree.followingSibPaths(3,1)
#ltree.following_sibs
ltree.followingSibs(3,1)
ltree.followingSibPaths(3,1,leaf_only=True)
ltree.followingSibs(3,1,leaf_only=True)
ltree.followingSibPaths(3,1,non_leaf_only=True)
ltree.followingSibs(3,1,non_leaf_only=True)
# lcin
l = [1, [4], 2, [3, [5, 6],[8,9],7]]
ltree = ListTree(l)
ltree
ltree.lcin_path(3,2,0)
l[3][1][1]
ltree.lcin(3,2,0)
l[3][2][0]
#rcin
l = [1, [4], 2, [3, [5, 6],[8,9],7]]
ltree = ListTree(l)
ltree
ltree.rcin_path(3,1,1)
l[3][2][0]
ltree.rcin(3,1,1)
l[3][1][1]
#sons
l = [1, [4], 2, [3, [5, 6],[8,9],7]]
ltree = ListTree(l)
ltree
ltree.son_paths(3)
ltree.sons(3)
ltree.son_paths(3,leaf_only=True)
ltree.sons(3,leaf_only=True)
ltree.son_paths(3,non_leaf_only=True)
ltree.sons(3,non_leaf_only=True)
#PARAMS
l = [1, [4], 2, [3, [5, 6],[8,9],7]]
ltree = ListTree(l)
ltree
ltree.depth
ltree.total
ltree.flatWidth
ltree.maxLevelWidth
#cond_remove_seqs
from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_remove_seqs(ol,[0,2],cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
rslt = cond_remove_seqs(ol,[0,2],cond_func=afterCH,cond_func_args=['B'],mode='original')
ol
rslt
id(ol)
id(rslt)
#cond_remove_some
from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_remove_some(ol,0,2,cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
rslt = cond_remove_some(ol,0,2,cond_func=afterCH,cond_func_args=['B'],mode='original')
ol
rslt
id(ol)
id(rslt)
#cond_remove_all
from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_remove_all(ol,cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
rslt = cond_remove_all(ol,cond_func=afterCH,cond_func_args=['B'],mode='original')
ol
rslt
id(ol)
id(rslt)
#cond_replace_value_all
from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_replace_value_all(ol,"REPLACED",cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
rslt = cond_replace_value_all(ol,"REPLACED",cond_func=afterCH,cond_func_args=['B'],mode="original")
ol
rslt
id(ol)
id(rslt)
# >>> #cond_replace_value_all
# ...
# >>> from elist.elist import *
# >>> ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
# >>> id(ol)
# 139927002027016
# >>> def afterCH(ele,ch):
# ... cond = (ord(str(ele)) > ord(ch))
# ... return(cond)
# ...
# >>> new = cond_replace_value_all(ol,"REPLACED",cond_func=afterCH,cond_func_args=['B'])
# >>> ol
# [1, 'X', 3, 'b', 5, 'c', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> new
# [1, 'REPLACED', 3, 'REPLACED', 5, 'REPLACED', 6, 'A', 7, 'REPLACED', 8, 'B', 9]
# >>> id(ol)
# 139927002027016
# >>> id(new)
# 139927014765896
# >>> ####
# ... ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
# >>> id(ol)
# 139927002026184
# >>> rslt = cond_replace_value_all(ol,"REPLACED",cond_func=afterCH,cond_func_args=['B'], mode="original")
# >>> ol
# [1, 'REPLACED', 3, 'REPLACED', 5, 'REPLACED', 6, 'A', 7, 'REPLACED', 8, 'B', 9]
# >>> rslt
# [1, 'REPLACED', 3, 'REPLACED', 5, 'REPLACED', 6, 'A', 7, 'REPLACED', 8, 'B', 9]
# >>> id(ol)
# 139927002026184
# >>> id(rslt)
# 139927002026184
from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_replace_value_seqs(ol,"REPLACED",[0,2],cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
rslt = cond_replace_value_seqs(ol,"REPLACED",[0,2],cond_func=afterCH,cond_func_args=['B'],mode="original")
ol
rslt
id(ol)
id(rslt)
# >>>
# >>> from elist.elist import *
# >>> ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
# >>> id(ol)
# 139927002027016
# >>> def afterCH(ele,ch):
# ... cond = (ord(str(ele)) > ord(ch))
# ... return(cond)
# ...
# >>> new = cond_replace_value_seqs(ol,"REPLACED",[0,2],cond_func=afterCH,cond_func_args=['B'])
# id(new)
# >>> ol
# [1, 'X', 3, 'b', 5, 'c', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> new
# [1, 'REPLACED', 3, 'b', 5, 'REPLACED', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> id(ol)
# 139927002027016
# >>> id(new)
# 139927002026312
# >>> ####
# ... ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
# >>> id(ol)
# 139927014765896
# >>> rslt = cond_replace_value_seqs(ol,"REPLACED",[0,2],cond_func=afterCH,cond_func_args=['B'],mode="original")
# >>> ol
# [1, 'REPLACED', 3, 'b', 5, 'REPLACED', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> rslt
# [1, 'REPLACED', 3, 'b', 5, 'REPLACED', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> id(ol)
# 139927014765896
# >>> id(rslt)
# 139927014765896
# >>>
from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_replace_value_some(ol,"REPLACED",0,2,cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
rslt = cond_replace_value_some(ol,"REPLACED",0,2,cond_func=afterCH,cond_func_args=['B'],mode="original")
ol
rslt
id(ol)
id(rslt)
# >>>
# >>> from elist.elist import *
# >>> ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
# >>> id(ol)
# 139927002028680
# >>> def afterCH(ele,ch):
# ... cond = (ord(str(ele)) > ord(ch))
# ... return(cond)
# ...
# >>> new = cond_replace_value_some(ol,"REPLACED",0,2,cond_func=afterCH,cond_func_args=['B'])
# >>> ol
# [1, 'X', 3, 'b', 5, 'c', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> new
# [1, 'REPLACED', 3, 'b', 5, 'REPLACED', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> id(ol)
# 139927002028680
# >>> id(new)
# 139927002028168
# >>> ####
# ... ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
# >>> id(ol)
# 139927002027784
# >>> rslt = cond_replace_value_some(ol,"REPLACED",0,2,cond_func=afterCH,cond_func_args=['B'],mode="original")
# >>> ol
# [1, 'REPLACED', 3, 'b', 5, 'REPLACED', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> rslt
# [1, 'REPLACED', 3, 'b', 5, 'REPLACED', 6, 'A', 7, 'b', 8, 'B', 9]
# >>> id(ol)
# 139927002027784
# >>> id(rslt)
# 139927002027784
# >>>
# >>>
#cond_value_indexes_mapping
l = [('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('SID', '1'), ('SID', '2')]
def cond_func(ele,*args):
cond = ele[0]
return(cond)
desc = cond_value_indexes_mapping(l,cond_func=cond_func)
pobj(desc)
# >>> l = [('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('SID', '1'), ('SID', '2')]
# >>>
# >>> def cond_func(ele,*args):
# ... cond = ele[0]
# ... return(cond)
# ...
# >>> desc = cond_value_indexes_mapping(l,cond_func=cond_func)
# >>> pobj(desc)
# {
# 'BIGipServer':
# [
# 0,
# 2
# ],
# 'SID':
# [
# 4,
# 5
# ],
# 'TS013d8ed5':
# [
# 1,
# 3
# ]
# }
# >>>
from elist.elist import *
l = [('BIGipServer', 'rd100'), ('TS013d8ed5', '00A0'), ('BIGipServer', 'rd200'), ('TS013d8ed5', '00B0'), ('SID', '1'), ('SID', '2')]
def cond_func(ele,*args):
cond = ele[0]
return(cond)
uniqualized = cond_uniqualize(l,cond_func=cond_func)
pobj(uniqualized)
l = [('BIGipServer', 'rd100'), ('TS013d8ed5', '00A0'), ('BIGipServer', 'rd200'), ('TS013d8ed5', '00B0'), ('SID', '1'), ('SID', '2')]
reserved_mapping = {'BIGipServer':0,'TS013d8ed5':1,'SID':1}
uniqualized = cond_uniqualize(l,cond_func=cond_func,reserved_mapping=reserved_mapping)
pobj(uniqualized)
# >>>
# >>>
# >>> from elist.elist import *
# >>> l = [('BIGipServer', 'rd100'), ('TS013d8ed5', '00A0'), ('BIGipServer', 'rd200'), ('TS013d8ed5', '00B0'), ('SID', '1'), ('SID', '2')]
# >>>
# >>> def cond_func(ele,*args):
# ... cond = ele[0]
# ... return(cond)
# ...
# >>> uniqualized = cond_uniqualize(l,cond_func=cond_func)
# >>> pobj(uniqualized)
# [
# (
# 'BIGipServer',
# 'rd100'
# ),
# (
# 'TS013d8ed5',
# '00A0'
# ),
# (
# 'SID',
# '1'
# )
# ]
# >>>
# >>> l = [('BIGipServer', 'rd100'), ('TS013d8ed5', '00A0'), ('BIGipServer', 'rd200'), ('TS013d8ed5', '00B0'), ('SID', '1'), ('SID', '2')]
# pobj(uniqualized)
# >>>
# >>> reserved_mapping = {'BIGipServer':0,'TS013d8ed5':1,'SID':1}
# >>> uniqualized = cond_uniqualize(l,cond_func=cond_func,reserved_mapping=reserved_mapping)
# >>> pobj(uniqualized)
# [
# (
# 'BIGipServer',
# 'rd100'
# ),
# (
# 'TS013d8ed5',
# '00B0'
# ),
# (
# 'SID',
# '2'
# )
# ]
# >>>
|
b70cdaca01ecedba267fc188cfe8e3afa9a2acf2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH15/EX15.14/14.sce | 552989bdd6267634ec6b295c4b3b3a8435ff7678 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 144 | sce | 14.sce | clc
A=1*1.5; //m^2
ts=300; //0C
tf=20; //0C
h=20; //W/m^2 0C
Q=h*A*(ts-tf)/10^3; //kW
disp("Rate of heat transfer =")
disp(Q)
disp("kW") |
23e879c4e319d2605c6716eebe8e251f8f929bd0 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.5/Unix-Windows/scilab-2.5/macros/percent/%sp_l_s.sci | d1841ed0e64d55d1ca36a3317c4c1e7f8620681f | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 671 | sci | %sp_l_s.sci | function x=%sp_l_s(a,b)
// a\b , a sparse b full
// Copyright INRIA
[ma,na]=size(a)
[mb,nb]=size(b)
if mb*nb==1 then x=a\(b*speye(na,na)),return;end
if ma<>mb then error(12),end
if ma<>na then b=a'*b;a=a'*a;end
if isreal(a)&isreal(b) then
[h,rk]=lufact(a)
if rk<mini(ma,na) then warning('deficient rank: rank = '+string(rk)),end
x=[]
for k=1:nb
x=[x,lusolve(h,b(:,k))]
end
ludel(h)
else
[h,rk]=lufact([real(a) -imag(a);imag(a) real(a)])
if rk<2*mini(ma,na) then warning('deficient rank: rank = '+string(rk/2)),end
x=[]
for k=1:nb
x=[x,lusolve(h,[real(b(:,k));imag(b(:,k))])]
end
x=x(1:$/2,:)+%i*x($/2+1:$,:)
ludel(h)
end
|
ea9c57b981a70fdadc9ba5c68196ec9c7a7c6bdf | 717ddeb7e700373742c617a95e25a2376565112c | /647/CH9/EX9.7/Example9_7.sce | 6a863ed287fa4d89fd5a8e52adc4a1c7ca916dd8 | [] | 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 | 1,478 | sce | Example9_7.sce | clear;
clc;
// Example: 9.7
// Page: 342
printf("Example: 9.7 - Page: 342\n\n");
// Solution
//*****Data******//
// Data = [X1 V*10^6(cubic m/mol)];
Data = [0 20;0.2 21.5;0.4 24.0;0.6 27.4;0.8 32.0;1 40];
//************//
scf(1.1);
plot(Data(:,1),Data(:,2));
title("Example 9.7");
xlabel("Mole fraction");
ylabel("Molar Volume*10^(6)");
xgrid();
// Solution (i)
printf("For X1 = 0.5\n");
// A tangent is drawn to the curve at X1 = 0.5.
// The intercept at X2 = 0 or X1 = 1, gives V1_bar.
V1_bar1 = 33.8*10^(-6);// [cubic m/mol]
// The intercept at X2 = 1 or X1 = 0, gives V2_bar.
V2_bar1 = 17*10^(-6);// [cubic m/mol]
printf("Partial molar volume of component 1 is %.2e cubic m/mol\n",V1_bar1);
printf("Partial molar volume of component 2 is %.2e cubic m/mol\n",V2_bar1);
printf("\n");
// Solution (ii)
printf("For X2 = 0.75\n");
// A tangent is drawn to the curve at X1 = 0.75.
// The intercept at X2 = 0 or X1 = 1, gives V1_bar.
V1_bar2 = 36.6*10^(-6);// [cubic m/mol]
// The intercept at X2 = 1 or X1 = 0, gives V2_bar.
V2_bar2 = 12.4*10^(-6);// [cubic m/mol]
point1 = [0 V1_bar1; 1 V2_bar1];
point2 = [0 V1_bar2;1 V2_bar2];
scf(2);
plot(point1(:,1),point1(:,2),point2(:,1),point2(:,2));
legend("X1 = 0.5","X1 = 0.75");
xlabel("Mole fraction");
ylabel("Molar Volume");
printf("Partial molar volume of component 1 is %.2e cubic m/mol\n",V1_bar);
printf("Partial molar volume of component 2 is %.2e cubic m/mol\n",V2_bar); |
00e9955f1ef0b00bceb222463efb880e66e66624 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1844/CH3/EX3.8/3Q8.sce | 2a23e340d176d1b9111058562e3d8777c32ba23e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 256 | sce | 3Q8.sce | clc
s=10 //angle of slope in rad
HA=100*(1/(cosd(s))-1) //Hypotenusal allowance in m
HA1=HA*0.201
printf('a)Hypotenusl allowance = %f \n',HA1 )
k= atan(0.2)
HA2=100*(1/(cos(k))-1)
HA3=HA2*0.201
printf(' b)Hypotenusl allowance = %f m',HA3 )
|
229d6fa2735a72924c1bbfbfd2421c9cf7d9173e | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set13/s_Introduction_To_Electric_Drives_J._S._Katre_2207.zip/Introduction_To_Electric_Drives_J._S._Katre_2207/CH1/EX1.20.1/ex_1_20_1.sce | c0e8ac71c02055b5342ea32a5ad5cbd5bff1bdd6 | [] | 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 | 236 | sce | ex_1_20_1.sce | errcatch(-1,"stop");mode(2);//Example 1.20.1: Turn Off Time
;
;
//given data :
format('v',6)
Vs=200;//in volts
R1=10;// in ohm
R2=R1;
C=5;// in micro-farad
Tc=(R1*C)/1.44;
disp(Tc,"The Circuit Turn Off Time,Tc(micro-sec) = ")
exit();
|
110526f1f7770b4710ef5fed2bf6f77a6bc29761 | 449d555969bfd7befe906877abab098c6e63a0e8 | /62/CH7/EX7.36/ex_7_36.sce | 3ce1967de0b8f7e6af161b2f6928ee91a694c9f0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 150 | sce | ex_7_36.sce | clc;
A=[0 1;-1/8 3/4];
B=[0;1];
q2=[0 ;0];
q0=[0;1];
//we know q2=A^2*q0+[B A*B]*X
X=inv([B A*B])*[q2-A^2*q0];
disp(X,"therefore [x(1);x(0)]=") |
643661c4a4279f39f6e214772a54af528a772026 | 048b7c76423fe27dee2e31a52bae93c95883614e | /macros/fir2.sci | 418a9e40e02e29eaf8217a3bfae0d3649ff3c757 | [] | no_license | vu2swz/FOSSEE-Signal-Processing-Toolbox | aa5f283d050be62418dddbf41552f197b9949c4c | d97a4b7e2f0f25fb5cd94bd90a3b822592179d1e | refs/heads/master | 2021-08-19T20:06:19.346872 | 2017-11-27T09:57:21 | 2017-11-27T09:57:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 445 | sci | fir2.sci | function B = fir2(N, F, M, varargin)
funcprot(0);
rhs = argn(2)
if(rhs<3 | rhs>6)
error("Wrong number of input arguments.");
end
select(rhs)
case 3 then
B = callOctave("fir2", N, F, M);
case 4 then
B = callOctave("fir2", N, F, M, varargin(1));
case 5 then
B = callOctave("fir2", N, F, M, varargin(1), varargin(2));
case 6 then
B = callOctave("fir2", N, F, M, varargin(1), varargin(2), varargin(3));
end
endfunction
|
293403b53d3e39d783bbbd3717756b831b96c71c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2513/CH15/EX15.2/15_2.sce | d6e6fb386103be52213377aaedce56fee46b9c63 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 401 | sce | 15_2.sce | clc
//initialisation of variables
v=2.5//fps
N=0.015//fps
a=(40+27)//in
b=(40*27+27*19)/a
c=0.440//cfs
w=49*0.09/100//cfs
g=0.008//percent
Q=0.82//cfs
r=0.795//cfs
t=2.35*1.16//fps
d1=113.20-113.03//ft
d2=12//ft
//CALCULATIONS
R=r/Q//cfs
D=g*r//in
D2=d1*d2//in
//RESULTS
printf('The required capacity and find the slope size and hydraulic characteristics of the system=% f in',D2)
|
d8d228dcdaf7f2e1153454bfee3d6edf24b97770 | 389bd4af3bf5a0f54f51e8aafea5035f568ba445 | /fonk_alt_ust_sinirlama_hocanın_yaptigi.sce | c2cefac14b9a8afd189332d16aefd2d02a776e74 | [] | no_license | esraatlici/Bilgisayar-Destekli-Matematik | d47f057d9cb7ee987e367c67f8923cfcf02342d8 | dae1079f60fc7e0d3b54802b4cbed9182b52fcd7 | refs/heads/main | 2022-12-25T11:14:25.575530 | 2020-10-05T15:09:58 | 2020-10-05T15:09:58 | 301,447,895 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 249 | sce | fonk_alt_ust_sinirlama_hocanın_yaptigi.sce | function out=sat_u(x,l_lim,u_lim)
s=length(x);
for k=1:1:s;
if x(k)<=l_lim then
v(k)=l_lim;
elseif x(k)>=u_lim then
v(k)=u_lim;
else
v(k)=x(k);
end
end
out=v;
endfunction
|
08d0a36f8e8a731c98470924a011dbc5e9555af7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1385/CH9/EX9.12/9_12.sce | 0244feb71bff96afb8879d3f0d081c04d5294808 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 163 | sce | 9_12.sce | clc
//initialisation of variables
kw= 10^-14
Ka= 1.8*10^-5
//CALCULATIONS
Kb= Ka
B= sqrt(kw/(Ka*Kb))
//RESULTS
printf (' degree of hydrolysis = %.1e ',B)
|
e66015bcdbc2104138d1f16dc60c38b553d145df | 449d555969bfd7befe906877abab098c6e63a0e8 | /2459/CH9/EX9.7/Ex9_7.sce | b5e10407a37e046c6e03533b9eafe8aa1c3003ae | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 304 | sce | Ex9_7.sce | //chapter9
//example9.7
//page148
V=10 // V
V_D=0.7 // V
R_BC=2 // kilo ohm
R=2 // kilo ohm
// by Kirchoff voltage law we get
// -V_D-I_D*R_BC-2*I_D*R+V=0 thus making I_D as subject we get
I_D=(V-V_D)/(R_BC+2*R)
V_Q=2*I_D*R
printf("I_D = %.3f mA \n",I_D)
printf("V_Q = %.3f V \n",V_Q)
|
27d9306a57dfb82cb5b87302861a6907ff07de8b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH23/EX23.16/Ex23_16.sce | bc2fbb2a647e2cb99a26faf9b3e84ca8c979cef9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 266 | sce | Ex23_16.sce | clear
//Given
h=6.62*10**-34
m=9*10**-31
v=10**5
mp=1.67*10**-27
//Calculation
l=h/(m*v)
lp=h/(mp*v)
//Result
printf("\n De-Broglie wavelength of electrons is %0.1f *10**-10 m",l*10**10)
printf("\n De-Broglie wavelength of protons is %0.4f *10**-10 m",lp*10**10)
|
759ea4b5dd9db4f75bf0c75b3c5b8495e4f805c0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH22/EX22.26/Ex22_26.sce | 2af0baabd4b733707850753caacb24c8cce0bf6e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 175 | sce | Ex22_26.sce | clear
//Given
ap=60 //Degree
u=3
//Calculation
//
a=1/sqrt(u)
C=asin(a)*180/3.14
//Result
printf("\n Critical angle for this medium is %0.2f Degree",C)
|
0a3b8a7be5ad8d5871e85de1687bfbbe4b3326d4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1541/CH2/EX2.34/Chapter2_Example34.sce | 416daaf21d84fc790dfec5d67fa762ed393a0bd1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 782 | sce | Chapter2_Example34.sce | //Chapter-2, Example 2.34, Page 2.65
//=============================================================================
clc
clear
//INPUT DATA
Q=50000;//Rating of the transformer in VA
Pi=500;//Constat losses in W
Pcu=900;//Full load variable losses in W
cosq=0.8;//Power factor
//CALCULATIONS
nFL=((Q*cosq)/((Q*cosq)+Pi+Pcu))*100;//Full load efficiency
L=(Q*sqrt(Pi/Pcu))/1000;//Load at which transformer operates at maximum efficiency in KVA
n=((L*1000)/((L*1000)+Pi+Pi))*100;//Maximum efficiency
//OUTPUT
mprintf('a)Full load efficiency is %3.2f percent \nb)Load at which transformer operates at maximum efficiency is %3.2f KVA \nc)Maximum efficiency is %3.2f percent',nFL,L,n)
//=================================END OF PROGRAM==============================
|
c7c69ac3d3203bef5eae4c7594705e8a491b8f21 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3862/CH5/EX5.13/Ex5_13.sce | bee2a03f5ebcb30db63b4dada5652859f52faef9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 456 | sce | Ex5_13.sce | clear
//
n=1.25 //number of turns
o=2*3.14*n //angle of contact
u=0.3 //coefficient of friction
t=600.0 //force at the other end of the rope
//if the impending motion of the weight be downward.
T2=t*%e**(u*o)
W=T2
printf("Maximum weight is %f",W)
printf("\n answer in textbook is wrong")
//if the impending motion of weight be upwards
T1=t*%e**(-1*u*o)
W=T1
printf("\n Minimum weight is %f",W)
|
be1dde411411ef9a1e955b60cd015a16b914145c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3685/CH14/EX14.11/Ex14_11.sce | 57d888567413f22cdbc6560c44ade8b83711770e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 953 | sce | Ex14_11.sce |
clc
T1 = 275 // Temperature of air at entrance to compressor in K
T3 = 310 // Temperature of air at entrance to turbine in K
P1 = 1 // Inlet pressure in bar
P2 = 4 // Outlet pressure in bar
nc = 0.8 // Compressor efficiency
T2s = T1*(P2/P1)^(.286) // Ideal temperature after compression
T2 = T1 + (T2s-T1)/nc // Actual temperature after compression
pr1 = 0.1 // Pressure loss in cooler in bar
pr2 = 0.08 //Pressure loss in condenser in bar
P3 = P2-0.1 // Actual pressure in condenser
P4 = P1+0.08 // Actual pressure in evaporator
PR = P3/P4 // Pressure ratio
T4s = T3*(1/PR)^(0.286) // Ideal temperature after expansion
nt = 0.85 // turbine efficiency
T4 = T3-(T3-T4s)*nt // Actual temperature after expansion
COP = (T1-T4)/((T2-T3)-(T1-T4)) // Coefficient of performance
printf("\n Example 14.11\n")
printf("\n Pressure ratio for the turbine is %f ",PR)
printf("\n COP is %f ",COP)
//The answers vary due to round off error
|
cb9a193a20e9907d85427738e0d40bbf38172986 | a45f93853fdb67523e71e3e7fb88c4298eae1ef7 | /Screens/Confirm File Overwrite Dialog Screen.tst | 2299847da6322d6f79ead0199991dcb10c0b86c7 | [] | no_license | voarsh/Disney-Treasure-Planet-Battle-at-Procyon | 68192cbfdf8b823bc8399e3ea1e62d4976b74aed | 99cbbc70701ef6e8f9d95eba1052635de992910f | refs/heads/master | 2020-04-16T01:44:03.761947 | 2016-06-08T10:25:05 | 2016-06-08T10:25:05 | 38,745,932 | 3 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,297 | tst | Confirm File Overwrite Dialog Screen.tst | ScreenName String 'Confirm File Overwrite Dialog Screen'
ImplName String 'Dialog Screen'
ElementChunkArray Int 4
ScreenElementType Int 0
ImplName String 'Front End Dialog Screen Backdrop'
TabIndex Int 1
Selectable Bool True
Enabled Bool True
ReferenceArea Rect( 61, 165, 603, 436 ) # left,top,right,bottom
ScreenElementType Int 1
ImplName String 'Open Dialog Next Button'
TabIndex Int 3
Selectable Bool True
Enabled Bool True
ReferenceArea Rect( 205, 300, 355, 344 ) # left,top,right,bottom
Font String 'BlackChancery16'
Text String 'IDGS_TPFRONTENDTEXT02_YES'
Color Colour( 1.000000, 1.000000, 1.000000, 1.000000 )
HotKey Int -1
ScreenElementType Int 1
ImplName String 'Open Dialog Previous Button'
TabIndex Int 4
Selectable Bool True
Enabled Bool True
ReferenceArea Rect( 439, 300, 589, 344 ) # left,top,right,bottom
Font String 'BlackChancery16'
Text String 'IDGS_TPFRONTENDTEXT02_NO'
Color Colour( 1.000000, 1.000000, 1.000000, 1.000000 )
HotKey Int -1
ScreenElementType Int 1
ImplName String 'Center Justify Label'
TabIndex Int 5
Selectable Bool False
Enabled Bool True
ReferenceArea Rect( 0, 236, 800, 269 ) # left,top,right,bottom
Font String 'UniversLightBold14'
Text String 'IDGS_TPFRONTENDTEXT02_FILECHANGE_OVERWRITE'
Color Colour( 1.000000, 1.000000, 1.000000, 1.000000 )
HotKey Int -1
|
23fabfd23678ecb8eaa5dcfea93359a2dc0df5ae | 1db0a7f58e484c067efa384b541cecee64d190ab | /macros/primitive.sci | bdb45605a05d396de0c6924eba28fd43aad7b517 | [] | no_license | sonusharma55/Signal-Toolbox | 3eff678d177633ee8aadca7fb9782b8bd7c2f1ce | 89bfeffefc89137fe3c266d3a3e746a749bbc1e9 | refs/heads/master | 2020-03-22T21:37:22.593805 | 2018-07-12T12:35:54 | 2018-07-12T12:35:54 | 140,701,211 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 874 | sci | primitive.sci | function y = primitive (f, t, x)
//This function calculates the primitive of a given function supplied as input.
//Calling Sequence
//y = primitive(f, t)
//y = primitive(f, t, x)
//Parameters
//f:
//t:
//x
//Description
//This is an Octave function.
//This function calculates the primitive of a given function supplied as input.
//The second parameter t is a vector at which the output is evaluated (at the points t). This vector should be ascending and ordered.
//The function approximates the primitive (indefinite integral) of the univariate function handle f with constant of integration x.
//Examples
//primitive([1,4,5],3,9)
//ans =
// 9.
funcprot(0);
rhs = argn(2)
if(rhs<2 | rhs>3)
error("Wrong number of input arguments.")
end
select(rhs)
case 2 then
y = callOctave("primitive",f, t)
case 3 then
y = callOctave("primitive",f, t, x)
end
endfunction
|
652a7103fea95d360f07f6b6492bc176bcb6c48e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2345/CH15/EX15.29/Ex15_29.sce | 09702de7e08da42d1adc9014c42b18d35fd98531 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 302 | sce | Ex15_29.sce | //Finding heat
//Example 15.29(pg. 411)
clc
clear
C=2*(10^-6)//capacitance of condenser in F
V=10000//PD across condenser in Volts
E=(1/2)*C*(V^2)//energy stored in condenser in Joules
H=E/4.2//heat produced in the wire in calories
printf('Thus heat produced in the wire is %2.2f calories',H)
|
74d906c406f1323ae274f8cae05834b88ac672eb | c3f74a8101e605a189fabf0d9a1e831519bc9c61 | /Sources/S4.sce | dcf7341988437f5230b76250aba578dc6bb7d39a | [] | no_license | Varal7/ProjetScilab | 26f8cf730ced1247f9409dae70076f7182f69d1a | bc6e0d8ae9fb131a128dbd4cc4f8cf4bd0cd74c4 | refs/heads/master | 2021-01-20T11:31:45.820662 | 2015-06-29T14:25:05 | 2015-06-29T14:25:05 | 35,808,084 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 971 | sce | S4.sce | clear;
M=10;
p=0.7;
nb_lancers = 5000;
N_0 = 5;
function y=F(x,K,U)
y=x;
if (K>x) &(U<=p) then
y=x+1;
elseif (K<=x)&(U>p) then
y= x-1
else
y=x
end
endfunction
function r=Xstar()
N=N_0;
K = grand(1,N,"uin",1,M);
U = grand(1,N,"unf",0,1);
has_coalescence = %f
while ~has_coalescence
x_0 = 0;
x_1 = M;
for j=N:-1 :1 //Calcul de F_0(F_-1(...(x_0)..)) resp. x_1
x_0 = F(x_0,K(j),U(j))
x_1 = F(x_1,K(j),U(j))
end
if x_0 == x_1 //S'il y a coalescence, on renvoie x_0 (=x_1)
r = x_0
has_coalescence = %t
else //Sinon, on double le tableau et on recommence
K(N+1:2*N) = grand(1,N,"uin",1,M);
U(N+1:2*N) = grand(1,N,"unf",0,1);
N=2*N
end
end
endfunction
for i=1 : nb_lancers
results(i)=Xstar();
end
histplot(0.5:10.5,results,style=2)
|
3aaca112919b781c812a79182b71052bd976a529 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.2/Unix/scilab-2.2/macros/scicos/getobj.sci | 23e4808103c607f13d1bf0964aefdf0a728ce227 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 1,040 | sci | getobj.sci | function [k,wh]=getobj(objs,pt)
n=size(objs)
wh=[];
x=pt(1);y=pt(2)
data=[]
k=[]
for i=2:n
o=objs(i)
if o(1)=='Block' then
graphics=o(2)
[orig,sz]=graphics(1:2)
data=[(orig(1)-x)*(orig(1)+sz(1)-x),(orig(2)-y)*(orig(2)+sz(2)-y)]
if data(1)<0&data(2)<0 then k=i,break,end
elseif o(1)=='Link' then
[frect1,frect]=xgetech();
eps=0.01*min(abs(frect(3)-frect(1)),abs(frect(4)-frect(2)))
xx=o(2);yy=o(3);
x=x;y=y;
n=prod(size(xx))
t=((yy(1:n-1)-yy(2:n))*x+(xx(2:n)-xx(1:n-1))*y+..
xx(1:n-1).*yy(2:n)-xx(2:n).*yy(1:n-1))...
./sqrt((xx(2:n)-xx(1:n-1))^2+..
(yy(2:n)-yy(1:n-1))^2)
l=find(abs(t)<eps)
for j=1:prod(size(l))
lj=l(j)
if (x-xx(lj))*(x-xx(lj+1))<0 then wh=lj;k=i,break,end
if (y-yy(lj))*(y-yy(lj+1))<0 then wh=lj;k=i,break,end
end
elseif o(1)=='Text' then
graphics=o(2)
[orig,sz]=graphics(1:2)
data=[(orig(1)-x)*(orig(1)+sz(1)-x),(orig(2)-y)*(orig(2)+sz(2)-y)]
if data(1)<0&data(2)<0 then k=i,break,end
end
end
|
7cddb54cdce456a01f94b19cfdc88763552bcc19 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1919/CH3/EX3.3/Ex3_3.sce | b9f22fb864793478d33312410cedf8a4427f8b7e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 766 | sce | Ex3_3.sce | // Theory and Problems of Thermodynamics
// Chapter 3
// Thermodynamic Properties of Fluids
// Example 3
clear ;clc;
//Given data
N = 10000 // Number of moles of Methane
T = 300 // Temperature of methane in K
P = 6 // Pressure of Methane in Mpa
Pc = 4.6 // Critical pressure constant of Methane in MPa
Tc = 190.6 // critical Temperature constant of Methane in K
R = 8.314 // Gas constant
Pr = P/Pc // Residual Pressure
Tr = T/Tc // Residual Temperature
Z = 0.93 // From compressibility chart
P = P*1e6 // Units conversion from MPa to Pa
// for ideal gas
V = Z*N*R*T/P
mprintf('Volume calculated from generalized compresibility chart = %4.3f cubic meters' ,V)
|
17ccd66289042060ef3a5fbe3d48c39a612fd7e1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1571/CH3/EX3.1/Chapter3_Example1.sce | 0c532267b759ed6bf74a927eb1252a20f914f738 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 584 | sce | Chapter3_Example1.sce | clc
clear
//INPUT DATA
m=20;//calorimeter of water equivalent in gm
n=1030;//weight of water in gm
p=2;//no.of paddles
a=10;//weight of each paddle in kg
s=80;//distance between paddles in m
g=980;//accelaration due to gravity in cm/sec^2
//CALCULATIONS
E=(p*a*1000*g*s*100);//potential energy in dyne cm
T=(E)/(1050*4.18*10^7);//rise in temperature in deg.C
//if the rise in temp be T,then heat gained by the calorimeter and its contets is 1050T so J=(E)/(1050*T) where (j=4.18*10^7erg/cal)
//OUTPUT
mprintf('the rise in temperature of water is %3.2f deg.C',T)
|
525973e73d3f062684eb2c0531459dec69793c31 | 31e6f49f6786aa5240625154834e364f6cfb8b50 | /test/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst | 21c3a896e1dc7b2d9c39a0ca9b039efe1ceadaf3 | [] | no_license | eilgin/hack-vm | 14dcad5e39bbe923bc68c981c7636ef68ad344d1 | 290dd3ea76724555d4f6f32c944dcf8939d3866e | refs/heads/master | 2021-01-15T18:01:05.019693 | 2012-09-17T10:37:54 | 2012-09-17T10:37:54 | 5,839,569 | 5 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 702 | tst | SimpleFunctionVME.tst | // This file is part of the materials accompanying the book
// "The Elements of Computing Systems" by Nisan and Schocken,
// MIT Press. Book site: www.idc.ac.il/tecs
// 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;
|
b9a442ea9988e8a9b2a132ad22b6c2697ef3561f | 449d555969bfd7befe906877abab098c6e63a0e8 | /284/CH10/EX10.3/ex_3.sce | efec5e029e1c5ab70bb6b3711da1eef58704f49a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 393 | sce | ex_3.sce | // Chapter 10_Fundamentals of the Metal Oxide Semiconductor Field Effect Transistor
//Caption_Flat band voltage
//Ex_3//page 442
Na=10^16
tox=500*10^-8 //oxide thickness
Qss=10^11 //trapped charge per unit area
e=1.6*10^-19
eps_ox=3.9*8.85*10^-14
Cox=eps_ox/tox
QSS=Qss*e
phi_ms=-1.1
Vfb=phi_ms-(QSS/Cox)
printf('Flat band voltage for this MOS capacitor is %1.2f V',Vfb)
|
703a8fe2dd8f522d2d75aa5bbf0758f7b26213ed | 4f5dde6a6efd59f25dc8e028367b864815455f01 | /a.tst | 56e647702e9e4e536c63c87d47cb0ed54f366718 | [] | no_license | pufaqi/one_packages | c237e79dd00921184198cf6838afa98977ab880d | ebff3d547fcf1c4aa13f56e208b68eff9bc0115b | refs/heads/master | 2021-09-23T22:53:28.054505 | 2021-09-09T09:33:44 | 2021-09-09T09:33:44 | 170,844,647 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 315 | tst | a.tst | s
dsa
f
das
f
adsa
f
dsaf
ads
f
sda
sdf
asd
f
dsa
df
d
fd
fd
f
df
f
dd
sf
asd
f
asd
f
asd
fas
f
dsaf
dfakljfaljfa;lkjfa;ljfda;lkdfj
sdfjlaskjfakljdfl
sdfajaskljfaljksadhfkjash
dskhafjkashk
aslfhkasdhjkla
sdfjklasdjfalsk
lsadfjalsjdflksda
f
f
asd
fdas
f
sda
f
asdf
dsa
f
dsa
f
sdafs
d
dsaf
asd
fd
saf
dsf
ads
f
dsa
|
77b3fbe20c029aca4d58c312ac80fa8e61b42143 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3886/CH15/EX15.5/15_5.sce | b4bd55496ef0e58227b760ada8c60f23296da7ed | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 324 | sce | 15_5.sce | //Crate resting on cart
//refer fig. 15.7 (a),(b) and (c)
//Applying equilibrium condition
//N=W=750 N
//Frictional force
mu=0.3
N=750
F=mu*N
a=(225*9.81)/(750) //m/sec^2
//Consider dynamic equilibrium of the system
P=250+((1250*2.943)/(9.81)) //N
printf("\nMaximum allowable P=%.2f N and a=%.3f m/sec^2",P,a)
|
7cf66a9487fbc719b3f880ecaa6983e548d84af7 | cc6cc2c2fcdfa476aa883265aa05e06d82c1110a | /2018.1/MAT/lista-scilab/9.sce | 2af8a2eebba7e2484a8ee03514092c0c5d52e7e2 | [] | no_license | devarthurribeiro/ads-ufrn | 39038c2089d5d784fa121c4094e6d694dcb5a545 | 9a9881acf756be4f844e72e581543daf3a649641 | refs/heads/master | 2020-03-17T15:16:28.940709 | 2018-10-02T12:26:27 | 2018-10-02T12:26:27 | 133,704,315 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 703 | sce | 9.sce | a = input("Informe o coeficiente a :");
b = input("Informe o coeficiente b :");
c = input("Informe o coeficiente c :");
if (a==0) & (b==0)
printf("Equacao degenerada\n");
end
if (a==0) & (b<>0)
printf("Raiz única em %g.\n",-c/b);
end
if (a<>0) & (c==0)
x = -b\a;
printf("Raiz 1 = 0\n");
printf("Raiz 2 = %g\n",x);
end
if (a<>0) & (c<>0)
d = b*b - 4*a*c;
if disc >= 0
x1 = -b/(2*a) + sqrt(d)/(2*a);
x2 = -b/(2*a) - sqrt(d)/(2*a);
printf("Raiz1 = %g\n",x1);
printf("Raiz2 = %g\n",x2);
else
pr = -b/(2*a);
pi = sqrt(abs(d))/(2*a);
printf("Parte real = %g\n",pr);
printf("Parte imaginária = %g\n",pi);
end
end
|
f75fade15d283c603d785dd72eb18dd254b3ff91 | 449d555969bfd7befe906877abab098c6e63a0e8 | /69/CH5/EX5.12/5_12.sce | c74ec56281148556649a4a47482ef41004c314ae | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 847 | sce | 5_12.sce | clear; clc; close;
Vcc = 9;
Vbe = 0.7;
Vt = 26*(10^(-3));
Rf = 180*(10^(3));
Rc = 2.7*(10^(3));
Beta = 200;
ro = %inf;
disp("Values at ro=infinity are :-");
Ib = (Vcc-Vbe)/(Rf+(Beta*Rc));
Ie = (Beta+1)*Ib;
re = Vt/Ie;
disp(re,"Value of diode resistive element(re) :");
Zi = re/((1/Beta)+(Rc/Rf));
disp(Zi,"Input Impedance(Zi) :");
Zo = (Rc*Rf)/(Rc+Rf);
disp(Zo,"Output Impedance(Zo) :");
Av = -Rc/re;
disp(Av,"Voltage gain(Av) :");
disp("Values at ro=25kohm are :- ");
ro_2 = 20*(10^(3));
Zi_2 = (1+((Rc*ro_2)/(Rc+ro_2))/Rf)/((1/(Beta*re))+(1/Rf)+(((Rc*ro_2)/(Rc+ro_2))/(Rf*re)));
disp(Zi_2,"Input Impedance(Zi) :");
Zo_2 = (ro_2*Rc*Rf)/(ro_2*Rc+Rc*Rf+Rf*ro_2);
disp(Zo_2,"Output Impedance(Zo) :");
Av_2 = -[1/Rf + 1/re]*[ro_2*Rc/(ro_2+Rc)]/[1+[(ro_2*Rc)/(ro_2+Rc)]/Rf];
disp(Av_2,"Voltage gain(Av) :");
|
1d86a56bcf6ac0ba124881ffb71f82615c878a05 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1553/CH1/EX1.22/1Ex22.sce | 55e6b731a56ad427ba6fd8aab0fb8cebade9082b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 179 | sce | 1Ex22.sce | //chapter 1 Ex 22
clc;
clear;
close;
//let value to be found is x
numerator=658^3-328^3;
denominator=658^2+658*328+328^2;
x=(numerator/denominator);
mprintf("x=%.0f",x);
|
21257f3dbf3ee42b77e1e210798ea866b4d25111 | 449d555969bfd7befe906877abab098c6e63a0e8 | /848/CH13/EX13.1/Example13_1.sce | d932eb5b784f97af063b418b5a7a038d89fd9acd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 806 | sce | Example13_1.sce | //clear//
//Caption: Calculation of power budget for optical link
//Example13.1
//page 464
clear;
clc;
close;
N = [5,10,50]; //number stations
alpha = 0.4;//attenuation in dB/Km
L_tap = 10;// coupling loss in dB
L_thru = 0.9;// coupler throughput in dB
Li = 0.5;//Intrinsic coupler loss in dB
Lc = 1.0; // coupler-to-fiber loss in dB
L = 0.5; //link length in Km
fiber_Loss = alpha*L; //fiber loss in dB
Pbudget = N*(alpha*L+2*Lc+Li+L_thru)-alpha*L-2*L_thru+2*L_tap;
disp(fiber_Loss,'fiber loss in dB for L =500 m')
disp(Pbudget,'power budget in dB for optical link when N = 5,10 and 50 stations respectively =')
//Result
//fiber loss in dB for L =500 m
// 0.2
//power budget in dB for optical link when N = 5,10 and 50 stations respectively =
// 36. 54. 198.
|
c0f7cb72ed5f5f6facf6eaef41d23ee448897c9e | 05d972abeab11d213913aa6124e6a2104d859132 | /src/etc/McpPartialShutdown.tst | 27ebcf024a139a3eceac5d62b996c2400ed0a042 | [] | no_license | LivTel/sdb_puller | 50ac8289d57c4927245ca70c4809cf2b9c807e82 | 9e573ee4d20035f846cb010a02099b9a25dc4e76 | refs/heads/master | 2022-06-24T04:59:10.771334 | 2019-12-18T19:10:47 | 2019-12-18T19:10:47 | 179,494,067 | 0 | 0 | null | 2020-07-01T23:30:44 | 2019-04-04T12:34:54 | C | UTF-8 | Scilab | false | false | 41 | tst | McpPartialShutdown.tst | sysreq, MCP_SYSREQ_REQ_PARTIAL_SHUTDOWN
|
2395c8289908e835f5b83bfc9b98c2ac0e53761e | 449d555969bfd7befe906877abab098c6e63a0e8 | /416/CH10/EX10.10/exp10_10.sce | c155759342265dd9749199b1149e293fef18bcc4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 380 | sce | exp10_10.sce | clear
clc
disp("example 10.10")
b11=0.001
b12=-0.0005
b22=0.0024
q1=0.08
r1=16
q2=0.08
r2=12
lamda=20
p2=0
for x=1:4
p1=(1-(r1/lamda)-(2*p2*b12))/((q1/lamda)+2*b11)
p2=(1-(r2/lamda)-(2*p1*b12))/((q2/lamda)+2*b22)
end
pl=b11*p1^2+2*b12*p1*p2+b22*p2^2
pr=p1+p2-pl
printf("thus \t p1=%2.1fMW,p2=%2.1fMW\n pl=%1.1fMW\npower resevied %2.1fMW",p1,p2,pl,pr)
|
2f81c81dae2f2c5050d607b50b29566ba30b0801 | 71fc0b80f29bd03d097bc45e07b3184189b6445c | /nand2tetris/proj5/CPU-external.tst | 889a928425403f05985c3d462ccde05c0c1656bb | [
"MIT"
] | permissive | ethull/university | 05441b4a74833dd9ae2f904017bfe5140461f4af | 80e00400cf06e5574f4654f51d78544a5d7f66bb | refs/heads/main | 2023-06-08T00:52:03.533293 | 2023-05-25T15:37:21 | 2023-05-25T15:37:21 | 313,761,541 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,907 | tst | CPU-external.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/05/CPU-external.tst
load CPU.hdl,
output-file CPU-external.out,
compare-to CPU-external.cmp,
output-list time%S0.4.0 inM%D0.6.0 instruction%B0.16.0 reset%B2.1.2 outM%D1.6.0 writeM%B3.1.3 addressM%D0.5.0 pc%D0.5.0;
set instruction %B0011000000111001, // @12345
tick, output, tock, output;
set instruction %B1110110000010000, // D=A
tick, output, tock, output;
set instruction %B0101101110100000, // @23456
tick, output, tock, output;
set instruction %B1110000111010000, // D=A-D
tick, output, tock, output;
set instruction %B0000001111101000, // @1000
tick, output, tock, output;
set instruction %B1110001100001000, // M=D
tick, output, tock, output;
set instruction %B0000001111101001, // @1001
tick, output, tock, output;
set instruction %B1110001110011000, // MD=D-1
tick, output, tock, output;
set instruction %B0000001111101000, // @1000
tick, output, tock, output;
set instruction %B1111010011010000, // D=D-M
set inM 111,
tick, output, tock, output;
set instruction %B0000000000001110, // @14
tick, output, tock, output;
set instruction %B1110001100000100, // D;jlt
tick, output, tock, output;
set instruction %B0000001111100111, // @999
tick, output, tock, output;
set instruction %B1110110111100000, // A=A+1
tick, output, tock, output;
set instruction %B1110001100001000, // M=D
tick, output, tock, output;
set instruction %B0000000000010101, // @21
tick, output, tock, output;
set instruction %B1110011111000010, // D+1;jeq
tick, output, tock, output;
set instruction %B0000000000000010, // @2
tick, output, tock, output;
set instruction %B1110000010010000, // D=D+A
tick, output, tock, output;
set instruction %B0000001111101000, // @1000
tick, output, tock, output;
set instruction %B1110111010010000, // D=-1
tick, output, tock, output;
set instruction %B1110001100000001, // D;JGT
tick, output, tock, output;
set instruction %B1110001100000010, // D;JEQ
tick, output, tock, output;
set instruction %B1110001100000011, // D;JGE
tick, output, tock, output;
set instruction %B1110001100000100, // D;JLT
tick, output, tock, output;
set instruction %B1110001100000101, // D;JNE
tick, output, tock, output;
set instruction %B1110001100000110, // D;JLE
tick, output, tock, output;
set instruction %B1110001100000111, // D;JMP
tick, output, tock, output;
set instruction %B1110101010010000, // D=0
tick, output, tock, output;
set instruction %B1110001100000001, // D;JGT
tick, output, tock, output;
set instruction %B1110001100000010, // D;JEQ
tick, output, tock, output;
set instruction %B1110001100000011, // D;JGE
tick, output, tock, output;
set instruction %B1110001100000100, // D;JLT
tick, output, tock, output;
set instruction %B1110001100000101, // D;JNE
tick, output, tock, output;
set instruction %B1110001100000110, // D;JLE
tick, output, tock, output;
set instruction %B1110001100000111, // D;JMP
tick, output, tock, output;
set instruction %B1110111111010000, // D=1
tick, output, tock, output;
set instruction %B1110001100000001, // D;JGT
tick, output, tock, output;
set instruction %B1110001100000010, // D;JEQ
tick, output, tock, output;
set instruction %B1110001100000011, // D;JGE
tick, output, tock, output;
set instruction %B1110001100000100, // D;JLT
tick, output, tock, output;
set instruction %B1110001100000101, // D;JNE
tick, output, tock, output;
set instruction %B1110001100000110, // D;JLE
tick, output, tock, output;
set instruction %B1110001100000111, // D;JMP
tick, output, tock, output;
set reset 1;
tick, output, tock, output;
set instruction %B0111111111111111, // @32767
set reset 0;
tick, output, tock, output;
|
691b47750a2f39f3f89701d1c177e5026254f00c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1034/CH2/EX2.1/example1.sce | 5a258074bd12168cb8f6e72d60e7178a9fceecde | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 143 | sce | example1.sce | clear;
clc;
printf("\n example 2.1");
// printing out values of the array .
a=[31 40 57 46 97 84];
printf("\nvalues are :\n");
disp(a);
|
d4ce4f42785d703fc026bee080e589247df8ad5c | e57a94942a6413ff0dfcba948b19067e502a8b41 | /PSO.sce | 6cbc4e8a62cfb9be94ce870438c035a5d66e0988 | [] | no_license | FrancoChacon/SwarmOptimization | 16197e434670ae94d094f4955318eee1ef92ff02 | 2566ac7038f70fa6cfe9058c1f0a76f75d6989a1 | refs/heads/master | 2020-04-27T22:32:09.337495 | 2019-05-21T03:10:45 | 2019-05-21T03:10:45 | 174,740,439 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,638 | sce | PSO.sce | /*
PSO ALGORITHM
Functions Aviliable:
ReportPSO
PSO
EvaluatePSO
UpdatePSO
*/
function [Report,Table,RProm] = ReportPSO()
Table=[];
tprom=0;
Report=[];
Ixprom=zeros(1,10);
for exper=1:10
tic();[B,Rep,miny]=PSO(100);a=toc();
tprom = tprom + a;
Bprom=Ixprom+B';
Report=[Report; Rep'];
end
tprom = tprom / 10;
//pause,
//Execution time
//Mean and standard deviation
RProm=mean(Report,'r');
Table = [tprom RProm(100) Ixprom];
// clf
// plot(Report');
// plot(RProm','*k');
endfunction
function [B,Rep,miny]=PSO(TC)
miny=100000000;
maxy=-100000000;
MR=zeros(10,2);
MR(:,1)=10//LUB(1);
MR(:,2)=-1//LUB(2);
Rep=[];
//Poblacion inicial
Ti=100; // Total de individuos
P=Create(100,10, MR);
B=P(1,:); //Mejor solución global
PL=P; //Mejor posición local
V=zeros(Ti,10); //Velocidad
FEL=zeros(Ti,1); //Mejor evaluación local
for cycles=1:TC
//Evaluacion
[FE,miny,maxy,B,PL,FEL]=EvaluationPSO(P,miny,maxy,B,PL,FEL);
//Actualizacón de posición
[P,V]=UpdatePSO(P,V);
Rep=[Rep; miny];
disp(miny)
end
endfunction
function [P,V]=UpdatePSO(P,V)
w=0.3;
beta1=0.35;
beta2=0.35;
[Ti, D] = size(P);
PL=zeros(Ti,10); //Velocidad
B=zeros(Ti,1); //Mejor evaluación local
for k=1:Ti
for d=1:D
V(k,d) = V(k,d)*w + beta1*rand()*(PL(k,d)-P(k,d))+beta2*rand()*(B(d)-P(k,d));
P(k,d) = P(k,d) + V(k,d);
end
end
endfunction
function [FE,miny,maxy,B,PL,FEL]=EvaluationPSO(P,miny,maxy,B,PL,FEL)
[TI, D] = size(P);FE=zeros(1,TI);
for k=1:TI
for d=1:D
X(d)=P(k,d);
end
[y, MR] = TestFunction(X,2);
if y>maxy then
maxy=y;
// Ix=X; //best solution found (maximization))
end
if y<miny then
miny=y;
B=X; //best solution found (minimization)
end
//Minimization
FE(k) = 1 - normalization(y,miny,maxy);
if FE(k)>FEL(k) then
disp(FE)
pause()
FEL(k)=FE(k);
for d=1:D
PL(k,d) = X(d);
end
end
end
endfunction
|
e80b6edf06dc4cf02ae6e6b5f760b351636646ac | 449d555969bfd7befe906877abab098c6e63a0e8 | /291/CH7/EX7.2b/eg7_2b.sce | 18bd48ad6d75bf35b51d64cfd0bfcbbe198979c3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 78 | sce | eg7_2b.sce | function result= totalerror(n1, n2, n12)
result = n1*n2/n12;
endfunction |
561ff0826a722af60d3d45a05f65721d9366923e | 449d555969bfd7befe906877abab098c6e63a0e8 | /671/CH2/EX2.19/2_19.sce | d57dd9fccaf1cfb4e460b6e331a0979447b009fc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 145 | sce | 2_19.sce | //convert dependent current source to dependent voltage source
//Mesh Equations
A=[14,-2,0;-2,18,3;2,-2,-1]
O=inv(A)*[100;0;0]
disp(O(3)) |
cd9a602289f3a7b9c39730f00fe65dc1ee85e097 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1055/CH9/EX9.3/ch9_3.sce | bc936363a4e1e06acefed9d61fb0455a76f71892 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 300 | sce | ch9_3.sce | // To determine the maximum safe working voltage
clear
clc;
r=.5;//radius of conductor(cm)
g1max=34;
er=5;
r1=1;
R=7/2;//external dia(cm)
g2max=(r*g1max)/(er*r1);
V=((r*g1max*log(r1/r))+(r1*g2max*log(R/r1)));
V=V/(sqrt(2));
mprintf("Maximum safe working volltage ,V =%.2f kV r.m.s\n",V);
|
55a5c671920d17b1def263ccff6d978673714182 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2495/CH4/EX4.7.4/Ex4_7_4.sce | 58ec167ef5dbe51f717d8345f477b04382678104 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 212 | sce | Ex4_7_4.sce | clear
clc
XA=0.70;
YA=0.35;
P=600;//in torr
PA=(YA*P)/XA;//vapour pressure of pure A
printf('PA=%.1d torr',PA)
PB=((1-YA)*P)/(1-XA);//vapour pressure of pure B
printf('\nPB=%.1f torr',PB)
//page 145
|
044498a800bab36390e183e671c4aa49bfd4d64c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1748/CH2/EX2.55/Exa2_55.sce | 8a10652f4d66281bb06a81819103eba0c3373d94 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 531 | sce | Exa2_55.sce | //Exa 2.55
clc;
clear;
close;
//Given data :
format('v',6);
Output=3;//in H.P.
Output=3*735.5;//in watts
Efficiency=0.83;//unitless
cosfi=0.8;//power factor
Vl=500;//in volt
Input=Output/Efficiency;//in watts
//Formula : Input=sqrt(3)*Vl*Il*cosfi
Il=Input/(sqrt(3)*Vl*cosfi);//in Ampere
ISCbyIFL=3.5;//ratio of SC current to full load current
ISC=ISCbyIFL*Il;//in Ampere
LineCurrent=ISC/3;//in Ampere(for star delta starter)
disp(LineCurrent,"Line Current(in Ampere) :");
//Note : Ans in the book is not accurate. |
3cfdff80a30e29f0957f6ed804442a13c7186df4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3411/CH5/EX5.6/Ex5_6.sce | 9df6c1ac39c9ac8d28edf7da59ce0780a7e1dbb3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex5_6.sce | //Example 5_6
clc();
clear;
//To calculate the interplanar spacing and wavelength
n1=1
theta1=23 //units in degrees
n2=3
theta2=60 //units in degrees
lamda1=97 //units in pm
lamda2=(n2*lamda1*sin(theta1*(%pi/180)))/(sin(theta2*(%pi/180))) //units in pm
d=(n2*lamda1)/(2*sin(theta2*(%pi/180))) //units in pm
printf("Wavelength lamda=%dpm \n Interplanar spacing d=%dpm",lamda2,d)
|
7162c002b751f083a1bb97bd0f42ecd9ac32edcd | 449d555969bfd7befe906877abab098c6e63a0e8 | /1247/CH5/EX5.57/example5_57.sce | d97aa779fce166a647c8aad3818c9981165f0bd1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,233 | sce | example5_57.sce | clear;
clc;
// Stoichiometry
// Chapter 5
// Energy Balances
// Example 5.57
// Page 314
printf("Example 5.57, Page 314 \n \n");
// solution
To = 273.15
T1 = 308.15
H1 = 124.8*(T1-To) // kJ/kmol
H2 = 134.9*(T1-To) // kJ/kmol
HE1 = .1*.9*[542.4+55.4*(.9-.1)-132.8*(.9-.1)^2-168.9*(.9-.1)^3] // kJ/kmol of mix
Ha = HE1+H1*.1+H2*.9
HE2 = .2*.8*[542.4+55.4*(.8-.2)-132.8*(.8-.2)^2-168.9*(.8-.2)^3] // kJ/kmol of mix
Hb = HE2+H1*.2+H2*.8
HE3 = .3*.7*[542.4+55.4*(.7-.3)-132.8*(.7-.3)^2-168.9*(.7-.3)^3] // kJ/kmol of mix
Hc = HE3+H1*.3+H2*.7
HE4 = .4*.6*[542.4+55.4*(.6-.4)-132.8*(.6-.4)^2-168.9*(.6-.4)^3] // kJ/kmol of mix
Hd = HE4+H1*.4+H2*.6
HE5 = .5*.5*[542.4+55.4*(.5-.5)-132.8*(.5-.5)^2-168.9*(.5-.5)^3] // kJ/kmol of mix
He = HE5+H1*.5+H2*.5
HE6 = .6*.4*[542.4+55.4*(.4-.6)-132.8*(.4-.6)^2-168.9*(.4-.6)^3] // kJ/kmol of mix
Hf = HE6+H1*.6+H2*.4
HE7 = .7*.3*[542.4+55.4*(.3-.7)-132.8*(.3-.7)^2-168.9*(.3-.7)^3] // kJ/kmol of mix
Hg = HE7+H1*.7+H2*.3
HE8 = .8*.2*[542.4+55.4*(.2-.8)-132.8*(.2-.8)^2-168.9*(.2-.8)^3] // kJ/kmol of mix
Hh = HE8+H1*.8+H2*.2
HE9 = .9*.1*[542.4+55.4*(.1-.9)-132.8*(.1-.9)^2-168.9*(.1-.9)^3] // kJ/kmol of mix
Hi = HE9+H1*.9+H2*.1
HE10 = .0*1.*[542.4+55.4*(.0-1.)-132.8*(.0-1.)^2-168.9*(.0-1.)^3] // kJ/kmol of mix
Hj = HE10+H1+H2*0
x = linspace(0,1,100)
y = linspace(4300,5000,100)
y = 4721.5-57.4*x+1137.7*x^2-3993.6*x^3+3909.2*x^4-1351.2*x^5
plot(x,y)
title("H vs x1")
xlabel("x1")
ylabel("H (kJ/kg sol.)")
printf(" Enthalpy, kJ/kmol mix \n x1 HE H \n 0 0 "+string(H2)+" \n 0.1 "+string(HE1)+" "+string(Ha)+" \n 0.2 "+string(HE2)+" "+string(Hb)+" \n 0.3 "+string(HE3)+" "+string(Hc)+" \n 0.4 "+string(HE4)+" "+string(Hd)+" \n 0.5 "+string(HE5)+" "+string(He)+" \n 0.6 "+string(HE6)+" "+string(Hf)+" \n 0.7 "+string(HE7)+" "+string(Hg)+" \n 0.8 "+string(HE8)+" "+string(Hh)+" \n 0.9 "+string(HE9)+" "+string(Hi)+" \n 1.0 "+string(HE10)+" "+string(Hj)+"")
|
7982d18eb7624d12824cf8b07d361809c5d32f85 | 8712e7b4614b1ab648f19bcce8ca17e378876546 | /Scilab Com Interface Grafica/Engine/B7_Plota_Dinamic_Deform.sce | 48c4b19f2cfa585ec8939aa8abc752a88fd16270 | [] | no_license | Diogo-Rossi/Mestrado-Diogo-Rossi | d0d476d878c729c44778ea8f364c50c5464fc751 | d544d3bce094931eb96a6031aaa1ae1a833d2b04 | refs/heads/master | 2022-08-26T22:28:04.339221 | 2022-07-11T00:25:21 | 2022-07-11T00:25:21 | 236,889,761 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,959 | sce | B7_Plota_Dinamic_Deform.sce | if nao_calculado
// A deformada é calculada somente no caso em que já não tenha
// sido, pois esse processo (esse loop) é muito demorado
DX = zeros(np,m,N1);
DY = zeros(np,m,N1);
CDX = zeros(np,m,N1);
CDY = zeros(np,m,N1);
d = zeros(6,1);
winH = waitbar(0,"Calculando deformada . . .");
tot = m*N1*np;
for i=1:m
N = MN(Lx(i));
R2 = [c(i) -s(i);
s(i) c(i)];
DxL = Lx(i)/(np-1);
for k=1:N1
for j=1:6
d(j) = DJ(Des(i,j),k);
end
// O vetor 'd' é colocado em coordenadas nos eixos
// locais, usando a equação XXX
d = Rt(:,:,i)*d;
// O campo de deslocamentos em eixos locais é obtido
// usando a equação XXX
fi = N*d;
// A deformada é obtida para np pontos ao longo da barra
xL = 0;
for j=1:np
des = horner(fi,xL);
xL = xL + DxL;
// Mudança de base executada com a equação XXX
des = R2*des;
DX(j,i,k) = des(1);
DY(j,i,k) = des(2);
waitbar((np*N1*(i-1)+np*(k-1)+np)/tot,winH)
end
end
end
close(winH);
end
// Informa que a deformada dinâmica já foi calculada ao menos
// uma vez e delcara o fator de escala da deformada
nao_calculado = 0;
// Delcara o fator de escala da deformada e Tempo que se pretende rolar o filme
resposta = evstr(x_mdialog("Fator de escala e tempo:", ...
["Fator de escala:" "Tempo do Filme (seg):"], ...
["100" "10"]));
[fs,tempo] = (resposta(1),resposta(2));
if ~isempty(fs) then
// Calcula as coordenadas da deformada para todos os instantes
winH = waitbar(0,"Calculando deformada . . .")
for k=1:N1
CDX(:,:,k) = CX + fs*DX(:,:,k);
CDY(:,:,k) = CY + fs*DY(:,:,k);
waitbar(k/N1,winH)
end
close(winH);
BoundX = eixoEstr.data_bounds(2)
BoundY = eixoEstr.data_bounds(4)
delete(Deformada(1).parent)
plot(eixoEstr,CDX(:,:,1),CDY(:,:,1),'r');
Deformada = gce().children
eixoEstr.data_bounds = [0 BoundX 0 BoundY]
for i=1:3
Axes(i).tight_limits(2) = "on"
plot(Axes(i),[0;0],Axes(i).data_bounds(3:4))
TimeBar(i) = gce().children
end
for k=1:N1
for i=1:m
Deformada(i).data = [CDX(:,i,k),CDY(:,i,k)];
end
for i=1:3
TimeBar(i).data(:,1) = [t(k);t(k)]
end
sleep(tempo/N1,"s");
end
delete(TimeBar)
end
|
5938d23289944ff4a77bdd96cd81741c2eb0984a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1703/CH11/EX11.13/11_13.sce | 353a1d8af2a75850e824174b6f910875f97bf200 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 728 | sce | 11_13.sce | clear
clc
//initialisation of variables
b= 6 //in
s= 12 //in
d= 4 //in
a1= 30 //degrees
a2= 90 //degrees
a3= 120 //degrees
N= 120 //r.p.m
n= 4
//calculations
A= 2*%pi*N/60
V= %pi*(b/12)^2*n/4
v= (b/12)^2*A*(b/12)/(d/12)^2
Q1= v*%pi*(d/12)^2*sind(a1)/4
Q2= v*%pi*(d/12)^2*sind(a2)/4
Q3= v*%pi*(d/12)^2*sind(a3)/4
Q4= V-Q1
Q5= Q2-V
Q6= Q3-V
a4= asind(V/(v*%pi*(d/12)^2))+a1
A= 180-a4-a1
//RESULTS
printf ('rate of flow at a1 = %.3f cuses',Q4)
printf ('\n rate of flow at a2 = %.3f cuses',Q5)
printf ('\n rate of flow at a3 = %.3f cuses',Q6)
printf ('\n crak angle = %.1f degrees',a4)
printf ('\n crak angle = %.1f degrees',A)
//The answer is a bit different due to rounding off error in textbook
|
4adabd2b85e8d8eee4649bcd860d1d4f8587803d | 449d555969bfd7befe906877abab098c6e63a0e8 | /1703/CH6/EX6.15/6_15.sce | 8b579cb2be6aadc2f9bbaad3346f85cc85d92f24 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 243 | sce | 6_15.sce |
clc
//initialisation of variables
B= 3 //ft
Cd= 0.6
g= 32.2 //ft/sec^2
d1= 6 //in
d2= 4 //in
//CALCULATIONS
Q2= 0.428 //cuses
r= sqrt((((d1/12)^5)/((d2/12)^5)))
Q1= r*Q2
Q= Q1+Q2
//RESULTS
printf ('Total inflow = %.3f cuses',Q)
|
ead65cdec3029be8e0a845a4709d6d5cbaabf33e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3866/CH6/EX6.10/Ex6_10.sce | 43ad70fc2ef1a315b7bd0d460dfbdf983cfd7fd5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 540 | sce | Ex6_10.sce | clc; clear; close;
Cload=200;//in fF
Cin=2;//in fF
Tnand=4;
Tnor=5;
Tinv=3;
Fanout_d=(Tnand*Tnor*Tinv*Cload/Cin)^(1/3);
Cj2=Tnor*Cload/Fanout_d;disp(Cj2,'Cj+2 (in fermifarad)=');
Cj1=Tinv*Cj2/Fanout_d;disp(Cj1,'Cj+1 (in fermifarad)=');
Cin1=Tnand*Cj1/Fanout_d;disp(Cin1,'Cin(in fermifarad)=');
mprintf('\nfor nand gate:Cin=%ffF , so Wp=Wn=0.5um\n',Cin1);
mprintf('\nfor inverter:Cin=%ffF , so Wp=3um & Wn=1.5um\n',Cj1);
mprintf('\nfor nor gate:Cin=%ffF , so Wp=22um & Wn=5.5um\n',Cj2);
//answers vary due to round off error
|
0a57a4fbf3acb330d7b39f95965c99bb9d68e553 | 978b15852ad0d9219e0cd69e9da3a9140b84aa97 | /TPs_CN/exo6.sce | c93716cbe525168eeb30d641deb4799c2b5f3859 | [] | no_license | nadine867/TP_CN | cd2acc700471c7f595ada5f2b799b43ca44590ce | fcf09074e27723ca3e9b1eec870386c848b190f9 | refs/heads/master | 2023-02-03T04:07:38.525606 | 2020-12-18T20:23:55 | 2020-12-18T20:23:55 | 316,060,516 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 324 | sce | exo6.sce | function [L,U] = mylu2b(A)
n=size(A,1)
for k = 1 : n-1
for i = k + 1 : n
A(i,k) = A(i, k)/A(k, k);
end
for i = k + 1 : n
for j = k + 1 : n
A(i,j)= A(i,j)- A(i,k)*A(k,j);
end
end
end
// expression de U
U=triu(A);
// expression de L
L=tril(A)
endfunction
|
a6a8b3d06a54b55cacb0aa10c79178bf274c2bdf | d5849d01c14501b85e52f8c218fcd6fa3c806ea8 | /Aufgabe01/MachLearn_Ueb01_1_2.sce | 79b89a5725e424e92b16b2ca7a0a5d7c84b4ff4a | [] | no_license | drb8w/MachineLearning2014 | 12eddfb5c13d3eeec5ccadd884e34e5dbbe39fd7 | 0fcaf43ede3bc0308359cd703e2cffa6f61db7fb | refs/heads/master | 2021-01-01T06:45:21.806666 | 2014-11-26T20:17:35 | 2014-11-26T20:17:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,616 | sce | MachLearn_Ueb01_1_2.sce |
// Lineare Regression
// TODO: clear all stuff before starting
clc;
clear;
//close all;
function [x,y]=generateXY(x_start,x_end,x_interval,G)
x = x_start:x_interval:x_end;
y = 2.*x.^2-G.*x+1;
endfunction
function [x_t,t] = generateTrainingsSet(x,y,G,my,Sigma)
// Y=grand(m,n,'nor',Av,Sd) generates random variates from the normal distribution with mean Av (real) and standard deviation Sd (real >= 0)
x_t = x(1:6:$);
[m,n] = size(x_t);
noise = grand(m,n,'nor',my, Sigma);
y_t = 2*x_t.^2-G*x_t+1;
t = y_t + noise;
endfunction
function plotData(x,y,x_t,t,y_star, y_star_II)
clf;
//set(gca(),"auto_clear","off");
plot(x,y,'ro-',x_t,t,'bo-',x,y_star,'go-',x,y_star_II,'co-');
//set(gca(),"auto_clear","on");
endfunction
plotColors = ['r','g','b','c','m','y'];
function plotDataY(x,Y)
[m,n] = size(Y);
[i,j] = size(plotColors);
clf;
set(gca(),"auto_clear","off");
for index=1:m
plotArg = strcat([plotColors(modulo(index-1,j)+1),'-']);
//plot(x,Y(index,:),'ro-');
plot(x,Y(index,:),plotArg);
end
set(gca(),"auto_clear","on");
endfunction
//function A = createA(x)
// // A = ([x x x].^[0 1 2])';
// x_1 = x.^0;
// x_2 = x.^1;
// x_3 = x.^2;
// A = [x_1;x_2;x_3];
//endfunction
function A = createA(x,d)
// d ... dimension of polynom
[m,n] = size(x);
A = zeros(d,n);
// transform x into a polynom of degree d
for index=1:d+1
A(index,:) = x.^(index-1);
end
endfunction
function w_star = compute_w_star(A,y,lamda)
// create pseudo inverse and compute Aw=b
// see UNDERSTANDING MACHINE LEARNING, page 94ff
AAT = A*A';
b = A*y;
succ = 0;
A_plus = [];
while ~succ
try
A_plus = inv(AAT);
succ = 1;
catch
// check if above is not invertible
[m,n] = size(AAT);
AAT = lamda*eye(m,n) + AAT;
end
end
w_star = A_plus*b;
endfunction
//function y = createPolynomValues(x,w)
// [m,n]=size(x);
// I=ones(m,n);
// y = w(1).*I+w(2).*x+w(3).*x.*x;
//endfunction
function y = createPolynomValues(x,w)
[m,n]=size(x);
I=ones(m,n);
y = w(1).*I;
[m2,n2] = size(w);
pol_degree = m2 - 1;
for index=1:pol_degree
y = y+w(index+1).*x.^index;
end
endfunction
function Y = createPolynomValuesW(x,W)
[m,n] = size(W);
[i,j] = size(x);
Y = zeros(n,j);
for index=1:n
Y(index,:) = createPolynomValues(x,W(:,index));
end
endfunction
function W_star = trans_x_comp_w_star(x, y, lamba, dimension_start, dimension_end)
// w_star is a column vector
// W_star is a list of column vectors
A_i = createA(x,dimension_start);
W_star = compute_w_star(A_i,y,lamda);
for dimension_i=dimension_start+1:dimension_end
A_i = createA(x,dimension_i);
// add zero line at the bottom
[m,n] = size(W_star)
W_star = cat(1,W_star,zeros(1,n))
W_star = cat(2,W_star,compute_w_star(A_i,y,lamda))
end
endfunction
function w_n = onlineLMS(A,y,my, e_threshold)
// implement online learn from formula
// see http://de.wikipedia.org/wiki/LMS-Algorithmus
//e(n) = y(n) - x(n)'*w(n);
//w(n+1) = w(n) + my* e(n) * x(n);
[m,n] = size(A);
w_n = ones(m,1);
cont = 1;
while cont
cont = 0;
for n_index=1:n
x_n = A(:,n_index);
y_n = y(n_index);
e_n = y_n - x_n'*w_n; // e_n ... error of equation n
if e_n > e_threshold
cont = 1;
end
w_n = w_n + my*e_n*x_n;
end
end
endfunction
x_start = 0;
x_end = 5;
x_interval = 0.1;
G = 10;
[x,y]=generateXY(x_start,x_end,x_interval,G);
my = 0;
Sigma = 0.7;
[x_t,t]=generateTrainingsSet(x,y,G,my,Sigma);
y_t = t';
lamda = 0.0001;
////A_3 = createA(x_t,3);
////w_star_3 = compute_w_star(A_3,y_t,lamda);
////y_star_3 = createPolynomValues(x,w_star_3);
//
////A_4 = createA(x_t,4);
////w_star_4 = compute_w_star(A_4,y_t,lamda);
////y_star_4 = createPolynomValues(x,w_star_4);
//
////plotData(x,y,x_t,t,y_star_3,y_star_4);
//
dimension_start = 3;
dimension_end = 9;
W_star = trans_x_comp_w_star(x_t,y_t,lamda,dimension_start, dimension_end);
Y = createPolynomValuesW(x,W_star);
plotDataY(x,Y);
threshold = 0.01;
my = 0.05;
A_3 = createA(x_t,3);
w_online_3 = onlineLMS(A_3, y_t ,my, threshold);
|
c7523bc0e4b42fc10375d0a65b7eacfeec9174dd | 449d555969bfd7befe906877abab098c6e63a0e8 | /1709/CH5/EX5.1/5_1.sce | b8a8954319de2381fb5e3a79f363701215b11ec1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 226 | sce | 5_1.sce | clc
//Initialization of variables
N1=1
N2=1
N3=3
N4=1
//calculations
N=N1+N2+N3+N4
sig=factorial(N) /(factorial(N1) *factorial(N2)*factorial(N3)*factorial(N4))
//results
printf("No. of ways of arranging = %d ",sig)
|
8ed965a1c99e5614a223539db265631c09f52573 | 449d555969bfd7befe906877abab098c6e63a0e8 | /167/CH5/EX5.3/ex3.sce | 10e2794aea48d688de7ed7199b53b1a0d1c29b24 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,238 | sce | ex3.sce | //example 3
//energy transport by mass
clear
clc
vf=0.001053 //specific volume of saturated liquid water in m3/kg
vg=1.1594 //specific volume of water vapour in m3/kg
ug=2519.2 //specific internal energy of water vapour kJ/kg
hg=2693.1 //specific enthalpy of water vapour kJ/kg
disp('Saturation conditions exist in a pressure cooker at all times after the steady operating conditions are established')
disp(' Therefore, the liquid has the properties of saturated liquid and the exiting steam has the properties of saturated vapor at the operating pressure.')
m=0.6/(vf*1000) //reduction in mass of liquid in pressure cooker in kg
M=m/(40*60) //mass flow rate of steam in kg/s
A=8*10^-6 //exit area in m^2
V=M*vg/A //exit velocity in m/s
e=hg-ug //flow energy of steam in kJ/kg
TE=hg //total nergy of steam in kJ/kg
E=M*hg //energy flow rate of steam leaving cooker in kW
printf("\n Hence,The mass flow rate of the steam is = %.6f kg/s. \n",M);
printf("\n The exit velocity is = %.1f m/s. \n",V);
printf("\n The total energy of the steam is = %.1f kJ/kf. \n",TE);
printf("\n The flow energy of the steam is = %.1f kJ/kg. \n",e);
printf("\n The rate at which energy leaves the cooker by steam is = %.3f kW. \n",E); |
e277bd93c8bee3f3b9cc732ab93047d72ef2c19f | b29e9715ab76b6f89609c32edd36f81a0dcf6a39 | /ketpicscifiles6/Assignrep.sci | 0a362b012133b885f38c217badf1cf75679be9ae | [] | 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 | 429 | sci | Assignrep.sci | // 09.10.17
// 09.12.05
// 09.12.29
// 14.09.30 addition supported
function Assignrep(varargin)
global ASSIGNLIST;
Nargs=length(varargin);
for I=1:2:Nargs
Vname=varargin(I);
Val=varargin(I+1);
Tmp=Assign('?'+Vname);
if Tmp=='Not found'
Tmp=length(ASSIGNLIST);
ASSIGNLIST(Tmp+1)=Vname;
ASSIGNLIST(Tmp+2)=Val;
else
I=Tmp(1);
ASSIGNLIST(I+1)=Val;
end;
end
endfunction; |
ce61a2df2abb788387a943aa23bfa742eb8c8bc2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3281/CH4/EX4.20/ex4_20.sce | b7c86994bc3a3a6518fe5ef090cc777dd85c86a2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 455 | sce | ex4_20.sce | //Page Number: 238
//Example 4.20
clc;
//Given
vswr=2;
D1=8; //mW
D2=2; //mW
//Reflection coefficient at arm 4
T=(vswr-1)/(vswr+1);
//Powwe delivered to D1
P=(D1*100)/(1-T^2);
P1=0.99*P;
//Power reflected at D1
W1=(P/100)*T*T;
//Power reflected at load
W2=D2-W1;
Tt=sqrt((W2*100)/(P1));
pt=(1+Tt)/(1-Tt);
disp(pt,'VSWR:');
Pl=P1*(1-(Tt*Tt));
disp('mW',Pl,'Power delivered:');
//Answer for P1 should be 792 but it is given as 800
|
739e73d3991e719bb591d932e96286e052bcaf62 | 931df7de6dffa2b03ac9771d79e06d88c24ab4ff | /Paladins Androxys Dash Practice.sce | 5b74d2079448dca6767e257dfeb915a3b1aa4396 | [] | 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 | 29,182 | sce | Paladins Androxys Dash Practice.sce | Name=Paladins Androxys Dash Practice
PlayerCharacters=Androxys
BotCharacters=Viktor.bot
IsChallenge=true
Timelimit=60.0
PlayerProfile=Androxys
AddedBots=Viktor.bot;Viktor.bot
PlayerMaxLives=0
BotMaxLives=0;0
PlayerTeam=0
BotTeams=0;0
MapName=kovaim1.map
MapScale=1.0
BlockProjectilePredictors=true
BlockCheats=true
InvinciblePlayer=true
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=0.0
ScoreLossPerDamageTaken=0.0
ScoreLossPerDeath=0.0
ScoreLossPerMidairDirected=0.0
ScoreLossPerAnyDirected=0.0
ScoreMultAccuracy=false
ScoreMultDamageEfficiency=false
ScoreMultKillEfficiency=false
GameTag=Fortnite
WeaponHeroTag=pump, shotgun, training, real, train, jump
DifficultyTag=3
AuthorsTag=LeCeuv
BlockHitMarkers=false
BlockHitSounds=false
BlockMissSounds=true
BlockFCT=false
Description=Shotgun jumping training
GameVersion=1.0.7.2
ScorePerDistance=0.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=Viktor
DodgeProfileNames=Long Strafes Jumping
DodgeProfileWeights=1.0
DodgeProfileMaxChangeTime=5.0
DodgeProfileMinChangeTime=1.0
WeaponProfileWeights=1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0
AimingProfileNames=Default;Default;Default;Default;Default;Default;Default;Default
WeaponSwitchTime=3.0
UseWeapons=false
CharacterProfile=Viktor Profile
SeeThroughWalls=false
NoDodging=false
NoAiming=false
[Character Profile]
Name=Androxys
MaxHealth=2100.0
WeaponProfileNames=Revolver;;;;;;;
MinRespawnDelay=1.0
MaxRespawnDelay=5.0
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=1.0
CameraOffset=X=0.000 Y=0.000 Z=0.000
HeadshotOnly=false
DamageKnockbackFactor=8.0
MovementType=Base
MaxSpeed=600.0
MaxCrouchSpeed=500.0
Acceleration=16000.0
AirAcceleration=16000.0
Friction=8.0
BrakingFrictionFactor=2.0
JumpVelocity=800.0
Gravity=3.0
AirControl=0.25
CanCrouch=false
CanPogoJump=false
CanCrouchInAir=false
CanJumpFromCrouch=false
EnemyBodyColor=X=255.000 Y=0.000 Z=0.000
EnemyHeadColor=X=255.000 Y=255.000 Z=255.000
TeamBodyColor=X=0.000 Y=0.000 Z=255.000
TeamHeadColor=X=255.000 Y=255.000 Z=255.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=800.0
MainBBType=Cylindrical
MainBBHeight=90.0
MainBBRadius=32.0
MainBBHasHead=true
MainBBHeadRadius=45.0
MainBBHeadOffset=0.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=230.0
ProjBBRadius=55.0
ProjBBHasHead=true
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=Dash.abilmov;Float.abilmov;Nether Punch.abilmelee;Ultimate.abilwep
HideWeapon=false
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.25
ThirdPersonCamera=false
TPSArmLength=300.0
TPSOffset=X=0.000 Y=150.000 Z=150.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
[Character Profile]
Name=Viktor Profile
MaxHealth=2100.0
WeaponProfileNames=;;;;;;;
MinRespawnDelay=1.0
MaxRespawnDelay=1.0
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=1.0
CameraOffset=X=0.000 Y=0.000 Z=0.000
HeadshotOnly=false
DamageKnockbackFactor=8.0
MovementType=Base
MaxSpeed=600.0
MaxCrouchSpeed=500.0
Acceleration=16000.0
AirAcceleration=16000.0
Friction=8.0
BrakingFrictionFactor=2.0
JumpVelocity=800.0
Gravity=3.0
AirControl=0.25
CanCrouch=false
CanPogoJump=false
CanCrouchInAir=false
CanJumpFromCrouch=false
EnemyBodyColor=X=255.000 Y=0.000 Z=0.000
EnemyHeadColor=X=255.000 Y=255.000 Z=255.000
TeamBodyColor=X=0.000 Y=0.000 Z=255.000
TeamHeadColor=X=255.000 Y=255.000 Z=255.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=800.0
MainBBType=Cylindrical
MainBBHeight=130.0
MainBBRadius=32.0
MainBBHasHead=true
MainBBHeadRadius=45.0
MainBBHeadOffset=0.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=230.0
ProjBBRadius=55.0
ProjBBHasHead=true
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=false
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.25
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 Strafes Jumping
MaxTargetDistance=2500.0
MinTargetDistance=750.0
ToggleLeftRight=true
ToggleForwardBack=false
MinLRTimeChange=0.5
MaxLRTimeChange=1.5
MinFBTimeChange=0.2
MaxFBTimeChange=0.5
DamageReactionChangesDirection=false
DamageReactionChanceToIgnore=0.5
DamageReactionMinimumDelay=0.125
DamageReactionMaximumDelay=0.25
DamageReactionCooldown=1.0
DamageReactionThreshold=0.0
DamageReactionResetTimer=0.1
JumpFrequency=0.65
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.5
BlockedMovementReactionMin=0.125
BlockedMovementReactionMax=0.2
[Weapon Profile]
Name=Revolver
Type=Hitscan
ShotsPerClick=1
DamagePerShot=520.0
KnockbackFactor=4.0
TimeBetweenShots=0.85
Pierces=false
Category=SemiAuto
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=2.67
MagazineMax=9
AmmoPerShot=1
ReloadTimeFromEmpty=0.5
ReloadTimeFromPartial=0.5
DamageFalloffStartDistance=450.0
DamageFalloffStopDistance=100000.0
DamageAtMaxRange=495.0
DelayBeforeShot=0.0
HitscanVisualEffect=None
ProjectileGraphic=Ball
VisualLifetime=0.1
WallParticleEffect=None
HitParticleEffect=Gunshot
BounceOffWorld=false
BounceFactor=0.5
BounceCount=0
HomingProjectileAcceleration=0.0
ProjectileEnemyHitRadius=1.0
CanAimDownSight=false
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=-50.000
ADSBlocksShooting=false
ShootingBlocksADS=false
KnockbackFactorAir=4.0
RecoilNegatable=false
DecalType=1
DecalSize=30.0
DelayAfterShooting=0.0
BeamTracksCrosshair=false
AlsoShoot=
ADSShoot=
StunDuration=0.0
CircularSpread=true
SpreadStationaryVelocity=300.0
PassiveCharging=false
BurstFullyAuto=true
FlatKnockbackHorizontal=0.0
FlatKnockbackVertical=0.0
HitscanRadius=0.0
HitscanVisualRadius=6.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=false
AimPunchAmount=0.0
AimPunchResetTime=0.2
AimPunchCooldown=0.5
AimPunchHeadshotOnly=false
AimPunchCosmeticOnly=false
MinimumDecelVelocity=0.0
PSRManualNegation=false
PSRAutoReset=true
AimPunchUpTime=0.05
AmmoReloadedOnKill=0
CancelReloadOnKill=false
FlatKnockbackHorizontalMin=0.0
FlatKnockbackVerticalMin=0.0
ADSScope=No Scope
ADSFOVOverride=100.0
ADSFOVScale=Clamped Horizontal
ADSAllowUserOverrideFOV=false
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=100.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,5.0
SpreadSCA=1.0,1.0,-1.0,5.0
SpreadMSA=1.0,1.0,-1.0,5.0
SpreadMCA=1.0,1.0,-1.0,5.0
SpreadSSH=0.0,0.1,0.0,0.0
SpreadSCH=1.0,1.0,-1.0,5.0
SpreadMSH=0.0,0.1,0.0,0.0
SpreadMCH=1.0,1.0,-1.0,5.0
MaxRecoilUp=1.0
MinRecoilUp=0.2
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.175
PSRResetDegreesPerSec=40.0
UsePerBulletSpread=false
[Weapon Profile]
Name=Ultimate Weapon Andro
Type=Projectile
ShotsPerClick=1
DamagePerShot=4000.0
KnockbackFactor=0.0
TimeBetweenShots=0.5
Pierces=true
Category=SemiAuto
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=false
HeadshotMultiplier=2.0
MagazineMax=4
AmmoPerShot=1
ReloadTimeFromEmpty=0.5
ReloadTimeFromPartial=0.5
DamageFalloffStartDistance=100000.0
DamageFalloffStopDistance=100000.0
DamageAtMaxRange=25.0
DelayBeforeShot=0.0
HitscanVisualEffect=Tracer
ProjectileGraphic=Ball
VisualLifetime=0.1
WallParticleEffect=None
HitParticleEffect=None
BounceOffWorld=false
BounceFactor=0.5
BounceCount=0
HomingProjectileAcceleration=0.0
ProjectileEnemyHitRadius=1.0
CanAimDownSight=false
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=-50.000
ADSBlocksShooting=false
ShootingBlocksADS=false
KnockbackFactorAir=0.0
RecoilNegatable=false
DecalType=0
DecalSize=30.0
DelayAfterShooting=0.0
BeamTracksCrosshair=false
AlsoShoot=
ADSShoot=
StunDuration=0.0
CircularSpread=true
SpreadStationaryVelocity=300.0
PassiveCharging=false
BurstFullyAuto=true
FlatKnockbackHorizontal=0.0
FlatKnockbackVertical=0.0
HitscanRadius=0.0
HitscanVisualRadius=6.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=false
AimPunchAmount=0.0
AimPunchResetTime=0.2
AimPunchCooldown=0.5
AimPunchHeadshotOnly=false
AimPunchCosmeticOnly=false
MinimumDecelVelocity=0.0
PSRManualNegation=false
PSRAutoReset=true
AimPunchUpTime=0.05
AmmoReloadedOnKill=1
CancelReloadOnKill=false
FlatKnockbackHorizontalMin=0.0
FlatKnockbackVerticalMin=0.0
ADSScope=No Scope
ADSFOVOverride=103.0
ADSFOVScale=Clamped Horizontal
ADSAllowUserOverrideFOV=false
IsBurstWeapon=false
ForceFirstPersonInADS=true
ZoomBlockedInAir=false
ADSCameraOffsetX=0.0
ADSCameraOffsetY=0.0
ADSCameraOffsetZ=0.0
QuickSwitchTime=0.1
Explosive=true
Radius=1000.0
DamageAtCenter=4000.0
DamageAtEdge=880.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,5.0
SpreadSCA=1.0,1.0,-1.0,5.0
SpreadMSA=1.0,1.0,-1.0,5.0
SpreadMCA=1.0,1.0,-1.0,5.0
SpreadSSH=1.0,1.0,-1.0,5.0
SpreadSCH=1.0,1.0,-1.0,5.0
SpreadMSH=1.0,1.0,-1.0,5.0
SpreadMCH=1.0,1.0,-1.0,5.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.175
PSRResetDegreesPerSec=40.0
UsePerBulletSpread=false
PBS0=0.0,0.0
[Movement Ability Profile]
Name=Dash
MaxCharges=3.0
ChargeTimer=2.95
ChargesRefundedOnKill=1.0
DelayAfterUse=0.25
FullyAuto=false
AbilityDuration=0.25
LockDirectionForDuration=true
NegateGravityForDuration=true
MainVelocity=2000.0
MainVelocityCanGoVertical=true
MainVelocitySetToMovementKeys=false
UpVelocity=0.0
EndVelocityFactor=0.2
Hurtbox=true
HurtboxRadius=300.0
HurtboxDamage=50.0
HurtboxGroundKnockbackFactor=1.0
HurtboxAirKnockbackFactor=1.0
AbilityBlocksTurning=true
AbilityBlocksMovement=true
AbilityBlocksAttack=true
AttackCancelsAbility=false
AbilityReloadsWeapon=false
HealthRestore=0.0
AIUseInCombat=true
AIUseOutOfCombat=false
AIUseOnGround=true
AIUseInAir=true
AIReuseTimer=0.2
AIMinSelfHealth=0.0
AIMaxSelfHealth=100.0
AIMinTargHealth=0.0
AIMaxTargHealth=25.0
AIMinTargDist=0.0
AIMaxTargDist=1750.0
AIMaxTargFOV=15.0
AIDamageReaction=true
AIDamageReactionIgnoreChance=0.75
AIDamageReactionMinDelay=0.125
AIDamageReactionMaxDelay=0.25
AIDamageReactionCooldown=1.0
AIDamageReactionThreshold=75.0
AIDamageReactionResetTimer=1.0
[Movement Ability Profile]
Name=Float
MaxCharges=1.0
ChargeTimer=4.0
ChargesRefundedOnKill=0.0
DelayAfterUse=0.25
FullyAuto=true
AbilityDuration=3.0
LockDirectionForDuration=true
NegateGravityForDuration=true
MainVelocity=200.0
MainVelocityCanGoVertical=true
MainVelocitySetToMovementKeys=true
UpVelocity=150.0
EndVelocityFactor=1.0
Hurtbox=true
HurtboxRadius=50.0
HurtboxDamage=0.1
HurtboxGroundKnockbackFactor=0.0
HurtboxAirKnockbackFactor=1.0
AbilityBlocksTurning=false
AbilityBlocksMovement=false
AbilityBlocksAttack=false
AttackCancelsAbility=false
AbilityReloadsWeapon=false
HealthRestore=0.0
AIUseInCombat=true
AIUseOutOfCombat=false
AIUseOnGround=false
AIUseInAir=true
AIReuseTimer=1.0
AIMinSelfHealth=0.0
AIMaxSelfHealth=100.0
AIMinTargHealth=0.0
AIMaxTargHealth=100.0
AIMinTargDist=0.0
AIMaxTargDist=2000.0
AIMaxTargFOV=15.0
AIDamageReaction=true
AIDamageReactionIgnoreChance=0.0
AIDamageReactionMinDelay=0.125
AIDamageReactionMaxDelay=0.25
AIDamageReactionCooldown=1.0
AIDamageReactionThreshold=0.0
AIDamageReactionResetTimer=0.1
[Weapon Ability Profile]
Name=Ultimate
MaxCharges=1.0
ChargeTimer=60.0
ChargesRefundedOnKill=0.0
DelayAfterUse=0.0
FullyAuto=false
WeaponProfile=Ultimate Weapon Andro
BlockAttackTimer=0.0
AbilityBlockedWhenAttacking=false
AmmoPerShot=0
AIUseInCombat=true
AIUseOutOfCombat=false
AIUseOnGround=true
AIUseInAir=true
AIReuseTimer=1.0
AIMinSelfHealth=0.0
AIMaxSelfHealth=100.0
AIMinTargHealth=0.0
AIMaxTargHealth=100.0
AIMinTargDist=0.0
AIMaxTargDist=2000.0
AIMaxTargFOV=15.0
AIDamageReaction=true
AIDamageReactionIgnoreChance=0.0
AIDamageReactionMinDelay=0.125
AIDamageReactionMaxDelay=0.25
AIDamageReactionCooldown=1.0
AIDamageReactionThreshold=0.0
AIDamageReactionResetTimer=0.1
[Melee Ability Profile]
Name=Nether Punch
MaxCharges=1.0
ChargeTimer=1.1
ChargesRefundedOnKill=0.0
DelayAfterUse=0.0
FullyAuto=false
AbilityDuration=0.15
HurtboxRadius=250.0
HurtboxDamage=450.0
HurtboxGroundKnockbackFactor=0.0
HurtboxAirKnockbackFactor=0.0
BlockAttackTimer=0.5
AbilityBlockedWhenAttacking=false
AmmoPerShot=0
FlatKnockbackHorizontal=0.0
FlatKnockbackVertical=0.0
FlatKnockbackHorizontalMin=0.0
FlatKnockbackVerticalMin=0.0
AIUseInCombat=true
AIUseOutOfCombat=false
AIUseOnGround=true
AIUseInAir=true
AIReuseTimer=1.0
AIMinSelfHealth=0.0
AIMaxSelfHealth=100.0
AIMinTargHealth=0.0
AIMaxTargHealth=100.0
AIMinTargDist=0.0
AIMaxTargDist=2000.0
AIMaxTargFOV=15.0
AIDamageReaction=true
AIDamageReactionIgnoreChance=0.0
AIDamageReactionMinDelay=0.125
AIDamageReactionMaxDelay=0.25
AIDamageReactionCooldown=1.0
AIDamageReactionThreshold=0.0
AIDamageReactionResetTimer=0.1
[Map Data]
reflex map version 8
global
entity
type WorldSpawn
String32 targetGameOverCamera end
UInt8 playersMin 1
UInt8 playersMax 16
brush
vertices
-576.000000 0.000000 256.000000
448.000000 0.000000 256.000000
448.000000 0.000000 -768.000000
-576.000000 0.000000 -768.000000
-576.000000 -16.000000 256.000000
448.000000 -16.000000 256.000000
448.000000 -16.000000 -768.000000
-576.000000 -16.000000 -768.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
-576.000000 272.000000 -768.000000
448.000000 272.000000 -768.000000
448.000000 272.000000 -784.000000
-576.000000 272.000000 -784.000000
-576.000000 0.000000 -768.000000
448.000000 0.000000 -768.000000
448.000000 0.000000 -784.000000
-576.000000 0.000000 -784.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
-576.000000 272.000000 272.000000
448.000000 272.000000 272.000000
448.000000 272.000000 256.000000
-576.000000 272.000000 256.000000
-576.000000 0.000000 272.000000
448.000000 0.000000 272.000000
448.000000 0.000000 256.000000
-576.000000 0.000000 256.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
448.000000 272.000000 256.000000
464.000000 272.000000 256.000000
464.000000 272.000000 -768.000000
448.000000 272.000000 -768.000000
448.000000 0.000000 256.000000
464.000000 0.000000 256.000000
464.000000 0.000000 -768.000000
448.000000 0.000000 -768.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
-592.000000 272.000000 256.000000
-576.000000 272.000000 256.000000
-576.000000 272.000000 -768.000000
-592.000000 272.000000 -768.000000
-592.000000 0.000000 256.000000
-576.000000 0.000000 256.000000
-576.000000 0.000000 -768.000000
-592.000000 0.000000 -768.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
-592.000000 704.000000 256.000000
-576.000000 704.000000 256.000000
-576.000000 704.000000 -768.000000
-592.000000 704.000000 -768.000000
-592.000000 272.000000 256.000000
-576.000000 272.000000 256.000000
-576.000000 272.000000 -768.000000
-592.000000 272.000000 -768.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
448.000000 704.000000 256.000000
464.000000 704.000000 256.000000
464.000000 704.000000 -768.000000
448.000000 704.000000 -768.000000
448.000000 272.000000 256.000000
464.000000 272.000000 256.000000
464.000000 272.000000 -768.000000
448.000000 272.000000 -768.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
-576.000000 704.000000 -768.000000
448.000000 704.000000 -768.000000
448.000000 704.000000 -784.000000
-576.000000 704.000000 -784.000000
-576.000000 272.000000 -768.000000
448.000000 272.000000 -768.000000
448.000000 272.000000 -784.000000
-576.000000 272.000000 -784.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
-576.000000 704.000000 272.000000
448.000000 704.000000 272.000000
448.000000 704.000000 256.000000
-576.000000 704.000000 256.000000
-576.000000 272.000000 272.000000
448.000000 272.000000 272.000000
448.000000 272.000000 256.000000
-576.000000 272.000000 256.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
-576.000000 720.000000 256.000000
448.000000 720.000000 256.000000
448.000000 720.000000 -768.000000
-576.000000 720.000000 -768.000000
-576.000000 704.000000 256.000000
448.000000 704.000000 256.000000
448.000000 704.000000 -768.000000
-576.000000 704.000000 -768.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
-576.000000 96.000000 -384.000000
-320.000000 96.000000 -384.000000
-320.000000 96.000000 -512.000000
-576.000000 96.000000 -512.000000
-576.000000 0.000000 -384.000000
-320.000000 0.000000 -384.000000
-320.000000 0.000000 -512.000000
-576.000000 0.000000 -512.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
192.000000 96.000000 0.000000
448.000000 96.000000 0.000000
448.000000 96.000000 -128.000000
192.000000 96.000000 -128.000000
192.000000 0.000000 0.000000
448.000000 0.000000 0.000000
448.000000 0.000000 -128.000000
192.000000 0.000000 -128.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
entity
type PlayerSpawn
Vector3 position -64.000000 0.000000 -736.000000
entity
type CameraPath
UInt32 entityIdAttachedTo 5
UInt8 posLerp 2
UInt8 angleLerp 2
entity
type Effect
Vector3 position 0.000000 256.000000 0.000000
String64 effectName internal/misc/reflectionprobe
entity
type Target
Vector3 position 320.000000 256.000000 320.000000
Vector3 angles -135.000000 30.000000 0.000000
String32 name end
entity
type PlayerSpawn
Vector3 position -64.000000 0.000000 224.000000
Vector3 angles 180.000000 0.000000 0.000000
entity
type PlayerSpawn
Vector3 position 416.000000 0.000000 -256.000000
Vector3 angles 270.000000 0.000000 0.000000
entity
type PlayerSpawn
Vector3 position -544.000000 0.000000 -256.000000
Vector3 angles 90.000000 0.000000 0.000000
|
34695f5d74e5b16cece0c9849bfecf9c1c9a0974 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1727/CH10/EX10.2/10_2.sce | a1ed8d1ab02a3cc17316f5f6cb487118e1b5fcb6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 10_2.sce | clc
//Initialization of variables
u=2 //m/s
x=0.15 //m
nu=1.5e-5 //m^2/s
B=0.5 //m
rho=1.22 //kg/m^3
//calcualtions
Rx=u*x/nu
delta= 4.91*x/sqrt(Rx)
deltas=1.729*x/sqrt(Rx)
Cf=1.328/sqrt(Rx)
Ff=Cf*0.5*rho*u^2 *2*B*x
//results
printf("Boundary layer thickness = %.2f cm",delta*100)
printf("\n Displacement thickness = %.2f cm",deltas*100)
printf("\n Average drag coeffcient = %.4f",Cf)
printf("\n Drag force = %.4f N",Ff)
|
e8f062d6029420697474d765f806b315948ac84e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3651/CH5/EX5.5/5.sce | 744c982ac00bda0e3ca0c4a10801d4dafd43520d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 296 | sce | 5.sce | //Variable declaration
El=10**-2*50; //energy loss(J)
H=El*60; //heat produced(J)
d=7.7*10**3; //iron rod(kg/m**3)
s=0.462*10**-3; //specific heat(J/kg K)
//Calculation
theta=H/(d*s); //temperature rise(K)
//Result
printf('temperature rise is %0.3f K \n',(theta)) |
2ad3bf0406d6954c24f73325fe3b210ce9fa8f45 | 449d555969bfd7befe906877abab098c6e63a0e8 | /275/CH2/EX2.2.60/Ch2_2_60.sce | b42c89f07729defe3f5a3a24432a807f28b05c72 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 755 | sce | Ch2_2_60.sce | clc
disp("Example 2.60")
printf("\n")
disp("Design a zener voltage regulator to meet following specification")
printf("Given\n")
printf("1 Resistance are in ohms \n 2 Current are in ampere \n 3 voltage sources are in volt\n")
//DC input voltage(10V[+-]20%)
Vimin=10-2
Vimax=10+2
//DC output voltage
Vo=5
//Load current
ILmax=20*10^-3
ILmin=0
//zener current
Izmax=80*10^-3
Izmin=5*10^-3
//maximum Resistance
Rmax=(Vimin-Vo)/(Izmin+ILmax)
//minimum resistance
Rmin=(Vimax-Vo)/(Izmax+ILmin)
//Required resistance
R=(Rmax+Rmin)/2
//load resistance
RL=Vo/ILmax
printf("minimum resistance %d ohm \n",Rmin)
printf("maximum resistance %d ohm \n",Rmax)
printf("required resistance %d ohm \n",R)
printf("load resistance %d ohm \n",RL)
|
b92267cb6442cd2e70bddaff68ad286a2a12d767 | 449d555969bfd7befe906877abab098c6e63a0e8 | /374/CH3/EX3.4.b/34b.sci | 41816bdcc9074b3c01924a53b93f6ef15a450112 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | sci | 34b.sci | //chapter 3 example 4 b//
clc
clear
//core refractive index=n1,relative refractive index difference=d,operating wavelength=l,critical radius of curvature=Rc,cladding refractive index=n2//
d=0.03;
n1=1.500;
n2=sqrt((n1^2)-(2*d*(n1^2)));
l=0.8*(10^-6);
Rc=((3*(n1^2)*l)/(4*%pi*((n1^2)-(n2^2))^1.5))*(10^6);//critical radius of curvature//
printf("\n critical radius of curvature=%f*(10^-6).\n",Rc); |
9c62764af4b0c3c81e9d84e56f5669b58ab691f5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /608/CH20/EX20.03/20_03.sce | b604c3daab76673cbe9090bea9a0532b5ec465ec | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 561 | sce | 20_03.sce | //Problem 20.03: An ideal transformer has a turns ratio of 8:1 and the primary current is 3 A when it is supplied at 240 V. Calculate the secondary voltage and current.
//initializing the variables:
tr = 8/1; // turns ratio
I1 = 3; // in Amperes
V1 = 240; // in Volts
//calculation:
//A turns ratio of 8:1 means that the transformer has 28 turns on the primary for every 1turns on the secondary
V2 = V1/tr
//secondary current
I2 = I1*tr
printf("\n\n Result \n\n")
printf("\n secondary voltage is %.0f V and secondary current is %.0f A",V2, I2) |
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));
|
fb59dbf35b3573d8ac264c3db2054a5d4360a4f5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /199/CH9/EX9.1/Example_9_1.sce | a883a8e42116cce11862a84ed691a284cf02391a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 769 | sce | Example_9_1.sce | // Chapter9
// Page.No-387
// Example_9_1
// Second order inverting butterworth lowpass filter
// Given
clear;clc;
dc_gain=5;
f1=2*10^3; // Cutoff freq in Hz
Q=10; // Figure of merit
R2=(316*10^3)/10; // Resistance R2
printf("\n Resistance R2 is = %.1f ohm \n",R2) // Result
R3=(100*10^3)/((3.16*Q)-1);
printf("\n Resistance R3 is = %.1f ohm \n",R3) // Result
printf("\n Resistance R1 is Open \n") // Result
R4=(5.03*10^7)/f1;
printf("\n Resistance R4 is = %.1f ohm \n",R4) // Result
R5=R4;
printf("\n Resistance R5 is = %.1f ohm \n",R5) // Result
R6=1.8*10^3; // Assumption
R7=dc_gain*R6;
printf("\n Resistance R7 is = %.1f ohm \n",R7) // Result and its a potentiometer
R8=(R6*R7)/(R6+R7);
printf("\n Resistance R8 is = %.3f ohm \n",R8) // Result |
090136c0d55aa8b48d3d5bf586fe07b33a063272 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3129/CH5/EX5.1/Ex5_1.sce | 5b643fc8e27d19203c0058af7da9c090c7cfdaf0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 709 | sce | Ex5_1.sce | //Finding the Performance of a Dc-Dc converter
//Example 5.1(Page No- 168)
clc
clear
//given data
pi = 3.141592
Vs = 220;//V
k = 0.5;
R = 10;//Ohm
Vch = 2;//V
//part(a)
Va = (k*(Vs-Vch));
printf('(a)\t The average output voltage Va = %d V',Va);
//part(b)
Vo = sqrt(k)*(Vs-Vch);
printf('\n (b)\t the rms output voltage %3.2fV',Vo)
//part(c)
Po = k*(Vs-Vch)^2/R;
Pi = k*Vs*(Vs-Vch)/R;
eta = Po/Pi;
printf('\n (c)\t The converter efficiency %2.2f%%',eta*100)
//part(d)
Ri = R/k;
printf('\n (d)\t The effective input resistance Ri of the converter %d Ohm',Ri)
//part(e)
Vm = ((Vs*2)/pi);
Vrms = Vm/sqrt(2);
printf('\n (e)\t RMS value of fundamental component: %2.2fV',Vrms)
|
abe50198bcc83870ac5fd5f143f30d0084de739b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1754/CH8/EX8.6/Exa8_6.sce | 8d06778d62cb70b146c6fa6f3c1ebb1fd2e8bab7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Exa8_6.sce | //Exa 8.6
clc;
clear;
close;
//Given data :
R1=50;//in kohm
R1=R1*10^3;//in ohm
C1=0.001;//in uF
C1=C1*10^-6;//in F
R2=1;//in kohm
R2=R2*10^3;//in ohm
C2=0.01;//in uF
C2=C2*10^-6;//in F
//Part (i)
//Formula : f=1/(2*%pi*sqrt(C1*C2*R1*R2))
f=1/(2*%pi*sqrt(C1*C2*R1*R2));//in Hz
disp(f/1000,"Frequency of oscillations in kHz : ");
//Part (ii)
CurrentGain=1+C2/C1+R1/R2;//unitless
disp(CurrentGain,"Current Gain : "); |
8b65fb4464338fc8aa15fbe7b7a8bfc37b9f4f0b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH12/EX12.11/Ex12_11.sce | 02b4486e1a91f61e286281b2aa98fdb5bdf829d2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 155 | sce | Ex12_11.sce | clear
//Given
w=1000/60.0
r=0.3
B=0.5 //T
//Calculation
v=w*r
vav=v/2.0
e=B*r*vav
//Result
printf("\n e.m.f induced is %0.3f V",e)
|
0e92dfe366512b957c5119ea74d1089ddfc1646d | 9f9364e082d4bc2f7ee5cbd7a489642615821873 | /src/testCases/ssa_simple.tst | 02385dd28caac95d3e238d0040ce5ef516ad8821 | [] | no_license | abrageddon/DLX-Opt | 4602617f83ddf8cb0fea83fecd2faa362849dfcd | 20038078f11a7ae67e7ab336e551e23966551290 | refs/heads/master | 2021-01-01T05:49:33.218016 | 2013-03-14T06:08:45 | 2013-03-14T06:08:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 138 | tst | ssa_simple.tst | main
function test();
var x;
var y;
var z;
{
let x <- 0;
let y <- 1;
let z <- x + y;
return z
};
{
call test()
}.
|
b54514985f207a99828911ffbfe9f935c5318de5 | 777ac7fa75f240739af167655f7fab95cba80ef6 | /docs/Basics.New/All_in_One.tst | 2c3a7613ad7011e6197d21c4fb5d64a7cc05450c | [] | no_license | Karabur/TML-project | 8d498d8133f4b1ea8e8c3fe6f6f47f7ab5de4b5c | 0bfe006b0e66628427b769bc1be903875e77d5b7 | refs/heads/master | 2021-01-02T09:20:39.055827 | 2013-12-28T22:02:15 | 2013-12-28T22:02:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 980 | tst | All_in_One.tst | Title:
TestName: < Type in smth>;
Difficulty: < Type in >;
FullTime: < Type in a number of seconds for the test >;
Questions: < Type in a number of the question in the test>;
EndTitle.
StartTest:
Question: 1;
Weight: 1.0;
BeginText:
EndText;
Choice: AtX: 8; AtY: 8; Width: 500; Height: 450;
1: endcase;
2: endcase;
3: endcase;
4: endcase;
5: endcase;
Right: 1; Ask;
Question: 2;
Weight: 1.0;
BeginText:
EndText;
MultiChoice: AtX: 8; AtY: 8; Width: 500; Height: 450;
1: endcase;
2: endcase;
3: endcase;
4: endcase;
5: endcase;
Right: 1,3; Ask;
Question: 1;
Weight: 1;
BeginText:
EndText;
Image: AtX: 8; AtY: 8; Width: 500; Height: 180; path : image.bmp; EndImage;
MultiChoice: AtX: 510; AtY: 8; Width: 500; Height: 450;
1: endcase;
2: endcase;
3: endcase;
4: endcase;
5: endcase;
Right: 1,3; Ask;
Question: 1;
Weight: 1;
BeginText:
EndText;
Edit: AtX: 8; AtY: 8; Width: 100; Height: 20;
1: endcase;
2: endcase;
3: endcase;
EndEdit; Ask;
EndTest. |
7c4b496751d75c7f3ba00586f74d9410da8d001e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1553/CH29/EX29.1/29Ex1.sce | 613876a3cc1e6ad15b8933dd8c326759a24f909e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 495 | sce | 29Ex1.sce | //Chapter 29 Ex 1
clc;
clear;
close;
//(a)
facevalue=90;
marketvalue=100;
cost1=7200*(facevalue/marketvalue);
mprintf("Cost of Rs.7200 stock is Rs %d",cost1);
//(b)
marketvalue=100; premium=4;
facevalue=marketvalue+premium;
cost2=4500*(facevalue/marketvalue);
mprintf("\n Cost of Rs.4500 stock is Rs %d",cost2);
//(c)
marketvalue=100; discount=15;
facevalue=marketvalue-discount;
cost3=6400*(facevalue/marketvalue);
mprintf("\n Cost of Rs.6400 stock is Rs %d",cost3);
|
91502ee760117ffeb781a51ed8bb887359d3036b | 449d555969bfd7befe906877abab098c6e63a0e8 | /593/CH1/EX1.1/ex1_1.sce | 41b499280654e6018ba17c5c3e8868278c07db8c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,269 | sce | ex1_1.sce |
clear;
//clc();
// Example 1.1
// Page: 9
printf("Example-1.1 Page no.-9\n\n");
//***Data***//
m_i = 10;//[g]
m_w = 990;//[g]
M_i = 342.3;//[g]
M_w = 18;//[g]
// The mass fraction is
// ( mass fraction of sucrose ) = x_i (by mass) = m_i/(sum of all substances)
x_i = m_i/(m_i+m_w);
x_i = x_i*100;// [in percentage]
// This is also the weight fraction.
// The mole fraction is
// ( mole fraction of sucrose ) = x_j (by mole) = n_i/(sum of number moles of all the substances)
n_i = m_i/M_i;// number of moles of sucrose
n_w = m_w/M_w;// number of moles of water
x_j = n_i/(n_i+n_w);
x_j = x_j*100;// [in percentage]
// The molality, a concentration unit is widely used in equilibrium calculations, is defined as
// m (molality) = (moles of solute)/(kg of solvent)
m = n_i/m_w*1000;//[molal]
// For solutions of solids and liquids (but not gases) ppm almost always means ppm by mass, so
x_ppm = x_i*10^(6)/100;//[ppm]
printf(" sucrose concentration in terms of the mass fraction is %f%%\n",x_i);
printf(" sucrose concentration in terms of the mole fraction is %f%%\n",x_j);
printf(" sucrose concentration in terms of the molality is %f molal\n",m);
printf(" sucrose concentration in terms of the ppm is %f ppm",x_ppm); |
5374e44812184fac637e985d2b39a2fecdaabb8b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3751/CH12/EX12.5/Ex12_5.sce | 93c09f621c9c8984e036c4306e083be33ab0e882 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,901 | sce | Ex12_5.sce | //Fluid Systems - By Shiv Kumar
//Chapter 12- Reciprocating Pumps
//Example 12.5
//To Determine the Pressure Head on Piston at Begining, Middle and End of Suction Stroke.
clc
clear
//Given Data:-
L=150; //Length of Stroke, mm
l_s=7; //Length of Suction Pipe, m
ds_by_D=3/4; //Ratio of Suction Pipe Diameter to Piston Diameter, ds/D
hs=2.5; //Suction Head, m
ds=75; //Diameter of Suction Pipe, mm
N=75; //Crank Speed, rpm
f=0.01; //Co-efficient of Friction
//Data Used:-
g=9.81; //Acceleration due to gravity, m/s^2
h_atm=10.33; //Atmospheric Pressure Head, m of water
//Computations:-
L=L/1000; //m
ds=ds/1000; //m
r=L/2; //Crank radius, m
A_by_as=(1/ds_by_D)^2;
omega=2*%pi*N/60; //Angular Velocity, rad/s
//At Begining of Suction Stroke,
theta=0; //degrees
h_as=(l_s/g)*A_by_as*omega^2*r*cosd(theta); //Acceleration Head, m of water
h_fs=(4*f*l_s/(2*g*ds))*(A_by_as*omega*r*sind(theta))^2; //Head loss due to friction, m of water
h_v=hs+h_fs+h_as; //Pressure Head on Piston, m of water Vaccum
h_abs=h_atm-h_v; //Pressure Head on Piston, m of water Absolute
//Result 1
printf("At Begining of Suction Stroke\n Pressure Head on Piston=%.2f m of water Vaccum \n\t\t\t =%.2f m of water Absolute\n\n",h_v,h_abs) //The answer vary due to round off error
//At Mid of Suction Stroke,
theta=90; //degrees
h_as=(l_s/g)*A_by_as*omega^2*r*cosd(theta); //Acceleration Head, m of water
h_fs=(4*f*l_s/(2*g*ds))*(A_by_as*omega*r*sind(theta))^2; //Head loss due to friction, m of water
h_v=hs+h_fs+h_as; //Pressure Head on Piston, m of water Vaccum
h_abs=h_atm-h_v; //Pressure Head on Piston, m of water Absolute
//Result 2
printf("At Middle of Suction Stroke\n Pressure Head on Piston=%.4f m of water Vaccum \n\t\t\t =%.3f m of water Absolute\n\n",h_v,h_abs) //The answer vary due to round off error
//At End of Suction Stroke,
theta=180; //degrees
h_as=(l_s/g)*A_by_as*omega^2*r*cosd(theta); //Acceleration Head, m of water
h_fs=(4*f*l_s/(2*g*ds))*(A_by_as*omega*r*sind(theta))^2; //Head loss due to friction, m of water
h_v=hs+h_fs+h_as; //Pressure Head on Piston, m of water Vaccum
h_abs=h_atm-h_v; //Pressure Head on Piston, m of water Absolute
//Result 3
printf("At End of Suction Stroke\n Pressure Head on Piston=%.2f m of water Vaccum \n\t\t\t =%.2f m of water Absolute\n\n",h_v,h_abs) //The answer vary due to round off error
|
31db33400c41a1cf7b0850f0413f7f704bf3523f | c0c48c5a363ac2c0bf21e72833d72a99771dc6ce | /Simulation_Codes/lab10_18i190002/ex1a.sce | b71d9d2763accdc771709f68cea335fdedf74c83 | [] | no_license | shubham1166/Operarions_Research_Projects | 3b6664b83d89b2a005b5194489bfd0d95cafe3d8 | 8f28eea93d9e4ff3d6a8e95160c3f9464ce2fc34 | refs/heads/main | 2023-03-14T02:48:42.359247 | 2021-03-03T05:51:28 | 2021-03-03T05:51:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 166 | sce | ex1a.sce | clc,clear
exec('input1.sce',-1)
clf
//Making the histogram plot
histplot(10,S,xlabel('----S---->'),ylabel('--Frequency-->'),title('Histogram of distribution of S'))
|
82f32902a34ad74e1151091418ba4b111abf50b9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2342/CH4/EX4.9/EX4_9.sce | 595cc270b4437dadbd97bce827488b4b9ee356ac | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 272 | sce | EX4_9.sce | // Exa 4.9
format('v',6)
clc;
clear;
close;
// Given data
epsilon = 16/(36 * %pi * 10^11);// in F/cm
A = 1 * 10^-2;
W = 2 * 10^-4;
// The barrier capacitance
C_T = (epsilon * A)/W;// in F
C_T= C_T*10^12;// in pF
disp(C_T,"The barrier capacitance in pF is");
|
cdb55c95306490e4355901328c541d48dff01edb | 449d555969bfd7befe906877abab098c6e63a0e8 | /1691/CH3/EX3.11/e3_11.sce | 0b212bbd582554ca8c403abc46c021d80023deb0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,311 | sce | e3_11.sce | //example3.11
clc
disp("For the npn silicon transistors,")
disp("V_CE(sat)=0.3 V and V_BE(sat)=0.7 V = V_rho")
disp("While V_BE(cut-in)=0.5 V= V_gamma ...Referring Table 3.1")
i=(12-0.3-0.7+0.5)/(2000+200)
format(6)
disp(i,"(I''_B)(in mA)=(V_CC-V_CE(sat)-V_rho-V_gamma)/(R_c+r''_bb)=")
disp("Hence the overshoot in base voltage of Q2 is:")
d=(5.227*200*10^-3)+0.7-0.5
format(7)
disp(d,"delta(in V)=(I''_b*r''_bb)+(V_rho)-(V_gamma)=")
v=12-(5.227*2)
disp(v,"V_C1(in V)=(V_CC)-(I''_B*R_C)=")
disp("These are the values of various voltages just after the circuit returns back to stable state i.e at t=T.")
disp("The width of the output pulse")
t=(0.69*20*10^3)*(1000*10^-12)
format(11)
disp(t,"T(in sec)=(0.69*20*10^-3)*(1000*10^-12)=")
disp("The voltage waveforms at base of Q2, Q1 and collector of Q2, Q1 are shown in the fig 3.87 on previous page.")
disp("The overshoot in V_C1 is (delta'') and is same as (delta) ")
disp("Therefore, (delta'')=1.2454 V")
f=(-(14.7*20*10^3)/(40*10^3))+((12*20*10^3)/(40*10^3))
format(5)
disp(f,"V_F(in V)=((-V_BB*R1)/(R1+R2))+((V_CC*R2)/(R1+R2))= ")
disp("V_C2=V_CE(sat)=0.3 in stable state")
c=(((12*20000)/(40000))+((54.692*2000)/(22000)))
format(7)
disp(c,"V_C2(in V)[in quasi-stable state]=((V_CC*R1)/(R1+R2))+((V_delta*R_C)/(R1+R_C))= ")
|
10f8bfe89a91637915e73c516466c9bd659134dc | ad617742f184bf6d4cceb3e9c99232d8bd52b862 | /tests/bfp-008-cvtfrlog.tst | 01561e6512a0cd44cc95182b67fe06e96b41070d | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"BSD-2-Clause"
] | permissive | 9track/hyperion | d621343e7eea27c45db49c7c284dd1680491c82c | 9ceed2cc7261820eef01c55dac9b9a6ae47636b2 | refs/heads/master | 2022-09-15T12:19:09.059528 | 2020-05-28T03:05:29 | 2020-05-28T03:05:29 | 268,044,749 | 3 | 1 | NOASSERTION | 2020-05-30T09:03:56 | 2020-05-30T09:03:55 | null | UTF-8 | Scilab | false | false | 4,980 | tst | bfp-008-cvtfrlog.tst | *Testcase bfp-008-cvtfrlog.tst: CELFBR, CDLFBR, CXLFBR
#Testcase bfp-008-cvtfrlog.tst: IEEE Convert From Logical
#..Includes CONVERT FROM LOGICAL 32 (3). Also tests traps and exceptions
#..and results from different rounding modes (CELFBR only).
sysclear
archmode esame
#
# Following suppresses logging of program checks. This test program, as part
# of its normal operation, generates 2 program check messages that have no
# value in the validation process. (The messages, not the program checks.)
#
ostailor quiet
loadcore "$(testpath)/bfp-008-cvtfrlog.core"
runtest 1.0
ostailor default # restore messages for subsequent tests
# inputs converted to BFP short - result values
*Compare
r 1000.10
*Want "CELFBR result pairs 1-2" 3F800000 3F800000 40000000 40000000
r 1010.10
*Want "CELFBR result pairs 3-4" 40800000 40800000 4F800000 4F800000
r 1020.10
*Want "CELFBR result pairs 5-6" 4F7FFFFF 4F7FFFFF 4F800000 4F800000
# inputs converted to BFP short - FPCR contents
*Compare
r 1100.10
*Want "CELFBR FPC pairs 1-2" 00000000 F8000000 00000000 F8000000
r 1110.10
*Want "CELFBR FPC pairs 3-4" 00000000 F8000000 00080000 F8000C00
r 1120.10
*Want "CELFBR FPC pairs 5-6" 00000000 F8000000 00080000 F8000C00
# inputs converted to BFP short - rounding mode test results
*Compare
r 1200.10
*Want "CELFBR maxint-32 result FPC modes 1-3, 7" 4F7FFFFF 4F800000 4F7FFFFF 4F7FFFFF
r 1210.10
*Want "CELFBR maxint-32 result M3 modes 1, 3-5" 4F800000 4F7FFFFF 4F800000 4F7FFFFF
r 1220.08
*Want "CELFBR maxint-32 result M3 modes 6, 7" 4F800000 4F7FFFFF
r 1230.10
*Want "CELFBR 0xFFFFFF00 result FPC modes 1-3, 7" 4F7FFFFF 4F7FFFFF 4F7FFFFF 4F7FFFFF
r 1240.10
*Want "CELFBR 0xFFFFFF00 result M3 modes 1, 3-5" 4F7FFFFF 4F7FFFFF 4F7FFFFF 4F7FFFFF
r 1250.08
*Want "CELFBR 0xFFFFFF00 result M3 modes 6, 7" 4F7FFFFF 4F7FFFFF
r 1260.10
*Want "CELFBR 0xFFFFFF40 result FPC modes 1-3, 7" 4F7FFFFF 4F800000 4F7FFFFF 4F7FFFFF
r 1270.10
*Want "CELFBR 0xFFFFFF40 result M3 modes 1, 3-5" 4F800000 4F7FFFFF 4F800000 4F7FFFFF
r 1280.08
*Want "CELFBR 0xFFFFFF40 result M3 modes 6, 7" 4F800000 4F7FFFFF
# inputs converted to BFP short - rounding mode test FPCR contents
*Compare
r 1500.10
*Want "CELFBR maxint-32 FPC modes 1-3, 7 FPCR" 00000001 00000002 00000003 00000007
r 1510.10
*Want "CELFBR maxint-32 M3 modes 1, 3-5 FPCR" 00080000 00080000 00080000 00080000
r 1520.08
*Want "CELFBR maxint-32 M3 modes 5-7" 00080000 00080000
r 1530.10
*Want "CELFBR 0xFFFFFF00 FPC modes 1-3, 7 FPCR" 00000001 00000002 00000003 00000007
r 1540.10
*Want "CELFBR 0xFFFFFF00 M3 modes 1, 3-5 FPCR" 00000000 00000000 00000000 00000000
r 1550.08
*Want "CELFBR 0xFFFFFF00 M3 modes 6-7" 00000000 00000000
r 1560.10
*Want "CELFBR 0xFFFFFF40 FPC modes 1-3, 7 FPCR" 00000001 00000002 00000003 00000007
r 1570.10
*Want "CELFBR 0xFFFFFF40 M3 modes 1, 3-5 FPCR" 00080000 00080000 00080000 00080000
r 1580.08
*Want "CELFBR 0xFFFFFF40 M3 modes 6-7" 00080000 00080000
# inputs converted to BFP long - result values
*Compare
r 2000.10
*Want "CDLFBR result pair 1" 3FF00000 00000000 3FF00000 00000000
r 2010.10
*Want "CDLFBR result pair 2" 40000000 00000000 40000000 00000000
r 2020.10
*Want "CDLFBR result pair 3" 40100000 00000000 40100000 00000000
r 2030.10
*Want "CDLFBR result pair 4" 41EFFFFF FFC00000 41EFFFFF FFC00000
r 2040.10
*Want "CDLFBR result pair 5" 41EFFFFF E0000000 41EFFFFF E0000000
r 2050.10
*Want "CDLFBR result pair 6" 41EFFFFF F0000000 41EFFFFF F0000000
# Inputs converted to BFP long - FPCR contents
*Compare
r 2100.10
*Want "CDLFBR FPC pairs 1-2" 00000000 F8000000 00000000 F8000000
r 2110.10
*Want "CDLFBR FPC pairs 3-4" 00000000 F8000000 00000000 F8000000
r 2120.10
*Want "CDLFBR FPC pairs 5-6" 00000000 F8000000 00000000 F8000000
# Inputs converted to BFP extended - result values
*Compare
r 3000.10
*Want "CXLFBR result 1a" 3FFF0000 00000000 00000000 00000000
r 3010.10
*Want "CXLFBR result 1b" 3FFF0000 00000000 00000000 00000000
r 3020.10
*Want "CXLFBR result 2a" 40000000 00000000 00000000 00000000
r 3030.10
*Want "CXLFBR result 2b" 40000000 00000000 00000000 00000000
r 3040.10
*Want "CXLFBR result 3a" 40010000 00000000 00000000 00000000
r 3050.10
*Want "CXLFBR result 3b" 40010000 00000000 00000000 00000000
r 3060.10
*Want "CXLFBR result 4a" 401EFFFF FFFC0000 00000000 00000000
r 3070.10
*Want "CXLFBR result 4b" 401EFFFF FFFC0000 00000000 00000000
r 3080.10
*Want "CXLFBR result 5a" 401EFFFF FE000000 00000000 00000000
r 3090.10
*Want "CXLFBR result 5b" 401EFFFF FE000000 00000000 00000000
r 30A0.10
*Want "CXLFBR result 6a" 401EFFFF FF000000 00000000 00000000
r 30B0.10
*Want "CXLFBR result 6b" 401EFFFF FF000000 00000000 00000000
# Inputs converted to BFP extended - FPCR contents
*Compare
r 3200.10
*Want "CXLFBR FPC pairs 1-2" 00000000 F8000000 00000000 F8000000
r 3210.10
*Want "CXLFBR FPC pairs 3-4" 00000000 F8000000 00000000 F8000000
r 3220.10
*Want "CXLFBR FPC pairs 5-6" 00000000 F8000000 00000000 F8000000
*Done
|
09d55e7ed1b67711254c882dc37f7eda8802a38b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2741/CH6/EX6.19/Chapter6_Example19.sce | 34708f97249269c47cd85d9e47ec000ec3631d43 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 694 | sce | Chapter6_Example19.sce | clc
clear
//Input data
l=537;//Latent heat of steam in cal/g
V2=1674;//The specific volume of one gram of steam in cm^3
V1=1.000;//The specific volume of one gram of water in cm^3
p=2.712;//The increase in the pressure in cm of Hg
t=100;//The boiling point of water in degree centigrade
//Calculations
T=t+273;//The boiling point of water in K
P=p*13.6*980;//The increase in the pressure in dynes/cm^2
L=l*4.2*10^7;//Latent heat of steam in ergs
T1=(P*T*(V2-V1))/L;//The change in the temperature of the boiling water when the pressure is increased in K
//Output
printf('The change in temperature of boiling water is %3.0f K (or) %3.0f degree centigrade ',T1,T1)
|
bcc651d8755a999a04515fc17c6289d130d60921 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1991/CH9/EX9.5/5.sce | 544a7098bb615c741985f1a6e5b7ba1a5ce14ed0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 307 | sce | 5.sce | clc
clear
//input
e1=350//heat per second
t=7+273 //teperature
sig=5.7*10^-8//stephans constant
//calculation
e2=e1*4//stephans law
E=sig*(t^4-t^4)//stephans law
//output
printf("the rate of emission is %3.3f W",e2)
printf("\nthe rate of emission when outer temperature is increased is %d W",E)
|
0474b1d789ab1dd4ef651ff6a78af5cb73328a79 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH17/EX17.17/Ex17_17.sce | 9bd23df944c7c1f2cadce9481363ab0ab4981397 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 124 | sce | Ex17_17.sce | clear
//Given
u1=1
u2=1.5
R=1
//Calculation
x=(u1+u2)/(u2-u1)
//Result
printf("\n Distance of the object is %0.3f R", x)
|
e0ba864d3781312c8567a601b0974724d31b20e6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3129/CH5/EX5.2/Ex5_2.sce | e6c16727a6cb936e9c85ec519f3cfeed66957fed | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,477 | sce | Ex5_2.sce | //Finding the Performance of a Dc-Dc converter with RL load
//Example 5.2(Page No- 174)
clc
clear
//given data
Vs = 220;//V
R = 5;//Ohm
L = 7.5*10^-3;//H
E = 0;//V
k = 0.5;
f = 1000;//Hz
//part(a)
// I2 = I1*exp(-(kTR/L)+((Vs-E)/R*(1-exp((-(k*T*R/L))))))
// and I1 = I2*exp(-(1-k)*(T*R/L))-(E/R)*(1-exp(-(1-k)*TR/L))
//Solving these two equations to get I1 and I2
A = [0.7165 -1; 1 -0.7165];
b = [-12.473; 0];
x = A\b;
I1 = x(1);
I2 = x(2);
printf('(a)\t Maximum instanteneous current I1: %.2f A',I1)
//part(b)
printf('\n (b)\t The peak instanteneous load current I2: %.2f A',I2)
//part(c)
del_I = I2-I1; //del_I
del_I_max = (Vs/R)*(tanh(R/(4*f*L)));// the maximum peak to peak ripple current
del_I_max_app = (Vs)/(4*f*L); // approximate maximum ripple current
printf('\n (c)\t del_I (I2-I1) :%.3f A',del_I);
printf('\n \t The maximum peak to peak ripple current :%0.2f A',del_I_max)
printf('\n \t Approximate maximum ripple current :%.2f A',del_I_max_app);
//part(d)
Ia = (I2+I1)/2 ;
printf('\n (d)\t The average load current is %f A',Ia);
//part(e)
Io = sqrt(I1^2 + (I2-I1)^2/3 + I1*(I2-I1));
printf('\n (e)\t rms value of load current is %.2f A',Io);
//part(f)
Is = k*Ia ;
Ri = Vs/Is ;
printf('\n (f)\t The average source current : %f A',Is);
printf('\n \t the effective input Ri :%d A',Ri);
//part(g)
Ir = sqrt(k)*sqrt(I1^2+(I2-I1)^2/3+I1*(I2-I1));
printf('\n (g)\t The rms converter current :%.2f A',Ir)
|
f9c41f6e3f9b820de15c5c010aeee5475385a499 | b12941be3faf1fd1024c2c0437aa3a4ddcbbfd67 | /normal/fase_4.tst | 9d7a72bc70b2adb039610c9572887cb6a3b65b5b | [] | no_license | JanWielemaker/optica | 950bd860825ab753236ce1daa399ee7a0b31b3ee | 3a378df314b5a60926b325089edac89c00cc8c6d | refs/heads/master | 2020-06-12T14:22:46.567191 | 2019-06-21T11:24:41 | 2019-06-21T11:24:41 | 194,328,239 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,869 | tst | fase_4.tst | question(1, 'item 4-1',
'Als je van links af een lamp laat schijnen
door de gaatjes van de L, wat is dan de
vergroting die je vindt op het (scherpe)
beeld rechts?',
[ '2',
'0,5',
'1',
'weet niet'
],
state(state, '',
[ s1 = shield(pos_x(7.3), unit(1)),
m1 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(5),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(17.3),
show_gauge(true)),
s2 = shield2(pos_x(27.25)),
d1 = ruler(from(s1), to(m1), pos_y(1.5)),
d2 = ruler(from(m1), to(s2), pos_y(3.4))
])).
question(2, 'item 4-2',
'Als we van links af een lamp laten schijnen,
hoe ver moet dan een voorwerp van de lens af
staan om een scherp beeld te krijgen?',
[ '10 centimeter',
'8 centimeter',
'5 centimeter',
'weet niet'
],
state(state, '',
[ s4 = shield2(pos_x(25.5)),
m3 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(5),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(15.5),
show_gauge(true)),
d14 = ruler(from(m3), to(s4), pos_y(6.2))
])).
question(3, 'item 4-3',
'Wat kun je in bovenstaande situatie zeggen
over het beeld van het voorwerp?',
[ 'In deze situatie is er geen beeld',
'In deze situatie is het beeld kleiner dan het
voorwerp',
'In deze situatie is het beeld groter dan het
voorwerp',
'weet niet'
],
state(state, '',
[ l1 = biglamp(instrument_name(biglamp)),
m1 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(5),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(19.9),
show_gauge(true),
instrument_name(lens)),
s1 = shield(pos_x(5.05),
unit(1),
instrument_name(shield)),
d1 = ruler(from(m1), to(s1), pos_y(-6.7)),
c1 = construction_line(pos_x(0),
instrument_name(consline)),
d2 = ruler(from(s1), to(c1), pos_y(5.95))
])).
question(4, 'item 4-4',
'Wat kun je in bovenstaande situatie zeggen
over het beeld van het voorwerp?',
[ 'In deze situatie is er geen beeld',
'In deze situatie is het beeld kleiner dan het
voorwerp',
'In deze situatie is het beeld groter dan het
voorwerp',
'weet niet'
],
state(state, '',
[ l1 = biglamp(instrument_name(biglamp)),
m1 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(5),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(13.95),
show_gauge(true),
instrument_name(lens)),
s1 = shield(pos_x(4.95),
unit(1),
instrument_name(shield)),
d1 = ruler(from(m1), to(s1), pos_y(-6.7)),
c1 = construction_line(pos_x(0),
instrument_name(consline)),
d2 = ruler(from(s1), to(c1), pos_y(5.95))
])).
|
86c6c9f6ca1d4ec4883829e7a55bb2f79ad7013c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3784/CH7/EX7.2/Ex7_2.sce | db59d6fb63c1f2632e4d5b91535a5bc276f9be33 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 659 | sce | Ex7_2.sce | clc
//variable initialisation
V=440 //Supply voltage in volts
P=4 //number of poles
f=50 //Supply frequency in Hz
R=0.2 //rotor resistance in ohm
X=0.35 //leakage reactance in ohm
N1=1450 //speed in rpm
N2=1200 //speed in rpm
S2=0.2
//solution
Vph=V/sqrt(3)
Ns=(120*f)/P//Synchronous Speed
Wms=2*%pi*Ns/60
S=(Ns-N1)/Ns
T=(3/Wms)*(Vph^2)*(R/S)/((R/S)^2+(X)^2)//The answer provided in the textbook is wrong
K=T/(1-S)
T2=K*(1-S2)
Vph2=sqrt(T2*((R/S)^2+(X)^2)/((3/Wms)*(R/S)))
Vl=Vph2*sqrt(3)
printf('\n\n Torque=%0.1f N-m\n\n',T)//The answer provided in the textbook is wrong
printf('\n\n Line Voltage to be imposed=%0.1f Volts\n\n',Vph2)
|
c7db74905cd83be00191e5c9819c9c0ba485e342 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3673/CH8/EX8.2/Ex8_2.sce | c8468b37b1bebca57e5ac0c09ecf6da974409ba6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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_2.sce | //Example 8_2 page no:297
clc;
R=10;//resistance in ohm
L=0.5*10^-3//inductance in henry;
C=10*10^-6;//capacitance in farad;
f=1/(2*%pi*sqrt(L*C));
f=f/1000;//converting to killoHertz
disp(f,"the resonant frequency is (in kHz)");
|
8697ffd075a199d04c3e0faaad75b32a1de90718 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3407/CH10/EX10.4/Ex10_4.sce | df9740dbababa77c42a97d0d7e2e68db7e1204dd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 379 | sce | Ex10_4.sce | clear;
clc;
funcprot(0);
//given data
P = 20;//power required in kW
cx1 = 7.5;//steady wind speed in m/s
rho = 1.2;//density in kg/m^3
Cp = 0.35;
eta_g = 0.75;//output electrical power
eff_d = 0.85;//electrical generation efficiency
//Calculations
A2 = 2*P*1000/(rho*Cp*eta_g*eff_d*cx1^3);
D2 = sqrt(4*A2/%pi);
//Results
printf('The diameter = %.1f m.',D2);
|
de1f8c98687c5b0b8a251c3cc9856e8bbc24a9b6 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronic_Measurements_And_Instrumentation_P._Sharma_876.zip/Electronic_Measurements_And_Instrumentation_P._Sharma_876/CH2/EX2.5/Ex2_5.sce | a30be998e8f9be8cf8025d1cb9a1b18e17ede32c | [] | 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 | 332 | sce | Ex2_5.sce | errcatch(-1,"stop");mode(2);//caption:Find magnitude of limiting error fot R1 and R2
//Ex2.5
R1=36//resistance(in ohm)
R2=75//resistance(in ohm)
er=0.005//limiting error(in ohm)
dR1=R1*er
disp(dR1,'magnitude of limiting error for R1(in ohm)=')
dR2=R2*er
disp(dR2,'magnitude of limiting error for R2(in ohm)=')
exit();
|
82105f12f114e928b75b124bd18cbfef4f2705f2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /331/CH9/EX9.2/Example_9_2.sce | 1f4820594b1d5e138b27dd70a86f3f33c22ea17c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 967 | sce | Example_9_2.sce | //Caption: One-Sample Tests
//One-sample Sign Test for small samples
//Example9.2
//Page313
//Test 2: Ho: p =1/2, H1: p< 1/2
clear;
clc;
n = 8;//sample size
p =0.5;
q = 1-p;
alpha = 0.05;//significance level
plus_signs = 2;
minus_signs = 7;
//The binomial probability that the number of plus signs <=2
X =2;
[P,Q]=cdfbin("PQ",X,n,p,q);
disp(P,'The binomial probability that the number of plus signs P(X<=2)=')
if (P>alpha) then
disp('Sine it is greater than significance level, the binomial statistic falls')
disp('in the acceptance region')
else
disp('Since it is less than significance level, the binomial statistic falls')
disp('in the rejection region and the null hypothesis should be rejected')
end
//Result
//The binomial probability that the number of plus signs P(X<=2)=
//
// 0.1445313
//
// Sine it is greater than significance level, the binomial statistic falls
//
// in the acceptance region |
de8fa436f4053edc9ec89b5d395537f60f7dc4ec | 449d555969bfd7befe906877abab098c6e63a0e8 | /881/CH4/EX4.6/exa4_6.sce | 369cecb2c878dc9d421cd8df52975edd54027d75 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 339 | sce | exa4_6.sce | clc;
//Example 4.6
//Page no 133
//Solution
m=0.8;
Aq=100;
Fc=500; //kHz
Vc=5*(10^-3); //mV
Fm=1000; //Hz
//(a)
disp("(a)Substituting into equation 4-34(pgno 132), ");
Am=Aq*(1+m);
disp(Am," Amax = ");
am=Aq*(1-m);
disp(am,"Amin = ");
//(b)
Vom=Am*Vc;
vom=am*Vc;
disp('V',Vom,"(b)Vout(max) = ");
disp('V',vom,"Vout(min) = ");
|
1b2e01023c96fa3a3a9e258b2ce7f28dcc2d542f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3204/CH21/EX21.3/Ex21_3.sce | 0798e472427fa564407e998e4c06fea0cfd95de2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 559 | sce | Ex21_3.sce | // Initilization of Variables
v_1=3 // m/s // uniform speed of the belt at top
v_2=2 // m/s // uniform speed of the belt at the bottom
r=0.4 // m // radius of the roller
// Calculations
// equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's
A=[1 r;1 -r]
B=[v_1;v_2]
C=inv(A)*B
// Results
clc
printf('The linear velocity (v_c) at point C is %f m/s \n',C(1))
printf('The angular velocity at point C is %f radian/seconds \n', C(2))
// NOTE: The answer of angular velocity is incorrect in the book
|
e3b20d7ee670b1bdd9bde662607645dd10e18406 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2333/CH3/EX3.3/3.sce | 99779e5a5a9e4d6dca2017cca12732734901ee41 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 389 | sce | 3.sce | clc
// Given that
lambda = 5000 // wavelength of light in angstrom
theta = 30 // Central maximum spread out at on side
// Sample Problem 3 on page no. 139
printf("\n # PROBLEM 3 # \n")
printf(" Standard formula used \n")
printf(" lambda = e*sin(theta) \n")
e = lambda*1e-10 / sin(theta*%pi/180) // Calculation of width of slit
printf("\n Width of slit is %ecm.",e*1e+2)
|
f2896d6b0bad6492fbc9b7a3489e1e4731840448 | 449d555969bfd7befe906877abab098c6e63a0e8 | /839/CH15/EX15.2/Example_15_2.sce | 3dbe02fbbe8675b8728a3258893b3be0bd6f3ef9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 656 | sce | Example_15_2.sce | //clear//
clear;
clc;
//Example 15.2
//Given
Tca = 70; //[C]
Tcb = 130; //[C]
Tha = 240; //[C]
Thb = 120; //[C]
//Solution
//Using Eq.(15.7) and (15.8)
neta_h = (Tcb-Tca)/(Tha-Tca);
Z = (Tha-Thb)/(Tcb-Tca);
//From Fig 15.7a, the correction factor is found
Fg = 0.735;
//the temperature drops are
//At shell inlet:
deltaT_i = Tha-Tcb; //[C]
//At shell outlet:
deltaT_o = Thb-Tca; //[C]
Log_T = (deltaT_i-deltaT_o)/log(deltaT_i/deltaT_o);
// the correct value of Log_T is
Log_T = Fg*Log_T; //[C]
disp('C',Log_T,'The correct mean emperature drop is')
//Because of low value of Fg, a 1-2 heat exchanger is not suitable for this duty
|
7fe1e79ed5470fb9d55cf28f194969b60cd59a36 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.4/macros/fraclab/contwtmir.sci | a2e3fc38156d1653612a28b021220a98f69b1b49 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 4,430 | sci | contwtmir.sci | function [wt,a,f,scalo,wavescaled]=contwtmir(x,fmin,fmax,N,wave);
// This Software is ( Copyright INRIA . 1998 1 )
//
// INRIA holds all the ownership rights on the Software.
// The scientific community is asked to use the SOFTWARE
// in order to test and evaluate it.
//
// INRIA freely grants the right to use modify the Software,
// integrate it in another Software.
// Any use or reproduction of this Software to obtain profit or
// for commercial ends being subject to obtaining the prior express
// authorization of INRIA.
//
// INRIA authorizes any reproduction of this Software.
//
// - in limits defined in clauses 9 and 10 of the Berne
// agreement for the protection of literary and artistic works
// respectively specify in their paragraphs 2 and 3 authorizing
// only the reproduction and quoting of works on the condition
// that :
//
// - "this reproduction does not adversely affect the normal
// exploitation of the work or cause any unjustified prejudice
// to the legitimate interests of the author".
//
// - that the quotations given by way of illustration and/or
// tuition conform to the proper uses and that it mentions
// the source and name of the author if this name features
// in the source",
//
// - under the condition that this file is included with
// any reproduction.
//
// Any commercial use made without obtaining the prior express
// agreement of INRIA would therefore constitute a fraudulent
// imitation.
//
// The Software beeing currently developed, INRIA is assuming no
// liability, and should not be responsible, in any manner or any
// case, for any direct or indirect dammages sustained by the user.
//
// Any user of the software shall notify at INRIA any comments
// concerning the use of the Sofware (e-mail : FracLab@inria.fr)
//
// This file is part of FracLab, a Fractal Analysis Software
[nargout,nargin] = argn(0) ;
// CHECK INPUT FORMATS
[xr,xc] = size(x) ;
if xr ~= 1 & xc ~= 1
error('1-D signals only')
elseif xc == 1
x = conj(x') ;
end
// DEFAULT VALUES
nt = length(x) ;
if exists('wave') == 0
wave = 0 ;
end
if nargin == 1
XTF = fft(mtlb_fftshift(x),-1) ;
sp = (abs(XTF(1:nt/2))).^2 ;
f = linspace(0,0.5,nt/2+1) ; f = f(1:nt/2) ;
plot(f,sp) ;
fmin = input('lower frequency bound = ') ;
fmax = input('upper frequency bound = ') ;
N = input('Frequency samples = ') ;
fmin_s = string(fmin) ; fmax_s = string(fmax) ;
N_s = string(N) ;
disp(['frequency runs from ',fmin_s,' to ',fmax_s,' over ',N_s,' points']) ;
end
if nargin == 5
if fmin >= fmax
error('fmax must be greater to fmin') ;
end
end
f = logspace(log10(fmax),log10(fmin),N) ;
a = logspace(log10(1),log10(fmax/fmin),N) ; amax = max(a) ;
if length(wave) == 1
if abs(wave) > 0
nh0 = abs(wave) ;
for ptr = 1:N
nha = round(nh0 * a(ptr)) ;
ha = conj(morlet(f(ptr),nha,~mtlb_isreal(wave))) ;
nbmir = min(nt,nha) ;
x_mir = [x(nbmir:-1:2) x x(nt-1:-1:nt-nbmir+1)] ;
detail = convol(ha,x_mir) ;
wt(ptr,1:nt) = detail(nha + nbmir : nha + nbmir + nt -1 ) ;
end
elseif wave == 0
for ptr = 1:N
ha = mexhat(f(ptr)) ; nha = (length(ha)-1)/2 ;
nbmir = min(nt,nha) ;
x_mir = [x(nbmir:-1:2) x x(nt-1:-1:nt-nbmir+1)] ;
detail = convol(ha,x_mir) ;
wt(ptr,1:nt) = detail(nha + nbmir : nha + nbmir + nt -1 ) ;
end
end
wavescaled = wave ;
elseif length(wave) > 1
wavef = fft(wave,-1) ; nwave = length(wave) ;
f0 = find(abs(wavef(1:nwave/2)) == max(abs(wavef(1:nwave/2)))) ;
f0 = mtlb_mean((f0-1).*(1/nwave)) ;
disp(['mother wavelet centered at f0 = ',string(f0)]) ;
f = logspace(log10(fmax),log10(fmin),N) ;
a = logspace(log10(f0/fmax),log10(f0/fmin),N) ; amax = max(a) ;
B = 0.99 ; R = B/((1.001)/2) ;
nscale = max(128,round((B*nwave*(1+2/R)*log((1+R/2)/(1-R/2)))/2)) ;
[wavescaled,nt_a] = dilate(wave,a,0.001,0.5,nscale) ;
wavescaled = real(wavescaled) ;
for ptr = 1:N
ha = wavescaled(2:wavescaled(1,ptr),ptr) ;
firstindice = (wavescaled(1,ptr)-mtlb_rem(wavescaled(1,ptr),2))/2 ;
nbmir = min(nt,firstindice) ;
x_mir = [x(nbmir:-1:2) x x(nt-1:-1:nt-nbmir+1)] ;
detail = convol(ha,x_mir) ;
detail = detail(firstindice + nbmir : firstindice + nbmir + nt -1 ) ;
wt(ptr,1:nt) = conj(detail(:)') ;
end
end
if nargout >= 4
scalo = real(wt.*conj(wt)) ;
end
|
db9657ed1db14f4e56512590c814fbb8f3414149 | a5de878687ee2e72db865481785dafbeda373e2a | /trunck/OpenPR-0.0.2/macros/fuzzy_kmeans.sci | 4611ca5c39ee77f1e68e13244664cb878dce4af2 | [
"BSD-3-Clause"
] | permissive | Augertron/OpenPR | 8f43102fd5811d26301ef75e0a1f2b6ba9cbdb73 | e2b1ce89f020c1b25df8ac5d93f6a0014ed4f714 | refs/heads/master | 2020-05-15T09:31:08.385577 | 2011-03-21T02:51:40 | 2011-03-21T02:51:40 | 182,178,910 | 0 | 0 | null | null | null | null | WINDOWS-1258 | Scilab | false | false | 3,297 | sci | fuzzy_kmeans.sci | //////////////////////////////////////////////////////////////////////////////
// Author: Jia Wu
// Version: 0.1
// Date: Dec. 2009
//
//
// Copyright (C) 2009 OpenPR
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of OpenPR nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL HOLDER AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Input:
// data - dim*num data matrix; each column is a data point.
// k - number of nearest neighbors.
// b - b > 1 is a free parameter chosen to adjust the
// ¡°blending¡± of different clusters
// Output:
// labels - labels of the input data.
// centroids - cluster centroids
///////////////////////////////////////////////////////////////////////////////
function [labels, centroids] = fuzzy_kmeans(data, k, b)
if k<1,
error('k should be a positive integer.');
end
[dim, num] = size(data);
labels = zeros(1, num);
dist = zeros(k, num);
//initialize means
[val, idx] = sort(rand(1, num));
sel = idx(1:k);
m = data(:, sel)+mean(data, 'c')*ones(1,k);
o_m = zeros(dim, k);
//initialize degrees
p = rand(k, num);
p = p./(ones(k,1)*sum(p,'r'));
o_p = zeros(k, num);
while((sum(abs(m-o_m))>1e-5)&(sum(abs(p-o_p))>1e-5)),
o_m = m;
o_p = p;
for i=1:k,
dist(i,:) = sum((data-m(:,i)*ones(1,num)).^2, 'r');
end
//recompute degrees
p = (dist.^(-1)).^(1/(b-1));
p = p./(ones(k,1)*sum(p,'r'));
//recompute means
p = p.^b;
m = (data*p')./(ones(dim,1)*sum(p, 'c')');
end
[maximun, labels] = max(p, 'r');
centroids = m;
endfunction
|
6bba6805d318364e05494b45ce796819f56f7221 | 91bba043768342a4e23ee3a4ff1aa52fe67f7826 | /cs/142/2/tests/test25.tst | fb0c0bcc62dc8a75c6eb614631b8a71659665244 | [] | no_license | MaxNanasy/old-homework | 6beecc3881c953c93b847f1d0d93a64ec991d6de | 48b7997a49a8f111344f30787c178e1661db04bd | refs/heads/master | 2016-09-08T04:37:44.932977 | 2010-03-02T00:48:59 | 2010-03-02T00:48:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 28 | tst | test25.tst | main(){ if(i<=0){ j=j+1; }} |
d74bc897b761dbaee3669813e445865f452a5065 | 449d555969bfd7befe906877abab098c6e63a0e8 | /380/CH3/EX3.5/3_5.txt | a8f874cb88ab36ac5fcfa67571b2159d316b5cf1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 727 | txt | 3_5.txt | //Caption:Find the current in the coil
//Exa:3.5
clc;
clear;
T=20;//torque exerted by spring (in Newton-meter)
r=0.2;//radius of spring (in meter)
F_s=T/r;//force exerted by spring on magnetic plate
N=1000;//no. of turns in coil
u_o=4*%pi*10^-7;//permablityof air
A=9*10^-4;//area (in meter^2)
function y = L ( x );//inductance
y = (N^2)/ R ( x );
endfunction;
function y = R ( x );//reluctance of air gap
y = (2*x)/(u_o*A);
endfunction;
x = [0.001 ]'; // Points of interest
t=[diag(derivative(L,x))];//t=dL/dx (at x=0.001m)
//since t<o i.e,F_m is acting in opp direction that of weight
//for equilibrium F_m=F_s
I=sqrt((2*F_s)/(t*(-1)));//Refer to eqn3.23
disp(I,'current in the coil (in Amperes)=') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.