blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
214
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
6
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
21 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
141k
586M
star_events_count
int64
0
30.4k
fork_events_count
int64
0
9.67k
gha_license_id
stringclasses
8 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
50 values
src_encoding
stringclasses
23 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
5
10.4M
extension
stringclasses
29 values
filename
stringlengths
2
96
content
stringlengths
5
10.4M
082553e69c91c649c185e872383559c31d03c6e4
e2ae697563b1b764d79ea1933b555ab0d5e3849c
/macros/blacksplot.sci
1a1ed37add41459dc10441ee7285887cb5feb449
[]
no_license
gq-liu/IPDesignLab
c49b760740f47ec636232a6947aecb3c0626518a
b2f9a9eecad6616c99a2ec20fcceb14fb3ed0c3f
refs/heads/master
2022-01-18T13:30:55.972779
2019-05-06T17:23:12
2019-05-06T17:23:12
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,355
sci
blacksplot.sci
function []=blacksplot(); // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // Authors // Holger Nahrstaedt - 2010 // Ishan Pendharkar - 2001-2007 // // function displays blacks (magnitude vs phase) frequency plot global g fminnyq fmaxnyq nyqstep Frunits gridon //xset('window',1); scf(2);clf(2); //xbasc(1); xname('Magnitude-Phase plot'); xinfo(['Change frequency units in Settings->Frequency units']) modified_black(syslin('c',g),fminnyq,fmaxnyq,nyqstep,Frunits); //black(syslin('c',g),fminnyq,fmaxnyq,nyqstep,Frunits); if gridon==1 then, chart(list(1)); // if grid on then superimpose on nichols grid end; //return; endfunction
4bca1611e9f2f1b2d41c9fc6d80769fc624888a0
449d555969bfd7befe906877abab098c6e63a0e8
/2837/CH10/EX10.6/Ex10_6.sce
14e556b3fa5995f907e98155146931a67aaab1aa
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
290
sce
Ex10_6.sce
clc clear //Initialization of variables disp("From table 1 of keenan and keynes,") h1=1204.8 //Btu/lb q=174 //Btu/lb //calculations h2=h1+q p2=30 //psia t2=720 //F //results printf("Final state of steam is %d psia and %d F",p2,t2) printf("\n Final enthalpy is %.1f Btu/lb",h2)
faf412ab0fb95bdabab64d74901548e11a7266a7
449d555969bfd7befe906877abab098c6e63a0e8
/599/CH6/EX6.15/example6_15.sce
b0f3133546e01e69e306792933dbb77fd5e740b8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
1,606
sce
example6_15.sce
clear; clc; printf("\t Example 6.15\n"); t1=20; //ambient air temperature t2=70; //exhaust air temperature r1=150; //evaporation of water r2=.25; //outlet solid moisture content t3=15; //inlet solid temperature t4=65; //outlet solid temperature p=5; //power demand in KW h=18; //heat loss in kj h1=1; //mean specific heat of dry air in kj/kg*K h2=1.25; //mean specific heat of dry material in kj/kg*K h3=4.18; //mean specific heat of moisture in kj/kg*K e=2626; //enthalpy of saturated water vapour in kj/kg //basis is 1hr a1=r1*h3*(t4-t3); //heat required for heating 150 kg of water from 15 to 65 a2=r1*e; //heat required for 150 kg water evaporation a3=2000*h1*(t2-t1); //heat required for heating air from 20 to 70 a4=r2*h3*(t4-t3); //heat required for heating moisture from 15 to 65 a5=120*h2*(t4-t3); //heat required for heating dry solid from 15 to 65 hlost=h*3600; //heat lost in kj total=(a2+a3+a4+a5+hlost)/3600; //total heat lost printf("\n :%f kW of heat required for 2000kg/hr of dry air",total); ans1=a2+a1; //heat needed for evaporation printf("\n heat needed fro evaporation is :%f",ans1/3600); ans2=(ans1/3600)/total; //fraction of this heat needed for evaporation printf("\n fraction of this heat needed for evaporation:%f",ans2); //end
8820e24054cc14bc5186aaa33b28ba3b1fc3baca
449d555969bfd7befe906877abab098c6e63a0e8
/2837/CH10/EX10.2/Ex10_2.sce
25ef422e8120a24a6f2fa3d6da0698c473defaac
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
280
sce
Ex10_2.sce
clc clear //Initialization of variables h=1100 //Btu/lb P=100 //psia //calculations disp("From table 2 of keenan and keynes,") hg=1187.2 //Btu/lb hfg=888.8 //Btu/lb y=-(h-hg)/hfg //results printf("The state is %d psia with a moisture content of %.2f percent",P,y*100)
d884170f1b5db4755f731a10eb17a4e922fcb127
449d555969bfd7befe906877abab098c6e63a0e8
/182/CH11/EX11.3/example11_3.sce
31fe87f9362ece5a5787ca9a3b8226e00567913b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
804
sce
example11_3.sce
// to find the output frequency of the circuit 11-8 // example 11-3 in page 326 clc; // Data given Vcc=15;// supply voltage=15 V C1=0.1D-6;// capacitance in farad R1=1e+3; R2=10e+3;// resistances in ohm utp=3; ltp=-3;// upper and lower trigger points in volt //calculation a=['For contact at top of R1' 'For R1 contact at 10% from bottom']; V3=Vcc-1;// voltage in volt dV=utp-ltp;//change in voltage in volt V1=[V3 10*V3/100];// V1 when R1 is at the top and 10% from the bottom of R1 in volt for n=1:2 I2=V1(n)/R2;// current in ampere t=C1*dV/I2;// time in seconds f=1/(2*t);// frequency in hertz printf("%s,\nfrequency=%.2f Hz\n\n",a(n),f); end //result //For contact at top of R1, //frequency=1166.67 Hz //For R1 contact at 10% from bottom, //frequency=116.67 Hz
9a8ec5595d41bd9f17ac10ee1a5a8d5e25951909
449d555969bfd7befe906877abab098c6e63a0e8
/1760/CH3/EX3.52/EX3_52.sce
423c91d1399f471cb1bb8af25591e81738ea857f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
863
sce
EX3_52.sce
//EXAMPLE 3-52 PG NO-205-206 Vp=230.94; R=20+%i*30; V=400; IL=Vp/R; disp('i) CURRENT (IL) is in rectangular form = '+string (IL) +' A '); PF=0.555; P=sqrt(3)*V*IL*PF; disp('ii)ACTIVE POWER (P) is in rectangular form = '+string (P) +' W '); Q=sqrt(3)*V*IL*56.289; disp('iii) REACTIVE POWER (Q) is in rectangular form = '+string (Q) +' vars '); S=sqrt(3)*V*IL; disp('iv)APPARENT POWER (S) is in rectangular form = '+string (S) +' VA '); Ip=3.698; Z=V/Ip; disp('i) IMPEDANCE (Z) is in rectangular form = '+string (Z) +' ohm '); R1=Z*0.555; disp('i) RESISTANCE (R1) is in rectangular form = '+string (R1) +' ohm '); Xc=Z*0.83; disp('i) INDUCTANCE (Xc) is in rectangular form = '+string (Xc) +' ohm '); C=Xc/(2*%pi*50); disp('i) CAPACITOR (C) is in rectangular form = '+string (C) +' F ');
a2635860176910d6426b5f9a8c45ff1691be9a62
449d555969bfd7befe906877abab098c6e63a0e8
/2699/CH9/EX9.9/Ex9_9.sce
0e78715e70adeb55fb11f72145d9b703d77605db
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
341
sce
Ex9_9.sce
//EX9_9 PG-9.24 clc L1=0.5e-3; L2=1e-3; C=0.2e-6; Leq=L1+L2;//total inductance for Hartley oscillator f=1/(2*%pi*sqrt(Leq*C)); printf("\n Therefore frequency of oscillation is %.f Hz \n",f) //there is a slight difference between the answer given in the book //and the and output in the book they have taken the approximate value
2bbc2c74a5c70f4ac2754cdc30c277861b3015cf
449d555969bfd7befe906877abab098c6e63a0e8
/944/CH3/EX3.17/example3_17_TACC.sce
6fcf8fa4db0c06b7a7894c82c1a4c48a8348d6b4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
724
sce
example3_17_TACC.sce
//example 3.17 clear; clc; //Given: Cp1=poly([29.07, -0.836*10^-3, 20.1*10^-7],'T','c');//heat capacity for H2(g) Cp2=poly([25.72, 12.98*10^-3, -38.6*10^-7],'T','c');//heat capacity for O2(g) Cp3=poly([30.36, 9.61*10^-3, 11.8*10^-7],'T','c');//heat capacity for H2O(g) Hf1=-241820;//standard heat of formation H2O(g) at 298K : H2(g)+ 0.5O2(g)->H2O(g) [J/mol] T1=298;//initial temperature[K] T2=1273;//final temperature[K] //to find the standard heat of formation of H2O(g) at 1273K Cp=Cp3-0.5*Cp2-Cp1;//heat capacity for the formation[J/K/mol] i=horner(Cp,1273)-horner(Cp,298);//[J/mol] Hf2=(Hf1-i)*0.001;//[KJ/mol] printf("The heat of formation of H2O at 1273K = %f KJ/mol", Hf2);
bba2658c970659b9fec8939e6e4db87e275aa9a9
449d555969bfd7befe906877abab098c6e63a0e8
/2642/CH6/EX6.2/Ex6_2.sce
9eff18b7b7b46c2b882ea28c82bd5fb37da45335
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,051
sce
Ex6_2.sce
// FUNDAMENTALS OF ELECTICAL MACHINES // M.A.SALAM // NAROSA PUBLISHING HOUSE // SECOND EDITION // Chapter 6 : CONTROL AND STARTING OF A DC MOTORS // Example : 6.2 clc;clear; // clears the console and command history // Given data V_t = 230 // supply voltage in V I_a1 = 15 // dc shunt motor armature current in A N_1 = 650 // speed in rpm R_a = 0.4 // armature resistance in ohm R = 1 // variable resistance in series with the armature // caclulations // at full load E_b1 = V_t-I_a1*R_a // initial back emf in V E_b2 = V_t-I_a1*(R+R_a) // final back emf in V N_2 = N_1*(E_b2/E_b1) // speed at full load in rpm // at half load I_a21 = I_a1/2 // armature current in A E_b21 = V_t-I_a21*(R+R_a) // back emf in V N_21 = N_1*(E_b21/E_b1) // speed at half load torque in rpm // display the result disp("Example 6.2 solution"); printf(" \n speed at full load \n N_2 = %.1f rpm \n", N_2); printf(" \n speed at half load torque \n N_21 = %.1f rpm \n", N_21);
5bc82af8364a899e7e8e9bccb86b6a35fa9a318e
449d555969bfd7befe906877abab098c6e63a0e8
/494/CH3/EX3.8/3_8.sce
e5e25ae8ce959128cc2b81b0009014622228d7d0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
475
sce
3_8.sce
//all the quantities are expressed in SI units V_inf = 100.1; //freestream velocity p_inf = 101314.1; //standard sea level pressure rho_inf = 1.225; //density of air at sea level //the dynamic pressure can be calculated as q_inf = 1/2*rho_inf*(V_inf^2); //thus the total pressure is given as p0 = p_inf + q_inf; printf("\nRESULTS\n--------\nThe total pressure measured by pitot tube is\n p0 = %6.2f Pa",p0)
c43a0026470717b13f492da72a7001d49e94590b
e51bdac5dcd38fb280d2b1ff6b23dd23bb9a08d1
/meu_pso.sce
7beffbd8293f91c8ef6b9f382d419c918f6c5536
[]
no_license
jotabf/ufrn-otimiza-o-2018-1
1fd462d61f80a779fef8e749d5fc4794f9dece4a
d3204075ff58aa878e8131d0b2ae26af15ffff55
refs/heads/master
2020-03-22T16:03:42.684872
2018-07-09T11:51:21
2018-07-09T11:51:21
140,300,205
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,517
sce
meu_pso.sce
MIN = -500; MAX = 500; function res = func(x,y) z = - x.*sin( sqrt( abs(x) ) ) - y.*sin( sqrt( abs(y) ) ); x = x/250; y = y/250; r = 100*( y - x.^2 ).^2 + ( 1 - x ).^2; r1 = ( y - x.^2 ).^2 + ( 1 - x ).^2; w = r.*z; w2 = z - r1; w6 = w + w2; res = w6; endfunction function best = pso( tamEnxame , vmax, w, c1, c2, nIter ) rand('seed',getdate('s')); x = rand(2,tamEnxame,"uniform")*(MAX - MIN) + MIN; v = rand(2,tamEnxame,"uniform")*vmax; p = x; g = p(:,1); for k = 1:nIter for i = 1:tamEnxame if func(x(1,i),x(2,i)) < func(p(1,i),p(2,i)) p(:,i) = x(:,i); if func(x(1,i),x(2,i)) < func(g(1,1),g(2,1)) g = x(:,i); end end for j = 1:2 r1 = rand(); r2 = rand(); v(j,i) = w*v(j,i) + c1*r1*(p(j,i) - x(j,i)) + c2*r2*(g(j) - x(j,i)); end x_ = x(:,i) + v(:,i); x_( x_ > MAX ) = MAX; x_( x_ < MIN ) = MIN; x(:,i) = x_; end end best = g; endfunction w = 0.5 c1 = 1.5 //1,5 2,5 c2 = 1.5 //1,5 2,5 vmax = 10; nIter = 100; tamExame = 20; res = pso( tamExame, vmax, w, c1, c2, nIter ); disp(func(res(1), res(2)));
c8b2e157eced29f2500a01a2b34b3d6d42ac0ced
449d555969bfd7befe906877abab098c6e63a0e8
/2300/CH5/EX5.7.3/Ex5_3.sce
9d2ab661359af74f80a4b5210bb600508a779091
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
334
sce
Ex5_3.sce
//scilab 5.4.1 //windows 7 operating system //Chapter 5:Semiconductor Junction Diodes clc clear V=0.9//V=forward bias voltage I=60*10^(-3)//I=Current in ampere rdc=(V/I)//rdc=static resistance in ohm n=2//n=emission coefficient rac=((26*n*10^(-3))/I)//rac=dynamic resistance disp("ohm",rdc,"rdc=") disp("ohm",rac,"rac=")
2aaa387791770ef64be6c697eda4492edca7c092
449d555969bfd7befe906877abab098c6e63a0e8
/2660/CH13/EX13.8/Ex13_8.sce
10b63446f973eccf22f54804cac05f4bc8ff04ac
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
735
sce
Ex13_8.sce
clc mu1 = 0.15 // coefficient of friction mu2 = 0.18 // coefficient of fricton alpha = 14 // angle of contact in degree alpha = alpha*%pi/180 bita = 10 // semi-cone angle in degree bita = bita*%pi/180 sigma_0 = 1.40 // kN/mm^2 h0 = 1.5 //mm h1 = 1 // mm B = (mu1+mu2)/(tan(alpha)+tan(bita)) sigmad = (sigma_0*(1+B)*(1-(h1/h0)^B))/B // drawing stress in kN/mm^2 d1 = 11 // outside diameter in mm t = 1 // thickness in mm d2 = d1-2*t // mm a = (%pi*((d1)^2-(d2)^2))/4 // area in mm^2 l = sigmad*a // load in kN s = 0.65 // drawing speed in m/s w = l*s // work in kJ/s p = w // power in kW printf("\n Drawing load = %0.3f kN\n Power rating of motor = %0.2f kW" , l , p) // 'Answers vary due to round off error'
018bcda0e22fbf1be742eed9e91adf644ea5ae5a
449d555969bfd7befe906877abab098c6e63a0e8
/1991/CH9/EX9.7/7.sce
de93303996fe6f572121cc53e771301119e2cbee
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
502
sce
7.sce
clc clear //input c=3*10^8 //velocity of speed w=5.1*10^-7 //wavelength of green light w1=0.7 //wavelength of radio waves w2=1.3*10^-13 //wavelength of gamma h=6.6*10^-34 //calculation e1=h*c/w//plancks theory for greeen light e2=h*c/w1//plancks theory for radio waves e3=h*c/w2//plancks theory for gamma waves //output printf("energy carried by green light is %3.3e J",e1) printf("\nenergy carried by radio waves is %3.3e J",e2) printf("\nenergy carried by gamma waves is %3.3e J",e3)
a3ba7a26e6e9b7e9f1ee438acee38662cfee6084
449d555969bfd7befe906877abab098c6e63a0e8
/2045/CH10/EX10.2/Ex10_2.sce
998f73d4863e00a6d282404a493e307b0c88034e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
360
sce
Ex10_2.sce
//pagenumber 467 example 2 clear voltag=36;//volt w=0.07;//harmonic distortion inpvol=0.028;//volt beta1=0.012; a=voltag/inpvol; fegain=a/(1+beta1*a);//correction in book volta1=fegain*inpvol; disp("output voltage = "+string((volta1))); //decrease of gain 9 inpvol=9*inpvol; disp("input voltage = "+string((inpvol))+"volt");
e962303580fc82a9e6435607c4f49396b997fa01
8781912fe931b72e88f06cb03f2a6e1e617f37fe
/scilab/plasma/plotbfield_simpson_dx4.sce
1960688b23e1886ce67c2812f597447aa5def414
[]
no_license
mikeg2105/matlab-old
fe216267968984e9fb0a0bdc4b9ab5a7dd6e306e
eac168097f9060b4787ee17e3a97f2099f8182c1
refs/heads/master
2021-05-01T07:58:19.274277
2018-02-11T22:09:18
2018-02-11T22:09:18
121,167,118
1
0
null
null
null
null
UTF-8
Scilab
false
false
4,429
sce
plotbfield_simpson_dx4.sce
//script to generate magnetic field data for Earths magnetic field //modelled on a single loop solenoid at the core of the earth exec('lorentz.sce'); exec('bfield.sce'); exec('bfieldsimpson.sce'); rearth=6378.0*(10^3); //permeability of free space mu0=4.0*%pi*(10^(-7)); b=zeros(3,1); //bfield in z direction b(3,1)=0.1; ns=200; //calculate effective current for earths bfield //lensol=2556*10^3; //length of effective solenoid //used in computation of final field lensol=1; zt=lensol/2; zb=-zt; //http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/magearth.html#c1 //magnetic field strongest at earths surface i z direction //north and south magnetic poles bz=0.6*(10^(-4)); //effective radius of solenoid //1/3 radius of earths outer core //http://en.wikipedia.org/wiki/Earth#Composition_and_structure //solenoid field calculation //http://www.netdenizen.com/emagnet/solenoids/thinsolenoid.htm //zsol=5100*10^3; //radius of earth - len solenoid //reffsol=1278*(10^3)/3; zsol=rearth-lensol; //reffsol=10*4000*(10^3)/3; reffsol=4000*(10^3); nturns=1; itot=1.5*10^9; ar=zeros(ns,3); //nx=42; //ny=42 //nz=42; nx=22; ny=22; nz=22; deltax=6371*10^3; deltay=deltax; deltaz=deltax; inx=-deltax*nx/2; iny=inx; inz=iny; b=zeros(3,nx,ny,nz); //deltab=%pi/2048; fac=4096+sgetid*4096; deltab=%pi/fac; //if running using the white rose grid easa application portal //we set the directory to '' //and extract the data //directory='out/' //directory='out/' //dxdirectory='dx/' directory=''; dxdirectory=''; rjobname='plotbfieldtest'; jobname=sprintf('%s_%d',rjobname,sgetid); outfile=directory+'job'+jobname+'.out'; formfile=directory+'jobform'+jobname+'.out'; dxgenfile=directory+'job'+jobname+'.general'; dxformgenfile=directory+'job'+jobname+'_form.general'; fdform=mopen(formfile,'w'); mfprintf(fdform, '%d %d %d\n',nx, ny, nz); mclose(fdform); fd=mopen(outfile,'w'); mfprintf(fd,'Earth bfield model\n'); mfprintf(fd,'jobname %s\n',jobname); mfprintf(fd,'size %d %d %d \n',nx,ny,nz); mfprintf(fd,'Height effective solenoid(m) %f\n',zsol); mfprintf(fd,'Radius effective solenoid(m) %f\n',reffsol); mfprintf(fd,'deltab %f\n',deltab); mfprintf(fd,'n turns %d\n',nturns); for i1=1:nx //disp(i1); for i2=1:ny for i3=1:nz x=inx+i1*deltax; y=iny+i2*deltay; z=inz+i3*deltaz; r(1,1)=x; r(2,1)=y; r(3,1)=z; bf=bfieldsimpson(reffsol,zt,zb,nturns,itot,r,deltab); mfprintf(fd, '%f %f %f %f %f %f\n',r(1,1)/rearth,r(2,1)/rearth,r(3,1)/rearth,10^6*bf(1,1),10^6*bf(2,1),10^6*bf(3,1)); b(:,i1,i2,i3)=bf; end end end mclose(fd); //generate dx general file for this data set //file=out/job.out //grid 51 x 51 //format = ascii //interleaving = field //majority = row //header = lines 1 //series = 24 , 1, 1, separator=lines 1 //field = field0, field1 //structure = 2-vector, scalar //type = float, float //dependency = positions, positions //positions = regular,regular, 0, 1,0,1 //end dxgenfile=dxdirectory+'job'+jobname+'.general'; fdform=mopen(dxgenfile,'w'); //mfprintf(fdform, 'file=%s\n', 'out/job'+jobname+'.out'); mfprintf(fdform, 'file=%s\n', 'job'+jobname+'.out'); mfprintf(fdform,'grid= %d x %d x %d\n',nx,ny,nz); mfprintf(fdform,'format = ascii \n interleaving = field \n header = lines 7 \n'); //mfprintf(fdform, 'series = 1 , 1, 1, separator=lines 1\n'); mfprintf(fdform, 'field = locations,bfield \n structure = 3-vector, 3-vector \n type = float, float \n dependency = positions, positions \n end \n '); mclose(fdform); //file=out/jobform.out //grid = 1 //format = ascii //interleaving = record //majority = row //field = nsteps, nx, ny //structure = scalar, scalar, scalar //type = int, int, int //dependency = positions, positions, positions //positions = regular, 0, 1 //end dxformgenfile=dxdirectory+'job'+jobname+'_form.general'; fdform=mopen(dxformgenfile,'w'); //mfprintf(fdform, 'file=%s\n', 'out/jobform'+jobname+'.out'); mfprintf(fdform, 'file=%s\n', 'jobform'+jobname+'.out'); mfprintf(fdform,'grid=1\n'); mfprintf(fdform,'format = ascii \n interleaving = record \n majority = row \n'); mfprintf(fdform, 'field = nr ,ntheta, nphi \n structure = scalar, scalar, scalar \n type = int, int, int \n dependency = positions, positions,positions \n positions = regular, 0, 1 \n end \n '); mclose(fdform); myvars=['b']; //exit;
1e4b63d11245fe6af8f86900632021b186622120
449d555969bfd7befe906877abab098c6e63a0e8
/2021/CH10/EX10.17/EX10_17.sce
763153c3f4971c4f48de29005939553c11fa7bd8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
303
sce
EX10_17.sce
//Finding of Critical depth,velocity,Minimum Specific energy //Given Q=18; B=6; q=Q/B; g=9.81; //To Find y=(q^2/g)^(1/3); v=q/y; E=(3/2)*y; disp(" Critical depth ="+string(y)+" meter"); disp(" Critical velocity ="+string(v)+" meter"); disp(" Minimum Specific Energy ="+string(E)+" meter");
081f5aaac8f3820f929ec9c291abe0d6e1147289
449d555969bfd7befe906877abab098c6e63a0e8
/2882/CH8/EX8.12/Ex8_12.sce
4caa99925cbd05e008e55968fb3d714f4feb65b5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
427
sce
Ex8_12.sce
//Tested on Windows 7 Ultimate 32-bit //Chapter 8 Power Amplifiers Pg no. 289 and 290 clear; clc; //Given Data VCC=12;//collector supply voltage in volts RL=16;//load resistance of loudspeaker in ohms Pmax=1;//input power of loudspeaker VCE_sat=0.7;//collector to emitter saturation voltage in volts //Solution k=(VCC-VCE_sat)/sqrt(2*RL*Pmax);//turns ratio printf("Turns ratio η = %.3f or %.f turns",k,k);
9992d2be19a3a910dfdb8bac992e723563857ab3
66106821c3fd692db68c20ab2934f0ce400c0890
/test/disassembler/asr.instr.tst
c93c209a4949cdf048f617a54ad3600ce185843f
[]
no_license
aurelf/avrora
491023f63005b5b61e0a0d088b2f07e152f3a154
c270f2598c4a340981ac4a53e7bd6813e6384546
refs/heads/master
2021-01-19T05:39:01.927906
2008-01-27T22:03:56
2008-01-27T22:03:56
4,779,104
2
0
null
null
null
null
UTF-8
Scilab
false
false
1,256
tst
asr.instr.tst
; @Harness: disassembler ; @Result: PASS section .text size=0x00000040 vma=0x00000000 lma=0x00000000 offset=0x00000034 ;2**0 section .data size=0x00000000 vma=0x00000000 lma=0x00000000 offset=0x00000074 ;2**0 start .text: label 0x00000000 ".text": 0x0: 0x05 0x94 asr r0 0x2: 0x15 0x94 asr r1 0x4: 0x25 0x94 asr r2 0x6: 0x35 0x94 asr r3 0x8: 0x45 0x94 asr r4 0xa: 0x55 0x94 asr r5 0xc: 0x65 0x94 asr r6 0xe: 0x75 0x94 asr r7 0x10: 0x85 0x94 asr r8 0x12: 0x95 0x94 asr r9 0x14: 0xa5 0x94 asr r10 0x16: 0xb5 0x94 asr r11 0x18: 0xc5 0x94 asr r12 0x1a: 0xd5 0x94 asr r13 0x1c: 0xe5 0x94 asr r14 0x1e: 0xf5 0x94 asr r15 0x20: 0x05 0x95 asr r16 0x22: 0x15 0x95 asr r17 0x24: 0x25 0x95 asr r18 0x26: 0x35 0x95 asr r19 0x28: 0x45 0x95 asr r20 0x2a: 0x55 0x95 asr r21 0x2c: 0x65 0x95 asr r22 0x2e: 0x75 0x95 asr r23 0x30: 0x85 0x95 asr r24 0x32: 0x95 0x95 asr r25 0x34: 0xa5 0x95 asr r26 0x36: 0xb5 0x95 asr r27 0x38: 0xc5 0x95 asr r28 0x3a: 0xd5 0x95 asr r29 0x3c: 0xe5 0x95 asr r30 0x3e: 0xf5 0x95 asr r31 start .data:
3ffaa6f19063b68d8043b3700d1e935472d2ae4a
449d555969bfd7befe906877abab098c6e63a0e8
/2522/CH15/EX15.3/exm15_3.sce
2eb0d1b6284f877a3755fb286a9425a4929686f7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
895
sce
exm15_3.sce
// page no 483 // example no 15.3 // INSTRUCTIONS TO GENERATE A PULSE FROM COUNTER 0 clc; printf('Control Word \n \n'); printf('D7 D6 D5 D4 D3 D2 D1 D0 \n'); printf('0 0 0 1 0 1 0 0 = 14H \n \n'); printf('D7,D6=0 Select counter 0 \n'); printf('D5,D4=01 Load 8 bit count \n'); printf('D3,D2,D1=010 Mode 2 \n'); printf('D0=0 Binary Count \n \n'); printf('Count \n \n'); count=(50*10^-6)/(0.5*10^-6); printf('Count= '); disp(count); disp(dec2hex(count)); printf('in hexadecimal \n \n'); printf('Instructions \n \n'); printf('PULSE: \n') printf('MVI A,00010100B \n'); // control word mode 2 & counter 0. printf('OUT 83H \n'); // write in 8254 control register. printf('MVI A,64H \n'); // low order byte of the count. printf('OUT 80H \n'); // load counter 0 with low order byte printf('HLT');
14d96b250169ed8f163cd6f0f564a9e9f5edd39a
449d555969bfd7befe906877abab098c6e63a0e8
/2135/CH7/EX7.11/Example7_11.sce
e469d6ac9d54f9508b59764a5d030e29c4e8848f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
517
sce
Example7_11.sce
//Ex 7.11 clc; clear; close; format('v',7); //Given data : d=270/1000;//meter L=380/1000;//meter Pmi=6;//bar N=350;//rpm WsubS=1000;//N Db=1.5;//meter mf=10;//Kg/hr CV=44400;//KJ/Kg IP=Pmi*10^5*(%pi/4*d^2)*L*N/2/60/1000;//KW disp(IP,"Indicated Power in KW : "); BP=(WsubS)*%pi*Db*N/60/1000;//KW disp(BP,"Brake Power in KW : "); Etta_m=BP/IP*100;//% disp(Etta_m,"Mechanical Efficiency in % : "); mf=mf/60/60;//Kg/s Etta_b=BP/mf/CV*100;// disp(Etta_b,"Indicated thermal Efficiency in % : ");
8cdde1b1c3ae81bdcf6b1b46fcc92706af86bc5e
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.4/Unix-Windows/scilab-2.4/macros/percent/%lss_r_s.sci
9eb4d4cacf9b0d494b18e5a00c24c2716c9cec1d
[ "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
119
sci
%lss_r_s.sci
function s1=%lss_r_s(s1,d2) //s=%lss_r_s(s1,d2) <=> s=s1/d2 //! // Copyright INRIA s1(3)=s1(3)/d2; s1(5)=s1(5)/d2
54c56685ab45a1c429b390eae05b53c2e937ca07
449d555969bfd7befe906877abab098c6e63a0e8
/671/CH7/EX7.19/7_19.sce
a3f3015c3ecf8640a5ef2706bc3f9ffff31ccbb6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
7_19.sce
uo=(4*%pi)*1E-7 ur=2000 V=200 f=50 N=1600 Ac=5/10000 flux_max=V/(4.44*f*N) Bmax=flux_max/Ac disp(Bmax) Rc=20/100/(uo*ur*Ac) Rg=0.5/1000/(uo*Ac) R=Rc+Rg imax=flux_max*R/N disp(imax) Wfmax=1/2*R*(flux_max^2) disp(Wfmax) percent=Rg/R*100 disp(percent)
9a81c929dae1bd61cefffa990420b7aac0bb6a4a
449d555969bfd7befe906877abab098c6e63a0e8
/527/CH2/EX2.19/2_19exam.sce
dedc24dce9377b6c1145a8fba8ffc7f7b3274f57
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
2_19exam.sce
//Engineering and Chemical Thermodynamics //Example 2.19 //Page no :85 clear ; clc ; //From steam table h_cap_st_1 = 2923.4 ; // [kJ/kg] h_cap_200 = 2875.3 ; // {kJ/kg} , At 100kPa h_cap_250 = 2974.3 ; // {kJ/kg} , At 100 kPa del_T = 250-200 ; T1 = 200 ; //[K] h_cap_st_2 = h_cap_st_1 ;//Assumimg bulk kinetic energy of the stream and heat transfered is negligible T2 = T1 + del_T * (h_cap_st_2 - h_cap_200) / (h_cap_250 - h_cap_200) ; disp(" Example: 2.19 Page no : 85") ; printf('\n The exit temperature is = %d *C',T2) ;
66d02da6679e7745430c2f9afbbf958f7b75082b
449d555969bfd7befe906877abab098c6e63a0e8
/431/CH4/EX4.1/EX4_1.sce
38c410265de528579bf0fe92ee03993588cf2e9f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
389
sce
EX4_1.sce
//Calculating synchronous speed and speed of a rotor //Chapter 4 //Example 4.1 //page 288 clear; clc; disp("example 4.1"); f=50; //frequency p=6; // number of poles V=400; //voltage supply S=4; //percentage slip Ns=(120*f)/p; //synchronous speed printf("Syhchronous speed,Ns=%d \n",Ns); Nr=(1-(S/100))*Ns; printf("speed of rotor with slip 4 percent,Nr is %d rpm \n",Nr);
ab39d291be7936812d5d516ea5130825b8bd82fe
449d555969bfd7befe906877abab098c6e63a0e8
/213/CH16/EX16.18/16_18.sce
810ec4a7eb5e5f45ef0f35fc2d6f3071139cd1c6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,618
sce
16_18.sce
//To find diameter and cross section clc //Given: P=50*1000 //W N=150 //rpm n=75 sigma=4*10^6 //N/m^2 rho=7200 //kg/m^3 //Solution: //Refer Fig. 16.21 //Calculating the angular speed of the engine omega=2*%pi*N/60 //rad/s //Calculating the mean torque transmitted by the flywheel Tmean=P/omega //N-m FG=Tmean //N-m //Calculating the work done per cycle WD=Tmean*4*%pi //Work done per cycle, N-m //Calculating the work done during power stroke WDp=1.4*WD //Work done during power stroke, N-m //Calculating the maximum torque transmitted by the flywheel Tmax=WDp/(1/2*%pi) //N-m BF=Tmax //N-m //Calculating the excess torque Texcess=Tmax-Tmean //N-m BG=Texcess //N-m //Calculating the value of DE DE=BG/BF*%pi //N-m //Calculating the maximum fluctuation of energy deltaE=1/2*DE*BG //N-m //Mean diameter of the flywheel: //Calculating the peripheral velocity of the flywheel v=sqrt(sigma/rho) //m/s //Calculating the mean diameter of the flywheel D=v*60/(%pi*N) //m //Cross-sectional dimensions of the rim: //Calculating the coefficient of fluctuation of speed CS=1/100 //Calculating the total energy of the flywheel E=deltaE/(2*CS) //N-m //Calculating the energy of the rim Erim=15/16*E //N-m //Calculating the mass of the flywheel rim m=Erim/(1/2*v^2) //kg //Calculating the thickness of the rim t=round(sqrt(m/(%pi*D*4*rho))*1000) //mm //Calculating the width of the rim b=4*t //mm //Results: printf("\n\n Mean diameter of the flywheel, D = %d m.\n\n",D) printf(" Thickness of the flywheel rim, t = %d mm.\n\n",t) printf(" Width of the flywheel rim, b = %d mm.\n\n",b)
f3bad72f9a0aabc6cb512bc8356d5d05adf3fdc5
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set14/s_Material_Science_V._Rajendran_1826.zip/Material_Science_V._Rajendran_1826/CH18/EX18.10/ex18_10.sce
235d7ced7cae8cd276319ac85d7f346447ba343c
[]
no_license
hohiroki/Scilab_TBC
cb11e171e47a6cf15dad6594726c14443b23d512
98e421ab71b2e8be0c70d67cca3ecb53eeef1df6
refs/heads/master
2021-01-18T02:07:29.200029
2016-04-29T07:01:39
2016-04-29T07:01:39
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
240
sce
ex18_10.sce
errcatch(-1,"stop");mode(2);// Example 18.10, page no-466 epsr=1.0024 N=2.7*10^25 //atoms.m^-3 eps=8.854*10^-12//F.m^-1 alfe=eps*(epsr-1)/N printf("The polarisability of argon atom is %.1f * 10^-40 F m^2",alfe*10^40) exit();
0e818a720f3a8f7646c46ebda57ea876965c7053
449d555969bfd7befe906877abab098c6e63a0e8
/1862/CH19/EX19.5/C19P5.sce
12f85fb794e44f52b0f67c6c9420d9b3170fc119
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
819
sce
C19P5.sce
clear clc //to find fundamental frequncy of string //to find fundamental frequncy of string for first overtone //to find original frequency // GIVEN: //refer figure 19-8 from page no. 436 //frequeny f = 440//in Hz //frequency of tuning fork f2 = 3//in Hz //frequency of tuning fork for first overtone f3 = 880//in Hz // SOLUTION //using equation of sound wave //fundamental frequncy of string f1 = f+f2//in Hz f_1 = f-f2//in Hz //frequncy of string for first overtone frequency f4 = f3+(2*f2)//in Hz f_4 = f3-(2*f2)//in Hz //original frequency f5 = f1//in Hz printf ("\n\n Fundamental frequncy of string \n\n f1 = %3i Hz or %3i Hz ",f1,f_1) printf ("\n\n Frequncy of string for first overtone frequency \n\n %3i Hz or %3i Hz ",f4,f_4) printf ("\n\n Original frequency = \n\n %3i Hz",f5)
682afca849c4c4ff77699839e38dae9d2b64d4d0
449d555969bfd7befe906877abab098c6e63a0e8
/2198/CH2/EX2.9.7/Ex2_9_7.sce
50c20a4bea445e333b31d56e7add97e7d607695f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
304
sce
Ex2_9_7.sce
//Ex 2.9.7 clc;clear;close; format('v',8); //Given : Io=10^-13;//A T=27+273;//K Eta=1;//constant V=0.6;//V VT=26/1000;//V I3=Io*(exp(V/Eta/VT)-1);//A R=1*1000;//ohm Ir=V/R;//A Itotal=I3+Ir;//A VD1=log(Itotal/Io)*Eta*VT;//V VD2=VD1;//V Vin=VD1+VD2+V;//V disp(Vin,"Voltage Vin(V) : ");
40c6c8341c82f4e4d670186b045f78e81289d63a
449d555969bfd7befe906877abab098c6e63a0e8
/1595/CH9/EX9.4/ex9_4.sce
e355668c15058087c154bcdb6a80c98a5d0a8e90
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
288
sce
ex9_4.sce
//Wired Digital Communications : example 9-4 : (pg 410) bw=3*10^3;//bandwidth x=1023;//signal-to-noise ratio C=bw*log2(1+x);//capacity of telephone channel printf("\nthe telephone channel has a bandwidth of about %.f Hz",bw); printf("\nC = BW.log2(1+S/N) = %.f bits per second",C);
eef1a08d8cde41175576eaaa986bdc906dabf826
449d555969bfd7befe906877abab098c6e63a0e8
/884/CH15/EX15.6/Example15_6.sce
db174d81c4a245ba37640f154a8a741f4744fd62
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
647
sce
Example15_6.sce
// Computation of pH of solutions for solutions of given concentrations clear; clc; printf("\t Example 15.6\n"); //for HCL solution ConcHCl=1*10^-3;//Concentration of HCl solution, M H=ConcHCl;//Concentration of [H+] ion after ionisation of HCl pH=-log10(H); printf("\t the pH of the HCl solution is : %4.2f \n",pH); //for Ba(OH)2 solution ConcBaOH2=0.02;//Concentration of Ba(OH)2 solution, M OH=ConcBaOH2*2;//Concentration of [OH-] ion after ionisation of Ba(OH)2 as two ions are generated per one molecule of Ba(OH)2 pOH=-log10(OH); pH2=14-pOH; printf("\t the pH of the Ba(OH)2 solution is : %4.2f \n",pH2); //End
c8cb88befc64f1f39b36432c53fc2769f7c2cdf0
ebd4548d44d72b237371e08dd7feffa1739dbd92
/ex27.sce
809c62726a929065dee42dd0624549a3de16a49d
[]
no_license
JeroenDM/scilab
23a44dec9fa47956f0ec64396f82943f4efeac8f
2b05ae5a05023a1d6e4c6c357fb20b5bc6250156
refs/heads/master
2021-01-11T15:44:28.911399
2017-01-24T14:31:46
2017-01-24T14:31:46
79,917,765
0
0
null
null
null
null
UTF-8
Scilab
false
false
635
sce
ex27.sce
// Computer solution to active set qp exercise clear; clc; // import solver exec('solve_qp.sci'); // Problem definition P = eye(2, 2); q = [-2; -5]; A = [-1 2; 1 2; 1 -2; -1 0; 0 -1]; b = [2 6 2 0 0]'; // active set method start // Iteration 0 S0 = [3 5]; [x0, mu0] = solve_qp(P, q, A(S0, :), b(S0)); disp('Iteration 0'); disp(x0); disp(mu0); disp(A * x0 - b); // Iteration 1 S1 = [3]; [x1, mu1] = solve_qp(P, q, A(S1, :), b(S1)); disp('Iteration 1'); disp(x1); disp(mu1); disp(A * x1 - b); // Iteration 2 S2 = []; [x2, mu2] = solve_qp(P, q, A([], :), b([])); disp('Iteration 1'); disp(x2); disp(mu2); disp(A * x2 - b);
8296c7c074783001d09d8b79489ead7e166eee0b
449d555969bfd7befe906877abab098c6e63a0e8
/881/CH1/EX1.13/exa1_13.sce
affd43f3647595e409c75f17ae4e019f15595ed1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
45
sce
exa1_13.sce
clc; //Example 1.13 //Page no 26 //Theory
fdd4cb76b061ab494613d4da7e613759ab8a3c23
449d555969bfd7befe906877abab098c6e63a0e8
/29/CH12/EX12.50/exa12_50.sce
2703a28eb5ef2af9be7a8dcdc41e7a8315b45506
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
383
sce
exa12_50.sce
//caption:root_locus_and_close_loop_transfer_function //example 12.50 //page 578 s=%s K=8 G=K/(s*(s+4)) H=1; GH=G*H G=syslin('c',G) evans(G,8) xgrid(2) CH=s*(s+4)+K disp('=0',CH,"characterstics_eq,CH=") r=roots(CH) disp(r,"the point at which K=8") cl=G/(1+GH) disp(cl,"C(s)/R(s)=") disp("part b") g=K/(s+4) h=1/s gh=g*h CL=g/(1+gh) disp(CL,"C(s)/R(s)=")
209c71a516c5c50710c2a9e4544392a015af62f0
449d555969bfd7befe906877abab098c6e63a0e8
/3401/CH3/EX3.5/Ex3_5.sce
5eb25e7ff4e969616de3a0e6c92514c0ac8b413f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex3_5.sce
clc gi=10 Ni=9 x=gi-Ni //factorial(gi-Ni)=1 z=(factorial(gi)/factorial(Ni)*factorial(gi-Ni)) printf('z=%f\n',z)
9869ce64773ce0dba2cbd6f3670ec1eca3a75ae8
449d555969bfd7befe906877abab098c6e63a0e8
/2939/CH6/EX6.19/Ex6_19.sce
3daa2ab8631a310675c47611a3a8ff5d0587dfc6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
185
sce
Ex6_19.sce
// Ex6_19 clc; // Given: A=240; Z=94; //Solution: Ecr=(0.89*(A^(2/3)))-(0.02*(Z*(Z-1)))/(A^(1/3)); printf("The critical deformation energy for the fission is = %f MeV",Ecr)
035d1b1ee3c159e9d962469cf6673600f3c7da3e
743902c2406b7976cc824458091bd276b916d47c
/test/ACATS/BD/BD8004A.TST
f845e333d0fcd9c57851b9518e4e23a921f870dd
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
OneWingedShark/Byron
f220d419bbe938ed9df588e0a1073f74bbcc03a2
18305e400be9a31d1b1e55a6da4d984c6a8926df
refs/heads/master
2020-12-24T16:33:29.242045
2020-05-16T23:29:29
2020-05-16T23:29:29
41,644,524
55
1
null
null
null
null
UTF-8
Scilab
false
false
4,062
tst
BD8004A.TST
-- BD8004A.TST -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- IF A PROCEDURE BODY CONTAINS MACHINE CODE STATEMENTS, THEN NO -- DECLARATIVE ITEMS OTHER THAN USE CLAUSES ARE ALLOWED IN THE -- PROCEDURE'S DECLARATIVE PART. -- APPLICABILITY CRITERIA: -- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS THAT SUPPORT -- MACHINE CODE INSERTIONS. -- IF SUCH INSERTIONS ARE NOT SUPPORTED, THE "WITH MACHINE_CODE" -- CLAUSE MUST BE REJECTED. -- MACRO SUBSTITUTION: -- IF MACHINE CODE INSERTIONS ARE SUPPORTED THEN THE MACRO -- $MACHINE_CODE_STATEMENT MUST BE REPLACED BY A VALID CODE -- STATEMENT. -- IF MACHINE CODE INSERTIONS ARE NOT SUPPORTED, THEN SUBSTITUTE -- THE ADA NULL STATEMENT (IE: NULL;) FOR $MACHINE_CODE_STATEMENT. -- HISTORY: -- DHH 08/24/88 CREATED ORIGINAL TEST. WITH MACHINE_CODE; -- N/A => ERROR. USE MACHINE_CODE; PROCEDURE BD8004A IS BEGIN NULL; END BD8004A; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_1 IS TYPE ENUM IS (RED, YELLOW, BLUE); -- ERROR: BEGIN $MACHINE_CODE_STATEMENT END BD8004A_1; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_2 IS TYPE REC IS -- ERROR: RECORD NULL; END RECORD; BEGIN $MACHINE_CODE_STATEMENT END BD8004A_2; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_3 IS TYPE ARR IS ARRAY(1 .. 10) OF BOOLEAN; -- ERROR: BEGIN $MACHINE_CODE_STATEMENT END BD8004A_3; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_4 IS A : INTEGER; -- ERROR: BEGIN $MACHINE_CODE_STATEMENT END BD8004A_4; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_5 IS PACKAGE P IS -- ERROR: END P; BEGIN $MACHINE_CODE_STATEMENT END BD8004A_5; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_6 IS TASK T IS -- ERROR: END T; TASK BODY T IS BEGIN NULL; END T; BEGIN $MACHINE_CODE_STATEMENT END BD8004A_6; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_7 IS FUNCTION F RETURN BOOLEAN IS -- ERROR: BEGIN RETURN TRUE; END; BEGIN $MACHINE_CODE_STATEMENT END BD8004A_7; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_8 IS PROCEDURE PROC IS -- ERROR: BEGIN NULL; END PROC; BEGIN $MACHINE_CODE_STATEMENT END BD8004A_8; WITH MACHINE_CODE; USE MACHINE_CODE; PROCEDURE BD8004A_9 IS PROCEDURE M_C IS -- ERROR: BEGIN $MACHINE_CODE_STATEMENT END M_C; BEGIN $MACHINE_CODE_STATEMENT END BD8004A_9;
4fc0861f6a6d26319b315118398e8bae197d3a5a
3592fbcb99d08024f46089ba28a6123aeb81ff3c
/main/predControl/bkuptestIROS2012.txt
0489742721953e0b71ecb6eb3e90a54631fc5b20
[]
no_license
clairedune/sciGaitanLib
a29ab61206b726c6f0ac36785ea556adc9ef03b9
7498b0d707a24c170fc390f7413359ad1bfefe9f
refs/heads/master
2020-12-11T01:51:13.640472
2015-01-28T13:52:26
2015-01-28T13:52:26
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
12,862
txt
bkuptestIROS2012.txt
//---------------------------// // Compute a cost function over a time horizon // With a free 3d camera // December 11 // Dune // Note : // // On construit un tour d'optimisation // La fonction de cout de ne dépend que de Uc // Uc est le vecteur de commande // Nc (nb commande differentes) n'est pas forcement egal à Np le nombre de commandes // Si Nc<Np alors tous les pas de l'horizon > Nc valent la derniere commande // Il faudra donc toujours calculer Up a partir de Uc, Nc et Np //---------------------------// function compPred() //--- Create the camera pose and the object pose posecDesMo_m = [0 0 0.5 0 0 0 ]; // pose target/object desired posecMo_m = [0 0 2 0 0 0 ]; // pose target/object init posewMo_m = [0 0 0 0 %pi/2 0 ]; // pose of the target in the World Frame //--- Build the corresponding homogeneous matrix cDesMo_m = homogeneousMatrixFromPos(posecDesMo_m); cMo_m = homogeneousMatrixFromPos(posecMo_m); wMo_m = homogeneousMatrixFromPos(posewMo_m); oMc_m = inv(cMo_m); //--- Build the target a_m = 0.30; // dimension of the target oP_m = mire4points(a_m); // create the Npbts Points Target NbPts_m = length(oP_m)/3 ; wP_m = changeFrameMire(oP_m,wMo_m); //--- compute the init projection on the view cP_m = changeFrameMire(oP_m,cMo_m); s_m = projectMireDirect(cP_m); Z_m = cP_m(3:3:$) ; //--- compute the desired projection on the view cDesP_m = changeFrameMire(oP_m,cDesMo_m); sDes_m = projectMireDirect(cDesP_m); ZDes_m = cDesP_m(3:3:$); // ------ Estimated First pose = first pose + perturbation //disturbance = rand(posecMo,'normal')/10; //disturbance = [-0.0068342 -0.0072095 0.0081451 0.0032402 -0.0018848 0.0042416 ]; //disturbance = [0 0 0 0 0 %pi/2] disturbance = [ -0.0373050 0.0704331 -0.0860551 -0.0002348 -0.0857879 0.0092117] cmMc_m = homogeneousMatrixFromPos(disturbance); cmMo_m = cmMc_m*cMo_m; oMcm_m = inv(cmMo_m) ; //--- compute the false projection on the view cmP_m = changeFrameMire(oP_m,cmMo_m); sm_m = projectMireDirect(cmP_m); Zm_m = cmP_m(3:3:$) ; // ------ Sampling time Te_m = 0.03; // to be consistant with the image frame rate Te_simu = 0.03; // ------ Visual Constraints definition xu_m = [ 0.22 ; 0.22 ]; // position max of the a 2D point in the image plane xl_m = [ -0.22 ; -0.22 ]; // position min of the a 2D point in the image plane cote_m = 0.01 ; // ------ Control Constraints definition bu_m = 1e3*0.25*ones(6,1); // command bounds bl_m = -bu_m; // command bounds on the horizon //------------------------------------- // // Compute prediction on Horizon // //------------------------------------- //--- Predictive control parameters thres_m = 1e-2; // error threshold lambda = 1; // --- repeat the control Np times on the control horizon Np_m = 200; // horizon lenght Nc_m = 1; // command horizon length, as we have only one repeted control, it is 1 //Uc_m = [0; 0; -0.3; 0; 0; 1]; // init velocity Uc_m = [0; 0; 0.1; 0; 0; 0.3]; // init velocity Up_m = computeControlOnHorizon(Uc_m,Nc_m,Np_m); Q_m = matWeightIdentity(Np_m,NbPts_m); // --- build the desired feature vector. For a start it is constant sDesHor_m = constSdOnHor(sDes_m,Np_m); // --- compute the position of the camera over the time horizon / G stands for Global // This function computes // 1. All the position on the time horizon // 2. The positions of the object in the camera frame / deduced Z // 3. The projections of the object in the camera frame [sHorG_m c1McN_m ZHorG_m] = preHorGlobalMirePos(oP_m,cMo_m,Up_m,Te_m,Np_m); first_m = 1; last_m = 2*NbPts_m; //--- same starting from the feature position and estimation of Z // 1 compute c0P from s0 and Z0 // 2 compute the motion between c0 and c1 // 3 deduce c1P // 4 project C1 on the image plane and deduce s1 and Z1 // 5 compute c1P from s1 and Z1 // 6 etc ... //sHorG_incremental_m = ga_predHorGlobalMire(s_m,Z_m,Up_m,Te_m,Np_m); //--- same but compute the positions // 1 compute c0P from s0 and Z0 // 2 compute all the camera position // 3 compute cP/ deduce Z // 4 project cP on the image plane //sHorG_from2D_m = cld_predHorGlobalMire(s_m,Z_m,Up_m,Te_m,Np_m); // --- same for the estimated camera / sm means s measured [smHorG_m cm1McmN_m ZmHorG_m] = preHorGlobalMirePos(oP_m,cmMo_m,Up_m,Te_m,Np_m); // 2nd method //smHorG_incremental_m = ga_predHorGlobalMire(sm_m,Zm_m,Up_m,Te_m,Np_m); // 3rd method //smHorG_from2D_m = cld_predHorGlobalMire(sm_m,Zm_m,Up_m,Te_m,Np_m); disp('Compare les vraies features avec celles') disp('obtenues par un model global mais une mauvaise position de depart') hf_10 = createPlanImage(10,xl_m,xu_m,"Real features - / Predicted features -."); mire2DDraw(s_m,cote_m,1); // initial target position mireEvolutionMulticolor(Np_m,sHorG_m,'-') ; mireEvolutionMulticolor(Np_m,smHorG_m,'-.') ; show_pixmap(); pause; //--- DeltaS = sm-s / Linear correction : apply the same epsilon for all the s s0_m = sHorG_m(first_m:last_m); sm0_m = smHorG_m(first_m:last_m); DeltaS_m = sm0_m-s0_m; // apply the computed epsilon on all the prediction si = si - epsilon_m smHorGlinCorr_m = linearCorrection(smHorG_m,DeltaS_m, Np_m); // 2nd method smHorGlinCorr_incremental_m = ga_predHorGlobalMire((sm_m-DeltaS_m),Zm_m,Up_m,Te_m,Np_m); // 3th method smHorGlinCorr_from2D_m = cld_predHorGlobalMire((sm_m-DeltaS_m),Zm_m,Up_m,Te_m,Np_m); disp('linear feature correction using 3 methods') hf_12 = createPlanImage(12,xl_m,xu_m,"Correction of feature using DeltaS"); mire2DDraw(s_m,cote_m,1); // initial target position mireEvolutionMulticolor(Np_m,sHorG_m,'-'); mireEvolutionMulticolor(Np_m,smHorGlinCorr_m,'-.') ; // motion then projection show_pixmap(); disp('motion then projection') pause mireEvolutionMulticolor(Np_m,smHorGlinCorr_incremental_m,'-') ; // incremental show_pixmap(); disp('incremental') pause mireEvolutionMulticolor(Np_m,smHorGlinCorr_from2D_m,'o') ; // P estimation then motion then projection disp('P estimation then motion then projection') show_pixmap(); pause // --- Epsilon = L^+(sm-s) / X correction means the pose cXo is directly corrected L_m = matIntMireC(s_m,Z_m); [DeltaX_m, cmMce_m] = epsilonX(s0_m,sm0_m,L_m); disp('cmMce_m directement comme une pause'); disp(cmMce_m); //cmMce2_m = expMapDirectRxRyRz(epX_m',Te_m); //disp('cmMce2_m directement comme une vitesse intgree'); //disp(cmMce2_m); pause; ceMo_m = inv(cmMce_m) * cmMo_m; oMce_m = inv (ceMo_m); [seHorG_m, ce1MceN_m, Ze_m] = preHorGlobalMirePos(oP_m,ceMo_m,Up_m,Te_m,Np_m); ceP_m = changeFrameMire(oP_m,ceMo_m); se_m = projectMireDirect(ceP_m); Ze_m = ceP_m(3:3:$) ; // 2nd method seHorG_incremental_m = ga_predHorGlobalMire(se_m,Ze_m,Up_m,Te_m,Np_m); // 3th method //seHorG_from2D_m = ga_predHorGlobalMire(se_m,Ze_m,Up_m,Te_m,Np_m); pause disp('Estimation of the correction feature using DeltaX') hf_13 = createPlanImage(13,xl_m,xu_m,"Estimation of corrected features"); mire2DDraw(s_m,cote_m,1); // initial target position mireEvolutionDraw(Np_m,sHorG_m,1,'-k'); //mireEvolutionDraw(Np_m,seHorG_m,1,'-k') ; // motion then projection //show_pixmap(); //pause mireEvolutionDraw(Np_m,seHorG_incremental_m,2,'-r') ; // incremental //show_pixmap(); //pause //mireEvolutionDraw(Np_m,seHorG_from2D_m,1,'-b') ; // P estimation then motion then projection show_pixmap(); //pause //---------Trajectory of 2D points hf_1 = createPlanImage(5,xl_m,xu_m,"3 mire evolutions : real, mesured, estimated"); mire2DDraw(s_m,cote_m,1); // initial target position mire2DDraw(sDes_m,cote_m,5); // desired target position mireEvolutionDraw(Np_m,sHorG_m,1,'-k') ; // real target evolution show_pixmap(); disp('real target evolution') pause mireEvolutionDraw(Np_m,smHorG_m,1,'-r') ; // estimated target evolution disp('stimated target evolution') show_pixmap(); pause mireEvolutionDraw(Np_m,seHorG_m,1,'-g') ; // corrected target evolution epsilon = L^+(s-sm) disp('corrected target evolution epsilon = L^+(s-sm)') show_pixmap(); pause mireEvolutionDraw(Np_m,smHorGlinCorr_from2D_m,1,'-b') ; // corrected target evolution epsilon = (s-sm) disp('corrected target evolution epsilon = (s-sm)') show_pixmap(); //pause //mireEvolutionDraw(Np_m,smHorGlinCorr_m,2,'-.c') //static corrected //show_pixmap(); //pause //mireEvolutionDraw(Np_m,smHorGlinCorr_incremental_m,1,'.-m') ; // //show_pixmap(); //pause hf_2 = createFigure3D(1,"Camera Motion",1); Mire3DDraw4pts(wP_m); show_pixmap(); for i=1:40:Np_m // This is the real 3D position c1Mc2_m = c1McN_m(((i-1)*4+1:(i-1)*4+4),:) ;//noir wMc_display = wMo_m * oMc_m * c1Mc2_m; Camera3DDrawColor(0.05,wMc_display,1); //show_pixmap(); // This is the predicted 3D position starting from the current measurement cm1Mcm2_m = cm1McmN_m(((i-1)*4+1:(i-1)*4+4),:) ; wMcm_display = wMo_m * oMcm_m * cm1Mcm2_m; Camera3DDrawColor(0.05,wMcm_display,5); //rouge //show_pixmap(); // This is the estimated position. ce1Mce2_m = ce1MceN_m (((i-1)*4+1:(i-1)*4+4),:); wMce_display = wMo_m * oMce_m*ce1Mce2_m; Camera3DDrawColor(0.05,wMce_display,3); //vert //show_pixmap(); end show_pixmap //-----------------------------------------------------------------// // Finish the process //-----------------------------------------------------------------// disp('-------The End------') xset("pixmap",0); disp('pause before ending') pause endfunction // --- compute the feature position using the local model sk+1 = sk+ TeLv //global computeL_global; //computeL_global = matIntMireC; // Z and S current //smHorLc_m = ga_predHorLoc2dMire(sm_m,Zm_m,Up_m,Te_m,Np_m); //epsilon_m = smHorLc_m((first_m:last_m))-s0_m; //smHorLcCorr_m = linearCorrection(smHorLc_m,epsilon_m, Np_m); //computeL_global = matIntMireD; // Z and S desired //smHorLd_m = ga_predHorLoc2dMire(sm_m,Zm_m,Up_m,Te_m,Np_m); //epsilon_m = smHorLd_m((first_m:last_m))-s0_m; //smHorLdCorr_m = linearCorrection(smHorLd_m,epsilon_m, Np_m); //computeL_global = matIntMireM; // Mixte Ld and Lc //smHorLm_m = ga_predHorLoc2dMire(sm_m,Zm_m,Up_m,Te_m,Np_m); //epsilon_m = smHorLm_m((first_m:last_m))-s0_m; //smHorLmCorr_m = linearCorrection(smHorLm_m,epsilon_m, Np_m); //computeL_global = matIntMireP; // S current and Z desired //disp('test'); //smHorLp_m = ga_predHorLoc2dMire(sm_m,Zm_m,Up_m,Te_m,Np_m); //disp('test1'); //epsilon_m = smHorLp_m((first_m:last_m))-s0_m; //smHorLpCorr_m = linearCorrection(smHorLp_m,epsilon_m, Np_m); // --- compute the feature position using the global model s(x) //smHorG_m = ga_predHorGlobalMire(sm_m,Zm_m,Up_m,Te_m,Np_m); // --- keep L constant //smHorConst_m = predHorLoc2dMireConst(sm_m,Zm_m,Up_m,Te_m,Np_m); //epsilon_m = smHorConst_m((first_m:last_m))-s0_m; //smHorConstCorr_m = linearCorrection(smHorConst_m,epsilon_m, Np_m); // --- compute a false representation by modifying Z : //Zmod = Z + rand(Z)/10; //smHorGmod = ga_predHorGlobalMire(s,Zmod,Up,Te,Np); //hf_1 = createPlanImage(4,xl,xu,"Point 2D trajectory global and noisy"); //mire2DDraw(s_m,cote,4); //mireEvolutionDraw(Np_m,sHorG_m,1,'-k') ; //mireEvolutionDraw(Np_m,smHorG_m,1,'-r') ; //mireEvolutionDraw(Np_m, seHorG,1,'-g'); //mireEvolutionDraw(Np_m,smHorGmotionCorr,1,'-b'); show_pixmap(); pause; // image plane //xl = [-0.3;-0.3] ; //xu = [0.3; 0.3] ; //cote_m = 0.01 ; //hf_1 = createPlanImage(2,xl,xu,"Point 2D trajectory local"); //mire2DDraw(s_m,cote_m,4); //mireEvolutionDraw(Np_m,smHorLc_m,1,'-b') ; //mireEvolutionDraw(Np_m,smHorLd_m,1,'-g') ; //mireEvolutionDraw(Np_m,smHorLm_m,1,'-r') ; //mireEvolutionDraw(Np_m,smHorLp_m,1,'-c') ; //mireEvolutionDraw(Np_m,smHorConst_m,1,'-m'); //mireEvolutionDraw(Np_m,smHorG_m,1,'-k') ; //show_pixmap(); //---------Correction //hf_5 = createPlanImage(5,xl,xu,"Corrected Point 2D trajectory local"); //mire2DDraw(s_m,cote_m,4); //mireEvolutionDraw(Np_m,smHorLcCorr_m,1,'-.b') ; //mireEvolutionDraw(Np_m,smHorLdCorr_m,1,'-.g') ; //mireEvolutionDraw(Np_m,smHorLmCorr_m,1,'-.r') ; //mireEvolutionDraw(Np_m,smHorLpCorr_m,1,'-.c') ; //mireEvolutionDraw(Np_m,smHorConstCorr_m,1,'-.m') //show_pixmap();
ffb1c747540b14de2f575cb1b73f9b9c112b7c15
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set6/s_Electric_Machines_-_I_M._Verma_And_V._Ahuja_695.zip/Electric_Machines_-_I_M._Verma_And_V._Ahuja_695/CH2/EX2.22/Ex2_22.sce
09f5be2271db0ee1b4f6d4034935cbe5b1802bed
[]
no_license
hohiroki/Scilab_TBC
cb11e171e47a6cf15dad6594726c14443b23d512
98e421ab71b2e8be0c70d67cca3ecb53eeef1df6
refs/heads/master
2021-01-18T02:07:29.200029
2016-04-29T07:01:39
2016-04-29T07:01:39
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
463
sce
Ex2_22.sce
errcatch(-1,"stop");mode(2);//Caption:Find the speed of machine //Exa:2.22 ; ; V=250;//in volts P_i=50*10^3;//in watts I_L1=P_i/V;//in amperes R_a=0.02;//in ohms R_f=50;//in ohms I_f=V/R_f;//in amperes I_a1=I_L1+I_f;//in amperes I_L2=P_i/V;//in amperes I_a2=I_L2-I_f;//in amperes N_1=400;//in rpm E_2=V-(I_a2*R_a)-(2*1);//in volts E_1=V+(I_a1*R_a)+(2*1);//in volts N_2=int(N_1*(E_2/E_1));//in rpm disp(N_2,'speed of motor (in rpm)=') exit();
51de87cde2ec5b4cc8d74fd1ab940b5df359a151
1bb72df9a084fe4f8c0ec39f778282eb52750801
/test/CFC.prev.tst
fac46d2599a1d647c71a000d12b17b27f658ee34
[ "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
69
tst
CFC.prev.tst
0; 1/9, 1/23, 1/30, 1/35, 1/49, 1/58, 1/73, 1/94 0.110577691700247
f2f4187356bd2c4468a083aa900ac381a78b5cc9
449d555969bfd7befe906877abab098c6e63a0e8
/2096/CH1/EX1.26.a/ex_1_26_a.sce
5a54d9f90e556b764517528ef24199da36543f2f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
367
sce
ex_1_26_a.sce
//Example 1.26.a // the variation in the indicated temerature clc; clear; close; //given data : Iin=25; // may be +ve or -ve t1=20; // in seconds t2=4; // in minutes f=1/(t2*60); // cycles/sec w=2*%pi*f; // rad/sec pi=atand(w*t1); A=sin(w*t2-pi); Io=(Iin/sqrt(1+(w*t1)^2)); disp(Io,"the variation in the indiacated temperature,Io(degree celcius) = ±")
7a9410c9933d8d2dc0979e75dd10b15250fb4301
717ddeb7e700373742c617a95e25a2376565112c
/284/CH8/EX8.1/ex_1.sce
a564c8681f49470e09b1f1ffdbd9df2cfb86aa5f
[]
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
595
sce
ex_1.sce
// Chapter 8_Metal Semiconductor and Semiconductor heterojunctions //Caption_Shottky barrier diode //Ex_1//page 308 T=300 //temperature in kelvin Nd=10^16 //donor impurity phi_m=4.55 //metal work function for tungsten xi=4.01 //electron affinity for silicon phi_bo=phi_m-xi phi_n=0.0259*log(2.8*10^19/Nd) Vbi=phi_bo-phi_n xn=(2*eps*Vbi/(e*Nd))^0.5 //space charge width at zero bias Emax=e*Nd*xn/eps //maximum electric field printf('Theoritical barrier height is %f V, built-in potential barrier is %f V and maximium electric field is %f V/cm', phi_bo,phi_n,Emax)
f0b22b700f2ea9716a330d0b142bcb0bbc5da183
449d555969bfd7befe906877abab098c6e63a0e8
/38/CH9/EX9.4/4.sce
be9d13650f6e80991320f357c16b4f2bae4caf97
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
216
sce
4.sce
// Caption: Finding speed and output power clear; close; clc; E_ao=250*1200/1100;//at 1200 r/min E_a=250-400*.025;//at Ia=400A n=240*1200/261;//actual spped P_em=240*400; disp(P_em,'electromagnetic power=')
45c4b8305ef14d5bf03344abcf41fc1d38561ef2
449d555969bfd7befe906877abab098c6e63a0e8
/1061/CH5/EX5.32/Ex5_32.sce
91e740c7f337d7f15cad51a5b9b927f3f9c692ab
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
430
sce
Ex5_32.sce
//Ex:5.32 clc; clear; close; n1=1.48;// core refractive index dl=0.0027; a=4.4*10^-6;// radius in m y=1.32*10^-6;// operating wavelength in m n2=n1*(1-dl); c=3*10^8;// the speed of ligth in m/s v=(2*3.14*a*n1*sqrt(2*dl))/y; VD=0.080+0.549*(2.834-v)^2; DW=(-1)*(n2*dl*VD)/(c*y);// wavelength dispersion in s /um/m Dw=DW*10^6;// wavelength dispersion in ps /nm/km printf("The wavelength dispersion =%f ps n/m/km", Dw);
3969493de08202cc420ef6c43fcfa2b785d0817f
449d555969bfd7befe906877abab098c6e63a0e8
/3472/CH39/EX39.1/Example39_1.sce
355c660d1b602ed306f7a3b4ecc8826c5a7d2278
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,967
sce
Example39_1.sce
// A Texbook on POWER SYSTEM ENGINEERING // A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar // DHANPAT RAI & Co. // SECOND EDITION // PART IV : UTILIZATION AND TRACTION // CHAPTER 1: INDUSTRIAL APPLICATIONS OF ELECTRIC MOTORS // EXAMPLE : 1.1 : // Page number 676 clear ; clc ; close ; // Clear the work space and console // Given data capital_cost_group = 8000.0 // Capital cost of group drive(Rs) n_single = 5.0 // Number of individual drive capital_cost_single = 2500.0 // Capital cost of individual drive(Rs) energy_cons_group = 40000.0 // Annual energy consumption of group drive(kWh) energy_cons_single = 30000.0 // Annual energy consumption of group drive(kWh) cost_energy = 8.0/100 // Cost of energy per kWh(Rs) dmo_group = 12.0 // Depreciation,maintenance & other fixed charges for group drive(%) dmo_single = 18.0 // Depreciation,maintenance & other fixed charges for individual drive(%) // Calculations // Case(a) annual_cost_energy_a = energy_cons_group*cost_energy // Annual cost of energy(Rs) dmo_cost_a = capital_cost_group*dmo_group/100 // Depreciation,maintenance & other fixed charges per year for group drive(Rs) yearly_cost_a = annual_cost_energy_a+dmo_cost_a // Total yearly cost(Rs) // Case(b) total_cost = capital_cost_single*n_single // Capital cost of individual drive(Rs) annual_cost_energy_b = energy_cons_single*cost_energy // Annual cost of energy(Rs) dmo_cost_b = total_cost*dmo_single/100 // Depreciation,maintenance & other fixed charges per year for individual drive(Rs) yearly_cost_b = annual_cost_energy_b+dmo_cost_b // Total yearly cost(Rs) // Results disp("PART IV - EXAMPLE : 1.1 : SOLUTION :-") printf("\nTotal annual cost of group drive = Rs. %.f ", yearly_cost_a) printf("\nTotal annual cost of individual drive = Rs. %.f ", yearly_cost_b)
08ca52641152a232e1fb78341b9160cef600ea18
449d555969bfd7befe906877abab098c6e63a0e8
/3311/CH8/EX8.22/Ex8_22.sce
2c8585cb7959f8afe1ec127ba457678cf1c43c04
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,876
sce
Ex8_22.sce
// chapter 8 // example 8.22 // Design the jones chopper // page-500-501 clear; clc; // given Edc=200; // in V (source voltage) I0=50; // in A (load current) t_q=200; // in us safety_factor=1.5; // calculate t_q=t_q*1E-6; // changing unit from us to s C=(%pi/2)*(t_q/Edc)*I0; // calculation of commutating capacitance V_C=safety_factor*Edc; // calculation of capacitor voltage rating // since t_q=sqrt(L1*C), therefore we get L1=t_q^2/C; // calculation of commutating inductance L1 L2=L1; // calculation of commutating inductance L2 V_BO=safety_factor*Edc; // for SCR 1 I_T=safety_factor*I0; // for SCR 1 t_q2=(%pi/2)*sqrt(L1*C); // for SCR 1 PIV=V_BO; // calculation of Peak inverse voltage for diode D1 I_D=I_T; // calculation of diode current for diode D1 dV_dt_1=I0/C; // dynamic characteristics for SCR 1 di_dt_1=safety_factor*Edc/L1; // dynamic characteristics for SCR 1 E_peak=safety_factor*Edc; dV_dt_2=E_peak/sqrt(L1*C); // dynamic characteristics for SCR 2 L=2; // in uH (assumption as done in the book) di_dt_2=E_peak/L; // dynamic characteristics for SCR 2 printf("\nThe commutating capacitance is \t\t C=%.2f uF",C*1E6); printf("\n\nThe capacitor voltage rating is \t V_C=%.f V",V_C); printf("\n\nThe commutating inductances are \t L1=%.2f mH \t or L2=%.2f mH",L1*1E3,L2*1E3); printf("\n\nThe characteristics of SCR1 are \t V_BO=%.f V \t I_T=%.f A",V_BO,I_T); printf("\n\nThe characteristics of SCR2 are \t t_q<=%.f us or t_q=250 us \t V_BO=%.f V \t I_T=%.f A",t_q2*1E6,V_BO,I_T); printf("\n\nThe characteistics of diode D1 are \t PIV=%.f V \t I_D=%.f A",V_BO,I_D); printf("\n\nThe dynamic characteistics of SCR1 are \t dV/dt=%.2f V/us \t di/dt=%.2f A/us",dV_dt_1*1E-6,di_dt_1*1E-6); printf("\n\nThe dynamic characteistics of SCR2 are \t dV/dt=%.2f V/us \t di/dt=%.f A/us",dV_dt_2*1E-6,di_dt_2*1E-6); // Note: the answers vary slightly due to precise calculation
e66015bcdbc2104138d1f16dc60c38b553d145df
449d555969bfd7befe906877abab098c6e63a0e8
/2459/CH9/EX9.7/Ex9_7.sce
b5e10407a37e046c6e03533b9eafe8aa1c3003ae
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
304
sce
Ex9_7.sce
//chapter9 //example9.7 //page148 V=10 // V V_D=0.7 // V R_BC=2 // kilo ohm R=2 // kilo ohm // by Kirchoff voltage law we get // -V_D-I_D*R_BC-2*I_D*R+V=0 thus making I_D as subject we get I_D=(V-V_D)/(R_BC+2*R) V_Q=2*I_D*R printf("I_D = %.3f mA \n",I_D) printf("V_Q = %.3f V \n",V_Q)
64d45fc32f7e99e7b8d4facad583ed45085d6590
fd53e4d4cb8520b84e44cf3729508c4b479fac3a
/1547.1/Tests/SPF_min_cap.tst
5a03ad31dc221fb9480253adaea0630c67aaaab2
[]
no_license
FREA-ENT/svp_1547.1
ea1b7feb92671c3f5a3bbb503f39f76cc655fe59
728cde3b52bfd65db1eeecb05d62003d25aff9dc
refs/heads/master
2020-05-23T21:28:02.374723
2019-05-07T22:24:02
2019-05-07T22:24:02
186,955,692
0
0
null
2019-05-16T05:13:03
2019-05-16T05:13:03
null
UTF-8
Scilab
false
false
2,626
tst
SPF_min_cap.tst
<scriptConfig name="SPF_min_cap" script="SA12_power_factor"> <params> <param name="eut.pf_min_ind" type="float">-0.85</param> <param name="eut.pf_min_cap" type="float">0.85</param> <param name="eut.pf_settling_time" type="int">1</param> <param name="gridsim.ametek.phases" type="int">1</param> <param name="spf.n_r" type="int">3</param> <param name="gridsim.ametek.freq" type="float">60.0</param> <param name="gridsim.ametek.i_max" type="float">60.0</param> <param name="gridsim.ametek.v_nom" type="float">120.0</param> <param name="gridsim.ametek.v_max" type="float">150.0</param> <param name="pvsim.terrasas.vmp" type="float">350.0</param> <param name="das.px8000.sample_interval" type="int">500</param> <param name="eut.p_rated" type="int">5000</param> <param name="pvsim.terrasas.pmp" type="float">5000.0</param> <param name="gridsim.ametek.ip_port" type="int">5025</param> <param name="das.px8000.chan_3_label" type="string">1</param> <param name="das.px8000.chan_1_label" type="string">1</param> <param name="pvsim.terrasas.channel" type="string">1,2</param> <param name="das.px8000.ip_addr" type="string">192.168.0.10</param> <param name="gridsim.ametek.ip_addr" type="string">192.168.0.11</param> <param name="pvsim.terrasas.ipaddr" type="string">192.168.0.2</param> <param name="das.px8000.chan_4_label" type="string">2</param> <param name="das.px8000.chan_1" type="string">AC</param> <param name="das.px8000.chan_4" type="string">DC</param> <param name="das.px8000.chan_3" type="string">DC</param> <param name="pvsim.mode" type="string">Disabled</param> <param name="loadsim.mode" type="string">Disabled</param> <param name="gridsim.mode" type="string">Disabled</param> <param name="spf.pf_mid_ind" type="string">Disabled</param> <param name="das.mode" type="string">Disabled</param> <param name="spf.pf_min_ind" type="string">Disabled</param> <param name="der.mode" type="string">Disabled</param> <param name="spf.pf_mid_cap" type="string">Disabled</param> <param name="gridsim.auto_config" type="string">Disabled</param> <param name="spf.pf_min_cap" type="string">Enabled</param> <param name="spf.p_20" type="string">Enabled</param> <param name="spf.p_100" type="string">Enabled</param> <param name="spf.p_50" type="string">Enabled</param> <param name="das.px8000.comm" type="string">Network</param> <param name="gridsim.ametek.comm" type="string">TCP/IP</param> <param name="das.px8000.chan_2" type="string">Unused</param> </params> </scriptConfig>
1014325a33b64d7ede7b0f75f55f8c318c56078b
449d555969bfd7befe906877abab098c6e63a0e8
/3840/CH3/EX3.5/Ex3_5.sce
930d51740dd6adb9762aa8640a0cf4e852126952
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
276
sce
Ex3_5.sce
clear // // // //Variable declaration n=1 //order theta=38.2*%pi/180 //glancing angle(radian) lamda=1.54 //wavelength(angstrom) h=2 k=2 l=0 //Calculation a=sqrt(h**2+k**2+l**2) d=n*lamda*a/(2*sin(theta)) //lattice parameter(angstrom) //Result
a60d6de193145066042af42cbfad447390325b4a
449d555969bfd7befe906877abab098c6e63a0e8
/692/CH6/EX6.18/P6_18.sce
1621ddb18856b678dafaa25ba6a2ef374872e82d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
187
sce
P6_18.sce
//EXAMPLE 6.18 //Inverse Z-transform using power series expansion clc; clear; z=%z; Xnum=z; Xden=(z-1)^2; xn=ldiv(Xnum,Xden,15); disp(xn,'The function is = '); disp(' Thus, xn = n*u(n)');
94727d103c66600a13e4c8e0df1757845608f12c
449d555969bfd7befe906877abab098c6e63a0e8
/1529/CH21/EX21.11/21_11.sce
4de18e0795c6a2512b5d99a7d5b321c0fe3e49d7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
551
sce
21_11.sce
//Chapter 21, Problem 11 clc; f=50; //frequency v1=500; //primary voltage v2=100; //secondary voltage B=1.5; //maximum core flux density A=50e-4; //effective core cross-sectional area phim=B*A; //maximum flux n1=v1/(4.44*f*phim); //primary turns n2=v2/(4.44*f*phim); //secondary turns printf("Primary turns = %d turns\n\n",n1); printf("Seconadry turns = %d turns\n\n",n2);
04ba8cc6af4171b649d4b0774ad4df62ae9ef8a7
726961a3412b6d2fda7c781172773be5e27ac97a
/jflap-grades/tests/q04d.tst
8520bfd33051796a3006e8cc7b2d00b125ece5a5
[]
no_license
ailton07/jflap-grades-19-2
0546deb482e7f8e003591351191fa649d62fd405
ff58118d31aa30a0f56cae8e5f0186d44c1b72a8
refs/heads/master
2020-09-16T12:49:31.560841
2019-11-25T01:03:19
2019-11-25T01:03:19
223,774,968
0
0
null
null
null
null
UTF-8
Scilab
false
false
59
tst
q04d.tst
0 0.20 abc 1 acb 1 cba 1 bca 1 ababc 0 a 0 aabc 0 bcaabc 0
494165ab82b349d21627efbab2f4cd68290a6b57
449d555969bfd7befe906877abab098c6e63a0e8
/51/CH12/EX12.8/12_8data.sci
faa1956e78e7be2f7fa3107f44137e038e9e05ee
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
48
sci
12_8data.sci
ri=0.133;//in. ro=0.168;//in. N=300000;//rpm
cd8e9a5432e881dd91ef443b8df21a2139e16a8f
449d555969bfd7befe906877abab098c6e63a0e8
/2213/CH4/EX4.21/ex_4_21.sce
f2b810b9d061c924940854a898ed2308d1b6eb67
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
321
sce
ex_4_21.sce
//Example 4.21//compare diameter and length clc; clear; close; format('v',6) v1=110;//in volts cp1=16;//in cp cp2=25;//in cp v2=220;//in volts ri=((cp1/cp2)*(v2/v1));//ratio of curents dr=(ri)^(2/3);//ratio of diameters di=(cp1/cp2)*(1/dr);//ratio of lengths disp(dr,"ratio of diameter is") disp(di,"ratio of length is")
de2ceb51d0486628b264c1c11a99ebb75bfa6c70
449d555969bfd7befe906877abab098c6e63a0e8
/1133/CH8/EX8.15/Example8_15.sce
facf531202c9e56cdffe7f01938b46c53ac2b8a8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
429
sce
Example8_15.sce
//Example 8.15 clc disp("IC 74191 is a 4-bit counter. Thus it is MOD-16 counter. However, we require MOD-10 counter. The difference between 16 and 10 is 6. Hence 6 steps must be skipped from the full modulus sequence. This can be achieved by presetting counter to value 6. Each time when counter recycles it starts counting from 6 upto 16 on each full cycle. Therefore, each full cycle of the counter consists of 10 states.")
36937aac01c306b3b1566f7a564c758c249f102c
449d555969bfd7befe906877abab098c6e63a0e8
/2705/CH15/EX15.1/Ex15_1.sce
153a3eea664f0e9ecf12acbebc54c53c9ec6970a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
395
sce
Ex15_1.sce
clear; clc; disp('Example 15.1'); // aim : To determine // the thermal efficiency of the cycle // given values T1 = 273+400;// temperature limit, [K] T3 = 273+70;// temperature limit, [K] // solution // using equation [15] of section 15.3 n_the = (T1-T3)/T1*100;// thermal efficiency mprintf('\n The thermal efficiency of the cycle is = %f percent\n',n_the); // End
6eece4e2733076dfb5dd07bf4c4878630e948905
449d555969bfd7befe906877abab098c6e63a0e8
/1580/CH6/EX6.3/Ch06Ex3.sce
58db50e875a40d6dba26671644543a9215355d3e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
503
sce
Ch06Ex3.sce
// Scilab Code Ex6.3 : Page-6.10 (2004) clc;clear; t = 3e-14; // Mean free time, sec m = 9.1e-31; // Mass of electron, kg e = 1.6e-19; // Charge of electron, C r = 1.85e-10; // Radius of sodium atom, m a = 4*r/sqrt(3); // Sodium has BCC structure n = 2/(a^3); // Number of electron per unit volume rho = m/(n*(e^2)*t); // Electrical resistivity, ohm m printf("\nElectrical resistivity = %3.3e ohm m", rho); // Result // Electrical resistivity = 4.620e-08 ohm m
35a36c15fb1ce12437e36ba6ad50d9210e77071d
b32474ae2727233775f44c71edfe1f10b6a3430f
/difdiv.sci
8361da44d4b9d9acbaf8eb3f5aa51bb11a2bdc4b
[]
no_license
lucaslyon96/scilab
8400b98c25dafa13069dd64bd391c15218323575
8fe45fd3bd27ab21490682874f72f9c20c8717e1
refs/heads/master
2020-03-18T12:25:20.253687
2018-05-24T14:49:08
2018-05-24T14:49:08
134,725,468
0
0
null
null
null
null
UTF-8
Scilab
false
false
187
sci
difdiv.sci
function [tab] = difdiv(x,y) n=length(x) tab(:,1)=y for i=1:n-1 for j=1:n-i tab(j,i+1)=(tab(j+1,i)-tab(j,i))/(x(j+i)-x(j)) end end endfunction
90283b723ca992197062483f0b875b398fd55ff8
449d555969bfd7befe906877abab098c6e63a0e8
/1922/CH8/EX8.5/8_5.sce
bc79820f2eb5fd84a5a747252f6d42eff3115de5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
357
sce
8_5.sce
clc clear //Initialization of variables v1=81 //cm^3/gmol v2=97 //cm^3/gmol d1=9.2 //(cal/cm^3)^0.5 d2=8.6 //(cal/cm^3)^0.5 R=1.987 T=373.1 //K //calculations d=0.5*(d1+d2) lng1=v1*(d1-d)^2 /(R*T) lng2=v2*(d2-d)^2 /(R*T) g1=exp(lng1) g2=exp(lng2) //results printf("Activity coeffecients of components are %.3f and %.3f respectively",g1,g2)
6d693464e1c257154edede47126f0e8a6a1e3178
449d555969bfd7befe906877abab098c6e63a0e8
/3784/CH3/EX3.4/Ex3_4.sce
0f1194964497874689dc4a812f875d993a5af107
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
330
sce
Ex3_4.sce
clc // Variable Initiallization F=50 //Supply Frequency In Hz Erms=230 //RMS Voltage Per Phase In Volts L=0.015 //Inductance In Henry A1=60 //Firing Angle A2=120 //Firing Angle //solution W=2*%pi*F Icp=((3*sqrt(2)*Erms)/(W*L))*(1-sind(A1)) printf('\n\n The Peak value of Circulating Current=%0.1f Amp\n\n',Icp)
3f399ceeee999c27c85fd240bfb65a77cf93b1e7
abed134eb329d44a339af93997f34c76b7649173
/p5codes_10252020/CPU.tst
b375174765d4071afdff526f9e6a78849c51e929
[]
no_license
Patrickyyh/CSCE-312
8823df9f53d378b96c8018064da3823faef95ce3
b9ba0fd8592ce5d91d1689219ff48d638a66aee0
refs/heads/master
2023-05-03T18:46:15.689810
2021-05-22T06:02:17
2021-05-22T06:02:17
369,727,875
0
0
null
null
null
null
UTF-8
Scilab
false
false
640
tst
CPU.tst
load CPU.hdl, output-file CPU.out, compare-to CPU.cmp, output-list time%S0.4.0 fromM%D0.16.0 In%B0.26.0 Reset%B2.1.2 toM%D1.16.0 writeM%B3.1.3 addressM%D0.16.0 PCOut%D0.16.0; set In %B0001000001000111, // ADDI R0, R1, 7 tick, output, tock, output; set fromM %D16, set In %B1000001000000011, // READ R1, R0 tick, output, tock, output; set In %B0000010001011000, // ADD R2, R1,R3 tick, output, tock, output; set fromM %D19, set In %B1000100010000000, // READ R4, R2 tick, output, tock, output; set In %B1011100000000000, // PCOut = R4 tick, output, tock, output; // Add more test cases here to increase the robustness of testing
48eab94ef2073a59fe99b5385f134ecf99c1c6d0
584105ff5b87869494a42f632079668e4c3f82de
/wrapppers/help_files/composeRT.sci~
a8b947b4d72c2e8d2a33fa4c656e6782b5b16fd9
[]
no_license
kevgeo/FOSSEE-Computer-Vision
0ceb1aafb800580498ea7d79982003714d88fb48
9ca5ceae56d11d81a178a9dafddc809238e412ba
refs/heads/master
2021-01-17T21:11:31.309967
2016-08-01T14:45:40
2016-08-01T14:45:40
63,127,286
6
0
null
null
null
null
UTF-8
Scilab
false
false
169
composeRT.sci~
function [RotVec3 TransVec3] = composeRT(RotVec1,TransVec1,RotVec2,TransVec2) [RotVec3 TransVec3] = opencv_composeRT(RotVec1,TransVec1,RotVec2,TransVec2) endfunction
716eef41502bfc7da65ca8efccb1780f5706280c
449d555969bfd7befe906877abab098c6e63a0e8
/1586/CH7/EX7.1/EXP7_1.sce
fbb59599b5253a052ab183dbdb8ac2c8747be4a2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
357
sce
EXP7_1.sce
clc;funcprot(0);//EXAMPLE 7.1 // Initialisation of Variables f=1.12;.......//Geometry factor for the specimen and flaw sigma=45000;.....//Applied stress on Steel in psi K=80000;.........//The stress intensity factor //CALCULATIONS a=(K/(f*sigma))^2/%pi;........//Depth of crank in in disp(a,"Depth of crank that will propagate in the steel in in:")
a8c73dc633996598eb9a0b272250cb327bb68171
39c5c468df5e2bde0147a30cf092fc8da3e7ed3e
/UFRGS/calcNumerico/area2/P2_numerico_oberdan/M8 - Minimos_Quadrados/minimos-quadrados-hiperbole.sce
2ddccc715b1479781ad4533533e271c814ee1066
[]
no_license
andredxc/Files
9dffc9fe5f7e923b83035d794dfa15c930cdb898
e32309b9ab548b829b04be66c2776cf9c9c6656e
refs/heads/master
2021-06-03T10:44:01.606242
2020-09-21T15:39:48
2020-09-21T15:39:48
107,410,076
0
0
null
null
null
null
UTF-8
Scilab
false
false
115
sce
minimos-quadrados-hiperbole.sce
// hiperbole y=1./(a+bx) x=[0:0.1:1]; y=sin(x)+1; yi=1./y; A=[ones(11,1) x']; v=inv(A'*A)*A'*yi'; a=v(1) b=v(2)
6345149b2459b72d7b572b33ec03d258306b9e28
449d555969bfd7befe906877abab098c6e63a0e8
/1436/CH7/EX7.1/ex7_1.sce
350975e3c590dae309f4394fd229309af97ea73b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
165
sce
ex7_1.sce
//Example 7.1, page no-436 clear clc f=2*9.8*10^5 A=100 V=20 l=10 mu=(f/A)/(V/l) mu=mu/1000 printf("The absolute viscosity mu = %.1f*10^5 centipoises",mu)
f49fdd5dd69bb4e1b8e1c09e2db7a8864fda8e57
449d555969bfd7befe906877abab098c6e63a0e8
/2414/CH2/EX2.9/Ex2_9.sce
b945c092edcb8cc19169051ecfc238ce5cf9b443
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,051
sce
Ex2_9.sce
clc; clear all; //page no 54 //problem 2.9 f0=0; f1=500; //fundamental freq. f2=1000; f3=1500; //harmonics //Values from ex 2.4 C=[5 8 6 3]// Values in Volts //Values from ex 2.5 P=[5 6.4 3.6 .9]; //poweer in watts clf; // plot two sided linear amplitude spectrum fHz=-1510:10^-2:1510; //x-axis matrix //Y-axis matrix Cn=[C(1)] for i=2:4 Cn=[zeros(-500+10^-2:10^-2:0-10^-2) Cn zeros(0+10^-2:10^-2:500-10^-2)] Cn=[C(i)/2 Cn C(i)/2]; end Cn=[zeros(-10+10^-2:10^-2:0) Cn zeros(0:10^-2:10-10^-2)] subplot(211) plot2d(fHz,Cn,[2],rect=[-2000,0,2000,6]) xtitle('Two-sided Linear amplitude spectrum','f,Hz','Vn(V)') xgrid // plot two power spectrum fHz=-1510:10^-2:1510; //x-axis matrix //Y-axis matrix Pn=[P(1)] for i=2:4 Pn=[zeros(-500+10^-2:10^-2:0-10^-2) Pn zeros(0+10^-2:10^-2:500-10^-2)] Pn=[P(i)/2 Pn P(i)/2]; end Pn=[zeros(-10+10^-2:10^-2:0) Pn zeros(0:10^-2:10-10^-2)] subplot(212) plot2d(fHz,Pn,[6],rect=[-2000,0,2000,6]) xtitle('Two-sided power] spectrum','f,Hz','Pn(W)') xgrid
13908a5c8c061b7f5620e77a32481ba28a506849
449d555969bfd7befe906877abab098c6e63a0e8
/1370/CH3/EX3.17/example3_17.sce
1677d34a914124941d2992fa5e6212de75bf5cd4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
914
sce
example3_17.sce
//exmaple3.17 clc disp("5 kVA, 2300/230 V, P_i=40 W, (P_cu)F.L. =112 W, cos(phi)=0.8") disp("Sr. kVA n=Fraction of full load New P_cu= %eta=n[Total VA]cos(phi)/n[Total VA]cos(phi)+P_i+New P_cu *100") disp("No. output =Actual kVA/total kVA n^2 P_cu(F.L.) ") disp("1 1.25 0.25 7 95.51%") disp("2 2.5 0.5 28 96.711%") disp("3 3.75 0.75 63 96.668%") disp("4 5 1 112 96.339%") disp("5 6.25 1.25 175 95.877%") disp("6 7.5 1.5 252 95.359%") disp("") disp("The efficiency against kVA output curve is shown in the fig. 3.28")
5bcf16cd3fce75c27b1b046f3c0579058e980677
449d555969bfd7befe906877abab098c6e63a0e8
/1808/CH5/EX5.28/Chapter5_Exampl28.sce
5cd923c5611f04f1258bfa76cc11e806c9ba58c9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
646
sce
Chapter5_Exampl28.sce
clc clear //INPUT DATA k=0.05;//clearance p1=1;//initial pressure in bar pd=5.5;//delivery pressure in bar n=1.3;//index of compression R=0.287;//gas constant N=500;//Speed in rpm d=0.2;//diameter in m t1=293;//temperature in K //CALCULATIONS nv=1+k-k*((pd/p1)^(1/n));//volumetric efficiency in percentage va=nv*(3.14*d^3*1.5*N)/4;//Volume of air in m^3/min m=p1*va/(R*t1);//mass of air in kg/min ip=(n/(n-1))*p1*10^2*(va/60)*((pd/p1)^((n-1)/n)-1);//Power required to run the compressor in kW //OUTPUT printf('(i)Volumetric efficiency %3.4f percentage \n (ii)Power required to run the compressor is %3.2f kW',nv,ip)
70a82803cfd37a4f4c79efa513ca4267442a35c0
449d555969bfd7befe906877abab098c6e63a0e8
/3137/CH6/EX6.12/Ex6_12.sce
84a221373f2167f0452753d763750f400688c4ea
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
357
sce
Ex6_12.sce
//Initilization of variables m=1 //kg g=9.81 //m/s^2 t1=45 //degrees t2=30 //degrees //Calculations //Solving as system of linear equations A=[1 0 -cosd(t1) 0;0 1 0 3/5;-5 g*m*cosd(t1)*cosd(t2) 0 0;-1 0 0 4/5] B=[0;g*m;g*m*5*cosd(t1)*cosd(t2);0] C=inv(A)*B //Result clc printf('The forces are Nb=%fN Nc=%fN Tc=%fN Tb=%fN',C(1),C(2),C(3),C(4))
a5ce4aeb94386e096b6fc6ea32ac6dcdb6ab21ed
449d555969bfd7befe906877abab098c6e63a0e8
/2159/CH10/EX10.10/1010.sce
bab8de7f7d4680c23e019b6291030ae1815199b0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
229
sce
1010.sce
// problem 10.10 Q=0.118 N=1450/60 Hm=25 d2=0.25 B2=0.05 n=0.75 g=9.81 u2=3.142*d2*N Vf2=Q/(3.142*d2*B2) Vw2=g*Hm/(n*u2) y2=atand(Vf2/(u2-Vw2)) disp(y2,"vane angle in degree at the outer nperiphery of the impeller")
c953cbfdc78ce88971fe343ac0ee073c15652e3d
449d555969bfd7befe906877abab098c6e63a0e8
/848/CH14/EX14.10/Figure14__10.sce
872487a34a584d0b2f69a78921028d3bcf9fb243
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
638
sce
Figure14__10.sce
//clear// //Caption:Performance Measurement and Monitoring //Figure:14.10 Plotting pulse shape of gaussian distribution //and determining 3-dB optical and electrical bandwidth clear; close; clc; sigma = 1; t = -3*sigma:0.01:3*sigma; p = (1/(sigma*sqrt(2*%pi)))*exp(-t^2./(2*sigma^2)); fdB_optical = 0.187/sigma; fdB_electrical = 0.133/sigma; disp(fdB_optical,'fdB_optical') disp(fdB_electrical,'fdB_electrical') plot(t,p,'r') xlabel('Time t') ylabel('Relative pulse amplitude P(t)') title('Figure:14.10 Definitions of pulse-shape parameters') xgrid(1) //Result //fdB_optical = 0.187 //fdB_electrical = 0.133
bb5eb7a1fa1309936ecb822526b4b27fd47beecc
449d555969bfd7befe906877abab098c6e63a0e8
/26/CH2/EX2.2.7/2_2_7.sce
3df602ad4427b521c770a09dad1e03537088d0dd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
162
sce
2_2_7.sce
disp('the co-efficient matrix is:') a=[1 2;5 12] disp(a) disp('inverse of the matrix is:') disp(inv(a)) disp('solution is:') b=[-1;3]; c=inv(a); disp(c*b)
b6ba0f4bc244bb5ae0d71db9c2f7c8337ebf42d5
7b040f1a7bbc570e36aab9b2ccf77a9e59d3e5c2
/Scilab/local/2dof_controller/dc/ident/scilab/max_ex.sce
11e0c09cae230ef8ff99349ecbe11ad9327ca421
[]
no_license
advait23/sbhs-manual
e2c380051117e3a36398bb5ad046781f7b379cb9
d65043acd98334c44a0f0dbf480473c4c4451834
refs/heads/master
2021-01-16T19:50:40.218314
2012-11-16T04:11:12
2012-11-16T04:11:12
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
526
sce
max_ex.sce
// Updated(3-8-07) // 6.4 S1 = [1 2 3 4]; S2 = [1,-2,3,-4]; S3 = [-1,-2,3,4]; len = length(S1)-1; xv = -len:len; m = 1; xi = rand(4,1,'normal'); Spxi1 = S1 + m*xi'; Spxi2 = S2 + m*xi'; Spxi3 = S3 + m*xi'; n = 1:length(S1); plot(n,Spxi1,'o-',n,Spxi2,'x--',n,Spxi3,'*:'); label('',4,'n','y',4); ACF1 = normacf(Spxi1); ACF2 = normacf(Spxi2); ACF3 = normacf(Spxi3); xset('window',1); a = gca(); a.data_bounds = [-len -1; len 1]; plot(xv,ACF1,'o-',xv,ACF2,'x--',xv,ACF3,'*:'); label('',4,'Lag','ACF',4);
3599c29a65ee077275a4f0a7cc485a42cc403713
e41b69b268c20a65548c08829feabfdd3a404a12
/3DCosmos/Data/Scripts/_Movie/NotUsed/scene_starglobe.SCI
199de744a5d57c452adaa4fa6edaf08464afdbbd
[ "LicenseRef-scancode-khronos", "MIT" ]
permissive
pvaut/Z-Flux
870e254bf340047ed2a52d888bc6f5e09357a8a0
096d53d45237fb22f58304b82b1a90659ae7f6af
refs/heads/master
2023-06-28T08:24:56.526409
2023-03-01T12:44:08
2023-03-01T12:44:08
7,296,248
1
1
null
2023-06-13T13:04:58
2012-12-23T15:40:26
C
UTF-8
Scilab
false
false
17,086
sci
scene_starglobe.SCI
codeblock readtextfile(ScriptDir+"\_TOOLS.sci"); codeblock readtextfile(ScriptDir+"\_SSYS.sci"); ############################################################################################### ############################################################################################### ############################################################################################### createvar(globeradius); function AddPlane(mydata,fra,name,col) { weakcol=color(col.r,col.g,col.b,0.1); sz=1.3*mydata.globeradius; fra.add("Rectangle","Position":point(-1*sz,-1*sz,0),"Axis1":vector(2*sz,0,0),"Axis2":vector(0,2*sz,0), "color":weakcol,"BlendType":BlendTransParent,"EnableLight":false,"DepthMask":DepthMaskDisable,"renderback":true); crv=fra.add("Curve","color":col,"EnableLight":false); crv.addpoint(point(-1*sz,-1*sz,0)); crv.addpoint(point(-1*sz,1*sz,0)); crv.addpoint(point(1*sz,1*sz,0)); crv.addpoint(point(1*sz,-1*sz,0)); crv.IsClosed=true; fra.add("Curve", "color":col,"BlendType":BlendTransParent,"EnableLight":false ).makeline(point(-1*sz,0,0),point(1*sz,0,0)); fra.add("Text3D","Content":name, "Position":point(0.95*sz,0.95*sz,0), "UnitX":vector(-0.15*sz,0,0), "UnitY":vector(0,-0.15*sz,0), "EnableLight":false,"Color":col,"BlendType":BlendTransParent ); } function setviewerposition(ilongit,ilattit) { vframe=root.SC.Universe.SolarSystem.Earth.Inclin.Globe.ViewerFrame; vframe.transf.reset; vframe.transf.rotate(vector(0,0,1),ilongit); vframe.transf.rotate(vector(0,1,0),Pi/2-ilattit); } function InitStarGlobe(mydata) { ssysframe=ssys_create; ssys_createearth(200); ssys_showstarback(true); #root.SC.Universe.SolarSystem.EarthOrbit.visible=false; #create clock clockframe=root.SC.Universe.addscreenframe("ClockFrame"); info_clock=clockframe.add("Clock","Type":ClockTypeAnalog,"Position":point(0.1,0.15,0),"Size":0.08, "Color":color(0.7,0.7,0.7),"EnableLight":false); info_date=clockframe.add("Clock","Type":ClockTypeDate,"Position":point(0.02,0.02,0),"Size":0.03, "Color":color(0.7,0.7,0.7),"EnableLight":false); globeframe=GetPlanetFrame("Earth"); earthframe=GetPlanetBodyFrame("Earth"); globeradius=mydata.globeradius; #shadow shad=globeframe.add("sphere","Name":"shadow"); shad.radius=0.99*globeradius; shad.EnableLight=false; shad.BlendType=BlendTranslucent; shad.DepthMask=DepthMaskDisable; shad.renderfront=false; shad.renderback=true; shad.color=color(0,0,0,0.8); shad.resolution=50; shad.canbuffer=true; #create halo halfcircle=FlatContourSet; haloframe=globeframe.addviewdirframe(point(0,0,0),"haloframe"); halfcircle.generate(functor("point("+str(globeradius)+"*sin(a),"+str(globeradius)+"*cos(a),0)","a"),Pi,0,40); halo=haloframe.add("SolidObject","Name":"Halo"); halo.Revolve(halfcircle,40); halo.BlendType=BlendTransparent; halo.RenderBack=true; halo.DepthMask=DepthMaskDisable; halo.EnableLight=false; halo.GenerateVertexProperty(functor("color(0,0,1/(1+15*sqr(p.z/"+str(globeradius)+")),0.15)","p"),VertexPropertyColor); halo.canbuffer=true; sp=globeframe.add("sphere"); sp.color=color(1,1,1); #Star globe tx=globeframe.createtexture("star",DataDir+"\textures\star4.bmp"); st1=globeframe.add("StarGlobe","Name":"StarglobeFront"); st1.radius=globeradius; st1.texture="star"; st1.StarSize=0.01*globeradius; st1.LineSize=0;#0.01*globeradius; st1.linecolor=color(0,0.5,1,0.4); st1.renderback=false; st2=globeframe.add("StarGlobe","Name":"StarGlobeBack"); st2.radius=globeradius; st2.texture="star"; st2.StarSize=0.01*globeradius; st2.LineSize=0;#0.01*globeradius; st2.renderfront=false; st2.linecolor=color(0,0.5,1,0.4); st2.color=color(1,1,1,0.15); #Create milky way #galactic pole glong=179.32095/180*Pi; glatt=29.811954/180*Pi; ez=-1*vector(cos(glong)*cos(glatt),sin(glong)*cos(glatt),sin(glatt)); #galactic center glong=266.14097/180*Pi; glatt=-5.52967943/180*Pi; ex=vector(cos(glong)*cos(glatt),sin(glong)*cos(glatt),sin(glatt)); ey=vecnorm(ez*ex); mwf=globeframe.addsubframe("MilkyWay"); mwf.transf.Xaxis=-1*ex; mwf.transf.Yaxis=-1*ey; mwf.transf.Zaxis=ez; tx=mwf.createtexture("MilkyWay",DataDir+"\textures\milkyway.png"); mw=mwf.add("sphere","EnableLight":false); mw.color=color(0.3,0.5,1,0.45); mw.texture=tx.name; mw.BlendType=BlendTransparent;mw.DepthMask=DepthMaskDisable; mw.renderback=false;mw.renderfront=true; mw.radius=globeradius; #Sun path fr=globeframe.addsubframe("EclipticaCircle"); c1=fr.add("curve"); c1.makecircle(point(0,0,0),vector(0,0,1),globeradius,80); c1.color=color(1,0.75,0); c1.size=2; #create earth pole axis & equator fr=earthframe.addsubframe("EquatorFrame"); eaxis=fr.add("Curve","Name":"Axis"); eaxis.makeline(point(0,0,-1*globeradius),point(0,0,+1*globeradius)); eaxis.size=2; eaxis.color=color(1,0.25,0); c1=fr.add("curve"); c1.makecircle(point(0,0,0),vector(0,0,1),globeradius,80); c1.color=color(1.0,0.25,0); c1.size=2; #create equatorial grid eqgridframe=globeframe.inclin.addsubframe("eqgrid"); for i=-8 to 8 do { a=deg2rad(10*i); crv=eqgridframe.add("Curve","Size":1,"Color":color(0.7,0.3,0)); crv.makecircle(point(0,0,globeradius*sin(a)),vector(0,0,1),globeradius*cos(a),80); } for i=0 to 17 do { a=deg2rad(10*i); crv=eqgridframe.add("Curve","Size":1,"Color":color(0.7,0.2,0)); crv.makecircle(point(0,0,0),vector(cos(a),sin(a),0),globeradius,80); if (i==0) or (i==9) then { crv.Size=2; crv.color=color(1,0.25,0,1); } } eqgridframe.visible=false; #create viewer frame, but at earth center vframe=earthframe.addsubframe("ViewerFrame"); setviewerposition(mydata.ViewerLongitude,mydata.ViewerLattitude); #create zenith axis & horizon horframe=vframe.addsubframe("horizon"); horframe.visible=false; zaxis=horframe.add("Curve","Name":"ZenithAxis"); zaxis.makeline(point(0,0,0),point(0,0,globeradius)); zaxis.size=2; zaxis.color=color(0.2,0.5,0.2); horline=horframe.add("Curve","Name":"HorizLine"); horline.makecircle(point(0,0,0),vector(0,0,1),1.01*globeradius,80); horline.size=2; horline.color=color(0.2,0.5,0.2); horplane=horframe.add("Cylinder","Name":"HorPlane"); horplane.Axis=vector(0,0,0.01*globeradius); horplane.radius=globeradius; horplane.resolution=60; horplane.EnableLight=false; horplane.color=color(0.1,0.3,0.1,0.5); horplane.BlendType=BlendTranslucent; horplane.DepthMask=DepthMaskDisable; horcap=horframe.add("Surface","Name":"HorCap"); horcap.generate(functor("point(1.02*"+str(globeradius)+"*cos(u)*cos(v),1.02*"+str(globeradius)+"*cos(u)*sin(v),-1.02*"+str(globeradius)+"*sin(u))","u","v"),Pi/2,0,30,0,2*Pi,60); horcap.enablelight=false; horcap.color=color(0,0,0,0.8); horcap.BlendType=BlendTranslucent; horcap.DepthMask=DepthMaskDisable; #create azimutal grid azgridframe=vframe.addsubframe("azgrid"); for i=-8 to 8 do { a=deg2rad(10*i); crv=azgridframe.add("Curve","Size":1,"Color":color(0.2,0.4,0.2)); crv.makecircle(point(0,0,globeradius*sin(a)),vector(0,0,1),globeradius*cos(a),80); } for i=0 to 17 do { a=deg2rad(10*i); crv=azgridframe.add("Curve","Size":1,"Color":color(0.2,0.4,0.2)); crv.makecircle(point(0,0,0),vector(cos(a),sin(a),0),globeradius,80); if (i==0) or (i==9) then { crv.Size=2; crv.color=color(0.4,0.8,0.4); } } azgridframe.visible=false; #makes sure the translucent object have correct order or rendering globeframe.moveobject("Inclin",+10000); #create sun object sunpoint=globeframe.add("Sphere","Name":"Sun"); sunpoint.radius=globeradius/60; sunpoint.EnableLight=false; sunpoint.color=color(1,0.8,0); #Ecliptica plane root.SC.Universe.SolarSystem.Earth.AddSubFrame("EclipticaPlane"); AddPlane(ref(mydata),root.SC.Universe.SolarSystem.Earth.EclipticaPlane,"Ecliptica",color(1,1,0)); root.SC.Universe.SolarSystem.Earth.EclipticaPlane.visible=false; #equatorial plane root.SC.Universe.SolarSystem.Earth.Inclin.AddSubFrame("EquatorPlane"); AddPlane(ref(mydata),root.SC.Universe.SolarSystem.Earth.Inclin.EquatorPlane,"Equator",color(1,0,0)); root.SC.Universe.SolarSystem.Earth.Inclin.EquatorPlane.visible=false; #misc mydata.viewpostransitfr=1; mydata.curviewframe=0;#0=galactic pole up + standstill 1=galactic pole up + co-moving; 2=zenith up mydata.pastviewframe=-1; mydata.viewtransitfr=1; } ############################################################################################### ttf=transformation; unittf=transformation; tf2=transformation; tf3=transformation; function AdjustStarGlobe(mydata) { if mydata.viewpostransitfr<0.9999 then { mydata.viewpostransitfr=min(mydata.viewpostransitfr+0.01,1); tfr=0.5+0.5*sin((mydata.viewpostransitfr-0.5)*Pi); lo1=mydata.Viewerlongitude; lo2=mydata.PastViewerLongitude; la1=mydata.Viewerlattitude; la2=mydata.PastViewerLattitude; setviewerposition( tfr*lo1+(1-tfr)*lo2, tfr*la1+(1-tfr)*la2); } mydata.viewtransitfr=min(mydata.viewtransitfr+0.02,1); tfr=0.5+0.5*sin((mydata.viewtransitfr-0.5)*Pi); lasttimestep=incrtime; globeradius=mydata.globeradius; earthframe=root.SC.Universe.SolarSystem.Earth; viewerframe=root.SC.Universe.SolarSystem.Earth.Inclin.Globe.ViewerFrame; sunpoint=root.SC.Universe.SolarSystem.Earth.Sun; #track sun position vc=vecnorm(point(0,0,0)-earthframe.totaltransformation.origin); sunpoint.position=@point(globeradius*1.0*vc); #mechanism to co-move camera with earth if true then { ttf=earthframe.transf; corotfr=0; if mydata.curviewframe==1 then { corotfr=tfr; } if mydata.pastviewframe==1 then { corotfr=1-tfr; } if corotfr>0.001 then { tf2=root.SC.Universe.SolarSystem.Earth.Inclin.transf *root.SC.Universe.SolarSystem.Earth.Inclin.Globe.transf; ttf=ttf*weight(unittf,tf2,corotfr); } horizonfr=0; if mydata.curviewframe==2 then { horizonfr=tfr; } if mydata.pastviewframe==2 then { horizonfr=1-tfr; } if horizonfr>0.001 then { tf2=root.SC.Universe.SolarSystem.Earth.Inclin.transf *root.SC.Universe.SolarSystem.Earth.Inclin.Globe.transf *root.SC.Universe.SolarSystem.Earth.Inclin.Globe.ViewerFrame.transf; ttf=ttf*weight(unittf,tf2,horizonfr); } ttf.invert; root.viewports.main.transf=ttf; #handle corotation if false then { rotatfr=0; if mydata.curviewframe==1 then { rotatfr=mydata.viewtransitfr; } if mydata.pastviewframe==1 then { rotatfr=1-mydata.viewtransitfr; } if rotatfr>0 then {#enable corotation vp=GetViewPort; inclin=deg2rad(-23.4457889); poledir=vector(0,-1*sin(inclin),cos(inclin)); if not(root.Pauzed) then { rotang=lasttimestep*2*Pi*365/364/(24*60*60)*rotatfr; root.SC.Universe.SolarSystem.Earth.transf=root.SC.Universe.SolarSystem.Earth.transf.rotate(poledir,-1*rotang); } } } } } function StarGlobe_Corotate(mydata) { mydata.pastviewframe=mydata.curviewframe; mydata.curviewframe=1; mydata.viewtransitfr=0; } function StarGlobe_NonCorotate(mydata) { mydata.pastviewframe=mydata.curviewframe; mydata.curviewframe=0; mydata.viewtransitfr=0; } function StarGlobe_Horizon(mydata) { mydata.pastviewframe=mydata.curviewframe; mydata.curviewframe=2; mydata.viewtransitfr=0; } function StarGlobe_ChangeViewerPosition(mydata,newlongit,newlattit) { mydata.PastViewerLongitude=mydata.ViewerLongitude; mydata.PastViewerLattitude=mydata.ViewerLattitude; mydata.ViewerLongitude=newlongit; mydata.ViewerLattitude=newlattit; mydata.viewpostransitfr=0; } function GotoDate(mydata,targetdate) { oldfactor=root.TimeSpeedFactor;root.TimeSpeedFactor=0; while targetdate-root.time>24*60*60 do { root.time.AddDays(1); AdjustStarGlobe(ref(mydata)); render; render; } root.TimeSpeedFactor=oldfactor; } timespeed=2000; function StopTime() { for i=0 to 30 do { fr=i/30; root.timespeedfactor=(1-fr)*timespeed; AnimateStep; } } function StartTime() { for i=0 to 30 do { fr=i/30; root.timespeedfactor=fr*timespeed; AnimateStep; } } ############################################################################################### function AnimateStep() { AdjustStarGlobe(ref(mydata)); render; } codeblock readtextfile(ScriptDir+"\_Movie\_AnimateTools.sci"); ############################################################################################### ############################################################################################### ############################################################################################### mydata=map; mydata.globeradius=autokm(0.03); mydata.ViewerLongitude=0; mydata.ViewerLattitude=deg2rad(50); root.framerate=30; InitStarGlobe(ref(mydata)); #initialise viewing parameters vp=GetViewPort; vp.cameradir=vecnorm(vector(-0.896091437, -0.078427256, -0.436885914)); vp.camerapos=point(0,0,0)-4*mydata.globeradius*vp.cameradir; vp.cameraupdir=vector(0,0,1); vp.enableusernavigation=true; vp.NearClipPlane=0.1*mydata.globeradius; vp.FarClipPlane=20*mydata.globeradius; vp.FocalDistance=4*mydata.globeradius; root.SC.Universe.SolarSystem.Earth.EclipticaCircle.visible=false; root.SC.Universe.SolarSystem.Earth.Inclin.Globe.EquatorFrame.visible=false; #root.SC.Universe.SolarSystem.Earth.Inclin.Globe.ViewerFrame.azgrid.visible=true; root.time=time(2010,1,1,0,0,0); createvar(vc); createvar(tm); ang=0; root.TimeSpeedFactor=timespeed; #----------------------------------------------------------------------------------------- #initially, do not show the star globe root.SC.Universe.SolarSystem.Earth.shadow.visible=false; root.SC.Universe.SolarSystem.Earth.haloframe.visible=false; root.SC.Universe.SolarSystem.Earth.StarglobeFront.visible=false; root.SC.Universe.SolarSystem.Earth.StarGlobeBack.visible=false; root.SC.Universe.SolarSystem.Earth.MilkyWay.visible=false; root.SC.Universe.SolarSystem.Earth.Sun.visible=false; FadeViewportsIn; animate(1); #activate the star globe and hide the normal background root.SC.Universe.SolarSystem.Earth.shadow.visible=true; root.SC.Universe.SolarSystem.Earth.haloframe.visible=true; root.SC.Universe.SolarSystem.Earth.StarglobeFront.visible=true; root.SC.Universe.SolarSystem.Earth.StarGlobeBack.visible=true; root.SC.Universe.SolarSystem.Earth.MilkyWay.visible=true; root.SC.Universe.SolarSystem.Earth.Sun.visible=true; for i=0 to 60 do { fr=i/60; root.SC.Universe.StarBackFrame.StarBack.Color=color(1-fr,1-fr,1-fr,1); AnimateStep; } ssys_showstarback(false); animate(3); #show constellation lines root.SC.Universe.SolarSystem.Earth.StarglobeFront.LineSize=root.SC.Universe.SolarSystem.Earth.StarglobeFront.StarSize; root.SC.Universe.SolarSystem.Earth.StarGlobeBack.LineSize=root.SC.Universe.SolarSystem.Earth.StarGlobeBack.StarSize; animate(1); #Introduce ecliptica & ecliptica plane animate(2); root.SC.Universe.SolarSystem.Earth.EclipticaCircle.blinkperiod=0.4; root.SC.Universe.SolarSystem.Earth.EclipticaCircle.visible=true; animate(3); root.SC.Universe.SolarSystem.Earth.EclipticaPlane.visible=true; animate(1); root.SC.Universe.SolarSystem.Earth.EclipticaCircle.blinkperiod=0; animate(1); #introduce equator, earth axis & equator plane root.SC.Universe.SolarSystem.Earth.Inclin.Globe.EquatorFrame.blinkperiod=0.4; root.SC.Universe.SolarSystem.Earth.Inclin.Globe.EquatorFrame.visible=true; animate(1); root.SC.Universe.SolarSystem.Earth.Inclin.EquatorPlane.visible=true; animate(1); root.SC.Universe.SolarSystem.Earth.Inclin.Globe.EquatorFrame.blinkperiod=0; animate(1); #Jump to other date GotoDate(ref(mydata),time(2010,3,21)); animate(2); #Show north pole up & corotate with Earth StopTime; root.SC.Universe.SolarSystem.Earth.EclipticaPlane.visible=false; root.SC.Universe.SolarSystem.Earth.Inclin.EquatorPlane.visible=false; StarGlobe_Corotate(ref(mydata)); animate(3); StartTime; animate(10); #Show Zenith up & show horizon StarGlobe_Horizon(ref(mydata)); animate(1); root.SC.Universe.SolarSystem.Earth.Inclin.Globe.ViewerFrame.horizon.visible=true; animate(10); #Switch viewer position to equator StarGlobe_ChangeViewerPosition(ref(mydata),0,deg2rad(0)); animate(8); #Switch viewer position to southern hemispere StarGlobe_ChangeViewerPosition(ref(mydata),0,deg2rad(-50)); animate(8); #Switch viewer position to north pole StarGlobe_ChangeViewerPosition(ref(mydata),0,deg2rad(89)); animate(8); FadeViewportsOut; stop;
53d2a7c7e7b3fcf6e9b04673206b20da8bb325f4
449d555969bfd7befe906877abab098c6e63a0e8
/3020/CH18/EX18.6/ex18_6.sce
a65758400cf738688201fd46b1468b466853348c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
405
sce
ex18_6.sce
clc; clear all; ue=0.4;//electon mobility in m^2/V*s uh=0.2;//hole mobility in m^2/V*s ni=2.1e19;//intrisic carrier concentration in m^-3 e=1.6e-19;//charge of electron p=4.5e23;//density of hole sigma=ni*e*(ue+uh);//conductivity of boron disp('ohm^-1 m^-1',sigma,'conductivity of semiconductor is:') sigma1=p*e*uh; disp('ohm^-1 m^-1',sigma1,'conductivity of boron dopped semiconductor is:')
ef32ffd18f590591515d8ef3e389077a45a13fdb
449d555969bfd7befe906877abab098c6e63a0e8
/1199/CH6/EX6.4/6_4.sci
cc2d5710e881bdd8eea4eaf649ec2ba0f80a5234
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
166
sci
6_4.sci
// 6.4 clc; R=(9*10^3)+(900+90+10); Rt=100*10^3; Attenuation=R/Rt; Attenuation_factor=1/Attenuation; printf("\nAttenuation factor=%.1f ",Attenuation_factor)
43a02c81d3be78666b1d69fd080293b6da5c2343
449d555969bfd7befe906877abab098c6e63a0e8
/1427/CH19/EX19.1/19_1.sce
23d187aac6de751e6b133454de8d8424bb5ed392
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
252
sce
19_1.sce
//ques-19.1 //Calculating de Broglie wavelength of alpha particles clc E=100;//energy (in Mev) h=6.626*10^-27;//erg sec c=3*10^8;//speed of light (in m/s) w=(h*c)/(E*1.602*10^-6); printf("The wavelength of alpha particles is %.7f nm.",w*10^9);
a6519bfbe342c5de9050d8de490c4a52027a0498
a3c04dad7c659a81f513ac0f2b8bf15ea5cef322
/scilab/code_ref.sce
929872f3a0a20043a51b638999757108a6b3b7cd
[]
no_license
keckj/Projet_Spe
5f7366a63bfc6bc57e46e713fb047c5a00224265
626b795cbf8ac55725c38a866c9dc1e694dc0ea9
refs/heads/master
2021-05-28T00:38:50.649981
2014-10-15T07:03:51
2014-10-15T07:03:51
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,240
sce
code_ref.sce
// Parametres du modele d'Aliev-Paniflov a=0.2; b=0.1; kk=8.0; M1= 0.07; M2=0.3; epsilon=0.01; d=5e-5; // Definition des parametres d'execution nx = 200; // Nombre de points de discretisation dans la direction x ny = 200; // Nombre de points de discretisation dans la direction y lx = 1.0; // Taille de la boite dans la direction x ly = 1.0; // Taille de la boite dans la direction y T = 1000.0; // Temps final // Initialise les inconnues du probleme E = zeros(nx,ny); R = zeros(nx,ny); // Sauvegarde du champs entre 2 iterations du schema temporel E_prec = zeros(nx,ny); // Pas d'espace dx = lx/(nx); x = dx/2.:dx:lx; X = repmat(x,nx,1); Y = repmat(x',1,nx); // Definie une condition initiale for i = 1:nx, for j = 1:nx, if((dx*i-0.5)*(dx*i-0.5)+(dx*j-0.5)*(dx*j-0.5) < 0.005) then E(i,j) = 1.0; end end end //R(1:nx, ny/2:ny) = 1.; E_prec = E; // Contrainte pour le pas de temps rp = kk*(b+1)*(b+1)/4.; dte = (dx*dx)/(d*4+(dx*dx)*(rp+kk)); dtr = 1.0/(epsilon + (M1/M2) *rp); // Pas de temps dt = 0.95*min(dte,dtr); // Coefficient multuplicateur du schema difference finie alpha = d*dt/(dx*dx); Ex=sparse([2:nx;1:nx-1]',ones(nx-1,1)',[nx,nx]); Ax=Ex+Ex'- 2*speye(nx,nx); Ax(1,1) = -1; Ax(nx,nx) = -1; // Conditions de Neumann Ey=sparse([2:ny;1:ny-1]',ones(ny-1,1)',[ny,ny]); Ay=Ey+Ey'-2*speye(ny,ny); Ay(1,1) = -1; Ay(ny,ny) = -1; // Conditions de Neumann A=speye(nx*ny,nx*ny) + alpha*((Ay .*. speye(nx,nx))+(speye(ny,ny) .*. Ax)); C = ((Ay .*. speye(nx,nx))+(speye(ny,ny) .*. Ax))/(dx*dx); // Instant initial t = 0.; R = R(:); i = 0; k = 0; // Resolution du systeme d'equation while (t<T) //while (t<2*dt) t = t + dt; i = i+1; // Applique l'equation du champ electrique E = A*E_prec(:); // Resout les equations explicites E = E - dt*(kk*E .* (E-a) .* (E-1) + E .*R); R = R - dt*(epsilon + M1 *R ./ (E + M2)) .* (R+kk*E .* (E-b-1)); // Mise à jour du champ E_prec = E; if(modulo(i,10)==0) fprintfMat("Model2D/E_" + string(k) + ".dat", matrix(E,nx,ny), "%5.2f"); fprintfMat("Model2D/R_" + string(k) + ".dat", matrix(R,nx,ny), "%5.2f"); //if(k<10) then //fprintfMat("Model2D/E_0000" + string(k) + ".dat", matrix(E,nx,ny), "%5.2f"); //fprintfMat("Model2D/R_0000" + string(k) + ".dat", matrix(R,nx,ny), "%5.2f"); //elseif (k<100) then //fprintfMat("Model2D/E_000" + string(k) + ".dat", matrix(E,nx,ny), "%5.2f"); //fprintfMat("Model2D/R_000" + string(k) + ".dat", matrix(R,nx,ny), "%5.2f"); //elseif (k<1000) then //fprintfMat("Model2D/E_00" + string(k) + ".dat", matrix(E,nx,ny), "%5.2f"); //fprintfMat("Model2D/R_00" + string(k) + ".dat", matrix(R,nx,ny), "%5.2f"); //elseif (k<10000) then //fprintfMat("Model2D/E_0" + string(k) + ".dat", matrix(E,nx,ny), "%5.2f"); //fprintfMat("Model2D/R_0" + string(k) + ".dat", matrix(R,nx,ny), "%5.2f"); //else //fprintfMat("Model2D/E_" + string(k) + ".dat", matrix(E,nx,ny), "%5.2f"); //fprintfMat("Model2D/R_" + string(k) + ".dat", matrix(R,nx,ny), "%5.2f"); //end k = k + 1; end end //E = matrix(E,nx,ny); //R = matrix(R,nx,ny); //surf(E,'interp') //f=gcf(); //f.color_map = jetcolormap(256); //a = gca(); //a.view = "2d";
92c4abfebca04d235422991cd77425777af75446
449d555969bfd7befe906877abab098c6e63a0e8
/671/CH6/EX6.5/6_5.sce
f4ef090ee3adfe45dacd6cca29a7991f9c5b3c82
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
171
sce
6_5.sce
Vl=400 Z=16+%i*12 Vp=Vl Ip=Vp/Z pf=cos(atan(imag(Z)/real(Z))) Il=Ip*sqrt(3) P=sqrt(3)*Vl*Il*pf Q=sqrt(3)*Vl*Il*sin(acos(pf)) S=P+%i*Q disp(Ip,Il,pf,P,Q,S)
c5e7b5e1e8186b8930688dedbbd33001a1dba323
449d555969bfd7befe906877abab098c6e63a0e8
/2420/CH7/EX7.5/7_5.sce
d62a56df75356591b968c6483c4d5cc994fa5093
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
492
sce
7_5.sce
clc clear //Initialization of variables P1=200 //psia T1=500 //F P2=1 //psia alpha=20 //degrees n=3600 g=32.2 //ft/s^2 Vb=1200 //fps //calculations disp("From mollier charts,") V1=4240 //fps V1x=3980 //fps V2x=-1580 //fps work=1/32.2 *(V1x - V2x)*Vb eff=work/(V1^2 /(2*g)) *100 //results printf("\n Work done = %d ft-lb per lb of steam",work) printf("\n Blade efficiency = %.1f percent",eff) disp("The answers are a bit different due to rounding off error in textbook.")
0063a9b2f021a316697c2a3abc293125e251d0ca
449d555969bfd7befe906877abab098c6e63a0e8
/1808/CH2/EX2.24/Chapter2_Example24.sce
e93581ce129eced64382e8338871a860a0b92e31
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
496
sce
Chapter2_Example24.sce
clc clear //INPUT DATA //CH2+(3/2) (O2+3.773 N2)= CO2+H2O+5.66N2 ;//STOICHIOMETRIC EQUATION dU=-43.2;//Internal energy in MJ/kg //CALCULATIONS dH=dU+(7.66-7.16)*8.3143*10^-3*298/14;//ENTHALPY CHANGE Hp=-((1*-393.52)+(-241.8))/(221.4);//enthalpy of products per kg of mixture Hr=Hp-((-43.1*14)/(221.4));//Enthalpy of reactants per kg of mixture //OUTPUT printf('enthalpy of products per kg of mixture %3.2f MJ/kg \n enthalpy of reactants per kg of mixture %3.2f MJ/kg',Hp,Hr)
e6d6380f8f3b8266a0da6ce9b03fb3105dbb9a2e
449d555969bfd7befe906877abab098c6e63a0e8
/800/DEPENDENCIES/4_2.sci
21264c18cc04d30745623cb3a3572fdb06da49eb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
83
sci
4_2.sci
k = 0.311; // min^-1; FC= 6.137; //lb.mol/min X = 0.8; CA01= 1; //mol/dm^3
541b4261f02a748c2b9502a2dd5e247affa67038
1d11f934166ef07b2b6d4c49e29bcc8c23f94222
/tutorial-3-code/tutorial-3_exp1.sce
1f679bd6172c7e893b5e19f441d85075ff1c13e5
[]
no_license
svozkan/Scilab-Tut
014e097a3e8a5c8c0436b19cc7da677efb6db82d
8d91e9dec45e2d2314ef4a6ad452105f942c919b
refs/heads/master
2020-03-21T01:34:18.418286
2018-06-20T00:53:16
2018-06-20T00:53:16
137,948,805
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,034
sce
tutorial-3_exp1.sce
// This Code has been written by Salih Volkan ÖZKAN for Scilab Tutorials // Take the inputs from user function x1 = SRK4(dt,time,x1,force,mass,k,b) k1 = ODES(time,x1,force,mass,k,b) dt2 = 0.5*dt x1_temp = x1 + dt2*k1 k2 = ODES(time+dt2,x1_temp,force,mass,k,b) x1_temp = x1 + dt2*k2 k3 = ODES(time+dt2,x1_temp,force,mass,k,b) x1_temp = x1 + dt*k3 k4 = ODES(time+dt,x1_temp,force,mass,k,b) for n = 1:2 phi = (k1(n) + 2*(k2(n)+k3(n))+ k4(n))/6 x1(n) = x1(n) + dt*phi end endfunction function k1 = ODES(time,x1,force,mass,k,b) k1(1) = x1(2) k1(2) = force/mass-b/mass*x1(2)-k/mass*x1(1) endfunction dt = input('Step Time : ') tmax = input('Final Time : ') // Set Initial Conditions time = 0; x1 = [0;0] force = 1; mass = 1; k = 1; b = 0.2; // Solution Loop i = 1; while (time < tmax) x1 = SRK4(dt,time,x1,force,mass,k,b) y = [1 0]*x1; x11(i) = y time1(i) = time; i = i + 1; time = time + dt end plot2d(time1,x11)
918e42d9502d72d0cf20ad2079b4f027458af8f0
a4310fc3952e1a419805f126819a6dc4684ba632
/tests/test_meta_1_a.tst
b129ae45754a98ee83de2cab59c603b48eb6f27d
[ "MIT" ]
permissive
crowetic/ciyam
c88b639fc605879aa1676bc5c768786070b0d6d8
f0982926b1063c589289daded5f144810c70e49c
refs/heads/master
2023-07-12T11:58:00.986885
2023-06-28T02:47:31
2023-06-28T02:47:31
73,009,891
0
0
null
2016-11-06T18:20:06
2016-11-06T18:20:06
null
UTF-8
Scilab
false
false
6,629
tst
test_meta_1_a.tst
storage_init ciyam session_variable @attached_file_path . pc guest 20120102 100 105100 guest_model "105101=Sample,300500=guests,105102=0.1,105103=2012,105104=M001,105112=0,105118=0" guest_model pf 100 105100 guest_model "105101,105102,105103,105104,105105,105106,105107,105108,105109,105110,105111,105112,105113,105114,105118" [guest_model =1.0 768 100:105100] Sample,0.1,2012,M001,M001C100,M001S1000,M001L100,M001V100,,,,2,0,,0 pc guest 20120102 100 136100 guest_standard "136101=Standard,136107=Standard,302810=Standard,302800=guest_model" guest_standard pe guest 20120102 100 136100 "-v=@async=false,@message=Installing Standard Package..." guest_standard =1.0 -136410 pc guest 20120102 100 136100 guest_user "136101=User,136107=User,302810=User,302800=guest_model" guest_user pe guest 20120102 100 136100 "-v=@async=false,@message=Installing User Package..." guest_user =1.0 -136410 pf 100 106100 "106104 " 106101,106102,106104 -min System_Blockchain,System_Blockchain,M001C100 User,User,M001C101 Peerchain_Cache,Peerchain_Caches,M001C102 Peerchain_Cache_Item,Peerchain_Cache_Items,M001C103 Peerchain_Base,Peerchain_Bases,M001C104 pf 100 107100 "107110 " 107101,107110 -min Name,M001C100F100 Restore_In_Progress,M001C100F101 Restore_Needed,M001C100F102 Shared_Checksum,M001C100F103 Status,M001C100F104 Synchronisation_Status,M001C100F105 Sync_Status_Has_Ellipsis,M001C100F106 Synchronisation,M001C100F107 Vendor,M001C100F108 Identity,M001C100F109 Message,M001C100F110 Actions,M001C100F111 Backup,M001C100F112 Backup_Checksum,M001C100F113 Backup_Details,M001C100F114 Backup_In_Progress,M001C100F115 Backup_Needed,M001C100F116 Combined_Checksum,M001C100F117 Blockchain_Hashes,M001C100F118 Check_Is_Connected,M001C100F119 Check_Is_Connecting,M001C100F120 Check_Is_Waiting,M001C100F121 Check_Is_Disconnecting,M001C100F122 Dummy_0,M001C100F123 Dummy_1,M001C100F124 Dummy_Connected,M001C100F125 Dummy_Connecting,M001C100F126 Dummy_Disconnecting,M001C100F127 Dummy_Hash,M001C100F128 Dummy_Tilda,M001C100F129 Dummy_Waiting,M001C100F130 Ellipsis,M001C100F131 Error,M001C100F132 Hash_Prefixed_Identity,M001C100F133 Hub_Checksum,M001C100F134 Initial_Backup_Hash,M001C100F135 Initial_Hub_Hash,M001C100F136 Initial_Shared_Hash,M001C100F137 Tilda_Prefixed_Identity,M001C100F138 Dummy_Self,M001C101F100 User_Id,M001C101F101 User_Id_or_Name,M001C101F102 User_Name,M001C101F103 User_Password_Change,M001C101F104 Actions,M001C101F105 Active,M001C101F106 Change_Password_Time,M001C101F107 Unique,M001C101F108 Unix_Timestamp,M001C101F109 User_Hash,M001C101F110 Password,M001C101F111 Password_Change_After,M001C101F112 Password_Hash,M001C101F113 Class_Id,M001C101F114 Created_On,M001C101F115 Description,M001C101F116 Email,M001C101F117 Email_Failure,M001C101F118 Email_Address,M001C101F119 Has_Password,M001C101F120 Hide_Email_Address,M001C101F121 Is_In_Restore,M001C101F122 Not_Is_In_Restore,M001C101F123 Permissions,M001C101F124 Reset_Password,M001C101F125 Rescue_Password,M001C101F126 Is_Self_Or_Admin,M001C101F127 Key,M001C101F128 Must_Change_Password,M001C101F129 No_Email,M001C101F130 Read_Access_Only,M001C101F131 Owner,M001C102F100 Actions,M001C102F101 Active,M001C102F102 Backup_Identity,M001C102F103 Channel_Information,M001C102F104 Closed,M001C102F105 All_Cache_Items,M001C102F106 Closing,M001C102F107 Identity,M001C102F108 Opened,M001C102F109 Opening,M001C102F110 Description,M001C102F111 Disconnecting,M001C102F112 Disconnecting_Chain_Id,M001C102F113 Dummy_1,M001C102F114 Dummy_Tilda,M001C102F115 Error,M001C102F116 Files_To_Send,M001C102F117 Height_Fetched,M001C102F118 Height_Received,M001C102F119 Host_And_Port_Info,M001C102F120 Files_Received,M001C102F121 Host_Name,M001C102F122 Hub_Identity,M001C102F123 Peerchain_Type,M001C102F124 Port_Number,M001C102F125 Receive_Chain_Id,M001C102F126 Receive_Checksum,M001C102F127 Receive_Initial_Block_Hash,M001C102F128 Receive_Synchronising,M001C102F129 Shared_Identity,M001C102F130 Shared_Secret,M001C102F131 Status,M001C102F132 Submit_Chain_Id,M001C102F133 Submit_Checksum,M001C102F134 Connect_Info_1,M001C102F135 Connect_Info_2,M001C102F136 Connect_Information,M001C102F137 Connected,M001C102F138 Connecting,M001C102F139 Connection_Busy,M001C102F140 Connected_Or_Busy,M001C102F141 Submit_Initial_Block_Hash,M001C102F142 Submit_Synchronising,M001C102F143 Synchronising,M001C102F144 User_Id,M001C102F145 Peerchain_Cache,M001C103F100 Original_Name,M001C103F101 Submitting,M001C103F102 Item_Name,M001C103F103 Item_Size_Info,M001C103F104 Name_And_Size,M001C103F105 Opened_Directory,M001C103F106 Identity_Directory,M001C103F107 Identity_Path,M001C103F108 A0,M001C103F109 A1,M001C103F110 A2,M001C103F111 Change,M001C103F112 Folder,M001C103F113 Actions,M001C104F100 Active,M001C104F101 Blockchain_Checksum,M001C104F102 Blockchain_Hashes,M001C104F103 Chain_Id,M001C104F104 Import_Needed,M001C104F105 Shared_Details,M001C104F106 Importing_For_Chain_Id,M001C104F107 Description,M001C104F108 Dummy_1,M001C104F109 Error,M001C104F110 Export_In_Progress,M001C104F111 Export_Needed,M001C104F112 Exporting_For_Chain_Id,M001C104F113 Initial_Backup_Hash,M001C104F114 Initial_Hub_Hash,M001C104F115 Initial_Shared_Hash,M001C104F116 Host_Name,M001C104F117 Hub_Checksum,M001C104F118 Identity,M001C104F119 Peerchain_Type,M001C104F120 Port_Number,M001C104F121 Shared_Secret,M001C104F122 Connection_Type,M001C104F123 Status,M001C104F124 Synchronisation,M001C104F125 System_Secret,M001C104F126 pf 100 103100 "103104 " 103101,103104 -min primitive,E000 primitive,E000 Blockchain_Status,E100 Currency,E101 Day_Type,E102 Customary_Event,E103 Month,E104 Day_Of_Month,E105 Day_Number,E106 Day_Set,E107 Date_Cycle,E108 Day_Of_Week,E109 Minutes,E110 Occurrence,E111 Orientation,E112 Peerchain_Connection,E113 Peerchain_Type,E114 Peerchain_Status,E115 Cache_Status,E116 Change_Password_Seconds,E117 Change_Type,E118 pf 100 102100 "102111 " 102101,102111 -min string,T000 string,T000 datetime,T001 datetime,T001 date,T002 date,T002 time,T003 time,T003 numeric,T004 numeric,T004 int,T005 int,T005 bool,T006 bool,T006 foreign_key,T007 foreign_key,T007 bytes,T100 str001,T101 str002,T102 str003,T103 str004,T104 str005,T105 str010,T106 str015,T107 str020,T108 str025,T109 str030,T110 str040,T111 str050,T112 str060,T113 str080,T114 str100,T115 str125,T116 str150,T117 str200,T118 year,T119 duration,T120 filename,T121 0..10,T122 1..10,T123 0..100,T124 1..100,T125 0..1000,T126 1..1000,T127 0..10000,T128 1..10000,T129 0..100000,T130 1..100000,T131 std_date,T132 std_time,T133 std_datetime,T134 std_timestamp,T135 std_numeric,T136 std_percentage,T137 std_money,T138 std_money_amount,T139 std_crypto,T140 std_crypto_amount,T141
d3b7878719279fd3aa0896cb469ec163a02fa5a8
449d555969bfd7befe906877abab098c6e63a0e8
/1061/CH2/EX2.15/Ex2_15.sce
eeca7fb38a624f8abd8c609f6b73b9bacac0aa98
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
468
sce
Ex2_15.sce
//Ex:2.15 clc; clear; close; n1=1.50;// core refractive index n2=1.45;// cladding refractive index x_c=(asin(n2/n1))*180/%pi;// critical angle in degree n_m=sqrt(n1^2-n2^2);// numerical aperture x_a=(asin(n_m))*180/%pi;// acceptance angle in degree n_c=(n_m)^2*100;// percentage of light printf("critical angle=%f degree",x_c); printf("\n acceptance angle=%f degree",x_a); printf("\n numerical aperture=%f",n_m); printf("\n percentage of light=%f%%",n_c);
7c69d2e4ea80e6cd2d2b58f489b3d6d0b49327bd
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/rcosdesign/rcosdesign8.sce
cbc80a2b34441a18e735268450149f02b18c83ea
[]
no_license
deecube/fosseetesting
ce66f691121021fa2f3474497397cded9d57658c
e353f1c03b0c0ef43abf44873e5e477b6adb6c7e
refs/heads/master
2021-01-20T11:34:43.535019
2016-09-27T05:12:48
2016-09-27T05:12:48
59,456,386
0
0
null
null
null
null
UTF-8
Scilab
false
false
246
sce
rcosdesign8.sce
//check o/p when i/p arg beta is greater than 1 beta=3; span=6; sps=4; h=rcosdesign(beta,span,sps); //output //!--error 10000 //roll-off factor should be <= 1 //at line 21 of function rcosdesign called by : //h=rcosdesign(beta,span,sps);
147511243a27043909c532aca3ec10fcc0180f8f
449d555969bfd7befe906877abab098c6e63a0e8
/1364/CH14/EX14.3.5/14_3_5.sce
fdb12bcbb10140518a151adc2941ad4799e3c100
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
283
sce
14_3_5.sce
clc //initialisation of variables w= 62.3 //lbf/ft^3 Q= 195 //gal n= 0.71 //t^3 Ht= 25 //ft Q1= 325 //gal Ht1= 31.5 //ft //CALCULATIONS P= w*Q*Ht/(n*6.23*33000) Ps= w*Q1*Ht1/(n*6.23*33000) //RESULTS printf (' pressure= %.2f h.p',P) printf (' \n pressure= %.2f h.p',Ps)
2cbffc20f7d7e195fa0ba23cda304d0a4243badd
449d555969bfd7befe906877abab098c6e63a0e8
/858/CH7/EX7.12/example_12.sce
1cc918120a399e5584de7c5e516cbd2715b28b41
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
370
sce
example_12.sce
clc clear printf("example 7.11 page number 316\n\n") //to find the initial conc of A and B Cp = 0.02; Cq = 0.02; K = 4*10^-2; Cb = 0.05; Cb_i = Cb+Cp; a = (Cp*Cq)/(K*Cb); funcprot(0) function[f] = F(x,a) f = x-0.02-a; endfunction //initial guess x = 10; y = fsolve(x,F); printf("conc of A= %f mol/l",y) printf("\n\nconc of B= %f mol/l",Cb_i)
913432190b89194882d78f1327a41a843eaa4d65
8781912fe931b72e88f06cb03f2a6e1e617f37fe
/scilab/ofemdemo/demo_static.sce
0f503b863e287e3022988762bcbeeb76af836082
[]
no_license
mikeg2105/matlab-old
fe216267968984e9fb0a0bdc4b9ab5a7dd6e306e
eac168097f9060b4787ee17e3a97f2099f8182c1
refs/heads/master
2021-05-01T07:58:19.274277
2018-02-11T22:09:18
2018-02-11T22:09:18
121,167,118
1
0
null
null
null
null
UTF-8
Scilab
false
false
3,325
sce
demo_static.sce
//=========================================================// // DEMO_STATIC // //=========================================================// fegui(); //---------------------------------------------------------// // 1. Geometry declaration with femesh // // See section 3.1.2 of the tutorial // //---------------------------------------------------------// FEnode=[1 0 0 0 -.5 -.5 0;2 0 0 0 -.5+1/6 -.5 0;3 0 0 0 -.5 .5-1/6 0 4 0 0 0 -.5+1/6 .5-1/6 0;5 0 0 0 -.5 .5 0;6 0 0 0 -.5+1/6 .5 0 7 0 0 0 .5-1/6 .5 0;8 0 0 0 .5 .5 0;9 0 0 0 .5-1/6 .5-1/6 0 10 0 0 0 .5 .5-1/6 0;11 0 0 0 .5-1/6 -.5 0;12 0 0 0 .5 -.5 0]; FEelt = [%inf abs('quad4');4 6 5 3 1 1;9 10 8 7 1 1]; FEel0 = [%inf abs('quad4');1 2 4 3 1 1]; femesh(';divide 5 1;addsel;'); FEel0 = [%inf abs('quad4');11 12 10 9 1 1]; femesh(';divide 5 1;addsel;'); FEel0 = [%inf abs('quad4');4 6 7 9 1 1]; femesh(';divide 4 1;addsel;'); femesh('join group 1:4'); femesh(';selgroup1;extrude 10 0 0 .25;'); FEelt = FEel0; FEel0 = []; FEelt(2:size(FEelt,1),1:8)=FEelt(2:size(FEelt,1),[5:8 1:4]); model = femesh('model'); //---------------------------------------------------------// // 2. Handling material properties // // See section 3.1.4 of the tutorial // //---------------------------------------------------------// model.pl = [1 1 2e11 .30 7800 (190e9/2/(1+.29))]; //---------------------------------------------------------// // 3. Boundary conditions and constraints // // See section 3.2.1 of the tutorial // //---------------------------------------------------------// model = fe_case(model,'fixdof','base','z==0'); //---------------------------------------------------------// // 4. Assembly // // See section 3.3.1 of the tutorial // //---------------------------------------------------------// model = fe_mk(model); model.DOF = model.Stack(3).entries.DOF; //---------------------------------------------------------// // 5. Loads // // See section 3.2.2 of the tutorial // //---------------------------------------------------------// data=struct('sel','x==-.5', ... 'eltsel','withnode {z>1.25}','def',1,'DOF',.19); Case1=struct('Stack',makecell([1 1],makecell([1 3],'Fsurf','Surface load',data))); Load = fe_load(model,Case1); //---------------------------------------------------------// // 6. Static response // // See section 3.3.2 of the tutorial // //---------------------------------------------------------// def = struct('def',[],'DOF',model.DOF); kd = ofact(model.K(2).entries); // use the factor object for large matrices def.def = kd\Load.def; ofact('clear',kd); // Clear the factor when done Stress = fe_stres('stress mises',model,def); //---------------------------------------------------------// // 7. Visualization of deformed structure // // See section 3.4 of the tutorial // //---------------------------------------------------------// medit('write visu/def',model,def,Stress,[1 1e8]);
982d2ce865290f984965da746ce978c617c83b1d
449d555969bfd7befe906877abab098c6e63a0e8
/1955/CH6/EX6.2/example2.sce
b7902dc9d4bdeb5135ad73190de071d854ccef0c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
3,090
sce
example2.sce
clc clear //input data P0=4//Overall stage pressure ratio T00=557//Temperature at entry in K P3=1//Diffuser exit pressure in bar m=6.5//Mass flow rate of air in kg/s ps1=0.3//Flow coefficient N=18000//Speed of the turbine in rpm Dt=0.42//Rotor tip diameter in m D2m=0.21//Mean diameter at rotor exit in m R=287//The universal gas constant in J/kg.K Cp=1.005//The specific heat of air at constant pressure in kJ/kg.K r=1.4//The ratio of specific heats of air //calculations U1=(3.1415*Dt*N)/60//Peripheral velocity of impeller at inlet in m/s Cr1=ps1*U1//The radial velocity at inlet in m/s a11=atand(Cr1/U1)//The nozzle exit air angle in degree W=m*U1^2*10^-3//Power developed by turbine in kW dT=(1/P0)^((r-1)/r)//The total isentropic temperature ratio in entire process T3s=dT*T00//The final isentropic temperature at exit in K dh2=W/m//The absolute enthalpy change in the first two stages in kJ/kg ns=dh2/(Cp*(T00-T3s))//The stage efficiency of the turbine T02=T00-(W/(m*Cp))//The absolute temperature at the entry of second stage in K T03=T02//The absolute temperature at exit of second stage in K dH=Cp*(T02-T3s)//The total enthalpy loss in kJ/kg dHn=dH/2//The enthalpy loss in the nozzle in kJ/kg C1=Cr1/sind(a11)//Absolute velocity at the inlet in m/s dH0=((C1^2)/(2000*Cp))+(dHn)//The isentropic absolute enthalpy loss in nozzle in kJ/kg dT0=dH0/Cp//The isentropic absolute temperature loss in nozzle in K T1s=T00-dT0//The isentropic temperature at the entry in K P1=P0*(T1s/T00)^(r/(r-1))//The pressure at the entry of turbine in bar T1=T00-((C1^2)/(2000*Cp))//The temperature at the entry of turbine in K d1=(P1*10^5)/(R*T1)//The density of the air at inlet in kg/m^3 b1=m/(d1*Cr1*3.141*Dt)//The width of the rotor at inlet in m C2=Cr1//The avsolute velocity at the second stage entry in m/s T2=T02-((C2^2)/(2000*Cp))//The temperature at the second stage entry in K P23=(T2/T03)^(r/(r-1))//The pressure ratio at the second stage P2=P23*P3//The pressure at the second stage in bar d2=(P2*10^5)/(R*T2)//The density of the air at second stage in kg/m^3 C2=Cr1//The absolute velocity at the second stage in m/s A2=m/(d2*C2)//The area of cross section at the second stage in m^2 h2=(A2/(3.14*D2m))//The rotor blade height at the exit in m M1=C1/(r*R*T1)^(1/2)//The mach number at the nozzle U2=(3.14*D2m*N)/60//The Peripheral velocity of impeller at exit in m/s M2r=(((C2^2)+(U2^2))^(1/2))/(r*R*T2)^(1/2)//The mach number at the rotor exit Ln=(dHn*10^3)/((C1^2)/2)//The nozzle loss coefficient Lr=(dHn*10^3)/(((((C2^2)+(U2^2))^(1/2))^2)/2)//The rotor loss coefficient //output printf('(a)The nozzle exit air angle is %3.2f degree\n(b)The power developed is %3.1f kW\n(c)The stage efficiency is %3.4f \n(d)The rotor width at the entry is %3.5f m\n(e)The rotor blade height at the exit is %3.4f m\n(f)\n (1)The mach number at the nozzle exit is %3.4f\n (2)The mach number at the rotor exit is %3.2f\n(g)\n (1)The nozzle loss coefficient is %3.4f\n (2)The rotor loss coefficient is %3.3f',a11,W,ns,b1,h2,M1,M2r,Ln,Lr)
b423e358f062ef4a0208cb1bb94eb5b997af543b
449d555969bfd7befe906877abab098c6e63a0e8
/3673/CH3/EX3.a.23/Example_a_3_23.sce
1b37d6946ffffb72d7c4fd9455f312dd28f26d7c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
161
sce
Example_a_3_23.sce
//Example_a_3_23 page no:151 clc; R=2; Vi=-1; Voc=-4*Vi; Isc=10; Rth=Voc/Isc; i2=Voc/(Rth+R); disp(i2,"the current throught 2 ohm resistor is (in A)");
7b2695ac5e043693a559dc4cc64d5987765ed1d9
45e046b9cab35a22858077ef405f8c8b8125a87f
/Assignment-1/Questn-5/strassen_algorithm.sci
37ac88eb1d6354df345b3e8c7b7a0a593539fb90
[]
no_license
shilpasunil/AP-laboratory
4a67e510a05e5ce48f200ee73183627a12a19d55
87d55510d6f3c4a80ce1779e9b39430ee20e69b2
refs/heads/main
2023-02-09T16:13:34.048845
2021-01-07T04:43:35
2021-01-07T04:43:35
327,504,813
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,121
sci
strassen_algorithm.sci
function[cmp]=strassen_algorithm(A,B,C,n) if n == 1 then cmp=1; return; else n = n/2; a11 = zeros(n,n); a12 = zeros(n,n); a21 = zeros(n,n); a22 = zeros(n,n); b11 = zeros(n,n); b12 = zeros(n,n); b21 = zeros(n,n); b22 = zeros(n,n); p= zeros(n,n); q= zeros(n,n); r= zeros(n,n); s= zeros(n,n); t= zeros(n,n); u= zeros(n,n); v= zeros(n,n); c11 = zeros(n,n); c12 = zeros(n,n); c21 = zeros(n,n); c22 = zeros(n,n); ares = zeros(n,n); bres = zeros(n,n); end for i=1:n for j=1:n a11(i,j) = A(i,j); a12(i,j) = A(i,j + n); a21(i,j) = A(i + n,j); a22(i,j) = A(i + n,j + n); b11(i,j) = B(i,j); b12(i,j) = B(i,j + n); b21(i,j) = B(i + n,j); b22(i,j) = B(i + n,j + n); end end cmpa1 = add(a11,a22,ares,n); c= add(b11,b22,bres,n); cmpm1 = strassen_algorithm(ares,bres,p,n); cmpa2 = add(a21,a22,ares,n); cmpm2 = strassen_algorithm(ares,b11,q,n); cmpb1 = sub(b12,b22,bres,n); cmpm3 = strassen_algorithm(a11,bres,r,n); cmpb2 = sub(b21,b11,bres,n); cmpm4 = strassen_algorithm(a22,bres,s,n); cmpa3 = add(a11,a12,ares,n); cmpm5 = strassen_algorithm(ares,b22,t,n); cmpb3 = sub(a21,a11,ares,n); cmpa4 = add(b11,b12,bres,n); cmpm6 = strassen_algorithm(ares,bres,u,n); cmpb4 = sub(a12,a22,ares,n); cmpa5 = add(b21,b22,bres,n); cmpm7 = strassen_algorithm(ares,bres,v,n); cmpa=cmpa1+cmpa2+cmpa3+cmpa4+cmpa5+c; cmpb = cmpb1+cmpb2+cmpb3+cmpb4; cmpm = cmpm1+cmpm2+cmpm3+cmpm4+cmpm5+cmpm6+cmpm7; cmp=cmpa+cmpm+cmpb; endfunction
b4dbe72398dbb2a225f862401c04b88120f76656
449d555969bfd7befe906877abab098c6e63a0e8
/3772/CH3/EX3.2/Ex3_2.sce
4af30412eb2e03b6fe5d46a8797cce1810402668
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
464
sce
Ex3_2.sce
// Problem 3.2,Page no.54 clc;clear; close; //D=(D_0-2) //cm //Inside Diameter of cyclinder //A=(%pi*(D_0-1)) //cm**2 //Area of cross-section //L=(%pi*(D_0-1)*5400) //N //Crushing load for column F=6 //Factor of safety T=1 //cm //wall thickness of cyclinder //S=L*F**-1 //After Simplifying,we get S=600*10**3 //Calculations D_0=(S*F)*(%pi*54000)**-1+1 //cm //Outside diameter of cyclinder //Result printf("The outside Diameter of cyclinder is %.2f cm",D_0)
89d8fb1cddcff922c3d5a992538bf75350948207
449d555969bfd7befe906877abab098c6e63a0e8
/1271/CH20/EX20.9/example20_9.sce
d1c57b88ee050afc674edd9c4a01941be50aef20
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
315
sce
example20_9.sce
clc // Given that V = 50e3 // voltage in V i = 1e-3 // current in amp e = 1.6e-19 // charge on an electron in C // Sample Problem 9 on page no. 20.9 printf("\n # PROBLEM 9 # \n") printf("Standard formula used \n ") printf("I = ne \n") n = i / e printf("\n Number of electrons striking the anode per sec is %e.",n)
79d6c24b0fb0e0fd466b0da07b005dc55429f979
449d555969bfd7befe906877abab098c6e63a0e8
/896/CH7/EX7.7/7.sce
869e432e8bb546674a0738f11927ff73051ef746
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
458
sce
7.sce
clc //Example 7.7 //Calculate the support forces in x and y direction in a 90 degree bend tube p1=200//KPa A=0.1//m^2 m=500//Kg/s rho=998.2//Kg/m^3 q=m/rho//m^3/s v=q/A//m/s Vx_initial=v//m/s Vx_final=0//m/s Vy_initial=0//m/s Vy_final=-v//m/s Fx=m*(Vx_final-Vx_initial)-p1*1000*A//N printf("The support force in the x direction is %f N\n",Fx); Fy=m*(Vy_final-Vy_initial)-p1*1000*A//N printf("The support force in the y direction is %f N",Fy);
34d38bb18d9d19cee1df1beefa6ca30b19e95e50
cccbd1095e2f872b44c9f2cf3aaea40ce3b94a77
/SWaD/Swad.sce
fc17d3b9c87bd18512135384ceb114d463cf4006
[]
no_license
Robstei/work
ca8a70dba742f520f16e0d7688fa448c79d7c2c5
0c7e3bedc1d66db3148de57f13d406d787b756df
refs/heads/master
2021-07-16T17:37:10.588912
2020-05-17T19:51:43
2020-05-17T19:51:43
152,545,932
0
0
null
null
null
null
UTF-8
Scilab
false
false
31,719
sce
Swad.sce
response_matching = simple_matching; scenario = "Messung von Wechselkosten zwischen geteilter und selektiver Aufmerksamkeit"; default_font = "Apercu Mono"; active_buttons = 3; event_code_delimiter = ";"; stimulus_properties = configuration, number, runid, string, blockid, string, form, string, character, string, seperateAttention, number, target, number; response_logging = log_active; begin; array { text{caption = "D"; font_size= 50;}; text{caption = "M"; font_size= 50;}; text{caption = "X"; font_size= 50;}; text{caption = "A"; font_size= 50;}; text{caption = "T"; font_size= 50;}; text{caption = "E"; font_size= 50;}; }letters; array { text{caption = "2"; font_size= 50;}; text{caption = "3"; font_size= 50;}; text{caption = "4"; font_size= 50;}; text{caption = "5"; font_size= 50;}; text{caption = "7"; font_size= 50;}; text{caption = "9"; font_size= 50;}; }numbers; array { picture { description = "Raute"; line_graphic { coordinates = 0, 300, 200, 0, 0, -300, -200, 0, 0, 300, 200, 0; line_width = 15; }; x = 0; y = 0; polygon_graphic { height = 0; width = 0; sides = 3; fill_color = 0,0,0,255; }; x = 0; y = 0; text{caption = " "; font_size= 50;}; x = 0;y = 0; } main_picture_diamand; picture { description = "Quadrat"; box {width= 600; height= 600; color = 255,255,255;}; x=0;y=0; box {width= 570; height=570; color = 0,0,0;}; x=0;y=0; text{caption = " "; font_size= 50;}; x=0;y=0; } main_picture_box; picture { description = "Kreis"; ellipse_graphic { height = 600; width = 600; ellipse_height = 600; ellipse_width= 600; color = 255,255,255,255; }; x=0;y=0; ellipse_graphic { height = 600; width = 600; ellipse_height = 570; ellipse_width= 570; color = 0,0,0,255; }; x=0;y=0; text{caption = " "; font_size= 50;}; x=0;y=0; } main_picture_circle; picture { description = "Dreieck"; polygon_graphic { height = 750; width = 700; sides = 3; line_width = 15; line_color = 255,255,255,255; radius = 350; }; x = 0; y = -50; polygon_graphic { height = 0; width = 0; sides = 3; fill_color = 0,0,0,255; }; x = 0; y = 0; text{caption = " "; font_size= 50;}; x=0;y=0; } main_picture_triangle; picture { description = "Stern"; line_graphic { coordinates = 0, 300, 67, 93, 285, 93, 109, -35, 176, -243, 0, -115, -176, -243, -109, -35, -285, 93, -67, 93, 0, 300, 67, 93; line_width = 15; }; x = 0; y = 0; polygon_graphic { height = 0; width = 0; sides = 3; fill_color = 0,0,0,255; }; x = 0; y = 0; text{caption = " "; font_size= 50;}; x=0;y=0; } main_picture_star; picture { description = "Achteck"; polygon_graphic { sides = 8; radius = 300; line_width = 15; join_type = join_flat; height = 650; width = 650; }; x = 0; y = 0; polygon_graphic { height = 0; width = 0; sides = 3; fill_color = 0,0,0,255; }; x = 0; y = 0; text{caption = " "; font_size= 50;}; x = 0;y = 0; } main_picture_octagon; } form_array; trial { trial_duration = EXPARAM("Time Response Active" : 1800); trial_type = first_response; stimulus_event{ picture {} main_picture; duration = EXPARAM("Time Stimulus" : 250); }stim_event; } trial_main; trial { picture { text { caption="+"; font_size=50; }; x=0; y=0; }cross; } trial_cross; trial { trial_duration = EXPARAM("Time Feedback" : 2000); picture { text { caption = " "; font_size = 24; max_text_width = 600;} text_feedback; x=0; y=0; } feedback_pic; } trial_feedback; trial { trial_duration = forever; trial_type = first_response; all_responses = false; picture { text { caption = " "; font_size = 25; max_text_width = 1200;} text_introduction; x=0;y=0; } picture_information; stimulus_time_in = 1000; response_active= true; } trial_information; trial { trial_duration = forever; trial_type = first_response; all_responses = false; picture { text { caption = " "; font_size = 30;} text_instruction; x=0; y=0; } instruction_pic; stimulus_time_in = 1500; response_active= true; } trial_instruction; trial { trial_duration = 120000; picture { text {caption = "Pause. \nIn 2 Minuten geht es weiter."; font_size = 25;} pause_text; x=0; y=0; }; } trial_pause; ################################PCL############################################## begin_pcl; int CHAR = 1; int FORM = 2; array <int> ISI_values [] = {500, 700, 900, 1100, 1300, 1500, 1700, 1900, 2100, 2300}; int configuration = parameter_manager.get_int("Configuration Parameter"); int non_targets = parameter_manager.get_int("Non Targets at Start of each Block"); sub pause_seconds (int time_in_seconds) begin trial_pause.set_duration(time_in_seconds *1000); pause_text.set_caption("Pause \nIn " + string(time_in_seconds) + " Sekunden geht es weiter", true); trial_pause.present(); end; sub pause_minutes (int time_in_minutes) begin trial_pause.set_duration(time_in_minutes *60000); pause_text.set_caption("Pause \nIn " + string(time_in_minutes) + " Minuten geht es weiter", true); trial_pause.present(); end; sub present_information (string information, int font_size) begin text_introduction.set_font_size(font_size); text_introduction.set_caption(information, true); trial_information.present(); end; string information_start = "Im Folgenden werden Ihnen auf dem Bildschirm unterschiedliche Zahlen und Formen " + "präsentiert. Vor jedem Durchlauf erhalten Sie eine kurze Instruktion, auf welche Zahlen " + "und/oder Formen Sie reagieren sollen. Die Reaktion erfolgt mit den Tasten " + "\"L\" und \"S\". Reagieren Sie so schnell und so richtig wie möglich. \n\n Zunächst " + "folgt ein Testdurchlauf. \n\n Drücken Sie die Leertaste, um fortzufahren."; string information_test = "Dies ist ein Testdurchlauf. \n\n Weiter mit Leertaste."; string information_first_run = "Der Testdurchlauf ist vorbei.\n\n" + "Im Folgenden wird Ihnen kein Feedback mehr präsentiert.\n\n" + "Der erste Durchgang beginnt.\n" + "Weiter mit Leertaste."; string information_second_run = "Der zweite Durchgang beginnt.\n" + "Weiter mit Leertaste."; string information_third_run = "Der dritte Durchgang beginnt.\n" + "Weiter mit Leertaste."; string information_end = "Bitte wenden Sie sich an den Versuchsleiter."; sub set_response_mode (int mode) begin if mode == 1 then response_manager.set_button_active(1, false); response_manager.set_button_active(2, false); response_manager.set_button_active(3, true); elseif mode == 2 then response_manager.set_button_active(1, true); response_manager.set_button_active(2, true); response_manager.set_button_active(3, false); end; end; # returns true if # 1. successive stimuli are never identical # 2. first "Non Targets at Start of each Block" (parameter) are non targets # 3. successive stimuli are never targets sub bool validade (array<int,2> list_to_test, int seperate_attention, int form_target_index, int char_target_index, array<text,1> char_array) begin loop int i = 1 until i == list_to_test.count() begin if list_to_test[i] == list_to_test[i+1] then return false; end; i = i + 1; end; loop int i = 1 until i > non_targets begin if seperate_attention == 1 then if char_array[list_to_test[i][CHAR]].caption() == char_array[char_target_index].caption() then return false; end; elseif seperate_attention == 2 then if list_to_test[i][FORM] == form_target_index then return false; end; elseif seperate_attention == 3 && (char_array[list_to_test[i][CHAR]].caption() == char_array[char_target_index].caption() || list_to_test[i][FORM] == form_target_index) then return false; end; i = i + 1; end; loop int i = (non_targets + 1) until i == list_to_test.count() begin if seperate_attention == 1 then if char_array[list_to_test[i][CHAR]].caption() == char_array[char_target_index].caption() && char_array[list_to_test[i+1][CHAR]].caption() == char_array[char_target_index].caption() then return false; end; elseif seperate_attention == 2 then if list_to_test[i][FORM] == form_target_index && list_to_test[i+1][FORM] == form_target_index then return false; end; elseif seperate_attention == 3 && (char_array[list_to_test[i][CHAR]].caption() == char_array[char_target_index].caption() || list_to_test[i][FORM] == form_target_index) then if char_array[list_to_test[i+1][CHAR]].caption() == char_array[char_target_index].caption() || list_to_test[i+1][FORM] == form_target_index then return false; end; end; i = i +1; end; return true; end; # returns a 2D array representation of a valid block with given paramters # for each pair the first value represents the index of the used char in char_array and the second value # represents the index of the used form in form_array # see make_and_present_block for parameter explanation sub array<int,2> make_block (int seperate_attention, int char_target_index, array<text,1> char_array, int form_target_index, int number_of_targets, int number_of_non_targets) begin array<int> list[0][2]; array<int> tmp_possible_targets[0][2]; array<int> tmp_possible_char_targets[0][2]; array<int> tmp_possible_form_targets[0][2]; array<int> tmp_possible_non_targets[0][2]; if seperate_attention == 1 then loop int i = 1 until i > form_array.count() begin array<int> tmp[2]; tmp[CHAR] = char_target_index; tmp[FORM] = i; tmp_possible_targets.add(tmp); i = i + 1; end; tmp_possible_targets.shuffle(); loop int i = 1 until i > number_of_targets begin int index = i % tmp_possible_targets.count(); if index == 0 then list.add(tmp_possible_targets[tmp_possible_targets.count()]); else list.add(tmp_possible_targets[index]); end; i = i + 1; end; loop int char_count = 1 until char_count > char_array.count() begin loop int form_count = 1 until form_count > form_array.count() begin if char_count != char_target_index then array<int> tmp[2]; tmp[CHAR] = char_count; tmp[FORM] = form_count; tmp_possible_non_targets.add(tmp); end; form_count = form_count + 1; end; char_count = char_count + 1; end; tmp_possible_non_targets.shuffle(); loop int i = 1 until list.count() == number_of_targets + number_of_non_targets begin int index = i % tmp_possible_non_targets.count(); if index == 0 then list.add(tmp_possible_non_targets[tmp_possible_non_targets.count()]); else list.add(tmp_possible_non_targets[index]); end; i = i + 1; end; elseif seperate_attention == 2 then loop int i = 1 until i > char_array.count() begin array<int> tmp[2]; tmp[CHAR] = i; tmp[FORM] = form_target_index; tmp_possible_targets.add(tmp); i = i + 1; end; tmp_possible_targets.shuffle(); loop int i = 1 until i > number_of_targets begin int index = i % tmp_possible_targets.count(); if index == 0 then list.add(tmp_possible_targets[tmp_possible_targets.count()]); else list.add(tmp_possible_targets[index]); end; i = i + 1; end; loop int char_count = 1 until char_count > char_array.count() begin loop int form_count = 1 until form_count > form_array.count() begin if form_count != form_target_index then array<int> tmp[2]; tmp[CHAR] = char_count; tmp[FORM] = form_count; tmp_possible_non_targets.add(tmp); end; form_count = form_count + 1; end; char_count = char_count + 1; end; tmp_possible_non_targets.shuffle(); loop int i = 1 until list.count() == number_of_targets + number_of_non_targets begin int index = i % tmp_possible_non_targets.count(); if index == 0 then list.add(tmp_possible_non_targets[tmp_possible_non_targets.count()]); else list.add(tmp_possible_non_targets[index]); end; i = i + 1; end; elseif seperate_attention == 3 then loop int i = 1 until i > form_array.count() begin if i != form_target_index then array<int> tmp[2]; tmp[CHAR] = char_target_index; tmp[FORM] = i; tmp_possible_char_targets.add(tmp); end; i = i + 1; end; tmp_possible_char_targets.shuffle(); loop int i = 1 until i > char_array.count() begin if i != char_target_index then array<int> tmp[2]; tmp[CHAR] = i; tmp[FORM] = form_target_index; tmp_possible_form_targets.add(tmp); end; i = i + 1; end; tmp_possible_form_targets.shuffle(); loop int i = 1 until i > number_of_targets/2 begin int char_index = i % tmp_possible_char_targets.count(); if char_index == 0 then list.add(tmp_possible_char_targets[tmp_possible_char_targets.count()]); else list.add(tmp_possible_char_targets[char_index]); end; int form_index = i % tmp_possible_form_targets.count(); if form_index == 0 then list.add(tmp_possible_form_targets[tmp_possible_form_targets.count()]); else list.add(tmp_possible_form_targets[form_index]); end; i = i + 1; end; loop int char_count = 1 until char_count > char_array.count() begin loop int form_count = 1 until form_count > form_array.count() begin if char_count != char_target_index && form_count!= form_target_index then array<int> tmp[2]; tmp[CHAR] = char_count; tmp[FORM] = form_count; tmp_possible_non_targets.add(tmp); end; form_count = form_count + 1; end; char_count = char_count + 1; end; tmp_possible_non_targets.shuffle(); loop int i = 1 until list.count() == number_of_targets + number_of_non_targets begin int index = i % tmp_possible_non_targets.count(); if index == 0 then list.add(tmp_possible_non_targets[tmp_possible_non_targets.count()]); else list.add(tmp_possible_non_targets[index]); end; i = i + 1; end; end; loop until (validade(list, seperate_attention ,form_target_index, char_target_index, char_array)) begin list.shuffle(); end; return list; end; # presents a block with given paramters. # that means showing instroction, fixation cross and possibly feedback. # The block is normally created by make_block() but could be created manually aswell # see make_and_present_block for parameter explanation sub present_block( int seperate_attention, int char_target_index, array<text,1> char_array, int form_target_index, array<int> block[][], bool show_feedback, string run_id, string block_id) begin string instruction_string = ""; if seperate_attention == 1 then instruction_string = ("Drücken Sie die Taste \"L\", wenn das Zeichen \"" + char_array[char_target_index].caption() + "\" erscheint."); elseif seperate_attention == 2 then instruction_string = ("Drücken Sie die Taste \"S\", wenn die Form \"" + form_array[form_target_index].description() + "\" erscheint."); elseif seperate_attention == 3 then instruction_string = "Drücken Sie die Taste \"L\", wenn das Zeichen \"" + char_array[char_target_index].caption() + "\" erscheint." + "\nDrücken Sie die Taste \"S\", wenn die Form \"" + form_array[form_target_index].description() + "\" erscheint." end; instruction_string = instruction_string + "\n\nAntworten Sie so schnell und richtig wie möglich." + "\nDrücken Sie die Leertaste, um fortzufahren."; text_instruction.set_caption(instruction_string, true); trial_instruction.present(); loop int i = 1 until i > block.count() begin int char_index = block[i][CHAR]; int form_index = block[i][FORM]; main_picture = form_array[form_index]; main_picture.set_part(3,char_array[char_index]); stim_event.set_stimulus(main_picture); string tmp_event_code = string(configuration) + ";" + run_id + ";" + block_id + ";" + main_picture.description() + ";" + char_array[char_index].caption() + ";" + string(seperate_attention); string caption = char_array[char_index].caption(); stim_event.set_target_button(0); stim_event.set_response_active(true); if seperate_attention == 1 then if char_array[char_target_index].caption() == caption then stim_event.set_target_button(1); stim_event.set_event_code(tmp_event_code + ";" + "1"); else stim_event.set_event_code(tmp_event_code + ";" + "0"); end; elseif seperate_attention == 2 then if form_target_index == form_index then stim_event.set_target_button(2); stim_event.set_event_code(tmp_event_code + ";" + "2"); else stim_event.set_event_code(tmp_event_code + ";" + "0"); end; elseif seperate_attention == 3 then if char_array[char_target_index].caption() == caption then stim_event.set_target_button(1); stim_event.set_event_code(tmp_event_code + ";" + "1"); elseif form_target_index == form_index then stim_event.set_target_button(2); stim_event.set_event_code(tmp_event_code + ";" + "2"); else stim_event.set_event_code(tmp_event_code + ";" + "0"); end; else end; #ISI if i == 1 then trial_cross.set_duration(1000); else trial_cross.set_duration(ISI_values[random(1,ISI_values.count())]); end; trial_cross.present(); set_response_mode(2); trial_main.present(); set_response_mode(1); i=i+1; if show_feedback then string feedback = ""; stimulus_data last = stimulus_manager.last_stimulus_data(); if (last.type() == last.HIT) then feedback = parameter_manager.get_string("Feedback HIT", "Richtig"); elseif (last.type() == last.INCORRECT) then feedback = parameter_manager.get_string("Feedback INCORRECT", "Falsche Taste"); elseif (last.type() == last.MISS) then feedback = parameter_manager.get_string("Feedback MISS", "Falsch.\nSie hätten drücken müssen."); elseif (last.type() == last.FALSE_ALARM) then feedback = parameter_manager.get_string("Feedback FALSE ALARM", "Falsch.\nSie hätten nicht drücken müssen."); end; if feedback != "" then text_feedback.set_caption(feedback, true); trial_feedback.present(); end; end; end; end; sub make_and_present_block (int seperate_attention, int char_target_index, array<text,1> char_array, int form_target_index, int number_of_targets, int number_of_non_targets, bool show_feedback, string run_id, string block_id) begin array<int> block_presentet[][] = make_block(seperate_attention,char_target_index, char_array, form_target_index, number_of_targets, number_of_non_targets); present_block(seperate_attention, char_target_index, char_array, form_target_index, block_presentet, show_feedback, run_id, block_id) end; # Parameters for make_and_present_block # 1. Value: seperate_attention: 1 = only a char is a target # 2 = only a form is a target # 3 = a char and a form is a target # 2. Value: index of char target. Use -1 if no char targets will be presentet # 3. Value: char array to be used # 4. Value: index of form target in form_array. Use -1 if no form targets will be presentet # 5. Value: number of targets in returned trial # 6. Value: number of non targets in returned trial # 7. Value: bool to determin if feedback will be given. true = feedback # 8. Value: run_id for event_code # 9. Value: block_id for event_code ##########################Test Run######################################## set_response_mode(1); present_information(information_start, 25); present_information(information_test, 30); make_and_present_block(1, 1, numbers, -1, 4, 6, true, "test", "block_1"); make_and_present_block(3, 2, numbers, 1, 4, 6, true, "test", "block_2"); if configuration == 1 then ##########################Run 1######################################## pause_seconds(30); present_information(information_first_run, 30); make_and_present_block(2, -1, numbers, 2, 7, 19, false, "selective", "block_1"); make_and_present_block(1, 3, numbers, -1, 5, 21, false, "selective", "block_2"); make_and_present_block(1, 4, numbers, -1, 6, 20, false, "selective", "block_3"); make_and_present_block(2, -1, numbers, 3, 8, 18, false, "selective", "block_4"); ##########################Run 2######################################## pause_minutes(2); present_information(information_second_run, 30); make_and_present_block(3, 5, numbers, 4, 8, 18, false, "divided", "block_1"); make_and_present_block(3, 6, numbers, 5, 5, 21, false, "divided", "block_2"); make_and_present_block(3, 1, numbers, 6, 7, 19, false, "divided", "block_3"); make_and_present_block(3, 2, numbers, 1, 6, 20, false, "divided", "block_4"); ##########################Run 3######################################## pause_minutes(2); present_information(information_third_run, 30); make_and_present_block(2, -1, numbers, 2, 7, 19, false, "combination", "block_1"); make_and_present_block(3, 3, numbers, 3, 8, 18, false, "combination", "block_2"); make_and_present_block(1, 4, numbers, -1, 5, 21, false, "combination", "block_3"); make_and_present_block(3, 5, numbers, 4, 6, 20, false, "combination", "block_4"); make_and_present_block(2, -1, numbers, 5, 6, 20, false, "combination", "block_5"); make_and_present_block(3, 6, numbers, 6, 7, 19, false, "combination", "block_6"); make_and_present_block(1, 1, numbers, -1, 5, 21, false, "combination", "block_7"); make_and_present_block(3, 2, numbers, 1, 8, 18, false, "combination", "block_8"); present_information(information_end, 30); elseif configuration == 2 then ##########################Run 1######################################## pause_seconds(30); present_information(information_first_run, 30); make_and_present_block(3, 3, numbers, 2, 8, 18, false, "divided", "block_1"); make_and_present_block(3, 4, numbers, 3, 5, 21, false, "divided", "block_2"); make_and_present_block(3, 5, numbers, 4, 7, 19, false, "divided", "block_3"); make_and_present_block(3, 6, numbers, 5, 6, 20, false, "divided", "block_4"); ##########################Run 2######################################## pause_minutes(2); present_information(information_second_run, 30); make_and_present_block(2, -1, numbers, 6, 7, 19, false, "selective", "block_1"); make_and_present_block(1, 1, numbers, -1, 5, 21, false, "selective", "block_2"); make_and_present_block(1, 2, numbers, -1, 6, 20, false, "selective", "block_3"); make_and_present_block(2, -1, numbers, 1, 8, 18, false, "selective", "block_4"); ##########################Run 3######################################## pause_minutes(2); present_information(information_third_run, 30); make_and_present_block(2, -1, numbers, 2, 7, 19, false, "combination", "block_1"); make_and_present_block(3, 3, numbers, 3, 8, 18, false, "combination", "block_2"); make_and_present_block(1, 4, numbers, -1, 5, 21, false, "combination", "block_3"); make_and_present_block(3, 5, numbers, 4, 6, 20, false, "combination", "block_4"); make_and_present_block(2, -1, numbers, 5, 6, 20, false, "combination", "block_5"); make_and_present_block(3, 6, numbers, 6, 7, 19, false, "combination", "block_6"); make_and_present_block(1, 1, numbers, -1, 5, 21, false, "combination", "block_7"); make_and_present_block(3, 2, numbers, 1, 8, 18, false, "combination", "block_8"); present_information(information_end, 30); elseif configuration == 3 then ##########################Run 1######################################## pause_seconds(30); present_information(information_first_run, 30); make_and_present_block(2, -1, numbers, 2, 7, 19, false, "combination", "block_1"); make_and_present_block(3, 3, numbers, 3, 8, 18, false, "combination", "block_2"); make_and_present_block(1, 4, numbers, -1, 5, 21, false, "combination", "block_3"); make_and_present_block(3, 5, numbers, 4, 6, 20, false, "combination", "block_4"); make_and_present_block(2, -1, numbers, 5, 6, 20, false, "combination", "block_5"); make_and_present_block(3, 6, numbers, 6, 7, 19, false, "combination", "block_6"); make_and_present_block(1, 1, numbers, -1, 5, 21, false, "combination", "block_7"); make_and_present_block(3, 2, numbers, 1, 8, 18, false, "combination", "block_8"); ##########################Run 2######################################## pause_minutes(2); present_information(information_second_run, 30); make_and_present_block(2, -1, numbers, 2, 8, 18, false, "selective", "block_1"); make_and_present_block(1, 3, numbers, -1, 5, 21, false, "selective", "block_2"); make_and_present_block(1, 4, numbers, -1, 7, 19, false, "selective", "block_3"); make_and_present_block(2, -1, numbers, 3, 6, 20, false, "selective", "block_4"); ##########################Run 3######################################## pause_minutes(2); present_information(information_third_run, 30); make_and_present_block(3, 5, numbers, 4, 7, 19, false, "divided", "block_1"); make_and_present_block(3, 6, numbers, 5, 5, 21, false, "divided", "block_2"); make_and_present_block(3, 1, numbers, 6, 6, 20, false, "divided", "block_3"); make_and_present_block(3, 2, numbers, 1, 8, 18, false, "divided", "block_4"); present_information(information_end, 30); elseif configuration == 4 then ##########################Run 1######################################## pause_seconds(30); present_information(information_first_run, 30); make_and_present_block(2, -1, numbers, 2, 7, 19, false, "combination", "block_1"); make_and_present_block(3, 3, numbers, 3, 8, 18, false, "combination", "block_2"); make_and_present_block(1, 4, numbers, -1, 5, 21, false, "combination", "block_3"); make_and_present_block(3, 5, numbers, 4, 6, 20, false, "combination", "block_4"); make_and_present_block(2, -1, numbers, 5, 6, 20, false, "combination", "block_5"); make_and_present_block(3, 6, numbers, 6, 7, 19, false, "combination", "block_6"); make_and_present_block(1, 1, numbers, -1, 5, 21, false, "combination", "block_7"); make_and_present_block(3, 2, numbers, 1, 8, 18, false, "combination", "block_8"); ##########################Run 2######################################## pause_minutes(2); present_information(information_second_run, 30); make_and_present_block(3, 3, numbers, 2, 7, 19, false, "divided", "block_1"); make_and_present_block(3, 4, numbers, 3, 5, 21, false, "divided", "block_2"); make_and_present_block(3, 5, numbers, 4, 6, 20, false, "divided", "block_3"); make_and_present_block(3, 6, numbers, 5, 8, 18, false, "divided", "block_4"); ##########################Run 3######################################## pause_minutes(2); present_information(information_third_run, 30); make_and_present_block(2, -1, numbers, 6, 8, 18, false, "selective", "block_1"); make_and_present_block(1, 1, numbers, -1, 5, 21, false, "selective", "block_2"); make_and_present_block(1, 2, numbers, -1, 7, 19, false, "selective", "block_3"); make_and_present_block(2, -1, numbers, 1, 6, 20, false, "selective", "block_4"); present_information(information_end, 30); elseif configuration == 5 then ##########################Run 1######################################## pause_seconds(30); present_information(information_first_run, 30); make_and_present_block(2, -1, numbers, 2, 8, 18, false, "selective", "block_1"); make_and_present_block(1, 3, numbers, -1, 5, 21, false, "selective", "block_2"); make_and_present_block(1, 4, numbers, -1, 7, 19, false, "selective", "block_3"); make_and_present_block(2, -1, numbers, 3, 6, 20, false, "selective", "block_4"); ##########################Run 2######################################## pause_minutes(2); present_information(information_second_run, 30); make_and_present_block(2, -1, numbers, 4, 7, 19, false, "combination", "block_1"); make_and_present_block(3, 5, numbers, 5, 8, 18, false, "combination", "block_2"); make_and_present_block(1, 6, numbers, -1, 5, 21, false, "combination", "block_3"); make_and_present_block(3, 1, numbers, 6, 6, 20, false, "combination", "block_4"); make_and_present_block(2, -1, numbers, 1, 6, 20, false, "combination", "block_5"); make_and_present_block(3, 2, numbers, 2, 7, 19, false, "combination", "block_6"); make_and_present_block(1, 3, numbers, -1, 5, 21, false, "combination", "block_7"); make_and_present_block(3, 4, numbers, 3, 8, 18, false, "combination", "block_8"); ##########################Run 3######################################## pause_minutes(2); present_information(information_third_run, 30); make_and_present_block(3, 5, numbers, 4, 7, 19, false, "divided", "block_1"); make_and_present_block(3, 6, numbers, 5, 5, 21, false, "divided", "block_2"); make_and_present_block(3, 1, numbers, 6, 6, 20, false, "divided", "block_3"); make_and_present_block(3, 2, numbers, 1, 8, 18, false, "divided", "block_4"); present_information(information_end, 30); elseif configuration == 6 then ##########################Run 1######################################## pause_seconds(30); present_information(information_first_run, 30); make_and_present_block(3, 3, numbers, 2, 7, 19, false, "divided", "block_1"); make_and_present_block(3, 4, numbers, 3, 5, 21, false, "divided", "block_2"); make_and_present_block(3, 5, numbers, 4, 6, 20, false, "divided", "block_3"); make_and_present_block(3, 6, numbers, 5, 8, 18, false, "divided", "block_4"); ##########################Run 2######################################## pause_minutes(2); present_information(information_second_run, 30); make_and_present_block(2, -1, numbers, 6, 7, 19, false, "combination", "block_1"); make_and_present_block(3, 1, numbers, 1, 8, 18, false, "combination", "block_2"); make_and_present_block(1, 2, numbers, -1, 5, 21, false, "combination", "block_3"); make_and_present_block(3, 3, numbers, 2, 6, 20, false, "combination", "block_4"); make_and_present_block(2, -1, numbers, 3, 6, 20, false, "combination", "block_5"); make_and_present_block(3, 4, numbers, 4, 7, 19, false, "combination", "block_6"); make_and_present_block(1, 5, numbers, -1, 5, 21, false, "combination", "block_7"); make_and_present_block(3, 6, numbers, 5, 8, 18, false, "combination", "block_8"); ##########################Run 3######################################## pause_minutes(2); present_information(information_third_run, 30); make_and_present_block(2, -1, numbers, 6, 8, 18, false, "selective", "block_1"); make_and_present_block(1, 1, numbers, -1, 5, 21, false, "selective", "block_2"); make_and_present_block(1, 2, numbers, -1, 7, 19, false, "selective", "block_3"); make_and_present_block(2, -1, numbers, 1, 6, 20, false, "selective", "block_4"); present_information(information_end, 30); end;
2caed0a6570f803f6813dee338987fa84ff0bbe9
449d555969bfd7befe906877abab098c6e63a0e8
/1580/CH6/EX6.4/Ch06Ex4.sce
d02787f413335f74b1d62c1a14153a0d7b3ce1f3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
521
sce
Ch06Ex4.sce
// Scilab Code Ex6.4: Page-6.11 (2004) clc;clear; t = 3.1e-14; // Mean free time, sec m = 9.1e-31; // Mass of electron, kg e = 1.6e-19; // Charge of electron, C r = 0.429e-9; // Side of the unit cell. m n = 2/(r^3); // Number of electron per unit cubemetre rho = m/(n*(e^2)*t); // Electrical resistivity, ohm m printf("\nElectrical resistivity of sodium at zero degree Celsius = %2.3e ohm m", rho); // Result // Electrical resistivity of sodium at zero degree Celsius = 4.527e-08 ohm m
2e0f9f7f9360b8cb06e1eab4d56b6471de453c2f
449d555969bfd7befe906877abab098c6e63a0e8
/2345/CH15/EX15.31/Ex15_31.sce
c96145cbba7c57a7d74e76b91cf0a501f601f924
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
570
sce
Ex15_31.sce
//Finding resistance //Example 15.31(pg. 412) clc clear m=0.6//mass of water in kgm S=4200//specific heat of water T1=100//temperature in degreeC T2=10//temperature in degreeC t=5*60//time in sec V=230//Supply voltage in Volts H=m*S*(T1-T2)//Heat required to raise the temp of water from 0 to 100 degree. in J e=0.78//efficiency of kettle Ei=H/e//Energy input in Joules Ei1=Ei/(100*3600)//Energy input in kWh W=Ei/t//Rating of kettle in watts R=(V*V)/W//Resistance of heating element in ohms printf('Thus Resistance of heating element is %2.1f ohms',R)
e9173e4f65a7496d325dec086226cebbfc20de52
449d555969bfd7befe906877abab098c6e63a0e8
/858/CH4/EX4.10/example_10.sce
ed8b4f6e7f790a2b75ba974065335ae9f0c24f69
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
example_10.sce
clc clear printf("example 4.10 page number 139\n\n") //to find the temperature increase Q=0.001*10^5 //in J/s w=0.001*1000 //in kg/s density=1000 //in kg/m3 cp=4.19*10^3 //in J/kg K delta_T=Q/(w*cp); printf("Temperature increase = %f degree celcius",delta_T)
8367d6f44833708e9a16def2b511dfac24bba0f4
449d555969bfd7befe906877abab098c6e63a0e8
/3492/CH6/EX6.13/Ex6_13.sce
377238c71edff5641ebbc3e31a3c6e0a910412f2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
180
sce
Ex6_13.sce
clc //Chapter6 //Ex_13 //Given e=1.6*10^-19 // in coulombs I=10^-3 //in A Th=10^-6 //in s B=1/Th //in Hz i_sn=sqrt(2*e*I*B) disp(i_sn,"shot noise current in amperes is")