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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
031016f3b382759796634a1d1a188dbc178974c6 | 69cdc89ae6e32cb66eac097ef73f55068128a125 | /PSOGRAPH.sce | 849311c32d1ccde3a165f32a9106c578b1436775 | [] | no_license | AlexKaravaev/Particle-Swarm-Optimization | 336c5cc459b026ce2650db6a15c7557ac7ac0c09 | 910815cb457149e0a5993e7e2e5935ccd1d6d819 | refs/heads/master | 2021-07-06T00:40:11.631799 | 2017-09-29T17:50:30 | 2017-09-29T17:50:30 | 105,301,101 | 1 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 541 | sce | PSOGRAPH.sce | [x]=read("~/Innopolis/Introduction_To_AI/week6/res1.txt",2000,1)
x = [x]
[y]=read("~/Innopolis/Introduction_To_AI/week6/res2.txt",2000,1)
y = [y]
for n=0:5:2000
for k=1:5
if k==1 then
plot(x(n+k),y(n+k),".r");
elseif k==2 then
plot(x(n+k),y(n+k),".g");
elseif k==3 then
plot(x(n+k),y(n+k),".o");
elseif k==4 then
plot(x(n+k),y(n+k),".b");
elseif k==5 then
plot(x(n+k),y(n+k),".y");
end,
end
sleep(0.01)
end
|
a8616fbcf7e88084cbf95bfda94dcbd1d187aacb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2084/CH7/EX7.8w/7_8w.sce | 8d004b1199147f0c9f4ab2ecb26549b0b0f6bd63 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 771 | sce | 7_8w.sce | //developed in windows XP operating system 32bit
//platform Scilab 5.4.1
clc;clear;
//example 7.8w
//calculation of the angular speed of rotation
//given data
L=20*10^-2//length(in m) of the rod = length(in m)of the string
theta=30//angle(in degree) made by the string with the vertical
g=10//gravitational acceleration(in m/s^2) of the earth
//calculation
//applying Newton's second law
//T*sind(theta) = m*w*w*L*(1+sind(theta)).............(1)
//applying Newton's first law in vertical direction
//T*cosd(theta) = m*g.................................(2)
//from above equations,we get
//tand(theta)=((w*w*L*(1+sind(theta)))/g).............(3)
w=sqrt((g*tand(theta))/(L*(1+sind(theta))))
printf('the angular speed of rotation is %3.1f rad/s',w)
|
c3b1fce2065675fc5cd63ae3c56cd6aa477f237d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2741/CH6/EX6.1/Chapter6_Example1.sce | 4b81d4f9afd528569129501341bc01f95de8fccf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,057 | sce | Chapter6_Example1.sce | clc
clear
//Input data
H=80;//The Heat flows into the system in joules
W=30;//The Work done by the system in joules
//Calculations
U=H-W;//The internal energy of the system in joules
W1=10;//The work done along the path ADB in joules
H1=W1+U;//The heat flows into the system along the path ADB in joules
W2=-20;//The work done on the system from B to A in joules
H2=W2-U;//The heat liberated from B to A in joules
Ua=0;//Internal energy at A in joules
Ud=40;//Internal energy at D in joules
Wa=10;//Work done from A to D in joules
Wd=0;//Work done from D to B in joules
Uc=50;//Internal energy at C in joules
Had=(Ud-Ua)+Wa;//Heat absorbed in the process AD in joules
Hdb=Uc-Ud+Wd;//Heat absorbed in the process DB in joules
//Output
printf('(a)Heat flows into the system along the path ADB is H = %3.0f joules \n (b)The heat liberated by the system is H = %3.0f joules \n (c)The heat absorbed in the process AD is H = %3.0f joules and \n The heat absorbed in the process DB is H = %3.0f joules ',H1,H2,Had,Hdb)
|
7f62517239e6c9ec8e47c4cea9becd8502cfa257 | 089894a36ef33cb3d0f697541716c9b6cd8dcc43 | /NLP_Project/test/blog/bow/bow.12_6.tst | 8f68c324ec93f98bb8b22d284dcc2b7bea0e28ad | [] | no_license | mandar15/NLP_Project | 3142cda82d49ba0ea30b580c46bdd0e0348fe3ec | 1dcb70a199a0f7ab8c72825bfd5b8146e75b7ec2 | refs/heads/master | 2020-05-20T13:36:05.842840 | 2013-07-31T06:53:59 | 2013-07-31T06:53:59 | 6,534,406 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 4,677 | tst | bow.12_6.tst | 12 3:0.16666666666666666 10:1.0 21:0.18181818181818182 25:0.5 98:0.3333333333333333 282:1.0 336:2.0 544:1.0 548:1.0 857:0.5 920:2.0 1011:1.0 1051:1.0 1070:1.0
12 7:1.0 17:0.1111111111111111 19:1.0 25:0.25 44:0.017857142857142856 94:0.5 336:1.0 920:1.0 936:1.0 1442:1.0 1563:1.0
12 4:1.0 6:0.5 7:1.0 9:0.5 17:0.4444444444444444 21:0.18181818181818182 32:1.0 40:0.07142857142857142 44:0.125 48:1.0 58:0.16666666666666666 63:0.3333333333333333 70:0.0625 92:4.0 94:0.5 98:1.6666666666666667 107:0.3333333333333333 110:0.2 116:0.2857142857142857 120:1.0 123:1.0 129:1.0 135:1.0 193:0.1111111111111111 210:0.25 243:0.5 282:2.0 291:2.0 303:2.0 351:1.0 368:0.25 414:1.0 417:1.0 418:1.0 454:1.0 467:0.5 544:1.0 554:1.0 643:1.0 677:1.5 681:1.0 702:1.0 730:0.25 877:1.0 900:1.0 957:1.0 983:1.0 1003:1.0 1046:1.0 1051:1.0 1143:1.0 1153:1.0 1269:1.0 1302:1.0
12 18:1.0 25:0.25 44:0.017857142857142856 83:1.0 98:0.3333333333333333 194:0.5 245:1.0 449:1.0 1077:1.0 1080:1.0 1176:1.0 1249:1.0
12 44:0.017857142857142856 1011:1.0 1110:1.0
12 4:1.0 21:0.09090909090909091 1176:1.0 1235:1.0
12 4:2.0 98:0.6666666666666666 130:0.5 366:1.0 368:0.25 764:1.0 1003:1.0 1235:1.0
12 9:0.5 21:0.09090909090909091 32:1.0 44:0.017857142857142856 194:0.5 206:1.0 393:1.0 1235:1.0
12 6:0.5 18:1.0 25:0.25 70:0.0625 206:1.0 393:1.0 1546:1.0
12 44:0.017857142857142856 104:1.0 210:0.25 236:1.0 360:1.0 447:0.25 778:1.0 1051:1.0
12 4:1.0 23:0.07142857142857142 40:0.07142857142857142 98:0.3333333333333333 130:0.5 1159:1.0 1235:1.0
12 4:1.0 9:0.5 21:0.09090909090909091 25:0.5 32:1.0 44:0.017857142857142856 48:1.0 59:0.5 70:0.0625 78:0.5 179:0.25 286:1.0 301:1.0 454:1.0 467:0.5 869:1.0 1269:1.0
12 13:0.25 17:0.1111111111111111 18:1.0 21:0.09090909090909091 25:0.75 98:0.3333333333333333 253:1.0 277:1.0 291:1.0 360:2.0 516:1.0 531:1.0 920:2.0 1249:1.0
12 4:1.0 13:0.25 21:0.09090909090909091 23:0.07142857142857142 58:0.16666666666666666 98:0.3333333333333333 359:0.5 449:1.0 677:0.5 1153:1.0 1269:1.0
12 25:0.25 92:1.0 359:0.5
12 6:1.0 25:0.25 44:0.017857142857142856 194:0.5
12 4:1.0 6:0.5 21:0.09090909090909091 40:0.07142857142857142 44:0.03571428571428571 58:0.16666666666666666 98:0.3333333333333333 116:0.14285714285714285 130:0.5 207:1.0 631:1.0 936:1.0 1326:1.0
12 6:0.5 17:0.1111111111111111 21:0.09090909090909091 44:0.017857142857142856 185:1.0 194:0.5 426:0.09090909090909091 493:1.0 920:1.0 1148:1.0 1326:1.0 1385:1.0 1546:1.0
12 17:0.1111111111111111 40:0.07142857142857142 44:0.05357142857142857 48:1.0 426:0.09090909090909091 658:1.0 759:1.0 936:1.0 1148:1.0 1326:1.0 1449:1.0
12 4:1.0 15:1.0 40:0.07142857142857142 1507:1.0
12 6:0.5 17:0.1111111111111111 44:0.03571428571428571 195:1.0 452:1.0 936:1.0 1446:1.0
12 6:0.5 40:0.07142857142857142 78:0.5 120:1.0 224:1.0 346:1.0 414:1.0
12 6:0.5 17:0.1111111111111111 668:1.0 677:0.5 681:1.0 868:1.0 1159:1.0
12 13:0.25 17:0.1111111111111111 21:0.09090909090909091 25:0.25 44:0.017857142857142856 50:1.0 65:0.16666666666666666 92:1.0 110:0.2 210:0.25 232:1.0 324:1.0 346:1.0 359:0.5 401:1.0 677:0.5 696:1.0 739:1.0
12 78:0.5 98:0.3333333333333333 286:1.0 366:1.0 449:1.0
12 6:0.5 21:0.09090909090909091 40:0.07142857142857142 44:0.017857142857142856 70:0.0625 92:2.0 98:0.3333333333333333 130:0.5 236:1.0 360:1.0 424:1.0 426:0.18181818181818182 449:1.0 450:0.16666666666666666 548:1.0 631:1.0 677:0.5 920:1.0 1448:1.0 1546:1.0
12 6:0.5 21:0.09090909090909091 70:0.0625 92:2.0 110:0.2 210:0.25 324:1.0 426:0.09090909090909091 449:1.0 450:0.16666666666666666 641:1.0 1215:1.0 1556:1.0
12 21:0.2727272727272727 44:0.03571428571428571 59:0.5 92:1.0 135:1.0 399:1.0 418:1.0 595:1.0 765:1.0 983:1.0
12 9:0.5 25:0.5 44:0.017857142857142856 393:1.0 1078:1.0
12 17:0.1111111111111111 65:0.16666666666666666 78:0.5 324:1.0 371:1.0
12 6:0.5 21:0.09090909090909091 98:0.3333333333333333 130:0.5 253:1.0 359:0.5 366:1.0 423:1.0 424:1.0 677:0.5 764:1.0
12 15:1.0 58:0.16666666666666666 66:1.0 98:0.3333333333333333 450:0.3333333333333333 452:1.0 722:1.0
12 6:0.5 98:0.6666666666666666 116:0.14285714285714285 120:1.0 160:1.0 280:1.0 452:1.0
12 6:0.5 32:1.0 40:0.07142857142857142 44:0.03571428571428571 58:0.16666666666666666 67:1.0 92:2.0 98:1.0 286:1.0 414:1.0 677:0.5 891:1.0 983:1.0 1128:1.0
12 17:0.1111111111111111 98:0.3333333333333333 366:2.0 449:1.0 710:1.0
12 8:1.0 21:0.09090909090909091 32:1.0 70:0.0625 92:1.0 98:0.3333333333333333 505:1.0
12 6:0.5 13:0.25 17:0.1111111111111111 44:0.017857142857142856 92:1.0 135:1.0 267:1.0 449:1.0 677:0.5 681:1.0 710:1.0 983:1.0 1446:1.0
12 6:0.5 17:0.1111111111111111 25:0.25 194:0.5 449:1.0 1189:1.0 1235:1.0 1249:1.0 1381:1.0
12 13:0.25 44:0.03571428571428571 98:0.3333333333333333 130:0.5 194:0.5 424:1.0
|
5f20c45d3df8517f02a5b53c558a33ef390b8e2d | 449d555969bfd7befe906877abab098c6e63a0e8 | /3775/CH2/EX2.6/Ex2_6.sce | 7da826e213a92be6171cbf3bf11104119c47e79b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 433 | sce | Ex2_6.sce | //Ex 2.6 page 70
clc;
clear;
close;
VS=3;// kV
IS=750;// A
VD=800;// V
ID=175;// A
dr=30/100;// de-rating factor
IB=8;//mA
delQ=30;// u Coulomb
// dr = 1-IS/np*ID
np = round(IS/(1-dr)/(ID)) ; // no. of parallel string
ns = round(VS*1000/(1-dr)/(VD)) ; // no. of series string
R=(ns*VD-VS*1000)/(ns-1)/(IB/1000)/1000;//kohm
C=(ns-1)*delQ*10**-6/(ns*VD-VS*1000)
printf('Value of R = %.2f kohm',R)
printf('\n Value of C = %.2e F',C)
|
2785b9e3cfaa12c6ee57977e2a68e3724f8e5494 | 36c5f94ce0d09d8d1cc8d0f9d79ecccaa78036bd | /360 krunker strafes .sce | d098a7fda01c4ec7cc1b8636eaf6e81c1526598c | [] | no_license | Ahmad6543/Scenarios | cef76bf19d46e86249a6099c01928e4e33db5f20 | 6a4563d241e61a62020f76796762df5ae8817cc8 | refs/heads/master | 2023-03-18T23:30:49.653812 | 2020-09-23T06:26:05 | 2020-09-23T06:26:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 35,597 | sce | 360 krunker strafes .sce | Name=360 krunker strafes
PlayerCharacters=Character Profile
BotCharacters=Quaker Bot.bot;Quaker Bot.bot;Quaker Bot.bot;Quaker Bot.bot
IsChallenge=true
Timelimit=60.0
PlayerProfile=Character Profile
AddedBots=Quaker Bot.bot;Quaker Bot.bot
PlayerMaxLives=0
BotMaxLives=0;0
PlayerTeam=1
BotTeams=0;0
MapName=flat_field_mini.map
MapScale=5.0
BlockProjectilePredictors=true
BlockCheats=true
InvinciblePlayer=true
InvincibleBots=false
Timescale=1.0
BlockHealthbars=false
TimeRefilledByKill=0.0
ScoreToWin=100000.0
ScorePerDamage=0.0
ScorePerKill=1.0
ScorePerMidairDirect=0.0
ScorePerAnyDirect=0.0
ScorePerTime=0.0
ScoreLossPerDamageTaken=0.0
ScoreLossPerDeath=0.0
ScoreLossPerMidairDirected=0.0
ScoreLossPerAnyDirected=0.0
ScoreMultAccuracy=false
ScoreMultDamageEfficiency=false
ScoreMultKillEfficiency=false
GameTag=
WeaponHeroTag=LG
DifficultyTag=4
AuthorsTag=Igglez
BlockHitMarkers=false
BlockHitSounds=false
BlockMissSounds=true
BlockFCT=false
Description=Close tracking training on a slide-hopping target (modified from close krunker strafes)
GameVersion=2.0.2.0
ScorePerDistance=0.0
MBSEnable=false
MBSTime1=0.25
MBSTime2=0.5
MBSTime3=0.75
MBSTime1Mult=1.0
MBSTime2Mult=2.0
MBSTime3Mult=3.0
MBSFBInstead=false
MBSRequireEnemyAlive=false
LockFOVRange=false
LockedFOVMin=60.0
LockedFOVMax=120.0
LockedFOVScale=Clamped Horizontal
[Aim Profile]
Name=At Feet
MinReactionTime=0.3
MaxReactionTime=0.4
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=15.0
TrackSpeed=3.5
TrackError=3.5
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=40.0
ShootFOV=15.0
VerticalAimOffset=-200.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
AimingStyle=Original
ScanSpeedMultiplier=1.0
MaxSeekPitch=30.0
MaxSeekYaw=30.0
AimingSpeed=5.0
MinShootDelay=0.3
MaxShootDelay=0.6
[Aim Profile]
Name=Low Skill
MinReactionTime=0.35
MaxReactionTime=0.45
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=20.0
TrackSpeed=3.0
TrackError=5.0
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=60.0
ShootFOV=25.0
VerticalAimOffset=0.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
AimingStyle=Original
ScanSpeedMultiplier=1.0
MaxSeekPitch=30.0
MaxSeekYaw=30.0
AimingSpeed=5.0
MinShootDelay=0.3
MaxShootDelay=0.6
[Aim Profile]
Name=Default
MinReactionTime=0.3
MaxReactionTime=0.4
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=15.0
TrackSpeed=3.5
TrackError=3.5
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=40.0
ShootFOV=15.0
VerticalAimOffset=0.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
AimingStyle=Original
ScanSpeedMultiplier=1.0
MaxSeekPitch=30.0
MaxSeekYaw=30.0
AimingSpeed=5.0
MinShootDelay=0.3
MaxShootDelay=0.6
[Bot Profile]
Name=Quaker Bot
DodgeProfileNames=Long Strafes Jumping;Long Strafes Jumping;Long Strafes Jumping;Long Strafes Jumping
DodgeProfileWeights=2.0;3.0;1.0;2.0
DodgeProfileMaxChangeTime=5.0
DodgeProfileMinChangeTime=1.0
WeaponProfileWeights=1.0;0.0;1.0;1.0;1.0;1.0;1.0;1.0
AimingProfileNames=At Feet;At Feet;Low Skill;Default;Default;Default;Default;Default
WeaponSwitchTime=3.0
UseWeapons=true
CharacterProfile=Quaker
SeeThroughWalls=false
NoDodging=false
NoAiming=false
AbilityUseTimer=0.1
UseAbilityFrequency=1.0
UseAbilityFreqMinTime=0.3
UseAbilityFreqMaxTime=0.6
ShowLaser=false
LaserRGB=X=1.000 Y=0.300 Z=0.000
LaserAlpha=1.0
[Character Profile]
Name=Character Profile
MaxHealth=100.0
WeaponProfileNames=LG;;;;;;;
MinRespawnDelay=0.1
MaxRespawnDelay=0.1
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=1.0
CameraOffset=X=0.000 Y=0.000 Z=0.000
HeadshotOnly=false
DamageKnockbackFactor=8.0
MovementType=Base
MaxSpeed=1000.0
MaxCrouchSpeed=500.0
Acceleration=16000.0
AirAcceleration=16000.0
Friction=8.0
BrakingFrictionFactor=2.0
JumpVelocity=800.0
Gravity=0.0
AirControl=0.25
CanCrouch=true
CanPogoJump=false
CanCrouchInAir=false
CanJumpFromCrouch=false
EnemyBodyColor=X=255.000 Y=0.000 Z=0.000
EnemyHeadColor=X=255.000 Y=255.000 Z=255.000
TeamBodyColor=X=0.000 Y=0.000 Z=255.000
TeamHeadColor=X=255.000 Y=255.000 Z=255.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=800.0
MainBBType=Cylindrical
MainBBHeight=230.0
MainBBRadius=55.0
MainBBHasHead=true
MainBBHeadRadius=45.0
MainBBHeadOffset=0.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=230.0
ProjBBRadius=55.0
ProjBBHasHead=true
ProjBBHeadRadius=45.0
ProjBBHeadOffset=0.0
ProjBBHide=true
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=;;;
HideWeapon=false
AerialFriction=0.0
StrafeSpeedMult=1.0
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.1
AllowBufferedJumps=false
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.25
ThirdPersonCamera=false
TPSArmLength=500.0
TPSOffset=X=0.000 Y=125.000 Z=40.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
TerminalVelocity=0.0
CharacterModel=None
CharacterSkin=Default
SpawnXOffset=0.0
SpawnYOffset=0.0
InvertBlockedSpawn=false
ViewBobTime=0.0
ViewBobAngleAdjustment=0.0
ViewBobCameraZOffset=0.0
ViewBobAffectsShots=false
IsFlyer=false
FlightObeysPitch=false
FlightVelocityUp=800.0
FlightVelocityDown=800.0
[Character Profile]
Name=Quaker
MaxHealth=275.0
WeaponProfileNames=;;;;;;;
MinRespawnDelay=0.001
MaxRespawnDelay=0.001
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=2.0
CameraOffset=X=0.000 Y=0.000 Z=80.000
HeadshotOnly=false
DamageKnockbackFactor=0.0
MovementType=Base
MaxSpeed=2600.0
MaxCrouchSpeed=500.0
Acceleration=100000.0
AirAcceleration=16000.0
Friction=4.0
BrakingFrictionFactor=2.0
JumpVelocity=1150.0
Gravity=3.0
AirControl=0.0
CanCrouch=true
CanPogoJump=false
CanCrouchInAir=true
CanJumpFromCrouch=false
EnemyBodyColor=X=0.771 Y=0.000 Z=0.000
EnemyHeadColor=X=1.000 Y=1.000 Z=1.000
TeamBodyColor=X=1.000 Y=0.888 Z=0.000
TeamHeadColor=X=1.000 Y=1.000 Z=1.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=0.0
MainBBType=Cylindrical
MainBBHeight=280.0
MainBBRadius=70.0
MainBBHasHead=true
MainBBHeadRadius=70.0
MainBBHeadOffset=-30.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=230.0
ProjBBRadius=70.0
ProjBBHasHead=true
ProjBBHeadRadius=300.0
ProjBBHeadOffset=0.0
ProjBBHide=true
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=;;;
HideWeapon=true
AerialFriction=0.25
StrafeSpeedMult=1.0
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=700.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.0
AllowBufferedJumps=true
BounceOffWalls=true
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.0
ThirdPersonCamera=false
TPSArmLength=300.0
TPSOffset=X=0.000 Y=150.000 Z=150.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
TerminalVelocity=0.0
CharacterModel=None
CharacterSkin=Default
SpawnXOffset=0.0
SpawnYOffset=0.0
InvertBlockedSpawn=false
ViewBobTime=0.0
ViewBobAngleAdjustment=0.0
ViewBobCameraZOffset=0.0
ViewBobAffectsShots=false
IsFlyer=false
FlightObeysPitch=false
FlightVelocityUp=800.0
FlightVelocityDown=800.0
[Dodge Profile]
Name=Long Strafes Jumping
MaxTargetDistance=3000.0
MinTargetDistance=0.0
ToggleLeftRight=true
ToggleForwardBack=true
MinLRTimeChange=0.5
MaxLRTimeChange=3.0
MinFBTimeChange=0.5
MaxFBTimeChange=1.5
DamageReactionChangesDirection=false
DamageReactionChanceToIgnore=0.5
DamageReactionMinimumDelay=0.125
DamageReactionMaximumDelay=0.25
DamageReactionCooldown=1.0
DamageReactionThreshold=0.0
DamageReactionResetTimer=0.1
JumpFrequency=0.5
CrouchInAirFrequency=0.0
CrouchOnGroundFrequency=0.0
TargetStrafeOverride=Ignore
TargetStrafeMinDelay=0.125
TargetStrafeMaxDelay=0.25
MinProfileChangeTime=0.0
MaxProfileChangeTime=0.0
MinCrouchTime=0.3
MaxCrouchTime=0.6
MinJumpTime=0.1
MaxJumpTime=0.1
LeftStrafeTimeMult=1.0
RightStrafeTimeMult=1.0
StrafeSwapMinPause=0.0
StrafeSwapMaxPause=0.0
BlockedMovementPercent=0.5
BlockedMovementReactionMin=0.125
BlockedMovementReactionMax=0.2
WaypointLogic=Ignore
WaypointTurnRate=200.0
MinTimeBeforeShot=0.15
MaxTimeBeforeShot=0.25
IgnoreShotChance=0.0
ForwardTimeMult=1.0
BackTimeMult=1.0
DamageReactionChangesFB=false
[Weapon Profile]
Name=LG
Type=Hitscan
ShotsPerClick=1
DamagePerShot=6.0
KnockbackFactor=2.0
TimeBetweenShots=0.046
Pierces=false
Category=FullyAuto
BurstShotCount=1
TimeBetweenBursts=0.5
ChargeStartDamage=10.0
ChargeStartVelocity=X=500.000 Y=0.000 Z=0.000
ChargeTimeToAutoRelease=2.0
ChargeTimeToCap=1.0
ChargeMoveSpeedModifier=1.0
MuzzleVelocityMin=X=2000.000 Y=0.000 Z=0.000
MuzzleVelocityMax=X=2000.000 Y=0.000 Z=0.000
InheritOwnerVelocity=0.0
OriginOffset=X=0.000 Y=0.000 Z=0.000
MaxTravelTime=5.0
MaxHitscanRange=100000.0
GravityScale=1.0
HeadshotCapable=true
HeadshotMultiplier=2.0
MagazineMax=0
AmmoPerShot=1
ReloadTimeFromEmpty=0.5
ReloadTimeFromPartial=0.5
DamageFalloffStartDistance=100000.0
DamageFalloffStopDistance=100000.0
DamageAtMaxRange=7.0
DelayBeforeShot=0.0
ProjectileGraphic=Ball
VisualLifetime=0.05
BounceOffWorld=false
BounceFactor=0.0
BounceCount=0
HomingProjectileAcceleration=0.0
ProjectileEnemyHitRadius=1.0
CanAimDownSight=false
ADSZoomDelay=0.0
ADSZoomSensFactor=0.7
ADSMoveFactor=1.0
ADSStartDelay=0.0
ShootSoundCooldown=0.08
HitSoundCooldown=0.08
HitscanVisualOffset=X=0.000 Y=0.000 Z=-80.000
ADSBlocksShooting=false
ShootingBlocksADS=false
KnockbackFactorAir=4.0
RecoilNegatable=false
DecalType=0
DecalSize=30.0
DelayAfterShooting=0.0
BeamTracksCrosshair=true
AlsoShoot=
ADSShoot=
StunDuration=0.0
CircularSpread=true
SpreadStationaryVelocity=0.0
PassiveCharging=false
BurstFullyAuto=true
FlatKnockbackHorizontal=0.0
FlatKnockbackVertical=0.0
HitscanRadius=0.0
HitscanVisualRadius=6.0
TaggingDuration=0.0
TaggingMaxFactor=1.0
TaggingHitFactor=1.0
RecoilCrouchScale=1.0
RecoilADSScale=1.0
PSRCrouchScale=1.0
PSRADSScale=1.0
ProjectileAcceleration=0.0
AccelIncludeVertical=true
AimPunchAmount=0.0
AimPunchResetTime=0.05
AimPunchCooldown=0.5
AimPunchHeadshotOnly=false
AimPunchCosmeticOnly=true
MinimumDecelVelocity=0.0
PSRManualNegation=false
PSRAutoReset=true
AimPunchUpTime=0.05
AmmoReloadedOnKill=0
CancelReloadOnKill=false
FlatKnockbackHorizontalMin=0.0
FlatKnockbackVerticalMin=0.0
ADSScope=No Scope
ADSFOVOverride=72.099998
ADSFOVScale=Overwatch
ADSAllowUserOverrideFOV=true
IsBurstWeapon=false
ForceFirstPersonInADS=true
ZoomBlockedInAir=false
ADSCameraOffsetX=0.0
ADSCameraOffsetY=0.0
ADSCameraOffsetZ=0.0
QuickSwitchTime=0.1
WeaponModel=Heavy Surge Rifle
WeaponAnimation=Primary
UseIncReload=false
IncReloadStartupTime=0.0
IncReloadLoopTime=0.0
IncReloadAmmoPerLoop=1
IncReloadEndTime=0.0
IncReloadCancelWithShoot=true
WeaponSkin=Default
ProjectileVisualOffset=X=0.000 Y=0.000 Z=0.000
SpreadDecayDelay=0.0
ReloadBeforeRecovery=true
3rdPersonWeaponModel=Pistol
3rdPersonWeaponSkin=Default
ParticleMuzzleFlash=None
ParticleWallImpact=None
ParticleBodyImpact=None
ParticleProjectileTrail=None
ParticleHitscanTrace=Tracer
ParticleMuzzleFlashScale=1.0
ParticleWallImpactScale=1.0
ParticleBodyImpactScale=1.0
ParticleProjectileTrailScale=1.0
Explosive=false
Radius=500.0
DamageAtCenter=100.0
DamageAtEdge=0.0
SelfDamageMultiplier=0.5
ExplodesOnContactWithEnemy=false
DelayAfterEnemyContact=0.0
ExplodesOnContactWithWorld=false
DelayAfterWorldContact=0.0
ExplodesOnNextAttack=false
DelayAfterSpawn=0.0
BlockedByWorld=false
SpreadSSA=1.0,1.0,-1.0,0.0
SpreadSCA=1.0,1.0,-1.0,0.0
SpreadMSA=1.0,1.0,-1.0,0.0
SpreadMCA=1.0,1.0,-1.0,0.0
SpreadSSH=1.0,1.0,-1.0,0.0
SpreadSCH=1.0,1.0,-1.0,0.0
SpreadMSH=1.0,1.0,-1.0,0.0
SpreadMCH=1.0,1.0,-1.0,0.0
MaxRecoilUp=0.0
MinRecoilUp=0.0
MinRecoilHoriz=0.0
MaxRecoilHoriz=0.0
FirstShotRecoilMult=1.0
RecoilAutoReset=false
TimeToRecoilPeak=0.05
TimeToRecoilReset=0.35
AAMode=0
AAPreferClosestPlayer=false
AAAlpha=0.05
AAMaxSpeed=1.0
AADeadZone=0.0
AAFOV=720.0
AANeedsLOS=true
TrackHorizontal=true
TrackVertical=false
AABlocksMouse=false
AAOffTimer=0.0
AABackOnTimer=0.0
TriggerBotEnabled=false
TriggerBotDelay=0.0
TriggerBotFOV=1.0
StickyLock=false
HeadLock=false
VerticalOffset=0.0
DisableLockOnKill=false
UsePerShotRecoil=false
PSRLoopStartIndex=0
PSRViewRecoilTracking=0.45
PSRCapUp=9.0
PSRCapRight=4.0
PSRCapLeft=4.0
PSRTimeToPeak=0.095
PSRResetDegreesPerSec=40.0
UsePerBulletSpread=false
PBS0=0.0,0.0
[Map Data]
reflex map version 8
global
entity
type WorldSpawn
String32 targetGameOverCamera end
UInt8 playersMin 1
UInt8 playersMax 16
brush
vertices
-128.000000 256.000000 640.000000
640.000000 256.000000 640.000000
640.000000 256.000000 -128.000000
-128.000000 256.000000 -128.000000
-128.000000 240.000000 640.000000
640.000000 240.000000 640.000000
640.000000 240.000000 -128.000000
-128.000000 240.000000 -128.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
-128.000000 784.000000 640.000000
640.000000 784.000000 640.000000
640.000000 784.000000 -128.000000
-128.000000 784.000000 -128.000000
-128.000000 768.000000 640.000000
640.000000 768.000000 640.000000
640.000000 768.000000 -128.000000
-128.000000 768.000000 -128.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
256.000000 256.000000 656.000000
33.777786 256.000000 611.555603
256.000000 256.000000 640.000000
42.666672 416.000031 597.333374
256.000000 416.000000 640.000000
42.666672 256.000000 597.333374
33.777786 416.000031 611.555603
256.000000 416.000000 656.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 7 4 3 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 7 6 0x00000000
brush
vertices
33.777786 256.000000 611.555603
-99.555565 256.000000 478.222260
42.666672 256.000000 597.333374
-85.333344 416.000031 469.333344
42.666672 416.000031 597.333374
-85.333344 256.000000 469.333344
-99.555565 416.000031 478.222260
33.777786 416.000031 611.555603
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000
brush
vertices
-99.555565 256.000000 478.222260
-144.000000 256.000000 256.000000
-85.333344 256.000000 469.333344
-128.000000 416.000000 256.000000
-85.333344 416.000031 469.333344
-128.000000 256.000000 256.000000
-144.000000 416.000000 256.000000
-99.555565 416.000031 478.222260
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000
brush
vertices
-144.000000 256.000000 256.000000
-99.555557 256.000000 33.777786
-128.000000 256.000000 256.000000
-85.333328 416.000031 42.666672
-128.000000 416.000000 256.000000
-85.333328 256.000000 42.666672
-99.555557 416.000031 33.777786
-144.000000 416.000000 256.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 7 4 3 6 0x00000000
brush
vertices
-99.555557 256.000000 33.777786
33.777779 256.000000 -99.555565
-85.333328 256.000000 42.666672
42.666679 416.000031 -85.333344
-85.333328 416.000031 42.666672
42.666679 256.000000 -85.333344
33.777779 416.000031 -99.555565
-99.555557 416.000031 33.777786
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000
brush
vertices
33.777779 256.000000 -99.555565
256.000000 256.000000 -144.000000
42.666679 256.000000 -85.333344
256.000000 416.000000 -128.000000
42.666679 416.000031 -85.333344
256.000000 256.000000 -128.000000
256.000000 416.000000 -144.000000
33.777779 416.000031 -99.555565
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 7 0 2 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 7 6 0x00000000
brush
vertices
256.000000 256.000000 -144.000000
478.222260 256.000000 -99.555557
256.000000 256.000000 -128.000000
469.333344 416.000031 -85.333328
256.000000 416.000000 -128.000000
469.333344 256.000000 -85.333328
478.222260 416.000031 -99.555557
256.000000 416.000000 -144.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 5 1 6 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 7 4 3 6 0x00000000
brush
vertices
478.222260 256.000000 -99.555557
611.555603 256.000000 33.777779
469.333344 256.000000 -85.333328
597.333374 416.000031 42.666679
469.333344 416.000031 -85.333328
597.333374 256.000000 42.666679
611.555603 416.000031 33.777779
478.222260 416.000031 -99.555557
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000
brush
vertices
611.555603 256.000000 33.777779
656.000000 256.000000 256.000000
597.333374 256.000000 42.666679
640.000000 416.000000 256.000000
597.333374 416.000031 42.666679
640.000000 256.000000 256.000000
656.000000 416.000000 256.000000
611.555603 416.000031 33.777779
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000
brush
vertices
656.000000 256.000000 256.000000
611.555603 256.000000 478.222260
640.000000 256.000000 256.000000
597.333374 416.000031 469.333344
640.000000 416.000000 256.000000
597.333374 256.000000 469.333344
611.555603 416.000031 478.222260
656.000000 416.000000 256.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 5 1 6 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 7 4 3 6 0x00000000
brush
vertices
611.555603 256.000000 478.222260
478.222260 256.000000 611.555603
597.333374 256.000000 469.333344
469.333344 416.000031 597.333374
597.333374 416.000031 469.333344
469.333344 256.000000 597.333374
478.222260 416.000031 611.555603
611.555603 416.000031 478.222260
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000
brush
vertices
478.222260 256.000000 611.555603
256.000000 256.000000 656.000000
469.333344 256.000000 597.333374
256.000000 416.000000 640.000000
469.333344 416.000031 597.333374
256.000000 256.000000 640.000000
256.000000 416.000000 656.000000
478.222260 416.000031 611.555603
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 7 0 2 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000
brush
vertices
33.777786 416.000000 611.555603
-99.555565 416.000000 478.222260
42.666672 416.000000 597.333374
-85.333344 768.000000 469.333344
42.666672 768.000000 597.333374
-85.333344 416.000000 469.333344
-99.555565 768.000000 478.222260
33.777786 768.000000 611.555603
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-99.555565 416.000000 478.222260
-144.000000 416.000000 256.000000
-85.333344 416.000000 469.333344
-128.000000 768.000000 256.000000
-85.333344 768.000000 469.333344
-128.000000 416.000000 256.000000
-144.000000 768.000000 256.000000
-99.555565 768.000000 478.222260
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000 internal/editor/textures/editor_clip
brush
vertices
256.000000 416.000000 656.000000
33.777786 416.000000 611.555603
256.000000 416.000000 640.000000
42.666672 768.000000 597.333374
256.000000 768.000000 640.000000
42.666672 416.000000 597.333374
33.777786 768.000000 611.555603
256.000000 768.000000 656.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 7 4 3 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 7 6 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-144.000000 416.000000 256.000000
-99.555557 416.000000 33.777786
-128.000000 416.000000 256.000000
-85.333328 768.000000 42.666672
-128.000000 768.000000 256.000000
-85.333328 416.000000 42.666672
-99.555557 768.000000 33.777786
-144.000000 768.000000 256.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 7 4 3 6 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-99.555557 416.000000 33.777786
33.777779 416.000000 -99.555565
-85.333328 416.000000 42.666672
42.666679 768.000000 -85.333344
-85.333328 768.000000 42.666672
42.666679 416.000000 -85.333344
33.777779 768.000000 -99.555565
-99.555557 768.000000 33.777786
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000 internal/editor/textures/editor_clip
brush
vertices
33.777779 416.000000 -99.555565
256.000000 416.000000 -144.000000
42.666679 416.000000 -85.333344
256.000000 768.000000 -128.000000
42.666679 768.000000 -85.333344
256.000000 416.000000 -128.000000
256.000000 768.000000 -144.000000
33.777779 768.000000 -99.555565
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 7 0 2 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 7 6 0x00000000 internal/editor/textures/editor_clip
brush
vertices
256.000000 416.000000 -144.000000
478.222260 416.000000 -99.555557
256.000000 416.000000 -128.000000
469.333344 768.000000 -85.333328
256.000000 768.000000 -128.000000
469.333344 416.000000 -85.333328
478.222260 768.000000 -99.555557
256.000000 768.000000 -144.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 5 1 6 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 7 4 3 6 0x00000000 internal/editor/textures/editor_clip
brush
vertices
478.222260 416.000000 -99.555557
611.555603 416.000000 33.777779
469.333344 416.000000 -85.333328
597.333374 768.000000 42.666679
469.333344 768.000000 -85.333328
597.333374 416.000000 42.666679
611.555603 768.000000 33.777779
478.222260 768.000000 -99.555557
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000 internal/editor/textures/editor_clip
brush
vertices
611.555603 416.000000 33.777779
656.000000 416.000000 256.000000
597.333374 416.000000 42.666679
640.000000 768.000000 256.000000
597.333374 768.000000 42.666679
640.000000 416.000000 256.000000
656.000000 768.000000 256.000000
611.555603 768.000000 33.777779
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000 internal/editor/textures/editor_clip
brush
vertices
656.000000 416.000000 256.000000
611.555603 416.000000 478.222260
640.000000 416.000000 256.000000
597.333374 768.000000 469.333344
640.000000 768.000000 256.000000
597.333374 416.000000 469.333344
611.555603 768.000000 478.222260
656.000000 768.000000 256.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 5 1 6 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 7 4 3 6 0x00000000 internal/editor/textures/editor_clip
brush
vertices
611.555603 416.000000 478.222260
478.222260 416.000000 611.555603
597.333374 416.000000 469.333344
469.333344 768.000000 597.333374
597.333374 768.000000 469.333344
469.333344 416.000000 597.333374
478.222260 768.000000 611.555603
611.555603 768.000000 478.222260
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000 internal/editor/textures/editor_clip
brush
vertices
478.222260 416.000000 611.555603
256.000000 416.000000 656.000000
469.333344 416.000000 597.333374
256.000000 768.000000 640.000000
469.333344 768.000000 597.333374
256.000000 416.000000 640.000000
256.000000 768.000000 656.000000
478.222260 768.000000 611.555603
faces
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 1 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 5 1 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 7 0 2 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 1 0 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 3 6 7 0x00000000 internal/editor/textures/editor_clip
entity
type CameraPath
UInt8 posLerp 2
UInt8 angleLerp 2
entity
type PlayerSpawn
Vector3 position 256.000000 256.000000 128.000000
Bool8 teamB 0
Bool8 initialSpawn 0
Bool8 modeCTF 0
Bool8 modeFFA 0
Bool8 modeTDM 0
Bool8 mode1v1 0
Bool8 modeRace 0
Bool8 mode2v2 0
entity
type PlayerSpawn
Vector3 position 256.000000 256.000000 384.000000
Vector3 angles 180.000000 0.000000 0.000000
Bool8 teamA 0
Bool8 initialSpawn 0
Bool8 modeCTF 0
Bool8 modeFFA 0
Bool8 modeTDM 0
Bool8 mode1v1 0
Bool8 modeRace 0
Bool8 mode2v2 0
|
2a1ae484c1ef1f134678fb54d01a2c092422ee2e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3784/CH1/EX1.22/Ex1_22.sce | 217ed861e8fd3dc9e51091daba9682b77cb6f414 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 601 | sce | Ex1_22.sce | clc
// Variable Initialization
Vm=240//Supply Voltage in Volts
Ra=0.9//Combined Field and Armature circuit resistance in Ohm
N=900 //Motor speed in Rpm
V=220//Rated voltage of motor in Volts
a=45//firing angle in Degree
Kaf=0.035 //Constant in N-m/A^2
//Solution
//For semi-converter controlled Dc Drive
Va=(Vm*1.414)*(1+cosd(a))*(1/%pi)//Average voltage in Volts
W=(2*%pi*N)/60 //angular speed in Rad/sec
Ia=Va/(Ra+W*Kaf)//Current in Amp
T=Kaf*(Ia)^2//Torque in N-m
//Results
printf('\n\n The motor Current =%0.1f Amp \n\n',Ia)
printf('\n\n The motor Torque =%0.1f N-m \n\n',T)
|
cc464cae614bbef71f6520c25d8ef85e769dfdfc | 449d555969bfd7befe906877abab098c6e63a0e8 | /1850/CH6/EX6.4/exa_6_4.sce | 0fd77ec753cda3b50690d08f16e61cacb5f7939c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 453 | sce | exa_6_4.sce | // Exa 6.4
clc;
clear;
close;
// Given Data
f= 1;// in kHz
f= f*10^3;// in Hz
// Vout/Vin= 10
R1= 100;// in k ohm
R1=R1*10^3;// in ohm
R2= 1000;// in k ohm
R2=R2*10^3;// in ohm
omega= 2*%pi*f;
// Vout/Vin at a 3 dB frequency of 1 kHz = 1/sqrt(2) = omega*R2*C/sqrt(1+omega^2*R1^2*C2)
C= sqrt(1/(omega^2*(2*R2^2-R1^2)));// in F
disp(R1*10^-3,"Value of R1 in k ohm");
disp(R2*10^-6,"Value of R2 in k ohm");
disp(C,"Value of C in k ohm");
|
a5d7269f399f170a361f98101bee7e11bb970c12 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1619/CH2/EX2.6.2/Example2_6_2.sce | 0ad54d89217800f6748b4563904cf82d7852ab43 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 385 | sce | Example2_6_2.sce | //Example 2.6.2 page 2.34
clc;
clear;
t= 0.1*10^-6;
L= 10;
B_opt= 1/(2*t);
B_opt=B_opt/1000000; //converting from Hz to MHz
printf("The maximum optical bandwidth is %d MHz.",B_opt);
del= t/L;
del=del/10^-6; //converting in us...
printf("\n\nThe dispersion per unit length is %.2f us/Km",del);
BLP= B_opt*L;
printf("\n\nThe Bandwidth-Length product is %d MHz.Km",BLP);
|
db0324a966b5d634f7476e6d786c3b57b45623af | c6196553a0199f808a6ec5cdb7c257bffc4e1832 | /TP_Intro/2.2_Amelioration_Dynamique.sce | 1d1c6d39fe4ed19ad4e74a7459b6a4c38f724859 | [] | no_license | rianaR/T.I.A | 034b5e503145e54460fa17404c4b51524e269dd8 | b1a3011f4d4101cbe163399c9f46abd31c4977e5 | refs/heads/master | 2021-01-10T05:09:03.931399 | 2015-11-05T08:55:45 | 2015-11-05T08:55:45 | 43,305,164 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 451 | sce | 2.2_Amelioration_Dynamique.sce | //xdel(winsid());
//Amelioration de contraste
clown = double((imread("images/CLOWN_LUMI2.BMP")));
//figure;ShowImage(clown/255, "Clown original");
//Valeurs minimales et maximales de l'image
a=min(clown(:));
b=max(clown(:));
//Etalage de l'histogramme
CE = ((clown-a)*255)/(b-a);
figure; ShowImage(CE/255, "Clown contrasté");
//Histogramme de l'image
//figure; histplot(255,clown, normalization = %f);
figure; histplot(255,CE, normalization = %f);
|
623a6eba32e577896b5533b227c6e5749d75204b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1388/CH4/EX4.22/4_22.sce | 2e6731ee3254828d69fd4c44f3a24ed9d4be7918 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 452 | sce | 4_22.sce | clc
//initialisation of variables
p= 1 //atm
p1= 3 //atm
R= 1.987 //cal/mole K
T= 27 //C
b= 0.0428 //l mole^-1
a= 3.61 //l^2 atm mole^-1
//CALCULATIONS
G= R*(273+T)*log(p/p1)
A= R*(273+T)*log(p/p1)
G1= R*(273+T)*log(p/p1)+(b-(a/(0.08205*(T+273))))*(p-p1)*(R/0.08205)
//RESULTS
printf (' Gibs free energy= %.f cal',G)
printf (' \n Value of A= %.f cal',A)
printf (' \n Gibs free energy= %.f cal',G1)
printf (' \n Value of A= %.f cal',A)
|
ca4d961ca48669ae58c96da06f2fc7eac4b461c9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2267/CH12/EX4.9/Ex12_9.sce | 4a1fa5cd88df00992d7dec176b685ed4713247f6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 258 | sce | Ex12_9.sce | //Part B Chapter 4 Example 9
clc;
clear;
close;
d=120;//mm
D1=120;//mm
D2=60;//mm
ThBYTs=(D1^4-D2^4)/d^4;
WhBYWs=%pi/4*((D1^2-D2^2)/(%pi/4)/d^2);
disp("Strength ratio, Th/Ts is "+string(ThBYTs));
disp("Weight ratio, Wh/Ws is "+string(WhBYWs));
|
a3ff3accad47c9e49572c4e21471e5a949278d78 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1955/CH3/EX3.2/example2.sce | e79aa5b26b819fba8d915732900d7319f4d6fad6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,142 | sce | example2.sce | clc
clear
//input data
Q1=20//Discharge of air to the centrifugal compressor in m^3/s
V1=Q1//Volume of rate is equal to the discharge in m^3/s
P1=1//Initial pressure of the air to the centrifugal compressor in bar
T1=288//Initial temperature of the air to the centrifugal compressor in K
P=1.5//The pressure ratio of compression in centrifugal compressor
C1=60//The velocity of flow of air at inlet in m/s
Cr2=C1//The radial velocity of flow of air at outlet in m/s
Dh=0.6//The inlet impeller diameter in m
Dt=1.2//The outlet impeller diameter in m
N=5000//The speed of rotation of centrifugal compressor in rpm
n=1.5//polytropic index constant in the given law PV^n
Cp=1005//The specific heat of air at constant pressure in J/kg.K
//calculations
U1=(3.14*Dh*N)/60//Peripheral velocity of impeller at inlet in m/s
b11=atand(C1/U1)//The blade angle at impeller inlet in degree
U2=(3.14*Dt*N)/60//Peripheral velocity of impeller top at outlet in m/s
T2=T1*(P)^((n-1)/n)//Final temperature of the air to the centrifugal compressor in K
Cx2=((Cp*(T2-T1))/U2)//The whirl component of absolute velocity in m/s
Wx2=U2-Cx2//The exit relative velocity in m/s
a2=atand(Cr2/Cx2)//The blade angle at inlet to casing in degree
b22=atand(Cr2/Wx2)//The blade angle at impeller outlet in degree
b1=Q1/(2*3.14*(Dh/2)*C1)//The breadth of impeller blade at inlet in m
V2=(P1*V1*T2)/(T1*P*P1)//Volume flow rate of air at exit in m^3/s
Q2=V2//Volume flow rate is equal to discharge in m^3/s
b2=Q2/(2*3.14*(Dt/2)*Cr2)//The breadth of impeller blade at outlet in m
//output
printf('(a)The blade and flow angles\n (1)The blade angle at impeller inlet is %3.1f degree\n (2)The blade angle at inlet to casing is %3.1f degree\n (3)The blade angle at impeller outlet is %3.2f degree\n(b)Breadth of the impeller blade at inlet and outlet\n (1)The breadth of impeller blade at inlet is %3.3f m\n (2)The Volume flow rate of air at exit is %3.2f m^3/s\n (3)The breadth of impeller blade at outlet is %3.4f m',b11,a2,b22,b1,V2,b2)
//comments
//error in the first review is not printing the value of V2 which is corrected
|
7145f0d8bbb5216b1ec2e697fda1f5c7f945b06f | 717ddeb7e700373742c617a95e25a2376565112c | /1766/CH8/EX8.11/EX8_11.sce | 2cf7580844f4025ef25c4b13011f05774395ca96 | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 1,884 | sce | EX8_11.sce | clc;funcprot(0);//Example 8.11
//Initilisation of Variables
Tci=20;......//Inlet temparature of oil in degrees celcius
Tco=90;......//Outlet temparature of oil in degrees celcius
Cpc=2;....//Specific heat of oil in kJ/kgK
Thi=140;......//Inlet temparature of steam in degrees celcius
Tho=115;......//Outlet temparature of steam in degrees celcius
mh=5;....//Mass flow rate of steam in kg/s
U=300;..........//Overall heat transfer coefficient in W/m^2K
Cph=2;....//Specific heat of steam in kJ/kgK
Cpc=2;....//Specific heat of air in kJ/kgK
L=2.5;.....//Lemgth of the tube in m
Di=0.05;....//Diameter of tube in m
//calculations
LMTDc=((Thi-Tco)-(Tho-Tci))/log((Thi-Tco)/(Tho-Tci));......//Log mean temparature diffrence of steam in counter flow arrangement in K
R2=(Thi-Tho)/(Tco-Tci);....//Resistanfce from counter flow
R1=(Tco-Tci)/(Thi-Tci);....//Resistanfce from counter flow
F0=0.97;......//From the graph F and R1,R2
Q=mh*Cph*(Thi-Tho);....//Heat transfer water in W
A=(Q*1000)/(LMTDc*U*F0);......//Area of heat exchanger in counter flow in m^2
mc=Q/(Cpc*(Tco-Tci));.....//Mass flow rate of oil in kg/s
mch=mc/2;........//Mass flow rate of oil is reduced to half
Ch=mh*Cph;....//Heat capacity of air by counter flow kW/K
Cc=mch*Cpc;....//Heat capacity of water by counter flow kW/K
R=Cc/Ch;.....//Resistance
NTU=(U*A)/(Cc*1000);....//Number of transfer units
E=(1/R)*{1-exp(-R*(1-exp(-NTU)))};.....//Effectiveness
Tcoa=Tci+((E*Cc*(Thi-Tci))/Cc);.....//
Thoa=Thi-((E*Cc*(Thi-Tci))/Ch);.....//
Qact=Cc*(Tcoa-Tci);.....//Actual heat transfer in kW
n=A/(%pi*Di*L);.....//Number of tubes
Qred=((Q-Qact)-1)*100/Q;.....//Heat transfer rate if the flow rate of oil is reduced to half
disp(A,"Surface area of heat exchanger in m^2:")
disp(n,"number of tubes of oil flow:")
disp(Qred,"Heat transfer rate if the flow rate of oil is reduced to half:")
|
390e3db0bb2edcdb1ddba3488b10e3b750f4bd43 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1427/CH5/EX5.32/5_32.sce | 8f186e85b0efcc02e83396d1ff7a21383048c2d0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 470 | sce | 5_32.sce | //ques-5.32
//Calculating pH of different salt solutions
clc
Kw=10^-14;
//(i)0.02M NH4Cl
Kb=1.8*10^-5;
c=0.02;
p1=(-log10(Kw)+log10(Kb)-log10(c))/2;
printf("pH of Ammonium chloride solution is %.2f.\n",p1);
//(ii)0.01M CH3COONa
Ka=Kb;
c=0.01;
p2=(-log10(Kw)-log10(Ka)+log10(c))/2;
printf(" pH of Sodium acetate solution is %.2f.\n",p2);
//(iii)CH3COONH4
p3=(-log10(Kw)-log10(Ka)+log10(Kb))/2;
printf(" pH of Ammonium acetate solution is %.1f.",p3);
|
9f721c061cacfcd1c7ec1aaabbbe7e9fc12ec772 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2657/CH11/EX11.7/Ex11_7.sce | 256945ec37cc6933c8e3f2c846f3bd7d7631af59 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,152 | sce | Ex11_7.sce | //Change in air fuel ratio at altitude
clc,clear
//Given:
ha=5000 //Altitude in m
A_F=14 //Air fuel ratio at sea level
P1=1.013 //Pressure of air in bar at sea level
T1=27+273 //Temperature of air in K at sea level
R=0.287 //Specific gas constant in kJ/kgK
function t=f1(h),t=ts-0.0065*h,endfunction //Temperature(t in degreeC) as a function of altitude(h in m)
function h=f2(P),h=19200*log10(1.013/P),endfunction //Altitude(h in m) as a function of pressure(P in bar)
//Solution:
ts=T1-273 //Sea level temperature in degreeC
T2=f1(ha) //Temperature at altitude(ha = 5000 m) in degreeC
T2=T2+273 //in K
//Defining, y as a function of P
//This function is the difference of function(f2) and ha given
function y=f(P),y=f2(P)-ha,endfunction
//The function f is solve for zero to get the value of P2
P2=fsolve(1,f) //Pressure at altitude(ha = 5000 m) in bar
rho_a=P2/(R*T2) //Density of air at altitude in kg/m^3
rho_s=P1/(R*T1) //Density of air at sea level in kg/m^3
A_F_a=A_F*sqrt(rho_a/rho_s) //Air fuel ratio at altitude
//Results:
printf("\n The air fuel ratio supplied at 5000 m altitude by a carburettor = %.2f\n\n",A_F_a)
|
588add942614badf6f8a9ab71f3356a15af6a2dc | 449d555969bfd7befe906877abab098c6e63a0e8 | /3826/CH1/EX1.7/Ex1_7.sce | 22e010a7e9915b6b5eeabd26182de197e04a55e1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 497 | sce | Ex1_7.sce | //Example 1_7 page no:74
clc;
//given
power = 75;//in kW
rpm = 500;
energy = 5400;
fl_load_torque = (power * 1000 * 60)/(2 * %pi * rpm);
str_torque = 2145;
acc_torque = 715;
stored_energy = energy * power;
omega = rpm *(2*%pi/60);
I = (2 * stored_energy)/(omega^2);
alpha = acc_torque / I;
t = omega / alpha;
disp(t,"the time taken to start the motor if the load torque is equal to full load torque is (in s)");
//the result vary slightly hence values are rounded off in text book
|
8faf6f96fc30e16189d9371a6b236b4ffa58a1f3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2870/CH10/EX10.7/Ex10_7.sce | 1dc8c201284380e4f788042a6342ca521402de67 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 805 | sce | Ex10_7.sce | clc;clear;
//Example 10.7
//given data
T0=290;
Tsource=1600;
Tsink=T0;
//from Ex 10.1
qin=2728.6;
qout=2018.6;
h4=2403;
//from steam tables
s1=1.2132;
s3=6.7450;
//calculations
s2=s1;s4=s3;//isentropic processes
xdest12=0;
xdest34=0;
xdest23=T0*(s3-s2-(qin/Tsource));
xdest41=T0*(s1-s4+(qout/Tsink));
disp(xdest12,'exergy destruction in 1-2 in kJ/kg');
disp(round(xdest23),'exergy destruction in 2-3 in kJ/kg');
disp(xdest34,'exergy destruction in 3-4 in kJ/kg');
disp(round(xdest41),'exergy destruction in 4-1 in kJ/kg');
xdestcy=xdest12+xdest23+xdest34+xdest41;
disp(round(xdestcy),'exergy destruction in cycle in kJ/kg');
//from steam tables
//at 290 K and 100 kPa
h0=71.355;
s0=0.2533;
X4=(h4-h0)-T0*(s4-s0);
disp(round(X4),'exergy of the leaving steam in kJ/kg')
|
5147094c7f85b9669f2025a65278b24c6e4d778a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2741/CH10/EX10.36/ExampleA36.sce | 57889703a24724d5b5f29dec574c5810305e7237 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 663 | sce | ExampleA36.sce | clc
clear
//Page number 486
//Input data
t2=7;//The low temperature of reservoir in degree centigrade
n1=50;//The efficiency of the carnots engine in percentage
n2=70;//The increased efficiency of the carnots engine in percentage
//Calculations
T2=t2+273;//The low temperature of the reservoir in K
T1=T2/(1-(n1/100));//The temperature of the source reservoir in K
T11=T2/(1-(n2/100));//The temperature to be maintained by the source reservoir in K
T=T11-T1;//The increase in temperature of the source in K or degree centigrade
//Output
printf('The increase in temperature of the source is %3.1f K (or) %3.1f degree centigrade ',T,T)
|
ac2767ea9cbeb6baffbfe2fdbcbd71f3750e95da | 449d555969bfd7befe906877abab098c6e63a0e8 | /2417/CH10/EX10.6/Ex10_6.sce | 9671004704c4a1720ad5e57519dc032c582817cb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,274 | sce | Ex10_6.sce | //scilab 5.4.1
clear;
clc;
printf("\t\t\tProblem Number 10.6\n\n\n");
// Chapter 10 : Refrigeration
// Problem 10.6 (page no. 509)
// Solution
//From Appendix 3,at 120psia,the corresponding saturation temperature is 66 F, enthalpies are
h1=116.0; //Unit:Btu/lbm //enthalpy
h2=116.0; //Unit:Btu/lbm //Throttling gives h1=h2 //enthalpy
h3=602.4; //Unit:Btu/lbm //enthalpy
//From the consideration that s3=s4,h4 is found at 15 psia,
s3=1.3938; //s=entropy //Unit:Btu/(lbm*F)
//Therefore by interpolation in the superheat tables at 120 psia,
t4=237.4; //Unit:fahrenheit //temperature
h4=733.4; //Unit:Btu/lbm //enthalpy
printf("Solution for (a),\n");
COP=(h3-h1)/(h4-h3); //Coefficient of performance
printf("Coefficient of performance is %f\n\n",COP);
printf("Solution for (b),\n");
printf("The work of compression is %f Btu/lbm\n\n",h4-h3);
printf("Solution for (c),\n");
printf("The refrigatering effect is %f Btu/lbm\n\n",h3-h1);
printf("Solution for (d),\n");
tons=30; //capacity of 30 tons is desired
printf("The pounds per minute of ammonia required for ciculation is %f lbm/min\n\n",(200*tons)/(h3-h1));
printf("Solution for (e),\n");
printf("The ideal horsepower per ton of refrigeration is %f hp/ton\n\n",4.717*((h4-h3)/(h3-h1)));
|
1d20191899ca4477d511497ac0d4dbc603f3283e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3784/CH1/EX1.11/Ex1_11.sce | 13a778e84ff078306a30f984fa9801e60b19da59 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,449 | sce | Ex1_11.sce | clc
// Variable Initialization
Vm=230//Supply Voltage in Volts
Ra=0.5//Armature circuit resistance in Ohm
Irms=25 //Armature current in Amp
Nr=800 //Motor speed in Rpm
Kaf=0.172 //Motor Voltage Constant in V/rpm
a=60//firing angle in Degree
//Solution
//CASE:A
//For motoring action
Ka=(Kaf*60)/(2*%pi)//Constant in V-s/rad
T=Ka*Irms //Torque of motor in N-m
Va=(2*Vm*1.414)*cosd(a)*(1/%pi)//Average voltage in Volts
Eb=Va-(Irms*Ra)//Back Emf in Volts
N=Eb/Kaf//Speed of motor in Rpm
//The supply current is square wave if motor current is constant and ripple-free with Amplitude 25A
P=Vm*Irms //Supply VA in Watt
//Power from supply is real power if losses in converter are neglected
Ps=Va*Irms //Power in Watt
pf=Ps/P //Power factor lag
//CASE:B
//For polarity reversal (regeneration action)
Eb1=-Eb //Back emf in Volts
Va1=Eb1+(Irms*Ra)
af=acosd((Va1*%pi)/(2*Vm*1.414))//Firing angle in Degree
//Power fed from DC Machine
Pdc=Eb*Irms //Power in watt
//Power lost in armature resistance
PL=((Irms)^2)*Ra //Power in Watt
//Power fed back to ac supply is
PF=Pdc-PL //Power in watt
//Results
printf('\n\n The motor Torque=%0.1f N-m \n\n',T)
printf('\n\n The motor Speed =%0.1f RPM \n\n',N)
printf('\n\n The Supply Power Factor=%0.1f Lag\n\n',pf)
printf('\n\n The Firing Angle=%0.1f Degree\n\n',af)
printf('\n\n The Power fed back to Supply=%0.1f Watt\n\n',PF)
//The answers vary due to round off error
|
18dde32c86475cce42166704512cd66e0b48a92b | 449d555969bfd7befe906877abab098c6e63a0e8 | /24/CH20/EX20.1/Example20_1.sce | 3f93ad9e8bac8a3c3cb9b51573f9351ff7e0c85a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 290 | sce | Example20_1.sce | //Given that
Vi = 12 //in L
Ti = 20+273 //in K
Pi = 15 //in atm
Tf = 35+273 //in K
Vf = 8.5 //in L
R = .0821 //in atm.lit/(mol.K)
//Sample Problem 20-1
printf("**Sample Problem 20-1**\n")
Pf = (Pi*Vi/(R*Ti))/(Vf/(R*Tf))
printf("The final pressure of the gas is %fatm", Pf) |
70c8c6b7a291733d960f822283e825656c0b2ce8 | 2ae858a680a4ccf8a2ec89a45a1e48a0292d8eab | /macros/sobel.sci | d1e4e2171e8e8ad8353ae523f3c826beb336f606 | [] | no_license | shreyneil/FOSSEE-Image-Processing-Toolbox | f315a82c325b2d6cbd0611689f3e30071a38490d | dd1cbd0dcbe0c3dd11d6ce1ab205b4b72011ae56 | refs/heads/master | 2020-12-02T16:26:13.755637 | 2017-07-07T19:22:33 | 2017-07-07T19:22:33 | 96,552,147 | 0 | 0 | null | 2017-07-07T15:32:15 | 2017-07-07T15:32:15 | null | UTF-8 | Scilab | false | false | 2,336 | sci | sobel.sci | // Copyright (C) 2015 - IIT Bombay - FOSSEE
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Author: Shreyash Sharma
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
function new_image = sobel(image, ddepth, dx, dy, ksize, scale, delta)
// This function is used to calculate the first, second, third, or mixed image derivatives using an extended Sobel operator.
//
// Calling Sequence
// B = sobel(A,ddepth,dx,dy,ksize,scale,delta)
//
// Parameters
// A: image matrix of the source image.
// ddepth : output image depth; the following combinations of src.depth() and ddepth are supported such as ,src.depth() = CV_8U, ddepth = -1/CV_16S/CV_32F/CV_64F,src.depth() = CV_16U/CV_16S, ddepth = -1/CV_32F/CV_64F,src.depth() = CV_32F, ddepth = -1/CV_32F/CV_64F,src.depth() = CV_64F, ddepth = -1/CV_64F,when ddepth=-1, the destination image will have the same depth as the source; in the case of 8-bit input images it will result in truncated derivatives.
// dx: order of the derivative x.
// dy: order of the derivative y.
// ksize: size of the extended Sobel kernel; it must be 1, 3, 5, or 7.
// scale: optional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels() for details).
// delta: optional delta value that is added to the results prior to storing them in dst.
// B : output image with it's histogram matching similar to a given reference image.
//
// Description
// This function is used to calculate the first, second, third, or mixed image derivatives using an extended Sobel operator.In all cases except one, the ksize X ksize separable kernel is used to calculate the derivative. When ksize = 1 , the 3 X 1 or 1 X 3 kernel is used (that is, no Gaussian smoothing is done). ksize = 1 can only be used for the first or the second x- or y- derivatives.
//
// Examples
// i = imread('lena.jpeg',0);
// ii = sobel(i,"CV_8U",1,0,3,1,0);
//
image_list = mattolist(image)
out = raw_sobel(image_list, ddepth, dx, dy, ksize, scale, delta)
sz = size(out)
for i=1:sz
new_image(:, :, i) = out(i)
end
endfunction
|
aceb8262f9ed9888c90de487c4caa6d1c13f3ce3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1445/CH7/EX7.1/Ex7_1.sce | 791f47aab1da867a1cadf45eb1a0b763719fae72 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 933 | sce | Ex7_1.sce | //CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 1
clc;
disp("CHAPTER 7");
disp("EXAMPLE 1");
//VARIABLE INITIALIZATION
I_0=10; //no load current in Amperes
pf=0.25; //power factor
v1=400; //in Volts
f=50; //in Hertz
//SOLUTION
//solution (a)
//magnetizing component
//Iphi=I0.sin theta
theta=acos(pf); //taking value of theta from the given power factor
I_phi=I_0*sin(theta);
disp(sprintf("(a) The magnetizing component of no load current is %.2f A",I_phi));
//solution (b)
//iron loss
//Pc=V1.Ic
//Ic=I0.cos theta & also Ic=I0.pf as pf=cos theta
p_c=v1*I_0*pf;
disp(sprintf("(b) The iron loss is %d W",p_c));
//solution (c)
N1=500; // number of turns in primary given
phi_m=v1/(sqrt(2)*%pi*f*N1);
disp(sprintf("(c) The maximum value of flux in the core is %.2f mWb",phi_m*1000));
//END
|
a8e98d3cf5ff21ccc294c5b413b06437e8e7b98b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3648/CH17/EX17.13/Ex17_13.sce | 28898f7137cd4b00457eba1142295b380cb98953 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 375 | sce | Ex17_13.sce | //Example 17_13
clc();
clear;
//To find the values of e, R and I
i1=2 //Units in A
i2=0.5 //Units in A
i=i1+i2 //Units in A
v1=6 //Units in V
v2=16 //Units in V
r=-(v1-v2)/0.5 //Units in Ohms
v3=25 //Units in V
e=v2+v3 //Units in V
printf("The current I=%.1f A\n Resistance is R=%d Ohms\n The value E is=%d V",i,r,e)
|
d4ab31662b96cfc88d2ce75f1c907d571fe1d7ad | cbe8756c4068574f2f1cf8f0ce6f11632622eccb | /languages/easy/README.tst | 2e8133369dce1ab213f207ab51e2f02e6c11fa02 | [
"Apache-2.0"
] | permissive | sergev/vak-opensource | 78b063c6e139c6c8b57735780120c042a759ffdc | a7e0fc4289cafc1a344d8a1bcbc5e26c8b03c6ff | refs/heads/master | 2023-08-14T07:50:30.069410 | 2023-08-12T08:24:27 | 2023-08-12T08:24:27 | 72,305,253 | 44 | 24 | Apache-2.0 | 2022-06-06T18:26:23 | 2016-10-29T19:32:29 | C | UTF-8 | Scilab | false | false | 691 | tst | README.tst | Quote from Chapter 27 of book "Etudes for Programmer" by Charles Wetherell:
Easy is a general-purpose, procedural, algebraic programming
language. Its roots lie in ALGOL, ALGOL 68, and PASCAL. Like
them, it is designed to be compiled, loaded, and executed
reasonably conventional computer. The syntax is described by a
context-free grammar suitable for parsing by LR(1) techniques.
The semantics are similar to the languages described above, and
we will let an informal description suffice, trusting to the
reader’s skill to fill any gaps. In the text below, logically
connected portions of the grammar are described with the
associated semantics.
|
1f0f4176c15a7d071e9c35002d2271700c365afc | d465fcea94a1198464d7f8a912244e8a6dcf41f9 | /system/kiks_kad2arena.sci | ff62ec44df94d998cbb80fc80230f3462b925a58 | [] | no_license | manasdas17/kiks-scilab | 4f4064ed7619cad9e2117a6c0040a51056c938ee | 37dc68914547c9d0f423008d44e973ba296de67b | refs/heads/master | 2021-01-15T14:18:21.918789 | 2009-05-11T05:43:11 | 2009-05-11T05:43:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,997 | sci | kiks_kad2arena.sci | function [arena,colormask] = kiks_kad2arena(a)
// Ouput variables initialisation (not found in input variables)
arena=[];
colormask=[];
// Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
a = double(mtlb_double(a));
arena = [];
colormask = [];
xs = double(a(1));
ys = double(a(2));
// ! L.9: real(ys) may be replaced by:
// ! --> ys if ys is Real
// ! L.9: real(xs) may be replaced by:
// ! --> xs if xs is Real
colormask = zeros(real(ys),real(xs));
i = 3;
while i<max(size(a))
no_vert = a(i);
i = i+1;
x = a(i:i+no_vert-1);
i = i+no_vert;
y = a(i:i+no_vert-1);
i = i+no_vert;
col = a(i);
i = i+1;
// ! L.20: real(mtlb_a(mtlb_s(mtlb_max(y,"m"),mtlb_min(y,"m")),1)) may be replaced by:
// ! --> mtlb_a(mtlb_s(mtlb_max(y,"m"),mtlb_min(y,"m")),1) if mtlb_a(mtlb_s(mtlb_max(y,"m"),mtlb_min(y,"m")),1) is Real
// ! L.20: real(mtlb_a(mtlb_s(mtlb_max(x,"m"),mtlb_min(x,"m")),1)) may be replaced by:
// ! --> mtlb_a(mtlb_s(mtlb_max(x,"m"),mtlb_min(x,"m")),1) if mtlb_a(mtlb_s(mtlb_max(x,"m"),mtlb_min(x,"m")),1) is Real
mask = zeros(real(mtlb_a(mtlb_s(mtlb_max(y,"m"),mtlb_min(y,"m")),1)),real(mtlb_a(mtlb_s(mtlb_max(x,"m"),mtlb_min(x,"m")),1)));
[yix,xix] = mtlb_find(bool2s(mtlb_logic(mask,"==",0)));
// !! L.22: Matlab function inpolygon not yet converted, original calling sequence used
in = inpolygon(xix,yix,mtlb_a(mtlb_s(x,mtlb_min(x,"m")),1),mtlb_a(mtlb_s(y,mtlb_min(y,"m")),1));
mask(mtlb_e(yix,mtlb_find(bool2s(mtlb_logic(mtlb_double(in),">",0)))),mtlb_e(xix,mtlb_find(bool2s(mtlb_logic(mtlb_double(in),">",0))))) = 1;
colormask(mtlb_imp(mtlb_min(y,"m"),mtlb_max(y,"m")),mtlb_imp(mtlb_min(x,"m"),mtlb_max(x,"m"))) = mask*col;
// colormask(min(y):max(y),min(x):max(x))=mask*round(rand*100); % visible polygons
// !! L.26: Unknown function kiks_progress not converted, original calling sequence used
kiks_progress(i/max(size(a)),"rendering arena ");
end;
arena = mtlb_logic(colormask,">",0);
endfunction
|
ffe058f06a6059322683c4cc6690f2b2af146eaf | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH1/EX1.28/Ex1_28.sce | a28f2bb163e258f2f9f90b21d7d14b8ee3c710ce | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 546 | sce | Ex1_28.sce | //Example 1_28
clc;
clear;
close;
format('v',5);
//given data :
V1=15;//V
V2=4;//V
R1=4;//ohm
R2=3;//ohm
R3=2;//ohm
R4=5;//ohm
I1=6;//A
RL=R4;//ohm
//solution
Req=R1*R3/(R1+R3)+R2;//ohm
//Converting current source into Voltage source
V2=I1*R3;//V//Converted source
//writing KVL equation for the loop
I=poly(0,'I');
eqn=V1-R1*I-R3*I-V2;//KVL equation
I=roots(eqn);//A
//Potential at point A with respect to B
VAB=V2+R3*I;//V
//Thevenin equivalent current
I=VAB/(Req+RL);//A
disp(I,"Current through 5 ohm resistor(A)");
|
e14cf6ec34fb120fb2b31ba7251c2c3fff20c2ca | 449d555969bfd7befe906877abab098c6e63a0e8 | /1598/CH4/EX4.15/ex4_15.sce | d66601d31606a16b2fd3b52d80a5ebd1d499abb9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 368 | sce | ex4_15.sce | clc;
r=0.05; // in m
eo=8.85*10^-12; //constant
q=10^-9; //charge at point P in Coulomb
E=q/(4*(%pi)*eo*(r^2)); //calculating electric field
disp(E,"Electric field in v/m = "); //displaying result
r1=0.2; //in m
V1=q/(4*(%pi)*eo*r1); //calculating potential difference
disp(V1," Potential difference between two points in Volt = "); //displaying result |
18b2e5cb1ae21cbc362e39798ebc3050f916cf3c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2660/CH5/EX5.9/Ex5_9.sce | dc26f94ea80a5549e68caaf6fee2f6aad7979770 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 373 | sce | Ex5_9.sce | clc
e = 20 // M,A.R.R.
i = e // interest rste
i = i/100
n = 5 // life in years
s = 32000 // annual net savings in Rs
p = 100000 // present worth in Rs
S = 20000 // salvage value in Rs
a = (p-S)*(i/((1+i)^n-1)) // (p-s)(A/F,e%,n)
E = (s-a)/p // E.R.R.R
printf("\n ERRR = %0.2f percent", E*100)
disp("Since E.R.R.R is > M.A.R.R. therefore project is feasible.")
|
ee55aae310e84c9edde881d9a22f4823af02d87c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2384/CH4/EX4.1/ex4_1.sce | d6b7d445aeb19becb5aedede2edcd036ad308f7d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 551 | sce | ex4_1.sce | // Exa 4.1
clc;
clear;
close;
format('v',6)
// Given data
R = 10;// inohm
V = 230;// in V
f = 50;// in Hz
I = V/R;// in A
disp(I,"The currrent in A is");
P =V*I;// in W
disp(P,"The power consumed in W is");
Vm = sqrt(2)*V;// in V
Im =sqrt(2)*I;// in A
omega = 2*%pi*f;// in rad/sec
//Equation for voltage: V = Vm*sind(omega*t)
//Equation for current: i = Im*sind(omega*t)
disp("Voltage equation : v = "+string(Vm)+" sin ("+string(round(omega))+" t)")
disp("Current equation : i = "+string(Im)+" sin ("+string(round(omega))+" t)")
|
f25118af00bb7701f9551e4f23c22a8aa606dd23 | 1b969fbb81566edd3ef2887c98b61d98b380afd4 | /Rez/bivariate-lcmsr-post_mi/bfas_nv_vrt_col/~BivLCM-SR-bfas_nv_vrt_col-PLin-VLin.tst | cd3168ceb3089745298deeaeb738386b32478f85 | [] | no_license | psdlab/life-in-time-values-and-personality | 35fbf5bbe4edd54b429a934caf289fbb0edfefee | 7f6f8e9a6c24f29faa02ee9baffbe8ae556e227e | refs/heads/master | 2020-03-24T22:08:27.964205 | 2019-03-04T17:03:26 | 2019-03-04T17:03:26 | 143,070,821 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 11,974 | tst | ~BivLCM-SR-bfas_nv_vrt_col-PLin-VLin.tst |
THE OPTIMIZATION ALGORITHM HAS CHANGED TO THE EM ALGORITHM.
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
1 2 3 4 5
________ ________ ________ ________ ________
1 0.490667D+00
2 -0.708501D-02 0.404499D-02
3 -0.499371D-01 0.198661D-02 0.334941D+00
4 0.292955D-02 -0.496624D-03 -0.297639D-02 0.277259D-02
5 -0.165301D-02 0.112886D-03 -0.902879D-03 0.509411D-04 0.254581D-02
6 -0.672752D-03 0.336797D-04 -0.180342D-03 0.140863D-03 0.199302D-03
7 -0.896201D-03 0.778276D-04 0.371819D-03 -0.315654D-04 -0.140137D-03
8 0.309209D-03 -0.292445D-03 0.442362D-03 0.466486D-05 0.771840D-05
9 -0.248684D+00 -0.483390D-02 0.744037D+00 -0.425778D-01 0.105136D+00
10 0.950082D-01 0.387402D-02 0.201517D-01 0.203721D-01 0.135696D+00
11 -0.206091D+00 0.238290D-01 -0.993971D-01 -0.109079D-01 -0.175734D-02
12 0.481043D+00 0.131026D-01 -0.129232D+01 0.528079D-01 0.174154D-01
13 -0.526541D-01 0.138504D-01 -0.285813D-01 0.105925D-01 0.184512D-03
14 0.640779D-01 -0.128395D-01 -0.344387D+00 0.105853D-01 0.160141D-02
15 0.668614D+00 0.442350D-02 0.261847D+00 0.296171D-01 -0.205832D+00
16 0.420211D-01 0.634540D-02 0.393806D-02 0.146921D-02 -0.301349D-02
17 0.591004D-02 0.109746D-02 -0.121967D-02 -0.139502D-03 0.291203D-03
18 0.987311D-01 -0.409831D-01 0.175266D+00 -0.410226D-01 -0.602753D-02
19 -0.266492D+00 0.100848D-01 -0.100183D+00 0.265729D-02 -0.302495D-02
20 -0.543822D-01 -0.559075D-01 -0.334693D+01 -0.207544D-01 -0.970999D-02
21 0.252554D+00 -0.355517D-02 0.788106D-01 -0.235106D-02 -0.140774D-02
22 0.362173D-02 -0.128869D-05 0.151803D-02 0.406912D-03 -0.955306D-05
23 -0.760342D-02 0.466331D-03 -0.146343D-01 -0.129163D-01 -0.126875D-02
24 0.122410D-02 0.649503D-03 0.407577D-02 -0.476107D-03 0.159221D-03
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
6 7 8 9 10
________ ________ ________ ________ ________
6 0.121887D-02
7 0.801370D-03 0.252725D-02
8 0.248366D-03 0.157120D-03 0.269473D-02
9 -0.108088D-01 -0.525185D-01 0.477371D-01 0.154192D+03
10 0.518313D-02 -0.147398D-01 -0.114091D-01 0.756643D+01 0.307827D+02
11 0.503251D-01 0.854210D-01 -0.141676D-01 -0.180840D+02 -0.160844D+01
12 -0.497804D-02 -0.362603D-01 -0.511567D-01 0.592415D+01 0.355577D+01
13 0.709115D-01 0.119299D+00 0.819390D-03 -0.402116D+01 -0.278636D+01
14 0.192100D-02 -0.439163D-02 0.252357D+00 0.102886D+02 0.209900D+01
15 0.467678D-01 0.154142D-01 -0.250378D-02 -0.267124D+02 -0.285923D+02
16 0.143190D-03 -0.294960D-02 -0.178444D-02 0.226449D+01 -0.512651D+00
17 -0.368052D-03 0.275026D-03 -0.412501D-03 -0.372122D+00 0.627676D-01
18 -0.489647D-01 -0.728219D-01 0.816597D-01 0.102019D+02 0.185768D+01
19 -0.108635D-02 0.285255D-01 0.118436D-01 -0.151792D+01 0.907413D+00
20 0.340495D-01 0.398126D-01 -0.149963D+00 0.439363D+01 0.180884D+01
21 -0.141735D-03 -0.286230D-01 -0.141379D-01 0.932406D+00 -0.121357D+01
22 -0.224151D-03 -0.357802D-03 -0.414159D-03 -0.982090D-02 -0.169373D-02
23 -0.191208D-02 -0.364518D-05 0.173956D-02 0.301727D+00 0.165474D-01
24 -0.114622D-03 -0.279978D-03 -0.334487D-03 -0.681132D-01 -0.182968D-01
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
11 12 13 14 15
________ ________ ________ ________ ________
11 0.548196D+02
12 -0.128170D+02 0.893347D+02
13 -0.166181D+01 0.133564D+00 0.176352D+02
14 -0.641495D+01 -0.373880D+01 -0.829446D+00 0.560618D+02
15 0.837939D+01 -0.503623D+01 0.428891D+01 -0.426567D+01 0.575771D+03
16 -0.193287D+00 0.760164D+00 -0.766339D-01 -0.107538D+00 0.506974D+01
17 0.378977D-02 -0.112850D-01 -0.102977D-02 -0.272564D-01 -0.284459D+01
18 -0.319161D+01 -0.756367D+01 -0.513338D+01 0.137638D+02 -0.421188D+02
19 0.158645D+00 -0.235593D+00 0.115355D+01 0.133560D+01 -0.499080D+00
20 0.986796D+01 -0.188355D+01 0.410220D+01 -0.201968D+02 0.195381D+02
21 0.836778D+00 0.766910D-01 -0.120492D+01 -0.158413D+01 0.254177D+01
22 -0.841346D-01 0.515262D-02 -0.363416D-01 -0.602747D-01 -0.505767D-02
23 -0.257079D+00 -0.540686D+00 -0.112495D+00 0.367980D+00 -0.506335D+00
24 0.163524D-02 -0.943238D-01 -0.345249D-01 -0.922300D-01 -0.851731D-01
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
16 17 18 19 20
________ ________ ________ ________ ________
16 0.801204D+00
17 -0.693044D-01 0.299766D-01
18 0.924522D+00 -0.144695D-01 0.255918D+03
19 -0.118440D+00 0.703046D-02 0.223841D+01 0.637804D+01
20 0.119797D+00 -0.894278D-01 -0.675729D+02 0.399508D+01 0.397363D+03
21 0.154181D-01 -0.407103D-02 0.600862D+00 -0.571209D+01 -0.378338D+01
22 0.722926D-03 0.631624D-03 -0.122871D+01 -0.299010D-01 0.295726D+00
23 0.382682D-01 0.474515D-02 0.254120D+00 0.439644D-01 0.326684D+01
24 -0.499790D-03 0.174216D-02 0.290786D+00 -0.398451D-01 -0.195131D+01
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
21 22 23 24
________ ________ ________ ________
21 0.675360D+01
22 -0.240194D-01 0.146377D-01
23 -0.216545D+00 0.136468D-01 0.546392D+00
24 0.702586D-01 -0.282900D-02 -0.314794D-01 0.215288D-01
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
1 2 3 4 5
________ ________ ________ ________ ________
1 1.000
2 -0.159 1.000
3 -0.123 0.054 1.000
4 0.079 -0.148 -0.098 1.000
5 -0.047 0.035 -0.031 0.019 1.000
6 -0.028 0.015 -0.009 0.077 0.113
7 -0.025 0.024 0.013 -0.012 -0.055
8 0.009 -0.089 0.015 0.002 0.003
9 -0.029 -0.006 0.104 -0.065 0.168
10 0.024 0.011 0.006 0.070 0.485
11 -0.040 0.051 -0.023 -0.028 -0.005
12 0.073 0.022 -0.236 0.106 0.037
13 -0.018 0.052 -0.012 0.048 0.001
14 0.012 -0.027 -0.079 0.027 0.004
15 0.040 0.003 0.019 0.023 -0.170
16 0.067 0.111 0.008 0.031 -0.067
17 0.049 0.100 -0.012 -0.015 0.033
18 0.009 -0.040 0.019 -0.049 -0.007
19 -0.151 0.063 -0.069 0.020 -0.024
20 -0.004 -0.044 -0.290 -0.020 -0.010
21 0.139 -0.022 0.052 -0.017 -0.011
22 0.043 0.000 0.022 0.064 -0.002
23 -0.015 0.010 -0.034 -0.332 -0.034
24 0.012 0.070 0.048 -0.062 0.022
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
6 7 8 9 10
________ ________ ________ ________ ________
6 1.000
7 0.457 1.000
8 0.137 0.060 1.000
9 -0.025 -0.084 0.074 1.000
10 0.027 -0.053 -0.040 0.110 1.000
11 0.195 0.229 -0.037 -0.197 -0.039
12 -0.015 -0.076 -0.104 0.050 0.068
13 0.484 0.565 0.004 -0.077 -0.120
14 0.007 -0.012 0.649 0.111 0.051
15 0.056 0.013 -0.002 -0.090 -0.215
16 0.005 -0.066 -0.038 0.204 -0.103
17 -0.061 0.032 -0.046 -0.173 0.065
18 -0.088 -0.091 0.098 0.051 0.021
19 -0.012 0.225 0.090 -0.048 0.065
20 0.049 0.040 -0.145 0.018 0.016
21 -0.002 -0.219 -0.105 0.029 -0.084
22 -0.053 -0.059 -0.066 -0.007 -0.003
23 -0.074 0.000 0.045 0.033 0.004
24 -0.022 -0.038 -0.044 -0.037 -0.022
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
11 12 13 14 15
________ ________ ________ ________ ________
11 1.000
12 -0.183 1.000
13 -0.053 0.003 1.000
14 -0.116 -0.053 -0.026 1.000
15 0.047 -0.022 0.043 -0.024 1.000
16 -0.029 0.090 -0.020 -0.016 0.236
17 0.003 -0.007 -0.001 -0.021 -0.685
18 -0.027 -0.050 -0.076 0.115 -0.110
19 0.008 -0.010 0.109 0.071 -0.008
20 0.067 -0.010 0.049 -0.135 0.041
21 0.043 0.003 -0.110 -0.081 0.041
22 -0.094 0.005 -0.072 -0.067 -0.002
23 -0.047 -0.077 -0.036 0.066 -0.029
24 0.002 -0.068 -0.056 -0.084 -0.024
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
16 17 18 19 20
________ ________ ________ ________ ________
16 1.000
17 -0.447 1.000
18 0.065 -0.005 1.000
19 -0.052 0.016 0.055 1.000
20 0.007 -0.026 -0.212 0.079 1.000
21 0.007 -0.009 0.014 -0.870 -0.073
22 0.007 0.030 -0.635 -0.098 0.123
23 0.058 0.037 0.021 0.024 0.222
24 -0.004 0.069 0.124 -0.108 -0.667
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
21 22 23 24
________ ________ ________ ________
21 1.000
22 -0.076 1.000
23 -0.113 0.153 1.000
24 0.184 -0.159 -0.290 1.000
|
da037a3bf09c4f0c68ebb71cc5c3ceb4d4fe0db3 | 0c7d100cb0cf4ca584a252d56aef57d8692e87bd | /Automatique/TP1/Exo3.sce | 8a09564d8df8a7dbcb124126f2b1a0da38991e80 | [] | no_license | MacBootglass/insa | 1957913df94ce0742e19ec400e258fec032a3619 | 612acee69e8195f3202aede45fede79fabf47d01 | refs/heads/master | 2021-01-10T22:36:39.551539 | 2017-04-26T09:23:02 | 2017-04-26T09:23:02 | 54,901,623 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 374 | sce | Exo3.sce | R = 10 * 10^3;
C1 = 10 * 10^-9;
C2 = 470 * 10^-9;
s = %s;
wo = 1 / (R * sqrt(C1 * C2));
to = 1 / wo;
m = (3 / 2) * sqrt(C1 / C2);
num = 1;
dem = 1 + 2 * m * s * to + (s * to)^2;
sys = syslin('c', num/dem);
t = (0:to/100:20*to)';
y = csim('step', t, sys);
tmp = find(y>=0.95);
tr5 = t(tmp(1));
figure(1);
plot2d(t, y');
figure(2);
bode(sys, 10, 10^4);
bode_asymp(sys);
|
ffbaa64161aab3e3ece25d9bceab7ea8f1112004 | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/Y01.prev.tst | eaeb5f2bf984a419a7e03546950cf76281fa6f93 | [
"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 | 1,180 | tst | Y01.prev.tst | # orig Pythagoras.Y01 +(1+2*x)^2
# flat Pythagoras.Y01 2*x + 1
# merg Pythagoras.Y01 2*x_y_z + 1
# orig Pythagoras.Y01 +(2*x+2*x^2)^2
# flat Pythagoras.Y01 2*x + 2*x^2
# merg Pythagoras.Y01 2*x_y_z + 2*x_y_z^2
# orig Pythagoras.Y01 -(1+2*x+2*x^2)^2
# flat Pythagoras.Y01 2*x + 2*x^2 + 1
# merg Pythagoras.Y01 2*x_y_z + 2*x_y_z^2 + 1
# poly Pythagoras.Y01 0
000012 [3,4,5] Pythagoras.Y01 factor=1 parm= [1]
000030 [5,12,13] Pythagoras.Y01 factor=1 parm= [2]
000056 [7,24,25] Pythagoras.Y01 factor=1 parm= [3]
000090 [9,40,41] Pythagoras.Y01 factor=1 parm= [4]
000132 [11,60,61] Pythagoras.Y01 factor=1 parm= [5]
000182 [13,84,85] Pythagoras.Y01 factor=1 parm= [6]
000240 [15,112,113] Pythagoras.Y01 factor=1 parm= [7]
000306 [17,144,145] Pythagoras.Y01 factor=1 parm= [8]
000380 [19,180,181] Pythagoras.Y01 factor=1 parm= [9]
000462 [21,220,221] Pythagoras.Y01 factor=1 parm= [10]
000552 [23,264,265] Pythagoras.Y01 factor=1 parm= [11]
000650 [25,312,313] Pythagoras.Y01 factor=1 parm= [12]
000756 [27,364,365] Pythagoras.Y01 factor=1 parm= [13]
000870 [29,420,421] Pythagoras.Y01 factor=1 parm= [14]
000992 [31,480,481] Pythagoras.Y01 factor=1 parm= [15]
|
4fb0a1795b68e38a0fe29276ed6b758336fb3d45 | b6b875fb04ec6df2c0fb0d28f36962fa9aebb2bf | /TD2/trajectoireAlleeModifpop.sce | 7e57c3d3f321988bff4b483e67d93715fed36d28 | [] | 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 | 813 | sce | trajectoireAlleeModifpop.sce | clear;
clf;
avect = 0.5:0.1:2.5; // Vecteurs des différentes valeurs de a (population initiale)
h = 0.1; // pas de temps
r = 0.4; K = 2; A = 1; // variables globales de la formule de la vitesse d'accroissement
function f = logistique(x); // fonction qui calcule la vitesse d'accroissement
f = r * x .*((x/A -1).* (1 - x / K)); // opérations vectorielles. x est un vecteur
endfunction
ndate = 0:h:20; // le vecteur des instants où on calcule la solution
for i= 1:21; // Boucle qui dessine les courbes
x(1) = avect(i); // Initialisation de la population initiale
for n = 1:length(ndate) - 1; // Boucle qui calcul la population pour une valeur de a
x(n+1) = x(n) + h * logistique(x(n)); // Calcul de la population
end
plot2d(ndate, x, style = i); // Tracé de la trajectoire.
end
|
0f38038ed7b9340fbadd14fec13427efafaaebb6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3159/CH3/EX3.8/Ex3_8.sce | d1ec5e2e89f7f832003ed65991cd75c1eea510af | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 867 | sce | Ex3_8.sce | // Determine structure and lattice parameter of material
clc
d = 114.6 // diameter of power camera in angstrom
lambda = 1.54 // wavelength in angstrom
s1 = 86
s2 = 100
s3 = 148
s4 = 180
s5 = 188
s6 = 232
s7 = 272
printf("\n Example 3.8")
R = d/2 // Radius
if R==57.3 then
k = 1/4 // Bragg angle factor
end
a1 = (sin(s1*k*%pi/180))^2
a2 = (sin(s2*k*%pi/180))^2
a3 = (sin(s3*k*%pi/180))^2
a4 = (sin(s4*k*%pi/180))^2
a5 = (sin(s5*k*%pi/180))^2
a6 = (sin(s6*k*%pi/180))^2
a7 = (sin(s7*k*%pi/180))^2
c = 22 // constant to convert into integral number
printf("\n Within experimental error, values are as in integral ratio are as: \n %d:%d:%d:%d:%d:%d:%d",ceil(c*a1),ceil(c*a2),ceil(c*a3),ceil(c*a4),ceil(c*a5),ceil(c*a6),ceil(c*a7))
printf("\n So, this structure is FCC and material is copper with 3.62 angstrom lattice parameter")
|
21928cae320d790e02430c532257392848626ff4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1760/CH4/EX4.57/EX4_57.sce | 7e517198504b8468f4ff41eff953262b87bc2b22 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 350 | sce | EX4_57.sce | //EXAMPLE 4-57 PG N 265-266
Z1=[200 +%i*4;0 5+%i*10];
Z2=[2+%i*5 %i*4;%i*4 5+%i*10];
I1=det(Z1/Z2);
disp('i) Current (I1) is = '+string (I1) +' A ');
Z3=[2+%i*5 %i*4;%i*4 5+%i*10];
Z4=[2+%i*5 %i*4;%i*4 5+%i*10];
I2=det(Z3/Z4);
disp('ii) Current (I2) is = '+string (I2) +' A ');
|
84571c1e643e8b45a41bdbc879d990a865181cd3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /281/CH3/EX3.4/example3_4.sce | 346360697dc16840ca90e3efabad990c62c25f1c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 595 | sce | example3_4.sce | disp('chapter 3 ex3.4')
disp('given')
disp('signal amplitude Vi=15mV')
disp('IBmax=500nA and I2=100*IBmax')
Vi=.015
IBmax=500*10^(-9)
I2=100*IBmax
disp('R3=Vi/I2')
R3=Vi/I2
disp('ohms',R3)
disp('standard value resistor for R3=270ohms')
R3=270
disp('I2=Vi/R3')
I2=Vi/R3
disp('amperes',I2)
disp('Vo=Av*Vi')
Av=66
Vo=Av*Vi
disp('volt',Vo)
disp('R2=Vo/I2-R3')
R2=Vo/I2-R3
disp('ohms',R2)
disp('standard value resistor to give Av>66 R2=18kohms')
R2=18000
disp('R1=R2||R3')
R1=R2*R3/(R2+R3)
disp('ohms',R1)
disp('standard value resistor R1=270ohms')
R1=270
disp('ohms',R1) |
eb5839896ca20f8bde51ea2f016d4c4f1ccc6820 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2513/CH3/EX3.3/3_3.sce | a497652bb9b6f85aa4d3295d29da900e327e96e6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 518 | sce | 3_3.sce | clc
//initialisation of variables
w=1.0//cfs
w1=3.0//cfs
w2=45.0//cfs
v=3.0//fps
h=144//ft
D=12*sqrt(4*w/(%pi*w1))//in
d1=1.95//cfs
D1=12*sqrt(4*d1)/(%pi*v)//in
d2=41.6//cfs
D2=12*sqrt(4*d2)/(%pi*w1)//ins
//CALCULATIONS
C=%pi*(D)^2*3/(4*h)//cfs
C1=%pi*(1/4)*3//cfs
V=(d2*4)/(%pi*4^2)//fps
//RESULTS
printf('The minimum dry-weather flow =% f cfs',C)
printf('The maximum dry-weather flow in excess actual capacity=% f cfs',C1)
printf('the storm flow in axcess of maximum dry-weather flow=% f fps',V)
|
f652abf8ea05e15bb8ffd17251037cf63197dd94 | 449d555969bfd7befe906877abab098c6e63a0e8 | /623/CH18/EX4.1.3/U4_C1_3.sce | c0830ccfba7c6fc185cb1dc81ba8512330054ed4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,008 | sce | U4_C1_3.sce | //variable initialization
z=2 //atomic no. of He atom
h=1.054*10^-34; //Planck's constant (joule second)
R=10967800; //Rydberg constant (m-1)
e=1.6*10^-19; //Charge of electron (coulombs)
c=3*10^8; //speed of light (m/s)
//calculation
E=1.5*%pi*h*c*R*z^2; //The energy of the emitted photon (J)
IE=2*%pi*h*c*R; //Ionization energy of H atom (J)
KE=(E-IE)/e; //Kinetic energy of the photoelectron (eV)
printf("\nKinetic energy of photoelectron = %.1f eV",KE);
|
661e1b92846b00804a386eb6f33f3c1c297d58b5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /45/DEPENDENCIES/kmap2.sci | 913e42bca02593b56bf03f583c264c346de48d32 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,417 | sci | kmap2.sci | //this function minimizes a two vriable boolean expression using kmap
function bi =kmap2(k)
var=['A''B''' 'A''B' 'AB' 'AB''']
temp =1
for i=1:2 // intially checking for all 1's
for j=1:2
if k(i,j)==1 then
temp = temp + 1;
end
end
end
v=0;
bi = ' ' ;
if temp == 5 then
disp("The minimal expression is : 1');
v=1;
else
for i= 1 : 2 // considering all 2 1's cases
if k(i,1) == 1 & k(i,2) == 1 then
if i== 1 then
bi = strcat([ bi 'A'''] );v=1;
else
bi = strcat([ bi 'A']);v=1;
end
bi = strcat([ bi " + " ]);
end
if k(1,i) == 1 & k(2,i) == 1 then
if i== 1 then
bi = strcat([ bi 'B'''] );v=1;
else
bi = strcat([ bi 'B']);v=1;
end
end
end
end;
one(1)=k(2,1);
f=2;m=2;i=1;
for j=1:2
one(f)=k(i,j)
f=f+1;
end
i=2;
for j=2:-1:1
one(f)=k(i,j)
f=f+1;
end
one(6)=k(1,1);
if v==0 then // for isolated 1's
for i =2:5
if one(i)==1 & one(i+1)== 0 & one(i-1) ==0 then
if m>0
bi = strcat([bi " + "]);
end;
bi = strcat([bi var(i-1)]);
m=m+1;
end
end
end
endfunction // final result will be stored in bi |
6c6be02fdf4461d40f245bd475109c630b4378ad | 8df791f9387f1c5538e8fb4cccb82ea4a130e879 | /itpp_psk_mod/builder_gateway_cpp.sce | 31d5ff0a9b0f6683bfed5ca7398f08b9cd057bfe | [] | no_license | tripathiaishwarya/itpp_repo | b94552677dbbfc2ed461d59de6a7efde37ec547e | fcd832287f3651b192339dbdbf15933045ca8aff | refs/heads/master | 2021-01-10T21:54:05.263442 | 2015-06-25T08:19:01 | 2015-06-25T08:19:01 | 37,813,835 | 2 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 370 | sce | builder_gateway_cpp.sce | // Builder gateway function for PSK modulation
function builder_gw_cpp()
WITHOUT_AUTO_PUTLHSVAR = %t;
tbx_build_gateway("skeleton_cpp", ..
["psk_mod","itpp_psk_mod"], ..
["itpp_psk_mod.cpp"], ..
get_absolute_file_path("builder_gateway_cpp.sce"), [], "-litpp");
endfunction
builder_gw_cpp();
clear builder_gw_cpp; // remove builder_gw_cpp on stack
|
4be9dfe3b5f8dc6b92c16c6ea377d17e4a3b654e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3041/CH5/EX5.12/Ex5_12.sce | d3cb87a58e93fd81e68ea9d8fb2e052edf841434 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 866 | sce | Ex5_12.sce |
//Variable declaration
Vcc=15. //supply voltage(V)
Rl=10. //load resistance(ohms)
//Calculations
//Part a
Immax=Vcc/Rl //max peak current(A)
Irmsmax=Immax/(sqrt(2)) //max rms current(A)
Pomax=Irmsmax**2*Rl //max output power(W)
Pi=(2*Vcc*Immax)/%pi //max input power(W)
eta=Pomax/Pi //efficiency
//Part b
Im=(2*Vcc)/(%pi*Rl) //peak current(A)
Pdmax=((2*Vcc*Im)/(%pi))-((Im**2*Rl)/2) //max power dissipated(W)
eta1=((Im**2)*Rl*%pi)/(2*2*Vcc*Im) //efficiency
//Results
printf ("a)max signal output power,collector dissipation are %.2f W , %.2f W and efficiency is %.2f %%",Pomax,Pi,eta/1E-2)
printf ("b)max dissipation of each transistor and corresponding efficiency is %.2f W and %.1f resp.",Pdmax,eta1)
|
932c64dba8797ce00d8d96013fa5f743c8f6b162 | 1489f5f3f467ff75c3223c5c1defb60ccb55df3d | /tests/test_diff_4_b.tst | 83042264d09f55f26ce37d2c72f21bf9f03d2655 | [
"MIT"
] | permissive | ciyam/ciyam | 8e078673340b43f04e7b0d6ac81740b6cf3d78d0 | 935df95387fb140487d2e0053fabf612b0d3f9e2 | refs/heads/master | 2023-08-31T11:03:25.835641 | 2023-08-31T04:31:22 | 2023-08-31T04:31:22 | 3,124,021 | 18 | 16 | null | 2017-01-28T16:22:57 | 2012-01-07T10:55:14 | C++ | UTF-8 | Scilab | false | false | 13 | tst | test_diff_4_b.tst | aa
b
c
x
y
d
|
4e18a660f05654ef577f80de7e56210c0eb7ea6c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3535/CH10/EX10.6/Ex10_6.sce | a4c3c9730224b4c1168745bac0d52de580355332 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 182 | sce | Ex10_6.sce | //Chapter 10, Example 10.6, Page 285
clc
clear
// mass of U235
m = (((4/3)*%pi*125**3*1.60)*235)/(40000*12)
printf(" m = %f kg \n",m*10**-3)
//Answer may vary due to round off error
|
95c907aedee720ec60dc57b7b8c94f2ec090540b | 13c3ed7bef4d80dabd836219bbf4396f07cb934a | /ledblink_brightness.sci | bfafec2911957b57e9f6c7ea638a4c137fe253be | [] | no_license | Mushirahmed/scilab_workspace | 99f489a110a5e295ce9fca9991122d14840018d3 | f58b91b87bb0357fff82dcb97b05541e7e976eca | refs/heads/master | 2021-01-10T15:48:40.576771 | 2016-02-10T10:32:46 | 2016-02-10T10:32:46 | 43,348,489 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 369 | sci | ledblink_brightness.sci | function ledblink_brightness()
for x=1:10 //Run for 10 iterations
p = cmd_analog_in(1,2);
if(p>0 & p<320) then //threshold one
cmd_analog_out(1,9,p);
elseif p>=320 & p<=900 //threshold two
cmd_analog_out(1,10,p);
elseif p>900 & p<=1023 //threshold three
cmd_analog_out(1,11,p);
end
end
endfunction
|
9e1578c7de5604f9cf477c693e85ca2c9f38a8e8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /67/CH1/EX1.1.b/example11b.sce | aa10ba7523a323f5a21cc29938adaac210593a63 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 209 | sce | example11b.sce | //Example 1.1b
//Determine whether the given signal is periodic or not
clc;
t=0:1/100:5
x=sin(sqrt(2)*%pi*t);
plot(x);
disp('ploting the signal and showing that itis periodic with period=2pi/sqrt(2)pi'); |
73b2ce4a4805df9265c8dd37fc91701f535e71e6 | 676ffceabdfe022b6381807def2ea401302430ac | /library/Demos/StdRegions/Tests/StdProject2D_Tri_Mod_P6_Q7.tst | 1adb647b8eb9b6cabefb244e21199cf8441090a9 | [
"MIT"
] | permissive | mathLab/ITHACA-SEM | 3adf7a49567040398d758f4ee258276fee80065e | 065a269e3f18f2fc9d9f4abd9d47abba14d0933b | refs/heads/master | 2022-07-06T23:42:51.869689 | 2022-06-21T13:27:18 | 2022-06-21T13:27:18 | 136,485,665 | 10 | 5 | MIT | 2019-05-15T08:31:40 | 2018-06-07T14:01:54 | Makefile | UTF-8 | Scilab | false | false | 501 | tst | StdProject2D_Tri_Mod_P6_Q7.tst | <?xml version="1.0" encoding="utf-8"?>
<test>
<description>StdProject2D Triangle Modified basis P=6 Q=7</description>
<executable>StdProject</executable>
<parameters>-s triangle -b Modified_A Modified_B -o 6 6 -p 7 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">2.18252e-14</value>
</metric>
<metric type="Linf" id="2">
<value tolerance="1e-12">5.15143e-14</value>
</metric>
</metrics>
</test>
|
c47b779b40c8da68646c2ab3e8d2113c3ad9d17b | 449d555969bfd7befe906877abab098c6e63a0e8 | /698/CH4/EX4.3/P3_determination_of_e.sce | aa7d3d1d428e8be8dcacd22dcfef06168ed18ef8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,267 | sce | P3_determination_of_e.sce | clc
//Example 4.3
//Determination of e
//------------------------------------------------------------------------------
//Given data
//Dimensions of I section
ro=0.125 //m
ri=0.06 //m
bi=0.06 //m
bo=0.05 //m
t=0.01 //m
h=0.065 //m
ti=0.015 //m
to=0.01 //m
res3=mopen(TMPDIR+'3_determination_of_e.txt','wt')
mfprintf(res3,'(a)\te=R-rn\n\n')
mfprintf(res3,'(b) Calculation of rn:\n')
mfprintf(res3,'\trn=(((bi-t)*ti)+((bo-t)*to)+(t*h))/((bi*log((ri+ti)/ri))+(t*log((ro-to)/(ri+ti)))+(bo*log(ro/(ro-to))))\n')
rn=(((bi-t)*ti)+((bo-t)*to)+(t*h))/((bi*log((ri+ti)/ri))+(t*log((ro-to)/(ri+ti)))+(bo*log(ro/(ro-to))))
mfprintf(res3,'\trn=%0.4f mm\n\n',rn* 10^3)
mfprintf(res3,'(c)Calculation of R:\n')
mfprintf(res3,'\tR=ri+ ((0.5* h^2 *t)+(0.5* ti^2 *(bi-t))+((bo-t)*to*(h- 0.5*to)))/(((bi-t)*ti)+((bo-t)*to)+(t*h))\n')
R=ri+ ((0.5* h^2 *t)+(0.5* ti^2 *(bi-t))+((bo-t)*to*(h- 0.5*to)))/(((bi-t)*ti)+((bo-t)*to)+(t*h))
mfprintf(res3,'\tR=%0.4f mm\n\n',R* 10^3)
e=R-rn
mfprintf(res3,'(d)e=R-rn= %0.4f mm',e* 10^3)
mclose(res3)
editor(TMPDIR+'3_determination_of_e.txt')
//------------------------------------------------------------------------------
//-----------------------------End of program----------------------------------- |
0ae6a056d7f1ed3a7386f700b2a1f4e6b41e6c58 | 449d555969bfd7befe906877abab098c6e63a0e8 | /530/CH2/EX2.11.a/example_2_11a.sce | 7e5e45c7ba03760b8867df24f59c9680906bdbc2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 661 | sce | example_2_11a.sce | clear;
clc;
// A Textbook on HEAT TRANSFER by S P SUKHATME
// Chapter 2
// Heat Conduction in Solids
// Example 2.11(a)
// Page 65
printf("Example 2.11(a), Page 65 \n\n")
D = 0.05 ; // [m]
To = 450 ; // [degree C]
Tf = 90 ; // [degree C]
T = 150 ; // [degree c]
h = 115 ; // [W/m^2 K]
rho = 8000 ; // [kg/m^3]
Cp = 0.42*1000 ; // [J/kg K]
k = 46 ; // [W/m K]
R = D/2;
// (a)
// From eqn 2.7.3 for a sphere
t1 = rho*Cp*R/(3*h)*log((To-Tf)/(T-Tf)); // [sec]
t1_min = t1/60 ; // [min]
printf("Time taken by the centre of the ball to reach 150 degree C if internal gradients are neglected is %f seconds i.e. %f minutes \n",t1,t1_min);
|
1d11ae10ae7032450915300fe5e9adae3c66be00 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1892/CH1/EX1.73/Example1_73.sce | 9a2fd68032e226930fa881fa4f403fba1c69a238 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 394 | sce | Example1_73.sce | // Example 1.73
clc;clear;close;
// Given data
format('v',6);
StatorLoss=2;//in KW
StatorInput=90;//stator input in KW
S=4;//in %
//calculations
S=S/100;//slip
StatorOutput=StatorInput-StatorLoss;//in KW
Pri=StatorOutput;//rotor input in KW
Pcr=S*Pri;//in KW
disp(Pcr,"Rotor Copper Loss in KW : ");
Pm=Pri-Pcr;//in KW
disp(Pm,"Rotor mechanical power developed in KW : ");
|
313e182cd8c85004b3886eabca42d33d156ccc12 | 449d555969bfd7befe906877abab098c6e63a0e8 | /116/CH6/EX6.4/exa6_4.sce | 31bf871f9d41ca6566ff505916a2968755da4519 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 568 | sce | exa6_4.sce |
//Example 6.4
//Page 325
//Refer to figure 6.17 on page 300
disp('SNR detector is 3dB higher than Eb/N0, therefore')
snr=13.7//SNR=13.7dB
disp('Since 4 PSK modulation provides 2bps/Hz, the sampling rate is 5 MHz, which is Nqyuist rate, therefore')
a1=10*log10(125000000000000)
a2=10*log10(1.3)
A0=a1-13.7-7-3-a2
disp('At a carrier frequency of 2GHz, the wavelength is')
(3*10^8)/(2*10^9)
FM=116+60+20*log10(0.15)-5-20*log10(4*%pi*5*10^4)//Fade Margin can be found by Equation 6.31
//Result
//A0 = 116dB
//wavelength = 0.15 m
//Fade Margin = 38.5 dB |
ba280fad0468194a3e7d81f9be7dbf99f31b7b6f | 0c7eb559837b3784247bf636a7747e73df5220af | /智能系统原理开发/20.人工智能/神经网络源代码/_NeuralNetworkSrcCode/CHAPT9/HOPFIELD/H7X8D5.TST | 1bdf02bd6c1eb2ae2421176fd74798b1c24253f7 | [] | no_license | linchenlinchen/Class_3_term_1 | 2f6a044cd4d70527613e20141adbf852cd10862e | fef4550c7fb7c625106222df8f7d17645986d1ee | refs/heads/master | 2021-03-07T02:28:45.522794 | 2020-03-11T10:41:25 | 2020-03-11T10:41:25 | 246,239,607 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 114 | tst | H7X8D5.TST | 1 1 1 1 0 1 0
0 1 1 0 1 1 0
1 1 0 1 0 0 1
1 1 0 0 0 0 1
0 1 1 1 1 0 0
0 0 0 1 0 1 1
0 0 0 0 0 1 1
1 1 0 1 1 0 0
|
c1debd56dc90ad0e41385542b1dc5487d3698f6e | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronic_Measurements_And_Instrumentation_R._K._Rajput_2096.zip/Electronic_Measurements_And_Instrumentation_R._K._Rajput_2096/CH1/EX1.65/ex_1_65.sce | 19957d97ebe720c535a6c89a6e344e9a692d2c10 | [] | 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 | 211 | sce | ex_1_65.sce | errcatch(-1,"stop");mode(2);// Example 1.65. turning moment
,
// given :
l=0.03; // in m
B=0.09; // in Wb/m^2
I=0.01; // in A
N=100; // number of turn
T=(N*B*I*l^2);
disp(T,"turning moment,T(N-m) = ")
exit();
|
fd4c47bf40de2da376406c3dcc82a5f7c41436bf | 449d555969bfd7befe906877abab098c6e63a0e8 | /683/CH3/EX3.3/MS_3.sce | 33ef18f13e627c12e6964410ed19afa395b86f28 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 248 | sce | MS_3.sce | // sum 3-3
clc;
clear;
m=25;
v=3;
E=210*10^3;
KE=0.5*m*v^2;
d=30;
L=2000;
A=%pi*d^2/4;
U=A*L/(2*E);
del=4*10^-5*A;
W=A*del;
sigi=sqrt(KE*10^3/(W+U));
// printing data in scilab o/p window
printf("del is %f N/mm^2 ",sigi);
|
9de1563f98b69588111caaf67b2a69b48477ebd0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /23/CH2/EX2.15/Example_2_15.sce | 716feefed1b1ab52e839f52ea700c0e308cd0676 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 318 | sce | Example_2_15.sce | clear;
clc;
//Example 2.15
//Caption : Program To find the Heat to be Removed during Compression
//Given values
V=600;//[m/s]
W_compression=240;//[KJ/Kg]
//Solution
//Using Eqn(2.32a)
Q=(1/2*(V*V)/1000)-W_compression;
disp('KJ/kg',-Q,'Thus Heat Removed from each KG of air compressed is')
//End |
7a2e1b3535cf1fcfba68e9944724cb09232a99f0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2642/CH3/EX3.11/Ex3_11.sce | ea9938e0ea64a7c39f0f6042af987a57a4cfcda9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 949 | sce | Ex3_11.sce | // FUNDAMENTALS OF ELECTICAL MACHINES
// M.A.SALAM
// NAROSA PUBLISHING HOUSE
// SECOND EDITION
// Chapter 3 : TRANSFORMER AND PER UNIT SYSTEM
// Example : 3.11
clc;clear; // clears the console and command history
// Given data
V_1 = 200 // voltage in V
f = 50 // frequency in Hz
I_0 = 0.6 // single phase current in A
P_0 = 80 // power in W
// caclulations
cos_phi0 = P_0/(V_1*I_0) // power factor
sin_phi0 = 0.74 // from above expression
I_w = I_0*cos_phi0 // working component of no load current in A
I_m = I_0*sin_phi0 // working component of no load current in A
R_0 = V_1/I_w // no load circuit resistance in ohm
X_0 = V_1/I_m // no load circuit reactance in ohm
// display the result
disp("Example 3.11 solution");
printf(" \n No-load circuit resistance \n R_0 = %.2f ohm \n", R_0);
printf(" \n No-load circuit reactance \n X_0 = %.1f ohm \n", X_0);
|
b7f593f8c060e7626cddc5c5da2ceb5cb09013c1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3840/CH8/EX8.3/Ex8_3.sce | 33ad4d16516b59c2513e01e0e35c184028e8c45c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex8_3.sce | clear
//
//
//
//Variable declaration
e=1.6*10**-19 //charge(c)
mewn=0.21 //electron mobility(m**2/Vs)
T=300 //temperature(K)
KB=1.38*10**-23 //boltzmann constant
//Calculation
Dn=mewn*KB*T/e //diffusion coefficient(m**2/sec)
//Result
|
586f746f67396bafea93799808d915bed69b597e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2345/CH2/EX2.5/Ex2_5.sce | e780e415d06846c594b13bd598ecf518322ef068 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 191 | sce | Ex2_5.sce | //Finding resistance
//Example 2.5(pg. 23)
clc
clear
R0=80//in ohms
t=40// in degree C
k0=0.0043
R40=R0*(1+(k0*t))
printf('The value of Resistance at 40 degree C is %3.2f ohms',R40)
|
3fc907a9082770cf7204a1adb4a20dad8ac933ad | 449d555969bfd7befe906877abab098c6e63a0e8 | /858/CH2/EX2.22/example_22.sce | 4e0ac0209f19f95adfb9ef5a1d6e43d30851da55 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 444 | sce | example_22.sce | clc
clear
printf("example 2.22 page number 79\n\n")
//to find the emf of cell
E0_Ag=0.80;
E0_AgNO3=0.80;
c_Ag=0.001;
c_AgNO3=0.1;
E_Ag=E0_Ag+(0.059)*log10(c_Ag);
E_AgNO3=E0_AgNO3+(0.059)*log10(c_AgNO3);
E=E_AgNO3-E_Ag;
printf("emf of cell = %f V" ,E)
printf("\n\nsince E is positive, the left hand electrode will be anode and the electron will travel in the external circuit from the left hand to the right hand electrode")
|
1b83547bc46503c0f612223846d992e9e179f0b4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1460/CH4/EX4.2/4_2.sce | d5b2e8f769cfa7fd39502a52804cfdc2854b4dee | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 240 | sce | 4_2.sce | clc
//Initialization of variables
d=500 //ft
Pi=14 //lb/in^2
Pd=15 //lb/in^2
Sv=0.016 //ft^3 /lb
//calculations
Wi=144*Pi*Sv
Wf=144*Pd*Sv
PEi=0
PEf=d
Winput=Wf-Wi+PEf-PEi
//results
printf("Input work = %.1f ft-lb/lbm",Winput)
|
f11ed54dc787fccc35446157a6a188c663ee0d9c | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.3/Unix-Windows/scilab-2.3/demos/velpic/velpic.sci | 4b7aa10ced701720f200f2030997362ffa55fed1 | [
"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 | 32,936 | sci | velpic.sci | function [vel,regionlist,linelist,seedlist,velolist]=velpic(nz,nx,sext)
//[vel,regionlist,linelist,seedlist]=velpic(nz,nx)
//Macro which interactively defines regions of a matrix.
//Closed surfaces inside the frame are not allowed.
// nz :Number of columns in the matrix
// nx :Number of rows in the matrix
// vel :velocity matrix
// sext :[smin,smax] gives the velocities min and max
// regionlist :list whose elements are matrices of dimension
// :(2xN) containing the indices of the different regions
// linelist :list whose elements are matrices of dimension (2xM)
// :containing the indices of the different lines
// seedlist :(2xK) vector containing positions of seeds
// velolist :(1xK) vector containing velocities associated to seeds
//
//!
// author: C. Bunks date: 12-NOV-90
[lhs,rhs]=argn(0)
//turn off the scilab function 'more'
nrnc=lines();
lines(0);
//
qt='off'
//
select rhs
case 2 then
smin=1500;smax=6000;
rnd=100
case 3 then
smin=sext(1);smax=sext(2)
rnd=10**int(-1+log(abs(smax-smin))/log(10))
else error('velpic(nz,nx [,sext])')
end
//make a suitable frame
bnames=list('stop','help','undo','grill','quit');
gopt='off';
[buttons,slides]=makeframe(nz,nx,bnames);
slide1=slides(1,:);
//seperate matrix into regions defined by lines
linelist=makehorizons(nz,nx,bnames,buttons);
if qt='on' then return,end
//determine indices of matrix in each region
write(%io(2),'Searching Regions'),
regionlist=list();
indexlist=[ones(1,nz).*.(1:nx);(1:nz).*.ones(1,nx)];
region=0;
while size(indexlist)<>[0 0],
region=region+1;
seed=indexlist(:,1);
[inds,indexlist]=id_rgn(indexlist,linelist,seed);
regionlist(region)=inds;
write(%io(2),' Region Identified: '+string(region)),
end,
//sow a seed in each region
[seedlist]=sow(nz,nx,slide1,bnames,buttons,regionlist,linelist);
if qt='on' then return,end
[ssl,isl]=sort(seedlist(3,:));//sort seeds and velocities to regions
[sr,sc]=size(seedlist);
velolist=seedlist(4,isl(sc:-1:1));
rolist=seedlist(3,isl(sc:-1:1));
seedlist=seedlist(1:3,isl(sc:-1:1));
//Load velocity matrix with velocities by region.
i2=0;
vel=0*ones(1,nz*nx);
nor=size(regionlist);
nov=maxi(size(velolist));
write(%io(2),'Building velocity matrix'),
for k=1:nor,
i1=i2+1;i2=i1-1;
for j=1:nov,
if rolist(j)=k then, i2=i2+1; end,
end,
rk=regionlist(k);
rv=(rk(1,:)-ones(rk(1,:)))*nz+rk(2,:);
if i1=i2 then,//constant velocity region
vel(rv)=velolist(i1:i2)*ones(rv);
else,//linearly varying velocity region
vel(rv)=velcalc(rk,seedlist(:,i1:i2),velolist(i1:i2));
end,
end,
vel=matrix(vel,nz,nx);
vel=vel(nz:-1:1,:);
//re-establish the line counter
lines(nrnc(2));
function []=helpme(msn)
//[]=helpme(msn)
//macro containing help messages
// msn :message number
//
//!
// author: C. Bunks date: 12-NOV-90
hm1=[' ';
'Begin drawing a line by clicking the left';
'mouse button across a previously drawn line';
'segment or across a frame line segment. In';
'the second case the first mouse click must';
'be in the margin.';
' ';
'STOP:';
' Stop drawing lines and start picking velocities';
' ';
'HELP:';
' This help message';
' ';
'UNDO:';
' Undo a previously drawn line';
' ';
'GRILL:';
' Toggle grill on/off';
' '];
hm2=[' ';
'Terminate drawing a line by clicking the left';
'mouse button across a previously drawn line';
'segment or across a frame line segment.';
' ';
'STOP:';
' Completely undo the current line and begin';
' drawing a new line';
' ';
'HELP:';
' This help messaage';
' ';
'UNDO:';
' Undo a line segment';
' ';
'GRILL:';
' Toggle grill on/off';
' '];
hm3=[' ';
'To sow a seed, choose a velocity by clicking';
'the left mouse button in the velocity slide.';
' ';
'The velocity value chosen on the slide';
'is echoed to the terminal.';
' ';
'To change the velocity value click the left';
'mouse button at another location on the slide.';
' ';
'When a suitable velocity value has been obtained';
'click the left mouse button somewhere in the frame';
'to plant the velocity seed';
' ';
'Multiple seeds in the same region yields linear';
'velocity gradients. The linear gradients are';
'established between consecutive seed values';
'(following the order of placement)';
' ';
'STOP:';
' Stop planting seeds and return velocity matrix';
' ';
'HELP:';
' This help message';
' ';
'UNDO:';
' Undo a seed placement';
' ';
'GRILL:';
' Toggle grill on/off';
' '];
hmt=list(hm1,hm2,hm3);
x_message(hmt(msn));
function [seedlist]=sow(nz,nx,slide,bnames,buttons,regionlist,linelist);
//[seedlist]=sow(nz,nx,slide,bnames,buttons,regionlist,linelist);
//Interactively identify the various regions by clicking
//the mouse in each region
// nz :number of rows of matrix
// nx :number of columns of matrix
// nol :number of lines (not including the boundary)
// slide :slide information
// bnames :button names
// buttons :button positions
// regionlist :list of regions
// seedlist :(4xN) matrix where each column contains (from top to
// :bottom) the x and y coordinates of the seed, the region
// :that the seed is in, and the velocity value associated
// :to the seed
//
//!
// author: C. Bunks date: 12-NOV-90
sl1=slide(1);sl2=slide(2);sl3=slide(3);
sl4=slide(4);sl5=slide(5);sl6=slide(6);
seedlist=[];
//slide bar constants
vbar=[0 0 0 0 0;0 0 0 0 0];
if nx<=nz then,
sw=sl2-sl1;
b1=sl1+.05*sw;b2=sl2-.05*sw;
b3=.05*sw;b4=.05*sw;
else,
sw=sl4-sl3;
b1=.05*sw;b2=.05*sw
b3=sl3+.05*sw;b4=sl4-.05*sw;
end,
//get velocity and place seed
nol=size(linelist);
nor=size(regionlist);
sflag='on';
while sflag='on',
write(%io(2),'Choose Velocity'),
veloflag='on';
vel=-1;
while veloflag='on',//loop until desired vel is obtained
[i_i,v1,v2]=xclick();v=[v1;v2];
//check for a button
[br,bc]=size(buttons);
hflag='on';
while hflag='on',
hflag='off';
for bi=1:br,
if buttons(bi,1)<v1 then, if v1<buttons(bi,2) then,
if buttons(bi,3)<v2 then, if v2<buttons(bi,4) then,
select bnames(bi)
case 'help' then,
helpme(3);
[i_i,v1,v2]=xclick();v=[v1;v2];
hflag='on';
case 'stop' then,//stop sowing (all regions >= one seed)
[sr,sc]=size(seedlist);
rflag='off';
for rk=1:nol,
srflag='off';
for sk=1:sc,
if seedlist(3,sk)=rk then, srflag='on'; end,
end,
if srflag='off' then, rflag='on'; end,
end,
if rflag='on' then,
write(%io(2),'Not every region has a seed'),
write(%io(2),'Choose Velocity'),
[i,v1,v2]=xclick();v=[v1;v2];
hflag='on';
else,
sflag='off';
veloflag='off';
end,
case 'grill' then,
if gopt='on' then,
gopt='off';
else,
gopt='on';
end,
makegrill(nx,nz,gopt);
[i,v1,v2]=xclick();v=[v1;v2];
hflag='on';
case 'undo' then,//undo line segment
[sr,sc]=size(seedlist);
toff=.05*maxi([nx,nz])/3;
if sc>0 then,
s1=seedlist(1,sc);
s2=seedlist(2,sc);
text=string(seedlist(4,sc));
dess(36)=15;
xset("alufunction",6);
plot2d(s1',s2',[-3,0],"000");
xstring(s1+toff,s2+toff,text,0,0);
xset("alufunction",3);
seedlist=seedlist(:,1:sc-1);
else,
write(%io(2),'Nothing to undo'),
write(%io(2),'Choose Velocity'),
end,
[i,v1,v2]=xclick();v=[v1;v2];
hflag='on';
case 'quit' then,
qt=resume('on');
end,
end,end,
end,end,
end,
end,
if sflag='on' then,//stop hasn't been signalled
//get velocity
if sl1<=v1 then, if v1<=sl2 then,
if sl3<=v2 then, if v2<=sl4 then,
//calculate velocity rounded to nearest rnd
//plot bar indicator and give velocity value
xset("alufunction",6);
plot2d(vbar(1,:)',vbar(2,:)',[1],"000");
xset("alufunction",3);
if nx<=nz then,
vel=rnd*round((sl5+(sl6-sl5)*(v2-sl3)/(sl4-sl3))/rnd);
vbar=[b1 b2 b2 b1 b1;v2-b3 v2-b3 v2+b4 v2+b4 v2-b3];
plot2d(vbar(1,:)',vbar(2,:)',[1],"000"),
else,
vel=rnd*round((sl5+(sl6-sl5)*(v1-sl1)/(sl2-sl1))/rnd);
vbar=[v1-b1 v1+b2 v1+b2 v1-b1 v1-b1;b3 b3 b4 b4 b3];
plot2d(vbar(1,:)',vbar(2,:)',[1],"000"),
end,
write(%io(2),vel,'(f10)'),
end,end,
end,end,
if vel<>-1 then,//check that a velocity was chosen
//plant seed
if 1<=v1 then, if v1<=nx then,
if 1<=v2 then, if v2<=nz then,
//find the region that v is in
rflag='on';
nr=0;
while rflag='on',//look for a region that contains seed
nr=nr+1;
rk=regionlist(nr);
rflag='off';
for nl=1:nol,//for this region check all lines
[testflag,bav]=testpt(v,rk(:,1),linelist(nl));
if testflag='on' then, rflag='on'; end,
end,
if rflag='off' then,//this region if no intersections
sregion=nr;
end,
end,
//plot seed and add to seedlist
mrgn=.05*maxi([nx,nz])/3;
plot2d(v1',v2',[-3,0],"000");
xstring(v1+mrgn,v2+mrgn,string(vel),0,0);
seedlist=[seedlist,[v;sregion;vel]];
veloflag='off';
end,end,
end,end,
end,
end,
end,
end,
function [linelist]=makehorizons(nz,nx,bnames,buttons)
//[linelist]=makehorizons(nz,nx,bnames,buttons)
//macro which creates a frame with control buttons and
//interactively draws lines (i.e., horizons)
// nz :Number of rows in frame
// nx :Number of columns in frame
// bnames :Button names
// buttons :Button locations
// linelist :list whose elements are (2xN) matrices of line indices
//
//!
// author: C. Bunks date: 12-NOV-90
//define outer perimeter as a line
prt=.001;
linelist=list([1-prt 1-prt nx+prt nx+prt 1-prt;...
1-prt nz+prt nz+prt 1-prt 1-prt]);
nol=size(linelist);
//start line drawing
layer='true';
yec=[];
while layer='true',
nol=nol+1;
//Define layer by drawing a line
write(%io(2),'Draw a Line'),
[line,linelist,yec]=drawline(nz,nx,linelist,yec,bnames,buttons);
if size(line)=[0,0] then,//if returned line is empty then stop
layer='false';
else if line=0 then,
nol=nol-1;
else,
nol=size(linelist);
nol=nol+1;
linelist(nol)=line;
end,
end,
end,
function [buttons,slides]=makeframe(nz,nx,btextlist);
//[buttons,slides]=makeframe(nz,nx,btextlist);
//macro which makes a frame and buttons
// nz :Number of rows in frame
// nx :Number of columns in frame
// btextlist :text for buttons
// buttons :button information
// slides :slide information
//
//!
// author: C. Bunks date: 12-NOV-90
//setup of frame
//draw work box.
//note that the work box is placed in [1,nx] x [1,nz]
//and that the remaining elements are for centering properly
//the box (i.e., mrgn and the 1).
maxx=maxi([nz,nx]);
mrgn=.05*(maxx-1);
xmin=1-mrgn-maxx+nx;xmax=maxx+4*mrgn;
ymin=1-mrgn-maxx+nz;ymax=maxx+4*mrgn;
if nx>nz+4*mrgn then,
xmin=1-mrgn-maxx+nx;xmax=maxx+mrgn;
ymin=1-mrgn-maxx+nz;ymax=maxx+mrgn;
end,
if nx<nz-4*mrgn
xmin=1-mrgn-maxx+nx;xmax=maxx+4*mrgn;
ymin=1-mrgn-maxx+nz;ymax=maxx+mrgn;
end,
rect=[xmin,ymin,xmax,ymax];
plot2d(0,0,[1],"012",' ',rect);
plot2d([1;1;nx;nx;1],[nz;1;1;nz;nz],[1],"000"),
//make buttons and slides
dess4=10
dess6=10
dx=(xmax-xmin)/dess4
dy=(ymax-ymin)/dess6
//make button bank
bs=size(btextlist);//number of buttons
bsi=1/(2*bs);
buttons=[];
if nz=>nx then,//in the right side margin
bc=int(bs/(4+bsi))+1;//number of columns
br=int(bs/(bc+bsi))+1;//number of rows
bm=2*mrgn/(bc+1);
bentry=0;
for bj=1:bc,for bi=1:br,
xbmin=nx+2*(bj-1)*bm+bm;xbmax=xbmin+2*bm;
ybmax=nz-2*(bi-1)*bm;ybmin=ybmax-2*bm;
bentry=bentry+1;
if bentry<=bs then,
text=btextlist(bentry);
else,
text=' ';
end,
makebutton(xbmin,xbmax,ybmin,ybmax,dx,dy,text);
buttons=[buttons;xbmin,xbmax,ybmin,ybmax];
end,end,
else,//in the top margin
br=int(bs/(4+bsi))+1;//number of rows
bc=int(bs/(br+bsi))+1;//number of columns
bm=2*mrgn/(br+1);
bentry=0;
for bi=1:br,for bj=1:bc,
xbmin=1+2*(bj-1)*bm;xbmax=xbmin+2*bm;
ybmin=nz+2*(bi-1)*bm+bm;ybmax=ybmin+2*bm;
bentry=bentry+1;
if bentry<=bs then,
text=btextlist(bentry);
else,
text=' ';
end,
makebutton(xbmin,xbmax,ybmin,ybmax,dx,dy,text);
buttons=[buttons;xbmin,xbmax,ybmin,ybmax];
end,end,
end,
//velocity slide
if nz=>nx then,
xbmin=nx+mrgn;xbmax=xbmin+2*mrgn;
ybmin=1;ybmax=(1+nz)/2;
else,
xbmin=(1+nx)/2;xbmax=nx;
ybmin=nz+mrgn;ybmax=ybmin+2*mrgn;
end,
text='VEL';
dx=(xmax-xmin)/dess4;
dy=(ymax-ymin)/dess6;
makeslide(xbmin,xbmax,ybmin,ybmax,dx,dy,text,smin,smax);
slides=[xbmin,xbmax,ybmin,ybmax,smin,smax];
function []=makebutton(xbmin,xbmax,ybmin,ybmax,dx,dy,text)
//[]=makebutton(xbmin,xbmax,ybmin,ybmax,dx,dy,text)
//make to make a button
// xbmin :min x coordinate of button
// xbmax :max x coordinate of button
// ybmin :min y coordinate of button
// ybmax :max y coordinate of button
// dx :ratio of plot length to frame length: (xmax-xmin)/dess(4)
// dy :ratio of plot height to frame height: (ymin-ymax)/dess(6)
// text :text in button
//
//!
// author: C. Bunks date: 12-NOV-90
//make button box
xstringb(xbmin,ybmin,text,xbmax-xbmin,ybmax-ybmin);
xrect(xbmin,ybmax,xbmax-xbmin,ybmax-ybmin);
function []=makeslide(xbmin,xbmax,ybmin,ybmax,dx,dy,text,smin,smax)
//[]=makeslide(xbmin,xbmax,ybmin,ybmax,dx,dy,text)
//make to make a button
// xbmin :min x coordinate of button
// xbmax :max x coordinate of button
// ybmin :min y coordinate of button
// ybmax :max y coordinate of button
// dx :ratio of plot length to frame length: (xmax-xmin)/dess(4)
// dy :ratio of plot height to frame height: (ymin-ymax)/dess(6)
// text :text in button
// smin :min value of slide
// smax :max value of slide
//
//!
// author: C. Bunks date: 12-NOV-90
//NOTE: The constant wcf is a 'wierd correction factor necessary
//for the correct positioning of the text in the button. I don't
//understand why it is needed...
wcf=1.3;
//make slide box
xvec=[xbmin xbmin xbmax xbmax xbmin];//x button frame vector
yvec=[ybmax ybmin ybmin ybmax ybmax];//y button frame vector
delx=xbmax-xbmin;dely=ybmax-ybmin;
//label slide
dess(27)=1;//soft caracters
sl=length(text);
if delx<dely then,
cw=(xbmax-xbmin)/(dx*sl);//char.width=.9*(box width)/(text length)
else,
cw=(ybmax-ybmin)/(dx*sl);
end,
ch=cw/.82;
// setcsize(cw,ch);
textx=(xbmin+xbmax-dx*sl*cw/wcf)/2;//text x position
texty=(ybmin+ybmax-dy*ch/wcf)/2;//text y position
dess(51)=2;//turn labelling on
dess(50)=textx;dess(52)=texty;//positions of text
plot2d(xvec',yvec',[1],"000");
xstring(textx,texty,text,0,0),
//label min value of slide
text=string(smin);
sl=length(text);
if delx<dely then,
cw=(xbmax-xbmin)/(dx*sl);
ch=cw/.82;
textx=(xbmin+xbmax-dx*sl*cw/wcf)/2;//text x position
texty=ybmin+dy*ch/wcf/2;//text y position
else,
cw=(ybmax-ybmin)/(dx*sl);
ch=cw/.82;
textx=xbmin+dx*cw/wcf;//text x position
texty=(ybmin+ybmax-dy*cw/wcf)/2;//text y position
end,
// setcsize(cw,ch);
dess(51)=2;//turn labelling on
dess(50)=textx;dess(52)=texty;//positions of text
xstring(textx,texty,text,0,0),
//label max value of slide
text=string(smax);
sl=length(text);
if delx<dely then,
cw=(xbmax-xbmin)/(dx*sl);
ch=cw/.82;
textx=(xbmin+xbmax-dx*sl*cw/wcf)/2;//text x position
texty=ybmax-3*dy*ch/wcf/2;//text y position
else,
cw=(ybmax-ybmin)/(dx*sl);
ch=cw/.82;
textx=xbmax-dx*(1+sl)*cw/wcf;//text x position
texty=(ybmin+ybmax-dy*cw/wcf)/2;//text y position
end,
// setcsize(cw,ch);
dess(51)=2;//turn labelling on
dess(50)=textx;dess(52)=texty;//positions of text
xstring(textx,texty,text,0,0),
function [line,linelist,yec]=drawline(nz,nx,linelist,yec,bnames,buttons)
//[line,linelist,yec]=drawline(nz,nx,linelist,yec,bnames,buttons)
//interactively draw a line
// nz :number of columns of matrix
// nx :number of rows of matrix
// linelist :list containing the matrices of indices for
// :each line
// yec :extension list
// bnames :Names of buttons
// buttons :Button locations
// line :new line
//
//!
// author: C. Bunks date: 12-NOV-90
//to begin new line the first two clicks of the mouse must
//intersect an old line or the frame
line=[];
[i,x1,x2]=xclick();
testflag='off';
flag='on';
//check for a button
[br,bc]=size(buttons);
hflag='on';
while hflag='on',//while the mouse has been clicked in a button
hflag='off';
for bi=1:br,//check all the buttons
if buttons(bi,1)<x1 then, if x1<buttons(bi,2) then,
if buttons(bi,3)<x2 then, if x2<buttons(bi,4) then,
select bnames(bi)
case 'help' then,
helpme(1);
[i_i,x1,x2]=xclick();
hflag='on';
case 'stop' then,
testflag='on';
flag='off';
yecl=0;
case 'grill' then,
if gopt='on' then,
gopt='off';
else,
gopt='on';
end,
makegrill(nx,nz,gopt);
[i_i,x1,x2]=xclick();
hflag='on';
case 'undo' then,//undo last line
ls=size(linelist);
if ls>1 then,//remove a line
[yer,yecc]=size(yec);
yf=yec(1,yecc);
yl=yec(2,yecc);
lk=linelist(ls);
[lkr,lkc]=size(lk);
xset("alufunction",6);
plot2d(lk(1,yf+1:lkc-yl)',lk(2,yf+1:lkc-yl)',[1],"000"),
xset("alufunction",3);
ltemp=list();
for k=1:ls-1,
ltemp(k)=linelist(k);
end,
linelist=ltemp;
yec=yec(:,1:yecc-1);
else,
write(%io(2),'Nothing to undo'),
end,
[i_i,x1,x2]=xclick();
hflag='on';
case 'quit' then,
qt=resume('on')
end,
end,end,
end,end,
end,
end,
//start drawing line
yext=[];
while testflag='off',
plot2d(x1',x2',[-3,-1],"000");//make a start circle
[i_i,y1,y2]=xclick();
//check for a button
[br,bc]=size(buttons);
hflag='on';
while hflag='on'
hflag='off';
for bi=1:br,
if buttons(bi,1)<y1 then, if y1<buttons(bi,2) then,
if buttons(bi,3)<y2 then, if y2<buttons(bi,4) then,
select bnames(bi)
case 'help' then,
helpme(1);
[i_i,y1,y2]=xclick();
hflag='on';
case 'stop' then,
write(%io(2),'Nothing to stop'),
[i_i,y1,y2]=xclick();
hflag='on';
case 'grill' then,
if gopt='on' then,
gopt='off';
else,
gopt='on';
end,
makegrill(nx,nz,gopt);
[i_i,y1,y2]=xclick();
hflag='on';
case 'undo' then,
write(%io(2),'Nothing to undo'),
[i_i,y1,y2]=xclick();
hflag='on';
case 'quit' then,
qt=resume('on');
end,
end,end,
end,end,
end,
end,
//if line segment defined by first two points intersects a
//previously defined line and y is in the frame then start a new line
inflag='off';
if 1<=y1 then, if y1<=nx then,//y in the frame
if 1<=y2 then, if y2<=nz then,
inflag='on';
xsec=[];//list of intersections
nol=size(linelist);
for ln=1:nol,//test against all the lines for intersections
[testflag,bav]=testpt([x1;x2],[y1;y2],linelist(ln));
[br,bc]=size(bav);
xsec=[xsec,[bav;ln*ones(1,bc)]];
end,
//choose longest intersection which yields shortest segment
//and add on the necessary extensions
[xr,xc]=size(xsec);
if xc>0 then,
testflag='on';
btemp=xsec(1:2,:)-[x1;x2]*ones(1,xc);
[val,in]=maxi([1 1]*(btemp.*btemp));//longest intersection
xset("alufunction",6);
plot2d(x1',x2',[-3,-1],"000");//undo start circle
xset("alufunction",3);
x=xsec(1:2,in);//new x
x1=x(1);x2=x(2);
ln=xsec(4,in);li=xsec(3,in);
shortline=linelist(ln);//extension line
[sr,sc]=size(shortline);
if sc-li>li then,
yext=shortline(:,1:li);
[yer,yecf]=size(yext);//yec is useful for undoing
else,
yext=shortline(:,sc:-1:li+1);
[yer,yecf]=size(yext);
end,
end,
end,end,
end,end,
if inflag='off' then,//case where y is not in the frame
xset("alufunction",6);
plot2d(x1',x2',[-3,-1],"000");//undo start circle
xset("alufunction",3);
x1=y1;x2=y2;
plot2d(x1',x2',[-3,-1],"000");//undo start circle
end,
if testflag='off' then,//case where x-y does not cross a line
xset("alufunction",6);
plot2d(x1',x2',[-3,-1],"000");//undo start circle
xset("alufunction",3);
x1=y1;x2=y2;
plot2d(x1',x2',[-3,-1],"000");//undo start circle
end,
end,
if flag='on' then,
plot2d([x1;y1],[x2;y2],[1,-1],"000"),
line=[yext,[x1;x2],[y1;y2]];
x1=y1;x2=y2;
end,
//continue line
while flag='on',
flag='off';
[i_i,y1,y2]=xclick();
//check for a button
[br,bc]=size(buttons);
hflag='on';
while hflag='on'
hflag='off';
for bi=1:br,
if buttons(bi,1)<y1 then, if y1<buttons(bi,2) then,
if buttons(bi,3)<y2 then, if y2<buttons(bi,4) then,
select bnames(bi)
case 'help' then,//get help
helpme(2);
[i_i,y1,y2]=xclick();
hflag='on';
case 'stop' then,//totally undo current line
[lr,lc]=size(line);
xset("alufunction",6);
plot2d(line(1,yecf+1:lc)',line(2,yecf+1:lc)',[1,-1],"000"),
xset("alufunction",3);
flag='off';
yecl=0;
line=0;
case 'grill' then,//toggle grill
if gopt='on' then,
gopt='off';
else,
gopt='on';
end,
makegrill(nx,nz,gopt);
[i_i,y1,y2]=xclick();
hflag='on';
case 'undo' then,//undo line segment
[lr,lc]=size(line);
xset("alufunction",6);
plot2d(line(1,lc-1:lc)',line(2,lc-1:lc)',[1,-1],"000"),
xset("alufunction",3);
flag='off';
if lc>yecf+2 then,
hflag='on';
line=line(:,1:lc-1);
x=line(:,lc-1);
x1=x(1);x2=x(2);
[i_i,y1,y2]=xclick();
flag='on';
end,
if flag='off' then, yecl=0; line=0; end,
case 'quit' then
qt=resume('on')
end,
end,end,
end,end,
end,
end,
if line<>0 then,//line drawing has not been stopped
//test if line intersects itself
[lr,lc]=size(line);
if lc-1>yecf+1 then,
[testflag,bav]=testpt([x1;x2],[y1;y2],line(:,yecf+1:lc-1));
else,
testflag='off';
end,
if testflag='on' then,
write(%io(2),' '),
write(%io(2),'*********ERROR*********')
write(%io(2),' Lines are not allowed'),
write(%io(2),'to intersect themselves'),
write(%io(2),' '),
write(%io(2),' Choose another point'),
flag='on';
else,
//test if point intersects a previously drawn line
yext=[];
flag='on';
xsec=[];
nol=size(linelist);
for ln=1:nol,
[testflag,bav]=testpt([x1;x2],[y1;y2],linelist(ln));
[br,bc]=size(bav);
xsec=[xsec,[bav;ln*ones(1,bc)]];
end,
//check all the intersections and choose the shortest
[br,bc]=size(xsec);
if bc>0 then,
flag='off';
btemp=xsec(1:2,:)-[x1;x2]*ones(1,bc);
[val,in]=mini([1 1]*(btemp.*btemp));
y1=xsec(1,in);y2=xsec(2,in);
//find the extension of the intersected line by the
//shortest segment of the intersecting line
ln=xsec(4,in);li=xsec(3,in);
shortline=linelist(ln);
[sr,sc]=size(shortline);
if sc-li>li then,
yext=shortline(:,li:-1:1);
[yer,yecl]=size(yext);
else,
yext=shortline(:,li+1:sc);
[yer,yecl]=size(yext);
end,
end,
//plot line segment
plot2d([x1;y1],[x2;y2],[1,-1],"000"),
line=[line,[y1;y2],yext];
x1=y1;x2=y2;
end,
end,
end,
if yecl<>0 then,
yec=[yec,[yecf;yecl]];
end,
write(%io(2),'Done With Current Line'),
function [flag,bav]=testpt(p1,p2,line)
//[flag,bav]=testpt(p1,p2,line)
//macro which tests whether the line segment defined by the
//two points p1 and p2 intersects any of the line segments
//in line.
// p1 :2x1 matrix giving the indices of point number one
// p2 :2x1 matrix giving the indices of point number two
// line :2xN matrix giving the indices of a line
// flag :flag='on' indicates an intersection, flag='off'
// :indicates no intersection
// bav :3xM matrix giving all the intersections found (if any)
// :and the position in the line of the intersection
//
//!
// author: C. Bunks date: 12-NOV-90
//set up arguments of fortran subprogram m45.f
noi=0;
nc=maxi(size(line));
bav=0*ones(3,nc);
flag=0;
[flag,bav,noi]=fort('testpt',...
p1,1,'r',...
p2,2,'r',...
nc,3,'i',...
line,4,'r',...
flag,5,'i',...
noi,6,'i',...
bav,7,'r',...
'sort',...
[1,1],5,'i',...
[3,nc],7,'r',...
[1,1],6,'i');
bav=bav(:,1:noi);
if flag=1 then, flag='on'; else, flag='off'; end,
function []=redraw(linelist,seedlist,velolist)
//[]=redraw(linelist[,seedlist[,velolist]])
//Macro which redraws the lines drawn by velpic
//and gives the locations and velocities chosen
// linelist :list containing the lines to be drawn
// seedlist :list containing the seed positions
// velolist :list containing the velocity values
//
//!
// author: C. Bunks date: 12-NOV-90
[lhs,rhs]=argn(0);
//determine the number of lines
nol=size(linelist);
l1=linelist(1);
nr=maxi(l1(1,:));
nc=maxi(l1(2,:));
//draw frame
plot2d(0,0,[1],"012",' ',[1,1,nr,nc]);
//draw the lines (the first line from velpic is the
//exterior line)
for k=1:nol,
lk=linelist(k);
plot2d(lk(1,:)',lk(2,:)',[1],"000"),
end,
if rhs=2 then,
plot2d(seedlist(1,:)',seedlist(2,:)',[-3,0],"000"),
end,
if rhs=3 then,
[vr,vc]=size(velolist);
toff=.05*maxi([nr,nc])/3;
for k=1:vc,
text=string(velolist(k));
s1=seedlist(1,k);s2=seedlist(2,k);
dess(50)=s1+toff;dess(52)=s2+toff;//positions of text
plot2d(s1',s2',[-3,0],"000");
xstring(s1+toff,s2+toff,text,0,0);
end,
end,
function [ind,indexlist]=id_rgn(indexlist,linelist,seed);
//[ind,indexlist]=id_region(indexlist,linelist,seed);
//Macro which determines all the indices of the matrix of dimension
//(nz X nx) which are in the region defined by the seed and the
//linelist. The elements which are in the same region as the seed
//are those which are on the same side of all the lines in the
//linelist.
// indexlist :(2xN) vector containing all the indices to be searched
// linelist :list of lines
// seed :pair of indices of the matrix identifying the region
// ind :all indices of the matrix associated to the region
// :defined by seed
//
//!
// author: C. Bunks date: 12-NOV-90
nlist=0*indexlist;
ic=maxi(size(indexlist));
nol=size(linelist);
llist=[];noe=[1];
for k=1:nol,
noe=[noe,noe(k)+maxi(size(linelist(k)))];
llist=[llist,linelist(k)];
end,
nolt=maxi(size(llist));
noi=0;non=0;bav=0*ones(3,nolt);
lln=0*ones(2,nolt);
ind=0*indexlist;
[ind,nlist,noi,non]=fort('id_rgn',...
indexlist,1,'i',...
llist,2,'r',...
seed,3,'r',...
ind,4,'i',...
nol,5,'i',...
nolt,6,'i',...
ic,7,'i',...
noi,8,'i',...
noe,9,'i',...
nlist,10,'i',...
bav,11,'r',...
lln,12,'r',...
non,13,'i',...
'sort',...
[2,ic],4,'i',...
[2,ic],10,'i',...
[1,1],8,'i',...
[1,1],13,'i');
ind=ind(:,1:noi);
indexlist=nlist(:,1:non);
function []=makegrill(nx,nz,gopt)
//Plot a grill in the region [1 nx] x [1 nz]
// nx :Number of x positions
// nz :Number of z positions
// gopt :Plotting flag where 'on' means plot
// :and 'off means unplot
//
//!
// author: C. Bunks date: 12-NOV-90
// Change JPC 2 mars 1992
// dess;
if gopt <>'on' then,xset("alufunction",6);end
for k=2:nx-1, plot2d([k;k],[1;nz],[2],"000"), end,
for k=2:nz-1, plot2d([1;nx],[k;k],[2],"000"), end
xset("alufunction",3);
function [vi]=velcalc(indexlist,seedlist,velolist)
//Create velocity field for a region defined by indexlist
//where velocity varies linearly between control points
//defined by the seedlist sl and its associated velocities
//in vl.
// indexlist :list of indices of region
// seedlist :indices of velocity seed locations
// velolist :velocity control points
// vi :velocities for region
//
//!
// author: C. Bunks date: 12-NOV-90
[vr,vc]=size(velolist);
[ir,ic]=size(indexlist);
vi=velolist(1)*ones(1,ic);
for k=1:vc-1,
s1=seedlist(1:2,k);s2=seedlist(1:2,k+1);
v1=velolist(k);v2=velolist(k+1);
x=indexlist(1,:);y=indexlist(2,:);
x1=s1(1);y1=s1(2);
x2=s2(1);y2=s2(2);
dx=x2-x1;dy=y2-y1;dv=v2-v1;
r2=dx*dx+dy*dy;
xv=x-x1*ones(x);
yv=y-y1*ones(y);
gr=(xv*dx+yv*dy)/r2;
vi=vi+mini(maxi(gr,0*gr),ones(gr))*dv;
end,
|
0f3c7f08c9c4e0efbb31325b4171680cdb99e23d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2135/CH4/EX4.17/Exa_4_17.sce | 77047330b8295fc0e7c91bb326803afb32fbf989 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,000 | sce | Exa_4_17.sce | //Exa 4.17
clc;
clear;
close;
format('v',7);
//Given Data :
m=1;//Kg
p1=1;//bar
T1=290;//K
p2=30;//bar
T2=290;//K
n=1.3;//constant
R=300;//Nm/KgK
Cv=0.72;//KJ/KgK
disp("part (a) Isothermally")
V1=R*T1/p1/10^5;//m^3/Kg
V2=p1*V1/p2;//m^3/Kg
w=p1*10^5*V1*log(V2/V1)/1000;//KJ/Kg
disp(w,"Workdone in KJ/Kg : ");
deltaU=m*Cv*(T2-T1);//KJ(as T1=T2)
disp(deltaU,"Change in internal energy in KJ : ");
q=w+deltaU;//KJ/Kg
disp(q,"Heat transfer in KJ/Kg : ");
S2subS1=m*R/1000*log(V2/V1)+m*Cv*log(T2/T1);//KJ/KgK
disp(S2subS1,"Change in entropy in KJ/KgK : ");
disp("part (b) Polytropically")
T2=T1*(p2/p1)^((n-1)/n);//K
disp(T2,"Temperature T2 in K : ");
V1=R*T1/p1/10^5;//m^3/Kg
V2=(p1/p2)^(1/n)*V1;//m^3/Kg
w= m*R/1000*(T1-T2)/(n-1);;//KJ/Kg
disp(w,"Workdone in KJ/Kg : ");
deltaU=m*Cv*(T2-T1);//KJ(as T1=T2)
q=w+deltaU;//KJ/Kg
disp(q,"Heat transfer in KJ/Kg : ");
S2subS1=m*R/1000*log(V2/V1)+m*Cv*log(T2/T1);//KJ/KgK
disp(S2subS1,"Change in entropy in KJ/KgK : ");
|
cf3eebce80631390433a6bd20d2118e7253704b4 | 51635684d03e47ebad12b8872ff469b83f36aa52 | /external/gcc-12.1.0/gcc/testsuite/ada/acats/support/spprt13s.tst | 64b47315a44306cad5b7c625ab8abab93a356f94 | [
"LGPL-2.1-only",
"FSFAP",
"LGPL-3.0-only",
"GPL-3.0-only",
"GPL-2.0-only",
"GCC-exception-3.1",
"LGPL-2.0-or-later",
"Zlib",
"LicenseRef-scancode-public-domain"
] | permissive | zhmu/ananas | 8fb48ddfe3582f85ff39184fc7a3c58725fe731a | 30850c1639f03bccbfb2f2b03361792cc8fae52e | refs/heads/master | 2022-06-25T10:44:46.256604 | 2022-06-12T17:04:40 | 2022-06-12T17:04:40 | 30,108,381 | 59 | 8 | Zlib | 2021-09-26T17:30:30 | 2015-01-31T09:44:33 | C | UTF-8 | Scilab | false | false | 2,882 | tst | spprt13s.tst | -- SPPRT13SP.TST
--
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
--
-- SPECIFICATION FOR PACKAGE SPPRT13
-- PURPOSE:
-- THIS PACKAGE CONTAINS CONSTANTS OF TYPE SYSTEM.ADDRESS.
-- THESE CONSTANTS ARE USED BY SELECTED CHAPTER 13 TESTS,
-- BY PARTS OF THE AVAT SYSTEM, AND BY ISOLATED TESTS FOR
-- OTHER CHAPTERS.
-- MACRO SUBSTITUTIONS:
-- $VARIABLE_ADDRESS, $VARIABLE_ADDRESS1, AND $VARIABLE_ADDRESS2 ARE
-- EXPRESSIONS YIELDING LEGAL ADDRESSES FOR VARIABLES FOR THIS
-- IMPLEMENTATION.
-- $ENTRY_ADDRESS, $ENTRY_ADDRESS1, AND $ENTRY_ADDRESS2 ARE
-- EXPRESSIONS YIELDING LEGAL ADDRESSES FOR TASK ENTRIES
-- (I.E., FOR INTERRUPTS) FOR THIS IMPLEMENTATION.
-- IF NO EXPRESSIONS CAN BE GIVEN THAT ARE SATISFACTORY FOR THE
-- VALUES OF THESE CONSTANTS, THEN DECLARE SUITABLE FUNCTIONS
-- IN THE SPECIFICATION OF PACKAGE FCNDECL, CREATE A PACKAGE BODY
-- CONTAINING BODIES FOR THE FUNCTIONS, AND REPLACE THE MACROS WITH
-- APPROPRIATE FUNCTION CALLS.
WITH FCNDECL; USE FCNDECL;
WITH SYSTEM;
PACKAGE SPPRT13 IS
VARIABLE_ADDRESS : CONSTANT SYSTEM.ADDRESS :=
$VARIABLE_ADDRESS;
VARIABLE_ADDRESS1 : CONSTANT SYSTEM.ADDRESS :=
$VARIABLE_ADDRESS1;
VARIABLE_ADDRESS2 : CONSTANT SYSTEM.ADDRESS :=
$VARIABLE_ADDRESS2;
ENTRY_ADDRESS : CONSTANT SYSTEM.ADDRESS :=
$ENTRY_ADDRESS;
ENTRY_ADDRESS1 : CONSTANT SYSTEM.ADDRESS :=
$ENTRY_ADDRESS1;
ENTRY_ADDRESS2 : CONSTANT SYSTEM.ADDRESS :=
$ENTRY_ADDRESS2;
END SPPRT13;
|
98c59eaa2310902edcf0799a61db449e78990bee | ceef50b760b74e789250868ad377d5f5c5e390b1 | /tp3/tiTp3Fonction.sci | ac8b31428e13f52a93ffd1adf244d881af028c48 | [] | no_license | agoryu/TI | c01c9666e0d06b243e2e5450d168976a7e41091a | 5acedfe65ce7122045d59a4b7d3f213e40c0a8b2 | refs/heads/master | 2021-01-22T23:20:17.395990 | 2015-04-17T10:15:21 | 2015-04-17T10:15:21 | 29,386,147 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,383 | sci | tiTp3Fonction.sci | function [newImg] = sousEchant(img,n)
s = size(img);
newLenX = s(1)/n;
newLenY = s(2)/n;
newImg = zeros(newLenX,newLenY);
for raw=1:newLenY
for col=1:newLenX
for c=1:s(3)
newImg(col,raw,c) = img(col*n,raw*n,c);
end;
end;
end;
endfunction;
function [newImg] = surEchant(img,n)
s = size(img);
lenX = s(1);
lenY = s(2);
newImg = zeros(lenX * n,lenY * n, 3);
for raw=1:lenY
for col=1:lenX
for c=1:s(3)
for i=0:(n-1)
for j=0:(n-1)
x = ((col*n)-1) + i;
y = ((raw*n)-1) + j;
newImg(x, y, c)
end;
end;
end;
end;
end;
endfunction;
function [quant] = quantification(img, m)
maxVal = max(img);
minVal = min(img);
quant = ((maxVal - minVal) / m) / (maxVal - minVal);
endfunction;
function [newImg] = quantificationImage(img, composante, nbBit)
m = 2^nbBit;
pas = quantification(im, m);
im2double(im);
for i=1:m
end;
endfunction
function [periode] = calcPeriode(img, vmin, vmax)
moy = vmax - vmin / 2;
i = find(img(:, 1, 1) == moy);
periode = size(img(:, 1, 1)) / size(i);
endfunction;
|
5dd1deded1a3d0c9e42ea733d8c1468e45e5bee0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1439/CH18/EX18.5/18_5.sce | de57686f91a0ceb4d31bf3f961e2cfbb7fb4ca26 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 258 | sce | 18_5.sce | clc
//initialisation of variables
m= 1.008 //gms
m1= 36.98 //gms
N= 6*10^23 //molecules
r= 1.275*10^-8 //cm
//CALCULATIONS
u= m*m1/(N*(m+m1))
I= u*r^2
//RESULTS
printf (' reduced mass = %.2e g',u)
printf (' \n moment of inertia = %.2e g cm^2',I)
|
7231828068f6ca14b1c73876df03873c405ca225 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2198/CH2/EX2.9.9/Ex2_9_9.sce | 8b352d255255449f087359d0b9ebd435e9793f48 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 271 | sce | Ex2_9_9.sce | //Ex 2.9.9
clc;clear;close;
format('v',8);
//Given :
Vs=5;//Volt
Eta=1;//constant
VT=26/1000;//V
//I=I0 so exp(V1/Eta/VT)-1=1
V1=log(1+1)*Eta*VT;//Volt
V2=Vs-V1;//volt
disp(V1,"Voltage across diode D1 in V : ");
disp(V2,"Voltage across diode D2 in V : ");
|
311318b972bf7b90480721655bedd1414112e238 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2045/CH2/EX2.19/Ex2_19.sce | fd6beaea5a0315b7347e96120a3158598d5c13eb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 383 | sce | Ex2_19.sce | //pagenumber 114 example 19
clear
na=10*22;//atoms per cubic metre
nd=1.2*10^21;//donor per cubic metre
voltag=1.38*10^-23*(273+298)/(1.6*10^-19);//correction in the book
voltag=0.026;
ni=1.5*10^16;
ni=ni^2;
v1=voltag*log((na*nd)/(ni));
disp("thermal voltage = "+string((voltag))+"volt");
disp("barrier voltage = "+string(abs(v1))+"volt");//correction in the book
|
e6d436d28d670049f921d6fc40a3db8de36cb715 | bd9ba5abb6de1e9d9485b5e98b2b68868aab21db | /Basic arithmatic/Adding_2numbers.sce | c473fe10641960ad6aa6fe92b6a87a9aa74833e0 | [] | 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 | 16 | sce | Adding_2numbers.sce | A = 1 + 2
|
9b09b9a8ced85a570c5b4c4f54ff1be6e090bc50 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1052/CH21/EX21.16/2116.sce | d71bff6878ed56b2d53e082b31f284b4d408244f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,033 | sce | 2116.sce | clc;
//Example 21.16
//page no 291
printf("Example 21.16 page no 291\n\n");
//water flows in a concrete pipe
v_p=0.02// flow velocity,m/s
D_p=1.5//diameter of pipe
L_p=20//length of pipe,m
rho_p=1000//density of water,kg/m^3
meu_p=0.001//viscosity of water,kg/m.s
K_p=0.003//roughnes factor,m
//this prototype is to be modeled in a lab using a 1/3o th scale pipe
D_m=D_p/30//D_m is diameter of modeled pipe
L_m=L_p*(D_m/D_p)//length of modeled pipe
K_m=K_p*(D_m/D_p)//roughness factor for modeled pipe
//the fluid in the model is caster oil
rho_m=961.3//densiy of oil, kg/m^3
meu_m=0.0721//viscosity of oil,kg/m.s
//since R_e = (rho_m*v_m*D_m)/meu_m = (rho_p*v_p*D_p)/meu_p
v_m = (rho_p*v_p*D_p*meu_m)/(rho_m*D_m*meu_p)// flow velcity in molded pipe
printf("\n flow velocity v_m=%f m/s",v_m);
//pressure drop in prototype
P_drop_m=1e+5//pressure drop in model
P_drop_p=(P_drop_m*rho_p*(v_p)^2)/(rho_m*(v_m)^2)//pressure drop in prototype
printf("\n pressure drop in prototype P_drop_p=%f Pa",P_drop_p);
|
8399ae231992a9e6a3511d8cfb54e5a987069cda | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH15/EX15.23/23.sce | 370715ca35e33275230e629ddb6288c6d7119bcb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 23.sce | clc
A=0.12; //m^2
T=800; //K
a=5.67*10^(-8);
disp("(i) The total rate of energy emission =")
Eb=a*A*T^4;
disp(Eb)
disp("W")
disp("(ii) The intensity of normal radiation =")
Ibn=a*T^4/%pi;
disp(Ibn)
disp("W/m^2.sr")
disp("(iii) The wavelength of maximum monochromatic emissive power =")
wavelength=2898/T;
disp(wavelength)
disp("μm") |
db935943ad40927d04f5a98e46e9f71799f77d9f | 449d555969bfd7befe906877abab098c6e63a0e8 | /1514/CH18/EX18.1/18_1.sce | d4bb819d8fa5546cb925cfa457ced1dae5f9c23c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | sce | 18_1.sce | //chapter 18
//example 18.1
//page 559
clear all;
clc ;
//given
Rl=15;//load resistance
ep=30;//peak ip voltage
Rg=1;//gate resistance kohm
//forward blocking voltage VfXm>30 for SCR to remain in off until triggered
VAK=1;
Ip=(ep-VAK)/Rl;
//rms value of Il
Irms=0.5*Ip;
printf("\nIrms=%.2f A and ep=%d V",Irms,ep);
printf("\nC6F is suiatable SCR with VFXM=50 V,current range allowable is 1.6 A");
//from chart
Vg=0.5;//Trigger voltage
Ig=0.025//mA
Irg=Vg/Rg;
It=Ig+Irg;//trigger current
printf("\nTrigger voltage=%.1f V and trigger current=%.3f mA",Vg,It);
Ih=1;
Il=Ih;
ei=VAK+1000*Il*Rl;
ei=1;
printf("\nei=%d V\nSCR will switch off when ei falls below 1 V",ei);
|
911b8f1d0c62e23fe4a918dc89ed1cc15526668f | fb66bf7160cff53a909533926527b4d5e6b16776 | /scilabCode/plotOperations2d.sci | 354bc4ea8769dacc3eb4e368c02880054dec10c4 | [] | no_license | kavyamanohar/EDALabmanual | b705c1f4a3cd1baacbdc760ae71c8288aa2eb95e | 98e2e7e391c886ece0503a02491d968065bbd5d8 | refs/heads/master | 2020-04-06T07:08:56.526175 | 2016-09-04T16:40:51 | 2016-09-04T16:40:51 | 65,728,061 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 394 | sci | plotOperations2d.sci | //2D plots
x=[-1:.1:1];
y=x.^2;
figure;
plot(x,y,'-*'); xlabel('domain');ylabel('range');
title('Square function(plot)')
xs2pdf(0,'plotfunction.pdf')
figure;
plot2d(x,y); xlabel('domain');ylabel('range');
title('Square function(plot2d)')
xs2pdf(1,'plot2dfunction.pdf')
figure;
plot2d3(x,y);xlabel('domain');ylabel('range');
title('Square function(plot2d3)')
xs2pdf(2,'plot2d3function.pdf')
|
8a2b4582987a4fb678a3c84586552fc52dd59b79 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1949/CH5/EX5.2/Ex5_2.sce | 748edcead11304cd36322a76852133e8f1591096 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 415 | sce | Ex5_2.sce | //Chapter-5,Example 5_2,Page 5-23
clc()
//Given Values:
m=1 //mass of given particle in kg
h=6.63*10^-34 //Planck's constant
v=1*10^3 //velocity of particle
//Calculations:
lam=h/(m*v) //de Broglie wavelength
printf('de Broglie wavelength associated with particle is =%.40f m \n \n',lam)
printf(' This wavelength is too small for any practical significance.')
|
345e30dd9f8d467a30cc4dd75874344d7be99dc4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /905/CH8/EX8.4/8_4.sce | 5bb40e52a103a8038e9a02d47901aaf5d8c03a48 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,299 | sce | 8_4.sce | clear;
clc;
// Illustration 8.4
// Page: 484
printf('Illustration 8.4 - Page: 484\n\n');
// Solution
// a - water vapor b - air
//*****Data*****
T_G1 = 356; // [K]
P_total = 101.325; // [kPa]
Y_1 = .03; // [kg water/kg dry air]
//*****//
C_pa = 1.884; // [kJ/kg.K]
C_pb = 1.005; // [kJ/kg.K]
C_s1 = C_pb + Y_1*C_pa;// [kJ/kg.K]
T_1 = 373.15; // [K]
T_c = 647.1; // [K]
M_a = 18.02; // [gram/mole]
M_b = 28.97; // [gram/mole]
lambda_1 = 2256; // [Latent Heat of Vaporizarion at T_1, kJ/kg]
// Using equation 8.10
// T_as = T_G1- (Y_as - Y_l)*lambda_as/C_s1
// where lambda_2 = lambda_1*((1-T_as/T_c)/(1-T_1/T_c))^.38
// Y_as = P_a/(P_total-P_a)*M_a/M_b
// and P_a = exp(16.3872-(3885.7/(T_as-42.98))) - Antoine equation for component 'a'
deff('[y] = f12(T_as)',' y = T_as - T_G1 + ((exp(16.3872 - (3885.7/(T_as - 42.98)))/(P_total - (exp(16.3872 - (3885.7/(T_as - 42.98))))))*(M_a/M_b) - Y_1)*(lambda_1*((1-T_as/T_c)/(1-T_1/T_c))^.38/C_s1)');
T_as = fsolve(310,f12); // [K]
printf("Adiabatic Saturation Temperature is %f K\n",T_as);
// Now using equation 8.2
P_a = exp(16.3872-(3885.7/(T_as-42.98))); // [kPa]
Y_as = P_a/(P_total-P_a)*M_a/M_b; // [kg water/kg dry air]
printf("Absolute humidity is %f kg water/kg dry air\n",Y_as); |
993c511c2201892df8f8ce780562629554472cc8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2825/CH2/EX2.7/Ex2_7.sce | d435aa62a7b2b8326f9de048b98a9f69155010ae | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 664 | sce | Ex2_7.sce | //Ex2_7 Pg-88
clc
disp("Relaxation time in terms of mobility is given by")
disp(" t=m*u/e")
printf("\n\n Taking effective mass of electron an holes in consideration,\n relaxation time is given by \n")
disp(" t=m_star*u/e")
disp("(a) foe electrons,m_star = 0.259*m_0")
m0=9.1*10^(-31)
ue=0.135 //mobility of electrons
e=1.6*10^(-19) //electron charge
t_e=(0.259*m0*ue)/e
printf("\n Average relaxation time of eletrons = %.2f*1e-13 secs\n ",t_e*1e13)
uh=0.048 //mobility of holes
disp("(b) For holes in the valance band,m=0.537*m_0")
t_h=(0.537*m0*uh)/e
printf("\n Average relaxation time of eletrons = %.2f*1e-13 secs\n ",t_h*1e13)
|
e2b8d590c8a44121afc64542e2112422574c28fc | 449d555969bfd7befe906877abab098c6e63a0e8 | /1092/CH1/EX1.10/Example1_10.sce | 5502597d03a95cc3c84ec014f90accab96ecfb4d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 779 | sce | Example1_10.sce | // Electric Machinery and Transformers
// Irving L kosow
// Prentice Hall of India
// 2nd editiom
// Chapter 1: Electromechanical Fundamentals
// Example 1-10
clear; clc; close; // Clear the work space and console.
// Given data
no_of_coils = 40;
N = 20; // no of turns in each coil
omega = 200; // angular velocity of armature in rad/s
phi = 5 * 10 ^ -3; // flux per pole
a = 4; // No. of parallel paths
P = 4; // No. of poles
// Calculations
Z = no_of_coils * 2 * N; // No. of conductors
E_g = ( phi * Z * omega * P ) / ( 2 * %pi * a ); // Voltage generated by the
// armature between brushes
// Display the results
disp("Example 1-10 Solution : ");
printf("\n Z = % d conductors ", Z);
printf("\n Eg = % .2f V between the brushes ", E_g);
|
3b74532ac03294a46e5f79e30bf514ccf5b0d3d5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2921/CH3/EX3.6/Ex3_6.sce | f62d9a4a8bcfc91bc104013bcb3fce075f154b8e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,086 | sce | Ex3_6.sce | clc;
clear;
mprintf('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-3.6 Page No.55\n');
L=60; //[in] Length of column
Sy=36000; //[lb/in^2] Yield strength
SF=2; //[]Safty factor
E=30*10^6; //[lb/in^2] Modulus of elasticity
A=2.26; //[in^2] Area of cross section (Appendix 5.4)
I=0.764; //[in^4] Moment of inertia (Appendix 5.4)
r=sqrt(I/A); //[in] Radius of gyration
K=0.65; //[] End support condition factor from Figure 3.8
Le=K*L; //[in] Effective length
mprintf('\n The effective length is %f in.',Le);
SR=Le/r; //[] Slenderness ratio
mprintf('\n The slenderness ratio is %f.',SR);
Cc=sqrt(2*%pi^2*E/Sy); //[] Column constant
mprintf('\n The column constant is %f.',Cc);
if Cc>SR then
mprintf('\n The column constant is greater than slenderness ratio, so use the Johnson formula.');
end
F=(A*Sy/SF)*(1-Sy*SR^2/(4*%pi^2*E));
mprintf('\n The acceptable load for a safty factor of 2 is %f lb.',F);
|
c22f3890ab136606ce90f06ba14b5cd1b5e37b36 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3176/CH4/EX4.17/Ex4_17.sce | 2e5966dd5880079510815e959ad4d5e0e6fc3919 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 4,521 | sce | Ex4_17.sce | //Ex4_17
// Image Smoothing with a Butterworth LowPass Filter
// Version : Scilab 5.4.1
// Operating System : Window-xp, Window-7
//Toolbox: Image Processing Design 8.3.1-1
//Toolbox: SIVP 0.5.3.1-2
//Reference book name : Digital Image Processing
//book author: Rafael C. Gonzalez and Richard E. Woods
clc;
close;
clear;
xdel(winsid())//to close all currently open figure(s).
function[H]=lowpassfilter(type1,M,N,D0,n)//lowpassfilter is used to filter an image .
u=0:(M-1);
v=0:(N-1);
idx=find(u>M/2);
u(idx)=u(idx)-M;
idy=find(v>N/2);
v(idy)=v(idy)-N;
[U,V]=meshgrid(v,u);
D=sqrt(U.^2+V.^2);
select type1
case'butterworth'then
if argn(2)==4 then
n=1;
end
H = ones(M,N)./(1+(D./D0).^(2*n));
else
disp('Unknownfiltertype.')
end
endfunction
/////////////////////////////////// Main Programm ////////////////////////////////
a=imread("Ex4_17.tif");
//gray=rgb2gray(a);
gray=im2double(a);
figure,ShowImage(gray,'Gray Image');
title('Original Image','color','blue','fontsize',4);
[M,N]=size(gray);
h=fft2(gray);//fft2() is used to find 2-Dimensional Fast Fourier Transform of an matrix
i=log(1+abs(h));
in=fftshift(i);//fftshift() is used to rearrange the fft output, moving the zero frequency to the center of the spectrum.
inm=mat2gray(in)
figure,ShowImage(inm,'Frequency Spectrum');
title('Frequency Spectrum','color','blue','fontsize',4);
/////////////////////////// Filtering With Cut-off Frequency 10 ///////////////////////
filt=lowpassfilter('butterworth',M,N,10); // Function which generate Filter Mask Corresponding to Low Frequency
//filt_shift=fftshift(filt);
//figure,ShowImage(filt_shift,'Filter Mask');
//title('Filter Mask to Specific Cut-Off Frequency');
n=filt.*h;//Multiply the Original Spectrum with the Filter Mask.
Image_filter=real(ifft(n));
Image_filter=mat2gray(Image_filter)
figure,ShowImage(Image_filter,'Filtered Image');
title('Filtered Image with Cut-Off Frequency 10','color','blue','fontsize',4);
/////////////////////////// Filtering With Cut-off Frequency 30 ///////////////////////
filt=lowpassfilter('butterworth',M,N,30); // Function which generate Filter Mask Corresponding to Low Frequency
//filt_shift=fftshift(filt);
//figure,ShowImage(filt_shift,'Filter Mask');
//title('Filter Mask to Specific Cut-Off Frequency');
n=filt.*h;//Multiply the Original Spectrum with the Filter Mask.
Image_filter=real(ifft(n));
Image_filter=mat2gray(Image_filter)
figure,ShowImage(Image_filter,'Filtered Image');
title('Filtered Image with Cut-Off Frequency 30','color','blue','fontsize',4);
/////////////////////////// Filtering With Cut-off Frequency 60 ///////////////////////
filt=lowpassfilter('butterworth',M,N,60); // Function which generate Filter Mask Corresponding to Low Frequency
//filt_shift=fftshift(filt);
//figure,ShowImage(filt_shift,'Filter Mask');
//title('Filter Mask to Specific Cut-Off Frequency');
n=filt.*h;//Multiply the Original Spectrum with the Filter Mask.
Image_filter=real(ifft(n));
Image_filter=mat2gray(Image_filter)
figure,ShowImage(Image_filter,'Filtered Image');
title('Filtered Image with Cut-Off Frequency 60','color','blue','fontsize',4);
/////////////////////////// Filtering With Cut-off Frequency 160 ///////////////////////
filt=lowpassfilter('butterworth',M,N,160); // Function which generate Filter Mask Corresponding to Low Frequency
//filt_shift=fftshift(filt);
//figure,ShowImage(filt_shift,'Filter Mask');
//title('Filter Mask to Specific Cut-Off Frequency');
n=filt.*h;//Multiply the Original Spectrum with the Filter Mask.
Image_filter=real(ifft(n));
Image_filter=mat2gray(Image_filter)
figure,ShowImage(Image_filter,'Filtered Image');
title('Filtered Image with Cut-Off Frequency 160','color','blue','fontsize',4);
/////////////////////////// Filtering With Cut-off Frequency 460 ///////////////////////
filt=lowpassfilter('butterworth',M,N,460); // Function which generate Filter Mask Corresponding to Low Frequency
//filt_shift=fftshift(filt);
//figure,ShowImage(filt_shift,'Filter Mask');
//title('Filter Mask to Specific Cut-Off Frequency');
n=filt.*h;//Multiply the Original Spectrum with the Filter Mask.
Image_filter=real(ifft(n));
Image_filter=mat2gray(Image_filter)
figure,ShowImage(Image_filter,'Filtered Image');
title('Filtered Image with Cut-Off Frequency 460','color','blue','fontsize',4);
|
f37c62e93f33d3af6e09846a467a54123b7c2875 | 93c7fb5ee09b14b93d6c6a5a99d15e57555802be | /pushswap42/scripts/docker_file/test_500/test2.tst | a62311cbaa22f313e1f5e71cf9f6f31c4bc71d89 | [] | no_license | ach5910/42PushSwap.com | b1cd724453b20296e39c18e5d576bdfb6290f7da | bfa2755c1cb84c7d72a4858c77193743a5583a1a | refs/heads/master | 2020-04-05T12:35:36.043271 | 2017-07-26T06:33:40 | 2017-07-26T06:33:40 | 95,174,903 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,949 | tst | test2.tst | 867 715 812 250 702 310 960 312 233 350 280 853 533 208 180 184 532 923 851 594 907 194 254 647 588 125 386 850 882 919 912 353 752 471 279 938 771 943 248 359 656 927 854 90 965 469 515 473 322 277 301 242 732 88 81 485 391 388 777 179 378 790 527 3 12 202 55 575 675 556 162 145 809 863 949 541 492 365 171 918 404 454 455 603 498 33 409 499 929 200 187 438 612 313 958 217 247 896 899 374 483 183 406 72 750 434 794 100 448 615 567 630 674 712 597 591 169 160 43 115 806 828 124 704 928 126 334 784 824 746 861 973 431 802 458 129 222 400 285 297 705 660 643 349 174 486 582 506 82 158 546 800 463 658 453 933 652 728 268 662 718 925 881 167 102 325 305 275 589 99 936 394 351 303 763 543 963 219 173 338 343 819 879 972 168 682 155 707 360 834 229 265 966 426 20 495 302 19 507 721 939 61 290 452 869 908 276 992 608 111 816 574 456 713 999 978 774 281 826 317 609 886 92 209 987 46 26 457 137 32 830 134 138 805 430 799 797 847 628 44 364 269 210 228 536 362 196 846 101 910 678 377 625 727 555 618 204 957 840 361 419 45 921 629 232 730 641 685 501 892 139 600 639 729 917 128 369 1 47 15 864 820 606 982 224 736 518 367 576 375 215 866 807 852 586 494 545 146 610 821 673 13 271 484 193 539 425 990 64 748 175 740 560 544 106 141 811 416 895 989 201 810 742 996 163 764 783 73 520 509 23 497 104 836 87 822 252 985 690 694 994 942 975 287 680 554 293 968 83 858 80 984 462 218 932 993 352 120 237 63 761 862 439 686 27 379 687 772 871 95 620 225 50 661 779 480 856 572 299 212 205 282 176 326 890 418 563 97 666 288 526 523 62 408 35 634 121 557 765 199 363 414 906 841 635 148 565 645 598 583 292 580 537 566 733 490 300 648 697 220 754 67 605 153 814 389 894 5 7 71 227 889 116 945 535 749 865 950 161 848 413 792 96 381 335 931 825 909 739 267 257 272 70 724 818 524 701 235 703 172 21 970 787 622 147 667 505 132 154 107 66 530 488 246 465 477 875 681 487 744 760 714 511 324 356 793 368 716 478 584 689 496 372 192 2 683 872 516 855 259
|
ca76c83921e65f5b3f8b312919220e21ced921e8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3875/CH10/EX10.22/10_22.sce | 6589f86c51bdeeb23a5dd3e9036812e9eadb1cb5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 305 | sce | 10_22.sce | clc;
clear;
h=6.63*10^-34 //Plancks constant in J-s
K_b=1.38*10^-23 //Boltzmanns constant in m^2 kg s^-2 K^-1
T=300 //Temperature in K
m=1.00878*1.66*10^-27 //mass of neutron in kg
//calculation
lambda=(h/sqrt(3*m*K_b*T))
mprintf("The de-Broglie wavelength is = %1.2e m or 0.145 nm",lambda)
|
b909e59eb97044ce20cbff94a65e8ac70b853148 | 592800436ab73e7b6de03821a4fc923079657cc8 | /minimo cuadrado.sce | 293b6ec045a6600c8ca3c24efb7dca2fed27ec71 | [] | no_license | stevenyeahhh/Prueba | 9fd39333c4bf43558b868794f53632ddbbb3978e | 5f74987ff714d4f37608d7f1a4bbba0db587b7a3 | refs/heads/master | 2020-07-02T01:58:03.654505 | 2017-10-13T22:38:18 | 2017-10-13T22:38:18 | 29,828,603 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 599 | sce | minimo cuadrado.sce | clc;
x=[-1,2,-1,5,6];
y=[3,1,4,2,3];
px=1;
////////////////////
xy=0;
tx=0;
ty=0;
x2=0;
n=length(x);
for(i=1:n)
xy =xy+(x(i)*y(i));
tx=tx+(x(i));
ty=ty+(y(i));
x2=x2+(x(i)^2);
// printf("%.5f",x(i));
end
a=((n*xy)-(tx*ty))/((n*x2)-(tx*tx));
b=((ty*x2)-(tx*xy))/((n*x2)-(tx*tx));
printf("%.5f\n",a);
printf("%.5f\n",b);
f=(a*px)+b
printf("%.5f\n",f);
/* printf("%.5f\n",xy);
printf("%.5f\n",tx);
printf("%.5f\n",ty);
printf("%.5f\n",x2);
printf("%.5f\n",n);
*/
|
4309aa3e075506df259063188227fa60287d447c | dd9eb51859881047610606fcc05f36902c3760b7 | /RicAndroidADK/RIC90/Scenario/呼びこみ00.sce | 3acbe860a1447a2df53b616d31620e14f69a6a42 | [] | no_license | bsmasui/ADK-with-RIC-android | 668d0fd26e588364663242b92f4c12b34564fbbc | c6b98aab340b3c24330d5689a98fc3ef6b8c6097 | refs/heads/master | 2020-05-03T05:25:12.480444 | 2011-08-09T13:54:36 | 2011-08-09T13:54:36 | 2,160,609 | 1 | 0 | null | null | null | null | SHIFT_JIS | Scilab | false | false | 403 | sce | 呼びこみ00.sce | RPU1SCENTX000120110504
13
// ID, StartTime, PlayTime, MotionName
32,3,57,招き猫00.mtn
33,109,60,握手00.mtn
34,219,57,招き猫00.mtn
35,323,35,両手持ち00.mtn
36,384,62,ネコパンチ00.mtn
37,496,60,拍手00.mtn
38,609,72,はぐ00.mtn
39,714,57,招き猫00.mtn
40,829,60,握手00.mtn
41,933,35,両手持ち00.mtn
42,997,62,ネコパンチ00.mtn
43,1104,60,握手00.mtn
44,1219,60,拍手00.mtn
|
462624f70073d4f00c5a7e2ae89148413ab244bc | 449d555969bfd7befe906877abab098c6e63a0e8 | /2657/CH12/EX12.3/Ex12_3.sce | abafaf56eedd59af9135838460301dcd81c95245 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,003 | sce | Ex12_3.sce | //Calculation of orifice diameter
clc,clear
//Given:
bp=15 //Brake power per cylinder in kW
N=2000 //Engine speed in rpm
bsfc=0.272 //Brake specific fuel consumption in kg/kWh
API=32 //American Petroleum Institute specific gravity in degreeAPI
theta_i=30 //Period of injection in degrees
P_i=120 //Fuel injection pressure in bar
P_c=30 //Combustion chamber pressure in bar
Cd=0.9 //Coefficient of discharge for the injector
function rho=specificgravity(API),rho=141.5/(131.5+API),endfunction //Specific gravity(rho) as a function of API
//Solution:
s=specificgravity(API) //Specific gravity of fuel
m_f=bsfc*bp*2/(N*60) //Fuel consumption in kg
t=theta_i/360*60/N //Time for injection in s
m_f=m_f/t //Fuel consumption per cycle in kg/s
A_f=m_f/(Cd*sqrt(2*s*1000*(P_i-P_c)*10^5)) //Orifice area of fuel injector in m^2
A_f=A_f*10^6 //Orifice area of fuel injector in mm^2
d_f=sqrt(4*A_f/%pi) //Diameter of fuel orifice in mm
//Results:
printf("\n The diameter of the fuel orifice, d = %.2f mm\n\n",d_f)
|
8c0631c60a5aab12bf006a6e2a2a827d7f51a3f7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /788/CH11/EX11.1.a/11_1_data.sci | 40f82212f33c710e832ae127af48cd3e03b390b5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 204 | sci | 11_1_data.sci | // Aim:To find the discharge flow and pressure
// Given:
// high inlet flow-rate:
Q_high_inlet=20; //gpm
// low inlet pressure:
p_low_inlet=500; //psi
// Ratio of piston area to rod area:
Ratio=5/1;
|
24ec593c9cd719984276f4487818c460341c1cb4 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.4/macros/percent/%hm_s.sci | f29a14e95d98ae1cb24b1baea6aeb155d3e48adc | [
"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 | 101 | sci | %hm_s.sci | function M1=%hm_s(M1)
// Copyright INRIA
// hypermatrix sign change
M1('entries')=-M1('entries')
|
f7277eb790b870490cb687565b0b66488c379991 | 449d555969bfd7befe906877abab098c6e63a0e8 | /278/CH4/EX4.2/ex_4_2.sce | b3ef68e047d19b451dfed4729b82a00cd4775842 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 343 | sce | ex_4_2.sce |
clc
//solution
//given
P=45000//N//load applied
A1=45*20//mm^2//area of cross section at link A-A
//stress in section A-A
f1=P/A1//(N/mm^2)
printf("the stress in section A-A is ,%f N/mm^2\n",f1)
//stress in section B-B
A2=20*(75-40)//mm^2//area of cross section at link B-B
f2=P/A2//(N/mm^2)
printf("the stress in B-B section ,%f N/mm^2",f2)
|
4963101708be66075e31960528eab91165ff4440 | 4bbc2bd7e905b75d38d36d8eefdf3e34ba805727 | /ee/contrib/dspic/macros/misc/bb_bode.sci | 6ab49cf746ea89081a3a75a4568c400623b21921 | [] | no_license | mannychang/erika2_Scicos-FLEX | 397be88001bdef59c0515652a365dbd645d60240 | 12bb5aa162fa6b6fd6601e0dacc972d7b5f508ba | refs/heads/master | 2021-02-08T17:01:20.857172 | 2012-07-10T12:18:28 | 2012-07-10T12:18:28 | 244,174,890 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,711 | sci | bb_bode.sci | function []=bb_bode(sl,fmin,fmax,pas,comments)
//!
// Copyright INRIA
// Modified by Roberto Bucher to obtain frequencies in rad/s
[lhs,rhs]=argn(0);
dom='c';
//xset('default');
//---------------------
nyq_frq=[];l10=log(10);
pas_def='auto' // default
ilf=0
typ=type(sl)
//-compat next line added for list/tlist compatibility
if typ==15 then typ=16,end
select typ
case 16 then // sl,fmin,fmax [,pas] [,comments]
typ=sl(1);typ=typ(1);
if typ<>'lss'&typ<>'r' then
error(97,1)
end
if typ=='lss' then
if sl(7)==[] then error('Undefined time domain (sl(7))');end
end
if typ=='r' then
if sl(4)==[] then error('Undefined time domain (sl(4))');end
end
dom=sl('dt')
if dom==[]|dom==0 then error(96,1),end
if dom=='d' then dom=1;end
select rhs
case 1 then //sl
comments=' '
fmin_default=1.d-3;
fmax_default=1.d3;
if dom=='c' then fmax_default=1.d3; else fmax_default=1/(2*dom),end
[frq,repf]=repfreq(sl,fmin_default,fmax_default);
[d,phi]=dbphi(repf);
sl=[]
case 2 then // sl,frq
comments=' '
if min(fmin)<=0 then
error('bode: requires strictly positive frequency vector')
end
[frq,repf]=repfreq(sl,fmin);
[d,phi]=dbphi(repf);
fmin=[];sl=[]
case 3 , //sl,frq,comments ou sl,fmin,fmax
if type(fmax)==1 then
comments=' '
if fmin<=0 then
error('bode: requires strictly positive frequency range')
end
[frq,repf]=repfreq(sl,fmin,fmax,pas_def),sl=[]
[d,phi]=dbphi(repf);
else
comments=fmax
if min(fmin)<=0 then
error('bode: requires strictly positive frequency vector')
end
if type(dom)==1 then nyq_frq=1/2/dom;end
if find(fmin>nyq_frq)~=[] then
warning('There are frequencies beyond Nyquist f!');
end
[frq,repf]=repfreq(sl,fmin);fmin=[];sl=[]
[d,phi]=dbphi(repf);
end
case 4 ,
if type(pas)==1 then
comments=' ',
else
comments=pas;pas=pas_def;
end,
if min(fmin)<=0 then
error('bode: requires strictly positive frequency vector')
end
[frq,repf]=repfreq(sl,fmin,fmax,pas)
[d,phi]=dbphi(repf);
case 5 then,
if min(fmin)<=0 then
error('bode: requires strictly positive frequency vector')
end
[frq,repf]=repfreq(sl,fmin,fmax,pas)
[d,phi]=dbphi(repf);
else
error('Invalid call: sys,fmin,fmax [,pas] [,com]')
end;
case 1 then //frq,db,phi [,comments] ou frq, repf [,comments]
select rhs
case 2 , //frq,repf
comments=' '
[phi,d]=phasemag(fmin);fmin=[]
case 3 then
if type(fmax)==1 then
comments=' '//frq db phi
d=fmin,fmin=[]
phi=fmax,fmax=[]
else
[phi,d]=phasemag(fmin);fmin=[]
comments=fmax
end;
case 4 then
comments=pas;d=fmin;fmin=[];phi=fmax;fmax=[]
else
error('Invalid call: frq,db,phi,[com] or frq,repf,[com]')
end;
frq=sl;sl=[];[mn,n]=size(frq);
if min(frq)<=0 then
error('bode: requires strictly positive frequencies')
end
if mn<>1 then
ilf=1;//un vecteur de frequences par reponse
else
ilf=0;//un seul vecteur de frequence
end;
else
error('Bode: invalid call')
end;
[mn,n]=size(phi)
//
//Captions
if comments==' ' then
comments(mn)=' ';
mnc=0
hx=0.48
else
mnc=mn
hx=0.43
end;
[wrect,frect]=xgetech();
//magnitude
xsetech(wrect=[wrect(1)+0,wrect(2)+0,wrect(3)*1.0,wrect(4)*hx*0.95]);
frq=2*%pi*frq;
rect=[mini(frq),mini(d),maxi(frq),maxi(d)]
// just to fix the scales for xgrid
plot2d1("oln",mini(frq),mini(d),0,"051"," ",rect);
// xgrid first
xgrid(4);
// now the curves
plot2d1("oln",frq',d',[1:mn],"000"," ",rect);
if type(dom)==1 then
[xx1,xx2]=xgetech();
val= xx2([2;4])';
plot2d1("oln",max(frq)*[1;1],val,5,"000"," ",rect);
end
xtitle('Magnitude ',' rad/s','db');
//phase
xsetech(wrect=[wrect(1)+0,wrect(2)+wrect(4)*hx,wrect(3)*1.0,wrect(4)*hx*0.95]);
rect=[mini(frq),mini(phi),maxi(frq),maxi(phi)]
// just to fix the scales for xgrid
plot2d1("oln",mini(frq),mini(phi),0,"051"," ",rect);
xgrid(4);
// now the curves
plot2d1("oln",frq',phi',[1:mn],"000");
if type(dom)==1 then
[xx1,xx2]=xgetech();
val= xx2([2;4])';
plot2d1("oln",max(frq)*[1;1],val,5,"000");
end
xtitle('Phase ',' rad/s','degrees');
if mnc>0 then
xsetech([wrect(1)+0,wrect(2)+wrect(4)*2*hx,wrect(3)*1.0,wrect(4)*0.1],[0 0 1 1]);
dash=xget('dashes')
y0=0.7;dy=-1/2
x0=0;dx=1/2
count=0
for k=1:mnc
xset('dashes',k)
xsegs([x0;x0+0.08],[y0;y0])
rect=xstringl(x0+0.1,y0,comments(k))
xset('dashes',dash(1));
xstring(x0+0.1,y0-rect(4)/3,comments(k))
count=count+1
y0=y0+dy
if count==3 then x0=x0+dx;y0=0.7,end
end
xset('dashes',dash(1))
end
xsetech(wrect,frect);
endfunction
|
1894bf1f2d5c728db3305372d1be90dacd9aa79b | 25033eda4e7cd13f945f94c5dc35f15825066b42 | /Inria/2 cohorts/Tfini/multi-PIP.sce | dd672a0f3cde90d8f43f8e8aef817b7a8e69b20e | [] | no_license | julienguegan/Internships | a26cb9efa2f1715832511a7aa94d25bfc675388b | ad51d5845ed8fd41e29259c95e8beff80bac65cf | refs/heads/master | 2020-12-20T21:54:29.099157 | 2020-01-25T19:20:10 | 2020-01-25T19:20:10 | 236,217,889 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 470 | sce | multi-PIP.sce | clear
clf()
for J = 1:3
for I = 1:3
perdants = []
gagnants = []
M1σ = 2950+I*250
M2σ = 2950+J*250
exec('C:\Users\Julien Guégan\Documents\Cours\MAM4\STAGE\2 cohorts\Tfini\PIP - Tfini.sce',-1)
subplot(3,3,(I-1)*3+J)
//Mσ = 3000:3800
//plot(Mσ,Mσ,'k')
plot(perdants,gagnants,'r.')
plot(gagnants,perdants,'b.')
// contour(Mσ,Mσ,s,[0.99,0.999,1,1.001,1.01])
end
end
|
5e1f3be0fa3daee8b9c06f4ba6daa076f088a415 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3281/CH2/EX2.10/ex2_10.sce | 29a1bd74df26e0d1cbb9c0be4c290f2ba429ab36 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 528 | sce | ex2_10.sce | //Page Number:
//Example 2.10
clc;
//Given,
c=3D+8; //m/s
a=3; //cm
a1=a/100; //m
b=2; //cm
b1=b/100; //m
f=7.5D+9; //HZ
p=5D+3; //W
mu=%pi*4D-7;
w=2*%pi*f;
bet=sqrt(((w/c)^2)-((%pi/a1)^2));
//Charecteristic impedance
z0=w*mu*2*b/(bet*a);
disp('ohm',z0,'Charecteristic impedance:');
//Peak electric field
e0=4*w*mu*p/(bet*a*b);
disp('V/m',e0,'Peak electric field:');
//Maximum voltage
v0=e0*b1;
disp('kV',v0/1000,'Maximum voltage:');
//Answer for v0 is given as 3.172 kV it should be 33.71 kV
|
5993642ac0702567d1f0d9df33d4a9598270a88d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2204/CH10/EX10.4/ex10_4.sce | 331a5452b93bae0ca869ac7da4625ec1441d7e94 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 354 | sce | ex10_4.sce | // Exa 10.4
clc;
clear;
close;
// Given data
V_H = 10;// in V
V_L = -10;// in V
I_max = 100;// in µA
I_max = I_max * 10^-6;// in A
V_HV = 0.1;// in V
V_sat = 10;// in V
R2 = 1;// in k ohm
R1 = 199;// in k ohm
R = (R1*R2)/(R1+R2);// in k ohm
disp(R*10^3,"The resistance in Ω is");
// Note: The unit of the answer in the book is wrong
|
bd37ae5ebc2658187eafc353b4850722052e731e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1859/CH2/EX2.13/exa_2_13.sce | ad8b7e8f04bfc63a7ada5f13d195588131f1b710 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 502 | sce | exa_2_13.sce | // Exa 2.13
clc;
clear;
close;
// Given data
AR= 100;// true value of resistance in ohm
AI= 2;// true value of current in amp
R= 0.2;// uncertainties in resistance in ohm
I= 0.01;// uncertainties in current in amp
PLR= R/AR*100;// percentage limiting error to resistance
PLC= I/AI*100;// percentage limiting error to current
P=AI^2*AR;// in watt
LE_P= 2*PLC+PLR;// limiting error in the power dissipation
disp("Power dissipation")
disp(string(P-P*LE_P/100)+" to "+string(P+P*LE_P/100))
|
f36d3457a42ee27e721f65b8893af21dda3028a5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2294/CH1/EX1.14/EX1_14.sce | acc51a4693d6ab6eaa485ed9fbb2bca138ff6a90 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,516 | sce | EX1_14.sce | //Example 1.14<i>
//Find whether the following signal is periodic or not
clc;
n=-10:10;
x=cos(2*%pi*n);
subplot(321)
plot2d(n,x);
f=(2*%pi)/(2*%pi);//where f is the no of cycles/sample.
N=1/f;//where N is the no of samples per cycle.
disp('samples',N,'(a)The given signal is periodic');
//Example 1.14<ii>
//Find whether the following signal is periodic or not.
clc;
n=-20:20;
x=exp(%i*6*%pi*n);
subplot(322)
plot2d3(n,x);
f=(6*%pi)/(2*%pi);//where f is the no of cycles per sample.
N=1/f;//where N is the no of samples per cycle.
disp('samples',N,'(b)the given signal is periodic');
//example 1.14<1v>
//Find whether the given signal is periodic or not
clc;
n=-30:30;
x=exp(%i*(2*%pi/3)*n)+exp(%i*(3*%pi/4)*n);
subplot(323)
plot2d3(n,x);
disp('(c)The given signal is periodic');
//Example 1.14<v>
//Find whether the given signal is periodic or not;
clc;
n=-20:20;
x=exp(%i*(3*%pi/5)*(n+1/2));
subplot(324)
plot(n,x);
f=(3*%pi/5)/(2*%pi);//where f is the no of cycles per sample.
N=1/f;//where n is the no of samples per cycle.
disp('samples',N,'(d)the given signal is periodic');
//Example1.14<vi>
//whether the given signal is periodic or not
clc;
n=-40:40;
x=12*cos(20*n);
subplot(325)
plot(n,x);
f=20/(2*%pi);//where f is the no of cycles per sample
N=1/f;//where n is the no of sample per cycle
disp('samples',N,'(e)the given signal is not peridic');
disp('In the figure we have the plots of part (a) - (d) in clockwise order strating from the top left');
|
70674de7799963ea67bb0ac06de96e9381b43aef | 449d555969bfd7befe906877abab098c6e63a0e8 | /162/CH1/EX1.15.d/example115d.sce | 7ac2943d37a197f990b40cf3685e930b8f95a8c0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 188 | sce | example115d.sce | //Example 1.15d
//Check whether the given signal is periodic or not
clc;
t=-10:0.01:10;
y=(cos(t))^2;
plot(t,y);
disp('Plot shows that the given signal is periodic with period %pi'); |
c1767cbefbfb22079f7b915cb0916e2b386e6809 | 3969cd48d2c3a244c9a4b88e34c9e17600e47176 | /macros/phantom.sci | eedf03eb09c798e341973ec72912ee2e119839bd | [] | no_license | vbhatt-cs/Scilab-IPT | a362ad5968ac0b5ea3d9b8568ed688b0ea293505 | 78dc014d91c81043e4e81f3055c777ad6e7b0a75 | refs/heads/master | 2021-05-30T18:54:47.751439 | 2016-03-19T16:41:03 | 2016-03-19T16:41:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,677 | sci | phantom.sci | //Author: Varun Bhatt
//
//This function generates head phantom image that can be used to test numerical accuracy of
//2D reconstruction algorithms. P generally contains one large ellipse and several smaller
//ellipses of different intensities.
//
//Input parameters:
//def - Specifies the default phantom ("shepp-logan" or "modified shepp-logan") to be used.
//n - A number specifying rows and columns of the image (256x256 by default)
//E - Custom ellipses that should be used to generate phantom.
// It should have 6 columns corresponding to intensity, semi major and semi minor axis,
// x, y offset and rotation angle.
//
//Output:
//p - The generated phantom image
//ellipse - Ellipses used to generate the phantom.
//
//Examples:
//Modified shepp logan of size 256:
//
// P=phantom();
// imshow(P);
//
//Shepp logan of size 400:
//
// P=phantom("shepp-logan",400);
// imshow(P);
//
//Custom ellipse:
//
// e=[1 0.8 0.6 0 0 0];
// P=phantom(e,256);
// imshow(P);
//
//References:
//1) Shepp, Larry; B. F. Logan (1974). "The Fourier Reconstruction of a Head Section". IEEE Transactions on Nuclear Science. NS-21 (3): 21–43.
//2) P. A. Toft, "The Radon Transform, Theory and Implementation", p. 201
function [p,ellipse]=phantom(varargin)
narg=argn(2);
if(narg>2) then
error("Invalid input. At most 2 parameters required.");
end
//Default phantoms (taken from references):
// A a b x0 y0 phi
// ---------------------------------
shepp_logan=[ 1 .69 .92 0 0 0 ;
-.98 .6624 .8740 0 -.0184 0 ;
-.02 .1100 .3100 .22 0 -18 ;
-.02 .1600 .4100 -.22 0 18 ;
.01 .2100 .2500 0 .35 0 ;
.01 .0460 .0460 0 .1 0 ;
.01 .0460 .0460 0 -.1 0 ;
.01 .0460 .0230 -.08 -.605 0 ;
.01 .0230 .0230 0 -.606 0 ;
.01 .0230 .0460 .06 -.605 0 ];
// A a b x0 y0 phi
// ---------------------------------
modified_shepp_logan = [ 1 .69 .92 0 0 0 ;
-.8 .6624 .8740 0 -.0184 0 ;
-.2 .1100 .3100 .22 0 -18 ;
-.2 .1600 .4100 -.22 0 18 ;
.1 .2100 .2500 0 .35 0 ;
.1 .0460 .0460 0 .1 0 ;
.1 .0460 .0460 0 -.1 0 ;
.1 .0460 .0230 -.08 -.605 0 ;
.1 .0230 .0230 0 -.606 0 ;
.1 .0230 .0460 .06 -.605 0 ];
ellipse=modified_shepp_logan; //Default phantom
if(narg==1) then
arg1=varargin(1);
if(type(arg1)==10) then //if arg1 is a string
convstr(arg1,"l");
if(arg1=="shepp-logan") then
ellipse=shepp_logan;
elseif(arg1=="modified shepp-logan") then
ellipse=modified_shepp_logan;
else
error("Wrong type of phantom. It should be Shepp-Logan or Modified Shepp-Logan");
end
elseif(size(size(arg1),"*")==2) then //if arg1 is 2D matrix
if(size(arg1,2)==6) then
ellipse=arg1;
else
error("6 columns should be present in the phantom");
end
else
error("Invalid first input argument");
end
end
n=256 //Default n
if(narg==2) then
arg2=varargin(2);
if(isscalar(arg2))
n=arg2;
else
error("Second parameter should be a scalar.")
end
end
p=zeros(n,n);
x_sym=((0:n-1)-(n-1)/2)/((n-1)/2);
x_rel=repmat(x_sym,n,1);
y_sym=(x_sym').*(-1);
y_rel=repmat(y_sym,1,n);
for i=1:size(ellipse,1)
A=ellipse(i,1); //Intensity addition
//a,b of ellipse
a=ellipse(i,2);
b=ellipse(i,3);
//Offset
x0=ellipse(i,4);
y0=ellipse(i,5);
phi=ellipse(i,6)*3.14/180; //Rotation angle
x=x_rel-x0;
y=y_rel-y0;
e=((x.*cos(phi)+y.*sin(phi)).^2)./(a^2) + ((y.*cos(phi)-x.*sin(phi)).^2)./(b^2); //Ellipse equation
ind=find(e<=1);
p(ind)=p(ind)+A; //Adding intensity to the ellipse
end
p=p';
endfunction
|
73edd3c7c9051291a5c28879e55dea3f9d768a15 | 449d555969bfd7befe906877abab098c6e63a0e8 | /281/CH10/EX10.1/example10_1.sce | 4668215f7441b7e5c76cae0ed2bc40087c313a7d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,585 | sce | example10_1.sce | disp('chapter 10 ex10.1')
disp('given')
disp('design a triangular rectanglar signal generator to have 5volt triangular output')
disp('frequency ranging from 200Hz to 2kHz and a duty cycle adjustable from 20% to 80%')
disp('using bipolar op-amps with a supply of +or-15volt')
Vcc=15
Vo=5
f1=200
f2=2000
disp('Schmitt circuit design')
disp('I3>IBmax')
disp('let I3=50*10^(-6)A and Vf=0.7volt')
IBmax=500*10^(-9)
I3=50*10^(-6)
Vf=0.7
disp('R2=Vosat/I3')
R2=(Vcc-1)/I3
disp('ohms',R2)
disp('use 270kohm standard value and recalculate I3')
R2=270000
disp('I3=Vosat/R2')
I3=(Vcc-1)/R2
disp('amperes',I3)
disp('R3=UTP/I3')
R3=Vo/2/I3
disp('ohms',R3) //use 47kohm and 1kohm
disp('integrator circuit')
disp('let C1 charging current I1min=50*10^(-6)A')
I1min=50*10^(-6)
disp('lowest frequency f1,PWmax=80%of Tmax')
PWmax=0.80*1/f1
disp('watts',PWmax)
disp('C1=I1min*t/v')
C1=I1min*PWmax/Vo
disp('farads',C1) //standard value
disp('R4+R5+R6=(+Vosat-Vf)/I1min')
disp('R9=R4+R5+R6')
R9=(Vcc-1-Vf)/I1min
disp('ohms',R9)
disp('If2=I1min*f2/f1')
If2=I1min*f2/f1
disp('amperes',If2)
disp('R5+R6=(+Vosat-Vf)/If2')
disp('R8=R5+R6')
R8=(Vcc-1-Vf)/If2
disp('ohms',R8)
disp('R4=(R4+R5+R6)-(R5+R6)')
R4=R9-R8
disp('ohms',R4) //use 250kohm standard value potentiometer
disp('PWmin=20% of Tmax')
PWmin=.20*1/f1
disp('watts',PWmin)
disp('R6=(R5+R6)*PWmin/PWmax')
R6=R8*PWmin/PWmax
disp('ohms',R6)
disp('use 6.8kohm standard value')
R6=6800
disp('R5=(R5+R6)-R6')
R5=R8-R6
disp('ohms',R5) //standard value of potentiometer
disp('R7=R6=6.8kohm') |
462c415de244628a47479e9d11ec08b4ca771a69 | 449d555969bfd7befe906877abab098c6e63a0e8 | /615/CH8/EX8.15/8_15.sce | 7601c41413f97a876e53baacc72e110bb94e9831 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 607 | sce | 8_15.sce | //Fuels and Combustion//
//Example 8.15//
CR=7.8;//compression ratio for first case//
E1=1-(1/CR)^0.258;//Energy efficiency corresponding to CR value 7.8//
printf('Efficiency of the engine in the first case=E1=%f',E1);
CR=9.5;//compreesion ratio for second case//
E2=1-(1/CR)^0.258;//Energy efficiency corresponding to CR value 9.5//
printf('\nEfficiency of the engine in the second case=E2=%f',E2);
IE=E2-E1;//Increase in efficiency//
printf('\nIncrease in efficiency=IE=%f',IE);
PIE=IE*100/E2;//percentage of increase in efficiency//
printf('\nPercentage of increase in efficiency=PIE=%f',PIE); |
0a3bac094656523871e6ecbe8c196195f2b1b1b7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3487/CH6/EX6.2/Ex6_2.sce | 805a7b429bdcf9bf27f7e130b9116d34ec37a736 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 337 | sce | Ex6_2.sce | //Chapter 6,Example 6.2 Page 199
clc
clear
Cs = 106 // micro F
C2 = 0.35 // micro F
R2 = 318 // ohms
R1 = 130 // ohms
w = 314
Cp = Cs*(R2/R1)
Rp = R1/(w^2*C2*Cs*10^-12*R2^2)
tang = 1/(w*Rp*Cp*10^-6)
printf (" Rp = %f ohm \n ",Rp)
printf (" Cp = %f μF \n ",Cp)
printf (" tan δ = %f \n ",tang)
//Answers may vary due to round off error
|
4562549c91e71783a595b628ce871b8f14f38903 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1646/CH5/EX5.14/Ch05Ex14.sce | 56b9be14cda38f804aea89f2b4a84c7973306c2b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 597 | sce | Ch05Ex14.sce | // Scilab Code Ex5.14: Page:303 (2011)
clc;clear;
lambda = 5.9e-007;....// Wavelength of the reflected light, m
n = 10;....// Order of the ring
D10 = 0.005;....// Diameter of the 10th ring,in m
R = (D10^2)/(4*n*lambda); // Radius of curvature of the lens, m
printf("\nThe radius of curvature of the lens = %6.4f m", R);
t = (D10^2)/(8*R); // Thickness of the corresponding air film, m
printf("\nThe thickness of the corresponding air film = %4.2e m",t);
// Result
// The radius of curvature of the lens = 1.0593 m
// The thickness of the corresponding air film = 2.95e-006 m
|
0384ff08318e30ba67c9fbf10bf946318755c26c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2258/CH5/EX5.8/5_8.sce | 02c13c257badda89f6de7d6f1af436dd8b8516bd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 205 | sce | 5_8.sce | clc();
clear;
// To calculate the critical current
Hc=2*10^3; //critical magnetic field in amp/m
R=0.02; //radius in m
p=3.14;
Ic=2*p*R*Hc;
printf("the critical current is %f amp",Ic);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.