blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
6
214
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
6
87
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
15 values
visit_date
timestamp[us]date
2016-08-04 09:00:04
2023-09-05 17:18:33
revision_date
timestamp[us]date
1998-12-11 00:15:10
2023-09-02 05:42:40
committer_date
timestamp[us]date
2005-04-26 09:58:02
2023-09-02 05:42:40
github_id
int64
436k
586M
star_events_count
int64
0
12.3k
fork_events_count
int64
0
6.3k
gha_license_id
stringclasses
7 values
gha_event_created_at
timestamp[us]date
2012-11-16 11:45:07
2023-09-14 20:45:37
gha_created_at
timestamp[us]date
2010-03-22 23:34:58
2023-01-07 03:47:44
gha_language
stringclasses
36 values
src_encoding
stringclasses
17 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
5
10.4M
extension
stringclasses
15 values
filename
stringlengths
2
96
content
stringlengths
5
10.4M
0e1a487ebdc53f406b3dd8fe30c8aab93edc65d1
8e27c42a350a84ed5aa7f3363a954dd17a6c72c4
/filtr.sci
af6ad018c0d8388ec28923bdcd02a0ad69cdb2dd
[ "MIT" ]
permissive
marlenadomalewska/CascadeFilter
23187d0af2fdbb41cd271ae7038d7c02351d135f
3b067dd0d52e58419c6656d7e52bf7267757cdbb
refs/heads/main
2023-05-29T05:13:20.313665
2021-06-08T15:09:55
2021-06-08T15:09:55
375,051,710
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,291
sci
filtr.sci
function t=biquad(h) // (c) 2007 Robert Wirski (r.wirski@ieee.org) [l,m,g]=factors(h); lenl=length(l); for i=lenl:-1:1 if polyord(l(i))==1 for j=1:i-1 if polyord(l(j))==1 l(j) = l(j) * l(i); l(i) = null(); break; end; end; end; end; lenm=length(m); for i=lenm:-1:1 if polyord(m(i))==1 for j=1:i-1 if polyord(m(j))==1 m(j) = m(j) * m(i); m(i) = null(); break; end; end; end; end; len = length(l); if modulo(len,2) l($+1)=%z^2; m($+1)=%z^2; len=len+1; end; if len~=length(m) error('Internal error'); end; printf('TotalAmp: %.3f\nnumSections: %i\n',g,len); printf('coeffs:\nIdx\tVal\n'); for i=1:2:len-1 mc1=coeff(m(i)); mc2=coeff(m(i+1)); lc1=coeff(l(i)); lc2=coeff(l(i+1)); printf('%i\t%.5f\n',((0:7)+(i-1)*4)',[-mc1(1);-mc2(1);-mc1(2);-mc2(2);lc1(1);lc2(1);lc1(2);lc2(2)]); end; t=list(g); for i=1:len t($+1)=l(i)/m(i); end; endfunction function r=polyord(p) r = length(coeff(p))-1; endfunction h=iir(6,'lp','butt',[4200 8800]/44100,[1-10^(-1.8/20) 10^(-32/20)]); hk=biquad(h); hk1 = hk(1)*hk(2); hk2 = hk(3); hk3 = hk(4); toJSON(coeff([hk1.num;hk1.den]), "hk1.json"); toJSON(coeff([hk2.num;hk2.den]), "hk2.json"); toJSON(coeff([hk3.num;hk3.den]), "hk3.json");
e58b79270805a9d624ca922b110ea07f57ceb17f
449d555969bfd7befe906877abab098c6e63a0e8
/1223/CH12/EX12.5/Ex12_5.sce
8456b3ea8cfbdcb3395b31878f4e046037700842
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
270
sce
Ex12_5.sce
clear; clc; //Example 12.5 Av=10^5; Avf=50; Rf=10;//Kohm Ro=20000;//Ohm //x=(1+bvAv) x=Av/Avf; printf('\n(1+bvAv)=%.e\n',x) Rif=Rf*x; Rif=Rif*0.001;//MOhm printf('\ninput resistance=%.2f MOhm\n',Rif) Rof=Ro/x; printf('\noutput resistance=%.2f Ohm\n',Rof)
f19f7da230e711fc52355bea5b30f759243d4cbd
449d555969bfd7befe906877abab098c6e63a0e8
/2657/CH1/EX1.1/Ex1_1.sce
0b5f05eaab810cae26380d4c14eee91fcf76270d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
523
sce
Ex1_1.sce
//Calculation of cubic capacity and clearance volume clc,clear //Given: n=4 //Number of cylinders d=68/10 //Bore in cm l=75/10 //Stroke in cm r=8 //Compression ratio //Solution: V_s=(%pi/4)*d^2*l //Swept volume of one cylinder in cm^3 cubic_capacity=n*V_s //Cubic capacity in cm^3 //Since, r = (V_c + V_s)/V_c V_c=V_s/(r-1) //Clearance volume in cm^3 //Results: printf("\n The cubic capacity of the engine = %.1f cm^3",cubic_capacity) printf("\n The clearance volume of a cylinder, V_c = %.1f cm^3\n\n",V_c)
32a7fbfd0cf78fd7d4a857dca89526485ae44597
ac1f8441b0319b4a391cd5a959bd3bb7988edfa7
/data/news2015/news2015/EnBa/enba12.tst
b2172e089fcc1496be6cfbe7d5f8bb7229942dda
[ "MIT" ]
permissive
SaeedNajafi/transliterator
4d58b8604fa31f52ee2dce7845e002a18214fd5e
523a087b777a5d6eec041165dabb43848f6222e6
refs/heads/master
2021-09-18T17:02:59.083727
2018-07-17T06:01:21
2018-07-17T06:01:21
129,796,130
0
0
null
null
null
null
UTF-8
Scilab
false
false
8,097
tst
enba12.tst
tiwana baharali iceland color shivekar elijabeth crockett nalinibala lasker bandiram bhuban gascogne chess stanwyck lorence seyyed salil lafarge nabarun christie geneva leyland tabsum samad vadi dustin strauss ervine attabira arusha egypt rajpati innisfallen nursing intrepid worldwide ranchod luge dharamsala sintu sathi townsend elmo bidhuvushan challenges sutherland ligurian kohinoorbibi irian chandrika sahidan transfiguration barkur nahida nurbanu ahamudulla bidhyadhar bijlirani lemoun afternoon mayureshwar reserve sairaj maawi kurnul brockhurst telefilm shahajadibibi chikkodi idjwi mahin dhimaan kddi kuntal behetar cable mhjahangir filipet cake fakrul anzum settsu bhabanicharan aragon devang maphijan frug morsalim chillupar akbari price asansol jamsed munsurakhatun shahanur albemarle pratik altabanu mumbai vechten maman tohda priscilla niwaaran nurjuma sharat wachovia bansal dharsiwa rathan nutrition sanoka tulabala nocil sheikendar gulati pankajini mdsafi mazhar nel alaulhak hirak jim taslimabibi dhirendra ukhrul tansco colaba arche hamidieh babudhan solectron juan hasanali fender bhairabi nabakanta vanoise murshada manjali subaru spiel bharatidevi digital red victor tarik meraj surojit lilabala blauwkapel marshal laxmiram suleman bhabua mahakanta dwigen hub khursid dhenubala djembe ede bajlur faijuddin johannesburg florida premtosh tiki vir ramsankar strix levar chitrakonda mahajana manobala amla sakhibala cyprus male karan rasana ahmar ramsagar anjani pousali kanpuri dhaarap mahakutta karttik gopikrushna osman ormula lehman kepler virupaksha ramnibas flattery asokhar sudakhina babulal ashgarali intel duvvada bishanath bishnudeb repsol dachigam slack pratah shambhupad everdingen joginder malesun salle gadag colin sky lychnostatis maisum bin anainaduvu rayon kanakprabha barisan boordhi krishnamohan fulton madhumati rajekabibi aijuddin mutneja gourdas balaji fuel port to pugachevs tuslima saadi deblal saira nishabala jhor galaxidi franklyn sitapur ghumar balaka amalkanta egg gangarani flock bazar zabbar rinjani scandinavian prannath barharwa lambeth jahanarabegam daar kaalaj binodbihari trehan santander kutumbale phurki zoysa behularani sadhani mdarif jaypee sarguja belurani akaash nayyar line liltu greenspan robertson hafij balco garland saggu auto deccanchronicle shulakha marcs spacey felis bijainagar madanmohan alembic ninetowns bunilal dhiman baze fortaleza amadeus edi dartmouth coca sherwin angelo dhavle orchards rwenzori outreach shery kaler durgamani container ben cary macdonald mahatma manjuri fulo tridib maphijur citadel geral okz karve baghdadi bichitra chandradip astaire goram kazuma pilani deb amritendu su mehmud sheep hiking duquesne narsad sagina chandrapura pitambar chauri sheikh sajedali maphejala diplana keshgadiya dior wallece conn bijaylakshmi dymchurch birdi matibala lago goodlass manji plato banbasi reedsport brain baisaki foster visualsoft sahila sumantra tamasa rockwall parthakumar nagamootoo makatkar rupnagar bengal adarini ardnacrusha swarnalota dubnium prinz matijul ahuja mansree salaam kathua pricketts balaichandra tuckaleechee chitrakot bhatni balasor fulbati doda basundhara parikhit oncolytics chhansara bawana sunipa mandy grizzly pieris abhaychandra chem bichchhu barrier sabed telekom mamatabala coles duggari kaila namchi dapanjan maniklal hoon shobhan khafif somachandra alak pareshnath venkataramana commtouch gitika mart phajlekrim abdulali neck sahanaz sambad tancítaro siloso groupe laabhante vidur ubajara benibala petrie riding daire unmadini kaali katsuragi pioneers fish mahira samu chandmun raine menubala shakdar kanchan satnam kamalchandra oarathuppalayam rasel dharashivkar archery impero albion pulasthi bladen dalrymple premio dadwal marsh minturani drake aminuddin hollebone telenor upen rajeswar manjrekar gill ingurskaya williamson anadi wijesuriya deoprayag poste baigaiveeran orla naosadali gouri anupama bahadur padmalaya ramadabi ramila aisin umarali tinkari dammika geoff rentu kanengara fedex uma castrol rajnath military mahabbat kherli midday anara nabira bhulu mukuleshur mansi hopes barks gorachand saathi shiromoni cholkar darke voyager lepanto mayurbhanj rajinder berrien eluru derek muradali munsi shilling rekharani madhuribala faju cerebus babenburg sitesh khattkar poetry bhise dorey bendre norsk aktarunbibi hasemali baharun anu sunitkumar zeven adil nandani rouphali debtosh smile sachsen dhekiajuli euler debarati milanrani purnimabibi gunjhow reshma kendurkar ununhexium thurnwald purnimadabi belapur jhantulal razzaq azamgarh nobel vieux angela bada anitadebi hencoate patti khanduja chhatunath chandak daporijo rupsena mamatadevi rafu carrefour rupsana malhotra rukmani dhulghat harpal sebika ranasinghe subhasranjan adesh amausi dead shiladabi nagaur debgopal ezra rajdeo borawar humayun chettinad time nasem rikta benukar kenth rubidium coney grinham portogallo relf pico shahidul safina mursidakhatun mohra brajen samarasekera recovery maunsell lakkhi beauty beijing edabali rangela radhamohan noord idbanu franks pasqual anantnag malinche ramabatidevi mannu diplomatic sarakatsanoi gabri bhadurani makhdoom sharman binodbala palanca gobinda girls bibek hasna bechurani dahiya bipula tirumalai lansbury multani edgcumbe nisal nripendra tulusi alema pratim cimatron dhakuakhana ajema bharath saleem kamini graphical pointer gatting mcclary scotland deolali pirmuhamad som amina tasman samena makkad dhule titubala tapu preussen rinakumari karen olfert caroline fernado mukti asranada chana rezaul agori atabal rahul lakshmi dracula kohli company hariprasad acorn farjun kirtibas westlb purohit murchison bishnathganj medzhybizh mirabel sakhealauddin gainsari java biochemistry conjunto baidhar nagpur garth word punam nordiska nurjanbibi mdakbar avishkar tusubala slocum vardha sarangi kangad piuli bardhaman yohan ramala cuffy greg atanu rajshekhar jafur brennius jami maphroja anupshahr lome kundan mitun gajare isuzu vidler barmer nirod kronprinz wollaston bholu delhi suratjan kyzyl behula babagon abutaleb popton fossil badayoon valeureuse ahold yarhosen shimanta kettle derol daraganj lithuania mohinder sujan granth sujatali biocon alik pabanchandra ahwahnee raanchi kullursandai phek makpo bandula rajnandgaon sohota bijankumar dharmpur tausif bahera shaktiprasad gomoh wein dohak soumi moti poma chitose bozeman pierce bunny sundareshvara sibiloi ramesh shachinandan meijer ritakumari dhrabapada nasrudin jason habsburg ashadulla canastra kmart samshul biju pushpadasi nalavade haider bland sarojini meherunnisha lothringen snehobala dakala sirmilik golconda bambi sarabande rookie dharmaraj jharnabegam bikashkumar bolai systems garcia dabilpur wheeler majeda raosanali dharitri abdullatiph garot gowarikar chartres dashanan sushanta voltaire indradip basira aagale rippington knowledge kajal sponge mithubala bhulun kerinci gandharaj taurus friedland vuntut viraat ramkisor vishalgad tanners tablu mirarani yamashiro cox sonitpur stansted kahlon pateswari uppar anamika sahabuddin adoni bittu merits ghatam sumter cleopatra transverse lillee kutharaiyar pujarani bulbul premnath abuhosen julekha yazuddin raisen burgoyne penn colossus neshar thar chidambarnaar jbbar jabar ivvavik jaavdekar ananta baltu kashinath falmani dadasaheb nabagopal shefalibibi saifar merlin chapel sitar fridhem salemabegam shiva sahenara bela nichhubala hero gijare bogue ladwa whitbread ujjain allentown bandra patasi ghaisas pocono tithi manihar raya rajbalam bray chandrima niroja hopwood ambodala bugul sunflag sankar engineer madhurima murshalim dubrovnik chhapra kris marakele manikchand ruhini sibanibala adavatkar mungekar alokarani vyavhare trip munnilal gadulka tare nepali bishnucharan harbour mahedali pochiah radico koningshooykt guaracha sharjahan dillon kumud danpur chabbra najirabibi lakhbir manipuri thermopylae anubibi bhupendar lander udaipur abulkashem hari gurusar oswego manaprita sailani shaktinath banita badrinath rebotibegam arjuna binay dumbra dharamgarh shubham spinnin dhanpur rimi baharul rasnara sourabi alihosen schooten chindwara mizoram
bdb5f13db9ab3cdd5892d0549dd2f205114198af
449d555969bfd7befe906877abab098c6e63a0e8
/3835/CH4/EX4.8/Ex4_8.sce
f6a489f98bb00c2c4c5693cb2a72f99cac340d7b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
296
sce
Ex4_8.sce
clear // //from phasor diagram vac=vab+vbc hcab=60 vcab=60 hcbc=45 vcbc=77.94 //vbc=60*sin(60) p=(vcab+hcbc)**2 q=vcbc**2 vac=((p+q)**0.5) printf("\n vac= %0.1f v",vac) //the angle is given by ang=taninverse(vcbc/(vcab+hcbc))=36.59 printf("\n phase position with respect to vbc=60-36.59=23.41")
76c56ef3946c32ad4218825dca7129c29e4d214a
1bb72df9a084fe4f8c0ec39f778282eb52750801
/test/MA11.prev.tst
9a856d272c7576bdee8a00b9f590a2a1395082cd
[ "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
347
tst
MA11.prev.tst
-chain [[2,-1,0,2],[-2,0,-1,-2],[0,2,2,-1],[2,-1,1,1]] [6,-5,-3,-4] 4 0 [[2,-1,0,2],[-2,0,-1,-2],[0,2,2,-1],[2,-1,1,1]],det=-2 [6,-5,-3,-4], chain 8 => [9,-1,-12,10] => [39,-26,-36,17] => [138,-76,-141,85] => [522,-305,-519,296] => [1941,-1117,-1944,1126] => [7251,-4190,-7248,4181] => [27054,-15616,-27057,15625] => [100974,-58301,-100971,58292]
541fad865d93c6839d1bf9c2f12dd19dc76643fe
449d555969bfd7befe906877abab098c6e63a0e8
/911/CH1/EX1.7.a/ex_1_7_a.sce
2c105ea4fab025337ae097efd364b40338f32931
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
358
sce
ex_1_7_a.sce
// example 1.7(a) / / // hexadecimal to binary conversion // clc // clears the screen // clear // clears already existing variables // x= hex2dec ('17E') //hexadecimal to decimal conversion // a= dec2bin (x) //decimal to binary conversion // disp ('conversion of hexadecimal given no to its binary form is : ') disp (a) // answer in binary form//
eaa420b90d1da0bdaa746f6ed843a0eece178776
449d555969bfd7befe906877abab098c6e63a0e8
/539/CH16/EX16.1.c/Example_16_1c.sce
8066ebdecff94debe2f080b66d0d0eb235892793
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
655
sce
Example_16_1c.sce
clear; clc; x=poly([0],'x'); printf("\tExample 16.1\n"); E_gf=69; // in GPa Elasticity of glass fibre mf_gf=0.4; //Vol % of glass fibre E_pr=3.4; // in GPa Elasticity of poyester resin mf_pr=0.6; //Vol % of polyester resin Ac=250; //mm^2 sigma=50; //MPa f=(E_gf*mf_gf)/(E_pr*mf_pr); Fc=Ac*sigma; //N Fm=roots(f*x+x-Fc); //N Ff=Fc-Fm; printf("\n\tPart C"); Am=mf_pr*Ac; Af=mf_gf*Ac; sigma_m=Fm/Am; sigma_f=Ff/Af; e_m=sigma_m/E_pr; //Strain for matrix phase e_f=sigma_f/E_gf; //Strain for fiber phase printf("\nStrain for matrix phase is : %f\n",e_m); printf("\nStrain for fiber phase is : %f\n",e_f); //End
058d5a9fdc7dbaa11189e8e817a244a7b2df9788
449d555969bfd7befe906877abab098c6e63a0e8
/3543/CH6/EX6.38/EX6_38.sce
e7b807297b8118f6ffdae01ba943056f9f4e918a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
861
sce
EX6_38.sce
// Example 6.38 // Calculation of a) quantum efficiency b) responsivity // Page no 494 clc; clear; close; //Given data e5=1.2*10^11; // No of electrons collected e8=3.6*10^11; // No of incident photon e=1.602*10^-19; // Charge of an electron lambda=0.85*10^-6; // Wavelength h=6.626*10^-34; // Planck constant c=3*10^8; // Velocity of light I=15*10^-6; // Photocurrent P=0.6*10^-6; // a)Quantum efficiency n=e5/e8; // b)Responsivity R=(n*e*lambda)/(h*c); //Displaying results in the command window printf("\n Quantum efficiency = %0.2f ",n); printf("\n Responsivity(in A/W) = %0.3f ",R); // The answers vary due to round off error
2d49c2c5d7ca33c40d32540e4b0848413458c07d
449d555969bfd7befe906877abab098c6e63a0e8
/3428/CH10/EX5.10.17/Ex5_10_17.sce
a81491a2f6ba0e2fe7ad3d58267c8ce5cb711831
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
249
sce
Ex5_10_17.sce
//Section-5,Example-4,Page no.-D.20 //To calculate temperature coefficient for the reaction. clc; t_h=2*60 k=0.693/t_h A=5000*10^10 E_a=10^5 R=8.314 T=E_a/(2.303*R*(log10(A)-log10(k))) disp(T,'Temperature coefficient for the reaction(K)')
e51b19355b6e27db666e5b253fcf3f6eba8b040a
449d555969bfd7befe906877abab098c6e63a0e8
/2015/CH6/EX6.4/6_4.sce
e36c67e1c2457d4bfa0c0c06b07d1b738a474b19
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
457
sce
6_4.sce
clc //initialisation of variables sp=1500 //rotational speed of an impulse turbine wheel in revolutions pi=(22/7) dm=1.5 //diameter in m ra=0.8 //ratio of blade speed to steam speed x=159 //x=cwi-cwo in m/s m=10 //kgs mass cf=50.4 //m*m*m/kg vs=1.159 // //CALCULATIONS u=(pi*dm*sp)/60 ci=u/ra pd=(m*x*u)/1000 a=(m*vs)/cf h=a/(pi*dm) //RESULTS printf('power developed for steam flow is %2fkw',pd) printf('\nheight of the blade is %2fm',h)
41d55dc35d7b73a832c597ad1d3d41ce885317e5
734830c483d7180158343b9b5599994878b8b197
/make-tests/unfinished/test0.tst
5e31bfdef151064fcd702b2c8a95c7e501749eef
[]
no_license
aykamko/proj61b
b53a3b569f82522144e010505859aa3ab66585bb
5f6688b70f907107512267712a325f907e5e627b
refs/heads/master
2021-01-16T22:08:56.235971
2013-12-12T09:19:39
2013-12-12T09:19:39
13,669,280
1
0
null
null
null
null
UTF-8
Scilab
false
false
104
tst
test0.tst
T1: T2 T4 T7 P1 T2: T3 T5 P2 T3: P3 T4: T5 T6 P4 T5: P5 T6: T5 P6 T7: T6 P7
1d7ed4124336c4e1d8c10b19460d41e09582bfd5
449d555969bfd7befe906877abab098c6e63a0e8
/761/CH5/EX5.10/5_10.sce
6b5014a65d85cfc61bcdff9481e6194648416b8b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
298
sce
5_10.sce
clc; //page no 206 //prob no. 5.10 //Refer fig.5.24 //Till the antenna there are 2 doubler and 4 tripler f_mul=18*18; dev_o=75*10^3;//o/p freq deviation is 75kHz //Determiantion of reqd freq deviation of oscillator dev_osc=dev_o/f_mul; disp('Hz',dev_osc,'Freq deviation of oscillator is');
0f008d5ef22300385dde557233d25329a6a8ce33
449d555969bfd7befe906877abab098c6e63a0e8
/1727/CH2/EX2.19/2_19.sce
be44fdf438fe520bd63d9d73b4b16fb2b8719dfc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
324
sce
2_19.sce
clc //Initialization of variables dia=1 //m h=3 //m rho=1000 //kg/m^3 N=80 //rpm g=9.81 //m/s^2 //calculation w=2*%pi*N/60 function y = fun(r) y=0.5*rho*w^2 *r^3 *2*%pi endfunction vec=intg(0,dia/2,fun) Pt=vec(1) + %pi/4 *dia^2 *(h-dia)*rho*g //results printf("Total pressure on base = %.2f kN",Pt/1000)
5a440b0eaf8619c01cf39f51234336c5dbd49fa0
31c6b1437c7dc52b977bf6790b1b24eff7f7b5f5
/ReadSEFileSubtractBG.sci
35709d7664e5f6188af5b766924478f18f2230c5
[]
no_license
RobinEccleston/Scilab-Snippets
4744c071ef891cc4905cbecc000a1f5bf667a8f7
7886058a25ec4821cfeba6d8e148a0a2aced330c
refs/heads/master
2021-01-26T00:48:02.042794
2020-02-26T11:35:49
2020-02-26T11:35:49
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,085
sci
ReadSEFileSubtractBG.sci
ModuleName="ReadSEFileSubtractBG"; Version="0.01"; DateModified="20-Apr-2015"; DateOfCreation="20-Apr-2015"; Author="Rob Eccleston"; Description="When given a measurement file and a BG file, returns the absorption .. spectra as divived by the BG measurement. Made as a separate function as might want .. to interpolate for different size files in future, or at least do something to handle .. the problem a bit more graciously."; mprintf("Loading " + ModuleName + " V" + Version + ", Last Modified: " + DateModified + "\n"); function [ AbsorptionProfile, Wavelengths, RawSpectra ] = ReadSEFileSubtractBG(MeasurementFileName, BGFileName) [AllAbsorptionData, Wavelengths, TimeDate] = ReadSpectralEnginesData(MeasurementFileName); MeanAbsorption=mean(AllAbsorptionData, 'r'); RawSpectra=MeanAbsorption [AllAbsorptionDataBG, WavelengthsBG, TimeDateBG] = ReadSpectralEnginesData(BGFileName); MeanAbsorptionBG=mean(AllAbsorptionDataBG, 'r'); AbsorptionProfile=MeanAbsorption./MeanAbsorptionBG; endfunction
e4fb6a908a7203aed1ee2f441645ba07a80ff122
449d555969bfd7befe906877abab098c6e63a0e8
/2498/CH4/EX4.25/ex4_25.sce
d824398a2472838f939ed5fe6d8a28598683ac99
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,037
sce
ex4_25.sce
// Exa 4.25 format('v',7) clc; clear; close; // Given data I_C =5 * 10^-3;// in A V_CE = 8;// in V V_E = 6;// in V S = 10; h_fc = 200; Beta = h_fc; V_CC = 20;// in V V_BE = 0.6;// in V I_B =I_C/Beta;// in A I_E = I_C+I_B;// in A // I_C*R_C = V_CC - V_CE - V_E; R_C = (V_CC - V_CE - V_E)/I_C;// in ohm R_C = R_C * 10^-3;// in k ohm disp(R_C,"The value of R_C in k ohm is"); R_C = R_C * 10^3;// in ohm //Voltage at point E, V_E =I_E*R_E; R_E = V_E/I_E;// in ohm R_E = R_E * 10^-3;// in k ohm disp(R_E,"The value of R_E in k ohm is"); R_E = R_E * 10^3;// in ohm // S = ((Beta+1)*(R_B+R_E))/( R_B+(R_E*(1+Beta)) ), where R_B= R1*R2/(R1+R2) R_B = ((R_E*(1+Beta))-(S*R_E*(1+Beta)))/( S-(1+Beta) );// in ohm // Vth = V_CC*(R2/(R1+R2)) = V_CC*(R_B/R1) // Applying KVL we get, Vth= I_B*R_B+V_BE+V_E or Vth = (I_B*R_B) + V_BE + V_E;// in V R1 =(V_CC/Vth)*R_B;// in ohm R1= R1*10^-3;// in k ohm disp(R1,"The value of R1 in k ohm is"); R2 = (R1*Vth)/(V_CC-Vth);// in k ohm disp(R2,"The value of R2 in k ohm is");
e297d97ce09902e6f1ab85df90b62e51acdafc94
1573c4954e822b3538692bce853eb35e55f1bb3b
/DSP Functions/allpasslp2bs/test_6.sce
25d0fa220e32241b1618c6ca8453a64a24d713ac
[]
no_license
shreniknambiar/FOSSEE-DSP-Toolbox
1f498499c1bb18b626b77ff037905e51eee9b601
aec8e1cea8d49e75686743bb5b7d814d3ca38801
refs/heads/master
2020-12-10T03:28:37.484363
2017-06-27T17:47:15
2017-06-27T17:47:15
95,582,974
1
0
null
null
null
null
UTF-8
Scilab
false
false
249
sce
test_6.sce
// Test #6 : Input Argument #2 range test exec('./allpasslp2bs.sci',-1); [n,d]=allpasslp2bs(0.4,[-4,0.39]); //!--error 10000 //Wt must lie between 0 and 1 //at line 46 of function allpasslp2bs called by : //[n,d]=allpasslp2bs(0.4,[-4,0.39]);
08de28c4148efa3fb1878b732586de23b798dbd7
449d555969bfd7befe906877abab098c6e63a0e8
/2081/CH2/EX2.10/Ex2_10.sce
9ee1dc57bec1290963b02e841b54d9c91647006c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
417
sce
Ex2_10.sce
Vm=96*5/18; fc=900*10^6; c=3*10^8; function [y ]= fround(x,n) // fround(x,n) // Round the floating point numbers x to n decimal places // x may be a vector or matrix// n is the integer number of places to round to y=round(x*10^n)/10^n; endfunction Yc=fround((c/fc),2); fdm=fround((Vm/Yc),2); Tc=fround((0.423/fdm),5)//coherence time Symbolrate=fround((1/Tc),0)//Symbolrate printf('Symbol rate is %.f bps',Symbolrate)
d29560e5cf5a20978b9fed5e3d55de18fea7f047
1988df91caa448a35bbf274a6d2698fe434571b1
/axiom/tprolass.tst
8b95448a778c7651407e76c0be96faa7471fb5b4
[]
no_license
namin/GETFOL
bd60e9a2d9f0905c50ff5c0cff4b6bf57a2049e2
bf42caf61799578eb82e9f17b3342bc2ee638a22
refs/heads/master
2021-10-25T08:08:20.142137
2021-10-22T16:16:40
2021-10-22T16:16:40
204,234,318
4
1
null
2019-08-25T02:05:54
2019-08-25T02:05:54
null
UTF-8
Scilab
false
false
1,607
tst
tprolass.tst
COMMENT | ************************************************************* | COMMENT | * AUTHOR: R.W. Weyhrauch DATE: around 1978 | COMMENT | * | COMMENT | * SUBJECT: Peano/ Robinson arithmetic (with SS) | COMMENT | * | COMMENT | * NOTES: See Prolegomena paper in AI Journal 1980 (appendix A)| COMMENT | * | COMMENT | * GETFOL VERSION: October 1989 | COMMENT | * | COMMENT | ************************************************************* | COMMENT | this is the example in the App. A of the Prolegomena | COMMENT | | PROBE ALL; KNOW NATNUMS; DECLARE INDCONST UNO DUE TRE DIECI [NATNUMSORT]; DECLARE INDVAR n m p q [NATNUMSORT]; DECLARE FUNCONST suc pred (NATNUMSORT) = NATNUMSORT; DECLARE FUNCONST + * (NATNUMSORT,NATNUMSORT) = NATNUMSORT [INF]; DECLARE PREDCONST < 2 [INF]; DECLARE PREDPAR P 2; AXIOM ONEONE: forall n m . (suc(n) = suc(m) imp n = m); AXIOM SUCC1: forall n . (not 0 = suc (n)); AXIOM SUCC2: forall n . (not 0 = n imp exists m . (n = suc(m))); THEORY PLUS: forall n . n + 0 = n, forall n m . n + suc(m) = suc(n+m); THEORY TIMES: forall n . n * 0 = 0, forall n m . n * suc(m) = (m*n) + m; ATTACH suc TO [NATNUMREP=NATNUMREP] ADD1; ATTACH pred TO [NATNUMREP=NATNUMREP] SUB1; ATTACH + TO[NATNUMREP,NATNUMREP=NATNUMREP] PLUS; ATTACH * TO[NATNUMREP,NATNUMREP=NATNUMREP] TIMES; ATTACH < TO [NATNUMREP,NATNUMREP] LT; ATTACH UNO DAR [NATNUMREP] 1; ATTACH TRE TO [NATNUMREP] 1; COMMENT | | COMMENT | added by FAusto (July 1987) to prove the SIMPLIFY command | COMMENT | It must prove "UNO = TRE " | COMMENT | | SIMPLIFY UNO = TRE;
25a4e65820c3b60d0cad50e3ca77789765710939
449d555969bfd7befe906877abab098c6e63a0e8
/3513/CH9/EX9.3/Ex9_3.sce
91f8cb1509eb10065503079f5741f96056e53aa9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
448
sce
Ex9_3.sce
//Calculate the reliability of the configuration //page no 219 clear clc; RA = 0.8; RB = 0.8; RC = 0.8; RD = 0.95; RE = 0.85; RABC = 1-((1-RA)*(1-RB)*(1-RC)); RABCDE1 = RABC*RD*RE; mprintf("\RABC = %.4f \n",RABC); mprintf("\RABCDE = %.4f \n",RABCDE1); RABC=0.992; RD=0.95; RE = 1-((1-RE)*(1-RE)); RABCDE2 = RABC*RD*RE; mprintf("\(b) WKT RABCDE = %.4f \n",RABCDE2); I=RABCDE2-RABCDE1; mprintf("\Improvement in R = %.4f \n",I);
c9ad9fa3f68825362aae54f35acbe6cafa40be7c
449d555969bfd7befe906877abab098c6e63a0e8
/2048/CH11/EX11.4/mv_mac1.sce
ea499c83c2ab80bec7c016b70e0b54bfbd9e7e4a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,315
sce
mv_mac1.sce
// MacGregor's first control problem, discussed in Example 11.4 on page 213. // 11.4 exec('mv.sci',-1); exec('cl.sci',-1); exec('cosfil_ip.sci',-1); exec('zpowk.sci',-1); exec('xdync.sci',-1); exec('rowjoin.sci',-1); exec('polsize.sci',-1); exec('left_prm.sci',-1); exec('t1calc.sci',-1); exec('indep.sci',-1); exec('seshft.sci',-1); exec('makezero.sci',-1); exec('move_sci.sci',-1); exec('colsplit.sci',-1); exec('clcoef.sci',-1); exec('cindep.sci',-1); exec('polmul.sci',-1); exec('poladd.sci',-1); exec('tfvar.sci',-1); exec('l2r.sci',-1); exec('transp.sci',-1); exec('tf.sci',-1); exec('covar_m.sci',-1); exec('polyno.sci',-1); // MacGregor's first control problem A = [1 -1.4 0.45]; dA = 2; C = [1 -0.5]; dC = 1; B = 0.5*[1 -0.9]; dB = 1; k = 1; int1 = 0; [Sc,dSc,Rc,dRc] = mv(A,dA,B,dB,C,dC,k,int1); [Nu,dNu,Du,dDu,Ny,dNy,Dy,dDy,yvar,uvar] = ... cl(A,dA,B,dB,C,dC,k,Sc,dSc,Rc,dRc,int1); // Simulation parameters for stb_disc.xcos Tc = Sc; gamm = 1; [zk,dzk] = zpowk(k); D = 1; N_var = 1; Ts = 1; st = 0; t_init = 0; t_final = 1000; [Tcp1,Tcp2] = cosfil_ip(Tc,1); // Tc/1 [Rcp1,Rcp2] = cosfil_ip(1,Rc); // 1/Rc [Scp1,Scp2] = cosfil_ip(Sc,1); // Sc/1 [Bp,Ap] = cosfil_ip(B,A); // B/A [zkp1,zkp2] = cosfil_ip(zk,1); // zk/1 [Cp,Dp] = cosfil_ip(C,D); // C/D
9573a2b9a9b1ec3acb248e0460d0b87c724b88f9
449d555969bfd7befe906877abab098c6e63a0e8
/2705/CH8/EX8.3/Ex8_3.sce
6050727e853e77f23bb678af410342b9e7cff40c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,410
sce
Ex8_3.sce
clear; clc; disp('Example 8.3'); // aim : To determine // the stoichiometric mass of air // the products of combustion both by mass and as percentage // Given values C = .82;// mass composition C H2 = .12;// mass composition of H2 O2 = .02;// mass composition of O2 S = .01;// mass composition of S N2 = .03;// mass composition of N2 // solution // for 1kg fuel mo2 = 8/3*C+8*H2-O2+S*1;// total mass of O2 required, [kg] sa = mo2/.232;// stoichimetric air, [kg] mprintf('\n The stoichiometric mass of air is = %f kg/kg fuel\n',sa); // for one kg fuel mCO2 = C*11/3;// mass of CO2 produced, [kg] mH2O = H2*9;// mass of H2O produced, [kg] mSO2 = S*2;// mass of SO2 produce, [kg] mN2 = C*8.84+H2*26.5-O2*.768/.232+S*3.3+N2;// mass of N2 produced, [kg] mt = mCO2+mH2O+mSO2+mN2;// total mass of product, [kg] x1 = mCO2/mt*100;// %age mass composition of CO2 produced x2 = mH2O/mt*100;// %age mass composition of H2O produced x3 = mSO2/mt*100;// %age mass composition of SO2 produced x4 = mN2/mt*100;// %age mass composition of N2 produced mprintf('\n CO2 produced = %f kg/kg fuel, percentage composition = %f,\n H2O produced = %f kg/kg fuel, percentage composition = %f,\n SO2 produced = %f kg/kg fuel, percentage composition = %f,\n N2 produced = %f kg/kg fuel, percentage composition = %f',mCO2,x1,mH2O,x2,mSO2,x3,mN2,x4); // End
fe3336d56a811f8c9a255564ab3078d53f60eb56
449d555969bfd7befe906877abab098c6e63a0e8
/608/CH44/EX44.09/44_09.sce
a0c05429f3b39fea556604f5c6d2fe288777300f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,035
sce
44_09.sce
//Problem 44.09: At a frequency of 1 kHz the primary constants of a transmission line are resistance R = 25 ohm/loop km, inductance L = 5 mH/loop km, capacitance C = 0.04 μF/km and conductance G = 80 μS/km. Determine for the line (a) the characteristic impedance, (b) the propagation coefficient, (c) the attenuation coefficient and (d) the phase-shift coefficient. //initializing the variables: R = 25; // in ohm/loop km L = 0.005; // in H/loop km C = 0.04E-6; // in F/km G = 80E-6; // in S/km f = 1000; // in Hz //calculation: w = 2*%pi*f //characteristic impedance Zo Zo = ((R + %i*w*L)/(G + %i*w*C))^0.5 //the propagation coefficient r =((R + %i*w*L)*(G + %i*w*C))^0.5 //the attenuation coefficient a = real(r) //the phaseshift coefficient b = imag(r) printf("\n\n Result \n\n") printf("\n characteristic impedance Zo is %.1f +(%.1f)i ohm",real(Zo), imag(Zo)) printf("\n propagation coefficient is %.4f +(%.4f)i",a,b) printf("\n attenuation coefficient is %.4f Np/km",a) printf("\n the phaseshift coefficient %.4f rad/km",b)
1e944dfd8864029e076d1f5b3ee07df43ddf4651
449d555969bfd7befe906877abab098c6e63a0e8
/1385/CH9/EX9.19/9_19.sce
6874fdd190257df11d00ccfff602cf3e4c956385
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
145
sce
9_19.sce
clc //initialisation of variables pH= 7.10 pH1= 7.21 //CALCULATIONS r= 10^(pH-pH1) //RESULTS printf (' ratio of salt to acid = %.3f ',r)
ff2c7668b740e0079240027ac3b709f9579e30de
449d555969bfd7befe906877abab098c6e63a0e8
/3840/CH3/EX3.10/Ex3_10.sce
51cde5518430b2fdb68508b8769743043e1af9b2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
317
sce
Ex3_10.sce
clear // // // //Variable declaration n=1 //order theta=19.2*%pi/180 //glancing angle(radian) lamda=1.54 //wavelength(angstrom) h=1 k=1 l=1 //Calculation d=n*lamda/(2*sin(theta)) //lattice parameter(angstrom) a=d*sqrt(h**2+k**2+l**2) //cube edge of unit cell(angstrom) //Result
a0ad9f917265f74d21ad073e09eee07dc3e45356
449d555969bfd7befe906877abab098c6e63a0e8
/3812/CH1/EX1.6.e/1_6_e.sce
4a8b9d889e8dcc69349628ce0819c82656302bb1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
1_6_e.sce
clc ; clear all; t=-10:.001:10; for i=1:length(t) if t(i)<=-1/2 then x(i)=1; else x(i)=0; end end // f i g u r e f=scf(0); plot2d(t,x); xtitle('Required figure','t','x(t)')
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);
5675a5575f7d3113489e8905d6758ae0303f8e09
717ddeb7e700373742c617a95e25a2376565112c
/1340/CH6/EX6.10/6_10.sce
955139be639302cb65b48050cce61edf8025a618
[]
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
760
sce
6_10.sce
clc; s = %s; G = s^4+3*s^3+30*s^2+30*s+200; disp(G); co = coeff(G); routh = [co([5,3,1]);co([4,2]) 0]; routh = [routh;-det(routh(1:2,1:2))/routh(2,1) routh(1,3) 0]; routh = [routh;-det(routh(2:3,1:2))/routh(3,1) (routh(3,1)*routh(2,3)-routh(2,1)*routh(3,3))/routh(3,1) 0]; routh= [routh;-det(routh(3:4,1:2))/routh(4,1) 0 0]; disp(routh,"routh table:"); printf("\n routh table contains a row of all zeroes."); //creating an auxillary polynomial temp = routh(3,:); coef = coeff(temp); aux = poly([coef(2) 0 coef(1)],"s","coeffs")/coef(1); disp(aux,"auxillary polynomial:"); z = roots(G); disp(z,"roots of polynomial:") for i = 1:4 A(i)=s+z(i); disp(A(i),"=",i,"factor"); end //can be done by using factors(G) and roots(G) directly
8d7d2648d548e50231e8959bed8eca9a37357c93
449d555969bfd7befe906877abab098c6e63a0e8
/2252/CH9/EX9.1/Ex9_1.sce
6f76c11a17c59cf39858a27d6669c7ac7d454787
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
747
sce
Ex9_1.sce
function[r]=mag(A) x=real(A) y=imag(A) r=sqrt(x^2+y^2) endfunction j=%i //considering coils to be star connected Vl=400//line voltage Vph=Vl/sqrt(3) Rph=15//resistance of load Xl=2*%pi*50*.03//inductive reactance of each coil Zph=Rph+Xl*j Iph=Vph/mag(Zph) Il=Iph pf=Rph/mag(Zph)//power factor P=sqrt(3)*Vl*Il*pf mprintf("In star connected circuit,\nPhase current=%f A,\nLine current=%f A,\nPower absorbed=%f kW\n", Iph, Il,P/10^3) //considering coils to be delta connected Vph=Vl Iph=Vph/mag(Zph) Il=sqrt(3)*Iph P=sqrt(3)*Vl*Il*pf mprintf("In delta connected circuit,\nPhase current=%f A,\nLine current=%f A,\nPower absorbed=%f kW\n", Iph, Il,P/10^3) //answers vary from the textbook due to round off error
c986a3a2d6e86622f3f5c17afc79647a8015ff11
449d555969bfd7befe906877abab098c6e63a0e8
/3311/CH12/EX12.7/Ex12_7.sce
be9db4e63111b42d6868b7f707beb37dbc544226
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,965
sce
Ex12_7.sce
// chapter 12 // example 12.7 // Design a ZVS three-level PWM convertor // page-791-792 clear; clc; // given Edc=300; // in V E0=60; // in V (output voltage) I0=10; // in A fs=120; // in KHz Deff=0.5; // effective duty ratio del_D=25; // assumption for reduction in duty ratio in percentage of duty ratio as done in the book TLI=3.46; // in uH (assuming transformer leakage inductance as done in the book) C=500; // in pF (assuming intrinsic capacitance of MOSFET as done in the book) // calculate fs=fs*1E3; // changing unit from KHz to Hz TLI=TLI*1E-6; // changing unit from uH to H C=C*1E-12; // changing unit from pF to F // since Deff=2*n*E0/Edc, therefore we get, n=Deff*Edc/(2*E0); // calculation of transformer turns ratio // since Deff=D-del_D*D, therefore we get, D=Deff/(1-del_D/100); // calculation of duty ratio Lr=((del_D*D/100)*Edc/2)/(4*(I0/n)*fs); // calculation of resonant inductance Lr_eff=Lr+TLI; // calculation of effecive inductance I0_min=(n*Edc/2)*sqrt(1.5*C/Lr_eff); // calculation of minimum load current I_Lr=I0/n; // calculation of inductor current X_Lr=2*%pi*fs*Lr_eff; // calculation of inductive reactance V_Lr=I_Lr*X_Lr; // calculation of voltage drop across Lr // since E0=Deff*Es, therefore we get Es=E0/Deff; // calculation of secondary voltage Ep=n*Es; // calculation of primary voltage VA=Ep*I_Lr; // calculation of transformer volt-ampere printf("\nThe duty ratio is \t\t D=%.2f",D); printf("\nThe resonant inductance is \t Lr=%.2f uH",Lr*1E6); printf("\nThe effective inductance is \t Lr_eff=%.f uH",Lr_eff*1E6); printf("\nThe minimum load current is \t I0_min=%.2f A",I0_min); printf("\nThe inductor current is \t I_Lr=%.f A",I_Lr); printf("\nThe voltage drop across Lr is \t V_Lr=%.2f V",V_Lr); printf("\nThe secondary voltage is \t Es=%.f V",Es); printf("\nThe primary voltage is \t\t Ep=%.f V",Ep); printf("\nThe transformer volt-ampere is \t VA=%.f VA",VA); // Note :The answer vary slightly due to precise calculation
574f39225866e56ecb634f69ec8b8007a9815067
449d555969bfd7befe906877abab098c6e63a0e8
/2594/CH2/EX2.19/Ex2_19.sce
475887a538be730fe6b85556927ca95f46b1a2c9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex2_19.sce
clc R=52.08 *10^3 disp("R = "+string(R)+"ohm") //initializing value of Resistance. V=5 disp("V = "+string(V)+"volt") //initializing value of voltage. I=(V/R) disp("Drift current,I=(V/R))= "+string(I)+" amphere")//calculation //this is solved problem 2.6 of chapter 2.
2f682b7a5c5a2aafe3fa9f9270170323b390b37a
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/dscr.man.tst
e7d0f1cde0683dccc4f7427e10fcdd44a389b26e
[ "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
103
tst
dscr.man.tst
clear;lines(0); s=poly(0,'s'); Sys=syslin('c',[1,1/(s+1);2*s/(s^2+2),1/s]) ss2tf(dscr(tf2ss(Sys),0.1))
6cfc830dc4085d0f16557c2615f494dcabf2b3ba
449d555969bfd7befe906877abab098c6e63a0e8
/2510/CH9/EX9.14/Ex9_14.sce
b66fe45a78cd32cc0e232b8c508480daa2e28e39
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,125
sce
Ex9_14.sce
//Variable declaration: k = 60.0 //Thermal conductivity of rod (W/m.K) p = 7850.0 //Density of rod (kg/m^3) Cp = 434.0 //Heat capacity of rod (J/kg.K) h = 140.0 //Convection heat transfer coefficient (W/m^2.K) D = 0.01 //Diameter of rod (m) kf = 0.6 //Thermal conductivity of fluid (W/m.K) L = 2.5 //Length of rod (m) Ts = 250.0 //Surface temperature of rod (°C) Tf = 25.0 //Fluid temperature (°C) //Calculation: //Case 1: a = k/(p*Cp) //Thermal diffusivity of bare rod (m^2/s) //Case 2: Nu = h*D/kf //Nusselt number //Case 3: Bi = h*D/k //Biot number of bare rod //Case 4: Q = h*(%pi*D*L)*(Ts-Tf) //Heat transferred from rod to fluid (W) //Result: printf("1. The thermal diffusivity of the bare rod is : %.2f x 10^-5 m^2/s.",a/10**-5) printf("2. The nusselt number is : %.2f .",Nu) printf("3. The Biot number is : %.4f .",Bi) printf("4. The heat transferred from the rod to the fluid is : %.0f W.",Q)
cb16c3d055aaaf10efb8b6069bec4a21c0bb1d79
4a1effb7ec08302914dbd9c5e560c61936c1bb99
/Project 2/Experiments/FURIA-C/results/FURIA-C.abalone-10-1tra/result8s0.tst
8109b3927cfaf3ad9ef69a7413618fba603f337a
[]
no_license
nickgreenquist/Intro_To_Intelligent_Systems
964cad20de7099b8e5808ddee199e3e3343cf7d5
7ad43577b3cbbc0b620740205a14c406d96a2517
refs/heads/master
2021-01-20T13:23:23.931062
2017-05-04T20:08:05
2017-05-04T20:08:05
90,484,366
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,428
tst
result8s0.tst
@relation abalone @attribute Sex{M,F,I} @attribute Length real[0.075,0.815] @attribute Diameter real[0.055,0.65] @attribute Height real[0.0,1.13] @attribute Whole_weight real[0.002,2.8255] @attribute Shucked_weight real[0.001,1.488] @attribute Viscera_weight real[5.0E-4,0.76] @attribute Shell_weight real[0.0015,1.005] @attribute Rings{15,7,9,10,8,20,16,19,14,11,12,18,13,5,4,6,21,17,22,1,3,26,23,29,2,27,25,24} @inputs Sex,Length,Diameter,Height,Whole_weight,Shucked_weight,Viscera_weight,Shell_weight @outputs Rings @data 9 9 10 9 12 9 10 7 12 9 18 9 8 7 7 7 9 9 13 9 9 9 12 20 13 9 9 7 9 7 10 9 5 4 14 11 9 9 14 23 8 7 9 7 9 23 14 9 22 9 3 3 5 5 10 7 7 7 15 9 13 9 12 9 4 4 19 9 5 4 8 23 9 9 8 9 20 9 16 11 15 9 12 9 14 9 6 7 14 9 11 9 9 7 8 7 19 9 16 11 17 9 21 11 16 9 15 9 15 9 10 9 6 7 5 7 20 9 10 7 14 9 10 7 7 5 13 9 13 9 13 7 10 7 12 9 17 9 8 7 9 7 7 5 10 9 10 7 2 3 15 20 14 9 13 9 20 9 13 9 15 9 9 7 11 9 10 9 6 7 9 9 10 9 12 9 8 9 8 9 12 9 11 20 9 9 4 5 6 5 6 7 7 7 7 7 7 7 8 9 7 9 9 9 9 9 11 9 8 9 10 9 8 9 11 9 10 9 11 9 6 5 7 7 6 7 8 7 9 9 9 9 7 9 9 9 10 9 9 9 9 9 9 9 11 9 5 5 5 5 4 7 7 7 6 7 7 7 6 7 7 7 7 7 10 9 9 9 10 9 8 9 10 9 10 9 9 9 9 9 10 9 12 9 9 9 10 9 10 9 12 11 12 11 12 11 14 11 6 7 6 7 8 9 8 9 11 9 10 9 10 9 5 5 8 5 7 7 6 7 7 7 6 9 8 9 7 9 9 9 8 9 10 9 10 9 10 9 10 9 10 9 11 9 10 9 11 9 9 9 9 9 9 9 11 9 14 11 7 7 8 7 10 9 10 9 9 9 8 7 8 7 9 7 8 9 8 9 9 9 9 9 9 9 8 9 11 9 9 9 11 9 11 9 10 9 10 9 11 9 9 9 10 9 10 9 12 9 10 9 12 11 4 3 6 7 7 7 8 7 7 7 9 9 9 9 9 9 11 9 8 9 6 7 12 20 9 7 9 9 12 9 17 9 10 7 8 9 9 7 7 7 6 7 6 7 12 9 13 9 9 9 12 9 16 9 14 9 13 9 12 9 15 23 23 11 18 9 12 9 18 9 5 4 16 9 11 7 17 9 12 9 10 5 10 9 10 7 15 9 10 9 6 5 5 5 17 9 14 9 14 9 19 9 6 5 7 5 8 9 11 9 13 11 13 9 7 7 6 7 7 9 11 9 9 9 13 11 10 11 5 5 8 7 6 7 9 9 8 9 9 9 9 9 8 9 9 9 8 9 9 9 9 9 9 9 8 7 10 9 11 9 8 9 11 9 8 9 11 9 11 9 10 9 4 5 7 7 9 9 10 9 12 9 11 9 11 9 6 7 11 9 9 9 8 9 11 9 9 9 11 9 10 9 10 9 10 9 8 9 9 9 8 7 8 7 10 9 10 9 8 9 12 9 9 9 11 9 11 9 11 9 8 7 11 9 10 9 8 7 8 9 7 9 9 7 6 5 11 9 8 7 7 7 10 9 13 9 11 9 15 9 18 9 10 7 13 9 15 9 13 9 16 20 12 7 4 4 13 9 11 7 13 7 14 23 11 7 17 9 10 7 5 5 7 5 13 9 8 7 7 7 7 9 10 9 12 9 7 7 8 7 8 9 11 9 10 9 9 9 11 9 11 11 7 7 6 7 8 7 9 9 10 9 11 9 11 9 11 9 8 9 10 9 7 7 8 9 11 9 11 9 13 9 11 11 9 9 12 11 7 7 7 7 8 7 9 9 9 9 9 9 10 9 10 9 7 5 8 7 8 9 9 9 7 9 10 7 11 9 18 9 11 9 8 9 7 7 6 7 6 9 11 9 9 9 9 9 8 9 10 9 9 9 8 9 9 9 11 9 7 7 8 7
4a4ff0f503d5fb2c87a2cdfd7b291c3c4d7171c6
192afc75cfcdba4d27fd6d47df2100d1bf76a971
/buildLib/readSystermFile/README.md
72313656b797c806038ef643f2d598486ba4c526
[ "BSD-3-Clause", "MIT" ]
permissive
iDataVisualizationLab/HPCC
0885887a26795c9515e6d271adb1497416d15cfc
e9ac0029f18ea32ebd6e3b0ca430d4a377500db3
refs/heads/master
2023-07-07T23:53:36.566165
2023-07-07T06:17:43
2023-07-07T06:17:43
132,034,110
7
3
MIT
2022-10-13T01:00:09
2018-05-03T18:23:11
Jupyter Notebook
UTF-8
Scilab
false
false
3,900
md
README.md
# LitElement JavaScript starter This project includes a sample component using LitElement with JavaScript. ## Setup Install dependencies: ```bash npm i ``` ## Testing This sample uses Karma, Chai, Mocha, and the open-wc test helpers for testing. See the [open-wc testing documentation](https://open-wc.org/testing/testing.html) for more information. Tests can be run with the `test` script: ```bash npm test ``` ## Dev Server This sample uses open-wc's [es-dev-server](https://github.com/open-wc/open-wc/tree/master/packages/es-dev-server) for previewing the project without additional build steps. ES dev server handles resolving Node-style "bare" import specifiers, which aren't supported in browsers. It also automatically transpiles JavaScript and adds polyfills to support older browsers. To run the dev server and open the project in a new browser tab: ```bash npm run serve ``` There is a development HTML file located at `/dev/index.html` that you can view at http://localhost:8000/dev/index.html. ## Editing If you use VS Code, we highly reccomend the [lit-plugin extension](https://marketplace.visualstudio.com/items?itemName=runem.lit-plugin), which enables some extremely useful features for lit-html templates: - Syntax highlighting - Type-checking - Code completion - Hover-over docs - Jump to definition - Linting - Quick Fixes The project is setup to reccomend lit-plugin to VS Code users if they don't already have it installed. ## Linting Linting of JavaScript files is provided by [ESLint](eslint.org). In addition, [lit-analyzer](https://www.npmjs.com/package/lit-analyzer) is used to type-check and lint lit-html templates with the same engine and rules as lit-plugin. The rules are mostly the recommended rules from each project, but some have been turned off to make LitElement usage easier. The recommended rules are pretty strict, so you may want to relax them by editing `.eslintrc.json`. To lint the project run: ```bash npm run lint ``` ## Formatting [Prettier](https://prettier.io/) is used for code formatting. It has been pre-configured according to the Polymer Project's style. You can change this in `.prettierrc.json`. Prettier has not been configured to run when commiting files, but this can be added with Husky and and `pretty-quick`. See the [prettier.io](https://prettier.io/) site for instructions. ## Static Site This project includes a simple website generated with the [eleventy](11ty.dev) static site generator and the templates and pages in `/docs-src`. The site is generated to `/docs` and intended to be checked in so that GitHub pages can serve the site [from `/docs` on the master branch](https://help.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site). To enable the site go to the GitHub settings and change the GitHub Pages &quot;Source&quot; setting to &quot;master branch /docs folder&quot;.</p> To build the site, run: ```bash npm run docs ``` To serve the site locally, run: ```bash npm run docs:serve ``` To watch the site files, and re-build automatically, run: ```bash npm run docs:watch ``` The site will usually be served at http://localhost:8000. ## Bundling and minification This starter project doesn't include any build-time optimizations like bundling or minification. We recommend publishing components as unoptimized JavaScript modules, and performing build-time optimizations at the application level. This gives build tools the best chance to deduplicate code, remove dead code, and so on. For information on building application projects that include LitElement components, see [Build for production](https://lit-element.polymer-project.org/guide/build) on the LitElement site. ## More information See [Get started](https://lit-element.polymer-project.org/guide/start) on the LitElement site for more information.
d2d7f6399056ee1302f1b186bdf60a08151799c4
117dfe11397868e23e4177974ee4db6128616157
/qpipopt/qpipopt_x01.sce
6a5726961181fb68cbe4c72396de86fc201b778b
[]
no_license
harpreetrathore/OR-toolbox-test-cases
161ec31daa75c7bdfe68519e43975b9452d81d30
ad6fd408ea41e74e56b31a5bc756639e521a20e3
refs/heads/master
2021-01-21T08:24:31.441859
2015-11-17T16:54:58
2015-11-17T16:54:58
45,449,825
0
1
null
null
null
null
UTF-8
Scilab
false
false
1,021
sce
qpipopt_x01.sce
//Find x in R^6 such that: // Check if the user gives unequal size of initial guess as of the number of variables conMatrix= [1,-1,1,0,3,1; -1,0,-3,-4,5,6; 2,5,3,0,1,0 0,1,0,1,2,-1; -1,0,2,1,1,0]; conLB=[1;2;3;-%inf;-%inf]; conUB = [1;2;3;-1;2.5]; lb=[-1000;-10000; 0; -1000; -1000; -1000]; ub=[10000; 100; 1.5; 100; 100; 1000]; //and minimize 0.5*x'*Q*x + p'*x with p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6); nbVar = 6; nbCon = 5; x0 = repmat(0,5,1); param = list("MaxIter", 300, "CpuTime", 100); [xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param) //Error // WARNING: qpipopt: Ignoring initial guess of variables as it is not equal to the number of variables // lambda = // // lower: [1x6 constant] // upper: [1x6 constant] // constraint: [1x5 constant] // output = // // Iterations: 13 // exitflag = // // 0 // fopt = // // - 14.843248 // xopt = // // 1.7975426 // - 0.3381487 // 0.1633880 // - 4.9884023 // 0.6054943 // - 3.1155623
9c1f1e32a9b4f30ab53270e3903d2f06aa355724
449d555969bfd7befe906877abab098c6e63a0e8
/1640/CH6/EX6.13/6_13.sce
3eaec8f915e9e705a41d917cbd27c94829ebf8a6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
261
sce
6_13.sce
clc //initialisation of variables i= 1/5000 C= 100 b= 50 //ft h= 10 //ft Q= 1000 //cuses g= 32.2 //ft/sec^2 //CALCULATIONS f= 2*g/C^2 m= (b*h)/(b+2*h) v= Q/(b*h) r= (i-(f*4/(2*g*m)))/(1-(2^2/(g*h))) s= i-r //RESULTS printf ('Slope = %.6f ',s)
e8f88745e269b80399c101bd0d4cd6449678cacf
449d555969bfd7befe906877abab098c6e63a0e8
/1046/CH9/EX9.2/s9_2.sce
1a33f928d1941b86f312639e8beaf1d99a7fc246
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
1,238
sce
s9_2.sce
//Example 9.2 //Page no. 393 //calculae the steam requirement and the no. of tubes //if the height of the calandria is 1.5 m. //given ci=10 //%,initial concentration cf=40 //%, final conc Wf=2000 //kg/h, feed rate ft=30 //C feed temp. rp=0.33 //kg/cm^2, reduced pressure bt1=75 //C,boiling point temp. sst=115 //C, saturated steam temp. l=1.5 // m,height of calandria sh=0.946 //kcal/kg C, specific heat of liquir lh=556.5 //kcal/kg latent heat of steam bt2=345 //K, boiling point of water h=2150 //kcal/h m^2 C, overall heat transfer coefficient si=2000*(ci/100) //kg/h, solids in wi=1800 //kg/h,wate in Wp=si/(cf/100) //kg/h, product out Wv=Wf-Wp //evaporation rate ef=sh*(ft-bt1) ip=0 lamda_s=529.5 //kcal/kg, lamda_s=is-il bpe=(273+bt1)-345 //boiling point elevation. //from eergy balance eq. Ws=(Wp*ip+Wv*lh-Wf*ef)/lamda_s q=Ws*lamda_s //kcal/h,rate of heat transfer A=q/(h*(sst-bt1)) // m^2 di=0.0221 //m,inside diameter At=%pi*l*di //m^2, area of a single tube N=A/At //no. of tubes printf("The steam required is %f kg/h\n",Ws) printf("No. of tube are %f",N)
4f5825ef8bb86a6ef887f256a5a4e3ed2503d592
449d555969bfd7befe906877abab098c6e63a0e8
/2159/CH2/EX2.8/28.sce
d969dfd2d9f61a887e9022ecd62e5b278590542d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
158
sce
28.sce
// problem 2.8 h1=0.05 h2=0.015 s=41/40 l=h1/(s-1) w1=25 // applying bakance in vertical direction w=w1*(l+h1)/(h2) disp(w,"weight of ship in in N")
3c4659d875993e74b6ec05f6cf027460ad0c14a2
449d555969bfd7befe906877abab098c6e63a0e8
/824/CH7/EX7.7/7_7.sce
112f0256ebcace81355d9a398e7c9440129e2c1e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
263
sce
7_7.sce
//clear// clc clear exec("7.7data.sci"); for i=1:length(Curea) x(i)= 1/Curea(i); y(i) = 1/(-rurea(i)); end slope = (y(5)-y(1))/(x(5)-x(1)); plot2d(x,y) xtitle( 'Figure E7-7.1', '1/Curea', '1/-rurea' ) ; disp("(Km/Vma = slope") disp(slope)
a40228d0acff1d0a3862829c84fea9e67f094445
bf22bf34daeceb2106b5e2af1c24e480f628960c
/singlelayer-perceptron/perceptron-hebbian/scilab/perceptron_hebbian.sci
00cbf2632eff73d8bfb4d0a5586181cab4605629
[]
no_license
edielsonpf/neural-networks-examples
e3a045bf37e4b2ea681f05512ac71fdbb0cb4992
9fabec297b07987f3506401751719c56055d0f5f
refs/heads/master
2020-12-24T08:46:39.412676
2017-09-23T11:22:11
2017-09-23T11:22:11
32,630,396
1
1
null
null
null
null
UTF-8
Scilab
false
false
1,047
sci
perceptron_hebbian.sci
function [w,epoch]=perceptron_hebbian(x,w,d) //Inputs: // x: vector with training data. The inputs must be distributted in rows and the input sets in lines // w: vector with initial synaptic weight values // d: vector with the expected output values //Output: // wR: vector with resulted synaptic weight values // epoch: numer of training epoch //n: learning factor n=0.01; ERROR_EXIST = 1; ERROR_INEXIST = 0; [Input_Size,Samples_Size]=size(x) errors=ERROR_EXIST; epoch=0; while errors == ERROR_EXIST then errors = ERROR_INEXIST; //disp("Starting training epoch: "+string(epoch)); //Treining the system for all L sample training data for k=1:Samples_Size v=w'*x(:,k); //Activation function------------------------- y=sign(v); // if error exist if y~=d(k) then //Calculating the error in the i instant e=d(k)-y; dw=n*e.*x(:,k); w= w + dw; errors=ERROR_EXIST; end end epoch=epoch+1; end endfunction
c2eb2962069506bce0fd251c8612121a65ab82e9
7bf9b615fc7bd8790ccc10d5e8f07824d114a245
/ir_predict.sci
65b961a1c275fd684a06eb1d478f7bcd47638de2
[]
no_license
szhilin/scirt
91b4ea7c9f328999e8f5aa1799b0930256bcdde9
31ea78eb9e7fb547dd6d81fe86b89ccb9f4c761d
refs/heads/master
2021-01-09T06:00:49.769480
2017-02-05T15:56:33
2017-02-05T15:56:33
80,890,335
1
0
null
null
null
null
UTF-8
Scilab
false
false
3,378
sci
ir_predict.sci
function [yp, betap, exitcode, active] = ir_predict(Xp, X, y, epsilon) // Computes interval prediction for response y at the point x // using the interval regression constructed for dataset (X,y,epsilon) // // TODO: Fix bugs in algorithm of active constraints detection. // // Inputs: // Xtest (k x m)-matrix, contains points (row vectors) to predict at // X (n x m)-matrix of observations for X variables // y column n-vector of measured values of response variable y // epsilon real number or n-vector, half-width(s) of uncertainty // intervals for response variable y // // Outputs: // yp (k x 2)-matrix, interval regression predictions at points Xp(i,:), // yp(i,1) and yp(i,2) are, accordingly, lower and upper bounds // of predicted interval // betap (k x m x 2)-matrix, regression parameters values providing // interval prediction yp(i), beta(i,:,1) and beta(i,:,2) // correspond to lower and upper bounds of yp accordingly // exitcode integer exit code // 1 Ok, solution is found // -1 Unbounded solution set (colinearity in the data) // -2 No feasible solution (feasible parameters set is empty) // active k-element array of structs with fields 'lower' and 'upper', // active(i).lower and active(i).upper contains vectors of // active constraints (observations) which limit the lower and // upper bounds of a predicted interval yp(i,:) // // Example: // /// Simulate observations for simple dependency y = b(0) + b(1)*x // b = [1; 1]; // simulated dependency parameters // n = 5; // number of observations // epsilon = 0.5; // error bound // X = [ ones(n,1) (1:5)' ]; // X values // y = X*b + epsilon*rand(n,1)-0.5; // y values with bounded errors // figure; // ir_scatter(X,y,epsilon); // Show interval dataset in black // Xp = [1 2.5; 1 5.5]; // Set points where to predict // [yp, betap, exitcode] = ir_predict(Xp, X, y, epsilon); // Predict dependency values // ir_scatter(Xp,yp,'b.'); // Show predicted intervals in blue if size(Xp,2) ~= size(X,2) error('Xp must have the same number of columns as X'); end k = size(Xp,1); n = size(X,1); m = size(X,2); A = [X; -X]; b = [y+epsilon; -y+epsilon]; // Allocate matricies and structures yp = zeros(k,2); betaplow = zeros(size(Xp)); betaphigh = betaplow; active = struct('lower',[],'upper',[]); for i = 1:k [betalow, flow, exitcode, actlow] = ir_linprog(Xp(i,:), A, b); if exitcode < 0 mprintf("%d - lower: %d", i, exitcode); return end [betahigh, fhigh, exitcode, acthigh] = ir_linprog(-Xp(i,:), A, b); if exitcode < 0 mprintf("%d - upper: %d", i, exitcode); return end yp(i,:) = [flow, -fhigh]; betaplow(i,:) = min(betalow',betahigh'); betaphigh(i,:) = max(betalow',betahigh'); active(i).lower = [actlow.lower; acthigh.lower]; active(i).upper = [actlow.upper; acthigh.upper]; end betap = cat(3,betaplow,betaphigh); endfunction // ir_predict
d08fd10718bb48e83c79949a6451ca2dffe61f76
47adabef6eb8924aff50314b05cfd89f90e19aec
/macros/http_get_url.sci
4e2e160d84cdab33efc61c681bbfad0be397c6d4
[ "BSD-3-Clause" ]
permissive
sengupta/scilab-http
acf41286543dfadb62bfbf1fc74d19cd6ec65815
114ac7ab3a55e08399a82e8a1c084bc23cace3a3
refs/heads/master
2021-03-12T20:38:08.900774
2012-04-03T13:14:33
2012-04-03T13:14:33
3,886,870
1
0
null
null
null
null
UTF-8
Scilab
false
false
201
sci
http_get_url.sci
function response = http_get_url(URL, varargin) [host, resource, port] = http_split(URL) // Get hostname and resource from URL response = http_get(host, resource, port, varargin) endfunction
a1483f89c802116ee31688b3738679a288398b52
449d555969bfd7befe906877abab098c6e63a0e8
/2699/CH2/EX2.11/Ex2_11.sce
924271f2d47f4bcff05f833f08a22d409e030695
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex2_11.sce
//EX2_11 PG-2.38 clc If=30e-3;//forward current T1=25+273;//temperature in degree kelvin disp("Therefore at a temperature of 25 Degree C ") Rf=26e-3/If; printf("\n dynamic resistance is %.3f ohm \n",Rf) disp("Therefore at a temperature of 75 Degree C ") T2=75+273//Temperature in degree kelvin Rf=Rf*(T2/T1); printf("\n dynamic resistance is %.3f ohm",Rf)
5824aa0a85e89acc44085017d2733e3e9cb57ffc
449d555969bfd7befe906877abab098c6e63a0e8
/3293/CH1/EX1.13/Ex1_13.sce
49d5376b3ce31427ab9f0f0097873e7fd5208adf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
471
sce
Ex1_13.sce
//page 20 //Example 1.13 clear; close; clc; disp('A 2*2 elementary matrix is one of the following:'); A = [0 1;1 0]; disp(A); disp('---------------------'); disp('1 c'); disp('0 1'); disp('---------------------'); disp('1 0'); disp('c 1'); disp('---------------------'); disp('c 0'); disp('0 1'); disp('where, c is not equal to 0'); disp('---------------------'); disp('1 0'); disp('0 c'); disp('where, c is not equal to 0'); //end
8a7680575cf4c11442b312e2997e544e0f9924a7
449d555969bfd7befe906877abab098c6e63a0e8
/1913/CH1/EX1.26/ex26.sce
32979da10dc2b36967a588ed67a5412bfeafef37
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
439
sce
ex26.sce
clc clear //Input data do=0.902*10^3;//Density of oil in kg/m^3 Pg=2*10^5;//Gauge pressure in N/m^2 g=9.81;//Gravity in m/sec^2 ho=2;//Level of oil in m d=2;//Diameter of cylinder in m pi=3.141595;//Constant value of pi //Calculations A=(pi/4)*d^2;//Area of cylinder Po=do*g*ho;//Pressure due to oil in N/m^2 W=(Pg+Po)*A;//Weight of the piston in N //Output printf('The total weight of piston and slab W = %3.2f N ',W)
5cf035529ca72c0248885080afd8ce0d77ccfbac
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/goertzel/goertzel8.sce
8aef0da53a1441f3060b9a2a50f62abcc3d10dca
[]
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
175
sce
goertzel8.sce
//no i/p args are passed to the function dft=goertzel(); //output //!--error 4 //Undefined variable: X //at line 38 of function goertzel called by : //dft=goertzel();
169fcfe9b3d2f60b08d4b727f2b7a105167f29ee
449d555969bfd7befe906877abab098c6e63a0e8
/1697/CH4/EX4.4/Exa4_4.sce
15257deb7d4eef622f0e1da1573351cf3b6a0cfc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Exa4_4.sce
//Exa 4.4 clc; clear; close; //given data : n=10;//no. of elements //d=lambda/4 separation in meter disp("For broad side array : ") disp("D=2*n/(lambda/d)"); disp("Putting d=lambda/4 we get D=2*n/4") D=2*n/4;//directivity : unitless Ddb=10*log10(D);//in db disp(Ddb,"For broad side array D in db = "); disp("For end fire array : ") disp("D=4*n/(lambda/d)"); disp("Putting d=lambda/4 we get D=4*n/4") D=4*n/4;//directivity : unitless Ddb=10*log10(D);//in db disp(Ddb,"For end fire array D in db = ");
04947b05d465a8d31d5055233b50631f170778a9
449d555969bfd7befe906877abab098c6e63a0e8
/1862/CH11/EX11.8/C11P8.sce
dc6a64ee79eb27145ab0cffc30492ca9bddf2c5d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
398
sce
C11P8.sce
clear clc //to find spring compression // GIVEN:: //mass of body m = 3.63//in kg //speed of block v = 1.22//in m/s //force constant for spring k = 135//in // SOLUTION: //using work-energy principle //spring compression d = v*sqrt(m/k)//in meters d1 = d*10^2//in printf ("\n\n Spring compression d = \n\n %.3f m",d); printf ("\n\n Spring compression d = \n\n %.1f cm",d1);
ab8a7aea42e0bb4c2975d977019f51f0566a2efd
449d555969bfd7befe906877abab098c6e63a0e8
/2090/CH3/EX3.4/Chapter3_Example4.sce
643f00dae919c5d5cc9b0cd458d663ddb503e1e4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,296
sce
Chapter3_Example4.sce
clc clear //Input data CO=12;//The composition of carbondioxide of combustion by volume in percentage C=0.5;//The composition of carbonmoxide of combustion by volume in percentage O=4;//The composition of oxygen of combustion by volume in percentage N=83.5;//The composition of nitrogen of combustion by volume in percentage o=32;//Molecular weight of the oxygen co=44;//Molecular weight of the carbondioxide c=12;//Molecular weight of the carbon s=32;//Molecular weight of the sulphur so=64;//Molecular weight of sulphur dioxide n1=28;//Molecular weight of the nitrogen h=2;//Molecular weight of the hydrogen //Calculations m=12+0.5;//Balancing carbon x=N/3.76;//Balancing nitrogen z=[x-(CO+(C/2)+O)]*2;//Balancing oxygen n=z*h;//Balancing hydrogen Af=[(x*o)+(N*n1)]/[(m*c)+(n)];//Air/fuel ratio As=[(18.46*o)+(69.41*n1)]/173.84;//Stoichiometric air/fuel ratio Ta=(Af/As)*100;//Percent theoretical air mc=[(m*c)/173.84]*100;//Composition of carbon on mass basis in percent mh=(n/173.84)*100;//Composition of hydrogen on mass basis in percent //Output printf(' (a)The air/fuel ratio = %3.2f \n (b)The percent theoretical air = %3.1f percent \n (c)The percentage composition of fuel on a mass basis : \n C = %3.1f percent \n H = %3.1f percent ',Af,Ta,mc,mh)
ca7da788473c523a84bcced6d6bf716a3a6c0354
449d555969bfd7befe906877abab098c6e63a0e8
/3831/CH6/EX6.5/Ex6_5.sce
0e152bf5d180ff35004edfe29ca8046630cac8e7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
413
sce
Ex6_5.sce
// Example 6_5 clc;funcprot(0); // Given data p_1=85.0;// psig p_2=10.0;// psig t=8.00;// hour m=20.0;// gal // Calculation mv=20.0/8.00;// gal/h mv=mv*0.13368*(1/3600);// ft^3/s W_shaft=mv*(p_1-p_2)*144;// ft.lbf/s W_shaft=W_shaft*(1/550);// hp W_shaft=W_shaft*746;// W W_shaft_ins=W_shaft*5*60*(1/2.50);// W printf("\nThe hydraulic power produced,(W_shaft)_instantaneous=%3.0f W",W_shaft_ins);
d73281ab4158e8a6a60a0a4783deef588394963a
b24d354cfcd174c92760535d8b71e22ced005d81
/DSP functions/tf2ca/test_4.sce
fe3099930ddfaccaf825aed7f4d7b79e5edae715
[]
no_license
shreniknambiar/FOSSEE-Signal-Processing-Toolbox
57ad8e2a71d64f95c4ccfd131e00095cf2b9c6f8
143cf61eff31240870dc0c4f61e32818a4482365
refs/heads/master
2021-01-01T18:25:34.435606
2017-07-25T18:23:47
2017-07-25T18:23:47
98,334,322
0
0
null
2017-07-25T17:48:00
2017-07-25T17:47:59
null
UTF-8
Scilab
false
false
312
sce
test_4.sce
// Test # 4 : When numerator is neither symmetric or anti-symmetric exec('./tf2ca.sci',-1); [d1,d2,b]=tf2ca([0.1 0.5 -0.1],[1 2 3]); //!--error 10000 //Numerator coeffcients must be either be symmetric or antisymmetric //at line 71 of function tf2ca called by : //[d1,d2,b]=tf2ca([0.1 0.5 -0.1],[1 2 3])
d15857d28cb2c0a8f1654e07cced548dc2140254
0ac35cb9a05dd4a300456b1570d4a79e5bde2e95
/LMS_Identification_System.sce
3e66528f390cfd40349cf7c859ee5d8ec3147186
[]
no_license
nardiniqueiroz/Adaptative-Filtering
1b35ffbb9f598cfcd4260d12a5f13b00f4490569
5dbb78e89d25447af51b2d054df764328c1c53e8
refs/heads/master
2021-01-05T17:40:07.176874
2020-02-17T11:48:58
2020-02-17T11:48:58
241,092,953
0
0
null
null
null
null
UTF-8
Scilab
false
false
731
sce
LMS_Identification_System.sce
//identificação de sistemas utilizando LMS clear; clc; rand("normal"); N = 2000; hn = [1.2 0.8 0.6]; sigma1 = 0.2; E = rand(1,N); xn = filter(hn,1,E)'; W = [1 2 3]; n = sigma1*rand(1,N); rx = xcorr(xn,2,'biased'); Rx = [rx(3:5) rx(2:4) rx(1:3)]; tr = Rx(1,1)+Rx(2,2)+Rx(3,3); [Q,lambda]=spec(Rx); lambdamax=max(lambda); // Computacao iterativa c = 0.1 mi = c/(2*lambdamax+tr); wn = [0 0 0]'; // filtro unitario inicial d = filter(W,1,xn)+n'; w = zeros(3,N); xb = [0 0 0]'; for n=1:length(xn) xb = [xn(n);xb(1:2)]; yn = wn'*xb; y(n) = yn; e(n) = d(n)-y(n); // calculo do grad estimado grade = -2*e(n)*xb; wn = wn - mi*grade; w(:,n) = wn end plot2d(w');
18a923902f5ad5203de8dd023ace9e7f64a2d182
a92ddf9c687a61acf6d76aae621bc44de12bf074
/algoritmo_genetico.sce
8b7afa75a653ce68f2b5c82e0807ea49229eded2
[ "MIT" ]
permissive
ademarazn/GENETIC_ALGORITHM
badedb6112baf24f4bd3f5e8552a56866f2d19b6
8a0a44cf3a637bb4a0139b70066e2fee6e897933
refs/heads/master
2021-09-10T17:56:50.227233
2018-03-30T15:11:53
2018-03-30T15:11:53
109,055,839
1
0
null
null
null
null
UTF-8
Scilab
false
false
6,818
sce
algoritmo_genetico.sce
clc; clear; // Função para gerar uma nova população function [new_pop]=nova_populacao(nPop, nPrecInd) population = round(rand(nPop, nPrecInd)); for i = 1:nPop do new_pop(i) = strcat(string(population(i,:))); end endfunction // Função para encontrar o fitness function [fitness] = avaliafitness(pop) [nPop, nPrecInd] = size(pop); for i = 1:nPop do j=1; soma = 0.0; mult = 1.0; for k = 1:10 do xi = converter(part(pop(i),j:j+15)); j=j+16; soma = soma + xi^2 / 4000.0; mult = mult * cos(xi / sqrt(k)); end fitness(i) = 1.0 + soma - mult; end endfunction // Função para converter de binário para decimal e // colocar na escala de -5.12 a 5.12 function[valor] = converter(varbinario) valor = bin2dec(strcat(string(varbinario))); // recebe binário, transforma // para string, concatena todas as colunas do individuo, // e transforma para decimal aux = valor; precisao = 16; a = -5.12; b = 5.12; resultado = a + aux *(b-a) / 2^precisao - 1; valor = resultado; endfunction // Roda Roleta // a) recebe população e fitness function [new_pop]=roda_roleta(pop, fitness) // b) coloca em ordem crescente/decrescente o vetor fitness [fitness, old_pos] = gsort(fitness, "g", "d"); // c) ordena a população conforme vetor fitness for i = 1:size(pop,1) do pop_asc(i) = pop(old_pos(i)); end // d) inverter o fitness para que o menor número tenha maior possibilidade // de ser escolhido. soma=sum(fitness); for n=1:size(pop,1) do if fitness(n) == 0 then acumulado(n) = 0; else acumulado(n) = (fitness(n) / soma); end end soma=sum(acumulado); for n=1:size(pop,1) do if acumulado(n) ~= 0 then acumulado(n) = acumulado(n) / soma; end end // e) selecionar um número aleatório para encontrar um indivíduo para // compor a nova população - realizar este passo n vezes, // onde n = nIndividuos. cs = cumsum(acumulado); new_pop = []; n = 1; while size(new_pop, 1) < size(pop, 1) do r = rand(); for i=1:size(pop,1) do if cs(i) > r & size(new_pop, 1) < size(pop, 1) then new_pop(n) = pop_asc(i); n = n+1; end end end endfunction // Função para fazer cruzamento function [Crossed_Indiv1, Crossed_Indiv2] = crossover(Indiv1,Indiv2) MultiCrossNb = 1; BinLen = length(Indiv1); // Crossover positions selection mix = unique(gsort(sample(MultiCrossNb, 1:BinLen-1), "g", "i"))'; Crossed_Indiv1 = Indiv1; Crossed_Indiv2 = Indiv2; for j = 1:size(mix, "*") do H1 = part(Crossed_Indiv1, 1:mix(j)); //Head for Indiv1 T1 = part(Crossed_Indiv1, (mix(j) + 1):BinLen); //Tail for Indiv1 H2 = part(Crossed_Indiv2, 1:mix(j)); //Head for Indiv2 T2 = part(Crossed_Indiv2, (mix(j) + 1):BinLen); //Tail for Indiv2 Crossed_Indiv1 = [H1 + T2]; Crossed_Indiv2 = [H2 + T1]; end endfunction // Função para fazer mutação function [Mut_Indiv1, Mut_Indiv2] = mutation(Indiv1, Indiv2) MultiMutNb = 1; dim = length(Indiv1); pos = grand(1, MultiMutNb, "uin", 1, dim); pos = unique(pos); Mut_Indiv1 = Indiv1; Mut_Indiv2 = Indiv2; for i = 1:size(pos, '*') do Mut_Indiv1 = [part(Mut_Indiv1, 1:pos(i) - 1), .. part(Mut_Indiv1, pos(i)), part(Mut_Indiv1, pos(i) + 1:dim)]; if Mut_Indiv1(2) == "0" then Mut_Indiv1(2) = "1"; else Mut_Indiv1(2) = "0"; end Mut_Indiv1 = strcat(Mut_Indiv1); Mut_Indiv2 = [part(Mut_Indiv2, 1:pos(i) - 1), .. part(Mut_Indiv2, pos(i)), part(Mut_Indiv2, pos(i) + 1:dim)]; if Mut_Indiv2(2) == "0" then Mut_Indiv2(2) = "1"; else Mut_Indiv2(2) = "0"; end Mut_Indiv2 = strcat(Mut_Indiv2); end endfunction // Gerar população inicial nPop = int(input('Digite a quantidade de indivíduos da população: ')); nPrecInd = 160; probCross = double(input('Digite a probabilidade de crossover: ')); probMut = double(input('Digite a probabilidade de mutação: ')); nVar = 16; nIter = 10000; bf = ([]); aux = 1; disp('Executando...'); tic(); //começa pop = nova_populacao(nPop, nPrecInd); // pop = [1,1,0,0,1,0;0,0,1,0,1,1;1,1,1,0,0,0;1,0,1,1,0,1]; if modulo(nPop, 2) ~= 0 then printf('\nO tamanho da população deve ser um número PAR!'); abort; end // Verificando se nVar é divisor de nPrecInd if modulo(nPrecInd, nVar) ~= 0 then printf('\nO valor de nVar deve ser divisor do .. valor de nPrecInd que é %d', nVar, nPrecInd); abort; end // Avaliar a função objetivo funcprot(0); fitness = avaliafitness(pop); // Seleção usando roda da roleta pop = roda_roleta(pop, fitness); nFob = nPop; // LOOP PRINCIPAL DE OTIMIZAÇÃO while nFob < nIter do // PARA cada membro da população for m = 1:2:nPop do // Escolher filho1 e filho2 filho1 = pop(m); filho2 = pop(m+1); // Crossover pCross = rand(); if pCross < probCross then [filho1, filho2] = crossover(strcat(string(filho1)), .. strcat(string(filho2))); end // Mutation usando os novos filho1 filho2 pMut = pCross; if pMut < probMut then [filho1, filho2] = mutation(strcat(string(filho1)), .. strcat(string(filho2))); end // Add filhos na população no lugar dos selecionados pop(m) = filho1; pop(m+1) = filho2; // FIM end // Avaliar fitness funcprot(0); fitness = avaliafitness(pop); // Seleção usando roda roleta pop = roda_roleta(pop, fitness); nFob = nFob + nPop; // add o melhor fitness (best fitness) na variável "bf" bf(aux, 1) = max(fitness); bf(aux, 2) = mean(fitness); bf(aux, 3) = min(fitness); aux = aux + 1; // FIM LOOP end tempo = toc(); // termina plot(bf(:,1), 'o-r'); plot(bf(:,2), 'o-g'); plot(bf(:,3), 'o-b'); title('Gráfico do Fitness'); xlabel('Fitness'); ylabel('Valor'); legend('Máximo', 'Médio', 'Mínimo'); printf('\nLevou %f segundo(s) para terminar', tempo); printf('\n\nMenor fitness encontrado: %f', min(bf)); clear('i','m','filho1','filho2','fitness','pMut',.. 'pCross','nFob','nIter','nVar');
9e75dfc64e16d78e1a4f6d7c2ec3121bfa096a78
449d555969bfd7befe906877abab098c6e63a0e8
/671/CH4/EX4.40/4_40.sce
3333f6e04132d71c694ab0cd7eb9bfab86aed36d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
267
sce
4_40.sce
V=240 w=100*%pi R=6 Vr=120 I=Vr/R t=(205/I)^2 ////t=r^2+Xl^2 r=((240/I)^2-t-R*R)/2/R ///this part solved wrong in the book Xl=sqrt(t-r*r) Z=sqrt(t) disp(r) disp(Xl) disp(Z) Pl_choke=I*I*r disp(Pl_choke) pf=Pl_choke/205/20 disp(pf)
ae7234144ff4f5b8cbf1bae90a29a8ef1209c32b
bd9ba5abb6de1e9d9485b5e98b2b68868aab21db
/Graph/plot using plot2d keyword and using numbers for changing marker.sce
282f1027612f7062cb49ce650fb732d0340648c8
[]
no_license
ShubhamRattra/Scilab_programs
c61b6538a064afe82c99507c1064cd55bbd870fa
de2bf6ab0de0b1a19c4903bb13819edc39f93d0e
refs/heads/master
2023-03-04T17:53:58.414180
2021-02-11T08:08:11
2021-02-11T08:08:11
296,920,175
2
2
null
2021-01-11T15:53:39
2020-09-19T17:37:42
Scilab
UTF-8
Scilab
false
false
118
sce
plot using plot2d keyword and using numbers for changing marker.sce
x = [0 : 0.1: 2*%pi]; y = sin(x); plot2d(x, y, -3); // markers are represented by negative no. plot2d(x, y, -2);
5b4b091aabb23e99e9bfbbf4bb91f396cbaf35ee
449d555969bfd7befe906877abab098c6e63a0e8
/2375/CH8/EX8.6/ex8_6.sce
bb5ca840212e5df4d301b41d3ed68c59e765d540
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
563
sce
ex8_6.sce
// Exa 8.6 clc; clear; close; format('v',6) // Given data V_DD = 10;// in V R_D = 5.1;// in k ohm R_D = R_D * 10^3;// in ohm g_m = 2*10^-3;// in S r_d = 50;// in k ohm r_d = r_d * 10^3;// in ohm Vi = 0;// in V R_G = 1;// in Mohm R_G = R_G * 10^6;// in ohm // (i) Input impedance Zi = R_G;// in ohm Zi= Zi*10^-6;// in M ohm disp(Zi,"The input impedance in Mohm is"); // (ii) Output impedance Zo = (r_d*R_D)/(r_d+R_D);// in ohm disp(Zo,"The output impedance in ohm is"); // (iii) Voltage gain Av = -g_m*Zo; disp(Av,"The voltage gain is");
2dfa486ce903784673d57dd9cff7d170cc47422f
60a17277530e95f6b5826bc7732e39c428b69f8f
/coefficients.sce
bbb18c35d707b9d370e77cfcc632b4e8be787a54
[]
no_license
solotims/scilab
787772371946d159cb27809783cf6d4c6193c318
810d4b34aa7f2b8b4393eafa268a6496d3c04e18
refs/heads/master
2020-04-21T13:32:20.234766
2019-02-17T18:31:44
2019-02-17T18:31:44
169,602,191
0
0
null
2019-02-07T16:23:40
2019-02-07T16:23:40
null
UTF-8
Scilab
false
false
2,108
sce
coefficients.sce
data = read("test3.txt",-1,3); //чтение эксперимента function e = G(a,z), //функция для расчета амплитуды напряжения и частоты синусоиды МНК e = z(2) - (a(1) * sin(a(2)* z(3))); endfunction a0 = [1; 1]; //[aa, error1] = datafit(G, data',a0) // расчет амплитуды напряжения и частоты синусоиды //проверка аппроксимации построением графика //disp(aa) //t(:,1) = 0:0.01:20 //t(:,2) = aa(1) * sin(aa(2) * t(:,1)) //plot(data(:,3), data(:,2)) //plot(t(:,1), t(:,2), "r-.") global J R w U JR J=0.00259; R=4.5; w=aa(2); U=aa(1); JR=J*R function e = GG(k,z), //функция для расчета коэффициентов kf ke и km МНК global JR R w U e = z(1) - ((k(3)*U)/(k(1)*R+k(2)*k(3))*(w^(-1)*(1-cos(w*z(3)))-JR^2/((k(1)*R+k(2)*k(3))^2+(U*k(3))^2)*((k(1)*R+k(2)*k(3))/JR*sin(w*z(3))-w*cos(w*z(3))+w*exp(-(k(1)*R+k(2)*k(3))/JR*z(3))))) //для u=Usin(wt) //e = z(1) - U*k(3)*JR/((k(1)*R+k(2)*k(3))^2)*((k(1)*R+k(2)*k(3))/JR*z(3)-1+exp(-((k(1)*R+k(2)*k(3))/JR)*z(3))) //для u = const endfunction k0 = [0.3; 0.3; 0.3] //[kk, error2] = datafit(GG, data', k0) //расчет коэффициентов kf ke и km //проверка аппроксимации построением графика disp(kk) //t1(:,1) = 0:0.01:20 //t1(:,2) = (kk(3)*U)/(kk(1)*R+kk(2)*kk(3))*(w^(-1)*(1-cos(w*t1(:,1)))-JR^2/((kk(1)*R+kk(2)*kk(3))^2+(U*kk(3))^2)*((kk(1)*R+kk(2)*kk(3))/JR*sin(w*t1(:,1))-w*cos(w*t1(:,1))+w*exp(-(kk(1)*R+kk(2)*kk(3))/JR*t1(:,1)))) //t(:,2) = kk(3)*JR/((kk(1)*R+kk(2)*kk(3))^2)*((kk(1)*R+kk(2)*kk(3))/JR*t1(:,1)-1+exp(-((kk(1)*R+kk(2)*kk(3))/JR)*t1(:,1))) //plot(data(:,3), data(:,1)) //plot(t1(:,1), t1(:,2), "r-.") //Рассчет коэффициентов PID //nob=3 //"3" для бинома Ньютона и "2" для функции Баттерворта //w0= //K = (kk(1)*R+kk(2)*kk(3))/JR //kd=nob*J*w0-K //kp=nob*J*w0^2 //ki=J*w0^3
6d92d5c94ec9f82530c7fbf4a462a325ec50e465
449d555969bfd7befe906877abab098c6e63a0e8
/55/CH7/EX7.1/7ex1.sci
67caf6f11933a329e8e7713b5491f2f4982c5b2d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,345
sci
7ex1.sci
S=[1,2,3,4,5,6]; //sample space for the rolling of a die A=[2,4,6]; //event that an even number occurs B=[1,3,5]; //event that an odd number occurs C=[2,3,5]; //event that a prime number occurs disp(union(A,C),'sample space for the event that an even or a prime number occurs') disp(intersect(B,C),'sample space for the event that an odd prime number occurs') disp(setdiff(S,C),'sample space for the event that a prime number does not occur') //It is the complement of the set C. intersect(A,B) //It is a null set or null vector since there can't occur an even and an odd number simultaneously H=0; //"head" face of a coin T=1; //"tail" face of a coin S=["000","001","010","011","100","101","110","111"] ; //sample space for the toss of a coin three times A=["000","001","100"]; //event that two more or more heads appear consecutively B=["000","111"]; //event that all tosses are the same disp(intersect(A,B),'sample space for the event in which only heads appear') disp('Experiment:tossing a coin until a head appears and then counting the number of times the coin is tossed') S=[1,2,3,4,5,%inf] //The sample space has infinite elements in it disp("Since every positive integer is an element of S,the sample space is infinite")
a97346f10fc3a9aff78ba8ebec54d47785e01ba8
449d555969bfd7befe906877abab098c6e63a0e8
/548/CH5/EX5.08/5_08.sce
d67f76e2de9c10bc01927700b9f65b3b5cecafa2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
291
sce
5_08.sce
pathname=get_absolute_file_path('5_08.sce') filename=pathname+filesep()+'5_08data.sci' exec(filename) Cn=integrate('1-0.95*y','y',0,1.0)-integrate('1-300*y^2 ','y',0,0.1)-integrate('-2.2277+2.2277*y','y',0.1,1.0) printf("\Answer:\n") printf("\n\Normal force coefficient : %f \n\n",Cn)
42831e832220461031869b1607ec6a9f037ea944
449d555969bfd7befe906877abab098c6e63a0e8
/2223/CH18/EX18.12/Ex18_12.sce
8645e5951b201d055e1521acf4b322c8b18dd803
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,202
sce
Ex18_12.sce
// scilab Code Exa 18.12 turbo prop Gas Turbine Engine Ti=268.65; // in Kelvin n_C=0.8; // Compressor Efficiency c1=85; // entry velocity in m/s m=50; // mass flow rate of air in kg/s R=287; gamma=1.4; // Specific Heat Ratio cp=1.005; // Specific Heat at Constant Pressure in kJ/(kgK) u=500/3.6; // speed of a turbo prop aircraft in m/s delT=225; // temperature rise through the compressor(T02-T01) in K pi=.701; // Initial Pressure in bar n_D=0.88; // inlet diffuser efficiency a_i=sqrt(gamma*R*Ti); Mi=u/a_i; Toi_i=1/0.965; // (Toi/Ti)from isentropic flow gas tables at Mi and gamma values T01=Ti*Toi_i; T1=T01-(0.5*(c1^2)/(cp*1e3)); //part(a) T1s_i=1+n_D*((T1/Ti)-1); // (T1s/Ti)isentropic temperature ratio through the diffuser p1_i=T1s_i^(gamma/(gamma-1)); // (p1s/pi)isentropic pressure ratio p1=p1_i*pi; delp_D=p1-pi; disp("bar",delp_D,"(a)isentropic pressure rise through the diffuser is") // part(b) compressor pressure ratio T02s=T01+(delT*n_C); r_oc=(T02s/T01)^(gamma/(gamma-1)); //compressor pressure ratio(p02/p01) disp(r_oc,"(b)compressor pressure ratio is") // part(c) P=m*cp*delT; disp("MW",P*1e-3,"(c)power required to drive the compressor is")
65b690229389a58042795e6f0dc0db2b550c0a53
449d555969bfd7befe906877abab098c6e63a0e8
/1430/CH6/EX6.17/exa6_17.sce
3c728276072df20463b80f30e1b39a4b7e8d0ea9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
648
sce
exa6_17.sce
// Example 6.17 // AC Superposition Calculations // from figure 6.40(b),apply node equation we get V_c1=poly(0,'V_c1'); P_1=(1/50+%i/10-%i/20)*V_c1-60/(%i*20); // Node equation V_c1=roots(P_1); // Now from figure 6.40(c) V_c2=poly(0,'V_c2'); P_2=(1/50+%i/25-%i/8)*V_c2-(%i*3); // Node equation V_c2=roots(P_2); V_c1_m=abs(V_c1); phase_v_c1=atan(imag(V_c1),real(V_c1))*(180/%pi); V_c2_m=abs(V_c2); phase_v_c2=atan(imag(V_c2),real(V_c2))*(180/%pi); omega_1=5; omega_2=2; t=0:0.01:10; v_c=V_c1_m*cos(omega_1*t+phase_v_c1)+V_c2_m*cos(omega_2*t+phase_v_c2); plot(t,v_c,'r'); xlabel('t'); ylabel('v_c(t)') title('Voltage Waveform')
d4b28b14a111bb44bed61510219372db59626605
449d555969bfd7befe906877abab098c6e63a0e8
/275/CH8/EX8.8.21/Ch8_8_21.sce
2c73f7a3a7b6d0bd9c026c335870f4e59351027a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,355
sce
Ch8_8_21.sce
clc clear disp("Example 8.21") printf("\n") disp("Add the following binary numbers") disp("a)11011 & 10110 b)1100 & 111 c)10.1011 & 11.011") //Given binary number i=1;w=1 a=11011 b=10110 //Given binary number i=1;w=1 bin=11.101 //separating integer part IPa=floor(a) IP1a=IPa //separating decimal part DPa=modulo(a,1) DP1a=DPa //converting decimal value to interger p=4 DPa=DPa*10^p //should change power of 10 as according to number of digits in decimal digit //storing each integer digit in I(i) while(IPa>0) Ia(i)=modulo(IPa,10); IPa=floor(IPa/10); i=i+1; end //storing each decimal digit in D(w) while(DPa>0) Da(w)=modulo(DPa,2) DPa=(DPa/10) DPa=floor(DPa) w=w+1; end //to do zero padding of remaining erm of D(w) if(DP1a<1) if(DP1a>0) if(length(Da)<p) q=length(Da) for f=q+1 :p Da(f)=0 end end end end if(IP1a>0) for i=1:length(Ia)//checking whether it is a binary number or not if(Ia(i)>1) then disp('not a binary number') abort end end end if(IP1a>0) IPa=0 for i=1:length(Ia) //multipliying bits of integer part with their position values and adding IPa=IPa+(Ia(i)*2^(i-1)) end end DPa=0 if(DP1a>0) if(DP1a<1) for z=1:length(Da) //multipliying bits of decimal part with their position values and adding DPa=DPa+(Da(z)*2^(-1*(length(Da)+1-z))) end end end decimala=IPa+DPa //displaying the output disp(decimala) //for b //Given binary number i=1;w=1 //separating integer part IPb=floor(b) IP1b=IPb //separating decimal part DPb=modulo(b,1) DP1b=DPb //converting decimal value to interger p=3 DPb=DPb*10^p //should change power of 10 as according to number of digits in decimal digit //storing each integer digit in I(i) while(IPb>0) Ib(i)=modulo(IPb,10); IPb=floor(IPb/10); i=i+1; end //storing each decimal digit in D(w) while(DPb>0) Db(w)=modulo(DPb,2) DPb=(DPb/10) DPb=floor(DPb) w=w+1; end //to do zero padding of remaining erm of D(w) if(DP1b>0) if(DP1b<1) if(length(Db)<p) q=length(Db) for f=q+1 :p Db(f)=0 end end end end if(IP1b>0) for i=1:length(Ib)//checking whether it is a binary number or not if(Ib(i)>1) then disp('not a binary number') abort end end end if(IP1b>0) IPb=0 for i=1:length(Ib) //multipliying bits of integer part with their position values and adding IPb=IPb+(Ib(i)*2^(i-1)) end end DPb=0 if(DP1b>0) if(DP1b<1) for z=1:length(Db) //multipliying bits of decimal part with their position values and adding DPb=DPb+(Db(z)*2^(-1*(length(Db)+1-z))) end end end decimalb=IPb+DPb //displaying the output disp(decimalb) sum1=decimala+decimalb i=1;x=1 //separating integer part IP=floor(sum1) IP1=IP //separating decimal part DP=modulo(sum1,1) //storing each integer digit in I(i) while(IP>0) I(i)=(modulo(floor(IP),2)) IP=floor(IP)/2 i=i+1 end if(IP1>0) IP=0 for j=1:length(I) //multipliying bits of integer part with their position values and adding IP=IP+(I(j)*10^(j-1)); end else IP=0 end //storing each decimal digit in D(x) while(x<=4) DP=DP*2 D(x)=floor(DP) x=x+1 DP=modulo(DP,1) end DP=0 for j=1:length(D) //multipliying bits of decimal part with their position values and adding DP=DP+(10^(-1*j)*D(j)) end Binary=IP+DP; printf("Sum") disp(Binary)
0b1ab2e7a4daba96dcf2f25ea654e3d681eb97d6
b6b875fb04ec6df2c0fb0d28f36962fa9aebb2bf
/TD2/Malthus/malthusJour.sce
c6cae0897b46cdfe05a846579f9108f254ad20eb
[]
no_license
MFrizzy/Modelisation
51794b2edf421f9d2206cb73972d8d8d7b1e9759
0ca819afbcbe00f58f3bbaa8fc97164ae2c1d3cb
refs/heads/master
2021-08-29T12:02:20.042037
2017-12-13T22:39:21
2017-12-13T22:39:21
106,943,303
0
0
null
null
null
null
UTF-8
Scilab
false
false
587
sce
malthusJour.sce
clear clf b = 0.1; d = 0.05 ; r = b - d; xj(1) = 1; h = 1 / 30; ndate_j = 0:h:20; for n = 1:length(ndate_j) - 1 xj(n+1) = (1 + r * h) * xj(n); end //plot2d(ndate_j, xj, style = 3); xh(1) = 1; // Condition initiale du modèle en jours h = 1 / (30 * 24); // Le pas de temps est l'heure ndate_h = 0:h:20; // vecteur des dates for n = 1:length(ndate_h) - 1 xh(n+1) = (1 + r * h) * xh(n); end plot2d(ndate_h, xh, style = 4) b = 0.1; d = 0.05 ; x(1) = 1; r = b - d; h = 1; ndate = 0:20 for n = 1:20 x(n+1) = (1 + r ) * x(n); end plot2d(ndate, x, style = 2, rect=[0,0,20, 3])
779a2f25f41ec1504c4979e5f6a6b7e93baa8963
449d555969bfd7befe906877abab098c6e63a0e8
/1544/CH3/EX3.10/Ch03Ex10.sce
6ec4e12d56d58e5e73c8cd1e2829ad90a8f3917a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,335
sce
Ch03Ex10.sce
// Scilab code Ex3.10: Pg 90-91 (2008) clc; clear; C_1 = 6e-06; //Capacitance, F C_2 = 4e-06; //Capacitance, F V = 150; // Supply voltage, V // Part (a) // The reciprocal of the resulting capacitance of capacitors connected in series is the sum of the reciprocal of the individual capacitances present in the circuit i.e 1/C = 1/C1 + 1/C2, solving for C C = ( C_1*C_2 )/(C_1 + C_2); // Resulting capacitance, F // Part (b) Q = V*C; // Electric charge on the capacitors, C // Part (c) V_1 = Q/C_1; // P.d across capacitor C_1, V V_2 = Q/C_2; // P.d across capacitor C_2, V printf("\nThe total capacitance of the combination = %3.1f micro-farad", C/1e-06); printf("\nThe charge on each capacitor = %3d micro-coulomb",Q/1e-06); printf("\nThe p.d. developed across %1d micro-farad capacitor = %2d V", C_1/1e-06, V_1); printf("\nThe p.d. developed across %1d micro-farad capacitor = %2d V", C_2/1e-06, V_2); // Result // The total capacitance of the combination = 2.4 micro-farad // The charge on each capacitor = 360 micro-coulomb // The p.d. developed across 6 micro-farad capacitor = 60 V // The p.d. developed across 4 micro-farad capacitor = 90 V
799269a9deef7f45967b78919fa6a2183642ee74
449d555969bfd7befe906877abab098c6e63a0e8
/3828/CH1/EX1.7/Ex1_7.sce
11449f9b5cb58baa773187aded664802c17c02b8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
344
sce
Ex1_7.sce
//Chapter 1 : Wave Optics clear; //Variable declaration lamda=5890*10**-10 //wavelength myu=1.33 //refractive index of glass n=1 //first minimum r=45 //angle in degrees cos_r=0.707 //Calculations t=(n*lamda)/(2*myu*cos_r)/10**-7 //Result mprintf("Thickness of the film t= %.3f*10**-4 mm",t)
f9e1fd778dddc45b0fecd84c1cdbd72b192b825e
449d555969bfd7befe906877abab098c6e63a0e8
/1739/CH3/EX3.12/Exa3_12.sce
a18db0abea539a30e21aa95af9e1929794286c69
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
443
sce
Exa3_12.sce
//Exa 3.12 clc; clear; close; //Given data : l=6;//in Km n1=1.5;//unitless delta=1//in % c=3*10^8;//speed of light in m/s //Part (a) deltaT=l*10^3*n1*(delta/100)/c;//in sec deltaT=deltaT*10^9;//in ns disp(deltaT,"Delay difference between the slowest and fastest modes at output in ns : "); //Part (b) B=1/(2*deltaT*10^-9);//in bps B=B*10^-6;//in Mbps disp(B,"Assuming no intersymbol interference, maximum bit rate in Mbps : ");
fafba82f69e19d128afc77bd1387adc7dc413149
449d555969bfd7befe906877abab098c6e63a0e8
/3637/CH2/EX2.4/Ex2_4.sce
d7b0c848b16a1efbba59c6d7f87a294c89290868
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
257
sce
Ex2_4.sce
//problem 4 pagenumber 2.87 //given format(6); r1=10e3;//ohm rf1=20e3;//ohm r2=5e3;//ohm //determine gain of amplifier a1=1+rf1/r1; a2=-rf1/r1; disp( 'Switch off gain = '+string(a1+a2));//no unit disp( 'Switch on gain = '+string(a2));//no unit
412c8a48bc09c1748666e01e7145cc827156f8dd
449d555969bfd7befe906877abab098c6e63a0e8
/1730/CH2/EX2.1/Exa2_1.sce
3c00348e3a7f6eb1cff31b2f60643cbe484dba52
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
259
sce
Exa2_1.sce
//Exa2.1 clc; clear; close; //given data : J=2.4; //in A/mm^2 J=2.4*10^6; //in A/m^2 n=5*10^28; //unitless e=1.6*10^-19; // in coulomb //Formula : J=e*n*v v=J/(e*n);//in m/s disp("Drift velocity is : "+string(v)+" m/s or "+string(v*10^3)+" mm/s")
e6a752f485f14f87a28702419e0d3775345179ec
449d555969bfd7befe906877abab098c6e63a0e8
/1646/CH17/EX17.13/Ch017Ex13.sce
b91b3c5696bdc6d3dad82078a7adb0ea5436d20c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
553
sce
Ch017Ex13.sce
// Scilab code Ex17.13 : Pg:895 (2011) clc;clear; e = 1.6e-019; // Energy equivalent of 1 eV, J/eV R_max = 0.75; // Radius of two dees of the cyclotron, m f = 15e+06; // Frequency of alternating potential, Hz m = 1.67e-027; // Mass of the proton, kg // As E = 1/2*q^2*R_max^2*B^2/(m*e) and f = q*B/(2*%pi*m), solving for E E = 2*%pi^2*m*f^2*R_max^2/(e*1e+06); disp(E) printf("\nEnergy of the protons issuing out of the cyclotron = %6.4f MeV", E); // Result // Energy of the protons issuing out of the cyclotron = 26.0754 MeV
f1712f3305dd70cc44d13b9e7bd179248ce8f8fb
7c82ece01341a445b10f5cccd1ff7c8614e1c5a2
/TP1_Linear system/Deflation.sci
9bbadfcceaa84607a9c45cf62b52642e1b852281
[ "MIT" ]
permissive
PaulEmmanuelSotir/TPs_3IF
87116bcf91d7f871f77bef26e35684f02c5ece87
51e1b82837bd2e9e01fe84721f127c469f1f24a7
refs/heads/master
2021-06-01T15:55:23.452046
2016-05-24T13:54:53
2016-05-24T13:54:53
43,512,483
0
0
null
null
null
null
UTF-8
Scilab
false
false
659
sci
Deflation.sci
function [vecs,lambdas] = Deflation(A,nbr_val_propre) // Output variables initialisation (not found in input variables) vecs=[]; lambdas=[]; // Display mode mode(0); // Display warning for floating point exception ieee(1); k = 30; // ! L.4: real(nbr_val_propre) may be replaced by: // ! --> nbr_val_propre if nbr_val_propre is Real. vecs = cell(real(nbr_val_propre),1); lambdas = zeros(nbr_val_propre,1); for i = mtlb_imp(1,nbr_val_propre) [v,lambda_v] = PuissancesIterees(A,k); [u,truc] = PuissancesIterees(mtlb_t(A),k); A = mtlb_s(A,(lambda_v*(v*u'))/(u'*v)); lambdas = mtlb_i(lambdas,i,lambda_v); vecs(i).entries = v; end; endfunction
984bf0d22d7614851ecea5fe7ff5cbaf6e9dc2c7
6813325b126713766d9778d7665c10b5ba67227b
/Chapter6/abc.sci
ed0c6fecb68e2d2e95cf9f54c8ede67e3d38cbd5
[]
no_license
arvindrachna/Introduction_to_Scilab
955b2063b3faa33a855d18ac41ed7e0e3ab6bd1f
9ca5d6be99e0536ba1c08a7a1bf4ba64620ec140
refs/heads/master
2020-03-15T19:26:52.964755
2018-05-31T04:49:57
2018-05-31T04:49:57
132,308,878
1
0
null
null
null
null
UTF-8
Scilab
false
false
72
sci
abc.sci
function [y]=f (a, b) y=a + b; endfunction a=10; b=5 c=f (a, b)
23e252280af87ff508422c1aec59f55ab61a44a4
449d555969bfd7befe906877abab098c6e63a0e8
/2198/CH2/EX2.11.3/Ex2_11_3.sce
370d991dafaf66609f0ea983931de4a1cec891bc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
463
sce
Ex2_11_3.sce
//Ex 2.11.3 clc;clear;close; format('v',8); //Given : Io1=2;//nA T1=10+273;//K V=0.4;//volt VT1=T1/11600;//V m=1.5;//for Si Eta=2;//for Si VGO=-1.21;//volt K=Io1*10^-9/T1^m/exp(VGO/Eta/VT1);//constant I1=Io1*10^-9*[exp(V/Eta/VT1)-1];//nA T2=70+273;//K VT2=T2/11600;//V Io2=K*T2^m*[exp(VGO/Eta/VT2)];//A I2=Io2*[exp(V/Eta/VT2)-1];//nA change=(I2-I1)/I1*100;//% disp(change,"% change in diode current : "); //Answer is wrong in the textbook.
05220de0855a850169b2a2b519b4a82791b11b2d
449d555969bfd7befe906877abab098c6e63a0e8
/191/CH5/EX5.7/Example5_7.sce
223cce35e7b3b1af870e0f96febca56a0d6079ae
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,182
sce
Example5_7.sce
//Illustration of Central Difference Formula close(); clear; clc; xi = 0:0.2:1.2; fi = sin(xi); x0 = 0; h = 0.2; format('v',8); // First order difference delta1_fi = diff(fi); // Second order difference delta2_fi = diff(delta1_fi); // Third order difference delta3_fi = diff(delta2_fi); // Fourth order difference delta4_fi = diff(delta3_fi); //Fifth order difference delta5_fi = diff(delta4_fi); //Sixth order difference delta6_fi = diff(delta5_fi); disp(fi , 'Values of f(x) : ') disp(delta1_fi , 'First Order Difference :') disp(delta2_fi , 'Second Order Difference :') disp(delta3_fi , 'Third Order Difference :') disp(delta4_fi , 'Fourth Order Difference :') disp(delta5_fi , 'Fifth Order Difference :') disp(delta6_fi , 'Sixth Order Difference :') //Calculating p2(0.67) xm = 0.6; x = 0.67; s = (x-xm)/0.2; p2 = fi(4) + {s*(delta1_fi(3)+delta1_fi(4))/2} + s*s*(delta2_fi(3))/2; disp(p2 , 'Value of p2(0.67) : '); //Calculating p4(0.67) p4 = p2 + s*(s*s-1)*(delta3_fi(3)+delta3_fi(2))/12 + s*s*(s*s-1)*delta4_fi(2)/24; disp(p4 , 'Value of p4(0.67) : '); //Exact value of sin(0.67) is 0.62099 so error in estimation err = 0.62099-0.62098; disp(err , 'Error in estimation : ');
93d362d739b1c4f1d56ce96f9ecf3fecbd133bb7
449d555969bfd7befe906877abab098c6e63a0e8
/1172/CH6/EX6.7/Example6_7.sce
2ef65448d8a5c8ed4ffd259a7194cf489850d221
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
412
sce
Example6_7.sce
clc //Given that c = 3e8 // speed of light in m/s v = 0.5 * c // speed of particle in m/s // sample problem 7 page No. 223 printf("\n \n\n # Problem 7 # \n") printf("\n Standard formula used \n m = m_o/sqrt ( 1- (v/c)^2)") ratio = sqrt(1- (v /c)^2) // calculation of Ratio of rest mass and relativistic mass of particle printf ("\n Ratio of rest mass and relativistic mass of particle is %f.", ratio)
5df3256e63ceba181f927336838fe10892ee8618
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.2/Unix/scilab-2.2/tests/display.tst
8ea1d3007fcbbce8e35533a720b6de9867b2aaf4
[ "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain", "MIT" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
717
tst
display.tst
//FICHIER_DE_TEST ADD NAME=DISPLAY.TST,SSI=0 // z=poly(0,'z') //lines(20,60) format('v',10) num=[ (((((1)*z-2.6533333)*z+2.6887936)*z-1.2916784)*z+0.2911572)*... z-0.0243497 (((((1)*z-2.6533333)*z+2.6887936)*z-1.2916784)*z+0.2911572)*... z-0.0243497 (((1)*z )*z )*z+1 0] den = [ ((((1)*z-1.536926)*z+0.8067352)*z-0.1682810)*z+0.0113508 ((((1)*z-1.536926)*z+0.8067352)*z-0.1682810)*z+0.0113508 ((1)*z )*z 1] num',den' [num;den] [num den] r=num./den r' // digits='abcdefghijklmnopqrstuvwxyz' numbers='1234567890' majuscules='ABCDEFGHIJKLMNOPQRSTUVWXYZ' symbols=',./;''[] \ =-!\$%^&*()_+~:""[]| @' [numbers;digits] [numbers digits;digits numbers] [numbers digits+digits+digits] ans'; [ans ans]
5fc58422fd155b405bd7b1f29e4dc6d00d8b44b3
449d555969bfd7befe906877abab098c6e63a0e8
/991/CH18/EX18.17/Example18_17.sce
24bc84b6e6f95c474edcb646888b6d39aa2b0b12
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
984
sce
Example18_17.sce
////Example 18.17. clc format(6) vi=15+3 // in V disp("Refer to fig.18.24. We know that") disp(vi," Vi_min(V) = Vo + 3V =") vi=18+1 // in V disp("Assuming the ripple voltage Vr = 2V(max), the input voltage is") disp(vi," Vi(V) = Vi(min) + Vr/2 =") vz=19/2 // in V disp(vz,"Then Vz(V) = Vi /2 = (use the zener diode 1N758 for 10V)") disp("Therefore, Vz = 10 V") disp(" Iz = 20 mA") r1=(19-10)/(20*10^-3) // in ohm disp(r1," R1(ohm) = Vi-Vz / Iz =") disp("Let I2 = IB(max) = 50 uA") r2=((15-10)/(50*10^-6))*10^-3 // in k-ohm disp(r2," R2(k-ohm) = Vo-Vz / I2 =") r3=(10/(50*10^-6))*10^-3 // in k-ohm disp(r3," R3(k-ohm) = Vz / I2 =") disp("Select C1 = 50 uF") disp("Specification of transistor Q1") vce=19+1 // in V disp(vce," VCE_max(V) = Vi_max(V) = Vi + Vr/2 =") disp(" IE = IL = 50 mA") p=((19-15)*50) // in mW disp(p," P(mW) = VCE*IL = (Vi-Vo) * IL =") disp("Use the transistor 2N718 for Q1")
30fccf3abb5c58c2be51581d4986213c9baa87cf
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set6/s_Electric_Machinery_And_Transformers_B._S._Guru_And_H._R._Hiziroglu_380.zip/Electric_Machinery_And_Transformers_B._S._Guru_And_H._R._Hiziroglu_380/CH5/EX5.5/Ex5_5.sce
1a157e61cb932733f536b2dad3472881b4de528a
[]
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
1,423
sce
Ex5_5.sce
errcatch(-1,"stop");mode(2);//Caption:Find (a)induced emf at full load (b)power developed (c)torque developed (d)applied torque (e)efficiency (f)external resistance in feild winding (g)voltage regulation //Exa:5.5 ; ; N_m=600;//speed of rotor (in rpm) R_a=0.01;//armature resistance (in ohms) R_fw=30;//feild winding resistance(in ohms) V_f=120;// voltage of external source (in volts) N_f=500;//no. of turns per pole P_r=10000;//in watts V_t=240;//terminal voltage (in volts) P_o=240*10^3;//rated power (in watts) I_L=P_o/V_t;//load current I_a=I_L;//armature current E_afl=V_t+(I_a*R_a);//refer to eqn:5.27 disp(E_afl,'(a) induced emf at full load (in Volts)='); P_d=E_afl*I_a; disp(P_d,'(b) power developed (in watts)='); W_m=(2*%pi*N_m)/60;//angular velocity (Refer to Eqn:5.5&5.6) T_d=P_d/W_m; disp(T_d,'(c) torque developed (in Newton-meter)='); P_inm=P_d+P_r;//mechanical power input T_s=P_inm/W_m; disp(T_s,'(d) Applied torque (in Newton-meter)='); //Refer fig:5.21 (magnetization curve) I_f=2.5;//effective feild current mmf=(2.5*N_f)+(0.25*I_a);//total mmf I_fa=mmf/N_f;//actual feild current P_in=P_inm+(V_f*I_fa);//total power input Eff=(P_o/P_in)*100; disp(Eff,'(e) efficiency (%)='); R_f=V_f/I_fa; R_fx=R_f-R_fw; disp(R_fx,'(f) external resistance in feild winding (in ohms)='); VR=((266-V_t)/V_t)*100;//Refer to fig:5.21 disp(VR,'(g) voltage regulation (%)='); exit();
31869d272d64ec5d4bfad7bd8c823f2b2eeb1f5f
449d555969bfd7befe906877abab098c6e63a0e8
/905/CH8/EX8.1/8_1.sce
12d23f8a62d324037d8ed703624282ecda7ff2db
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,187
sce
8_1.sce
clear; clc; // Illustration 8.1 // Page: 479 printf('Illustration 8.1 - Page: 479\n\n'); // solution // ****Data****// P_total = 1; // [bar] T1 = 320; // [K] T_c = 562.2; // [K] P_c = 48.9; // [bar] A = -6.983; B = 1.332; C = -2.629; D = -3.333; //*****// x1 = 1-(T1/T_c); deff('[y] = f12(P1)','y = log(P1/P_c)-(A*x1+B*x1^1.5+C*x1^3+D*x1^6)/(1-x1)'); P1 = fsolve(.01,f12);// [bar] printf("Vapor pressure of benzene at 320 K is %f bar\n\n",P1); M_benzene = 78 // [gram/mole] printf('Illustration 8.1 (a)\n'); // Solution (a) // For nitrogen M_nitrogen = 28; // [gram/mole] // From equation 8.2 Y = P1/(P_total - P1); //[mole C6H6/ mole N2] Y_s1 = Y*(M_benzene/M_nitrogen); // [gram C6H6/gram N2] printf("Absolute humidity of mixture of benzene and nitrogen is %f gram C6H6/gram N2\n\n",Y_s1); printf('Illustration 8.1 (b)\n'); // Solution (b) // For carbon dioxide M_carbondioxide = 44; // [gram/mole] // From equation 8.2 Y = P1/(P_total - P1); //[mole C6H6/ mole C02] Y_s2 = Y*(M_benzene/M_carbondioxide); // [gram C6H6/gram CO2] printf("Absolute humidity of mixture of benzene and carbon dioxide is %f gram C6H6/gram CO2\n",Y_s2);
8b014b289e5f9f3cbc963d8d237fa7723c67f650
449d555969bfd7befe906877abab098c6e63a0e8
/1202/CH15/EX15.1/15_1.sce
45bba40a16a902b0ee724fcec5eb3ea7a1187506
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
988
sce
15_1.sce
clear clc //Example 15.1 disp('Example 15.1') s=%s; Gp1=4/((4*s+1)*(2*s+1));Gp2=1;Gd2=1;Gd1=1/(3*s+1); Gm1=0.05;Gm2=0.2; Gv=5/(s+1); Kc2=4; Ys=Kc2*Gv*Gp1*Gm1/(1+Kc2*Gv*Gm2); Routh=routh_t(Ys,poly(0,"Kc1")); // produces routh table for polynomial 1+Kc*Ys disp(Routh) K1=roots(numer(Routh(3,1))); K2=roots(numer(Routh(4,1))); mprintf('\n Kc1 lies between %f and %f \n for cascade system to be stable', K2,K1) Ys2=Gv*Gp2*Gp1*Gm1; Routh2=routh_t(Ys2,poly(0,"Kc1")); // produces routh table for polynomial 1+Kc*Ys disp(Routh2) K1_2=roots(numer(Routh2(3,1))); K2_2=roots(numer(Routh2(4,1))); mprintf('\n Kc1 lies between %f and %f \n for conventional system to be stable', K2_2,K1_2) //We cannot find offset symbolically in Scilab because scilab does not support //handling of two variables in single polynomial //To find this limit one can use Sage //However in this case the calculations can be done in a very easy way by hand //and hence do not require to be computed from Sage
ebd96ebe99656a4c59fb96ebec24be004eecdc16
449d555969bfd7befe906877abab098c6e63a0e8
/881/CH7/EX7.5/exa7_5.sce
ab9e7a2e989abc8e6e87ddacc8cf7c7d38114bde
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
473
sce
exa7_5.sce
clc; //Example 7.5 //Page No 260 //Solution df=75; fm=15; //(a) disp("(a)The deviation ratio is found by substituting into equation 7-35(refer pgno), "); DR=df/fm; disp(DR,"DR = "); disp("From Table 7.3"); B=2*(8*fm); disp('kHz',B,"B = "); //(b) disp("(b)For an 37.5kHz frequency deviation and modulating signal frequency fm=7.5, the modulation index is, "); m=37.5/7.5; disp(m,"m = "); disp("and the bandwidth is, "); b=2*(8*7.5); disp('kHz',b,"B = ");
3765b07a53ece0654111a3865c20825e6b937dd1
94d8b66f6512f2f17f77000729fd8ac999484ed3
/workspace/Analysis/Plots/General/MeshLib.sce
092f0e51a43822e5020f72c26c604d03667ada79
[]
no_license
utctao/reliable-slam
7885c098574afb5284675a6f022d368f7f303ba6
1f00c584d9dacfc17e31e0aa91b0d717998b0310
refs/heads/master
2021-01-20T19:49:49.038094
2013-07-22T21:50:55
2013-07-22T21:50:55
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
881
sce
MeshLib.sce
// Library adapted from : http://www.morere.eu/spip.php?article142 // Requires the use of the lib3ds library // The sub mesh is here: /home/jem/reliable-slam/workspace/Analysis/Plots/General/submarine.sce function [X,Y,Z]=loadSCEMesh(fileName) exec(fileName); facelist1 = facelist1 + 1; X = matrix(vertices1(facelist1,1),size(facelist1,1),length(vertices1(facelist1,1))/size(facelist1,1))'; Y = matrix(vertices1(facelist1,2),size(facelist1,1),length(vertices1(facelist1,1))/size(facelist1,1))'; Z = matrix(vertices1(facelist1,3),size(facelist1,1),length(vertices1(facelist1,1))/size(facelist1,1))'; endfunction function meshHandle=plotMesh(fileName) [X,Y,Z]=loadSCEMesh(fileName); meshHandle=plot3d(X,Y,Z); endfunction function [X,Y,Z]=transformMesh(X,Y,Z,rotation,translation) endfunction function updateMesh(meshHandle,X,Y,Z) endfunction
8bb15f1a901c68a3289c3cf996282da30db9a218
449d555969bfd7befe906877abab098c6e63a0e8
/1871/CH1/EX1.14/Ch01Ex14.sce
67965d7eec205431b7610f64ab01ddded29b54b0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
501
sce
Ch01Ex14.sce
// Scilab code Ex1.14: Pg:43 (2008) clc;clear; d = 2.82e-008; // Interplanar spacing in sodium chloride crystal, cm n = 1; // Order of reflection theta = 10; // Glancing angle, degree // Since 2*d*sin theta = n*Lambda, solving for Lambda Lambda = 2*d*sind(theta); // Wavelength of X-rays in Bragg's reflection, cm printf("\nThe wavelength of X-rays in Bragg reflection = %4.2f angstrom", Lambda/1e-008); // Result // The wavelength of X-rays in Bragg reflection = 0.98 angstrom
ba852ee51fdb052b45f8ebd7ed5973e741281e25
449d555969bfd7befe906877abab098c6e63a0e8
/2267/CH12/EX4.3/Ex12_3.sce
624a18dcba0d2de5924648175aacb87d3affcdeb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
509
sce
Ex12_3.sce
//Part B Chapter 4 Example 3 clc; clear; close; n=12;//bolts PCD=300;//mm D=50;//mm Ddash=90;//mm tau_s=60;//MN/m^2 T=tau_s*10^6*%pi*(D/1000)^4/(D/2*10^-3*32);//Nm R=Ddash/2;//mm d=(Ddash^4-T*1000*R*32/60/%pi)^(1/4);//mm disp("Internal diameter of hollow shaft is "+string(d)+" mm"); Tb=T/n;//Nm per bolt PCrad=150;///mm Fb=Tb/(PCrad/1000);//N(Force on bolt) tau_sb=20;//MN/m^2 Ab=Fb/tau_sb/10^6;//m^2(Area of bolt) db=sqrt(Ab/(%pi/4));//m disp("Bolt diameter is "+string(db*1000)+" mm");
4cd9fce1562d856e95772509fce2aa0cc71dd31b
449d555969bfd7befe906877abab098c6e63a0e8
/1004/CH4/EX4.3/Ch04Ex3.sci
1819e17d860e5522ed9b63a505079fd6e8038f1f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
695
sci
Ch04Ex3.sci
// Scilab code: Ex4.3: Energy of electrons through the potential barrier : Pg : 125 (2008) h_bar = 1.054e-34; // Reduced Planck's constant, J-s Vo = 8e-019; // Height of potential barrier, joules m = 9.1e-031; // Mass of an electron, kg a = 5e-010; // Width of potential barrier, m T = 1/2; // Transmission coefficient of electrons // As T = 1/((1 + m*Vo^2*a^2)/2*E*h^2), solving for E we have E = m*Vo^2*a^2/(2*(1/T-1)*h_bar^2*1.6e-019); // Energy of half of the electrons through the potential barrier, eV printf("\nThe energy of electrons through the potential barrier = %5.2f eV", E); // Result // The energy of electrons through the potential barrier = 40.96 eV
853173996a4513eb95cf0d0210bc4781e11ce7e4
449d555969bfd7befe906877abab098c6e63a0e8
/2417/CH11/EX11.27/Ex11_27.sce
7c19e7c2e56617c5453b4df6ea948785fac64671
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
742
sce
Ex11_27.sce
//scilab 5.4.1 clear; clc; printf("\t\t\tProblem Number 11.27\n\n\n"); // Chapter 11 : Heat Transfer // Problem 11.27 (page no. 605) // Solution //HEAT EXCHANGER //Oil flows in the tube side and is cooled from 280 F to 140 F //Therefore, t2=140; //Unit:fahrenheit t1=280; //Unit:fahrenheit //On the shell side,water is heated from 85 F to 115 F T1=85; //Unit:fahrenheit T2=115; //Unit:fahrenheit P=(t2-t1)/(T1-t1); R=(T1-T2)/(t2-t1); //From the figure, F=0.91;//Correction factor LMTD=((t1-T2)-(t2-T1))/log((t1-T2)/(t2-T1)); //LMTD=Log mean temperature difference //Unit:fahrenheit TMTD=F*LMTD; //TMTD=True mean temperature difference //Unit:fahrenheit printf("The true mean temperature is %f fahrenheit",TMTD);
cb806e88fe70d86b034d69bf6db356e610154787
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/mini.man.tst
2179926408016cd1b772db699fd5197512a9c0a5
[ "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
138
tst
mini.man.tst
clear;lines(0); [m,n]=mini([1,3,1]) [m,n]=mini([3,1,1],[1,3,1],[1,1,3]) [m,n]=mini(list([3,1,1],[1,3,1],[1,1,3])) [m,n]=mini(list(1,3,1))
7631f173efd2c57c8ef77c65554723107e386229
eec0cb8a9a3987d4e28fc22c89750a158a00ea84
/Assignment6_Team8/FPM.tst
b65fdbe1aeab26ae6a7c1c8dabc59ff3f80fe6cb
[]
no_license
Archaic-Mage/CS2310_LAB_Assignments
8ac90e0123de95f5cf8db709cd7761962bf8cef2
e922b59fc1350db3f23b07b8f5986ac54f197c8d
refs/heads/main
2023-08-29T23:42:07.913682
2021-11-16T14:00:05
2021-11-16T14:00:05
401,640,543
1
1
null
2021-10-01T05:55:36
2021-08-31T09:10:15
Scilab
UTF-8
Scilab
false
false
929
tst
FPM.tst
load FPM.hdl, output-file FPM.out, compare-to FPM.cmp, output-list x%B1.16.1 y%B1.16.1 z%B1.16.1 isoverflow%B5.1.4; //test case for same sign //first the sign is same and positive set x %B0100000000100000, //2.5 set y %B0100000010100000, //5 eval, output; //second the sign is same and negative set x %B1011111111000000, //-1.5 set y %B1100000000000000, //-2 eval, output; //test case for opposite sign //first, x is negative and y is positive set x %B1011111100000000, //-0.5 set y %B0011111111000000, //1.5 eval, output; //second, y is negative and x is positive set x %B0011111111000000, //1.5 set y %B1100000000000000, //-2 eval, output; //test case, where the product of mantissa is over 2 set x %B0011111111000000, //1.5 set y %B0011111111100000, //1.75 eval, output; //test case, where the product of mantissa is between 1 and 2 set x %B0011111110100000, //1.25 set y %B0011111111000000, //1.5 eval, output;
1b5afa034b3c99f04a970f782da7cf840c82d41a
449d555969bfd7befe906877abab098c6e63a0e8
/1397/CH8/EX8.10/8_10.sce
b621224b9e5fdf0484b795ac471c4f25901c68d4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
8_10.sce
//clc(); clear; //To calculate numerical aperture theta0=26.80; //acceptance angle in degrees NA=sind(theta0); printf("numerical aperture is %f",NA);
2ccd7090ff943caecbfc0a3d1b215dc3b8eae041
449d555969bfd7befe906877abab098c6e63a0e8
/534/CH7/EX7.6/7_6_Plastic_Film.sce
c36cf4224973de3506bdaaff4b3b76a06bda1f2c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,257
sce
7_6_Plastic_Film.sce
clear; clc; printf('FUNDAMENTALS OF HEAT AND MASS TRANSFER \n Incropera / Dewitt / Bergman / Lavine \n EXAMPLE 7.6 Page 434 \n'); //Example 7.6 // Time required to cool from Ti = 75 degC to 35 degC //Operating Conditions v = 10; //[m/s] Air velocity Tsurr = 23+273; //[K] Surrounding Air Temperature D = .01; //[m] Diameter of sphere Ti = 75+273; //[K] Initial temp Tt = 35+273; //[K] Temperature after time t p = 1; //[atm] //Table A.1 Copper at T = 328K rho = 8933; //[kg/m^3] Density k = 399; //[W/m.K] Conductivity cp = 388; //[J/kg.K] specific //Table A.4 Air Properties T = 296 K u = 182.6*10^-7; //[N.s/m^2] Viscosity uv = 15.53*10^-6; //[m^2/s] Kinematic Viscosity k = 25.1*10^-3; //[W/m.K] Thermal conductivity Pr = .708; //Prandtl Number //Table A.4 Air Properties T = 328 K u2 = 197.8*10^-7; //[N.s/m^2] Viscosity Re = v*D/uv; //Reynolds number //Using Equation 7.56 Nu = 2+(0.4*Re^.5 + 0.06*Re^.668)*Pr^.4*(u/u2)^.25; h = Nu*k/D; //From equation 5.4 and 5.5 t = rho*cp*D*2.30*log10((Ti-Tsurr)/(Tt-Tsurr))/(6*h); printf("\nTime required for cooling is %.1f sec",t); //END
2d60fe1a692c6fee11af57e82b207db70b191d74
449d555969bfd7befe906877abab098c6e63a0e8
/1938/CH4/EX4.19/4_19.sce
8f6238b279e0bb8de29672e59538da629d22e7e9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
657
sce
4_19.sce
clc,clear printf('Example 4.19\n\n') Pole=4 f=50 //frequency phi=0.12 //flux per pole in weber m=4 // slot per pole per phase conductor_per_slot=4 coilspan=150 Ns=120*f/Pole //synchronous speed in rpm n=m*3 //Slots per pole beeta=180/n //slot angle K_d=sind(m*beeta/2) /(m*sind(beeta/2)) // distribution factor alpha=180-coilspan //angle of short pitch K_c=cos((%pi/180)*alpha/2) //coil span factor Z=m*(n*Pole) // Also equal to (conductors/slots)*slots Z_ph=Z/3 //conductors per phase T_ph=Z_ph/2 //turns per phase E_ph=4.44*K_c*K_d*phi*f*T_ph E_line=sqrt(3)*E_ph printf('e.m.f generated is %.2f V(phase),%.2f V(line)',E_ph,E_line)
ad0b672d3f2225e4f21f34eccaf87b7bcce77bed
449d555969bfd7befe906877abab098c6e63a0e8
/1388/CH1/EX1.10/1_10.sce
2d24f56128528a43c7b3afe2e5f67665732c0d39
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
239
sce
1_10.sce
clc //initialisation of variables M= 28 //gm R= 8.314*10^7 //atm l/mol K N= 6.023*10^23 T= 300 //K s= 4*10^-8//cm //CALCULATIONS m= M/N k= R/N n= (5/16)*sqrt(%pi*m*k*T)/(%pi*s^2) //RESULTS printf (' viscosity = %.2e poise',n)
9ac03719fff5e342be4b50bb73e08d5b0f4ced5b
449d555969bfd7befe906877abab098c6e63a0e8
/1991/CH7/EX7.5/5.sce
eecd2db557f4b1e2d58246ecbc6b73d7b11fe5f3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
289
sce
5.sce
clc clear //input r1=40//resistance 1 r2=20//resistamce 2 r3=10//resistance 3 v=1.6//voltage //calculation R=r1+r2+r3//total resistance in series x=((v*r1)*70)/((2*50)*(1.6*40))//fraction of pd x=x*100//percentage pd //output printf("the percentage of pd is %3.0f percent",x)
6f9526832c389a07d7efb1c3aa284457c0fd10ab
449d555969bfd7befe906877abab098c6e63a0e8
/278/CH16/EX16.3/ex_16_3.sce
d92e2493bded5eda45eac01a8f192da9e0faab84
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
525
sce
ex_16_3.sce
//cal dia of piston clc //soltuion //given D=1500//mm p=0.2//N/mm^2 E=200*1000//N/mm^2 l=3000//mm W=(%pi/4)*D^2*p//N Fs=8 Wcr=W*Fs//N L=l/2; d=(Wcr/0.043)^(1/4)//mm; //let d be dia and I be moment of inertia I=(%pi/64)*d^4 //acc to euler's formula //Wcr=%pi^2*E*I/L^2//N //Wcr=0.043*d^4 //acc to rankine's formula //Wcr=(fc*A)/(1+a*(L/k)^2) fc=320//N/mm^2 a=1/7500 //k=sqrt(I/A)=d/4 //Wcr=(251.4*d1^2)/(d1^2 +4800) //on solving d2=14885 d1=sqrt(14885)//mm //taking large rof two values printf("the dia od piston is,%f\n",d1)
aa47ced8ee8885aa08a97e5b00ceae08f0afb30d
05d972abeab11d213913aa6124e6a2104d859132
/src/etc/McpActivate.tst
a4f344f867cbc32902664d920ede8c1ceea05ac0
[]
no_license
LivTel/sdb_puller
50ac8289d57c4927245ca70c4809cf2b9c807e82
9e573ee4d20035f846cb010a02099b9a25dc4e76
refs/heads/master
2022-06-24T04:59:10.771334
2019-12-18T19:10:47
2019-12-18T19:10:47
179,494,067
0
0
null
2020-07-01T23:30:44
2019-04-04T12:34:54
C
UTF-8
Scilab
false
false
29
tst
McpActivate.tst
sysreq, SYSREQ_REQ_ACTIVATE
0003befe6215a00c7fa64efb2fd77e759ac16f40
449d555969bfd7befe906877abab098c6e63a0e8
/2912/CH7/EX7.8/Ex7_8.sce
94a3be024fa441b93b194ed21afa27d0a41f76ba
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex7_8.sce
//chapter 7 //example 7.8 //Calculate the atomic polarisability of sulphur //page 190 clear; clc; //given Er=4; // relative permittivity of sulphur Eo=8.85E-12; // in F/m (absolute permittivity) NA=2.08E3; // in Kg/m^3 (density of atoms in sulphur) //calculate // Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e // therefore we have alpha_e=((Er-1)/(Er+2))*(3*Eo/NA); // calculation of electronic polarisability of sulphur printf('\nThe electronic polarisability of sulphur is \t=%1.2E Fm^2',alpha_e); // NOTE: The answer in the book is wrong due to calculation mistake. Also one point to be mentioned is that wrong formula has been used in the solution but i have used the formula as used in the solution.
7a63ccd0e85e1e4470c8655a8f3faa3c68206010
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/taylorwin/taylorwin4.sce
551378a7a6f5f3ee10413525d6072a180fd4afee
[]
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
218
sce
taylorwin4.sce
//check o/p for negative window length w = taylorwin(-6); disp(w); ////output //!--error 10000 //The window length must be a positive integer //at line 35 of function taylorwin called by : //w = taylorwin(-6);
109e062ff4f5b747d7c1f119179d938a1eee7b01
449d555969bfd7befe906877abab098c6e63a0e8
/623/CH21/EX4.4.3/U4_C4_3.sce
d188b271c9febc01953cace5d8921963ef75cc8b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
631
sce
U4_C4_3.sce
//variable initialization mu=9.27*10^-24; //(J/T) B=1*10^-1; //external magnetic field (T) h=1.054*10^-34; //Plank's constant (Js) J=3/2; L=1; S=1/2; //calculation g=1+(((J*(J+1))+(S*(S+1))-(L*(L+1)))/(2*J*(J+1))); //Lande g-factor omega=(g*mu*B)/h; //angular velocity of precession (rad/s) printf("\nω = %.1e rad/sec",omega);
67748dbd333d9fbf5401b2ff94e8cb80a17851b6
5aca3165fc98db8db50dc41429fe6ff0ebde7410
/SPEECH BASED BALL COLLECTOR_2011/code/final.sce
75e74a5730a22517b87eb99eeb2c6b3bf2ec4c55
[]
no_license
sachinuthale/CS684_2011
f0af4ec306c6cec4a015dc11648a8dc21eac8124
51c2bd9e0ee3a819c50eb4d9fd2708699b44b92a
refs/heads/master
2020-05-29T21:51:13.096232
2014-05-23T23:41:26
2014-05-23T23:41:26
20,291,312
0
1
null
null
null
null
UTF-8
Scilab
false
false
8,440
sce
final.sce
//function to detect object and return the co-ordinates of the object in the 1st frame it is detected in the vector rectrec //parameters //colour=colour of object to find; notfound=signal to be sent till object is not found; found=signal to be sent when object is found; objct=ball or basket function rectret=findobject(colour,notfound,found,objct) obj_found=0; rect=[0,0,0,0]; //vid=camopen(); fr=avireadframe(vid); while ~isempty(fr) str=notfound; writeserial(handle,str+ascii(13)) //write to serial port that object is not found //sleep(3000); if colour=='red' set_val=1; elseif colour=='green' set_val=2; else set_val=3; end; if colour=='blue' //colour intensity threshold for colour detection cthresh=0.1; elseif colour=='red' cthresh=0.2; else cthresh=0.05; end; count=0; maxm=0; reg=0; objx=zeros(info.Height); objy=zeros(info.Height); objcount=0; diff_im = imabsdiff(fr(:,:,set_val),rgb2gray(fr)); //subtract colour component from the image diff_im = im2bw(diff_im,cthresh); //convert image to binary mat=diff_im; flag1=0; xS=190; //search for the object in the range [190-350] x co-ordinates with 10 pixels gap xE=350; //i.e search the object only when it appears in the center of the screen yS=1; yE=info.Height; if objct=='box' xS=230; xE=400; end; xS xE if ~obj_found, totcount=0; //seedfill algorith, to identify object cluster with size greater han 1000 pixels....seach co-ordinates in x-range defined with 10 pixels gap //as the object size is large we do not need to search each and every pixel for i=xS:10:xE, if flag1==1 break; end; for j=yS:50:yE, if flag1==1 break; end; //disp(i);disp(j); if mat(i,j)==%t count=0; objcount=0; savex=zeros(info.Height); savey=zeros(info.Height); reg=reg+1; totcount=0; count=count+1; stakx(count)=i; staky(count)=j; while count>0, mat(stakx(count),staky(count))=%f; objcount=objcount+1; savex(objcount)=stakx(count); savey(objcount)=staky(count); m=stakx(count); n=staky(count); count=count-1; totcount=totcount+1; if totcount > 1000 //object size flag1=1; objx=savex; objy=savey; obj_found=1; disp('obj found'); break; end; if (m-1)>0 & mat(m-1,m)==%t count=count+1; stakx(count)=m-1; staky(count)=n; end; if (n+1)<info.Width & mat(m,n+1)==%t count=count+1; stakx(count)=m; staky(count)=n+1; end; if (n-1)>0 & mat(m,n-1)==%t count=count+1; stakx(count)=m; staky(count)=n-1; end; if (m+1)<info.Height & mat(m+1,n)==%t count=count+1; stakx(count)=m+1; staky(count)=n; end; if (m-1)>0 & (n-1)>0 & mat(m-1,n-1)==%t count=count+1; stakx(count)=m-1; staky(count)=n-1; end; if (m+1)<info.Height & (n+1)<info.Width & mat(m+1,n+1)==%t count=count+1; stakx(count)=m+1; staky(count)=n+1; end; if (m-1)>0 & (n+1)<info.Width & mat(m-1,n+1)==%t count=count+1; stakx(count)=m-1; staky(count)=n+1; end; if (n-1)>0 & mat(m+1,n-1)==%t count=count+1; stakx(count)=m+1; staky(count)=n-1; end; end; end; if totcount>maxm maxm=totcount; objx=savex; objy=savey; end; end; end; //maxm if maxm > 1000 //object size minRow=min(objx); maxRow=max(objx); minCol=min(objy); maxCol=max(objy); if maxRow>info.Height maxRow=info.Height; end; if maxCol>info.Width maxCol=info.Width; end; rect=[minCol,minRow,maxCol-minCol,maxRow-minRow]; newObj=rectangle(fr,rect,[255,0,0]); else newObj=fr; end; //end condition for drawing rectangle end; // end if for obj found imshow(newObj); if obj_found==1 //object is found here..guide the bot to reach it break; end; fr=avireadframe(vid); end; //end for loop for reading frames rectret=rect; //return co-ordinates of the rectange where object is first spotted in the frame endfunction //use camshift function in scilab to trace the object in each frame //parameters same as above function; additional parameter : action="pick" or "drop" the object when it is reached function traceobject(colour,notfound,found,action,objct) rect=findobject(colour,notfound,found,objct) fr=avireadframe(vid); centrex=info.Width/2; centrey=info.Height/2; //avicloseframe(vid); obj_win = camshift(fr, rect); //initialize tracker while ~isempty(fr), obj_win = camshift(fr); //camshift tracking disp('obj window'); //obj_win im = rectangle(fr, obj_win, [255,0,0]); imshow(im); cx=obj_win(1)+obj_win(3)/2; cy=obj_win(2)+obj_win(4)/2; //identify approaximate centre of object cluster in the rectangle val=abs(cx-centrex); //val - distance between centre of frame and centre of object disp(val); if val < 270 //if the distance between centres is less than some threshold object is at centre of screen disp('move forward'); str=found; disp('data sent'); //send signal to firebird that object is found disp(str+ascii(13)); buf='0' //buf=readserial(handle); //read ack from firebird whether it received the signal or else send it again till ack-ed v=str+ascii(13); while(buf ~= v & buf~=action) disp(buf); sleep(500); writeserial(handle,str+ascii(13)) sleep(500); buf=readserial(handle) if (buf=='5') return; end; end disp('data received'); disp(buf); if buf==action //after ack-ing the signal sent by scilab the firebird sends another signal, which indicates ball has been picked or dropped in the basket return //the program returns after recieving the signal end; buf='0' buf=readserial(handle); while(buf ~= action) sleep(500); buf=readserial(handle); end disp('data received'); disp(buf); return else str=notfound; //the object is not found yet...keep on sending this signal to the firebird disp('data sent'); disp(str+ascii(13)); writeserial(handle,str+ascii(13)) //sleep(3000); end; fr = avireadframe(vid); end; endfunction function main(objc) //parameters for frame dimension info.Height=500; info.Width=700; handle=openserial(6,"9600,n,8,1") //open the serial communication interface with port_no=6 vid=camopen(); //open the camera str='1'; disp('data sent'); disp(str+ascii(13)); //send 2 dummy signals to firebird to initiate it before picking ball writeserial(handle,str+ascii(13)) str='1'; disp('data sent'); disp(str+ascii(13)); writeserial(handle,str+ascii(13)) traceobject(objc,'1','2','3','ball'); //trace ball disp('ball picked up'); obj_found=0; fr=0; str='4'; disp('data sent'); disp(str+ascii(13)); writeserial(handle,str+ascii(13)) //send 2 dummy signals to firebird to initiate it before dropping ball str='4'; vid=camopen(); //refresh the frames and re-initiate camera disp('data sent'); disp(str+ascii(13)); writeserial(handle,str+ascii(13)) traceobject('green','4','5','6','box'); //trace basket closeserial(handle); endfunction //end main function filename = "C:\Users\int\workspace\speechrecg\color.txt"; // read from this file which colour of ball to pick. basket colour by default is green //the speech processing module writes to the above file indicating colour of ball to be picked fid = mopen(filename, "r"); if (fid == -1) error("cannot open file for reading"); end; [num_read, val(1)] = mfscanf(fid, "%s"); mclose(fid); col=val(1); disp(col); main(col); // call main function with ball colour
b1f904063a7ddeeb6b22cf16c506d38d9660e639
5d83c7008d8a3f74866c492312cd1e5631c54779
/Raporty/HMF/i_eMapy_ERP.sci
c62d9614cb0e43fb35be6063b7b726e09c81404e
[]
no_license
Renrim/map
e089700fb890b72e57300c5a1f7dd5d3d8ccea96
ad052c49ad0eb6365835f369c81095b58e86124f
refs/heads/master
2021-08-07T12:50:09.423854
2017-11-08T06:48:34
2017-11-08T06:48:34
109,835,802
0
0
null
null
null
null
WINDOWS-1250
Scilab
false
false
5,831
sci
i_eMapy_ERP.sci
//"i_eMapy_ERP.sci","eMapy - include","\Procedury\Raporty z menu kartotek\",0,1.1.0,SYSTEM ////////////////////////////////////////////////////////////////////// // Nazwa : eMapy // Firma : // Autor : /////////////////////////////////////////// string szSciezka_exp = MojeDokumenty()+"\\kh.xml" string sApp_exe = "eMapy.exe" limit 1000000 int plik_exp long Listaidkh(1) int sub GetIdKH () long nErr = SetTaggedPos(FS) int i, znal while nErr if Listaidkh(size(Listaidkh)) != 0 then grow Listaidkh, 1 znal = 0 for i = 1 to i > size(Listaidkh) || znal if Listaidkh(i) == GetLineId() then znal = 1 next i if !znal then Listaidkh(size(Listaidkh)) = GetLineId() endif nErr = SetTaggedPos(NX) wend GetIdKH=1 endsub int sub DodajWezel( int idkh, string kodkh, string nazwakh, string ulica, string miasto, string kodpoczt, string poczta, string lokal, string dom, string wojewodztwo, string kraj, string rodzaj, string katalogkh, string znacznik, string skrotZN,string rodzajADR) string adres=using "%s %s",ulica,dom if (lokal!="") then adres += using "//%s",lokal endif adres+=using ", %s %s",kodpoczt,miasto if wojewodztwo!="" then adres+= using ", %s",wojewodztwo endif adres+= using ", %s",kraj print#plik_exp; using "<SchowekKH>\n" print#plik_exp; using "<Id>%i</Id>\n",idkh print#plik_exp; using "<Szerokosc>0</Szerokosc>\n" print#plik_exp; using "<Dlugosc>0</Dlugosc>\n" print#plik_exp; using "<Kod><![CDATA[%s]]></Kod>\n",kodkh print#plik_exp; using "<Nazwa><![CDATA[%s]]></Nazwa>\n",nazwakh print#plik_exp; using "<Adress><![CDATA[%s]]></Adress>\n",adres print#plik_exp; using "<Rodzaj><![CDATA[%s]]></Rodzaj>\n",rodzaj print#plik_exp; using "<RodzajAdresu><![CDATA[%s]]></RodzajAdresu>\n",rodzajADR print#plik_exp; using "<Katalog><![CDATA[%s]]></Katalog>\n",katalogkh print#plik_exp; using "<Znacznik><![CDATA[%s]]></Znacznik>\n",znacznik print#plik_exp; using "<ZnacznikShortCut><![CDATA[%s]]></ZnacznikShortCut>\n",skrotZN print#plik_exp; using "<Ulica><![CDATA[%s]]></Ulica>\n",ulica print#plik_exp; using "<KodPocztowy><![CDATA[%s]]></KodPocztowy>\n",kodpoczt print#plik_exp; using "<Miasto><![CDATA[%s]]></Miasto>\n",miasto print#plik_exp; using "<Kraj><![CDATA[%s]]></Kraj>\n",kraj print#plik_exp; using "</SchowekKH>\n" endsub Int Sub OtworzPlik(string nazwa_plk_, string i_o, int czy_komunikaty) int plik_imp if i_o == "odczyt" then plik_imp = open nazwa_plk_ for Input else plik_imp = open nazwa_plk_ for Output endif if plik_imp<=0 then if czy_komunikaty then message (using "Wystąpił błąd przy próbie otwarcia pliku %s Ico:S",nazwa_plk_ ) : error "" endif OtworzPlik = plik_imp EndSub int sub infoErrorExecute(int iErr, string sApp, string sLokalizacja) select case iErr case 3 message using "Nie istnieje wskazany katalog : %s ico:S",sLokalizacja case 2 message using "Nie istnieje wskazany plik : '%s' \n %s ico:S", sApp, sLokalizacja case 1 message using "Wskazany plik jest uszkodzony : '%s' \n %s ico:S", sApp, sLokalizacja case 0 message "Brak zasobów do uruchomienia programu! ico:S" endselect endsub int sub UruchomEMapy() Dispatch xKh, xZnacz, xZnaczKh int nErr, nSubtyp, i, nCount,nErrZn, br, wykonuj,czy_blad string KH_kod,KH_nazwa,KH_kraj,KH_katalog,KH_rodzaj,KH_miasto,KH_ulica,KH_dom,KH_lokal,KH_kodPoczt,KH_poczta,KH_rejon,KH_znacznik, KH_znacznik_skrot long KH_id string sCon GetIdKH () if Listaidkh(1)!=0 then if size(Listaidkh)>100 then if size(Listaidkh)<1000 then if (message "Wykonanie operacji dla wybranej liczby kontrahentów (>100) może być czasochłonne. \nCzy na pewno chcesz kontynuować? Btn: Wykonaj = 3 DefBtn: Anuluj = 2 ") == 3 then wykonuj = 1 else message "Wykonanie operacji dla wybranej liczby kontrahentów (>1.000) nie jest możliwe!" endif else wykonuj = 1 endif else message "Nie zaznaczono żadnego kontrahenta!" endif if wykonuj then plik_exp = OtworzPlik(szSciezka_exp,"zapis",1) print#plik_exp; "<?xml version=\"1.0\" encoding=\"windows-1250\"?>" + lf print#plik_exp; using "<DocumentElement>\n" xKh = xFactory.NewObject("BKontrahent") for br = 1 to br > size(Listaidkh) //w petli po zaznaczonych kh: nErr = xKh.Load(using "id=%l",Listaidkh(br)) if nErr then error Using "\nBłąd nr %l\n", nErr KH_id = Listaidkh(br) KH_kod = xKh.kod KH_nazwa = xKh.nazwa KH_kraj = xKh.kraj.nazwa KH_katalog = xKh.katalog.nazwa KH_rodzaj = xKh.rodzaj.kod KH_miasto = xKh.miejscowosc KH_ulica = xKh.ulica KH_dom = xKh.dom KH_lokal = xKh.lokal KH_kodPoczt = xKh.kodPocztowy KH_poczta = xKh.poczta KH_rejon = xKh.rejon KH_znacznik_skrot = using "%i",xKh.znacznik.shortcut xZnacz = xFactory.GetObject("BZnacznikKh") xZnaczKh = xZnacz.Give(using "subtyp=%i",xKh.znacznik) KH_znacznik = xZnaczKh.nazwa DodajWezel(KH_id, KH_kod, KH_nazwa,KH_ulica, KH_miasto, KH_kodPoczt, KH_poczta, KH_lokal, KH_dom, KH_rejon,KH_kraj,KH_rodzaj,KH_katalog,KH_znacznik,KH_znacznik_skrot, "Główny") if xKh.adres2 != "" then KH_miasto = xKh.miejscowosc2 KH_ulica = xKh.ulica2 KH_dom = xKh.dom2 KH_lokal = xKh.lokal2 KH_kodPoczt = xKh.kodPocztowy2 KH_poczta = xKh.poczta2 KH_rejon = xKh.rejon2 DodajWezel(KH_id, KH_kod, KH_nazwa,KH_ulica, KH_miasto, KH_kodPoczt, KH_poczta, KH_lokal, KH_dom, KH_rejon,KH_kraj,KH_rodzaj,KH_katalog,KH_znacznik,KH_znacznik_skrot, "Korespondencyjny") endif next br print#plik_exp; using "</DocumentElement>" close(plik_exp) //uruchom aplikacje exe sCon = using "%s\\%s %s", Katalog(), sApp_exe, szSciezka_exp czy_blad = Execute(sCon) infoErrorExecute(czy_blad, sApp_exe, Katalog()) endif endsub nooutput()