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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
36d109cf86e3c6f2f6471ff66ccad1b50c4e7c28 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3830/CH1/EX1.3/Ex1_3.sce | a8993a58e905fd665c30a5a8be63ae15c6d99760 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 452 | sce | Ex1_3.sce | // Exa 1.3
clc;
clear;
// Given
// A 3_1/2 digit DVM
V = 19.99; // Max voltage in Volts
// Solution
printf('The maximum number of counts that can be made with 9 3_1/2 digit DVM is 1999 \n The samllest change in input that can be measured is 1 count \n');
// 1 count in volts corresponds to resolution :-
// 1999 counts = 19.99 V
// 1 count = ?
Resolution = 19.99/1999;
printf(' Resolution = %d mV \n',round(Resolution*10^3));
|
981adabd88ea850747273501d1073e2a9b057fcf | 6e257f133dd8984b578f3c9fd3f269eabc0750be | /ScilabFromTheoryToPractice/Computing/testcalculs.sce | a2174cffbdae6eae38ae953543ae0c593b0c768b | [] | no_license | markusmorawitz77/Scilab | 902ef1b9f356dd38ea2dbadc892fe50d32b44bd0 | 7c98963a7d80915f66a3231a2235010e879049aa | refs/heads/master | 2021-01-19T23:53:52.068010 | 2017-04-22T12:39:21 | 2017-04-22T12:39:21 | 89,051,705 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 182 | sce | testcalculs.sce | // order of operations and parentheses
1/2+3
1/(2+3)
2+3/10
(2+3)/10
// using parentheses with exponents
-567^12
(-567)^12
// decimal separator . and not ,
2+3.4
2+3,4
|
e8fad5099c07835805a7aa14f091276f75c48133 | 991911b2a5fe25b4515d60ea80978b8550f90178 | /SCILab/Scripts/listas.sce | e1179084c368f9aa07aac98f7e04c2b06128a070 | [] | no_license | fongoses/comunicacao-dados-2013-2 | 48d2f0cd592ea50c8b1ec6f815c8de62f122c4de | 2981e42c5be4550ccd8dd4d4ef93b4397a1ea0d3 | refs/heads/master | 2016-09-10T10:44:16.480842 | 2013-12-17T12:48:45 | 2013-12-17T12:48:45 | 32,294,010 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 557 | sce | listas.sce | mode(7);
// Listas e listas tipadas
// uma lista
L=list(1,'w',eye(2,2))
// extraindo elemento 3 de L
L(3)
// extraindo entrada 2,2 do elemento L(3)
L(3)(2,2)
// redefinindo-se elemento 2 de L
L(2)=list('w',rand(2,2))
// cria-se uma lista aninhada
// extrai-se elemento 1,2 da entrada 2 de L(2)
L(2)(2)(1,2)
// redefine-se o elemento acima
L(2)(2)(1,2)=5
// listas tipadas possuem uma primeira entrada tipica
L=tlist(['Car';'Name';'Dimensions'],'Nevada',[2,3])
// uso de uma lista tipada
L.Name
L.Dimensions(1,2)
L(1)(1)
// fim
mode(0); |
f44b6ff31546cb243736b0e64888df9b382e2706 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2855/CH12/EX12.49/Ex12_49.sce | fe07c4cf0627fa75f59e87d7271cb400bc000934 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 309 | sce | Ex12_49.sce | //chapter 12
//page no 541
//exa 12_49
//given
clear;
clc;
Zd=100; //in km
Do=0.07; //in ps/nm^2
D1=-0.3; //in ps/nm^2
Ldsf=(Zd*Do)/(Do-D1); //length of dispersion compensation fiber in km
printf("\n Length of Dispersion compensation fiber, Ldsf = %0.0f km",Ldsf);//Result
|
2aab627aa3bf353871bc2d844e4d324dcaf94eb9 | b784b8fa78daac389ae5c7edeadc00786135b8f1 | /archive/engine-20180718.sce | 10184f1dc12c5a0c30697fe58afe1465c3ba8aa2 | [] | no_license | TheMagicNacho/artemis-engine-design | 70b0bc798a8509fdad304916063d469acdad8347 | 10b427e732ae7f6571725034a4d746c68c3cbb4b | refs/heads/master | 2020-03-20T06:58:58.972222 | 2019-01-20T12:22:16 | 2019-01-20T12:22:16 | 137,267,385 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,020 | sce | engine-20180718.sce | //---NOTES---
// Dt = Density of Gas at Throat
// Acof = Area of Exhaust / Area of Throat
//---VARIABLES---
h = ???; //Specific Heat (Kj/Mol)
r= ?; //ratio of exhaust gases and their constant(function of molar weight)
tc= 3182.027; //Combustion Chamber Temp (K)
pc = 10; //Combustion Chamber Presure (bar)
Vc
f = 32323 //thrust required
pa = 10; //ambiant presure
//---CALCULATIONS---
cstar = sqrt(r*tc / h * (h +1)/2**(h +1 / 2 * (h-1)));
pe = (n * R / v); //exhaust presure
//throat
tt = tc * (2/H+1); //temp
pt = pc * (2/H+1) ** (H/(H-1)); //presure
dt = pt / (r*tt); //density
vt = sqrt(h*r*tt); //Velocity
//exhaust
me = sqrt((2 / h-1) * ((pc/pe)^((h-1)/h) /1) ); //Mach Number
te = tc / (1+((h-1)/2)*me^2); //Temp
de = pe / (r*te); //desnsity
//coefficents
acof = (1/me) * ((2/(h+1) * (1+ ((h-1)/2) * me^2)^(h+1)/2(h-1);
cf = h * sqrt(((2/h+1)^((h+1)/(h-1))) * (2/(h-1)) * (1-(pe /pc)^((h-1)/h)) + ((pe-pa)/pc) * acof);
//finals
c = cf * cstar;
at = f/(cf * pc);
mdot = (pc * at) / cstar;
//---PRINT---
|
8837843d4b1579eb3db42ad1fa3ccfdecc65a8c7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1658/CH8/EX8.11/Ex8_11.sce | d4ad701b8b9ce6e9384f32dd7ad4ea2b240ce194 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 250 | sce | Ex8_11.sce | clc;
IB=105*10**-6;
IC=2.05*10**-3;
BETA=IC/IB;
disp(BETA);
ALPHA=BETA/(1+BETA);
disp(ALPHA);
IE=IC+IB;
disp('mA',IE*10**3,"IE=");
DELTA_IB=27*10**-6;
DELTA_IC=0.65*10**-3;
IBn=IB+DELTA_IB;
ICn=IC+DELTA_IC;
BETAn=ICn/IBn;
disp(BETAn);
|
1a90f4741597591043ed1e024c8934704a624441 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3311/CH8/EX8.24/Ex8_24.sce | 2749836b0f0956cb4a08f6d122f66e2ab6c24a13 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,116 | sce | Ex8_24.sce | // chapter 8
// example 8.24
// Determine maximum ON-period of MOSFET, Battery drain current and the value of choke required
// page-515
clear;
clc;
// given
Edc=12; // in V
Edc_max=13.5; // in V (maximum dc source)
Edc_min=10; // in V (minimum dc source)
E0=5; // in V (average output voltage)
I0=10; // in A (load current)
f=50; // in KHz
del_I=500; // in mA (ripple current)
// calculate
f=f*1E3; // changing unit from KHz to Hz
del_I=del_I*1E-3; // changing unit from mA to A
T=1/f; // calculation of time period
alpha_max=E0/Edc_min; // calculation of duty cycle
// since alpha=Ton/T, therefore we get
Ton_max=alpha_max*T; // calculation of maximum ON-period of MOSFET
// since Edc*Is=E0*I0, therefore we get
Is=E0*I0/Edc; // calculation of Battery drain current
L=E0*(Edc_min-E0)/(f*Edc_min*del_I); // calculation of the value of choke required
printf("\nThe maximum ON-period of MOSFET is \t Ton_max=%.f us",Ton_max*1E6);
printf("\nThe Battery drain current is \t\t Is=%.2f A",Is);
printf("\nThe value of choke required is \t\t L=%.f uH",L*1E6);
// Note: the answers vary slightly due to precise calculation |
b24617faa5ef618065b4f081bb790aa73102e55d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2195/CH3/EX3.9.2/ex_3_9_2.sce | 38e4e3c19bc5f91d0db096cb259a30e269bed380 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | ex_3_9_2.sce | //Example 3.9.2// full scale deflection current
clc;
clear;
close;
//given data :
format('v',5)
Vin=10;// in volts
Rs=200;//in k-ohm
Rm=400;// in ohm
I_fsd=Vin/((Rs*10^3)+Rm);
disp(I_fsd*10^6,"full scale deflection current,I_fsd(micro-A) = ")
|
44a573a16434e980f6a934666f69660366077886 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3841/CH8/EX8.3/Ex8_3.sce | 97a539c48dd47b3094bbbc192c8e049254bcc14d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex8_3.sce | clear
//given
//test of diesel engine correct the fuel consumption
//
x=18900.
y=19350.
//for given fuel consumption of 0.46 lb
//finding the 19350 fuel consumption is
Cf=(x/y)*0.46
printf("\n \n correct fuel consumption %.2f lb per hour",Cf)
|
5a4de0c3e95edf794fd6d6bd86b4e57c1aa90bd6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2021/CH19/EX19.6/EX19_6.sce | c67791124ba82333099188f46bd8e3deeccd13ba | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 275 | sce | EX19_6.sce | //Finding of Power Required
//Given
Q=0.03;
H=18.25;
L=90;
dp=0.1;
E=0.75;
f=0.04;
g=9.81;
rho=1000;
//Given
V=Q/((%pi/4)*dp^2);
loss=(f*L*V^2)/(2*g*dp);
a=V^2/(2*g);
Hm=H+loss+a;
SP=(rho*g*Q*Hm)/(E*1000);
disp("Power required ="+string(SP)+" Kilowatts");
|
a1ea7e8ec3590c8b84a1b685d39a97fd73de5d4a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1205/CH16/EX16.5/S_16_5.sce | 74eb56bac24d5657b5df0a8ebec44bb5bf3b2f3f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 103 | sce | S_16_5.sce |
clc;
printf("Given problem is theoritical and no mathematical solving required for this problem");
|
a4b654878abb1fa15ceb87c4a6afda5a72ef7139 | 59e7c95649eb8894e1d6f0bcac3ca7ea2b023217 | /Algoritmo da Regra de Simpson.sce | 023dec9e3811a3f9e6903d6309ce8e9a454beb7d | [] | no_license | nascimento-luciano/Scilab-Matlab | cb5ee9d97df3ed0f4311573df0fd37a88b3394d8 | 1cba42b68cc7954ff4c7dd6b13c7d8e6bd3d039e | refs/heads/main | 2023-03-19T21:06:18.691193 | 2021-03-18T00:57:29 | 2021-03-18T00:57:29 | 348,877,701 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 715 | sce | Algoritmo da Regra de Simpson.sce | // Algoritmo da Regra de 1/3 de Simpson para resolução para resolução de
//Integrais Indefinidas
if n = 0 then
printf("Divisão por zero");
if n<0 then
printif("intervalo Inválido");
else
if n/2 <> 0 then
n <-n+1
h<-(x-x0)/n
x<-x0+h
SomaPares<-0
SomaImpares<-0
for i = 1:n-1 do
if i/2 = 0 then
SomaPares<-SomaPares + f(x)
else
SomaImpares<-SomaImpares + f(x)
x<-x+h
end-for
R<-h/3*(f(x0)+f(x)+4*SomaOmpares+2
printf("O resultado da integral da função f é, ", R);
end-for
|
b7d9e2a07ffd6140af062526badd1c78b6e956dd | 449d555969bfd7befe906877abab098c6e63a0e8 | /1466/CH14/EX14.2/14_2.sce | 1e33e055ad68e3c62ec9a3383e072acd4669d947 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 14_2.sce |
clc
//initialisation of variables
clear
p=0.9
//CALCULATIONS
Hd=54.5
s=6.9//ft^3/lb
t=-153//f
v=224*sqrt(p*Hd)
//RESULTS
printf ('Hd= %.1f B.Th.U',Hd)
printf ('\n Final temperature= %.f F',t)
printf ('\n specific volume= %.2f ft^3/Lb',s)
printf (' \n final velocity= %.f ft/sec',v-6)
|
71f79c785d25d54a2b3db3c47644cc2e2cd96496 | 93c7fb5ee09b14b93d6c6a5a99d15e57555802be | /tests/test_100/test10.tst | fd9f147317af5456f359129d6b1e362265ca0306 | [] | no_license | ach5910/42PushSwap.com | b1cd724453b20296e39c18e5d576bdfb6290f7da | bfa2755c1cb84c7d72a4858c77193743a5583a1a | refs/heads/master | 2020-04-05T12:35:36.043271 | 2017-07-26T06:33:40 | 2017-07-26T06:33:40 | 95,174,903 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 493 | tst | test10.tst | 3340 7947 1217 4610 3460 4391 5031 6168 7116 3883 1685 2217 6782 987 4205 1104 1419 5930 6360 5378 9512 5407 8858 8984 906 5743 3830 257 1413 9095 3367 1763 7249 4826 3314 4961 4285 5376 5758 3750 9587 4549 4504 6299 7978 6763 2975 8267 1304 1432 2580 1817 2128 6824 9227 8725 6850 6907 2472 2755 4303 6684 3977 1132 684 2880 7409 4908 9520 9851 6627 2199 8828 5431 9808 6049 3233 9018 7700 6422 6528 297 3881 9738 7790 217 5660 3802 8634 879 4763 5287 1034 4290 5057 3787 7016 8945 4764 1035 |
4b27ad54ba7693e0e207a97572dd441fcab9dc4f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3535/CH5/EX5.7/Ex5_7.sce | 30ba279f3de629463fe75f03ff9d2319e9e790dd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 206 | sce | Ex5_7.sce | //Chapter 5, Example 5.7, Page 129
clc
clear
// Calculate the time
//based on eq 5.74
t = (14.05*10**9/log(2))*log(1+(0.31232/1.37208))
printf("\n Time = %e y ",t);
//Answer may vary due to round off error
|
84f2af829999c9b2ac86bccfcd2d44204bba60e8 | 5c94cf84436ff620c517792d888ff3ff8e02e08c | /polar.sce | 4683fea80dc38af730b6f524fd09f0ae57419e15 | [] | no_license | paulomarcondes/COVplot | 8d8287511f73b919619b7f132b2460e33d385402 | 91496810202761606a4cf486069367db19ca6152 | refs/heads/master | 2016-09-06T20:04:19.905597 | 2015-07-01T01:39:51 | 2015-07-01T01:39:51 | 38,181,630 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 139 | sce | polar.sce | rho=1:0.1:4;theta=(0:0.02:1)*2*%pi;
z=30+round(theta'*(1+rho^2));
f=gcf();
f.color_map= hotcolormap(128);
clf();graypolarplot(theta,rho,z)
|
b2a6c20273f8208503942d242459ade07192d09c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1523/CH4/EX4.47/ex4_47.sce | 338882b111d524a05f5abdaf33b333238439d8b9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 548 | sce | ex4_47.sce | //AC Circuits : example 4.47 :pg(4.47)
f1=60;
V=200;
P=600;
I=5;
f=50;
Z=V/I;
r=(P/(I^2));
XL=sqrt((Z^2)-(r^2));
L=(XL/(2*%pi*f));
XL1=(2*%pi*f1*L);
Z1=sqrt((r^2)+(XL1^2));
I=(V/Z1);
printf("\nI=5 A \nV=200 V \nP=600 W \nFor f=50 Hz,");
printf("\nZ=V/I =%.f Ohms",Z);
printf("\nP=((I^2)*r) \nr=%.f Ohms",r);
printf("\nXL=sqrt((Z^2)-(r^2)) \nXL=%.f Ohms",XL);
printf("\nXL=(2*pi*f*L)\nL=%.4f H",L);
printf("\nFor f=60 Hz \nXL=%.1f Ohm",XL1);
printf("\nr=24 Ohms \nZ=sqrt((r^2)+(XL^2))=%.2f Ohms",Z1);
printf("\nI=V/Z=%.3f A",I); |
19cd3d290cbb6978bed467a072f5df654171aae0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /27/CH6/EX6.6.3/Example_6_6_3.sce | 86ba7b6c6e387386c800056d63aca3b1cf6aac5d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 797 | sce | Example_6_6_3.sce | clear;
clear;
clc;
close;
//obtain the General Jacobian "A";
x1= %pi/2; y1= %pi/2;
x2= %pi/2; y2= -%pi/2;
x3= -%pi/2; y3= %pi/2;
x4= -%pi/2; y4= -%pi/2;
A1 = [2*sin(x1) sin(y1); sin(x1) 2*sin(y1)]
t1=det(A1)
tau1=trace(A1)
d1 = ((tau1)^2) - 4*t1
A2 = [2*sin(x2) sin(y2); sin(x2) 2*sin(y2)]
t2=det(A2)
tau2=trace(A2)
d2 = ((tau2)^2) - 4*t2
A3 = [2*sin(x3) sin(y3); sin(x3) 2*sin(y3)]
t3=det(A3)
tau3=trace(A3)
d3 = ((tau3)^2) - 4*t3
A4 = [2*sin(x4) sin(y4); sin(x4) 2*sin(y4)]
t4=det(A4)
tau4=trace(A4)
d4 = ((tau4)^2) - 4*t4
disp("From the above information we come to following conclusion:")
disp("1. (pi/2,pi/2) --> Unstable Node.")
disp("2. (pi/2,-pi/2) --> Saddle.")
disp("3. (-pi/2,pi/2) --> Saddle.")
disp("4. (-pi/2,-pi/2) --> Stable Node.") |
3bf5e87195283319e7b8130a1a4aa51e6e2f52c7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3811/CH11/EX11.1/Ex11_1.sce | d0a29f77adde266d2608d658ed588cb7f05d329b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 838 | sce | Ex11_1.sce | //Book Name: Fundamentals of electrical drives by Mohamad A. El- Sharkawi
//chapter 11
//example 11.1
//edition 1
//publisher and place:Nelson Engineering
clc;
clear;
Kphi=3; //constant in Vsec
Ra=1; //resistance in ohm
La=10; //inductance in mH
V=600; //rated voltage of the motor in volt
Vt=150; //starting voltage in volt
Tl=20; //constant torque in Nm
m=6; //total moment of inertia in Nm sec^2
omegaf=(Vt/Kphi)-((Ra*Tl)/Kphi^(2));
nf=(omegaf*60)/(2*%pi);
mprintf("\nThe motor speed after 5 sec is %d rpm",nf)
//The plot obtained in the book is using a simulation software using specific design that is avaliable in the software.In scilab or xcos there is no option to simulate DC shunt motor
|
9ea4d92c28ad6487b2a9d140451f57e93ba24a8c | 0ff544e93a68289ecf42fadda24716ff0dae093c | /the-basics/file.tst | 0f214dd4365006ef8505f27459ca5060a41f8a41 | [] | no_license | opeadeyomoye/learning-python | b34b0b1a44c8cc030260ea434413c9c002c737fd | 01727fc9e5060305bacc644781bfc5dfca7e5982 | refs/heads/master | 2021-05-08T00:11:39.204044 | 2017-12-17T23:47:50 | 2017-12-17T23:48:00 | 107,610,807 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 125 | tst | file.tst | This is one cool exercise.
Writing stuff to files, that is.
Surprised the 'open' keyword was expressly given to file opening. |
9302194222f0e28f12466028f277ef681d7c1e14 | 449d555969bfd7befe906877abab098c6e63a0e8 | /995/CH4/EX4.7/Ex4_7.sce | 225af740291167dc82c3a3f75cc27521d5700286 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 197 | sce | Ex4_7.sce | //Ex:4.7
clc;
clear;
close;
c=1*10^-6;
f1=100;
f2=10000;
X_c1=1/(2*%pi*f1*c);
X_c2=1/(2*%pi*f2*c);
printf("Reactance at 100Hz = %f mA",X_c1);
printf("\n Reactance at 10kHz = %f mA",X_c2); |
885caf3ad670206b836982f7511a3161d5a25685 | 3fb2b65e8ef9208e822aad35c618441282e08a30 | /scilab/metodeBagi2/metodebagidua.sci | b79c5cfdfc4e6a767fc7267afef0156cc736d7e7 | [] | no_license | Lukmannudin/TugasKuliah | 33031fb4f6ff0ab7a5849cda3ea15330e2527c3f | 19738c858dea539f0a5569f27be68b1a56c2aa89 | refs/heads/master | 2020-03-07T15:49:59.414761 | 2018-06-09T07:41:39 | 2018-06-09T07:41:39 | 127,565,939 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 777 | sci | metodebagidua.sci | function metode_bagi2(a,b,kt)
i=0;g=1;clam=0;
cb=1;
c=ntengah(a,b);r=renggang(a,b);
fa=selang(a);
fb=selang(b);
fc=selang(c);
cb=c;
disp([fa fc fb ]);
while (g>kt)
if fc<0 then
a=cb;
else
b=cb;
end,
c=ntengah(a,b);r=renggang(a,b);
fa=selang(a);fb=selang(b);fc=selang(c);
g=abs(galat_relatif(c,cb));
cb=c;
i=i+1;
disp([fa fc fb g]);
end
endfunction
function f=selang(x)
f=x^3+5*x^2-10*x-5;
endfunction
function c=ntengah(a,b)
c=(a+b)/2
endfunction
function r=renggang(a,b)
r=abs(a-b);
endfunction
function g=galat_relatif(Cbr,Clm)
g=(Cbr-Clm)/Cbr;
endfunction
|
99a854302d766e25110b605a90778513c5b4599c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1931/CH13/EX13.4/4.sce | 0131ff13296180341b06f1806020ce5f2ab8d139 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 467 | sce | 4.sce | clc
clear
//INPUT DATA
z=1.75*10^-40//electronic polarisability in Fm^2
d=1.8*10^3//density of argon atom in Kg/m^3
Z=39.95//atomic weight of argon
NA=6.025*10^26//Avagadro number in mole^-1
ro=8.85*10^-12//permittivity of free space
//CALCULATION
N=((NA*d)/Z)//The number of atoms/unit volume in atoms/m^3
rp=(((N*z)/ro)+1)//The static dielectric constant of solid argon
//OUTPUT
printf('The static dielectric constant of solid argon is %3.5f',rp)
|
caf8bf61f5f0f0cac75060a54e664a17cd243904 | 4a1effb7ec08302914dbd9c5e560c61936c1bb99 | /Project 2/Experiments/GAssist-Interval-C/results/GAssist-Intervalar-C.led7digit-10-1tra/result5s0.tst | 32ead800edc12070b80ea251837a89a7443decd5 | [] | no_license | nickgreenquist/Intro_To_Intelligent_Systems | 964cad20de7099b8e5808ddee199e3e3343cf7d5 | 7ad43577b3cbbc0b620740205a14c406d96a2517 | refs/heads/master | 2021-01-20T13:23:23.931062 | 2017-05-04T20:08:05 | 2017-05-04T20:08:05 | 90,484,366 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 534 | tst | result5s0.tst | @relation led7digit
@attribute Led1 real[0.0,1.0]
@attribute Led2 real[0.0,1.0]
@attribute Led3 real[0.0,1.0]
@attribute Led4 real[0.0,1.0]
@attribute Led5 real[0.0,1.0]
@attribute Led6 real[0.0,1.0]
@attribute Led7 real[0.0,1.0]
@attribute number{0,1,2,3,4,5,6,7,8,9}
@inputs Led1, Led2, Led3, Led4, Led5, Led6, Led7
@outputs number
1 1
2 2
3 2
3 3
3 8
5 5
0 0
1 1
3 3
4 4
7 7
0 0
4 4
0 0
1 1
4 4
5 7
7 7
9 3
9 9
5 5
6 2
2 2
3 9
5 0
5 5
6 6
9 9
0 2
4 4
5 5
6 6
0 8
1 1
2 2
6 6
7 7
7 4
8 0
8 8
9 9
2 2
7 7
9 0
9 9
3 7
4 9
6 6
8 8
9 9
|
bead1a16659efc2bb828b700b10d6e1ea6c53055 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3673/CH7/EX7.a.14/Example_a_7_14.sce | e4dd3d85c0403524bab10c36ce6fb69717bd9fe7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 597 | sce | Example_a_7_14.sce | //Example_a_7_14 page no:281
clc;
Zab=((5*(%i*10))/(5+(%i*10)))+((7*(-%i*20))/(7-(%i*20)));
I1=100/(5+(%i*10));
I2=100/(7-(%i*20));
Vamag=8.94*10;
Vaang=-63.43+90;
Vbmag=4.72*20;
Vbang=70.7-90;
Vareal=Vamag*cosd(Vaang);
Vaimag=Vamag*sind(Vaang);
Va=Vareal+(%i*Vaimag);
Vbreal=Vbmag*cosd(Vbang);
Vbimag=Vbmag*sind(Vbang);
Vb=Vbreal+(%i*Vbimag);
Vab=Va-Vb;
Vth=Vab;
Z=10.22+0.19*%i;
I=Vth/(Zab+Z);
Imag=sqrt(real(I)^2+imag(I)^2);
P=Imag^2*real(Z);
disp(P,"the maximum power delivered to the load is (in W)");
//power varies slightly due to values are rounded off in text book
|
ebb72a99da9365e97fee1a14ff3f1754a84217f4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /761/CH12/EX12.5/12_5.sce | dba14039d2514486500efad971da300401b9e648 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 246 | sce | 12_5.sce | clc;
// page no 413
// prob no 12_5
no_of_phase_angles=16;
no_of_amplitudes=4;
no_of_states_per_symbol=no_of_phase_angles*no_of_amplitudes;
bit_per_symbol=log2(no_of_states_per_symbol);
disp(bit_per_symbol,'The no. of bits per symbol is'); |
298317e2f3bd6c955ecd84c2c4ef2ef78e5f7362 | a5de878687ee2e72db865481785dafbeda373e2a | /trunck/OpenPR-0.0.2/macros/mseclustering.sci | 0629a304f146501777ef9b2bdf3fb7a352cca2f5 | [
"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 | UTF-8 | Scilab | false | false | 4,315 | sci | mseclustering.sci | ///////////////////////////////////////////////////////////////////////////////
// Author: Jia Wu
// Date: Feb. 2010
// Description: basic iterative minimum-squared-error clustering
//
// 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:
// train_samples - data matrix of size dim*num; each column is a data point
// cluster_num - number of desired clusters
//
// Output:
// centers - centers of the formed clusters
// labels - labels of each trainning sample belonging to the formed clusters
///////////////////////////////////////////////////////////////////////////////
function [centers, labels] = mseclustering(train_samples, cluster_num) //, attempt_num)
// if argn(2)<3,
// attempt_num = 1;
// end
num = size(train_samples, 2);
attempt_num = num; //number of attempts
//initialize cluster centers
[val, idx] = sort(rand(1, num));
centers = train_samples(:, idx(1:cluster_num));
//initial partition of the samples according to nearest distance
dist = zeros(cluster_num, num);
for i=1:cluster_num,
dist(i, :) = sum(((centers(:, i)*ones(1, num))-train_samples).^2, 'r');
end
[val labels] = min(dist, 'r');
n = zeros(1, cluster_num);
for i=1:cluster_num,
n(i) = length(find(labels==i));
end
//sum-of-squared-error
Je = 0;
//iterative minimum-squared-error clustering
while attempt_num,
old_Je = Je;
//randomly select a sample
[val, idx] = sort(rand(1, num));
x = train_samples(:, idx(1));
//classify sample x
dist = sum((x*ones(1, cluster_num)-centers).^2, 'r');
[val, idx1] = find(dist==min(dist));
lables(idx(1)) = idx1;
ro = zeros(1, cluster_num);
if n(idx1)~=1,
ro = (n./(n+1)).*dist;
ro(idx1) = ro(idx1)*((n(idx1)+1)/(n(idx1)-1));
[val, idx2] = find(ro==min(ro));
//transfer samples x and recompute Je and cluster centers
if idx2~=idx1,
labels(idx(1)) = idx2;
n(idx2) = n(idx2)+1;
n(idx1) = n(idx1)-1;
for i=1:cluster_num,
centers(:, i) = mean(train_samples(:,find(labels==i)), 'c');
J(i) = sum((train_samples(:,find(labels==i))-centers(:,i)*ones(1,length(find(labels==i)))).^2);
end
Je = sum(J);
end
end
// if Je==old_Je,
// attempt_num = attempt_num-1;
// end
if Je~=old_Je,
attempt_num = attermpt_num-1;
else
break;
end
end
endfunction
|
8b82623b5bd364b79fe569b7409823dd0d79e406 | 449d555969bfd7befe906877abab098c6e63a0e8 | /29/CH6/EX6.10.19/exa6_10_19.sce | ed7f4ad0954b121c7fa4eaa533bff341bb7003f7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 473 | sce | exa6_10_19.sce | //caption:determine_steady_state_error
//example 6.10.19
//page 189
s=%s;
syms K bta alpha G
num=sym('K*s+bta');
den=sym('s^2+alpha*s+bta');
CL=num/den;
disp(CL,"C(s)/R(s)=");//----(1)
H=1;
//also
cl=G/(1+G*H);
disp(cl,"also,C(s)/R(s)=");//------(2)
//from eq. (1) and (2), we get
G=num/(s^2+s*(alpha-K));
disp(G,"G(s)=");
B=1/(1+G);
B=simple(B);
disp(B,"E(s)/R(s)=");
R=1/s^2;
E=B*R;
E=simple(E);
Ess=limit(s*E,s,0);
disp(Ess,"steady state error="); |
1511e5320f24d5856c417b57022a4b21a4b72dde | 13d93c2922005af35056d015f1ae3ebebe05ee31 | /scilab/math/suite_recu/suite_recu.sce | b4a81e244f888331e6fab8b82212a75d92100ee4 | [] | no_license | scls19fr/openphysic | 647cc2cdadbdafd050d178e02bc3873bd2b07445 | 67bdb548574f4feecb99b60995238f12f4ef26da | refs/heads/master | 2021-04-30T23:16:26.197961 | 2020-11-16T20:21:17 | 2020-11-16T20:21:17 | 32,207,155 | 1 | 1 | null | null | null | null | ISO-8859-1 | Scilab | false | false | 437 | sce | suite_recu.sce | // Termes d'une suite recurrente
clear
function [y]=f(x)
// u_n+1 = sqrt ( u_n +2 )
y=sqrt(x+2)
// u_n+1 = 2*u_n // suite géométrique
//y=2*x
// u_n+1 = u_n + 1 // suite arithmétique
//y=x+1
endfunction
// u_courant = u_n
// u_precedent = u_n-1
n=0
u_precedent=1;
u_courant=u_precedent
while (1) // boucle infinie More (y or n) ? => n puis CTRL + C pour quitter
n=n+1
u_courant=f(u_precedent)
u_precedent=u_courant;
end
|
08e655377d0c469eab4804526c179d188b2ef713 | d5bd4b5a4760efd0a3d16d7c39c7b495c5874d28 | /Scripts/test_Rick.sce | 96d8c3e8e5304bd824b5f8dc2f9f7e683e9df892 | [] | no_license | APU-PhasedArrayBeamForming/Array-Based-Beam-Forming | 27a61bc3cf93e544364121e508dc4d140b7e0cb1 | 4cde46b7aa3f4e995297ac72fc5038fa0cdf083d | refs/heads/master | 2021-01-25T08:01:17.468481 | 2017-06-15T18:47:40 | 2017-06-15T18:47:40 | 93,699,808 | 1 | 1 | null | 2017-06-15T18:47:40 | 2017-06-08T02:36:01 | Scilab | UTF-8 | Scilab | false | false | 1,807 | sce | test_Rick.sce | y=wavread("./Fc100KHz_2MSPS_1KHzModulation_June12_2017.wav");
//I/Q data broken apart
f = 5*10^3 //double f = 5*10^3
O = 2*%pi*f //double O = f*2*Math.PI
I = y(1,:); //double []I = new double[n] //n is size of I
Q = y(2,:); //double []Q = new double [m] //m is size of Q
n = size(I,2) //double n = size.length()
p = floor(log(n)/log(2)); //n =
n = 2^p
n=262144
I = I(1:n);
Q = Q(1:n);
//Sample Rate = samp, Time Step = dt
samp=2*10^6;
dt = 1/samp
//Demodulation
t = linspace(0,dt*(n-1),n)
E = I + %i*Q;
D = exp(%i*O*t);
//Removes carrier
B = E./D;
Br = real(B);//this is same as
//B1 = Br.*cos(O*t); //this
//downsampling_Br = Br(1:100:length(Br));
//plot(abs(fE));
//Fast Fourier Transform
df = 1/(n*dt);
m = n
fE = fft(E(1:m), -1);
for i = 1:m
if(i<(m/2)+1) then
fr(i) = (i-1)*df;
else
fr(i) = (i-m-1)*df;
end
end
//filter things
//plot
N=32
h=eqfir(N,[0 .05; .15 .5], [1 0],[1 1]);
g=h
g(N+1:512)=0
//plot(20*log10(abs(fft(g,-1))))
//1e5 goal
//edges around 1khz
Z=convol(h,E)
Zf=fft(Z)
//plot(fr(1:m)',abs(Z(1:m)))
plot(fr(1:m)',abs(Zf(1:m)))
//downsampling_fE = fE(1:10:length(fE));
//plot spectrum (frequency vs relative amplitude)
//z = 20*log10(abs(fE)/max(abs(fE)));
//plot(fr(1:m)',z)
//original plot commands
//plot(fr,abs(fE));
//plot(fr(1:m)',abs(fE(1:m)))
//plot(fr(1:m)',abs(fE(1:m)))
//Qmu=lin2mu(Q)
//wavwrite(Qmu,samp,'./foo.wav');
//savewave('./foo.wav',Q,samp)
//playsnd(downsampling_Br,samp/150)
//pseudo-code
//get data
//find fast fourier transform
//low-pass filter (decimate)
//demodulate
//decimate again for audio card of computer/listen in mono
//playsnd(decimatedthing,samp/1stdecimation/2nddecimation)
|
f0c35320d8a5a3627f10561d272f8a6ac060ecce | 449d555969bfd7befe906877abab098c6e63a0e8 | /377/CH14/EX14.1/14_1.sce | 6d27e956ff8304ae8d6422b098dd35d8ed0266d0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,036 | sce | 14_1.sce | disp("φs=χsi+Eg+(Ev-Ef)");
k=0.026; //say k=K*T/q
p=7*10^14;
Nv=3.08*10^19;
a=4.05; //say a=χsi
b=1.125; //say b=Eg
c=k*log(p/Nv); //say c=Ev-Ef
printf('\n The value of Ev-Ef is %fV',c);
d=a+b+c; //say d=φs
printf('\n The value of φs is %fV\n',d);
disp("φms=φm-φs");
f=4.05; //say f=φm
g=f-d; //say g=φms
printf('\n The value of φms is %1.2fV\n',g);
eox=3.9*8.854*10^-14; //say eox=Єox
dox=200*10^-7;
cox=eox/dox;
printf('\n The oxide capacitance per unit area is %f*10^-8F/cm^2',cox*10^8);
printf('\n The value of flat band voltage is %1.2fV\n',g);
disp("Ld=sqrt(Є*Vt/(q*Na));");
e=11.7*8.854*10^-14;
Vt=0.025852;
q=1.6*10^-19;
Na=7*10^14;
Ld=sqrt(e*Vt/(q*Na));
printf('\n The value of Ld is %f*10^-5cm\n',Ld*10^5);
esi=11.7*8.854*10^-14;
Cfb=1/((dox/eox)+(Ld/esi));
printf('\n The capacitance per unit area at the flat band condition is %f*10^-8F/cm^2\n',Cfb*10^8);
printf('\n The capacitance per unit area for deep accumulation of majority carriers Caccum=%f*10^-8F/cm^2',cox*10^8); |
bf27d7364267fc49f57720a6e0c8b5ae2ab9137d | 449d555969bfd7befe906877abab098c6e63a0e8 | /284/CH9/EX9.4/ex_4.sce | d228584b34310c59a416f2dfad6dfc0e05007667 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 774 | sce | ex_4.sce | // Chapter 9_The bipolar transistor
//Caption_Gain factors
//Ex_4//page 373
DE=10
DB=25
XB=0.70*10^-4 //width of base
XE=0.50*10^-4 //width of emitter
NE=10^18 //doping concentration in emitter
NB=10^16 //doping concentration in base
VBE=0.65
e=1.6*10^-19
tau_eo=10^-7 //minority carrier lifetime in emitter
tau_bo=5*10^-7 //minority carrier lifetime in base
Jro=5*10^-8
T=300
peo=(1.5*10^10)^2/NE
nbo=(1.5*10^10)^2/NB
Le=(DE*tau_eo)^0.5
Lb=(DB*tau_bo)^0.5
gamma_i=1/(1+((peo*DE*Lb*tanh(0.0198))/(nbo*DB*Le*tanh(0.050))))
alpha_T=1/(cosh(XB/Lb))
Jso=e*DB*nbo/(Lb*tanh(XB/Lb))
delta=1/1+(Jro*exp(-VBE/(2*0.0259)/Jso))
delta=0.99986
alpha=gamma_i*alpha_T*delta
beta_i=alpha/(1-alpha)
printf('Common emitter current gain is %1.0f',beta_i) |
84831d148b0114e5fa0a5e62ea5b8b4dae1f4c96 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1076/CH4/EX4.1/4_1.sce | beadb792e62f71154cfd6106b05c5d2e5f076bdc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 419 | sce | 4_1.sce | clear;
clc;
C=1;
C1=0.1;
V=66;
n=4;
v1= 1;
v2= (C+C1) * v1;
v3= (C * v2) + (C1*(v1+v2));
v4= (C * v3) + (C1*(v1+v2+v3));
V1= V/(sqrt(3)*(v1+v2+v3+v4));
V2= v2* V1;
V3= v3* V1;
V4= v4* V1;
mprintf("\n V1= %.2f kV",V1);
mprintf("\n V2= %.2f kV",V2);
mprintf("\n V3= %.2f kV",V3);
mprintf("\n V4= %.2f kV",V4);
eff= (V1+V2+V3+V4)/(n*V4) *100;
mprintf("\n string efficiency= %.1f percent",eff);
|
9f9062d2c3b0322e9f753e40525acfc66d1e15e6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2855/CH13/EX13.1/Ex13_1.sce | 4026724edeca9bea65b220259c24d79b3a3f758a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 378 | sce | Ex13_1.sce | //Chapter 13
//page no 568
//given
clc;
clear all;
Vcc=5; //in V
Vf=1.5; //in V
If=60; //in mA
B=3.97;
N=3;
R9=(Vcc-Vf)*(B+1)/If/10^-3;
printf("\n R9 = %0.0f ohm\n",R9);
R7=R9/2/B-3/N;
printf("\n R7 = %0.1f ohm\n",R7);
R8=R9/2/B;
printf("\n R8 = %0.1f ohm\n",R8);
C4=2*10^-9/R8;
printf("\n C4 = %0.0f pF",C4*10^12);
|
8ef9a9186d4d376c3eaf05a76af570ad44e6dae7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1673/CH9/EX9.7/9_7.sce | f259cae3cc2e0717c24ba04ad2359e19e9b11c43 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 851 | sce | 9_7.sce | //bender-schimdt's formula and crank-nicolson formula
//example 9.7
//page 363
//bender -schimdt's formula
clc;clear;close;
deff('y=f(x,t)','y=exp(-%pi^2*t)*sin(%pi*x)');
u=[f(0,0) f(0.2,0) f(0.4,0) f(0.6,0) f(0.8,0) f(1,0)];
u11=u(3)/2;u12=(u(2)+u(4))/2;u13=u12;u14=u11;
printf(' u11=%f\t u12=%f\t u13=%f\t u14=%f\n\n',u11,u12,u13,u14)
u21=u12/2;u22=(u12+u14)/2;u23=u22;u24=u21;
printf(' u21=%f\t u22=%f\t u23=%f\t u24=%f\n\n',u21,u22,u23,u24)
printf(' the error in the solution is: %f\n\n',abs(u22-f(0.6,0.04)))
//crank-nicolson formula
//by putting i=1,2,3,4 we obtain four equation
A=[4 -1 0 0 ;-1 4 -1 0;0 -1 4 -1;0 0 -1 4];
C=[0.9510;1.5388;1.5388;0.9510];
X=A^-1*C;
printf( ' u11=%f\t u21=%f\t u31=%f\t u41=%f\t\n\n',X(1,1),X(2,1),X(3,1),X(4,1))
printf(' the error in the solution is: %f\n\n',abs(X(2,1)-f(0.6,0.04))) |
8011ea948542b77e4917b6e7182eb09f22564762 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2273/CH9/EX9.13/ex9_13.sce | 5a13c237f9c8d2ddddd9158cfc4278b93d20be59 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 318 | sce | ex9_13.sce | //Calculate the kVA taken
clear;
clc;
//soltion
//given
C3=(0.2*10^-6)*20;//farad
Vph=11*10^3/sqrt(3);
f=50;//Hz
Cn=2*C3;
Ic=2*%pi*f*Vph*Cn;
printf("Charging current= %.2f A\n",Ic)
kVA=3*Vph*Ic*10^-3;
printf("kVA taken by the cable= %.2f kVA",kVA);
//IN BOOK IT IS 24.75 kVA DUE TO SOME PRINTING MISTAKE
|
34bc922a362807057e34b8d8f314748030c1041c | 449d555969bfd7befe906877abab098c6e63a0e8 | /647/CH12/EX12.15/Example12_15.sce | 9037345276fcca5f8089ee48d801287d6a5eeadb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,396 | sce | Example12_15.sce | clear;
clc;
// Example: 12.15
// Page: 498
printf("Example: 12.15 - Page: 498\n\n");
// Solution
//*****Data******//
// Reaction: CH3COOH(l) + C2H5OH(l) --------> CH3COOC2H5(l) + H2O(l)
T = 373.15;// [K]
nCH3COOH_feed = 1;
nC2H5OH_feed = 1;
deltaHf_CH3COOH = -484.5;// [kJ]
deltaHf_C2H5OH = -277.69;// [kJ]
deltaHf_CH3COOC2H5 = -480;// [kJ]
deltaHf_H2O = -285.83;// [kJ]
deltaGf_CH3COOH = -389.9;// [kJ]
deltaGf_C2H5OH = -174.78;// [kJ]
deltaGf_CH3COOC2H5 = -332.2;// [kJ]
deltaGf_H2O = -237.13;// [kJ]
R = 8.314;// [J/mol K]
//******************//
deltaH_298 = deltaHf_CH3COOC2H5 + deltaHf_H2O - deltaHf_CH3COOH - deltaHf_C2H5OH;// [kJ]
deltaG_298 = deltaGf_CH3COOC2H5 + deltaGf_H2O - deltaGf_CH3COOH - deltaGf_C2H5OH;// [kJ]
T0 = 298;// [K]
K_298 = exp(-(deltaG_298*1000/(R*T0)));
K_373 = K_298*exp((deltaH_298*1000/R)*((1/T0) - (1/T)));
// Let e be the degree of completion at equilibrium.
// nCH3COOH_eqb = 1 - e;
// nC2H5OH_eqb = 1 - e;
// nCH3COOC2H5_eqb = e;
// nH2O_eqb = e;
// Total moles at equilibrium = 1 - e + 1 - e + e + e = 2
// Mole fractions:
// ySO2_eqb = (1 - e)/2
// yO2_eqb = (1 - e)/2
// ySO3_eqb = e/2
// yAr_eqb = e/2
// Sum of Stoichiometric Coeffecient:
v = 1 + 1 - 1 - 1;
deff('[y] = f(e)','y = K_373 - ((e/2)*(e/2))/(((1 - e)/2)*((1 - e)/2))');
e = fsolve(0.5,f);
printf("Mole fraction of ethyl acetate is %.3f",e/2); |
3ab19ec52f92f1c0186cc9aa8f69dcaea2e0e932 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2201/CH9/EX9.30/ex9_30.sce | 6930bbe0e42c1a7b331f21f07fad23fef6c402eb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 620 | sce | ex9_30.sce | // Exa 9.30
clc;
clear;
close;
// Given data
I_DD= 20;// in mA
R2 = 10;// in k ohm
R1 = 30;// in k ohm
R_S= 1.2;// in k ohm
R_D= 500*10^-3;// in k ohm
V_DD = 12;// in V
Vp= -6;// in V
V_G = (R2/(R2+R1))*V_DD;// in V
I_D= poly(0,'I_D')
V_GS= V_G-I_D*R_S;// in V
I_D=I_D-I_DD*(1-V_GS/Vp)^2;
I_D= roots(I_D);// in mA
I_D= I_D(2);// in mA
V_DS= V_DD-I_D*(R_D+R_S);// in V
V_D= V_DD-I_D*R_D;// in V
V_S= V_D-V_DS;// in V
disp(I_D,"The value of I_D in mA is : ")
disp(V_DS,"The value of V_DS in volts is : ")
disp(V_D,"The value of V_D in volts is : ")
disp(V_S,"The value of V_S in volts is : ")
|
db6176ef5109e1ff5451c730f7d474802eb39d55 | 449d555969bfd7befe906877abab098c6e63a0e8 | /25/CH9/EX9.3/9_3.sce | 1aa7b3258bf2c93f0780c86d90a7ff681ae0aafe | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 258 | sce | 9_3.sce | // example:-9.3,page no.-482.
// program to find out number of filter elements required.
fc=8*10^9;f=11*10^9;
w=2*%pi*f;
wc=2*%pi*fc;
x=abs(w/wc)-1;
disp(x,"from table we see that an attenuation of 20 db at this frequency requires that N>=8 for x = ") |
126ff09cbb6cc62a4c0cb52037a2fd1fe0818c9e | 717ddeb7e700373742c617a95e25a2376565112c | /278/CH13/EX13.8/ex_13_8.sce | 877d2410c01ec5a202c9fae7e60949439d1de29c | [] | 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,331 | sce | ex_13_8.sce | //desing flange
clc
//soltuion
//given
P=90*10^3//W
N=250//rpm
ts=40//N/mm^2
q=0.0175
tb=30//N/mm^2
//let d be dia
T=(P*60*1000)/(2*%pi*N)//N-mm
//T/J=ts/(d/2)
//T/(%pi*d^4/32)=ts/(d/2)//considering strength iof shaft
d1=(35*10^6/80)^(1/3)//mm
//considering rigidity
//T/J=(C*q/l)
//T/(%pi*d^4/32)=84000*0.0175/(20*d)
d2=(35*10^6/73.5)^(1/3)//mm
printf("the value of d1 and d2 is,%f mm\n,%f mm\n",d1,d2)
printf("taking larger value into consideration i,e d2,we take d=d2=80mm\n")
d=80//mm
D=2*d//mm
printf("the outer dia of muff is,%f mm\n",D)
L=1.5*d//mm
printf("the length of muff is,%f mm\n",L)
//from table 13.1,we find that shaft of dia 70mm diametr
w=25//width of diametre
t1=14//mm//thickness of key
l=120//mm
//let tc be inducesd stress
//Tmax=(%pi/16)*tc*[(D^4-d^4)/D]
tc=T/{(%pi/16)*[(D^4-d^4)/D]}
printf("the induce stres is,%f N/mm^2\n",tc)
printf("the induced shear stress is less then 14,hence it is safe design\n ")
tf=0.5*d//mm
printf("the thicknes of flange is,%f mm\n",tf)
//let d1 be nominal dia of bolts
n=4
D1=3*d//mm
//Tqmax=(%pi/4)*d1^2*tb*n*D1/2
d1=sqrt(T/11311)//mm
D2=4*d//mm
tp=0.25*d
printf("the nominal dia of bolts is,%f mm\n",d1)
printf("the outer dia of flange is,%f mm\n",D2)
printf("the thickness of protective circumferencial flange is,%fmm",tp)
|
e3c883db0a5f9f6e727fa1be7a7c7f0d51b73416 | dc1af20bca10db33d1adcbf61d5fe874eb6eab07 | /CurrentRelease/vcast-workarea/vc_manage/PointOfSales_Manage/environment/ENV_MANAGER/ENV_MANAGER.tst | 8744615022eb73b6e181def7d85caaef7c33ea62 | [] | no_license | TimSVector/PointOfSales_v2 | 2d1130516cfc5d77f2e5d0f60adcde96374f6fc2 | ef630f05850715568725cf94cc0e497146a049d4 | refs/heads/master | 2023-08-04T10:51:50.031346 | 2023-08-03T20:50:28 | 2023-08-03T20:50:28 | 133,404,783 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 6,294 | tst | ENV_MANAGER.tst | -- VectorCAST 22.sp7 (12/04/22)
-- Test Case Script
--
-- Environment : ENV_MANAGER
-- Unit(s) Under Test: manager
--
-- Script Features
TEST.SCRIPT_FEATURE:C_DIRECT_ARRAY_INDEXING
TEST.SCRIPT_FEATURE:CPP_CLASS_OBJECT_REVISION
TEST.SCRIPT_FEATURE:MULTIPLE_UUT_SUPPORT
TEST.SCRIPT_FEATURE:REMOVED_CL_PREFIX
TEST.SCRIPT_FEATURE:MIXED_CASE_NAMES
TEST.SCRIPT_FEATURE:STANDARD_SPACING_R2
TEST.SCRIPT_FEATURE:OVERLOADED_CONST_SUPPORT
TEST.SCRIPT_FEATURE:UNDERSCORE_NULLPTR
TEST.SCRIPT_FEATURE:FULL_PARAMETER_TYPES
TEST.SCRIPT_FEATURE:STRUCT_DTOR_ADDS_POINTER
TEST.SCRIPT_FEATURE:STRUCT_FIELD_CTOR_ADDS_POINTER
TEST.SCRIPT_FEATURE:STATIC_HEADER_FUNCS_IN_UUTS
TEST.SCRIPT_FEATURE:VCAST_MAIN_NOT_RENAMED
--
-- Unit: manager
-- Subprogram: Add_Included_Dessert
-- Test Case: manager_add_included_dessert_cake
TEST.UNIT:manager
TEST.SUBPROGRAM:Add_Included_Dessert
TEST.NEW
TEST.NAME:manager_add_included_dessert_cake
TEST.BASIS_PATH:3 of 4
TEST.NOTES:
This is an automatically generated test case.
Test Path 3
(1) if (Order == (0)) ==> FALSE
(2) if ((Order->Entree == (STEAK) && Order->Salad == (CAESAR)) && Order->Beverage == (MIXED_DRINK)) ==> FALSE
(3) if ((Order->Entree == (LOBSTER) && Order->Salad == (GREEN)) && Order->Beverage == (WINE)) ==> TRUE
Test Case Generation Notes:
TEST.END_NOTES:
TEST.VALUE:manager.Add_Included_Dessert.Order:<<malloc 1>>
TEST.VALUE:manager.Add_Included_Dessert.Order[0].Salad:GREEN
TEST.VALUE:manager.Add_Included_Dessert.Order[0].Entree:LOBSTER
TEST.VALUE:manager.Add_Included_Dessert.Order[0].Beverage:WINE
TEST.EXPECTED:manager.Add_Included_Dessert.Order[0].Dessert:CAKE
TEST.END
-- Test Case: manager_add_included_dessert_none
TEST.UNIT:manager
TEST.SUBPROGRAM:Add_Included_Dessert
TEST.NEW
TEST.NAME:manager_add_included_dessert_none
TEST.BASIS_PATH:2 of 4
TEST.NOTES:
This is an automatically generated test case.
Test Path 2
(1) if (Order == (0)) ==> FALSE
(2) if ((Order->Entree == (STEAK) && Order->Salad == (CAESAR)) && Order->Beverage == (MIXED_DRINK)) ==> FALSE
(3) if ((Order->Entree == (LOBSTER) && Order->Salad == (GREEN)) && Order->Beverage == (WINE)) ==> FALSE
Test Case Generation Notes:
TEST.END_NOTES:
TEST.VALUE:manager.Add_Included_Dessert.Order:<<malloc 1>>
TEST.VALUE:manager.Add_Included_Dessert.Order[0].Entree:NO_ENTREE
TEST.VALUE:manager.Add_Included_Dessert.Order[0].Dessert:FRUIT
TEST.EXPECTED:manager.Add_Included_Dessert.Order[0].Dessert:FRUIT
TEST.END
-- Test Case: manager_add_included_dessert_null
TEST.UNIT:manager
TEST.SUBPROGRAM:Add_Included_Dessert
TEST.NEW
TEST.NAME:manager_add_included_dessert_null
TEST.BASIS_PATH:1 of 4
TEST.NOTES:
This is an automatically generated test case.
Test Path 1
(1) if (Order == (0)) ==> TRUE
Test Case Generation Notes:
TEST.END_NOTES:
TEST.VALUE:manager.Add_Included_Dessert.Order:<<null>>
TEST.END
-- Test Case: manager_add_included_dessert_pie
TEST.UNIT:manager
TEST.SUBPROGRAM:Add_Included_Dessert
TEST.NEW
TEST.NAME:manager_add_included_dessert_pie
TEST.BASIS_PATH:4 of 4
TEST.NOTES:
This is an automatically generated test case.
Test Path 4
(1) if (Order == (0)) ==> FALSE
(2) if ((Order->Entree == (STEAK) && Order->Salad == (CAESAR)) && Order->Beverage == (MIXED_DRINK)) ==> TRUE
Test Case Generation Notes:
TEST.END_NOTES:
TEST.VALUE:manager.Add_Included_Dessert.Order:<<malloc 1>>
TEST.VALUE:manager.Add_Included_Dessert.Order[0].Salad:CAESAR
TEST.VALUE:manager.Add_Included_Dessert.Order[0].Entree:STEAK
TEST.VALUE:manager.Add_Included_Dessert.Order[0].Beverage:MIXED_DRINK
TEST.EXPECTED:manager.Add_Included_Dessert.Order[0].Dessert:PIE
TEST.END
-- Subprogram: Place_Order
-- Test Case: manager_Place_Order_All_Entrees
TEST.UNIT:manager
TEST.SUBPROGRAM:Place_Order
TEST.NEW
TEST.NAME:manager_Place_Order_All_Entrees
TEST.VALUE:manager.Place_Order.Table:1
TEST.VALUE:manager.Place_Order.Seat:1
TEST.VALUE:manager.Place_Order.Order.Soup:ONION
TEST.VALUE:manager.Place_Order.Order.Entree:VARY FROM:NO_ENTREE TO:PASTA BY: 1
TEST.VALUE:manager.Place_Order.Order.Beverage:WINE
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Is_Occupied:v_true
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Number_In_Party:1
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Order[1].Soup:ONION
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Order[1].Entree:NO_ENTREE..PASTA
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Order[1].Beverage:WINE
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Check_Total:0.0..20.0
TEST.END
-- Subprogram: Place_Order
-- Test Case: manager_Place_Order_Fish
TEST.UNIT:manager
TEST.SUBPROGRAM:Place_Order
TEST.NEW
TEST.NAME:manager_Place_Order_Fish
TEST.VALUE:manager.Place_Order.Table:1
TEST.VALUE:manager.Place_Order.Seat:1
TEST.VALUE:manager.Place_Order.Order.Entree:FISH
TEST.VALUE:manager.Place_Order.Order.Beverage:WINE
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Is_Occupied:v_true
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Number_In_Party:1
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Order[1].Soup:ONION
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Order[1].Entree:FISH
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Order[1].Beverage:WINE
TEST.EXPECTED:uut_prototype_stubs.Update_Record.Data.Check_Total:0.0..20.0
TEST.END
-- Test Case: manager_Place_Order_SeatCount
TEST.UNIT:manager
TEST.SUBPROGRAM:Place_Order
TEST.NEW
TEST.NAME:manager_Place_Order_SeatCount
TEST.VALUE:manager.Place_Order.Table:VARY FROM:0 TO:3 BY: 1
TEST.EXPECTED:manager.Place_Order.return:0
TEST.END
-- Test Case: manager_Place_Order_TableCount
TEST.UNIT:manager
TEST.SUBPROGRAM:Place_Order
TEST.NEW
TEST.NAME:manager_Place_Order_TableCount
TEST.VALUE:manager.Place_Order.Table:VARY FROM:0 TO:5 BY: 1
TEST.EXPECTED:manager.Place_Order.return:0
TEST.END
-- COMPOUND TESTS
TEST.SUBPROGRAM:<<COMPOUND>>
TEST.NEW
TEST.NAME:manager_SpecialsTest
TEST.SLOT: "1", "manager", "Add_Included_Dessert", "1", "manager_add_included_dessert_null"
TEST.SLOT: "2", "manager", "Add_Included_Dessert", "1", "manager_add_included_dessert_none"
TEST.SLOT: "3", "manager", "Add_Included_Dessert", "1", "manager_add_included_dessert_cake"
TEST.SLOT: "4", "manager", "Add_Included_Dessert", "1", "manager_add_included_dessert_pie"
TEST.END
--
|
fcccde0f44be993be2bb3ec67a6943eb958a9e13 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2507/CH2/EX2.3/Ex2_3.sce | 254070dbec40489fe9011b5313634395839526ac | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 267 | sce | Ex2_3.sce | clc
clear
printf("Example 2.3 | Page number 32 \n\n");
//Indentify interaction between battery and resistor
//This example has a theoritical solution please refer to the textbook.
printf("This example has a theoritical solution please refer to the textbook."); |
827c41021f166fd62d5f12122525d29dbddcd32f | 449d555969bfd7befe906877abab098c6e63a0e8 | /122/CH7/EX7.9/exa7_9.sce | c919f67230422a4459e627d18e1cc0e89a9af3f9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 309 | sce | exa7_9.sce | // Example 7-9
// Polar Plot with transport lag
clear; clc;
xdel(winsid()); //close all windows
T = 10;
L = 100;
omega = logspace(-1,2,1000);
s = %i * omega;
den = s .* (T*s + 1);
num = exp(-1*s*L);
repf = num ./ den;
rad = abs(repf);
theta = atan(imag(repf),real(repf));
polarplot(theta,rad,style = 2);
|
1558a87f0be149054afe35ed16e9c4c716c8d628 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/macros/percent/%hm_sin.sci | 648a23ea521dd5726b15f1420f3cbf3856a2878e | [
"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 | 76 | sci | %hm_sin.sci | function M=%hm_sin(M)
// Copyright INRIA
M('entries')=sin(M('entries'))
|
58658e3b2b1179e62f8bc8053ac3b863e6bfd36c | 94c9fb094976265935872b32b6e6a4fd9454ef31 | /tp1/lineaire_bivarie.sce | 310834921622a2b534b1596f4009176426c873fa | [] | no_license | dtbinh/tp-scilab | 6d2373af479d9cb1d1494f3ccc5abcae0697b8ac | 4c41c77eb4a4021022fa91614cfe4f7a4417f4e5 | refs/heads/master | 2021-01-10T12:23:53.166922 | 2013-12-19T17:23:18 | 2013-12-19T17:23:18 | 49,208,752 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 192 | sce | lineaire_bivarie.sce | X2 = X(:, 9);
w2=inv(X2'*X2)*X2'*t;
Y2=X2*w2;
figure();
subplot(2, 1, 1);
plot(X2, t, 'b.');
plot(X2, Y2, 'r.');
subplot(2, 1, 2);
plot(Y2,t,'b.');
xtitle("Bivarie - Valeur prevu et reel");
|
3f8f0cfae2f2ece1580066fc369080b380538144 | 01ecab2f6eeeff384acae2c4861aa9ad1b3f6861 | /sci2blif/block_info/bi_I_SenseAmp.sci | 1024f20de9dbafb19b16865d4592acd642d9c91f | [] | no_license | jhasler/rasp30 | 9a7c2431d56c879a18b50c2d43e487d413ceccb0 | 3612de44eaa10babd7298d2e0a7cddf4a4b761f6 | refs/heads/master | 2023-05-25T08:21:31.003675 | 2023-05-11T16:19:59 | 2023-05-11T16:19:59 | 62,917,238 | 3 | 3 | null | null | null | null | UTF-8 | Scilab | false | false | 1,308 | sci | bi_I_SenseAmp.sci | I_SenseAmp,2,1,9
2,1,2
7,3,4,5,6,7,8,9
num_of_blk,1,mblif_num,0,I_SenseAmp_fgota0_ibias,2e-6,I_SenseAmp_fgota0_pbias,2e-6,I_SenseAmp_fgota0_nbias,2e-6,I_SenseAmp_ota0_ibias,2e-6,I_SenseAmp_cap0,1,I_SenseAmp_cap1,1,fix_loc',[0;0;0]
num_of_blk,mblif_num,I_SenseAmp_fgota0_ibias,I_SenseAmp_fgota0_pbias,I_SenseAmp_fgota0_nbias,I_SenseAmp_ota0_ibias,I_SenseAmp_cap0,I_SenseAmp_cap1,fix_loc
6,1,16,1,19,1,22,1,25,1,28,1,31
1,0,0
I_SenseAmp,1,1,2,1,7,1,1,1,2,1,3,0,I_SenseAmp_ls,0,1,I_SenseAmp_fgota0_ibias,1,1,I_SenseAmp_fgota0_pbias,2,1,I_SenseAmp_fgota0_nbias,3,1,I_SenseAmp_ota0_ibias,4,3,I_SenseAmp_cap0,5,3,I_SenseAmp_cap1,6
//------ Here, everything should be in Order with no space ------//
// Xcos block name, # of input, # of output, # of Xcos paramters (exprs)
// # of ipar, order
// # of rpar, order
// Xcos parameter, default value, ...
// Xcos parameters - exprs
// # of user defined rpars, BLIF block #, column #, ...
// # of BLIF blocks, # of rpar BLIF parameters,vcc_flag,gnd_flag
// 1st block name, mblif #, vectorized #, # of input, # of output, # of BLIF parameters, input type(0:internal,1:external,2:vcc,3:gnd), number/name, output type, number/name, BLIF parameters type(0:connection,1:bias,2:bias(hidden),3:cap,4:cap(hidden),5:smcap,6:smcap(hidden)), name, value / Xcos parameter # in rpar
|
c89bc3fd707d387f4d1ef1cc7609e095bffe3998 | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH16/EX16.18/18.sce | 3679770f34b8db5ec98c16b4451a64603a4b7044 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 614 | sce | 18.sce | clc
y=1.4;
p1=26.5; //kN/m^2
rho_1=0.413; //kg/m^3
M1=2;
R=287;
M2=sqrt(((y-1)*M1^2 + 2)/(2*y*M1^2 - (y-1)));
disp("Mach number M2=")
disp(M2)
p2=p1*(2*y*M1^2 - (y-1))/(y+1);
disp("p2=")
disp(p2)
disp("kN/m^2")
rho_2=rho_1*((y+1)*M1^2)/((y-1)*M1^2 + 2);
disp("density, rho_2 =")
disp(rho_2)
disp("kg/m^3")
T1=p1*10^3/rho_1/R;
disp("T1=")
disp(T1)
disp("K")
T2=T1*((y-1)*M1^2 + 2)*(2*y*M1^2 - (y-1))/((y+1)^2*M1^2);
disp("T2=")
disp(T2)
disp("K")
C1=sqrt(y*R*T1);
V1=M1*C1;
disp("V1=")
disp(V1)
disp("m/s")
C2=sqrt(y*R*T2);
V2=M2*C2;
disp("V2 =")
disp(V2)
disp("m/s") |
7845693b63c7f023ee873a4180f0bbc33a495827 | 852a887149cf08573ae15977b6bddfd7e4ad6b90 | /projects/00/Mux16.tst | a36e7408728818c1f267182109981936e136962d | [] | no_license | SamuelWiet/ElementsOfComputingSystemsProjects | 0ecd3cc51a6495ed7fe145100d091d8ed9a1c502 | 06732828a214838934569cb5dd57d1e0b85220e5 | refs/heads/master | 2022-11-12T03:40:35.880347 | 2012-09-05T11:44:08 | 2012-09-05T11:44:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 437 | tst | Mux16.tst | // File name: projects/00/Mux16.tst
load Mux16.hdl,
output-file Mux16.out,
compare-to Mux16.cmp,
output-list a%X1.6.1 b%X1.6.1 sel%B1.3.1 out%X1.6.1;
set a 0,
set b 0,
set sel 0,
eval,
output;
set a -1,
set b 2,
set sel 0,
eval,
output;
set a %Xff0f,
set b %Xf0ff,
set sel 0,
eval,
output;
set a 0,
set b 0,
set sel 1,
eval,
output;
set a -1,
set b 2,
set sel 1,
eval,
output;
set a %Xff0f,
set b %Xf0ff,
set sel 1,
eval,
output;
|
4ea5f9376de19cfdfb28306e90d7320b2d78b131 | cc2d34f24c651a9d4b81fc3ebd32ef5a23c5ef13 | /SCILAB5/SCILAB3/dfFilter10.sci | f13ec0920578551681875edec4681478352f2d5a | [] | no_license | b4ss3k/D_DSP | 85cfacf4e948109faa33cbc424390b44f53cc197 | aabcc12fe0305e29713de6c0538428dd9ef323d3 | refs/heads/master | 2020-04-06T04:46:40.053395 | 2015-08-05T01:24:16 | 2015-08-05T01:24:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 380 | sci | dfFilter10.sci | //filtering of signals
//make signal and filter
xbasc(); //clear graphics windows
xselect(); //select new graphics windows
mode(1) // select a mode in exec file (1) silent mode
[h,hm,fr]=wfir('lp',33,[.2 0],'hm',[0 0]);
t=1:200;
x1=sin(2*%pi*t/20);
x2=sin(2*%pi*t/3);
x=x1+x2;
z=poly(0,'z');
hz=syslin('d',poly(h,'z','c')./z**33);
yhz=flts(x,hz);
plot(yhz)
halt(),xbasc();
|
30debf7b44e74587478b2ab1a19e875b8ed99790 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2510/CH11/EX11.16/Ex11_16.sce | 9b7dbbfecd3663e20506229c6d5e37cfe9edd3c1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 693 | sce | Ex11_16.sce | //Variable declaration:
FV = 1.0 //Correction factor
//From example 11.9:
FE = 0.358 //Emissivity correction factor
TH = 300.0+460.0 //Absolute temperature of external surface (°R)
TC = 75.0+460.0 //Absolute temperature of duct (°R)
AH = 0.622 //Area of pipe (ft^2)
s = 0.173*10**-8 //Stefan-Boltzmann constant
//Calculation:
Q = FV*FE*AH*s*(TH**4-TC**4) //Heat transfer rate (Btu/h.ft)
//Result:
printf("The heat transfer rate is : %.2f Btu/h.ft",Q)
printf("Since, Q obtained in (11.9) is 96.96 Btu/h.ft, the solution does not match with book.")
|
603c37cd994479085c0ca65b4ff11174e628ce7c | 035464a624f6f991af3d52aa977283771e8be0cd | /ИТ/6.sce | da85d6ed7bab6b21610bfbcb8ea0971ee3ef6f00 | [] | no_license | AlexLasher/infTech | 4a927a7430b3430948ff5e080629a8d971ec3919 | 8c4ee19fc907b9b9b7ad7fb6af4872774e0ad3f6 | refs/heads/master | 2021-01-22T18:28:00.896093 | 2017-06-10T04:35:08 | 2017-06-10T04:35:08 | 85,083,402 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 118 | sce | 6.sce | i=2
for j = 1:3,
if i == j then
a(i,j) = 2;
elseif abs(i-j) == 1 then
a(i,j) = -1;
else a(i,j) = 0;
end,
end
|
73c431d4462d1b178cad54168534b2972d93a57b | 22320bddf16dbfcc8fe80aaf0e0609322a9bf600 | /experiment/Exp2/Vp017/Vp017_UpDown_Identification.sce | a0fa194d3f7ae448a2de86abd677042bcd404c3f | [] | no_license | mwegrzyn/Categorical-Perception-of-Emotions-in-Face-Parts | dc32f18a81bc271ebfd3d3fb9459f715731ba619 | 1e5fe7a7a53552d65b6155586c1d01567afcd17b | refs/heads/master | 2021-01-10T06:54:48.176164 | 2017-07-22T12:23:34 | 2017-07-22T12:23:34 | 44,431,070 | 0 | 1 | null | null | null | null | ISO-8859-1 | Scilab | false | false | 65,939 | sce | Vp017_UpDown_Identification.sce | #--------------------------- V.2014.08.14 MW
active_buttons = 3;
button_codes = 1,2,3;
response_matching = simple_matching;
default_background_color = 0, 0, 0;
default_font = "Times";
default_font_size = 32;
#---------------------------
$fwid = 480;
$xpos = 0;
$ypos = 0;
$facein = 100;
#--------------------------- Arrays with Stimuli
begin;
array{
bitmap { filename = "MorphF1_00_orig.jpg";description= "MorphF1_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_01_orig.jpg";description= "MorphF1_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_02_orig.jpg";description= "MorphF1_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_03_orig.jpg";description= "MorphF1_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_04_orig.jpg";description= "MorphF1_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_05_orig.jpg";description= "MorphF1_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_06_orig.jpg";description= "MorphF1_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_07_orig.jpg";description= "MorphF1_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_08_orig.jpg";description= "MorphF1_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_09_orig.jpg";description= "MorphF1_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_10_orig.jpg";description= "MorphF1_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face1_array;
array{
bitmap { filename = "MorphF2_00_orig.jpg";description= "MorphF2_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_01_orig.jpg";description= "MorphF2_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_02_orig.jpg";description= "MorphF2_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_03_orig.jpg";description= "MorphF2_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_04_orig.jpg";description= "MorphF2_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_05_orig.jpg";description= "MorphF2_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_06_orig.jpg";description= "MorphF2_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_07_orig.jpg";description= "MorphF2_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_08_orig.jpg";description= "MorphF2_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_09_orig.jpg";description= "MorphF2_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_10_orig.jpg";description= "MorphF2_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face2_array;
array{
bitmap { filename = "MorphF3_00_orig.jpg";description= "MorphF3_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_01_orig.jpg";description= "MorphF3_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_02_orig.jpg";description= "MorphF3_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_03_orig.jpg";description= "MorphF3_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_04_orig.jpg";description= "MorphF3_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_05_orig.jpg";description= "MorphF3_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_06_orig.jpg";description= "MorphF3_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_07_orig.jpg";description= "MorphF3_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_08_orig.jpg";description= "MorphF3_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_09_orig.jpg";description= "MorphF3_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_10_orig.jpg";description= "MorphF3_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face3_array;
array{
bitmap { filename = "MorphF4_00_orig.jpg";description= "MorphF4_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_01_orig.jpg";description= "MorphF4_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_02_orig.jpg";description= "MorphF4_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_03_orig.jpg";description= "MorphF4_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_04_orig.jpg";description= "MorphF4_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_05_orig.jpg";description= "MorphF4_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_06_orig.jpg";description= "MorphF4_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_07_orig.jpg";description= "MorphF4_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_08_orig.jpg";description= "MorphF4_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_09_orig.jpg";description= "MorphF4_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_10_orig.jpg";description= "MorphF4_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face4_array;
array{
bitmap { filename = "MorphF5_00_orig.jpg";description= "MorphF5_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_01_orig.jpg";description= "MorphF5_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_02_orig.jpg";description= "MorphF5_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_03_orig.jpg";description= "MorphF5_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_04_orig.jpg";description= "MorphF5_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_05_orig.jpg";description= "MorphF5_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_06_orig.jpg";description= "MorphF5_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_07_orig.jpg";description= "MorphF5_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_08_orig.jpg";description= "MorphF5_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_09_orig.jpg";description= "MorphF5_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_10_orig.jpg";description= "MorphF5_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face5_array;
array{
bitmap { filename = "MorphF6_00_orig.jpg";description= "MorphF6_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_01_orig.jpg";description= "MorphF6_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_02_orig.jpg";description= "MorphF6_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_03_orig.jpg";description= "MorphF6_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_04_orig.jpg";description= "MorphF6_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_05_orig.jpg";description= "MorphF6_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_06_orig.jpg";description= "MorphF6_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_07_orig.jpg";description= "MorphF6_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_08_orig.jpg";description= "MorphF6_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_09_orig.jpg";description= "MorphF6_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_10_orig.jpg";description= "MorphF6_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face6_array;
array{
bitmap { filename = "MorphF7_00_orig.jpg";description= "MorphF7_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_01_orig.jpg";description= "MorphF7_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_02_orig.jpg";description= "MorphF7_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_03_orig.jpg";description= "MorphF7_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_04_orig.jpg";description= "MorphF7_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_05_orig.jpg";description= "MorphF7_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_06_orig.jpg";description= "MorphF7_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_07_orig.jpg";description= "MorphF7_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_08_orig.jpg";description= "MorphF7_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_09_orig.jpg";description= "MorphF7_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_10_orig.jpg";description= "MorphF7_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face7_array;
array{
bitmap { filename = "MorphF8_00_orig.jpg";description= "MorphF8_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_01_orig.jpg";description= "MorphF8_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_02_orig.jpg";description= "MorphF8_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_03_orig.jpg";description= "MorphF8_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_04_orig.jpg";description= "MorphF8_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_05_orig.jpg";description= "MorphF8_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_06_orig.jpg";description= "MorphF8_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_07_orig.jpg";description= "MorphF8_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_08_orig.jpg";description= "MorphF8_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_09_orig.jpg";description= "MorphF8_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_10_orig.jpg";description= "MorphF8_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face8_array;
array{
bitmap { filename = "MorphF9_00_orig.jpg";description= "MorphF9_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_01_orig.jpg";description= "MorphF9_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_02_orig.jpg";description= "MorphF9_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_03_orig.jpg";description= "MorphF9_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_04_orig.jpg";description= "MorphF9_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_05_orig.jpg";description= "MorphF9_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_06_orig.jpg";description= "MorphF9_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_07_orig.jpg";description= "MorphF9_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_08_orig.jpg";description= "MorphF9_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_09_orig.jpg";description= "MorphF9_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_10_orig.jpg";description= "MorphF9_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face9_array;
array{
bitmap { filename = "MorphF10_00_orig.jpg";description= "MorphF10_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_01_orig.jpg";description= "MorphF10_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_02_orig.jpg";description= "MorphF10_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_03_orig.jpg";description= "MorphF10_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_04_orig.jpg";description= "MorphF10_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_05_orig.jpg";description= "MorphF10_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_06_orig.jpg";description= "MorphF10_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_07_orig.jpg";description= "MorphF10_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_08_orig.jpg";description= "MorphF10_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_09_orig.jpg";description= "MorphF10_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_10_orig.jpg";description= "MorphF10_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face10_array;
array{
bitmap { filename = "MorphM1_00_orig.jpg";description= "MorphM1_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_01_orig.jpg";description= "MorphM1_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_02_orig.jpg";description= "MorphM1_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_03_orig.jpg";description= "MorphM1_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_04_orig.jpg";description= "MorphM1_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_05_orig.jpg";description= "MorphM1_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_06_orig.jpg";description= "MorphM1_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_07_orig.jpg";description= "MorphM1_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_08_orig.jpg";description= "MorphM1_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_09_orig.jpg";description= "MorphM1_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_10_orig.jpg";description= "MorphM1_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face11_array;
array{
bitmap { filename = "MorphM2_00_orig.jpg";description= "MorphM2_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_01_orig.jpg";description= "MorphM2_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_02_orig.jpg";description= "MorphM2_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_03_orig.jpg";description= "MorphM2_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_04_orig.jpg";description= "MorphM2_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_05_orig.jpg";description= "MorphM2_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_06_orig.jpg";description= "MorphM2_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_07_orig.jpg";description= "MorphM2_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_08_orig.jpg";description= "MorphM2_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_09_orig.jpg";description= "MorphM2_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_10_orig.jpg";description= "MorphM2_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face12_array;
array{
bitmap { filename = "MorphM3_00_orig.jpg";description= "MorphM3_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_01_orig.jpg";description= "MorphM3_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_02_orig.jpg";description= "MorphM3_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_03_orig.jpg";description= "MorphM3_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_04_orig.jpg";description= "MorphM3_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_05_orig.jpg";description= "MorphM3_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_06_orig.jpg";description= "MorphM3_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_07_orig.jpg";description= "MorphM3_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_08_orig.jpg";description= "MorphM3_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_09_orig.jpg";description= "MorphM3_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_10_orig.jpg";description= "MorphM3_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face13_array;
array{
bitmap { filename = "MorphM4_00_orig.jpg";description= "MorphM4_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_01_orig.jpg";description= "MorphM4_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_02_orig.jpg";description= "MorphM4_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_03_orig.jpg";description= "MorphM4_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_04_orig.jpg";description= "MorphM4_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_05_orig.jpg";description= "MorphM4_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_06_orig.jpg";description= "MorphM4_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_07_orig.jpg";description= "MorphM4_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_08_orig.jpg";description= "MorphM4_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_09_orig.jpg";description= "MorphM4_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_10_orig.jpg";description= "MorphM4_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face14_array;
array{
bitmap { filename = "MorphM5_00_orig.jpg";description= "MorphM5_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_01_orig.jpg";description= "MorphM5_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_02_orig.jpg";description= "MorphM5_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_03_orig.jpg";description= "MorphM5_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_04_orig.jpg";description= "MorphM5_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_05_orig.jpg";description= "MorphM5_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_06_orig.jpg";description= "MorphM5_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_07_orig.jpg";description= "MorphM5_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_08_orig.jpg";description= "MorphM5_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_09_orig.jpg";description= "MorphM5_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_10_orig.jpg";description= "MorphM5_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face15_array;
array{
bitmap { filename = "MorphM6_00_orig.jpg";description= "MorphM6_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_01_orig.jpg";description= "MorphM6_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_02_orig.jpg";description= "MorphM6_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_03_orig.jpg";description= "MorphM6_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_04_orig.jpg";description= "MorphM6_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_05_orig.jpg";description= "MorphM6_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_06_orig.jpg";description= "MorphM6_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_07_orig.jpg";description= "MorphM6_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_08_orig.jpg";description= "MorphM6_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_09_orig.jpg";description= "MorphM6_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_10_orig.jpg";description= "MorphM6_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face16_array;
array{
bitmap { filename = "MorphM7_00_orig.jpg";description= "MorphM7_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_01_orig.jpg";description= "MorphM7_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_02_orig.jpg";description= "MorphM7_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_03_orig.jpg";description= "MorphM7_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_04_orig.jpg";description= "MorphM7_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_05_orig.jpg";description= "MorphM7_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_06_orig.jpg";description= "MorphM7_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_07_orig.jpg";description= "MorphM7_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_08_orig.jpg";description= "MorphM7_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_09_orig.jpg";description= "MorphM7_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_10_orig.jpg";description= "MorphM7_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face17_array;
array{
bitmap { filename = "MorphM8_00_orig.jpg";description= "MorphM8_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_01_orig.jpg";description= "MorphM8_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_02_orig.jpg";description= "MorphM8_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_03_orig.jpg";description= "MorphM8_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_04_orig.jpg";description= "MorphM8_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_05_orig.jpg";description= "MorphM8_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_06_orig.jpg";description= "MorphM8_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_07_orig.jpg";description= "MorphM8_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_08_orig.jpg";description= "MorphM8_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_09_orig.jpg";description= "MorphM8_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_10_orig.jpg";description= "MorphM8_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face18_array;
array{
bitmap { filename = "MorphM9_00_orig.jpg";description= "MorphM9_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_01_orig.jpg";description= "MorphM9_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_02_orig.jpg";description= "MorphM9_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_03_orig.jpg";description= "MorphM9_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_04_orig.jpg";description= "MorphM9_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_05_orig.jpg";description= "MorphM9_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_06_orig.jpg";description= "MorphM9_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_07_orig.jpg";description= "MorphM9_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_08_orig.jpg";description= "MorphM9_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_09_orig.jpg";description= "MorphM9_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_10_orig.jpg";description= "MorphM9_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face19_array;
array{
bitmap { filename = "MorphM10_00_orig.jpg";description= "MorphM10_00_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_01_orig.jpg";description= "MorphM10_01_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_02_orig.jpg";description= "MorphM10_02_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_03_orig.jpg";description= "MorphM10_03_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_04_orig.jpg";description= "MorphM10_04_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_05_orig.jpg";description= "MorphM10_05_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_06_orig.jpg";description= "MorphM10_06_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_07_orig.jpg";description= "MorphM10_07_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_08_orig.jpg";description= "MorphM10_08_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_09_orig.jpg";description= "MorphM10_09_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_10_orig.jpg";description= "MorphM10_10_orig.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face20_array;
array{
bitmap { filename = "MorphF1_00_UPPER.jpg"; description="MorphF1_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_10_UPPER.jpg"; description="MorphF1_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_00_LOWER.jpg"; description="MorphF1_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF1_10_LOWER.jpg"; description="MorphF1_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face1_half;
array{
bitmap { filename = "MorphF2_00_UPPER.jpg"; description="MorphF2_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_10_UPPER.jpg"; description="MorphF2_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_00_LOWER.jpg"; description="MorphF2_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF2_10_LOWER.jpg"; description="MorphF2_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face2_half;
array{
bitmap { filename = "MorphF3_00_UPPER.jpg"; description="MorphF3_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_10_UPPER.jpg"; description="MorphF3_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_00_LOWER.jpg"; description="MorphF3_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF3_10_LOWER.jpg"; description="MorphF3_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face3_half;
array{
bitmap { filename = "MorphF4_00_UPPER.jpg"; description="MorphF4_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_10_UPPER.jpg"; description="MorphF4_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_00_LOWER.jpg"; description="MorphF4_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF4_10_LOWER.jpg"; description="MorphF4_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face4_half;
array{
bitmap { filename = "MorphF5_00_UPPER.jpg"; description="MorphF5_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_10_UPPER.jpg"; description="MorphF5_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_00_LOWER.jpg"; description="MorphF5_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF5_10_LOWER.jpg"; description="MorphF5_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face5_half;
array{
bitmap { filename = "MorphF6_00_UPPER.jpg"; description="MorphF6_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_10_UPPER.jpg"; description="MorphF6_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_00_LOWER.jpg"; description="MorphF6_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF6_10_LOWER.jpg"; description="MorphF6_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face6_half;
array{
bitmap { filename = "MorphF7_00_UPPER.jpg"; description="MorphF7_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_10_UPPER.jpg"; description="MorphF7_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_00_LOWER.jpg"; description="MorphF7_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF7_10_LOWER.jpg"; description="MorphF7_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face7_half;
array{
bitmap { filename = "MorphF8_00_UPPER.jpg"; description="MorphF8_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_10_UPPER.jpg"; description="MorphF8_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_00_LOWER.jpg"; description="MorphF8_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF8_10_LOWER.jpg"; description="MorphF8_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face8_half;
array{
bitmap { filename = "MorphF9_00_UPPER.jpg"; description="MorphF9_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_10_UPPER.jpg"; description="MorphF9_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_00_LOWER.jpg"; description="MorphF9_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF9_10_LOWER.jpg"; description="MorphF9_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face9_half;
array{
bitmap { filename = "MorphF10_00_UPPER.jpg"; description="MorphF10_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_10_UPPER.jpg"; description="MorphF10_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_00_LOWER.jpg"; description="MorphF10_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphF10_10_LOWER.jpg"; description="MorphF10_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face10_half;
array{
bitmap { filename = "MorphM1_00_UPPER.jpg"; description="MorphM1_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_10_UPPER.jpg"; description="MorphM1_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_00_LOWER.jpg"; description="MorphM1_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM1_10_LOWER.jpg"; description="MorphM1_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face11_half;
array{
bitmap { filename = "MorphM2_00_UPPER.jpg"; description="MorphM2_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_10_UPPER.jpg"; description="MorphM2_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_00_LOWER.jpg"; description="MorphM2_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM2_10_LOWER.jpg"; description="MorphM2_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face12_half;
array{
bitmap { filename = "MorphM3_00_UPPER.jpg"; description="MorphM3_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_10_UPPER.jpg"; description="MorphM3_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_00_LOWER.jpg"; description="MorphM3_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM3_10_LOWER.jpg"; description="MorphM3_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face13_half;
array{
bitmap { filename = "MorphM4_00_UPPER.jpg"; description="MorphM4_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_10_UPPER.jpg"; description="MorphM4_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_00_LOWER.jpg"; description="MorphM4_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM4_10_LOWER.jpg"; description="MorphM4_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face14_half;
array{
bitmap { filename = "MorphM5_00_UPPER.jpg"; description="MorphM5_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_10_UPPER.jpg"; description="MorphM5_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_00_LOWER.jpg"; description="MorphM5_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM5_10_LOWER.jpg"; description="MorphM5_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face15_half;
array{
bitmap { filename = "MorphM6_00_UPPER.jpg"; description="MorphM6_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_10_UPPER.jpg"; description="MorphM6_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_00_LOWER.jpg"; description="MorphM6_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM6_10_LOWER.jpg"; description="MorphM6_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face16_half;
array{
bitmap { filename = "MorphM7_00_UPPER.jpg"; description="MorphM7_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_10_UPPER.jpg"; description="MorphM7_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_00_LOWER.jpg"; description="MorphM7_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM7_10_LOWER.jpg"; description="MorphM7_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face17_half;
array{
bitmap { filename = "MorphM8_00_UPPER.jpg"; description="MorphM8_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_10_UPPER.jpg"; description="MorphM8_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_00_LOWER.jpg"; description="MorphM8_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM8_10_LOWER.jpg"; description="MorphM8_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face18_half;
array{
bitmap { filename = "MorphM9_00_UPPER.jpg"; description="MorphM9_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_10_UPPER.jpg"; description="MorphM9_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_00_LOWER.jpg"; description="MorphM9_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM9_10_LOWER.jpg"; description="MorphM9_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face19_half;
array{
bitmap { filename = "MorphM10_00_UPPER.jpg"; description="MorphM10_00_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_10_UPPER.jpg"; description="MorphM10_10_UPPER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_00_LOWER.jpg"; description="MorphM10_00_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
bitmap { filename = "MorphM10_10_LOWER.jpg"; description="MorphM10_10_LOWER.jpg"; width = $fwid; scale_factor = scale_to_width;};
}face20_half;
#------------------ INSTRUCTION
trial {
trial_type = first_response;
trial_duration = forever;
stimulus_event {
picture {
text {
caption = "Im nachfolgenden Experiment,\nwerden Sie nacheinander Gesichter sehen.\n\nSie müssen jeweils entscheiden,\nob die eingerahme Gesichtspartie\neinen ÄNGSTLICHEN oder ÄRGERLICHEN Ausdruck hat.\nIgnorieren Sie dabei die jeweils andere Gesichtspartie.";
};
x = 0; y = 0;
};
code = "instruction";
};
}inst1_trial;
trial {
trial_duration = forever;
trial_type = first_response;
stimulus_event {
picture {
text {
caption = "Drücken Sie die LINKE Maustaste,\nwenn das Gesicht eher ÄNGSTLICH ist.\n\nDrücken Sie die RECHTE Maustaste,\nwenn das Gesicht eher ÄRGERLICH ist.";
font_color = 255,255,255;
};
x = $xpos; y = $ypos;
};
stimulus_time_in = 1000;
duration = next_picture;
response_active = true ;
};
}inst2_trial;
#--------------------------- PAUSE
trial {
trial_duration = 30000;
stimulus_event {
picture {
text {
caption = "Zeit für eine kurze Pause.";
font_color = 255,255,255;
}pause_text;
x = 0; y = 0;
};
code = "pause1";
};
} pause1_trial;
trial{
trial_duration = forever;
trial_type = specific_response;
terminator_button = 3;
stimulus_event {
picture {
text {
caption = "Weiter mit ENTER.";
font_color = 255,255,255;
};
x = $xpos; y = $ypos;
};
duration = next_picture;
};
} pause2_trial;
#------------------ END INSTRUCTIONS
trial {
trial_type = first_response;
trial_duration = forever;
picture {
text {
caption = "Danke fürs Mitmachen!\n\n Das Experiment ist nun zu Ende.";
font_size = 38;
};
x = 0; y = 0;
};
time = 500;
duration = next_picture;
code = "end_ins";
}end_trial;
#--------------------------- STATUS SCREEN
box {
height = 30; width = 50; color = 100,100,100;
}bar_pic;
$xbar = 0; # dummy
$ybar = -415;
line_graphic {
coordinates = -440, -400, 440, -400;
coordinates = -440, -430, 440, -430;
coordinates = -440, -400, -440, -430;
coordinates = 440, -400, 440, -430;
line_width = 2;
}line_graph;
#------------------ DUMMY BOX
line_graphic {
coordinates = 0, 0, 0, 0;
line_width = 5;
line_color = 250,0,0;
}line_graph1;
line_graphic {
coordinates = 0, 0, 0, 0;
line_width = 5;
line_color = 250,0,0;
}line_graph2;
line_graphic {
coordinates = 0, 0, 0, 0;
line_width = 5;
line_color = 250,0,0;
}line_graph3;
line_graphic {
coordinates = 0, 0, 0, 0;
line_width = 5;
line_color = 250,0,0;
}line_graph4;
#------------------ MAIN PIC
picture {
bitmap {
filename = "MorphF1_00_orig.jpg"; # dummy
} target;
x = 0; y = 0;
bitmap {
filename = "MorphF1_00_UPPER.jpg"; # dummy
} fix;
x = 0; y = 0; # dummy
on_top = true;
# status bar
box bar_pic ;
x = $xbar; y = $ybar;
line_graphic line_graph;
x = 0; y = 0;
line_graphic line_graph1; x = 0; y = 0; on_top=true;
line_graphic line_graph2; x = 0; y = 0; on_top=true;
line_graphic line_graph3; x = 0; y = 0; on_top=true;
line_graphic line_graph4; x = 0; y = 0; on_top=true;
### for testing purposes only:
/*
text {
caption = "empty";
} t_text;
x = -300; y = -300;
text {
caption = "empty";
} a_text;
x = -330; y = 140;
text {
caption = "empty";
} i_text;
x = 300; y = 50;
text {
caption = "decision_part";
} ttt_text;
x = -380; y = -220;
text {
caption = "fixed_part";
} aaa_text;
x = -380; y = 200;
text {
caption = "face_ident";
} iii_text;
x = 350; y = 100;
*/
} pic;
#------------------ MAIN TRIAL
trial {
trial_duration = forever;
trial_type = first_response;
all_responses = false;
stimulus_event {
picture pic;
duration = next_picture;
code = "dummy";
response_active = true ;
stimulus_time_in = $facein;
target_button = 2;
}main_event;
}main_trial;
#------------------------------------------ PCL ------------------------------------------#
begin_pcl;
#-------------------- Vp 17 --------------------#
array <int> ident_array [440*4] = {18, 4, 13, 20, 19, 5, 17, 4, 3, 11, 14, 10, 18, 14, 17, 6, 17, 3, 15, 1, 6, 5, 12, 10, 16, 12, 7, 11, 10, 14, 17, 12, 16, 13, 6, 20, 3, 19, 6, 13, 8, 14, 12, 9, 18, 1, 5, 10, 20, 10, 4, 10, 16, 10, 9, 3, 14, 7, 8, 18, 5, 3, 12, 8, 12, 7, 4, 7, 9, 5, 6, 9, 10, 14, 16, 17, 4, 5, 20, 15, 9, 8, 2, 19, 20, 2, 17, 19, 7, 9, 3, 9, 10, 5, 13, 17, 12, 1, 5, 11, 19, 11, 8, 20, 11, 10, 20, 16, 18, 7, 2, 13, 9, 7, 8, 15, 4, 15, 11, 12, 7, 16, 1, 19, 8, 14, 12, 13, 20, 17, 7, 9, 18, 3, 2, 4, 2, 3, 16, 17, 9, 18, 9, 5, 18, 4, 9, 5, 8, 3, 16, 7, 11, 18, 13, 7, 5, 1, 20, 16, 18, 15, 9, 4, 7, 17, 10, 20, 16, 9, 5, 8, 3, 16, 6, 2, 3, 14, 6, 11, 2, 10, 13, 8, 16, 20, 11, 15, 6, 8, 15, 7, 12, 20, 6, 5, 17, 7, 2, 1, 10, 5, 13, 20, 14, 10, 6, 11, 2, 1, 12, 13, 14, 2, 19, 6, 15, 5, 1, 7, 12, 17, 20, 4, 1, 15, 13, 10, 16, 12, 4, 15, 6, 12, 11, 8, 1, 9, 4, 20, 4, 17, 1, 4, 18, 3, 13, 16, 12, 19, 14, 4, 17, 11, 14, 6, 11, 13, 18, 19, 17, 13, 1, 17, 18, 8, 7, 15, 9, 1, 3, 18, 20, 2, 1, 19, 13, 12, 4, 10, 15, 17, 16, 7, 5, 8, 13, 1, 13, 5, 20, 3, 13, 10, 1, 12, 19, 18, 7, 20, 1, 16, 18, 4, 2, 6, 3, 13, 6, 5, 18, 11, 15, 10, 18, 12, 18, 20, 2, 3, 20, 13, 9, 15, 11, 19, 15, 19, 3, 2, 19, 11, 5, 18, 13, 1, 8, 19, 10, 14, 7, 4, 15, 2, 15, 12, 2, 19, 1, 18, 12, 11, 6, 17, 1, 7, 14, 16, 6, 7, 19, 1, 14, 15, 14, 11, 20, 19, 11, 16, 4, 8, 17, 8, 15, 8, 3, 2, 6, 9, 17, 15, 19, 9, 2, 12, 3, 9, 14, 3, 14, 7, 13, 6, 16, 9, 3, 5, 14, 6, 16, 19, 2, 17, 8, 4, 15, 14, 10, 2, 14, 2, 10, 8, 6, 11, 15, 19, 11, 5, 8, 4, 16, 10, 3, 20, 1, 17, 11, 9, 2, 14, 12, 5, 4, 16, 19, 6, 8, 18, 9, 11, 14, 1, 10, 3, 18, 6, 10, 17, 19, 10, 12, 3, 12, 2, 8, 2, 8, 2, 10, 14, 15, 4, 5, 4, 20, 12, 8, 12, 20, 8, 1, 2, 9, 8, 18, 11, 17, 2, 15, 6, 10, 16, 13, 5, 2, 3, 19, 15, 2, 12, 20, 6, 4, 12, 2, 4, 18, 4, 14, 5, 6, 1, 2, 3, 13, 16, 2, 14, 1, 6, 11, 16, 10, 19, 8, 10, 4, 11, 13, 6, 11, 20, 8, 17, 9, 18, 11, 13, 18, 15, 11, 13, 15, 10, 7, 14, 17, 4, 18, 11, 10, 17, 3, 17, 1, 7, 8, 19, 11, 1, 5, 3, 20, 13, 12, 5, 4, 19, 6, 1, 20, 9, 5, 13, 2, 18, 3, 6, 14, 5, 17, 20, 4, 5, 17, 20, 4, 5, 15, 8, 10, 19, 8, 16, 12, 9, 1, 11, 16, 14, 1, 13, 7, 4, 11, 3, 5, 9, 5, 13, 19, 18, 20, 7, 17, 19, 7, 19, 3, 7, 13, 9, 14, 17, 14, 4, 8, 7, 16, 10, 11, 7, 20, 11, 2, 14, 15, 14, 18, 2, 5, 20, 18, 3, 14, 5, 18, 20, 5, 1, 17, 6, 4, 9, 18, 20, 18, 14, 15, 7, 10, 4, 10, 9, 13, 12, 11, 8, 14, 12, 16, 13, 18, 15, 5, 18, 9, 13, 4, 7, 9, 17, 10, 6, 11, 7, 3, 2, 8, 10, 8, 12, 8, 14, 11, 18, 2, 15, 9, 13, 12, 16, 3, 17, 4, 14, 20, 5, 19, 16, 18, 5, 15, 2, 16, 12, 7, 11, 6, 9, 11, 12, 1, 6, 1, 8, 4, 13, 17, 12, 1, 10, 9, 8, 1, 13, 1, 2, 18, 8, 9, 19, 7, 5, 12, 15, 12, 2, 18, 19, 20, 5, 7, 20, 6, 15, 6, 10, 13, 7, 19, 4, 15, 4, 5, 7, 14, 10, 15, 16, 1, 6, 8, 20, 3, 1, 3, 13, 19, 16, 9, 12, 19, 10, 13, 8, 16, 20, 1, 7, 6, 19, 14, 17, 5, 13, 15, 19, 15, 3, 14, 9, 3, 15, 14, 6, 16, 6, 8, 17, 1, 2, 20, 18, 1, 9, 15, 7, 8, 3, 18, 20, 9, 7, 3, 6, 19, 17, 6, 17, 2, 10, 20, 4, 12, 10, 16, 14, 13, 16, 10, 4, 3, 19, 6, 1, 9, 17, 3, 12, 11, 18, 15, 19, 12, 14, 2, 5, 7, 16, 11, 3, 13, 16, 7, 17, 16, 15, 17, 1, 16, 12, 2, 19, 11, 16, 4, 9, 7, 6, 20, 15, 3, 11, 17, 19, 9, 16, 7, 18, 2, 8, 13, 2, 16, 18, 15, 8, 3, 17, 12, 6, 13, 10, 16, 3, 16, 4, 3, 18, 14, 5, 4, 11, 6, 5, 6, 3, 11, 13, 12, 14, 15, 4, 20, 1, 18, 5, 16, 1, 9, 20, 6, 20, 17, 19, 13, 4, 20, 7, 15, 20, 16, 14, 9, 10, 8, 16, 11, 4, 7, 1, 9, 8, 1, 10, 11, 5, 10, 13, 5, 20, 16, 15, 8, 16, 3, 9, 7, 9, 3, 2, 20, 6, 5, 15, 19, 4, 15, 5, 2, 19, 8, 1, 12, 10, 5, 11, 7, 6, 20, 17, 12, 5, 12, 17, 15, 14, 11, 17, 2, 3, 13, 4, 1, 9, 8, 7, 18, 1, 4, 19, 18, 12, 19, 2, 10, 18, 15, 3, 1, 5, 6, 11, 10, 20, 4, 12, 15, 13, 7, 17, 11, 9, 3, 1, 5, 17, 9, 19, 11, 1, 18, 9, 19, 9, 2, 19, 15, 8, 16, 11, 7, 15, 11, 7, 18, 6, 16, 17, 6, 4, 14, 3, 18, 9, 12, 19, 8, 6, 16, 18, 17, 13, 16, 9, 10, 6, 3, 18, 7, 13, 12, 15, 6, 13, 10, 6, 13, 8, 14, 12, 4, 6, 4, 18, 17, 14, 12, 8, 5, 11, 10, 18, 10, 19, 6, 20, 8, 13, 6, 12, 16, 17, 4, 20, 3, 9, 20, 7, 10, 18, 9, 13, 20, 13, 5, 2, 3, 12, 14, 6, 4, 19, 20, 5, 13, 15, 3, 18, 6, 10, 2, 14, 4, 6, 17, 5, 1, 5, 2, 14, 8, 14, 9, 19, 4, 1, 11, 13, 1, 7, 13, 9, 17, 10, 17, 5, 2, 17, 14, 4, 7, 19, 17, 12, 19, 14, 1, 12, 15, 12, 15, 2, 13, 20, 18, 10, 2, 3, 12, 10, 19, 15, 8, 2, 12, 3, 7, 12, 14, 3, 2, 6, 8, 7, 11, 8, 14, 20, 5, 20, 7, 5, 8, 2, 17, 10, 4, 11, 17, 8, 19, 11, 17, 4, 19, 2, 5, 3, 12, 14, 3, 14, 13, 8, 19, 7, 15, 3, 1, 3, 11, 18, 1, 17, 15, 20, 14, 7, 4, 16, 1, 7, 10, 4, 16, 18, 8, 15, 16, 19, 16, 20, 5, 7, 13, 14, 2, 20, 18, 9, 2, 14, 2, 20, 1, 8, 1, 11, 9, 17, 19, 8, 16, 11, 16, 14, 19, 1, 2, 10, 7, 16, 6, 11, 3, 9, 12, 7, 11, 12, 13, 1, 15, 9, 2, 14, 10, 1, 9, 20, 16, 17, 15, 5, 11, 9, 10, 13, 19, 18, 15, 18, 10, 16, 6, 4, 11, 7, 18, 11, 19, 6, 9, 12, 18, 9, 17, 12, 5, 12, 6, 8, 16, 13, 19, 7, 8, 7, 15, 4, 13, 16, 5, 18, 20, 2, 4, 18, 13, 1, 10, 14, 15, 5, 17, 15, 2, 4, 7, 6, 9, 13, 10, 11, 14, 9, 15, 5, 7, 4, 2, 18, 19, 1, 3, 16, 7, 5, 10, 13, 15, 17, 15, 10, 11, 16, 11, 9, 19, 18, 20, 7, 3, 14, 20, 4, 10, 17, 6, 3, 14, 6, 9, 18, 11, 17, 3, 9, 2, 7, 2, 7, 17, 13, 9, 8, 3, 1, 10, 15, 1, 11, 8, 1, 20, 4, 9, 1, 8, 13, 7, 15, 8, 18, 6, 10, 17, 7, 5, 10, 7, 8, 19, 4, 15, 19, 20, 17, 19, 16, 8, 7, 16, 4, 6, 16, 10, 7, 20, 4, 20, 17, 20, 16, 18, 17, 15, 8, 12, 19, 2, 6, 5, 20, 10, 1, 18, 12, 4, 20, 5, 19, 2, 12, 19, 4, 2, 10, 5, 3, 12, 16, 6, 5, 7, 17, 2, 5, 11, 20, 17, 13, 16, 5, 1, 5, 2, 10, 4, 14, 15, 5, 12, 11, 3, 14, 3, 11, 20, 12, 8, 3, 14, 5, 11, 19, 16, 4, 2, 16, 3, 9, 10, 5, 7, 18, 19, 2, 8, 2, 17, 2, 3, 1, 4, 19, 13, 6, 12, 2, 1, 19, 3, 16, 15, 12, 18, 3, 14, 2, 16, 6, 9, 16, 14, 3, 5, 12, 2, 11, 17, 3, 19, 6, 13, 14, 15, 1, 5, 2, 15, 14, 10, 1, 14, 12, 11, 3, 7, 2, 16, 8, 1, 11, 14, 1, 14, 1, 7, 6, 17, 4, 16, 6, 19, 9, 6, 17, 15, 4, 20, 6, 1, 11, 17, 2, 13, 11, 17, 7, 16, 8, 20, 18, 3, 4, 10, 11, 14, 18, 4, 12, 16, 18, 8, 1, 9, 7, 20, 14, 15, 19, 3, 18, 3, 12, 15, 12, 5, 7, 6, 18, 3, 6, 10, 14, 7, 11, 20, 17, 1, 14, 13, 8, 12, 13, 12, 8, 9, 15, 5, 9, 20, 9, 19, 20, 15, 13, 1, 13, 9, 4, 20, 6, 16, 2, 13, 1, 13, 20, 18, 8, 4, 18, 10, 15, 4, 14, 11, 10, 13, 6, 19, 20, 18, 12, 8, 19, 8, 11, 3, 15, 14, 4, 12, 1, 5, 9, 8, 10, 9, 14, 15, 9, 11, 10, 18, 17, 14, 8, 10, 12, 20, 6, 9, 2, 9, 19, 13, 11, 17, 18, 6, 10, 5, 13, 17, 12, 16, 13, 3, 16, 13, 19, 8, 1};
array <int> target_array [440*4] = {2, 2, 6, 1, 8, 8, 6, 10, 8, 10, 5, 10, 9, 11, 1, 8, 5, 9, 9, 11, 11, 3, 10, 3, 8, 5, 5, 9, 4, 4, 7, 5, 6, 6, 1, 5, 9, 6, 8, 3, 1, 9, 2, 11, 11, 4, 3, 3, 7, 5, 3, 6, 1, 1, 8, 5, 10, 2, 6, 5, 11, 5, 8, 10, 3, 1, 7, 7, 3, 11, 4, 2, 9, 5, 3, 2, 5, 7, 5, 8, 5, 8, 8, 5, 3, 4, 10, 1, 6, 10, 11, 8, 8, 6, 2, 4, 2, 3, 1, 3, 11, 8, 10, 9, 11, 1, 1, 3, 9, 8, 10, 7, 3, 10, 3, 8, 1, 1, 4, 10, 4, 7, 1, 7, 1, 10, 3, 8, 7, 4, 9, 6, 3, 7, 5, 4, 6, 11, 10, 11, 4, 8, 4, 10, 3, 11, 7, 10, 6, 10, 2, 11, 7, 7, 1, 3, 1, 9, 6, 6, 1, 7, 10, 5, 11, 1, 11, 2, 11, 9, 4, 4, 4, 1, 1, 8, 3, 7, 3, 6, 7, 5, 1, 11, 9, 6, 5, 5, 6, 3, 10, 3, 11, 11, 9, 2, 9, 7, 1, 10, 7, 6, 5, 4, 11, 10, 3, 4, 9, 7, 4, 2, 8, 6, 2, 4, 3, 4, 2, 8, 6, 5, 8, 1, 4, 11, 9, 8, 5, 7, 3, 5, 10, 11, 1, 4, 1, 7, 7, 8, 10, 2, 8, 6, 7, 1, 10, 2, 1, 4, 1, 11, 7, 8, 8, 10, 9, 5, 5, 9, 8, 8, 2, 9, 4, 2, 9, 6, 2, 11, 2, 10, 9, 1, 5, 6, 7, 7, 6, 6, 9, 10, 5, 6, 2, 9, 11, 8, 11, 5, 10, 4, 4, 11, 5, 9, 10, 6, 2, 2, 7, 11, 4, 9, 3, 7, 10, 9, 9, 8, 11, 2, 11, 7, 1, 8, 8, 4, 2, 7, 10, 10, 1, 10, 10, 7, 3, 4, 6, 11, 3, 1, 9, 10, 4, 6, 5, 11, 2, 9, 10, 9, 4, 9, 7, 9, 3, 9, 10, 6, 6, 2, 7, 3, 3, 1, 3, 7, 6, 5, 8, 9, 2, 2, 6, 6, 3, 1, 5, 8, 4, 2, 8, 5, 2, 8, 6, 4, 2, 11, 3, 4, 3, 6, 11, 1, 8, 1, 3, 1, 7, 4, 3, 5, 4, 5, 3, 7, 4, 5, 4, 2, 2, 6, 7, 8, 1, 2, 2, 5, 6, 10, 4, 7, 2, 3, 6, 10, 7, 9, 9, 8, 9, 9, 2, 11, 6, 11, 11, 9, 7, 1, 4, 5, 2, 10, 5, 11, 11, 2, 10, 4, 1, 4, 11, 2, 11, 8, 7, 2, 10, 8, 3, 6, 8, 11, 3, 9, 2, 10, 3, 5, 7, 9, 3, 7, 2, 9, 1, 1, 8, 11, 2, 2, 2, 3, 3, 6, 9, 1, 4, 5, 1, 5, 6, 6, 8, 1, 8, 4, 2, 7, 10, 7, 8, 4, 11, 7, 7, 5, 10, 7, 1, 9, 3, 7, 9, 9, 8, 3, 1, 10, 2, 2, 10, 1, 11, 2, 1, 9, 5, 5, 2, 6, 9, 11, 7, 8, 7, 3, 1, 10, 8, 6, 10, 6, 3, 6, 11, 3, 9, 1, 4, 6, 11, 4, 10, 7, 6, 3, 10, 1, 4, 7, 8, 8, 11, 2, 6, 8, 3, 7, 6, 9, 6, 2, 10, 6, 5, 1, 5, 1, 5, 4, 4, 9, 1, 1, 9, 10, 2, 2, 4, 10, 6, 4, 5, 1, 11, 6, 6, 9, 6, 11, 8, 10, 3, 1, 10, 2, 11, 8, 6, 9, 10, 10, 8, 5, 6, 7, 9, 9, 10, 11, 7, 8, 11, 4, 5, 5, 10, 7, 7, 5, 2, 4, 5, 6, 5, 3, 6, 9, 1, 3, 4, 5, 7, 5, 10, 11, 4, 9, 7, 2, 11, 8, 2, 7, 2, 4, 9, 2, 5, 6, 6, 4, 10, 5, 3, 5, 9, 4, 3, 4, 3, 5, 9, 7, 4, 2, 11, 9, 9, 6, 11, 11, 5, 1, 8, 6, 8, 5, 8, 2, 7, 11, 11, 1, 7, 1, 8, 1, 8, 1, 3, 4, 5, 10, 9, 8, 11, 10, 5, 7, 9, 6, 9, 11, 11, 1, 4, 11, 5, 7, 8, 4, 3, 10, 2, 3, 2, 10, 6, 1, 10, 10, 3, 7, 4, 4, 10, 1, 3, 6, 8, 5, 10, 11, 6, 5, 11, 9, 11, 3, 11, 7, 6, 3, 9, 2, 7, 4, 1, 3, 7, 10, 11, 2, 8, 3, 6, 11, 11, 7, 4, 5, 2, 5, 4, 4, 5, 3, 5, 1, 3, 9, 1, 7, 4, 5, 2, 6, 6, 4, 4, 5, 2, 5, 3, 2, 6, 10, 8, 7, 11, 8, 2, 2, 7, 8, 9, 10, 10, 3, 3, 4, 5, 6, 11, 1, 4, 10, 8, 4, 1, 3, 9, 10, 2, 3, 3, 7, 1, 9, 9, 1, 6, 10, 1, 1, 11, 7, 8, 8, 6, 4, 9, 8, 3, 10, 4, 9, 8, 5, 2, 9, 2, 2, 7, 8, 10, 5, 9, 3, 9, 2, 4, 9, 6, 8, 3, 7, 11, 3, 4, 7, 11, 8, 2, 5, 7, 11, 1, 1, 8, 10, 1, 11, 6, 8, 10, 9, 5, 7, 2, 11, 7, 6, 6, 1, 10, 5, 7, 11, 6, 7, 5, 2, 9, 11, 11, 8, 3, 11, 2, 1, 2, 4, 10, 5, 2, 6, 2, 7, 8, 10, 8, 6, 3, 10, 10, 2, 1, 11, 6, 1, 9, 11, 8, 10, 1, 9, 1, 10, 3, 5, 4, 2, 4, 9, 8, 6, 1, 1, 6, 6, 11, 7, 5, 9, 5, 10, 10, 8, 2, 5, 10, 5, 4, 7, 7, 8, 3, 3, 9, 7, 1, 4, 11, 3, 5, 8, 7, 6, 3, 10, 10, 9, 4, 4, 11, 5, 7, 6, 3, 2, 5, 4, 11, 11, 7, 10, 6, 8, 8, 2, 2, 11, 8, 10, 4, 11, 1, 7, 5, 6, 4, 4, 6, 4, 1, 5, 5, 7, 6, 2, 2, 10, 4, 8, 3, 7, 3, 3, 11, 8, 7, 3, 7, 3, 3, 10, 10, 4, 10, 2, 10, 3, 6, 6, 2, 6, 1, 11, 5, 9, 3, 4, 10, 4, 6, 8, 9, 6, 10, 2, 11, 9, 4, 5, 5, 8, 11, 1, 7, 5, 8, 1, 1, 4, 4, 6, 5, 7, 1, 6, 11, 1, 6, 9, 3, 5, 1, 9, 11, 3, 5, 7, 7, 6, 3, 10, 11, 8, 11, 8, 3, 2, 3, 5, 2, 10, 7, 10, 10, 2, 9, 6, 7, 5, 6, 6, 5, 3, 10, 5, 3, 11, 3, 8, 3, 11, 6, 2, 7, 3, 3, 9, 2, 7, 9, 11, 10, 11, 2, 7, 5, 5, 6, 6, 7, 3, 9, 2, 11, 3, 6, 8, 8, 8, 3, 3, 6, 1, 9, 9, 5, 9, 10, 5, 8, 1, 9, 4, 2, 3, 9, 5, 2, 1, 4, 1, 2, 6, 9, 1, 11, 5, 5, 8, 7, 1, 9, 4, 4, 3, 3, 11, 2, 10, 11, 11, 4, 6, 10, 8, 2, 7, 6, 9, 9, 11, 8, 7, 2, 5, 9, 4, 4, 8, 3, 4, 1, 11, 8, 9, 8, 9, 5, 9, 1, 6, 8, 5, 8, 2, 9, 1, 1, 6, 10, 11, 9, 9, 10, 2, 3, 2, 8, 2, 11, 8, 8, 1, 7, 3, 10, 1, 3, 9, 4, 7, 4, 7, 6, 4, 6, 9, 4, 8, 2, 9, 2, 2, 10, 4, 1, 4, 9, 8, 5, 9, 4, 11, 1, 7, 2, 5, 7, 8, 9, 10, 5, 1, 4, 4, 1, 7, 1, 5, 7, 8, 1, 4, 1, 1, 10, 7, 3, 10, 10, 8, 11, 2, 8, 11, 4, 2, 6, 10, 4, 4, 9, 1, 11, 7, 3, 11, 1, 7, 10, 7, 9, 11, 9, 10, 4, 8, 8, 7, 2, 3, 2, 4, 6, 3, 5, 4, 5, 10, 6, 3, 1, 2, 5, 2, 9, 6, 7, 7, 5, 5, 6, 11, 10, 4, 11, 7, 11, 5, 10, 1, 11, 6, 5, 8, 10, 2, 2, 1, 5, 9, 1, 9, 4, 1, 7, 3, 4, 9, 9, 3, 6, 1, 1, 3, 9, 2, 9, 7, 2, 6, 3, 7, 6, 3, 1, 9, 8, 4, 2, 9, 2, 4, 9, 5, 10, 11, 6, 6, 10, 10, 4, 2, 6, 1, 10, 8, 1, 4, 5, 9, 4, 10, 7, 4, 9, 10, 5, 8, 11, 7, 11, 4, 5, 6, 9, 5, 3, 6, 7, 4, 10, 8, 10, 7, 1, 4, 2, 8, 3, 1, 8, 8, 1, 2, 5, 7, 4, 1, 7, 9, 9, 6, 3, 10, 8, 9, 7, 8, 8, 2, 1, 2, 5, 10, 5, 11, 9, 9, 11, 2, 6, 4, 8, 1, 2, 2, 9, 10, 9, 1, 11, 10, 5, 8, 9, 2, 8, 6, 2, 1, 1, 6, 9, 5, 7, 10, 10, 5, 1, 3, 7, 3, 7, 4, 6, 11, 11, 2, 7, 9, 7, 8, 3, 7, 4, 7, 1, 3, 3, 10, 11, 11, 3, 8, 5, 1, 4, 3, 7, 11, 10, 10, 2, 6, 6, 4, 9, 5, 11, 9, 11, 3, 6, 6, 5, 2, 4, 5, 2, 8, 8, 7, 4, 1, 3, 6, 6, 8, 6, 1, 3, 4, 7, 1, 2, 2, 10, 5, 6, 8, 11, 5, 4, 8, 11, 1, 10, 3, 8, 2, 6, 8, 3, 7, 2, 7, 1, 2, 10, 1, 5, 11, 4, 3, 10, 8, 11, 3, 4, 4, 2, 2, 9, 1, 11, 10, 11, 9, 2, 8, 1, 7, 10, 2, 1, 2, 9, 8, 9, 6, 1, 4, 11, 11, 11, 9, 5, 5, 9, 8, 10, 11, 8, 10, 2, 4, 9, 10, 3, 6, 3, 11, 8, 1, 11, 11, 1, 6, 6, 5, 5, 3, 4, 5, 3, 5, 7, 10, 10, 11, 9, 7, 4, 2, 2, 11, 6, 11, 3, 9, 8, 3, 5, 11, 4, 7, 6, 1, 6, 3, 1, 1, 8, 8, 3, 10, 5, 9, 5, 11, 5, 3, 2, 5, 4, 10, 6, 7, 10, 10, 6, 7, 6, 10, 7, 1, 4, 5, 8, 8, 8, 4, 6, 3, 11, 4, 3, 8, 10, 5, 7, 1, 11, 9, 2, 7, 2, 8, 7, 11, 11, 3, 5, 3, 3, 7, 6, 9, 8, 9, 1, 7, 3, 4, 7, 4, 4, 6};
array <int> half_array [440*4] = {3, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4, 4, 4, 3, 4, 3, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3, 4, 3, 3, 4, 4, 3, 4, 4, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 4, 4, 4, 4, 3, 3, 4, 4, 3, 4, 4, 3, 3, 3, 4, 4, 3, 4, 3, 3, 4, 4, 4, 3, 4, 3, 3, 4, 3, 4, 3, 4, 4, 3, 4, 3, 3, 4, 3, 3, 4, 4, 3, 4, 4, 3, 4, 3, 4, 4, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 3, 4, 4, 3, 3, 4, 3, 4, 3, 4, 4, 3, 4, 4, 3, 4, 3, 4, 3, 3, 3, 3, 4, 4, 4, 3, 3, 4, 4, 3, 4, 4, 3, 3, 4, 4, 3, 4, 3, 4, 4, 4, 3, 4, 3, 4, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 3, 4, 4, 3, 4, 4, 3, 4, 3, 3, 4, 3, 3, 3, 4, 4, 4, 4, 3, 4, 3, 4, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 4, 4, 3, 4, 3, 4, 4, 3, 4, 4, 3, 3, 4, 4, 4, 3, 4, 3, 4, 3, 4, 4, 3, 4, 3, 4, 4, 3, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 3, 3, 3, 4, 4, 4, 3, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 4, 3, 3, 4, 3, 4, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 4, 3, 3, 4, 4, 4, 4, 3, 4, 3, 3, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 4, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3, 4, 3, 4, 4, 4, 3, 4, 4, 3, 4, 4, 3, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 3, 3, 4, 4, 3, 3, 4, 3, 4, 3, 4, 3, 4, 4, 4, 3, 3, 4, 3, 4, 4, 3, 4, 4, 3, 4, 4, 4, 3, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 4, 3, 3, 3, 4, 4, 3, 3, 4, 4, 4, 3, 4, 4, 3, 4, 4, 3, 4, 3, 4, 4, 3, 4, 3, 3, 4, 4, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 4, 3, 4, 4, 3, 4, 4, 3, 4, 4, 4, 4, 4, 3, 4, 3, 4, 3, 3, 4, 3, 3, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 3, 4, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 4, 4, 3, 3, 3, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 4, 4, 4, 3, 3, 4, 3, 3, 4, 3, 4, 3, 4, 4, 3, 4, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 4, 3, 4, 3, 3, 4, 3, 3, 4, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 3, 4, 4, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 3, 3, 3, 4, 4, 4, 4, 4, 3, 4, 4, 3, 3, 4, 3, 4, 4, 4, 3, 3, 4, 3, 4, 4, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 3, 3, 4, 4, 3, 3, 3, 4, 3, 3, 4, 4, 4, 3, 4, 3, 3, 4, 4, 3, 3, 4, 3, 4, 4, 4, 3, 4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 4, 3, 4, 3, 4, 4, 3, 3, 3, 4, 4, 3, 3, 3, 4, 3, 4, 4, 3, 4, 4, 4, 4, 3, 4, 4, 3, 4, 4, 4, 4, 4, 3, 3, 3, 4, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1};
inst1_trial.present();
inst2_trial.present();
# staus bar
bar_pic.set_width(1);
pic.set_part_x(3, -440 );
# subroutine gesicht werden und zeigen
sub set_face( array<bitmap,1>& face_array, array<bitmap,1>& face_half, int i) begin
# set reference face
pic.set_part(1, face_array[target_array[i]]);
# set masking half-face
pic.set_part(2, face_half[half_array[i]]);
# set box dimensions
double bighalf = face_array[target_array[i]].height()/2.0;
double smallhalf = face_half[half_array[i]].height()/2.0;
double complement = face_array[target_array[i]].height()-face_half[half_array[i]].height();
if half_array[i] == 1 || half_array[i] == 2 then
pic.set_part_y(2, bighalf-smallhalf );
# draw box
line_graph1.clear(); line_graph2.clear(); line_graph3.clear(); line_graph4.clear();
line_graph1.add_line( -240.0, bighalf*(-1.0), 240.0, bighalf*(-1.0) );
line_graph2.add_line( -240.0, bighalf*(-1.0)+complement, 240.0, bighalf*(-1.0)+complement );
line_graph3.add_line( -240.0, bighalf*(-1.0), -240.0, bighalf*(-1.0)+complement );
line_graph4.add_line( 240.0, bighalf*(-1.0), 240.0, bighalf*(-1.0)+complement );
line_graph1.redraw();line_graph2.redraw();line_graph3.redraw();line_graph4.redraw();
elseif half_array[i] == 3 || half_array[i] == 4 then
pic.set_part_y(2, bighalf*(-1.0)+smallhalf );
# draw box
line_graph1.clear(); line_graph2.clear(); line_graph3.clear(); line_graph4.clear();
line_graph1.add_line( -240.0, bighalf, 240.0, bighalf );
line_graph2.add_line( -240.0, bighalf-complement , 240.0, bighalf-complement );
line_graph3.add_line( -240.0, bighalf, -240.0, bighalf-complement );
line_graph4.add_line( 240.0, bighalf, 240.0, bighalf-complement );
line_graph1.redraw();line_graph2.redraw();line_graph3.redraw();line_graph4.redraw();
end;
# write event code
string d_code = face_array[target_array[i]].description(); # der teil der bewertet wird
string f_code = face_half[half_array[i]].description(); # der teil, der fix bleibt
main_event.set_event_code( d_code + " ; " + f_code );
#for testing purposes only
/*t_text.set_caption( string(target_array[i]) );
t_text.redraw();
a_text.set_caption( string(half_array[i]) );
a_text.redraw();
i_text.set_caption( string(ident_array[i]) );
i_text.redraw();*/
end;
loop int w = 1; int i = 1;
until i >= ident_array.count()+1 begin
if ident_array[i] == 1 then
set_face(face1_array, face1_half, i);
elseif ident_array[i] == 2 then
set_face(face2_array, face2_half, i);
elseif ident_array[i] == 3 then
set_face(face3_array, face3_half, i);
elseif ident_array[i] == 4 then
set_face(face4_array, face4_half, i);
elseif ident_array[i] == 5 then
set_face(face5_array, face5_half, i);
elseif ident_array[i] == 6 then
set_face(face6_array, face6_half, i);
elseif ident_array[i] == 7 then
set_face(face7_array, face7_half, i);
elseif ident_array[i] == 8 then
set_face(face8_array, face8_half, i);
elseif ident_array[i] == 9 then
set_face(face9_array, face9_half, i);
elseif ident_array[i] == 10 then
set_face(face10_array, face10_half, i);
elseif ident_array[i] == 11 then
set_face(face11_array, face11_half, i);
elseif ident_array[i] == 12 then
set_face(face12_array, face12_half, i);
elseif ident_array[i] == 13 then
set_face(face13_array, face13_half, i);
elseif ident_array[i] == 14 then
set_face(face14_array, face14_half, i);
elseif ident_array[i] == 15 then
set_face(face15_array, face15_half, i);
elseif ident_array[i] == 16 then
set_face(face16_array, face16_half, i);
elseif ident_array[i] == 17 then
set_face(face17_array, face17_half, i);
elseif ident_array[i] == 18 then
set_face(face18_array, face18_half, i);
elseif ident_array[i] == 19 then
set_face(face19_array, face19_half, i);
elseif ident_array[i] == 20 then
set_face(face20_array, face20_half, i);
end;
if w == ident_array.count()/2 + 1 then
w = 1;
pause1_trial.present();
pause2_trial.present();
end;
bar_pic.set_width(w);
pic.set_part_x(3, -440 + w/2);
main_trial.present();
i = i +1;
w = w +1;
stimulus_data last = stimulus_manager.last_stimulus_data();
term.print("Reaction Time: " + string(last.reaction_time() ) );
if last.type() == stimulus_hit then
term.print("\nType: stimulus_hit");
elseif last.type() == stimulus_incorrect then
term.print("\nType: stimulus_incorrect");
end;
end;
end_trial.present(); |
07ee93c716615ba30e0ddeb63a0cff24bbc30459 | 449d555969bfd7befe906877abab098c6e63a0e8 | /758/CH6/EX6.35/Ex_6_35.sce | efe00eddb43775af5d79c64d34172d82d839bf6b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 554 | sce | Ex_6_35.sce | //Example 6.35
clc;clear;close;
h=[2 2 1];
x=[3 0 -2 0 2 1 0 -2 -1 0];
M=length(h); //length of impulse response
L=2^M; //length of FFT/IFFT operation
N=L-M+1;
xl=length(x);
K=ceil(xl/N); //number of iterations
h=[h zeros(1,L-M)];
x=[zeros(1,M-1) x x(1:K*N-xl)];
H=fft(h);
for k=0:K-1
xk=x(k*N+1:(k+1)*N+M-1);
Xk=fft(xk);
Yk=H.*Xk;
yk=ifft(Yk);
yk=clean(yk);
y=[yk(1:k*N) yk(M:L)];
disp(k+1,'Segment =');
disp(xk,'xk(n)=');
disp(yk,'yk(n)=');
end
disp(y,'Output Sequence is y(n): '); |
d1357de21258e34f222d81476490641b91887af4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2072/CH17/EX17.7/EX17_7.sce | 515a26e7e51ece99ec7c3788e7546afb3f79f183 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 121 | sce | EX17_7.sce | //Example 17.7
clc
I=20//in A
delta_v=120
p_bulb=75//inwatt
p_total=I*delta_v
N=p_total/p_bulb
disp(N,"Number of bulbs=") |
2d5f1895269c137f2303f09eff81a89221125224 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1538/CH3/EX3.12/Ex3_12.sce | 0a857ebb216f8d18bc490392ed9defc06bf666be | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 490 | sce | Ex3_12.sce | //example-3.12
//page no-94
//given
//lattice parameter of an orthorombic unit cell are
a=0.82 //nm
b=0.94 //nm
c=0.75 //nm
//part(I)
h1=1
k1=2
l1=3
d1=sqrt(1/((h1/a)^2+(k1/b)^2+(l1/c)^2)) //nm
//part(II)
h2=2
k2=4
l2=6
d2=sqrt(1/((h2/a)^2+(k2/b)^2+(l2/c)^2)) //nm
//aprt(III)- comment
//we note that
d=d2/d1
//i.e d2=1/2*d1
//IT MEANS THAT INCREASING THE MILLER INDICES FREOM (123) TO (246) I.E BY 2 TIMES , DECREASES THE SEPERATION B/W THE PLANES BY 2 TIMES.
|
e4d1e7af353c288821a29e1c2a7f140f9004605e | f723e412ff19820dcd1f727100562b15a3e5d87d | /Effect of cluster size on cellular capacity.sce | 2aae9ca9643db6fc16697df181fb0bba499b0b7e | [] | no_license | Sid-149/Mobile-Communication-System | f53593fa9ceedeb95e41dab9a530f1b6e71ce991 | 7e249472fa7b038ec5cfe7a92e28f79e95d01470 | refs/heads/master | 2023-01-09T23:21:09.222110 | 2020-10-21T05:24:43 | 2020-10-21T05:24:43 | 288,692,109 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 539 | sce | Effect of cluster size on cellular capacity.sce | clc
clear
M = input("Total No. of cells in System:")
K = input("Total No. of channels per cluster:")
N1 = input("Enter Cluster Size (N1):")
N2 = input("Enter Cluster Size (N2):")
S1 = K/N1
C1 = M*S1
S2 = K/N2
C2 = M*S2
disp("System capcity with cluster size = 4:")
disp(C1)
disp("System capcity with cluster size = 7:")
disp(C2)
disp("Conclusion:")
if C1>C2 then
disp("Capacity decreases with increase in cluster size")
else
disp("Capacity increases with increase in cluster size")
end
disp("System Capcity:")
|
e7e8bbfa2ceb36619710640232c92359abb88405 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3802/CH2/EX2.12/Ex2_12.sce | fa5868bd025b04fe8e72e7390ea2c3497f352ff4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 409 | sce | Ex2_12.sce | //Book Name:Fundamentals of Electrical Engineering
//Author:Rajendra Prasad
//Publisher: PHI Learning Private Limited
//Edition:Third ,2014
//Ex2_12.sce
clc;
clear;
R=50; //Resistance in ohm
Is=1/30; //Source current in Ampere
Rs=40.92; //Parallel resistance in ohm
Gs=1/Rs; //Parallel conductance in mho
I=(Is*Rs)/(Rs+R);
printf("\n Current through the 50 ohm resistor=%1.3f A \n",I)
|
3a64b81692cf2014f2cf7c4706f4a675c124587e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2498/CH4/EX4.24/ex4_24.sce | c100c79b912177c53865e184fe550fa337d3571a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 625 | sce | ex4_24.sce | // Exa 4.24
format('v',7)
clc;
clear;
close;
// Given data
S = 3;
Beta = 100;
I_C = 2;// in mA
I_C = I_C * 10^-3;// in A
R_E = 990;// in ohm
V_CC = 24;// in V
V_BE= 0.65;// in V
I_B = I_C/Beta;// in A
I_E= I_B+I_C;// in A
// S = ((Beta+1)*(Rth+R_E))/(Rth+(R_E*(1+Beta))), where Rth= R1*R2/(R1+R2)
Rth = ((R_E*Beta) - (S*R_E) - (S*R_E*Beta) + R_E)/(S-Beta-1);// in ohm
Vth= I_B*Rth+V_BE+I_E*R_E;// in V
// Vth= V_CC*R2/(R1+R2) or
R1= V_CC*Rth/Vth;// in ohm
R1= R1*10^-3;// in k ohm
R2= Vth*R1/(V_CC-Vth);// in k ohm
disp(R1,"The value of R1 in k ohm is : ");
disp(R2,"The value of R2 in k ohm is : ")
|
27d1135ecc8178f7808539a38487f87e2532c052 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2273/CH2/EX2.4/ex2_4.sce | 14bdfd89f1fc1467dc32ae65b678e61214c57634 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 931 | sce | ex2_4.sce | //Calculate the most economical cross sectional area
clear;
clc;
//soltion
//given
id=0.1;//interest & depreciation charges
pf=.8;//lagging
P=10^6;//Watts//load
V=11000;//volts//supply voltage
cst=.15;//rs// cost of energy per unit
d=1.75*10^-6;//ohm cm//specific resistance
l=1000//m//length of the cable
t=3000;//hours
printf("Annual cost of 2 core feeder cable is Rs(30 + 500a)per meter\n");
R=(d*1000*100);//ohm//resistance of conductor
printf("Resistance of each conductor= %f/a \n", R);
i=P/(V*pf);//ampere
printf("Current in each conductor= %f A\n", i);
P2=500*10^3*id;//energy lost per annum
printf("Capital cost= P2*a= %d*a \n", P2);
P3=(2*i^2*R*t*cst)/1000;//kWh//annual cost of energy loss
printf("Energy loss per annum= P3/a= %f/a \n",P3);
a=sqrt(P3/P2);
printf("Economic cross section of conductor is= √(P3/P2)= %f square cm \n",a);
printf("Diameter of conductor= %f cm \n", sqrt(4*a/%pi));
|
2e228a69c05837a5c52cd558dcee176b2591c90a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1076/CH2/EX2.11/2_11.sce | 8c1e3b7c62f9e641b45b9d9aa8464ecf468fff45 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 181 | sce | 2_11.sce | clear;
clc;
r= 1.6e-2;
d= 45e-2;
D=12;
Dscb=sqrt(r*d);
Deq=(D*D*(2*D))^(1/3);
Cn= .02412/(log10 (Deq/Dscb));
mprintf("Capacitance per phase per km= %.4f e-6 F/km\n",Cn);
|
71e41a027cf08b542835faeb67aa8060f9bf3a4c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1652/CH6/EX6.9/6_9.sce | 91b744b573850c2d4c097e70c0f55f0d4ce88a44 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 6_9.sce | clc
//initialization of variables
DHH=103 //kcal/mol
//calculations
DHHp=0.5*(DHH)
//results
printf("Bond energy = %.1f kcal/mol",DHHp)
|
c4f80f448eb4b53e2abe69a429e75bc623098733 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.1.1/macros/elem/ceil.sci | aa831d667dc8ac4a357e16c662fdb793d8eac181 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"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 | 55 | sci | ceil.sci | function [t]=ceil(x)
t=round(x+(0.5-%eps)*ones(x))
|
037f986d8f333278709e38a5d753b7740ed5c8eb | 665eac2bfd0d2f1d559f485375f89e8a91632c6e | /VOL_300/319_01/MACRO.TST | 3070c3cbd4addf3c4cd998f124c6b81459434ca3 | [] | no_license | kubohisa/CUGL | 615c29732e5fc2c6bcb29a4013be3351dc21dda6 | 75fc7cb2f8c5f3869a091b2b5c50c09323bc1c03 | refs/heads/main | 2023-03-15T16:19:49.355867 | 2020-10-02T21:19:00 | 2020-10-02T21:19:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,660 | tst | MACRO.TST | /*
Tests of SPP's macro handling abilities.
source: macro.tst
version: February 17, 1989
*/
/*
PART I
Weird and wonderful tests of macro expansion.
see page 93 of Draft C Standard of January, 1988.
*/
#define x 3
#define f(a) f(x * (a))
#undef x
#define x 2
#define g f
#define z z[0]
#define h g(~
#define m(a) a(w)
#define w 0,1
#define t(a) a
macro_tst()
{
/* subtest 1
f(y+1); should expand to:
f(2 * (y+1));
*/
f(y+1);
/* subtest 2
f(f(z)); should expand to:
f(2 * (f(2 * (z[0]))));
*/
f(f(z));
/* subtest 3
t(t(g)(0) + t)(1); should expand to:
f(2 * (0)) + t(1);
*/
t(t(g)(0) + t)(1);
/* subtest 4
g(x+(3,4)-w) | h 5) & m (f)^m(m);
should result in:
f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
*/
g(x+(3,4)-w) | h 5) & m (f)^m(m);
}
/*
PART 2
Tests of string concatenation and token pasting.
*/
#define str(s) # s
#define xstr(s) str(s)
#define debug(s,t) printf("x" # s "= %d, x" # t "= %s", x ## s, x ## t)
stringize()
{
/*
#define str(s) # s
#define xstr(s) str(s)
#define debug(s,t) printf("x" # s "= %d, x" # t "= %s", x ## s, x ## t)
debug(1, 2);
should result in:
printf("x1= %d, x2= %s", x1, x2);
*/
debug(1, 2);
/*
fputs(str(strncmp("abc\0d", "abc", '\4') == 0) str(: @\n), s);
should result in:
fputs("strncmp(\"abc\\0d\", \"abc\", '\\4') == 0: @\n", s);
*/
fputs(str(strncmp("abc\0d", "abc", '\4') == 0) str(: @\n), s);
}
/*
PART 3
Tests of detecting duplicate definitions
These examples do not follow the standard yet.
Please do not report these as bugs to me.
*/
#define OBJ_LIKE (1-1)
#define OBJ_LIKE /* a */ (1-1) /* b */
#define FTN_LIKE(a) ( a )
#define FTN_LIKE( a ) ( /* a */ \
a /* b
*/ )
#define OBJ_LIKE (0)
#define OBJ_LIKE (1 - 1)
#define FTN_LIKE(b) ( a )
#define FTN_LIKE(b) (b)
/* PART 4
Bug regression test:
Test for white space in argument list in macros.
Test for more than six arguments.
Test for recursive definition of keywords
*/
#define char (signed) char
char c;
#pragma this can be anything
#pragma ##who cares##??
/* Test of defined keyword. */
#if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
#define TINY_OR_SMALL_OR_MEDIUM
#endif
/*
Test line number handling.
Note: #error will terminate the processing of this test file.
*/
#define FILE_NAME "d:\sherlock\sl.h"
#define LINE2 1000
#define FILE2 "changed_file"
#include FILE_NAME
#line LINE2 FILE2
#define a( b , c , d , e , f , g , h ) b c d e f g h
line_number_test()
{
int b;
a(b, = , 1, + , 2, - , 3);
SL_DISABLE();
}
|
9336a1cf28f442a18378b0c815b8f7db5b801d43 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3760/CH1/EX1.33/Ex1_33.sce | 4be6cb6f6f45cdd60085617e3eaeeac674f3e776 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 876 | sce | Ex1_33.sce | clc;
P=500000; // VA rating of transformer
E2=400; // rated secondary voltage
nmax=0.98; // maximum efficiency of transformer
l=80; // percentage of full load at which maximum efficiency occurs
ze2=4.5; // percentage impedance
pt=((1/nmax)-1)*P*(l/100); // total losses
pc=pt/2; // core loss = ohmic loss at maximum efficiency
poh=pc; // ohmic loss
pohl=poh*(100/l)^2; // full load ohmic losses
re2=(pohl/P)*100; // percentage resistance
xe2=sqrt(ze2^2-re2^2); // percentage leakage reactance
pfl=re2/ze2; // load power factor
vr=re2*pfl+xe2*sqrt(1-pfl^2); // voltage regulation
dv=(E2*vr)/100; // change in terminal voltage
V2=E2-dv; // Secondary terminal voltage
printf('Load power factor at which secondary terminal voltage is minimum is %f\n',pfl);
printf('Secondary terminal voltage is %f v',V2);
// answer for total losses is given wrong in the book
|
1552f51690e0e10cfefa2afef2f746a0e75bc4c8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2150/CH3/EX3.1/ex3_1.sce | 7f9caa4a8fabcc1e7ba92ca334788ef272280329 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 284 | sce | ex3_1.sce | // Exa 3.1
clc;
clear;
close;
// given data
V1 = 18;// in V
V2 = 10;// in V
R = 270;// in ohm
I_S = (V1-V2)/R;// in A
V_L = 10;// in V
R_L = 1;// in K ohm
R_L = R_L*1000;// in ohm
I_L = V_L/R_L;// in A
I_Z = I_S-I_L;// in A
disp(I_Z*10^3,"The zener current in mA is");
|
824a81e1be6656d9d89dc209159f8740df0885fd | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.4.1/Unix-Windows/scilab-2.4.1/demos/icse/icsvisu.sci | c25a8f6b5acb9c780adf036e96cbf65ab462301f | [
"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 | 586 | sci | icsvisu.sci | function [yobt,yob]=icsvisu(vue)
//Visualisation de l'observation de l'etat
//Syntaxe
//[yobt,yob]=icsvisu(vue)
//variables d'entree :
//vue : vecteur des indices des composantes a visualiser
//variables de sortie :
//yobt : observation de l'etat a tous les instants
//yob : idem, aux instants d'observation
//!
//
// Copyright INRIA
tob1=[t0,tob];
tobt=t0*ones(1,nti+ntf)+[dti*[1:nti],dtf*[(nti*dti/dtf)+1:..
(nti*dti/dtf)+ntf]];
tobt=[t0,tobt];
[ytob]=icob(dtv);
[ytot]=icot(dtv);
yobt=obs*[y0',ytot];
yob=obs*[y0',ytob];
for i=vue plot(tobt,yobt(i,:)); plot(tob1,yob(i,:));end;
|
31ebc2ae599e049f7e1d1e5fba9aacbf0d427d84 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1445/CH1/EX1.39/Ex1_39.sce | 234b48c4ee79a94c59213a8998a19417d1b93469 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 406 | sce | Ex1_39.sce | //CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 39
clc;
disp("CHAPTER 1");
disp("EXAMPLE 39");
//VARIABLE INITIALIZATION
v=2; //in Volts
r=2; //in Ohms
//SOLUTION
z_star=r/3;
req1=(r/3)+r;
req2=(r/3)+r;
req3=(req1*req2)/(req1+req2);
req4=(r/3)+req3;
req5=(req4*r)/(req4+r);
I=v/req5;
disp(sprintf("The value of I is %d A",I));
//END
|
252acb46c5143fa686e1685a892cd0847c969e12 | 389bd4af3bf5a0f54f51e8aafea5035f568ba445 | /for_dongusu.sce | 4242210ac6584fde72f95f508cc8c0383f0d375f | [] | 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 | 137 | sce | for_dongusu.sce | h=0;
for a=-50:0.1:50
h=h+1;
g(h)=a;
if a==(35.2) then
break;
disp('şart sağlandı')
end
end
|
6f7703d9a7e8ada99763b5d281af480303ce5981 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3785/CH8/EX8.5/Ex8_5.sce | 49dda9167d27824bd71bc04b27a4b133099e6a8a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 441 | sce | Ex8_5.sce | // Example 8_5
clc;funcprot(0);
// Given data
Q=5;// The flow rate of water through a pipe in gal/min
q=10*10^3;// kW
c_p=4.18;// The specific heat in J/kg.K
rho=1*10^3;// The density of water in kg/m^3
// Calculation
Q=(Q*3.785*10^-3)/60;// The flow rate of water through a pipe in m^3/s
deltaT=q/(rho*Q*c_p*10^3);// The temperature rise in the water in K
printf("The temperature rise in the water,T_out-T_in=%1.3f K",deltaT);
|
a51a56b0ff07b05b995adaee2a296710df79ed9f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2234/CH2/EX2.12/ex2_12.sce | 4d907bbacb799fc63c2d3dbbfd37a181272fbcd1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 77 | sce | ex2_12.sce | clc;
disp("H field at the center is nearly the same."); //displaying result |
f26e87bcd45e1d8b5f38f0b89178315a211afe3b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1964/CH1/EX1.37/ex1_37.sce | 68f7119c8f8bab999606859d2e1416c81deb081d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 866 | sce | ex1_37.sce | //Chapter-1, Example 1.37, Page 48
//=============================================================================
clc;
clear;
//INPUT DATA
P=16;//total power dissipated in circuit in Watts
R1=4;//resistance R1 in Ohms
R2=2;//resistance R2 in Ohms
R3=8;//resistance R3 in Ohms
V=8;//supply voltage in volts
//let resistance parallel to R1 is R ohms
//CALCULATIONS
Reff=(((V)^2)/P);//total effective resistance of circuit in ohms
x=((R2*R3)/(R2+R3));//effective resistance of 2nd parallel circuit in ohms
z=(Reff-x);//effective resistance of 1st parallel circuit where z=((R1*R)/(R1+R)) in ohms------eqn(1)
//solving for R in eqn(1)
R=(R1*z)/(R1-z);
Reff=((R1*R)/(R1+R))+(x);//in ohms
I=V/Reff;//total current in A
mprintf("Thus the total current is I=%d A ",I);
//=================================END OF PROGRAM==============================
|
f2eceec453e25715629cba8588d0dde504609d94 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3802/CH2/EX2.15/Ex2_15.sce | 81190c5be69466ea4551ac0b19e0ac2601fbfac8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 737 | sce | Ex2_15.sce | //Book Name:Fundamentals of Electrical Engineering
//Author:Rajendra Prasad
//Publisher: PHI Learning Private Limited
//Edition:Third ,2014
//Ex2_15.sce.
clc;
clear;
R_aB=5;
R_AB=6;
R_BC=6;
R_CD=5;
R_AE=25;
R_ED=10;
R_DA=5;
R_EC=50;
//For triangle AED
R_OA=(R_AE*R_DA)/(R_AE+R_ED+R_DA);
R_OD=(R_ED*R_DA)/(R_AE+R_ED+R_DA);
R_OE=(R_AE*R_ED)/(R_AE+R_ED+R_DA);
//For triangle OCD
R_OC=R_OE+R_EC;
R_OdashO=(R_OC*R_OD)/(R_OC+R_OD+R_CD);
R_OdashD=(R_CD*R_OD)/(R_OC+R_OD+R_CD);
R_OdashC=(R_OC*R_CD)/(R_OC+R_OD+R_CD);
R_OB=R_OA+R_AB;
R_BOdash=((R_OB+R_OdashO)*(R_BC+(R_OdashC)))/(R_OB+R_OdashO+R_BC+R_OdashC);
Rab=(R_aB+(R_BOdash)+(R_OdashD));
printf("\n The driving point resistance=%2.1f ohms \n",Rab)
|
f63557c0fa5ec63dec066a87561a8d20a229b341 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.3.1/Unix-Windows/scilab-2.3/macros/auto/minreal.sci | a188ebeb224a977a17edbd0720b88c6c8df8a843 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 1,270 | sci | minreal.sci | function [a,b,c]=minreal(a,b,c,domaine,tol)
//
[lhs,rhs]=argn(0)
select type(a)
//-compat next case retained for list/tlist compatibility
case 15
flag=a(1)
if flag(1)<>'lss' then error(91,1),end
if lhs<>1 then error('output: sle'),end;
select rhs
case 1 then istol=0
case 2 then istol=1,tol=b,
else error('2 inputs to minreal: sl [,tol]'),
end;
[a,b,c,d,x0,dom]=a(2:7);
if dom=[] then error(96,1),end
domaine='c';if dom<>'c' then domaine='d',end
case 16
flag=a(1)
if flag(1)<>'lss' then error(91,1),end
if lhs<>1 then error('output: sle'),end;
select rhs
case 1 then istol=0
case 2 then istol=1,tol=b,
else error('2 inputs to minreal: sl [,tol]'),
end;
[a,b,c,d,x0,dom]=a(2:7);
if dom=[] then error(96,1),end
domaine='c';if dom<>'c' then domaine='d',end
case 1
if lhs<>3 then
error('3 outputs to minreal: ae,be,ce'),
end;
select rhs
case 4 then istol=0
case 5 then istol=1,
else error('4 or 5 outputs :a,b,c,domaine [,tol]'),
end;
else
error(91,1)
end;
//
wc=lyap(a',-b*b',domaine);
wo=lyap(a,-c'*c,domaine);
if istol=0 then
[r,n]=equil1(wc,wo);
else
[r,n]=equil1(wc,wo,tol);
end;
n1=n(1);
ri=inv(r);r=r(1:n1,:);ri=ri(:,1:n1)
a=r*a*ri;b=r*b;c=c*ri
if lhs=1 then a=syslin(dom,a,b,c,d,r*x0),end
|
b8fa6bf64a7cc4ed2473ae33ffa9d68c6839a69b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3511/CH8/EX8.5/Ex8_5.sce | bbb11b731d3a50d9303635ede6747e9b093b9952 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,054 | sce | Ex8_5.sce | clc;
N=12500; // Speed in rpm
m=15; // Mass flow rate in kg/s
rp=4; // Pressure ratio
eff_c=0.75; // Isentropic efficiency
mu=0.9; // Slip factor
pi=0.3; // Flow coefficient at impeller exit
D=0.15; // Hub diameter in m
ca2=150; // Axial velocity in m/s
T01=275; // Inlet temperature in kelvin
p01=1; // Inlet pressure in bar
Cp=1.005;// Specific heat at constant pressure in kJ/kg K
Cv=0.717;// Specific heat at constant volume in kJ/kg K
r=1.4; // Specific heat ratio
R=287; // Characteristic gas constant in J/kg K
u2=ca2/pi;
P=m*mu*u2^2/1000; // Power output
D2=u2*60/(3.14*N);
T1=T01-ca2^2/(2*Cp*10^3);
p1=p01*(T1/T01)^(r/(r-1));
row1=p1*10^5/(R*T1);
A1=m/(row1*ca2);
D1=sqrt ((A1*4/(3.14))+D^2);
p3_p1=rp;
p2=2*p1;
T_2=T1*(p2/p1)^((r-1)/r);
T2=T1+(T_2-T1)/eff_c;
row2=p2*10^5/(R*T2);
W2=(m)/(row2*ca2*3.14*D2);
disp ("kW",P,"Power = ");
disp ("Impeller Diameters");
disp ("cm",D2*100,"D2 = ","cm (roundoff error)",D1*100,"D1 = ");
disp ("Impeller width")
disp ("cm (roundoff error)",W2*100,"W2 = ");
|
85f6efcc3d5a4c61f84a9b2bc1e969054cfd2474 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3673/CH1/EX1.a.11/Example_a_1_11.sce | 4af08c4604a1413cdb31a2192832b885028ed618 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 305 | sce | Example_a_1_11.sce | //Example 1_11 page no:28
clc;
R1=5;
R2=25;
R3=10;
V=50;
It=6;
//current in branch ADB
I30=V/(R2+R1);
disp(I30,"the current in branch ADB is (in A)");
//current in branch ACB
I10=It-I30;
disp(I10,"the current in branch ACB is (in A)");
R=(V/I10)-R3;
disp(R,"the resistance R is (in ohm)");
|
9272fc47a8246b006667e0d9c04ee41b6785dbad | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/FP1.prev.tst | e2dd21944dcfe6b4a45bc3e03c3fd89817ccadcd | [
"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 | 229 | tst | FP1.prev.tst | PrimeFactorization(2) = 2
.toString(3) = 2
.toString(4) = <span class="p2">2</span>
.wideToPower(4) = 2^3
.root(2) = 2^2
.radical() = 2
.multiply(same) = 2^2
.valueOf() = 4
2.reducePowerOf(2) = 1, 2
2.modulus(4) = 2
|
7da84d361b86cb087617f17d66f036b95715baf5 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.4/macros/util/adj2sp.sci | a758039b78fb8b34678bd21835a8c02ee1b3ec55 | [
"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 | 278 | sci | adj2sp.sci | function p=adj2sp(xadj,adjncy,anz,mn)
//adjacency to sparse conversion.
[LHS ,RHS ]=argn(0);
nb=size(xadj,1)-1;
nza=size(adjncy,1);
i = fadj2sp(xadj,nb,nza);
nr=max(adjncy);
if RHS == 4 then
p=sparse([i,adjncy],anz,[mn(2),mn(1)])';
else
p=sparse([i,adjncy],anz,[nb,nr])';
end;
|
ca4f8650b283b9f917364413c16586301cbb4463 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2066/CH7/EX7.12/7_12.sce | 7e7fb336ab2267a75dbd2dbb44fb60318c859ad3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 292 | sce | 7_12.sce | clc
clear
//Initialization of variables
p1=25 //psig
p2=20 //psig
d1=18 //in
d2=12 //in
Cl=0.25
gam=62.4
g=32.2 //ft/s^2
//calculations
Vr=(d2/d1)^2
xv=(p2-p1)*144/gam
V22=xv/(-1-Cl+Vr^2) *2*g
V2=sqrt(V22)
Q=V2*%pi/4 *(d2/12)^2
//results
printf("Discharge = %.1f ft^3/s",Q)
|
f97c8aeef2055e5f036f960073ffcb4b7587753a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1850/CH4/EX4.3/exa_4_3.sce | 58acb06a49f152e5d02026cc6c0460e4d326673a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 202 | sce | exa_4_3.sce | // Exa 4.3
clc;
clear;
close;
// Given data
A_VD= 200;// in V/mV
A_VD=A_VD*10^3;// in V/V
B1=1;// in MHz
B1=B1*10^6;// in Hz
f1=B1;
f0= f1/A_VD;// in Hz
disp(f0,"Cut-off frequency in Hz")
|
c1e1b089431d0552a54fdfdf79e1ff0b92ed9c70 | 449d555969bfd7befe906877abab098c6e63a0e8 | /72/CH8/EX8.3.1/8_3_1.sce | 8fc768693bd8bc38ac2ab3712b16e8d1f9512c0b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 305 | sce | 8_3_1.sce |
//chapter_no.-8, page_no.-334
//Example_no.8-3-1
clc;
J=20*(10^3);//current_density
q=1.6*(10^-19);
NA=2*(10^15);//Doping_Concentration
vs=J/(q*NA);
disp(vs,'avalanche-zone_velocity(in cm/s)is =');
disp('This means that the avalanch-zone velocity is much larger than the scattering-limited velocity'); |
26e271ba96a5e09aa25be51edd5909f92f6299be | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.1/Unix/scilab-2.1/macros/arma/prbs_a.sci | c0b75c1af88f7ff21fbe2a35a9af6df7cb45a97d | [
"MIT",
"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 | 762 | sci | prbs_a.sci | //<u>=prbs_a(n,nc,ids)
//<u>=prbs_a(n,nc,[ids])
// Tirage de PRBS
// tirage de u=<u0,u1,...,u_(n-1)>;
// a valeurs dans {-1,1} et changeant nc fois de signe
// au plus.
// Si on veut fixer les dates de changement de signe on peut
// fournir une variable de plus ids qui est un vecteur
// donnant les indices de changement de signe de u (ordre quelconque)
//!
[lhs,rhs]=argn(0)
if rhs <=2,
rand('uniform');
yy= int(mini(maxi(n*rand(1,nc),1*ones(1,nc)),n*ones(1,nc)));
ids=sort(yy);ids=[n,ids,1];
else
[n1,n2]=size(ids);
ids=[n,mini(n*ones(ids),maxi(sort(ids),1*ones(ids))),1];
end
u=0*ones(1,n);
[n1,n2]=size(ids);
val=1;
for i=1:n2-1,
if ids(i)<>ids(i+1);
u(ids(i+1):ids(i))=val*ones(ids(i+1):ids(i));val=-1*val;
end
end
//end
|
f9078dadf0a81c4974e6073a05e7f2397780bf4c | 03d0f9c67fad13abbcf2ce0b810ca85025d12cef | /presentation scripts/matching pennies/phase2_MP_2A.sce | c38317efc8025b475516b5ddbb7593e28204bb84 | [] | no_license | Kwan-Lab/behavioral-rigs | 1f6f9719b02d957e2777c1b485ff8224e96c7d5d | 8e2ac0f9a36fc177a457d127474f8823d78c915b | refs/heads/master | 2022-06-21T13:03:35.870220 | 2022-06-06T23:55:01 | 2022-06-06T23:55:01 | 254,467,063 | 4 | 1 | null | 2022-06-06T23:55:03 | 2020-04-09T20:02:30 | Scilab | UTF-8 | Scilab | false | false | 21,986 | sce | phase2_MP_2A.sce | #-- scenario file --#
# matching pennies test: algorithm 2
# animal gets reward when it chooses the same side with the computer
#algorithm 0:
# computer's choice: generated randomly as 0.5:0.5
#algorithm 1 (only use the choice history):
# 1: 5 binomial test in total
# 1) N=0 P(left) = P(right) = 0.5
# 2) N=1 P(right(t)| right(t-1) ) = 0.5 or P(right(t) | left(t-1)) = 0.5 (depends on the choice of privous trials)
# 3) N=2; N=3; N=4;
# 2:
# 1) if there are no significant difference between 0.5 and the animals choice history, then the computer generate the choice randomly as 0.5:0.5
# 2) if there are. then find the probability(P) to choose right corresponding to the smallest p value. The computer will choose right with the probability (1-P)
#algorithm 2 (use both choice and reward history). rest same as algorithm 1
#tips: the random() function returns a random floating number between 0 and 1 (with 0, without 1)
# when I press spacebar, give it water
# when mouse licks either port, give it water
# count water given by manualfeed or induced by licks
# modified from phase0, 500 ms go cue, 3-4s free water, 2-3s no water with white noise
scenario = "phase2_matchingPennies_algorithm1";
active_buttons = 3; #how many response buttons in scenario
button_codes = 1,2,3;
#target_button_codes = 1,2,3;
# write_codes = true; #using analog output port to sync with electrophys
response_logging = log_all; #log all trials
response_matching = simple_matching; #response time match to stimuli
begin;
#-------SOUND STIMULI-------#
sound {
wavefile { filename ="tone_5000Hz_0.2Dur.wav"; preload = true; };
} go;
sound {
wavefile { filename ="wanyu_white_noise_8s.wav"; preload=true; };
} whitenoise;
#--------trial---------#
trial {
save_logfile {
filename = "temp.log"; # use temp.log in default logfile directory
}; #save logfile during mid-experiment
}quicksave;
trial {
trial_type = fixed;
trial_duration = 100;
nothing {} startexptleftevent;
code=51;
}startexptleft;
trial {
trial_type = fixed;
trial_duration = 100;
nothing {} startexptrightevent;
code=52;
}startexptright;
trial {
trial_type = fixed;
trial_duration = 3000; #at least 500ms between water
nothing {} waterrewardexptevent;
code=10;
response_active = true; #still record the licks
}waterrewardmanual;
trial {
trial_type = fixed;
trial_duration = 3000; #at least 500ms between water
nothing {} waterrewardleftexptevent;
code=100;
response_active = true; #still record the licks
}waterrewardleft;
trial {
trial_type = fixed;
trial_duration = 3000; #at least 500ms between water
nothing {} waterrewardrightexptevent;
code=111;
response_active = true; #still record the licks
}waterrewardright;
trial {
trial_type = fixed;
trial_duration = 3000; #at least 500ms between water
nothing {} nowaterrewardleftexptevent;
code=101;
response_active = true; #still record the licks
}norewardleft;
trial {
trial_type = fixed;
trial_duration = 3000; #at least 500ms between water
nothing {} nowaterrewardrightexptevent;
code=110;
response_active = true; #still record the licks
}norewardright;
trial {
all_responses = false; #ignore the first 10ms response
trial_type = first_response;
trial_duration = 2000;
nothing {};
code=51;
sound go;
time=0;
stimulus_time_in = 10; # assign response that occur
stimulus_time_out = 2000; # 0.5-2 s after start of stimulus
target_button = 2;
}waitlickleft;
trial {
all_responses = false; #ignore the first 10ms response
trial_type = first_response;
trial_duration = 2000;
nothing {};
code=52;
sound go;
time=0;
stimulus_time_in = 10; # assign response that occur
stimulus_time_out = 2000; # 0.5-2 s after start of stimulus
target_button = 2;
}waitlickright;
trial {
trial_type = fixed;
trial_duration = 2500;
nothing {} nolickevent;
code=19;
}nolick;
trial {
trial_type = fixed;
trial_duration = 3000;
nothing {} pauseevent;
code=77;
} pause;
begin_pcl;
#for generating exponetial distribution (white noise block)
double minimum=1.0;
double mu=0.33333; #rate parameter for exponential distribution
double truncate=5.0;
double expval=0.0;
term.print("Starting time:");
term.print(date_time());
logfile.add_event_entry(date_time());
display_window.draw_text("Initializing...");
int maxNolick=5;
int num_trials = 1000; # user enters initial value in dialog before scenario
preset int waterAmount_left = 74;
preset int waterAmount_right = 77;
preset int max_consecMiss = 10; ; #triggers end session, for mice, set to 20
int consecMiss = 0;
# #msec to open water valve
int manualfeed=0;
int leftlick=0;
int rightlick=0;
int missed = 0;
int rewards = 0;
int numTrials = 0;
int numNLs = 0;
array<int>leftCountMat[5][num_trials];
array<int>rightCountMat[5][num_trials];
array<int>leftCountMatChoice[5][num_trials];
array<int>rightCountMatChoice[5][num_trials];
parameter_window.remove_all();
int manualfeedIndex = parameter_window.add_parameter("Manual feed");
int leftlickIndex = parameter_window.add_parameter("Left Lick");
int rightlickIndex = parameter_window.add_parameter("Right Lick");
int missIndex = parameter_window.add_parameter("ConsecMiss");
int trialIndex = parameter_window.add_parameter("trial_num");
#int nolickIndex = parameter_window.add_parameter("noLick");
int currentAgentIndex = parameter_window.add_parameter("curAgent");
int currentComIndex = parameter_window.add_parameter("curCom");
#int pValueIndex = parameter_window.add_parameter("p-value");
int probIndex = parameter_window.add_parameter("left-prob");
int combIndex = parameter_window.add_parameter("current combination");
int indIndex = parameter_window.add_parameter("current index");
int nolickIndex = parameter_window.add_parameter("#NL");
int meanNLIndex = parameter_window.add_parameter("meanNL");
int rewardRateIndex = parameter_window.add_parameter("reward rate");
array<double> pUse[num_trials];
pUse[1]=0.5;
int choiceLen;
double rand;
#initialize the choice history and reward list
array<int> agentChoiceHistory[0]; array<int> comChoiceHistory[num_trials]; array<int> rewardHistory[0];
array<int> allRewardHistory[num_trials];
#2: left choice, 3: right choice for choice history
#0: no reward, 1:reward for reward history
# set up parallel port for water reward
array<int> ChoiceHistory[num_trials]; #to store all the choices including miss
#create array to save the counting results
array<int> dynChoiceCount[512];
#the first 4 elements represent reward history: r_-4. r_-3. r_-2, r_-1
#last 5 elements represent choice history: c_-4, c_-3, c_-2, c_-1, c_0(this one is what need to count
array<int> dynChoiceCountChoice[32];
#this array are used to represent the 32 (2^5) combinations of left and right under N=4 condition
#using 0,1 to represent left and right in the commentchoice):
#[00000][00001][00010][00011][00100][00101][00110][00111][01000][01001][01010][01011][01100][01101][01110][01111]
#[10000][10001][10010][10011][10100][10101][10110][10111][11000][11001][11010][11011][11100][11101][11110][11111]
#to update the number, using the last 5 trials to get the index, then plus 1
#for N=3,using [1xxxx]+[0xxxx]....
array<int> curComb[4];#to store current combination
array<int> curCombChoice[5];#to store current combination
array<int> baseSeq[0]; #sequence to be searched in every trial
array<int> baseSeqChoice[0]; #sequence to be searched in every trial
double prob=0.5;
double minProb=0.5;
double nullP = 0.5; #for binomial test
double maxP = 0.05;
double meanNL = 0.0;
double rewardRate = 0.0;
int leftCount=0;
int rightCount=0; #this left and right are for binomial test
int totalCount=0;
int leftCountChoice=0;
int rightCountChoice=0; #this left and right are for binomial test
int totalCountChoice=0;
array<int>totaltime[0];
double pValue=0.05;
double pValueChoice=0.05;
#record the time to run the binomial test
int curInd;
int curIndChoice;
#read in the binomial test-p value cheatsheet
input_file f=new input_file;
array<string> lines[0];
string path="C:\\Users\\KWANBEH05\\Desktop\\Presentation\\hongli\\matchingpennies\\binomialtest_cheatsheet.txt";
f.open(path);
string line=f.get_line();
loop until !f.last_succeeded() begin
lines.add(line);
line=f.get_line();
end;
array<double> pValueList[500][500];
loop int i=1 until i>lines.count() begin
array<string> words[0];
lines[i].split(" ", words);
loop int word=1 until word>words.count() begin
if (words[word] != "") then
pValueList[i][word]=double(words[word]);
end;
word=word+1;
end;
i=i+1;
end;
array<int> IndNeed[0];
array<int> Ind1[8];
Ind1={0, 4, 8, 12, 16, 20, 24, 28};
IndNeed.append(Ind1);
loop int k=1;
until k>8
begin
Ind1[k]=Ind1[k]+64;
k=k+1;
end;
IndNeed.append(Ind1);
array<int> temp[16];
loop int k=1;
until k>16
begin
temp[k]=IndNeed[k]+128;
k=k+1;
end;
IndNeed.append(temp);
array<int> temp2[32];
loop int k=1;
until k>32
begin
temp2[k]=IndNeed[k]+256;
k=k+1;
end;
IndNeed.append(temp2);
#use subroutines to write several functions
#exponential calculation
sub
double exponential (double base, int expo)
begin
double exp;
if expo==0 then
exp=1.0;
else
exp=1.0;
loop
until
expo<1
begin
exp=exp*base;
expo=expo-1;
end;
end;
return exp;
end;
#this function is used to slice the array
sub
array<int,1> slice (array<int,1>& inputArray, int startNum, int endNum)
begin
array<int> slice[0];
loop
int i=startNum;
until
i>endNum
begin
slice.add(inputArray[i]);
i=i+1;
end;
return slice;
end;
sub int trans_index(array<int,1>& comb)
#input an array, digits representing left and right choice by 0 and 1 respectively
#transfer to 10 to get the corrresponding index of the counting array
begin
int ind=1;
int leng=comb.count();
loop
int i=1
until i>leng
begin
ind=ind+(comb[i]-2)*int(exponential(2.0, (leng-i)));
i=i+1;
end;
#index starts at 1 instead of 0
return ind
end;
output_port port = output_port_manager.get_port(1);
display_window.draw_text("Water reward with left lick or right lick or Spacebar...");
rand =random();
if (rand <= 0.5) then
comChoiceHistory[1]=2;
else
comChoiceHistory[1]=3;
end;
int timeStart=0;
int timeEnd=0;
loop
int i = 1
until consecMiss >= max_consecMiss
begin
missed = 0;
parameter_window.set_parameter(currentComIndex,string(comChoiceHistory[i]));
if comChoiceHistory[i]==2 then
waitlickleft.present(); #waitlick event may be missed in the logfile, this event is added to make sure there is a start mark for the trial
elseif comChoiceHistory[i]==3 then
waitlickright.present();
end;
#generate the computer's choice here (not sure about the consequence, if it takes too much time, then it may delay the response recording, wait for later testing)
#for algorithm 1, need to do 5 binomial test first.
#i equals to the length of agentChoiceHistory
parameter_window.set_parameter(currentComIndex,string(comChoiceHistory[i]));
if response_manager.response_count()>0 then
if (response_manager.last_response() == 1) then #if spacebar
port.set_pulse_width(waterAmount_left);
port.send_code(4); #give water reward to left
port.set_pulse_width(waterAmount_right);
port.send_code(8); #give water reward to right
waterrewardmanual.present();
manualfeed = manualfeed + 1;
parameter_window.set_parameter(manualfeedIndex, string(manualfeed));
consecMiss=0;
elseif (response_manager.last_response() == comChoiceHistory[i]) then #if licking the same port as the computer chooses
rewardHistory.add(3);
rewards = rewards + 1;
numTrials = numTrials + 1;
allRewardHistory[i]=1;
if (comChoiceHistory[i]==2) then
agentChoiceHistory.add(2);
ChoiceHistory[i]=2;
port.set_pulse_width(waterAmount_left);
port.send_code(4); #give water reward to left
waterrewardleft.present();
leftlick = leftlick + 1;
parameter_window.set_parameter(leftlickIndex,string(leftlick));
consecMiss=0;
parameter_window.set_parameter(missIndex,string(consecMiss));
elseif (comChoiceHistory[i]==3) then
agentChoiceHistory.add(3);
ChoiceHistory[i]=3;
port.set_pulse_width(waterAmount_right);
port.send_code(8); #give water reward to right
waterrewardright.present();
rightlick = rightlick + 1;
parameter_window.set_parameter(rightlickIndex,string(rightlick));
consecMiss=0;
parameter_window.set_parameter(missIndex,string(consecMiss));
end;
elseif (response_manager.last_response() != comChoiceHistory[i]) then
rewardHistory.add(2);
numTrials = numTrials + 1;
allRewardHistory[i]=0;
if ((response_manager.last_response()==2)) then
agentChoiceHistory.add(2);
ChoiceHistory[i]=2;
leftlick = leftlick + 1;
norewardright.present(); #nowaterrewardright means the computer chooses right
parameter_window.set_parameter(leftlickIndex,string(leftlick));
consecMiss=0;
parameter_window.set_parameter(missIndex,string(consecMiss));
elseif ((response_manager.last_response()==3)) then
agentChoiceHistory.add(3);
ChoiceHistory[i]=3;
rightlick = rightlick + 1;
norewardleft.present();
parameter_window.set_parameter(rightlickIndex,string(rightlick));
consecMiss=0;
parameter_window.set_parameter(missIndex,string(consecMiss));
end;
end;
else
pause.present();
missed = 1;
#agentChoiceHistory.add(0); #0 represent missed trial
#rewardHistory.add(0);
ChoiceHistory[i]=0;
consecMiss=consecMiss+1;
allRewardHistory[i]=0;
parameter_window.set_parameter(missIndex,string(consecMiss));
end;
parameter_window.set_parameter(currentAgentIndex,string(ChoiceHistory[i]));
#update the choice counting
#representation:
#update the count
curComb.resize(4);
choiceLen=agentChoiceHistory.count();
if choiceLen>=5 && ChoiceHistory[i]!=0 then
curComb=slice(rewardHistory, choiceLen-4, choiceLen-1);
curCombChoice=slice(agentChoiceHistory, choiceLen-4, choiceLen);
curComb.append(curCombChoice);
#first 4 reward his, then 5 choice His
curInd=trans_index(curComb);
curIndChoice=trans_index(curCombChoice);
if curInd>0 then
dynChoiceCount[curInd]=dynChoiceCount[curInd]+1;
dynChoiceCountChoice[curIndChoice]=dynChoiceCountChoice[curIndChoice]+1;
end
end;
i=i+1;
minProb=0.5;
maxP=0.05;
int baseInd;
int baseIndChoice;
if choiceLen<=5 then
rand =random();
if (rand <= 0.5) then
comChoiceHistory[i]=2;
else
comChoiceHistory[i]=3;
end;
else
loop
int j=0
until
j>4
begin
leftCount=0;
rightCount=0;
if j>0 then
baseSeq.resize(j);
baseSeqChoice.resize(0);
baseSeq=slice(rewardHistory,choiceLen-j+1,choiceLen);
#add missed choice history(between reward history and choice history)
#total digits should be 8
loop int k=1;
until k>4-j
begin
baseSeq.add(2);
k=k+1;
end;
baseSeq.append(slice(agentChoiceHistory,choiceLen-j+1,choiceLen));
baseSeq.add(2); #get the correct index
baseInd=trans_index(baseSeq);
baseSeqChoice.append(slice(agentChoiceHistory,choiceLen-j+1,choiceLen));
baseSeqChoice.add(2); #get the right index
baseIndChoice=trans_index(baseSeqChoice);
end;
if j==4 then
leftCount=dynChoiceCount[0+baseInd];
rightCount=dynChoiceCount[1+baseInd];
leftCountChoice=dynChoiceCountChoice[0+baseIndChoice];
rightCountChoice=dynChoiceCountChoice[1+baseIndChoice];
elseif j==0 then
leftCount=leftlick;
rightCount=rightlick;
leftCountChoice=0;
rightCountChoice=0;
elseif j==1 then
#IndNeed is the 64 index we need to updata the choice count while j=1;
#there should be easier ways to do this.
#adding the choice count
loop int k=1
until k>64
begin
leftCount=leftCount+dynChoiceCount[IndNeed[k]+baseInd];
rightCount=rightCount+dynChoiceCount[IndNeed[k]+1+baseInd];
k=k+1;
end;
#adding
leftCountChoice=dynChoiceCountChoice[0+baseIndChoice]+dynChoiceCountChoice[4+baseIndChoice]+dynChoiceCountChoice[8+baseIndChoice]+dynChoiceCountChoice[12+baseIndChoice]+dynChoiceCountChoice[16+baseIndChoice]+dynChoiceCountChoice[20+baseIndChoice]+dynChoiceCountChoice[24+baseIndChoice]+dynChoiceCountChoice[28+baseIndChoice];
rightCountChoice=dynChoiceCountChoice[1+baseIndChoice]+dynChoiceCountChoice[5+baseIndChoice]+dynChoiceCountChoice[9+baseIndChoice]+dynChoiceCountChoice[13+baseIndChoice]+dynChoiceCountChoice[17+baseIndChoice]+dynChoiceCountChoice[21+baseIndChoice]+dynChoiceCountChoice[25+baseIndChoice]+dynChoiceCountChoice[29+baseIndChoice];
elseif j==2 then
leftCount=dynChoiceCount[0+baseInd]+dynChoiceCount[8+baseInd]+dynChoiceCount[16+baseInd]+dynChoiceCount[24+baseInd]+dynChoiceCount[128+baseInd]+dynChoiceCount[136+baseInd]+dynChoiceCount[144+baseInd]+dynChoiceCount[152+baseInd]+dynChoiceCount[256+baseInd]+dynChoiceCount[264+baseInd]+dynChoiceCount[272+baseInd]+dynChoiceCount[280+baseInd]+dynChoiceCount[384+baseInd]+dynChoiceCount[392+baseInd]+dynChoiceCount[400+baseInd]+dynChoiceCount[408+baseInd];
rightCount=dynChoiceCount[1+baseInd]+dynChoiceCount[9+baseInd]+dynChoiceCount[17+baseInd]+dynChoiceCount[25+baseInd]+dynChoiceCount[129+baseInd]+dynChoiceCount[137+baseInd]+dynChoiceCount[145+baseInd]+dynChoiceCount[153+baseInd]+dynChoiceCount[257+baseInd]+dynChoiceCount[265+baseInd]+dynChoiceCount[273+baseInd]+dynChoiceCount[281+baseInd]+dynChoiceCount[385+baseInd]+dynChoiceCount[393+baseInd]+dynChoiceCount[401+baseInd]+dynChoiceCount[409+baseInd];
leftCountChoice=dynChoiceCountChoice[0+baseIndChoice]+dynChoiceCountChoice[8+baseIndChoice]+dynChoiceCountChoice[16+baseIndChoice]+dynChoiceCountChoice[24+baseIndChoice];
rightCountChoice=dynChoiceCountChoice[1+baseIndChoice]+dynChoiceCountChoice[9+baseIndChoice]+dynChoiceCountChoice[17+baseIndChoice]+dynChoiceCountChoice[25+baseIndChoice];
elseif j==3 then
leftCount=dynChoiceCount[0+baseInd]+dynChoiceCount[16+baseInd]+dynChoiceCount[256+baseInd]+dynChoiceCount[272+baseInd];
rightCount=dynChoiceCount[1+baseInd]+dynChoiceCount[17+baseInd]+dynChoiceCount[257+baseInd]+dynChoiceCount[273+baseInd];
leftCountChoice=dynChoiceCountChoice[0+baseIndChoice]+dynChoiceCountChoice[16+baseIndChoice];
rightCountChoice=dynChoiceCountChoice[1+baseIndChoice]+dynChoiceCountChoice[17+baseIndChoice];
end;
#test begin
#for test:
leftCountMat[j+1][i-1] = leftCount;
rightCountMat[j+1][i-1] = rightCount;
leftCountMatChoice[j+1][i-1] = leftCountChoice;
rightCountMatChoice[j+1][i-1] = rightCountChoice;
totalCount = leftCount+rightCount;
totalCountChoice = leftCountChoice+rightCountChoice;
pValue=pValueList[leftCount+1][rightCount+1];
pValueChoice=pValueList[leftCountChoice+1][rightCountChoice+1];
if (pValue < maxP) then
prob = double(rightCount)/double(totalCount);
if abs(prob-0.5)>abs(minProb-0.5) then
minProb=prob;
end;
end;
if (pValueChoice < maxP) then
prob = double(rightCountChoice)/double(totalCountChoice);
if abs(prob-0.5)>abs(minProb-0.5) then
minProb=prob;
end;
end;
j=j+1;
end;
#parameter_window.set_parameter(pValueIndex, string(maxP));
#the loop above is for find the minimum p-value in binomial test and the corresponding probobility to choose right
rand =random();
if i<=num_trials then
if (rand > (1.0-minProb)) then
comChoiceHistory[i]=2;
else
comChoiceHistory[i]=3;
end;
pUse[i]=minProb;
end;
end;
parameter_window.set_parameter(probIndex, string(minProb));
parameter_window.set_parameter(trialIndex,string(i));
int nLicks=1; #initialize the lick count
int numNolick=0;
loop until nLicks == 0 || numNolick>=maxNolick
begin
int numLicks=0;
loop
expval=minimum-1.0/mu*log(random())
until
expval<truncate
begin
expval=minimum-1.0/mu*log(random())
end;
nolick.set_duration(int(1000.0*expval));
nolick.present();
numNolick=numNolick+1;
if missed == 0 then
numNLs = numNLs + 1;
end;
parameter_window.set_parameter(nolickIndex,string(numNolick));
nLicks=response_manager.response_count();
end;
if numTrials != 0 then
rewardRate = double(rewards) / double(numTrials) ;
meanNL = double(numNLs) / double(numTrials);
parameter_window.set_parameter(meanNLIndex,string(meanNL));
parameter_window.set_parameter(rewardRateIndex,string(rewardRate));
end;
#show the choice
parameter_window.set_parameter(trialIndex,string(i));
if (i%5) == 0 then #every 5 trials, save a temp logfile
quicksave.present();
end;
end;
term.print("\nAverage NL period: ");
term.print(meanNL);
term.print("\n");
term.print("\nAverage reward rate: ");
term.print(rewardRate);
term.print("\n");
display_window.draw_text("Free water session has ended.");
term.print("Ending time:");
term.print(date_time());
|
d8e61d2841a7b0561f127d1ce856567acd1b8e37 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1523/CH6/EX6.28/ex6_28.sce | 2e70ac0b68100c7263653d568c9b2dd3202f5405 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 526 | sce | ex6_28.sce | // Three-Phase Circuits :example 6.28 :(pg 6.31)
W1=5*10^3;
W2=-(0.5*10^3);
P=(W1+W2);
x=(sqrt(3)*((W1-W2)/(W1+W2)));
phi=atand(x);
pf=cosd(phi);
printf("\nW1=5kW \W2=0.5kW");
// When the latter readings are obtained after the reversal of the current coil terminals of the wattmeter
printf("\nWhen W2 is reversed \nW1=5kW \nW2=-0.5kW");
printf("\nP=W1+W2 = %.1f W",P);//Power
printf("\ntan(phi)=sqrt(3)*(W1-W2/W1+W2) =%.2f",x);
printf("\nphi= %.2f degrees ",phi);
printf("\npf=cos(phi) =%.2f",pf);//Power factor
|
af5da4f41c03352edd74d12e9cc4ce8370ab5c79 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3875/CH4/EX4.5/Ex4_5.sce | da3667ef7f2cbd3ea3f2866769929b0ff99ab7db | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 372 | sce | Ex4_5.sce | clc;
clear;
I=0.7*10^-2 //size of the image in m
u=0.3 //distance between the convex lens and the slit in m
v=0.7 //distance between the images in m
D=1 // distance between the slit and the images in m
Beta=0.0195*10^-2 //fringe width in m
//calculation
d=(I*u)/v
lambda=(Beta*d)/D
mprintf("The wavelength of light used is = %e m or 5850*10^-10 m.",lambda)
|
a7c4a99479638ea0e8a44c5eb5e07299b1791c2e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2741/CH6/EX6.20/Chapter6_Example20.sce | fbe55f8a8210cf4312b0e4acb8e44fa5f20bd7ce | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 711 | sce | Chapter6_Example20.sce | clc
clear
//Input data
l=4563;//The latent heat of fusion of naphthalene in cal/mol
V=18.7;//The increase in volume of fusion in cm^3/mol
p=1;//The pressure in atm
t=80;//The melting point of naphthalene in degree centigrade
//Calculations
L=l*4.2*10^7;//The latent heat of fusion of naphthalene in ergs/mol
T=t+273;//The melting point of naphthalene in K
P=76*13.6*980;//The pressure in dynes/cm^2
T1=(P*T*(V))/L;//The increase in the melting point of naphthalene with an increase in pressure of one atmosphere in K
//Output
printf('The increase in the melting point of naphthalene with an increase,\n in pressure of one atmosphere is %3.5f K (or) %3.5f degree centigrade ',T1,T1)
|
2a3ddf82f68ea8327553be47cd52d27b48407687 | 97135f725c599527ba0fd95a5289373c755daf3b | /Examples/test-suite/scilab/overload_extend_runme.sci | 4b18cf91d88e5227e62a1b96d3298b93723cae79 | [] | no_license | maqalaqil/swag-c- | b8880cfc92424d5bbca1fe15ed98663a41063f27 | 6fd1ba2bf1d353f24c116a3c89a8540292b86a7d | refs/heads/master | 2020-07-06T21:02:08.949652 | 2019-09-01T07:56:55 | 2019-09-01T07:56:55 | 203,137,066 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 354 | sci | overload_extend_runme.sci | exec("alaqiltest.start", -1);
//try
// x = new_Foo();
//catch
// alaqiltesterror();
//end
//if Foo_test(x) <> 0 then alaqiltesterror(); end
//if Foo_test(x, 1) <> 1 then alaqiltesterror(); end
//if Foo_test(x, 2, 3) <> 5 then alaqiltesterror(); end
//if Foo_test(x, "Hello, alaqil!") <> 2 then alaqiltesterror(); end
exec("alaqiltest.quit", -1);
|
1b5097bcd09e764d9997d699d8cfccf2dc5b4bcc | 449d555969bfd7befe906877abab098c6e63a0e8 | /3745/CH1/EX1.14/Ex1_14.sce | 154a29ed071dc82d3ce86039140e7140e5e013e1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 460 | sce | Ex1_14.sce | // Ex 14 Page 355
clc;clear;close;
// Given
f=50;//Hz
Vm=400;//V
R=10;//ohm
L=0.1;//H
t=0.02;//sec
XL=2*%pi*f*L;//ohm
Z=R+%i*XL;//ohm
Im=Vm/abs(Z);//A
fi=atan(XL/R);//degree
lambda=L/R;//sec
printf("expression for current:")
printf("\n i = %.1f*sin(314*t-%.3f)+0.95*e**(-100*t)",Im,fi)
i = Im*sin(314*t-fi)+0.95*%e**(-100*t);//A
printf("\n current after 0.02 sec is : %0.1f A",i)
i2=Im*(0.95*%e**(-100*t));//A
printf("\n transient component is : %0.2f A",i2)
|
0b72646e5e909feab960e05a74b2332d4ef1c36e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1784/CH27/EX27.9/example9.sce | bbb87e04bb563d35633e3c86e8218b9db598c301 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | example9.sce | //chapter27
//example 9
clc
//given
e=1.6*10^-19 //charge in coul
E=1.2*10^4 //electric field in nt/coul
x=1.5*10^-2 //length of deflecting assembly in m
K0=3.2*10^-16 //kinetic energy of electron in joule
//calculation
y=e*E*x^2/(4*K0)
disp(y,"Corresponding deflection in meters is")
|
5b6a8fb45011eed4427932a0309f0a7b5d65cbfa | b29e9715ab76b6f89609c32edd36f81a0dcf6a39 | /ketpic2escifiles6/Partframe.sci | a8581b1bc5cd91df70013d8cb3e4b61cf841b713 | [] | 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 | 601 | sci | Partframe.sci | // 13.05.03
function Out=Partframe(Tb,St,Ed)
G=Dividetable(Tb);
Gw=G(1);
Gt=G(2);
Gy=G(3);
Gwt=Tb(4);
Gwy=Tb(5);
Gat=lstcat(list(Gwt(1)),Gt,list(Gwt(2)));
Gay=lstcat(list(Gwy(1)),Gy,list(Gwy(2)));
Tmp1=Ptstart(Gat(St(1)));
Tmp2=Ptstart(Gay(St(2)));
Ps=[Tmp1(1),Tmp2(2)];
Tmp1=Ptstart(Gat(Ed(1)));
Tmp2=Ptstart(Gay(Ed(2)));
Pe=[Tmp1(1),Tmp2(2)];
Pars=Paramoncrv(Ps,Gw);
Pare=Paramoncrv(Pe,Gw);
if Pars<Pare then
Out=Partcrv(Pars,Pare,Gw);
else
Tmp1=Partcrv(Pars,Numptcrv(Gw),Gw);
Tmp2=Partcrv(1,Pare,Gw);
Out=Joincrvs(Tmp1,Tmp2);
end
endfunction;
|
cc0f78671bc745529185de8dbb1ad5645e6f7c13 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3784/CH7/EX7.9/Ex7_9.sce | 3401c09a53e9a8f334822bb84ca0ecba9c0a3306 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 970 | sce | Ex7_9.sce | clc
//Variable Initialisation
V=400//Supply Voltage in Volts
f=50//Supply Frequency in Hz
P=4//No of Poles
N=1460//Rotor Speed in rpm
d1=0.2//Duty Ratio
s1=0.13//Given Slip
d2=0.6//Duty Ratio
s2=0.04//Given Slip
s3=0.0867//Slip of motor
Rs=0.08//Motor Resistance in ohm
Xs=0.95//Motor Reactance in ohm
Rr1=0.055//Motor Resistance in ohm
X21=0.5//Motor Reactance in ohm
Rd=0.0114//Resistance of link Inductor in ohm
K=2//Stator to Rotor Turns Ratio
//Solution
V1=V/sqrt(3)
Ns=120*f/P
Ws=2*%pi*Ns/60
Sm=Rr1/(sqrt((Rs^2)+((Xs+X21)^2)))//Slip at maximum Torque
X2=X21*(K^2)
R2=Rs*(K^2)
Rr=Rr1*(K)//Wrongly Calculated in Textbook
Radd=R2-Rr
Rw=(Radd-Rd)/(1-d1)//The answers vary due to round off error
Radd2=Rd+Rw*(1-d2)
R22=Radd2+Rr
Td=3*(V1^2)*R22/(s2*Ws*(((Rs+(R22/s2))^2)+((Xs+X2)^2)))
printf('\n\n External Resistance=%0.1f ohm\n\n',Rw)
printf('\n\n Torque at given condition=%0.1f N-m\n\n',Td)
//The answers vary due to round off error
|
88ea9ee17f8284389bd5ec063e9a5abee3cc6157 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2045/CH5/EX5.12/Ex5_12.sce | ad9c9c4618fbfa1b1309f9c21a8e9d55065fa479 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 698 | sce | Ex5_12.sce | //pagenumber 292 example 12
clear
hfe=110;
hie=1.6*10^3;//ohm
hoe=20*10^-6;//ohm
colres=4.7*10^3;//ohm
hre=2*10^-4;
r1=470*10^3;//ohm
curgai=-hfe/(1+hoe*colres);
ri=hie+hre*curgai*colres;
volgai=curgai*colres/ri;
y1=hoe-((hfe*hre)/(hie+1*10^3))
z1=1/y1;
disp("voltage gain = "+string((volgai)));
disp("current gain = "+string((curgai)));
disp("impedance = "+string((z1))+"ohm");
r0=z1*colres/(z1+colres);
curgai=-hfe;
ri=hie;
disp("parameters using approxmiate");
volgai=curgai*(colres)/ri;
disp("voltage gain = "+string((volgai)));//correction in the book
disp("current gain = "+string((curgai)));
disp("impedance = "+string((z1))+"ohm");
|
15a9e3185a1c58f0b61bb903962ba08fa38bacbd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2417/CH4/EX4.4/Ex4_4.sce | a6f6725260e2e7cf91053f104e6622687667a3d6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 884 | sce | Ex4_4.sce | //scilab 5.4.1
clear;
clc;
printf("\t\t\tProblem Number 4.4\n\n\n");
// Chapter 4 : The Second Law Of Thermodynamics
// Problem 4.4 (page no. 150)
// Solution
W=(50*33000)/778;//output //W=W/J
// 1 hp = 33000 ft*LBf/min
// 1 Btu = 778 ft*LBf
printf("Output is %f in Btu/min\n",W);
t1=1000; //Source temperature //(unit:fahrenheit)
t2=100; //Sink temperature //(unit:fahrenheit)
//converting temperatures to absolute temperatures;
T1=t1+460; //Source temperature //Unit:R
T2=t2+460; //Sink temperature //Unit:R
n=(1-(T2/T1))*100; //efficiency
printf("Efficiency is %f percentage\n",n);//(in %)
//n=(W/J)/Qin
Qin=W/(n/100);//(unit Btu/hr) //Qin=heat added to the cycle
printf("Heat added to the cycle is %f in Btu/min\n",Qin);
Qr=Qin*(1-(n/100));//(unit Btu/hr) //Qr=heat rejected by the cycle
printf("Heat rejected by the cycle is %f in Btu/min \n",Qr);
|
7f5cfdafd1a9e125eb5efc0fff08ac6b9d022717 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3845/CH26/EX26.2/Ex26_2.sce | fe1ad75fd2506cb3e3b310d23e161e61fdb93661 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 489 | sce | Ex26_2.sce | //Example 26.2
d_i=2*10^-2;//Image distance (m)
d_o_distant=%inf;//Object distance for distant vision (m)
d_o_close=25*10^-2;//Object distance for close vision (m)
P_distant=1/d_o_distant+1/d_i;//Power for distant vision (D)
printf('Power = %0.1f D (distant vision)',P_distant)
P_close=1/d_o_close+1/d_i;//Power for closest vision (D)
printf('\nPower = %0.1f D (close vision)',P_close)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|
971df96ade0241a0f1791d7a3dc0085b33a483a5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /830/CH8/EX8.3.2/Backward_Difference.sce | 0f89d5bd5cc4d2958fe549887f878398b106fb0b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Backward_Difference.sce | //Graphical//
//Example 8.3.2
//mapping = (z-(z^-1))/T
//To convert analog filter into digital filter
clear;
clc;
close;
s = poly(0,'s');
H = 1/((s+0.1)^2+9)
T =1;//Sampling period T = 1 Second
z = poly(0,'z');
Hz = horner(H,(1/T)*(z-(z^-1)))
|
d2e55a2fcc07e5a03c191802f1b6680f1824a623 | b4980b761e4b88d097e526fe06ebef2383d3d613 | /lab01/2 to 4 Line Decoder/Decoder2To4Line.tst | 3c21ba8494bd57fcfa0b9d94e39c53de2f2e07d1 | [] | no_license | Vineeth-Kada/Computer-Systems-Design | aa42b053c709fdbf06713dc3e1e2649faa02c65d | 4c05e393e057ffb1540c74a53a0cb17f7129d8f8 | refs/heads/main | 2023-06-17T06:27:02.442583 | 2021-07-15T10:43:37 | 2021-07-15T10:43:37 | 289,896,111 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 320 | tst | Decoder2To4Line.tst | load Decoder2To4Line.hdl,
output-file Decoder2To4Line.out,
compare-to Decoder2To4Line.cmp,
output-list X1%B3.1.3 X0%B3.1.3 Y0%B3.1.3 Y1%B3.1.3 Y2%B3.1.3 Y3%B3.1.3;
set X1 0, set X0 0,
eval, output;
set X1 0, set X0 1,
eval, output;
set X1 1, set X0 0,
eval, output;
set X1 1, set X0 1,
eval, output; |
ab9d41ff1f424578cb34a9d3b4e3a22c3f18993e | 8712e7b4614b1ab648f19bcce8ca17e378876546 | /Scilab Com Interface Grafica/Engine/ObjetoCargas.sce | f4a6ced721f342cbcf29c9e0ca0c3f15a69eb012 | [] | 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 | 1,397 | sce | ObjetoCargas.sce | jan.immediate_drawing = "off"
T1 = evstr(NewmarkBeta(4).string); if isempty(T1) then; T1=3*t1; end
if CarDir(1) then
sca(eixoEstr)
champ(coord(nos(i),1),coord(nos(i),2),1*sign(F),0)
Cargas = [Cargas; gce()]
glue(Cargas($))
Cargas($).arrow_size = 2
Cargas($).user_data = [Cargas($).data.x Cargas($).data.y 1 opC t0 t1 F]
end
if CarDir(2) then
sca(eixoEstr)
champ(coord(nos(i),1),coord(nos(i),2),0,1*sign(F))
Cargas = [Cargas; gce()]
glue(Cargas($))
Cargas($).arrow_size = 2
Cargas($).user_data = [Cargas($).data.x Cargas($).data.y 2 opC t0 t1 F]
end
if CarDir(3) then
sca(eixoEstr)
tt = [0:%pi/4:2*%pi]*sign(F)
plot2d4(coord(nos(i),1)+0.5*cos(tt),coord(nos(i),2)+0.5*sin(tt))
Cargas = [Cargas; gce().children]
Cargas($).arrow_size_factor = 1.5
Cargas($).user_data = [coord(nos(i),1) coord(nos(i),2) 3 opC t0 t1 F]
end
Ft=[];
for t=[0:T1/1000:T1]
Ft($+1)=Carregamento(1,1,opC,1,t0,t1,w1,F,t)
end
Tipo = [" - FX" " - FY" " - MZ"]
for k=find(CarDir)
Texto = "P"+string(3*nos(i)+k-3)+" - Noh "+string(nos(i))+Tipo(k)
plot(Axes(1),[0:T1/1000:T1]',Ft)
HistCargas = [HistCargas; gce().children]
HistCargas($).foreground = length(HistCargas)
HistCargas($).visible = "off"
HistCargas($).tag = Texto
Axes(1).data_bounds(2) = T1
end
|
eb15ab99d219b54612d2c19325e42f7e79604bcb | 449d555969bfd7befe906877abab098c6e63a0e8 | /3754/CH19/EX19.2/19_2.sce | 1be24be80aa4f4abe44091862fce531713ddc2d3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 474 | sce | 19_2.sce | clear//
//Variables
RL = 20 //Load resistance (in kilo-ohm)
V2 = 24 //Secondary voltage (in volts)
//Calculation
Vm = 2**0.5 * V2 //Maximum value of secondary voltage (in volts)
Im = Vm / RL //Maximumj value of load current (in milli-Ampere)
Idc = 0.318 * Im //dc current (in milli-Ampere)
//Result
printf("\n The value of dc load current is %0.3f mA.",Idc)
|
d2429ec75949bf6c3ec65fed427995c9509225f5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2615/CH8/EX38.1/38.sce | 1b5f86a77ce71058f65e4a023ad8db92430bf5bb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 209 | sce | 38.sce | clc
//initialisation of variables
v1=3//km/hr
v2=12//km/hr
t=1.5//hr
t2=2.5//hr
//CALCULATIONS
V=(v1+v2)*t//km/hr
V1=(v2-v1)*t2//km/hr
//RESULTS
printf('velocity of current and water=% f km/hr',V1)
|
6b53da6725e4825cf1934822aefdcdf1568c90dd | 8627886261b3eddf8440c0b470cd9ee25c762d97 | /сайлаб/5_lab_rabota.sce | f5dc936010cd02bf60dbb3cd59dbf5650845a241 | [] | no_license | timurzotov/pvis | ba75cf86fae91b6adc8dd3fe9cd2672eea561cca | d60e8e241d6ce0ad3a9b2a75c8771f92a9b039ba | refs/heads/master | 2020-09-08T07:59:31.719500 | 2019-11-11T21:14:13 | 2019-11-11T21:14:13 | 221,070,925 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 873 | sce | 5_lab_rabota.sce | clc
disp('***********Задание №5***********')
disp('---------------№1---------------')
disp(' x y')
for x=1:2:11;
disp([x,sin(x^3)])
end
disp('---------------№2---------------')
s=0;
for x=2:0.5:8;
s=s+x^2+cos(x);
end
disp(s,'Сумма=')
disp('---------------№3---------------')
s=0;i=0;
for x=1:0.4:5
y=0.03*x^2-sin(x)*cos(5*x);
if y<0 s=s+y, i=i+1; end
end
disp(s,'Сумма отрицательных значений=', i, 'Количество слагаемых=')
disp('---------------№4---------------')
s=0;
i=0;
disp(' i a s')
while s<7
a=rand(1,1)
if (a>0.2)&(a<0.7) then
s=s+a;
i=i+1;
if (s<=7) then disp([i,a,s]);end
end
end
|
ec3c80d28afdfed5336cd23ff896e13e2925dc01 | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH2/EX2.22/22.sce | bf9566c161818a62416bf3236f50762d6bf88b94 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 210 | sce | 22.sce | clc
m=1; //kg
p1=20*10^5; //Pa
V1=0.05; //m^3
V2=2*V1;
p2=p1*(V1/V2)^2;
C=p1*V1^2;
V3=V1;
W_12=integrate('C/V^2', 'V', V1,V2);
W_23=p2*(V2-V3);
W_net=W_12-W_23;
disp("Net work done = ")
disp(W_net)
disp("Nm") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.