blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 214 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 6 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 21 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 141k 586M ⌀ | star_events_count int64 0 30.4k | fork_events_count int64 0 9.67k | gha_license_id stringclasses 8 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 50 values | src_encoding stringclasses 23 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 1 class | length_bytes int64 5 10.4M | extension stringclasses 29 values | filename stringlengths 2 96 | content stringlengths 5 10.4M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8fcbb362098be34f54ce97d6922f4e61656435ed | 36c5f94ce0d09d8d1cc8d0f9d79ecccaa78036bd | /LG Pin Practice 360 FN AR.sce | 4631e3171e669dd6bff44fc4ca2ef17937cb17c4 | [] | 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 | 32,565 | sce | LG Pin Practice 360 FN AR.sce | Name=LG Pin Practice 360 FN AR
PlayerCharacters=FortniteMain
BotCharacters=Pigeon.bot
IsChallenge=true
Timelimit=60.0
PlayerProfile=FortniteMain
AddedBots=Pigeon.bot;Pigeon.bot;Pigeon.bot
PlayerMaxLives=0
BotMaxLives=0;0;0
PlayerTeam=1
BotTeams=2;0;0
MapName=boxer.map
MapScale=3.8125
BlockProjectilePredictors=true
BlockCheats=true
InvinciblePlayer=false
InvincibleBots=false
Timescale=1.0
BlockHealthbars=false
TimeRefilledByKill=0.0
ScoreToWin=1000.0
ScorePerDamage=1.0
ScorePerKill=0.0
ScorePerMidairDirect=0.0
ScorePerAnyDirect=0.0
ScorePerTime=0.0
ScoreLossPerDamageTaken=0.0
ScoreLossPerDeath=0.0
ScoreLossPerMidairDirected=0.0
ScoreLossPerAnyDirected=0.0
ScoreMultAccuracy=false
ScoreMultDamageEfficiency=false
ScoreMultKillEfficiency=false
GameTag=Tracking, Fortnite
WeaponHeroTag=Fortnite AR, FortniteMain
DifficultyTag=4
AuthorsTag=twitch.tv/Akuvo
BlockHitMarkers=false
BlockHitSounds=false
BlockMissSounds=true
BlockFCT=false
Description=Using the Air map LG Pin Practice is now a 360 degree challenge because you are stuck in the middle
GameVersion=1.0.7.2
ScorePerDistance=0.0
[Aim Profile]
Name=Default
MinReactionTime=0.3
MaxReactionTime=0.4
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=15.0
TrackSpeed=3.5
TrackError=3.5
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=40.0
ShootFOV=15.0
VerticalAimOffset=0.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Bot Profile]
Name=Pigeon
DodgeProfileNames=Long Strafes 2
DodgeProfileWeights=1.0
DodgeProfileMaxChangeTime=5.0
DodgeProfileMinChangeTime=1.0
WeaponProfileWeights=1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0
AimingProfileNames=Default;Default;Default;Default;Default;Default;Default;Default
WeaponSwitchTime=3.0
UseWeapons=false
CharacterProfile=Clay Pigeon
SeeThroughWalls=true
NoDodging=false
NoAiming=false
[Character Profile]
Name=FortniteMain
MaxHealth=100.0
WeaponProfileNames=FN AR;;;;;;;
MinRespawnDelay=1.0
MaxRespawnDelay=5.0
StepUpHeight=16.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=1.0
CameraOffset=X=0.000 Y=0.000 Z=0.000
HeadshotOnly=false
DamageKnockbackFactor=0.0
MovementType=Base
MaxSpeed=375.0
MaxCrouchSpeed=133.0
Acceleration=0.0
AirAcceleration=16000.0
Friction=8.0
BrakingFrictionFactor=2.0
JumpVelocity=550.0
Gravity=0.0
AirControl=0.0
CanCrouch=false
CanPogoJump=false
CanCrouchInAir=true
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=270.0
MainBBType=Cylindrical
MainBBHeight=200.0
MainBBRadius=9.0
MainBBHasHead=true
MainBBHeadRadius=6.0
MainBBHeadOffset=1.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=65.0
ProjBBRadius=10.0
ProjBBHasHead=true
ProjBBHeadRadius=8.0
ProjBBHeadOffset=-8.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=Run.abilsprint;;;
HideWeapon=false
AerialFriction=0.0
StrafeSpeedMult=1.0
BackSpeedMult=0.9
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=100.0
RespawnAnimationDuration=0.5
AllowBufferedJumps=false
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=1.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.0
ThirdPersonCamera=true
TPSArmLength=155.0
TPSOffset=X=0.000 Y=20.000 Z=-5.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=10.0
[Character Profile]
Name=Clay Pigeon
MaxHealth=100.0
WeaponProfileNames=;;;;;;;
MinRespawnDelay=1.0
MaxRespawnDelay=5.0
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=1.0
CameraOffset=X=0.000 Y=0.000 Z=0.000
HeadshotOnly=false
DamageKnockbackFactor=8.0
MovementType=Base
MaxSpeed=1000.0
MaxCrouchSpeed=500.0
Acceleration=4000.0
AirAcceleration=16000.0
Friction=8.0
BrakingFrictionFactor=2.0
JumpVelocity=2500.0
Gravity=3.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=false
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=;;;
HideWeapon=false
AerialFriction=0.0
StrafeSpeedMult=1.0
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.5
AllowBufferedJumps=true
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.0
ThirdPersonCamera=false
TPSArmLength=300.0
TPSOffset=X=0.000 Y=150.000 Z=150.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
[Dodge Profile]
Name=Long Strafes 2
MaxTargetDistance=100000.0
MinTargetDistance=0.0
ToggleLeftRight=true
ToggleForwardBack=false
MinLRTimeChange=0.5
MaxLRTimeChange=1.5
MinFBTimeChange=0.2
MaxFBTimeChange=0.5
DamageReactionChangesDirection=true
DamageReactionChanceToIgnore=0.5
DamageReactionMinimumDelay=0.125
DamageReactionMaximumDelay=0.25
DamageReactionCooldown=1.0
DamageReactionThreshold=50.0
DamageReactionResetTimer=0.5
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.2
StrafeSwapMaxPause=0.5
BlockedMovementPercent=0.5
BlockedMovementReactionMin=0.125
BlockedMovementReactionMax=0.2
[Weapon Profile]
Name=FN AR
Type=Hitscan
ShotsPerClick=1
DamagePerShot=30.0
KnockbackFactor=0.1
TimeBetweenShots=0.181818
Pierces=false
Category=FullyAuto
BurstShotCount=2
TimeBetweenBursts=0.1
ChargeStartDamage=0.1
ChargeStartVelocity=X=1500.000 Y=0.000 Z=0.000
ChargeTimeToAutoRelease=2.0
ChargeTimeToCap=1.0
ChargeMoveSpeedModifier=1.0
MuzzleVelocityMin=X=3000.000 Y=0.000 Z=0.000
MuzzleVelocityMax=X=3000.000 Y=0.000 Z=0.000
InheritOwnerVelocity=0.0
OriginOffset=X=0.000 Y=0.000 Z=0.000
MaxTravelTime=3.0
MaxHitscanRange=100000.0
GravityScale=1.0
HeadshotCapable=true
HeadshotMultiplier=2.0
MagazineMax=30
AmmoPerShot=1
ReloadTimeFromEmpty=2.2
ReloadTimeFromPartial=2.2
DamageFalloffStartDistance=800.0
DamageFalloffStopDistance=1200.0
DamageAtMaxRange=25.0
DelayBeforeShot=0.0
HitscanVisualEffect=Tracer
ProjectileGraphic=Ball
VisualLifetime=0.001
WallParticleEffect=Gunshot
HitParticleEffect=Blood
BounceOffWorld=true
BounceFactor=0.6
BounceCount=0
HomingProjectileAcceleration=6000.0
ProjectileEnemyHitRadius=0.1
CanAimDownSight=true
ADSZoomDelay=0.15
ADSZoomSensFactor=1.0
ADSMoveFactor=0.75
ADSStartDelay=0.0
ShootSoundCooldown=0.08
HitSoundCooldown=0.08
HitscanVisualOffset=X=0.000 Y=0.000 Z=-50.000
ADSBlocksShooting=false
ShootingBlocksADS=false
KnockbackFactorAir=0.1
RecoilNegatable=true
DecalType=1
DecalSize=8.0
DelayAfterShooting=0.0
BeamTracksCrosshair=false
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
ProjectileTrail=None
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=30
CancelReloadOnKill=false
FlatKnockbackHorizontalMin=0.0
FlatKnockbackVerticalMin=0.0
ADSScope=No Scope
ADSFOVOverride=80.0
ADSFOVScale=Clamped Horizontal
ADSAllowUserOverrideFOV=false
IsBurstWeapon=false
ForceFirstPersonInADS=false
ZoomBlockedInAir=false
ADSCameraOffsetX=-90.0
ADSCameraOffsetY=0.0
ADSCameraOffsetZ=0.0
QuickSwitchTime=0.1
Explosive=false
Radius=500.0
DamageAtCenter=100.0
DamageAtEdge=0.1
SelfDamageMultiplier=0.5
ExplodesOnContactWithEnemy=true
DelayAfterEnemyContact=0.0
ExplodesOnContactWithWorld=true
DelayAfterWorldContact=0.0
ExplodesOnNextAttack=false
DelayAfterSpawn=5.0
BlockedByWorld=true
SpreadSSA=2.0,2.0,-1.0,0.0
SpreadSCA=2.0,2.0,-1.0,0.0
SpreadMSA=2.0,2.0,-1.0,0.0
SpreadMCA=2.0,2.0,-1.0,0.0
SpreadSSH=2.0,2.0,-1.0,0.0
SpreadSCH=2.0,2.0,-1.0,0.0
SpreadMSH=2.0,2.0,-1.0,0.0
SpreadMCH=2.0,2.0,-1.0,0.0
MaxRecoilUp=0.0
MinRecoilUp=0.0
MinRecoilHoriz=0.0
MaxRecoilHoriz=0.0
FirstShotRecoilMult=1.0
RecoilAutoReset=true
TimeToRecoilPeak=0.08
TimeToRecoilReset=0.08
AAMode=0
AAPreferClosestPlayer=false
AAAlpha=0.15
AAMaxSpeed=1.0
AADeadZone=0.0
AAFOV=30.0
AANeedsLOS=true
TrackHorizontal=true
TrackVertical=true
AABlocksMouse=false
AAOffTimer=0.0
AABackOnTimer=0.0
TriggerBotEnabled=false
TriggerBotDelay=0.0
TriggerBotFOV=0.1
StickyLock=false
HeadLock=true
VerticalOffset=0.0
DisableLockOnKill=false
UsePerShotRecoil=false
PSRLoopStartIndex=2
PSRViewRecoilTracking=1.0
PSRCapUp=2.2
PSRCapRight=4.0
PSRCapLeft=4.0
PSRTimeToPeak=0.12
PSRResetDegreesPerSec=6.0
PSR0=1.5,0.0
PSR1=1.25,0.0
PSR2=0.4,0.125
PSR3=0.4,-0.125
PSR4=0.4,0.25
PSR5=0.4,-0.25
UsePerBulletSpread=false
PBS0=0.0,0.0
[Sprint Ability Profile]
Name=Run
MaxCharges=1.0
ChargeTimer=0.001
ChargesRefundedOnKill=0.0
DelayAfterUse=0.5
FullyAuto=false
AbilityDuration=0.0
BlockAttackWhileSprinting=false
AbilityBlockedWhenAttacking=true
SpeedModifier=1.5
45DegreeSprint=true
90DegreeSprint=true
135DegreeSprint=true
180DegreeSprint=true
TapToSprint=false
Block45DegreesWhenSprinting=false
AIUseInCombat=true
AIUseOutOfCombat=false
AIUseOnGround=true
AIUseInAir=true
AIReuseTimer=1.0
AIMinSelfHealth=0.0
AIMaxSelfHealth=100.0
AIMinTargHealth=0.0
AIMaxTargHealth=100.0
AIMinTargDist=0.0
AIMaxTargDist=2000.0
AIMaxTargFOV=15.0
AIDamageReaction=true
AIDamageReactionIgnoreChance=0.0
AIDamageReactionMinDelay=0.125
AIDamageReactionMaxDelay=0.25
AIDamageReactionCooldown=1.0
AIDamageReactionThreshold=0.0
AIDamageReactionResetTimer=0.1
[Map Data]
reflex map version 8
global
entity
type WorldSpawn
String32 targetGameOverCamera end
UInt8 playersMin 1
UInt8 playersMax 16
brush
vertices
-576.000000 0.000000 256.000000
448.000000 0.000000 256.000000
448.000000 0.000000 -768.000000
-576.000000 0.000000 -768.000000
-576.000000 -16.000000 256.000000
448.000000 -16.000000 256.000000
448.000000 -16.000000 -768.000000
-576.000000 -16.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
-576.000000 272.000000 -768.000000
448.000000 272.000000 -768.000000
448.000000 272.000000 -784.000000
-576.000000 272.000000 -784.000000
-576.000000 0.000000 -768.000000
448.000000 0.000000 -768.000000
448.000000 0.000000 -784.000000
-576.000000 0.000000 -784.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
-576.000000 272.000000 272.000000
448.000000 272.000000 272.000000
448.000000 272.000000 256.000000
-576.000000 272.000000 256.000000
-576.000000 0.000000 272.000000
448.000000 0.000000 272.000000
448.000000 0.000000 256.000000
-576.000000 0.000000 256.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
448.000000 272.000000 256.000000
464.000000 272.000000 256.000000
464.000000 272.000000 -768.000000
448.000000 272.000000 -768.000000
448.000000 0.000000 256.000000
464.000000 0.000000 256.000000
464.000000 0.000000 -768.000000
448.000000 0.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
-592.000000 272.000000 256.000000
-576.000000 272.000000 256.000000
-576.000000 272.000000 -768.000000
-592.000000 272.000000 -768.000000
-592.000000 0.000000 256.000000
-576.000000 0.000000 256.000000
-576.000000 0.000000 -768.000000
-592.000000 0.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000
brush
vertices
-592.000000 704.000000 256.000000
-576.000000 704.000000 256.000000
-576.000000 704.000000 -768.000000
-592.000000 704.000000 -768.000000
-592.000000 272.000000 256.000000
-576.000000 272.000000 256.000000
-576.000000 272.000000 -768.000000
-592.000000 272.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
448.000000 704.000000 256.000000
464.000000 704.000000 256.000000
464.000000 704.000000 -768.000000
448.000000 704.000000 -768.000000
448.000000 272.000000 256.000000
464.000000 272.000000 256.000000
464.000000 272.000000 -768.000000
448.000000 272.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-576.000000 704.000000 -768.000000
448.000000 704.000000 -768.000000
448.000000 704.000000 -784.000000
-576.000000 704.000000 -784.000000
-576.000000 272.000000 -768.000000
448.000000 272.000000 -768.000000
448.000000 272.000000 -784.000000
-576.000000 272.000000 -784.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-576.000000 704.000000 272.000000
448.000000 704.000000 272.000000
448.000000 704.000000 256.000000
-576.000000 704.000000 256.000000
-576.000000 272.000000 272.000000
448.000000 272.000000 272.000000
448.000000 272.000000 256.000000
-576.000000 272.000000 256.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-576.000000 720.000000 256.000000
448.000000 720.000000 256.000000
448.000000 720.000000 -768.000000
-576.000000 720.000000 -768.000000
-576.000000 704.000000 256.000000
448.000000 704.000000 256.000000
448.000000 704.000000 -768.000000
-576.000000 704.000000 -768.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 internal/editor/textures/editor_clip
brush
vertices
-128.000000 16.000000 -320.000000
0.000000 16.000000 -320.000000
0.000000 16.000000 -336.000000
-128.000000 16.000000 -336.000000
-128.000000 0.000000 -320.000000
0.000000 0.000000 -320.000000
0.000000 0.000000 -336.000000
-128.000000 0.000000 -336.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
0.000000 16.000000 -192.000000
16.000000 16.000000 -192.000000
16.000000 16.000000 -320.000000
0.000000 16.000000 -320.000000
0.000000 0.000000 -192.000000
16.000000 0.000000 -192.000000
16.000000 0.000000 -320.000000
0.000000 0.000000 -320.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
-144.000000 16.000000 -192.000000
-128.000000 16.000000 -192.000000
-128.000000 16.000000 -320.000000
-144.000000 16.000000 -320.000000
-144.000000 0.000000 -192.000000
-128.000000 0.000000 -192.000000
-128.000000 0.000000 -320.000000
-144.000000 0.000000 -320.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 16.000000 -176.000000
0.000000 16.000000 -176.000000
0.000000 16.000000 -192.000000
-128.000000 16.000000 -192.000000
-128.000000 0.000000 -176.000000
0.000000 0.000000 -176.000000
0.000000 0.000000 -192.000000
-128.000000 0.000000 -192.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
0.000000 16.000000 -176.000000
0.000000 0.000000 -192.000000
16.000000 16.000000 -192.000000
0.000000 0.000000 -176.000000
16.000000 0.000000 -192.000000
0.000000 16.000000 -192.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 3 1 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 3 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 3 0 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 1 5 0x00000000
brush
vertices
-128.000000 0.000000 -176.000000
-128.000000 16.000000 -176.000000
-128.000000 16.000000 -192.000000
-144.000000 0.000000 -192.000000
-128.000000 0.000000 -192.000000
-144.000000 16.000000 -192.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 2 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 0 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 3 5 0x00000000
brush
vertices
-144.000000 16.000000 -320.000000
-128.000000 16.000000 -320.000000
-128.000000 16.000000 -336.000000
-144.000000 0.000000 -320.000000
-128.000000 0.000000 -336.000000
-128.000000 0.000000 -320.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 3 0 2 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 3 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 4 2 1 5 0x00000000
brush
vertices
0.000000 16.000000 -320.000000
16.000000 16.000000 -320.000000
0.000000 0.000000 -336.000000
0.000000 0.000000 -320.000000
16.000000 0.000000 -320.000000
0.000000 16.000000 -336.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 3 4 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 2 3 0 5 0x00000000
0.000000 0.000000 1.000000 1.000000 0.000000 1 4 2 5 0x00000000
brush
vertices
0.000000 704.000000 -192.000000
16.000000 704.000000 -192.000000
16.000000 704.000000 -320.000000
0.000000 704.000000 -320.000000
0.000000 16.000000 -192.000000
16.000000 16.000000 -192.000000
16.000000 16.000000 -320.000000
0.000000 16.000000 -320.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-144.000000 704.000000 -192.000000
-128.000000 704.000000 -192.000000
-128.000000 704.000000 -320.000000
-144.000000 704.000000 -320.000000
-144.000000 16.000000 -192.000000
-128.000000 16.000000 -192.000000
-128.000000 16.000000 -320.000000
-144.000000 16.000000 -320.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-128.000000 704.000000 -320.000000
0.000000 704.000000 -320.000000
0.000000 704.000000 -336.000000
-128.000000 704.000000 -336.000000
-128.000000 16.000000 -320.000000
0.000000 16.000000 -320.000000
0.000000 16.000000 -336.000000
-128.000000 16.000000 -336.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-128.000000 704.000000 -176.000000
0.000000 704.000000 -176.000000
0.000000 704.000000 -192.000000
-128.000000 704.000000 -192.000000
-128.000000 16.000000 -176.000000
0.000000 16.000000 -176.000000
0.000000 16.000000 -192.000000
-128.000000 16.000000 -192.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
0.000000 704.000000 -176.000000
0.000000 16.000000 -192.000000
16.000000 704.000000 -192.000000
0.000000 16.000000 -176.000000
16.000000 16.000000 -192.000000
0.000000 704.000000 -192.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 3 1 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 2 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 0 3 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 3 0 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 1 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-128.000000 16.000000 -176.000000
-128.000000 704.000000 -176.000000
-128.000000 704.000000 -192.000000
-144.000000 16.000000 -192.000000
-128.000000 16.000000 -192.000000
-144.000000 704.000000 -192.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 3 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 2 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 1 0 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 0 1 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 4 3 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
-144.000000 704.000000 -320.000000
-128.000000 704.000000 -320.000000
-128.000000 704.000000 -336.000000
-144.000000 16.000000 -320.000000
-128.000000 16.000000 -336.000000
-128.000000 16.000000 -320.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 4 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 3 0 2 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 3 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 4 2 1 5 0xff8f7d6a internal/editor/textures/editor_clip
brush
vertices
0.000000 704.000000 -320.000000
16.000000 704.000000 -320.000000
0.000000 16.000000 -336.000000
0.000000 16.000000 -320.000000
16.000000 16.000000 -320.000000
0.000000 704.000000 -336.000000
faces
0.000000 0.000000 1.000000 1.000000 0.000000 3 2 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 0 1 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 0 3 4 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 2 3 0 5 0xff8f7d6a internal/editor/textures/editor_clip
0.000000 0.000000 1.000000 1.000000 0.000000 1 4 2 5 0xff8f7d6a internal/editor/textures/editor_clip
entity
type PlayerSpawn
Vector3 position -64.000000 0.000000 -736.000000
Bool8 teamA 0
entity
type CameraPath
UInt32 entityIdAttachedTo 5
UInt8 posLerp 2
UInt8 angleLerp 2
entity
type Effect
Vector3 position 0.000000 256.000000 0.000000
String64 effectName internal/misc/reflectionprobe
entity
type Target
Vector3 position 352.000000 256.000000 224.000000
Vector3 angles -135.000000 30.000000 0.000000
String32 name end
entity
type PlayerSpawn
Vector3 position -64.000000 0.000000 224.000000
Vector3 angles 180.000000 0.000000 0.000000
Bool8 teamA 0
entity
type PlayerSpawn
Vector3 position 416.000000 0.000000 -256.000000
Vector3 angles 270.000000 0.000000 0.000000
Bool8 teamA 0
entity
type PlayerSpawn
Vector3 position -544.000000 0.000000 -256.000000
Vector3 angles 90.000000 0.000000 0.000000
Bool8 teamA 0
entity
type PlayerSpawn
Vector3 position -64.000000 0.000000 -256.000000
Vector3 angles 90.000000 0.000000 0.000000
Bool8 teamB 0
|
5d0c1f9abb3cf0b7bcb219ecf5861040974016e4 | 429a254e86091b867fca50a9cc277b3f9cba13e8 | /testit/02-tyontojaliike.tst | e2f1c67f8ef9a3d05b355305c991956f48929218 | [] | no_license | Mirbanator/labyrinth_game | 125d51230c1591515bc751fa93686102328827e1 | a2bb4f7ecc6618e8e226d7588391ff2f0941fc36 | refs/heads/master | 2020-03-26T16:50:54.578498 | 2018-08-17T13:58:15 | 2018-08-17T13:58:15 | 145,127,453 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 52 | tst | 02-tyontojaliike.tst | SIEMENLUKU 26500
PELAAJIA 2
IHMINEN Foo
IHMINEN Bar
|
3f5aaa705c71447df6f752e6585bb82f003fcfc3 | 3cbee2296fd6b54f80587eead83813d4c878e06a | /sci2blif/sci2blif_added_blocks/tgate.sce | ba3a488b468cb03b48c757a9be2fca2e9995377b | [] | no_license | nikhil-soraba/rasp30 | 872afa4ad0820b8ca3ea4f232c4168193acbd854 | 936c6438de595f9ac30d5619a887419c5bae2b0f | refs/heads/master | 2021-01-12T15:19:09.899590 | 2016-10-31T03:23:48 | 2016-10-31T03:23:48 | 71,756,442 | 0 | 0 | null | 2016-10-24T05:58:57 | 2016-10-24T05:58:56 | null | UTF-8 | Scilab | false | false | 679 | sce | tgate.sce | //**************************** TGATE ***********************************
if (blk_name.entries(bl) =='tgate') then
mputl("#TGATE "+string(bl),fd_w);
for ss=1:scs_m.objs(bl).model.ipar(1)
mputl(".subckt tgate in[0]=net"+string(blk(blk_objs(bl),2))+"_" + string(ss)+" in[1]=net" + string(blk(blk_objs(bl),3))+"_" + string(ss)+" out=net"+ string(blk(blk_objs(bl),2+numofip))+"_" + string(ss),fd_w);
mputl(" ",fd_w);
end
if scs_m.objs(bl).model.rpar(1) == 1 then
plcvpr = %t;
plcloc=[plcloc;'net'+string(blk(blk_objs(bl),2+numofip))+'_1',string(scs_m.objs(bl).model.rpar(2))+' '+string(scs_m.objs(bl).model.rpar(3))+' 0'];
end
end
|
04136d35fad23a303c8aa9b148bef21971b0ac2c | 1db0a7f58e484c067efa384b541cecee64d190ab | /macros/pmusic.sci | 0891bb9812d8f51953d5e63f01d01f27c3b5bef3 | [] | no_license | sonusharma55/Signal-Toolbox | 3eff678d177633ee8aadca7fb9782b8bd7c2f1ce | 89bfeffefc89137fe3c266d3a3e746a749bbc1e9 | refs/heads/master | 2020-03-22T21:37:22.593805 | 2018-07-12T12:35:54 | 2018-07-12T12:35:54 | 140,701,211 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 8,051 | sci | pmusic.sci | // Date of creation: 18 Dec, 2015
function varargout = pmusic(varargin)
// Psuedospectrum using MUSIC algorithm
//
// Note: does not implement the plotting functionality as in matlab
// Calling Sequence
// [S,w] = pmusic(x,p)
// [S,w] = pmusic(x,p,w)
// [S,w] = pmusic(x,p,nfft)
// [S,w] = pmusic(x,p,nfft,fs)
// [S,w] = pmusic(x,p,f,fs)
// [S,f] = pmusic(...,'corr')
// [S,f] = pmusic(x,p,nfft,fs,nwin,noverlap)
// [...] = pmusic(...,freqrange)
// [...,v,e] = pmusic(...)
//
// Parameters:
// x - int|double - vector|matrix
// Input signal. In case of a matrix, each row of x represents a
// seperate observation of the signal. If 'corr' flag is specified,
// then x is the correlation matrix.
// If w is not specified in the input, it is determined by the
// algorithm. If x is real valued, then range of w is [0, pi].
// Otherwise, the range of w is [0, 2pi)
// p - int|double - scalar|vector
// p(1) is the dimension of the signal subspace
// p(2), if specified, represents a threshold that is multiplied by
// the smallest estimated eigenvalue of the signal's correlation matrix.
// w - int|double - vector
// w is the vector of normalized frequencies over which the
// pseuspectrogram is to be computed.
// nfft - int - scalar (Default = 256)
// Length of the fft used to compute pseudospectrum. The length of S
// (and hence w/f) depends on the type of values in x and nfft.
// If x is real, length of s is (nfft/2 + 1) {Range of w = [0, pi]} if
// nfft is even and (nfft+1)/2 {Range of w = [0, pi)} otherwise.
// If x is complex, length of s is nfft.
// fs - int|double - scalar (Default = 1)
// Sampling rate. Used to convert the normalized frequencies (w) to
// actual values (f) and vice-versa.
// nwin - int|double - scalar (int only)|vector (Default = 2*p(1))
// If nwin is scalar, it is the length of the rectangular window.
// Otherwise, the vector input is considered as the window coefficients.
// Not used if 'corr' flag present.
// If x is a vector, windowing not done in nwin in scalar. If x is a
// matrix,
// noverlap - int - scalar (Default = nwin-1)
// number of points by which successive windows overlap. noverlap not
// used if x is a matrix
// freqrange - string
// The range of frequencies over which the pseudospetrogram is
// computed. Three possible values - 'onesided', 'twosided', 'centered'
// 'corr' flag
// Presence indicates that the primary input x is actually a
// correlation matrix
//
// Examples:
// TODO:
//
// See also
// pburg | peig | periodogram | pmtm | prony | pwelch | rooteig | rootmusic
//
// Authors
// Ayush Baid
//
// References
// [1] Petre Stoica and Randolph Moses, Introduction To Spectral
// Analysis, Prentice-Hall, 1997, pg. 15
// [2] S. J. Orfanidis, Optimum Signal Processing. An Introduction.
// 2nd Ed., Macmillan, 1988.
funcprot(0);
exec('subspaceMethodsInputParser.sci',-1);
exec('musicBase.sci',-1);
[numOutArgs,numInArgs] = argn(0);
// check number of output arguments
if numOutArgs~=2 & numOutArgs~=4 then
msg = "pmusic: Wrong number of output argument; 2 or 4 expected";
error(78,msg);
end
// ("**start**");
[data, msg, err_num] = subspaceMethodsInputParser(varargin);
if length(msg)==0 then
// no error occured
else
error(err_num, "pmusic: " + msg);
end
//disp(data);
[musicData,msg] = musicBase(data);
//disp(musicData);
//disp(musicData.noiseEigenvects);
//disp(musicData.signalEigenvects);
if length(msg)~=0 then
error(msg);
end
// computing the pseudospectrum
[S,f] = pseudospectrum(musicData.noiseEigenvects, ...
musicData.eigenvals,data.w,data.nfft, data.fs, data.freqrange,data.isFsSpecified);
v = musicData.noiseEigenvects;
e = musicData.eigenvals;
varargout = list(S,f,v,e);
// plot if requested
if numOutArgs==0 then
pow = 10*log10(S);
figure()
plot(f,pow);
if data.isFsSpecified then
xlabel('Frequency (Hz)');
else
xlabel('Normalized Frequency (*pi rad/sample)');
end
ylabel('Power (dB)');
title('Pseudospectrum Estimate via MUSIC');
end
endfunction
function [pspec,w] = pseudospectrum(noiseEigenvects, eigenvals, freqvector, ...
nfft, fs, freqrange,isFsSpecified)
// disp("noise eigenvects in pseudospectrum - ");
// disp(noiseEigenvects);
weights = ones(1,size(noiseEigenvects,2));
denominator = 0;
isFreqGiven = %F;
for i=1:size(noiseEigenvects,2);
// disp("looping in pseudospectrum");
if isempty(freqvector) then
[h,w] = computeFreqResponseByFFT(noiseEigenvects(:,i),nfft,fs,...
isFsSpecified);
else
[h,w] = computeFreqResponseByPolyEval(noiseEigenvects(:,i),...
freqvector,fs,isFsSpecified);
isFreqGiven = %T;
end
denominator = denominator + (abs(h).^2)./weights(i);
// disp(h(1:10));
end
// disp(denominator(1:5));
// computing pseudospectrum pspec
pspec = 1.0 ./ denominator;
// converting to column vector
pspec = pspec(:);
if ~isFreqGiven then
// correcting the range of pspec according to the user specification
if strcmpi(freqrange, 'onesided')==0 then
if modulo(nfft,2) then
// nfft is odd
range = 1:(1+nfft)/2;
else
range = 1:((nfft/2)+1);
end
pspec = pspec(range);
w = w(range);
elseif strcmpi(freqrange,'centered')==0 then
// convert two sided spectrum to centered
rem = modulo(nfft,2);
if rem then
idx = [(nfft+1)/2+1:nfft 1:(nfft+1)/2];
else
idx = [nfft/2+2:nfft 1:nfft/2+1];
end
pspec = pspec(idx);
w = w(range);
if rem then
w(1:(nfft-1)/2) = w(1:(nfft-1)/2) - fs;
else
w(1:nfft/2-1) = w(1:nfft/2-1) - fs;
end
end
end
endfunction
function [h,w] = computeFreqResponseByFFT(b,n,fs,isFsSpecified)
// returns the frequency response (h) and the corresponding frequency
// values (w) for a digital filter with numerator b. The evaluation of the
// frequency response is done at n points in [0,fs) using fft algorithm
//
// Similar to MATLAB's freqz(b,a,n,'whole',fs)
if isempty(fs) then
fs=1;
end
w = linspace(0,2*%pi,n+1)';
w($) = [];
w(1) = 0; // forcing the first frequency to be 0
// forcing b and a to be column vectors
b = b(:);
// zero padding for fft
zeroPadLength = n - length(b);
zeroPad = zeros(zeroPadLength,1);
b = [b; zeroPad];
h = fft(b);
if isFsSpecified then
w = w*fs/(2*%pi);
end
endfunction
function [h,w] = computeFreqResponseByPolyEval(b,f,fs,isFsSpecified)
// returns the frequency response (h) for a digital filter with numerator b.
// The evaluation of the frequency response is done at frequency values f
// disp(f);
// disp(isFsSpecified);
f = f(:);
b = b(:);
n = length(b);
powerMatrix = zeros(length(f),n);
powerMatrix(:,1) = 1;
for i=2:n
powerMatrix(:,i) = exp(f*(-i+1)*%i);
end
h = powerMatrix*b;
if isFsSpecified then
w = f * fs/(2*%pi);
end
endfunction
|
85393ca87761ac2d2c537056914f689f55e3b331 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1913/CH1/EX1.30/ex30.sce | 5b0e81bf48e6b18d2e469ac176f9ccd5c8a6ef47 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 342 | sce | ex30.sce | clc
clear
//Input data
C1=40;//Temperature 1 in degree centigrade
C2=-20;//Temperature 2 in degree centigrade
//calculations
F1=((C1/100)*180)+32;//Temperature 1 in Fahrenheit
F2=((C2/100)*180)+32;//Temperature 2 in Fahrenheit
//Output
printf('(a)Temperature 40 degree C =%3.0f F \n (b)Temperature -20 degree C=%3.0f F',F1,F2)
|
80dbd744f2b684f22db0542459202112ad291a65 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1943/CH9/EX9.4/Ex9_4.sce | a3f5378c28e970cf20abeb1c6f25004a0e367787 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex9_4.sce |
clc
clear
//Input data
sa1=10;//Cross section of nucleus in barns
N=2200;//Neutrons in m/s
En1=0.1;//Kinetic energy of neutrons increases in eV
En2=0.02525;//Kinetic energy of neutron in eV
//Calculations
sa2=sa1/[(En1/En2)^0.5];//The cross section of neutrons in barns
//Output
printf('The cross section of neutrons = %3.2f barns ',sa2)
|
4ede80612cc74dbfdca4b4c1dbee302eaf9f5ce6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /770/CH6/EX6.1/6_1.sce | 25e0e523fb16e717786008bc8cf80882ea9249ba | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,626 | sce | 6_1.sce | clear;
clc;
//Example - 6.1
//Page number - 217
printf("Example - 6.1 and Page number - 217\n\n");
//Given
T_1 = 298.15;//[K] - Standard temperature
T_2 = 880;//[K] - Reaction temperature
a_SO2 = 6.157;
a_SO3 = 3.918;
a_O2 = 6.732;
b_SO2 = 1.384*10^(-2);
b_SO3 = 3.483*10^(-2);
b_O2 = 0.1505*10^(-2);
c_SO2 = -0.9103*10^(-5);
c_SO3 = -2.675*10^(-5);
c_O2 = -0.01791*10^(-5);
d_SO2 = 2.057*10^(-9);
d_SO3 = 7.744*10^(-9);
delta_H_rkn_298 = -23.45*10^(3);//[cal] - Rkn enthalpy at 298.15 K
delta_H_SO2_for_298 = -70.94*10^(3);//[cal/mol] - Enthalpy of formation of S02 at 298.15 K
delta_H_SO3_for_298 = -94.39*10^(3);//[cal/mol] - Enthalpy of formation of SO3 at 298.15 K
delta_G_SO2_for_298 = -71.68*10^(3);//[cal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K
delta_G_SO3_for_298 = -88.59*10^(3);//[cal/mol] - Gibbs free energy change for formation of SO3 at 298.15 K
//(1)
//Standard enthalpy change of reaction at temperature T is given by,
//delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T
delta_a = a_SO3 - a_SO2 - (a_O2/2);
delta_b = b_SO3 - b_SO2 - (b_O2/2);
delta_c = c_SO3 - c_SO2 - (c_O2/2);
delta_d = d_SO3 - d_SO2;
//Cp_0 = delta_a + (delta_b*T) + (delta_c*T^(2)) + (delta_d*T^(3));
//Therefore we get,
delta_H_rkn_880 = delta_H_rkn_298 + integrate('delta_a+(delta_b*T)+(delta_c*T^(2))+(delta_d*T^(3))','T',T_1,T_2);
//On manual simplification of the above expression,we will get the expression for 'delta_H_rkn_880' as a function of T,
printf(" (1).The expression for standard enthalpy change of reaction as a function of temperature is given by\n");
printf(" delta_H_rkn_880 = -22534.57 - 5.605*T + 1.012*10^(-2)*T^(2) - 0.585*10^(-5)*T^(3) + 1.422*10^(-9)*T^(4)\n\n")
printf(" (2).Standard enthalpy change of reaction at 880 K is %f cal\n\n",delta_H_rkn_880);
//(3)
//Let us determine the standard entropy change of reaction at 298.15 K
delta_S_SO2_298 = (delta_H_SO2_for_298 - delta_G_SO2_for_298)/298.15;//[cal/mol-K]
delta_S_SO3_298 = (delta_H_SO3_for_298 - delta_G_SO3_for_298)/298.15;//[cal/mol-K]
delta_S_O2_298 = 0;//[cal/mol-K]
delta_S_rkn_298 = delta_S_SO3_298 - delta_S_SO2_298 - (delta_S_O2_298/2);//[cal/K]
delta_S_rkn_880 = delta_S_rkn_298 + integrate('(delta_a+delta_b*T+delta_c*T^(2)+delta_d*T^(3))/T','T',T_1,T_2);//[cal/K]
printf(" (3).Standard entropy change of reaction at 880 K is %f cal/K\n\n",delta_S_rkn_880);
//(4)
delta_G_rkn_880 = delta_H_rkn_880 - 880*delta_S_rkn_880;//[cal]
printf(" (4).Standard Gibbs free energy change of reaction at 880 K is %f cal\n\n",delta_G_rkn_880);
|
4c915d60c82a6fc96232b7cc4075ee191819ffc3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3773/CH7/EX7.1/Ex7_1.sce | a125a537e0f01f55220026eb8ff79f27195ee2bb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 885 | sce | Ex7_1.sce | //Chapter 7: Loop, Slot and Horn Antennas
//Example 7-8.1
clc;
//Variable Initialization
C_lambda = 0.1*%pi //Circumference (lambda)
R_m = 1.6 //Mutual resistance of two loops (ohm)
theta1 = 90*%pi/180 //Angle of radiation (radians)
theta2 = 2*%pi/10 //Angle of radiation (radians)
//Calculation
Rr = 197*(C_lambda)**4 //Self resistance of loop (ohm)
D1 = (1.5)*(sin(theta1))**2 //Directivity of loop alone (unitless)
D1_db = 10*log10(D1) //Directivity of loop alone (dBi)
D2 = 1.5*(2*sqrt(Rr/(Rr-R_m))*sin(theta2))**2 //Directivity of loop with ground plane (unitless)
D2_db = 10*log10(D2) //Directivity of loop with ground plane (dBi)
//Result
mprintf("The directivity of loop alone is %.2f or %.2f dBi",D1,D1_db)
mprintf("\nThe directivity of loop with ground plane is %.2f or %.0f dBi",D2,D2_db)
|
b7cfcf14d5c0b0283c7324aa3574388bbc0e64d1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1055/CH6/EX6.3/ch6_3.sce | d27c4b9efc39a8a61a4a441bb2cb76f1d3ff8630 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 255 | sce | ch6_3.sce | // To determine the critical disruptive voltage and corona loss
clear
clc;
m=1.07;
r=.625
V=21*m *r*log(305/.625);
Vl=V*sqrt(3);
mprintf("critical disruptive voltage=%.0f kV\n",V);
mprintf("since operating voltage is 110 kV , corona loss= 0 ");
|
967e129a6d2c207f7db2d1618fd58c07e1a29315 | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH13/EX13.13/13.sce | f941e0f20dd5959dbfcb80ba64d1d1f4a7fd0696 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,029 | sce | 13.sce | clc
V1=0.45; //m^3
p1=1; //bar
T1=303; //K
p2=11; //bar
Qs=210; //kJ
n=210; //number of working cycles/min
R=287; //J/kg K
cv=0.71; //kJ/kg K
y=1.4;
disp("(i) Pressures, temperatures and volumes at salient points")
r=(p2/p1)^(1/y);
T2=T1*(r)^(y-1);
disp("T2=")
disp(T2)
disp("K")
V2=T2/T1*p1/p2*V1;
disp("V2=")
disp(V2)
disp("m^3")
m=p1*10^5*V1/R/T1;
T3=Qs/m/cv+T2;
disp("T3=")
disp(T3)
disp("K")
p3=T3/T2*p2;
disp("p3=")
disp(p3)
disp("bar")
V3=V2;
disp("V3=")
disp(V3)
disp("m^3")
p4=p3/r^y;
disp("p4=")
disp(p4)
disp("bar")
T4=T3/r^(y-1);
disp("T4=")
disp(T4)
disp("K")
V4=V1;
disp("V4=")
disp(V4)
disp("m^3")
disp("(ii) Percentage clearance =")
%clearance=V2/(V1-V2)*100;
disp(%clearance)
disp("%")
disp("(iii) Efficiency =")
Qr=m*cv*(T4-T1);
n_otto=(Qs-Qr)/Qs;
disp(n_otto)
disp("(iv) Mean effective pressure =")
p_m=(Qs-Qr)/(V1-V2)/100; //bar
disp(p_m)
disp("bar")
disp("(v) Power developed =")
P=(Qs-Qr)*n/60;
disp(P)
disp("kW") |
fd441f8b8ac11bb01d304e83d3a74617a2acc3b0 | e9d5f5cf984c905c31f197577d633705e835780a | /data_reconciliation/error_in_variables/scilab/ev_bt93/flowsheet_residuals.sci | 8d91ec5fa00f0f477327d4aa968a23f26b76cb5a | [] | no_license | faiz-hub/dr-ged-benchmarks | 1ad57a69ed90fe7595c006efdc262d703e22d6c0 | 98b250db9e9f09d42b3413551ce7a346dd99400c | refs/heads/master | 2021-05-18T23:12:18.631904 | 2020-03-30T21:12:16 | 2020-03-30T21:12:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,024 | sci | flowsheet_residuals.sci | function y = flowsheet_residuals(x)
//*********************************************************************
// Data Reconciliation Benchmark Problems From Literature Review
// Author: Edson Cordeiro do Valle
// Contact - edsoncv@{gmail.com}{vrtech.com.br}
// Skype: edson.cv
//*********************************************************************
// this function is prepared to use the automatic derivatives toolbox of
// Scilab. This toolbox can be instaled using the ATOMS installer (package name: diffcode).
// This function evaluates the residuals of the flowsheet of the problem proposed by Swartz, 1989
//
// Outputs:
// y,: the contraints residuals. The number of constraints depends on the number of the
// data sets choosen (see 'bt93.sec' file)
// Inputs:
// x: the column vector of the variables: x - it is reorganized inside this function
// The resulting system is according to the papper from Biegler and Tjoa (1993):
xdata = matrix(x(1:$-4),21, ndata);
//pause
FA6=xdata(1,:);
TA2=xdata(2,:);
TA4=xdata(3,:);
TA5=xdata(4,:);
TA7=xdata(5,:);
TA8=xdata(6,:);
TD1=xdata(7,:);
TC1=xdata(8,:);
TB1=xdata(9,:);
TB2=xdata(10,:);
FA1=xdata(11,:);
FA3=xdata(12,:);
FC1=xdata(13,:);
FD1=xdata(14,:);
FB1=xdata(15,:);
TA1=xdata(16,:);
TB3=xdata(17,:);
TC2=xdata(18,:);
TD2=xdata(19,:);
TA3=xdata(20,:);
TA6=xdata(21,:);
UAint = x($-3:$);
dt1_1 = (TB2 - TA2);
dt1_2 = (TB3 - TA1);
dt2_1 = (TB1 - TA4);
dt2_2 = (TB2 - TA3);
dt3_1 = (TC1 - TA5);
dt3_2 = (TC2 - TA4);
dt4_1 = (TD1 - TA7);
dt4_2 = (TD2 - TA6);
//mldt1 =(dt1_1.*dt1_2.*((dt1_1+dt1_2)/2)).^(1/3);
//mldt2 =(dt2_1.*dt2_2.*((dt2_1+dt2_2)/2)).^(1/3);
//mldt3 =(dt3_1.*dt3_2.*((dt3_1+dt3_2)/2)).^(1/3);
//mldt4 =(dt4_1.*dt4_2.*((dt4_1+dt4_2)/2)).^(1/3);
//
mldt1 = ((TB2 - TA2) - (TB3 - TA1))./log((TB2 - TA2)./(TB3 - TA1));
mldt2 = ((TB1 - TA4) - (TB2 - TA3))./log((TB1 - TA4)./(TB2 - TA3));
mldt3 = ((TC1 - TA5) - (TC2 - TA4))./log((TC1 - TA5)./(TC2 - TA4));
mldt4 = ((TD1 - TA7) - (TD2 - TA6))./log((TD1 - TA7)./(TD2 - TA6));
//pause
// mass balance
//y = zeros (1:14*ndata);
y(1:ndata) = FA1 - FA3 - FA6;
// energy balance
y(ndata+1: 2*ndata) = FA1.*(TA2 - TA1) - FB1.*(TB2 - TB3) ;
y(2*ndata+1: 3*ndata) = FA3.*(TA4 - TA3) - FB1.*(TB1 - TB2);
y(3*ndata+1: 4*ndata) = FA3.*(TA5 - TA4) - FC1.*(TC1 - TC2) ;
y(4*ndata+1: 5*ndata) = FA6.*(TA7 - TA6) - FD1.*(TD1 - TD2);
y(5*ndata+1: 6*ndata) = FA1.*TA8 - FA3.*TA5 - FA6.*TA7;
// equations related with parameters
y(6*ndata+1: 7*ndata) = UAint(1).*mldt1 - FB1.*(TB2 - TB3);
y(7*ndata+1: 8*ndata) = UAint(2).*mldt2 - FB1.*(TB1 - TB2);
y(8*ndata+1: 9*ndata) = UAint(3).*mldt3 - FC1.*(TC1 - TC2);
y(9*ndata+1: 10*ndata) =UAint(4).*mldt4 - FD1.*(TD1 - TD2);
//equations relating unmeasured streams
//inequality constraints
y(10*ndata+1: 11*ndata) = TB2 - TA2;
y(11*ndata+1: 12*ndata) = TB1 - TA4;
y(12*ndata+1: 13*ndata) = TC1 - TA5;
y(13*ndata+1: 14*ndata) = TD1 - TA7;
//y(14*ndata+1: 15*ndata) = TD2 - TA6;
//y(15*ndata+1: 16*ndata) = TB2 - TA3;
y=y';
//pause
endfunction
|
7aefd0dbe0131dc054c69174bd5dac6f91a223ff | 449d555969bfd7befe906877abab098c6e63a0e8 | /62/CH7/EX7.26/ex_7_26.sce | fc955eeff0634e74bdd54f49be47ddd972ecceea | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 148 | sce | ex_7_26.sce | clear;
clc;
close;
A=[2 1;0 2];
D=[2 0; 0 2];
N=[0 1;0 0];
disp(N^2,"N*N=");
p=D*N;
q=N*D;
if (p==q) then
disp("D and N commute")
end |
736ed424f4a8c1e635af8ed72c302a9f2c287039 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3651/CH2/EX2.7/Ex2_7.sce | 0b3fc789a2f0dc4ebd153eaa0ded637b68c1a965 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 302 | sce | Ex2_7.sce | clc
//Variable declaration
n=1
lamda=1.54
theta=32*%pi/180
h=2
k=2
l=0
//Calculations
d=(n*lamda*10**-10)/(2*sin(theta)) //derived from 2dsin(theta)=n*l
a=d*(sqrt(h**2+k**2+l**2))
//Results
printf('d =%0.3f *10**-10 m\n',(d*10**10))
printf('a =%0.3f *10**-10 m\n',(a*10**10))
|
b8944010bb039a8b5e5ba5e152e222bcc100c8b1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3131/CH11/EX11.2/11_2.sce | b3ceb3007ce1c27a6f472cc415bfefd20f2a7e7e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 219 | sce | 11_2.sce | clear all; clc;
disp("Ex 11_2")
//From virtual displacements
//From virtual - work equation
//We have an quation like:
//1=2.4*sin(2*theta)-1.6*cos(theta)
//Solving by trial and error gives
disp("Theta = 36.3 degrees")
|
b15179abd8b557f51b3791274b7f416a7d59d186 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1466/CH15/EX15.1/15_1.sce | 91021a399cc2beb121e4be806283f5b0eb21c7d4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 474 | sce | 15_1.sce |
clc
//initialisation of variables
kl=0.2
kd=0.05
A=4//ft^2
g=32.2//ft/sec^2
wa=0.081//lb
ww=62.4//lb
v=20//ft/sec
//CALCULATIONS
La=kl*A*wa*v*v/g
Da=kd*A*wa*v*v/g
Lw=kl*A*ww*v*v/g
Dw=kd*A*ww*v*v/g
//RESULTS
printf ('\n force on the plate for fluid air= %.3f lb',La)
printf ('\n resistance of the plate for fluid air= %.3f lb',Da)
printf ('\n force on the plate for fluid water= %.f lb',Lw)
printf ('\n resistance of the plate for fluid air= %.f lb',Dw)
|
80dc240ede3e2f5d876186dd8fdd6d3d0e2aca42 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3392/CH17/EX17.2/Ex17_2.sce | 1a823c2d8134bfa5204bbd1bfd7d61f26fd3fb80 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,128 | sce | Ex17_2.sce | clc
// initialization of variables
clear
E=200 //GPa
v=0.29
Y=1600 //MPa
Po=4.2 //kN
Omega=3000 //rpm
th=%pi/3
P=1.75 //kN
R1=4.76 //mm
R11=R1
R2=-4.86 //mm
R22=18.24 //mm
//part (a)
E=E*10^3
Po=Po*10^3
P=P*10^3
B=1/4*(1/R1+1/R2+1/R11+1/R22)+1/4*((1/R1+1/R2-1/R11-1/R22)^2 - 4*(1/R1-1/R11)*(1/R2-1/R22)*(sin(th)^2))^(1/2)
A=1/4*(1/R1+1/R2+1/R11+1/R22)-1/4*((1/R1+1/R2-1/R11-1/R22)^2 - 4*(1/R1-1/R11)*(1/R2-1/R22)*(sin(th)^2))^(1/2)
Del=2*(1-v^2)/(E*(A+B))
BAr=B/A
Cb=0.32
k=0.075
Cs=1.00
Ct=0.3
Cg=0.27
Cz=0.78
b=Cb*(P*Del)^(1/3)
a=b/k
br=b/Del
S_max=-Cs*br
tau_max=Ct*br
tau_oct=Cg*br
Zs=Cz*b
tauo=0.486*b/(2*Del)
Zo=0.41*b
printf('b = %.4f mm',b)
printf('\n a = %.3f mm',a)
printf('\n b/Delta = %d MPa',br)
printf('\n Sigma_max = %d MPa',S_max)
printf('\n tau_max = %d MPa',tau_max)
printf('\n tau_oct_max = %d MPa',tau_oct)
printf('\n Zs = %.3f mm',Zs)
printf('\n Tau_0 = %d MPa',tauo)
printf('\n Zo = %.3f mm',Zo)
// part (b)
tau_oY=sqrt(2)*Y/3
Py = 1/Del*(tau_oY/(Cg*Cb)*Del)^3
printf('\n part (b)')
printf('\n P_Y = %d N',Py)
SF=Py/P
printf('\n SF = %.2f ',SF)
|
64afe07bf73c8b23e0a932c4630af1b59ef37db2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /964/CH9/EX9.9/9_9.sce | fc82eb8ef3e49d111138fa9b7bf2426b1c8d8bb3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 303 | sce | 9_9.sce | //clc()
//0.0003*x1 + 3*x2 = 2.0001
//1*x1 + 1*x2 = 1
a11 = 0.000;
//multiplying first equation by 1/0.0003, we get, x1 + 10000*x2 = 6667
x2 = (6667-1)/(10000-1);
x1 = 6667 - 10000*x2;
disp(x2,"x2 = ")
disp(x1,"x1 = ")
disp("The error varies depending on the no. of significant figures used")
|
be3992bfcd68a190f687a1988c998275e79019b2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1271/CH1/EX1.46/example1_46.sce | c4eeedab410f0c851d54686f16396a2fc4d47e16 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 641 | sce | example1_46.sce | clc
// Given That
R = 1 // radius of curvature of lens of both side in meter
lambda = 5.4e-7 // wavelength of monochromatic light in meter
// Sample Problem 46 on page no. 1.56
printf("\n # PROBLEM 46 # \n")
n1 = 5 // for 5th dark ring
n2 = 15 // for 10th dark ring
r1 = sqrt((n1*lambda)/(1/R + 1/R)) // calculation for radius of 5th dark ring
r2 = sqrt((n2*lambda)/(1/R + 1/R)) // calculation for radius of 15th dark ring
d = r2 - r1 // calculation for distance between 5th and 15th dark ring
printf("\n Standard formula used \n r = sqrt((n*lambda)/(1/R + 1/R)). \n")
printf("\n Distance between 5th and 15th dark ring = %f cm.",d * 100)
|
eac0cad99813a9331dd48f392b844fb5513c5633 | 449d555969bfd7befe906877abab098c6e63a0e8 | /462/CH2/EX2.36.b/ex_2_36_b.sce | c92c6be9dcc153e50d2334008ef796679ba97147 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 485 | sce | ex_2_36_b.sce | //example 2.36(b)//
//subtraction of hexadecimal numbers//
clc
//clears the screen//
clear
//clears already existing variables//
x=hex2dec('C0')
//hexadecimal to decimal conversion//
y=hex2dec('7A')
z=x-y
//subtraction//
a=dec2hex(z)
//decimal to hexadecimal conversion//
b=dec2bin(z)
//decimal to binary conversion//
disp('answer in hexadecimal form is:')
disp(a)
//answer in hexadecimal form//
disp('answer in binary form is:')
disp(b)
//answer in binary number// |
304d8d8d64abcdda7c7a48c94f40139fb0454908 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2657/CH18/EX18.8/Ex18_8.sce | 33a558f2157f2e1dcfd4116b74a6bfe052abf96b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,328 | sce | Ex18_8.sce | //Calculations on six cylinder diesel engine
clc,clear
//Given:
n=6 //Number of cylinders
function bp=f(W),bp=W*N/20000,endfunction //Power law of engine
d=95,l=120 //Bore and stroke in mm
N=2400 //Engine speed in rpm
C_H=83/17 //Carbon Hydrogen ratio by mass in fuel
d_o=30 //Diameter of orifice in mm
Cd=0.6 //Orifice coefficient of discharge
P=550 //Net load on brake in N
P1=750 //Ambient pressure in mm of Hg
T1=25+273 //Ambient temperature in K
deltaP_o=14.5 //Head over orifice in cm of Hg
s=0.831 //Specific gravity of fuel
t=19.3 //Time to use 100 cc fuel in s
V_f=100 //Volume of fuel used in t seconds in cc
//Solution:
//(a)
bp=f(P) //Brake power at brake load in kW
A=%pi/4*d^2*10^-6 //Area of cylinder in m^2
bmep=bp*1000/(n*l/1000*A*N/(2*60)) //Brake mean effective pressure in Pascal
//(b)
T=bp*1000/(2*%pi*(N/60)) //Brake torque in Nm
//(c)
rho_f=s*1000 //Fuel density in kg/m^3
m_f=V_f*10^-6/t*3600*rho_f //Fuel flow rate in kg/hr
bsfc=m_f/bp //Brake specific fuel consumption in kg/kWh
//(e)
R=0.287 //Specific gas constant in kJ/kgK
P1=P1/760*1.01325 //Ambient pressure in bar
rho_a=P1*10^5/(R*10^3*T1) //Mass density of air in kg/m^3
deltaP_o=13.6*1000*9.81*deltaP_o/100 //Pressure drop across orifice in N/m^2
A_o=%pi/4*d_o^2*10^-6 //Area of orifice in m^2
V_a=Cd*A_o*sqrt(2*deltaP_o/rho_a) //Air inhaled in m^3/s
V_s=(%pi/4)*d^2*l*n*N/(2*60)*10^-9 //Swept volume in m^3/s
eta_vol=V_a/V_s //Volumetric efficiency
//(d)
pH=17,pC=pH*C_H //Percentage of Hydrogen and Carbon in fuel
pO=23.3 //Percentage of Oxygen in air
H=1,C=12,O=16 //Atomic masses of Hydrogen, Carbon, Oxygen in gm
mO2=pC/100*(2*O/C)+pH/100*(O/(2*H)) //Oxygen required in kg/kg of fuel
m_a=mO2/(pO/100) //Mass of air in kg/kg of fuel
A_F_t=m_a //Theoritical air fuel ratio
m_a_act=V_a*rho_a //Actual air mass flow rate in kg/s
A_F_act=m_a_act/m_f*3600 //Actual air fuel ratio
P_e=(A_F_act-A_F_t)/A_F_t*100 //Percentage excess air
//Results:
printf("\n (a)The brake mean effective pressure, bmep = %.3f bar",bmep*10^-5)
printf("\n (b)The brake torque, T = %.1f Nm",T)
printf("\n (c)The brake specific fuel consumption, bsfc = %.3f kg/kWh",bsfc)
printf("\n (d)The percentage excess air = %.1f percent",P_e)
printf("\n (e)The volumetric efficiency, eta_vol = %.1f percent\n\n",eta_vol*100)
|
81ef272f2ec6f7951a72b5e66be0996f7574e60f | e7607c4e9e4b6dde6632b4ec7b0e2d5fce49b455 | /05.sce | 6e1f1b1b6c0fef4ef6725fb6e149ab59f97a17d3 | [] | no_license | sbednarz/scilab2 | e9ae532ac7d0f128dfb9ab818099c848ebc121e4 | fd71642815991339eb854aec8700be4685542e27 | refs/heads/master | 2021-06-12T12:20:00.919646 | 2017-04-05T13:09:10 | 2017-04-05T13:09:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,616 | sce | 05.sce | //
//
// A <=> B
clear
A0=1
B0=0
K=10
function eq=model(u)
A=u(1)
B=u(2)
eq(1)=B/A-K
eq(2)=A+B-A0
endfunction
[conc,v,info]=fsolve([0.5;0.5],model)
disp(conc)
disp(info)
disp(conc(1)+conc(2))
//
//
// A <=> 2B
clear
A0=1
B0=0
K=10
function eq=model(u)
A=u(1)
B=u(2)
eq(1)=B/A-K
eq(2)=A + 2*B - A0
endfunction
[conc,v,info]=fsolve([0.5;0.5],model)
disp(conc)
disp(info)
//sprawdzenie
disp(conc(1)+conc(2)*2)
clear
//
//
// A <=> 2B , K1
// A <=> C , K2
clear
A0=1
B0=0
C0=0
K1=10
K2=20
function eq=model(x)
A=x(1)
B=x(2)
C=x(3)
eq(1)=B/A-K1
eq(2)=C/A-K2
eq(3)=A+0.5*B+C-A0
endfunction
[conc,v,info]=fsolve([0.5;0.5;0.5],model)
disp(conc)
disp(info)
disp('sprawdzenie:')
disp(conc(1)+conc(2)/2+conc(3))
// A <=> B + C
// A0 = 2
// K = 1e-5
clear
function eq = model(u)
A = u(1)
B = u(2)
C = u(3)
A0 = 2
K = 1e-3
eq(1) = K - (B*C)/A
eq(2) = A0 - A - B
eq(3) = A0 - A - C
endfunction
guess = [1;1;1]
[r,v,i] = fsolve(guess, model)
disp(r)
disp(v)
disp(i)
// HA <=> H + A
// H2O <=> H + OH
// CA0 = 0.1
// Ka = 1e-5
// Kw = 1e-14
clear
function eq = model(u)
H = u(1)
A = u(2)
OH = u(3)
HA = u(4)
CA0 = 0.1
Ka = 1.86e-5
Kw = 1e-14
eq(1) = Ka - (H*A)/HA
eq(2) = CA0 - A - HA
eq(3) = Kw - H*OH
eq(4) = H - OH - A
endfunction
guess = [1e-5;1e-5;1e-5;1e-5]
[r,v,i] = fsolve(guess, model)
disp(r)
disp(v)
disp(i)
H = r(1)
//pH
disp(-log10(H))
//pH roztworu kwasu siarkowego (IV)
clear
c_h2so3 = 0.01 //M
Ka1=0.017
Ka2=10^-7.19
Kw=1e-14
function eq = model(u)
//lista jonow i obojetnych cz. => 4
h=u(1)
oh=u(2)
h2a=u(3)
ha=u(4)
a=u(5)
//iloczyn jonowy wody
eq(1)=h*oh-Kw
//bilans ladunku
eq(2)=h-2*a-ha
//bilans kwasu
eq(3)=h2a+ha+a-c_h2so3
//dysocjacja kwasu 1
eq(4)=(ha*h)/h2a-Ka1
//dysocjacja kwasu 2
eq(5)=(a*h)/ha-Ka2
endfunction
[conc,v,info]=fsolve([1e-2; 1e-2; 1e-2; 1e-2; 1e-2], model)
pH=-log10(conc(1))
disp(pH)
// Obliczyć jaką objętość toluenu i heksanu należy zmieszać aby
// otrzymać Vtotal roztworu o zadanym ułamku molowym toluenu xt
clear
Vtotal=100
xt=0.8
//masy molowe
Mh=86
Mt=92
//gęstości
roh=0.65
rot=0.86
//guess
//Vt=50
//Vh=50
function eq = mix(u)
Vt=u(1)
Vh=u(2)
//ilości moli
nt=(rot*Vt)/Mt
nh=(roh*Vh)/Mh
//równania
eq(1) = nt/(nt+nh)-xt
eq(2) = Vt+Vh-Vtotal
endfunction
V=fsolve([50;50], mix)
Vt=V(1)
Vh=V(2)
printf("Aby przygotować %f ml mieszaniny o xt=%f \n",Vtotal, xt)
printf("Należy zmieszać: %f ml toluenu i %f ml heksanu", Vt, Vh)
|
e37ffb2ac55184adb92a1503b61dc0fd5423e175 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1808/CH2/EX2.15/Chapter2_Example15.sce | 72aa0995acdea7f5673b5955525b6231ad401b52 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,706 | sce | Chapter2_Example15.sce | clc
clear
//INPUT DATA
//CH4 + 2O2 + 7.52N2=CO2 + 2H2O + 7.52N2 ;//Combustion equation with liquid water in the products
t1=278;//atmospheric temperature
t2=1000;//products temperature
p1=1;//atmospheric pressure
hfco2=-393520;//Acc.to tables with liquid water in the products enthalpy of CO2
hfh2o=-285830;//Acc.to tables with liquid water in the products enthalpy of H2O
hfch4=-74850;//Acc.to tables with liquid water in the products enthalpy of CH4
hfco21=-393520;///Acc.to tables with water vapour in the products enthalpy of CO2
hfh2o1=-241820;//Acc.to tables with water vapour in the products enthalpy of H2O
hfch41=-74850;//Acc.to tables with water vapour in the products enthalpy of CH4
h21co2=33368;//Acc.to tables at 1000 K ,1 atm with water vapour in the products enthalpy of CO2
h21h2o=25978;//Acc.to tables at 1000 K ,1 atm with water vapour in the products enthalpy of H2O
h21n2=21468;//Acc.to tables at 1000 K ,1 atm with water vapour in the products enthalpy of N2
//CALCULATIONS
hrp=1*hfco2+2*hfh2o-hfch4;//enthalpy of reactants and products in kJ/kmol
hrpCH4=hrp/16.04;//Enthalpy of combustion of gaseous methane with liquid water in the products in kJ/kg
hrp1=1*hfco21+2*hfh2o1-hfch41;//enthalpy of reactants and products in kJ/kmol
hrpCH41=hrp1/16.04;//Enthalpy of combustion of gaseous methane with water vapour in the products in kJ/kg
hrp2=1*(hfco21)+(h21co2)+2*(h21h2o)+2*(hfh2o)+7.52*(h21n2)-1*(hfch4);//enthalpy of reactants and products in kJ/kmol
hrpCH42=hrp2/16.04;//Enthalpy of combustion of gaseous methane at 1000 K ,1atm with water vapour in the products in kJ/kg
dhco2=(42769-9364);//From tables both reactants and products enthalpy
dhh2o=(35882-9904);//From tables both reactants and products enthalpy
dho2=(31389-8682);//From tables both reactants and products enthalpy
dhch4=38189;//From tables both reactants and products enthalpy
hrp3=1*(hfco2+dhco2)+2*(hfh2o1+h21h2o)-(hfch41+dhch4)-2*(dho2);//enthalpy of reactants and products in kJ/kmol
hrpCH43=hrp3/16.04;//Enthalpy of combustion of gaseous methane at 1000 K ,1atm with water vapour and liqid water in the products in kJ/kg
//OUTPUT
printf('(i)Enthalpy of combustion of gaseous methane with liquid water in the \n products %3.2f kJ/kg of fuel\n(ii)Enthalpy of combustion of gaseous methane with water \n vapour in the products %3.2f kJ/kg of fuel\n ',hrpCH4,hrpCH41)
printf('(iii)Enthalpy of combustion of gaseous methane at 1000 K ,1atm \n with water vapour in the products is %3.3f kJ/kg of fuel\n(iv)Enthalpy of combustion of gaseous methane at 1000 K ,1atm \n with water vapour and liqid water is the products is %3.2f kJ/kg of fuel',hrpCH42,hrpCH43)
|
14a7a36390a263e6d389051bbdef4cc4e2955b82 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2863/CH7/EX7.7/ex7_7.sce | e027008112080b39ba90ec1a6ee2723914b463f5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 203 | sce | ex7_7.sce | //chapter 7
printf("\n");
fcre=2.5*10^6;
fcrf=8.5*10^6;
Nmaxe=(fcre)^2/81;
Nmaxf=(fcrf)^2/81;
printf("the Nmax for e layer is %g /m^3",Nmaxe);
printf("\n the Nmax for f layer is %g /m^3",Nmaxf);
|
c8e12e72f0f3a1f1c51c77af8632294f58b31266 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1733/CH1/EX1.25/1_25.sce | ab27e83307a8e9f8fd9433c26d3f4799b3e56805 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 443 | sce | 1_25.sce | //1.25
clc;
L=0.1*10^-3;
Vc=100;
C=10*10^-6;
IL=10;
t_off=Vc*C/IL*10^6;
printf("Commutation time= %.0f us",t_off)
disp('The commutation time of the thyristor is more than the turn off time of the main thyristor i.e. 25us and is thus sufficient to commutate the main thyristor')
IC_peak= Vc*(C/L)^0.5;
printf("Peak capacitor current= %.2f A",IC_peak)
disp('The maximum current rating of the thyristor should be more than 31.62A')
|
1a4c1b2457f9a4d5d9062d36c26672973767f83a | 449d555969bfd7befe906877abab098c6e63a0e8 | /165/CH11/EX11.10.b/ex11_10_b.sce | d61f88cbcb55513a55e4c809de5b6125beb569a5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | ex11_10_b.sce | //Example 11.10(b)
clc;
//Given values of bridge elements
R3=100;
C2=100*10^-12;
R4=300;
C4=0.5*10^-6;
f=50; //frequency in Hz
//Value of R1 for Schering's Bridge
R1=C4*R3/C2;
//Value of C1 for Schering's Bridge
C1=C2*R4/R3;
//Dissipation factor
D=2*%pi*f*C1*R1;
printf('\nValue of resistence is %d ohm',R1)
disp(C1,'Value of Capacitance is ')
printf('\nDissipation factor for Schering bridge is %.4f ',D ) |
0b64a84dd8efab4777c3239d539fd7aba6d6b1c5 | 6b85d1958ff11075634ed9e0f6dbef2de9548f1b | /ANN_Toolbox/macros/ann_pat_shuffle.sci | 79921c7727a4063169209e9c3b27d579f55e35e5 | [
"Unlicense"
] | permissive | ademarazn/REDES_NEURAIS | 8a048c13aab33daa4068f52e18b263cc8325884f | a9a35744476d1f7e8405df04d5e4a9f8e4ed4595 | refs/heads/master | 2021-05-06T13:09:56.514632 | 2018-04-25T18:49:30 | 2018-04-25T18:49:30 | 113,248,743 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 627 | sci | ann_pat_shuffle.sci | function [x,t] = ann_pat_shuffle(x,t)
// This file is part of:
// ANN Toolbox for Scilab 5.x
// Copyright (C) Ryurick M. Hristev
// updated by Allan CORNET INRIA, May 2008
// released under GNU Public licence version 2
// shuffles the patterns from "x" and the corresponding "t"
// see ANN_GEN (help)
// no. of patterns
P = size(x,'c');
my_rand = ceil(P * rand(P,1));
for p = 1 : P
// shuffle x
temp = x(:,my_rand(p));
x(:,my_rand(p)) = x(:,p);
x(:,p) = temp;
// shuffle t same way (keep x(:,p) <-> t(:,p) correspondence)
temp = t(:,my_rand(p));
t(:,my_rand(p)) = t(:,p);
t(:,p) = temp;
end;
endfunction
|
75ed55794d4392433e6b3e5ef2ec3640e126ccc2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /503/CH7/EX7.32/ch7_32.sci | 15337ad1db4baf703df4ba1997bfaf858413b557 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 346 | sci | ch7_32.sci | //to determine the reduction of flux/pole due to armature rxn
clc;
V=250;
R_a=.7;
function [phi]=arxn(I_a,n)
phi=(V-I_a*R_a)/n;
endfunction
phinl=arxn(1.6,1250);
disp(phinl,'flux/pole no load');
phil=arxn(40,1150);
disp(phil,'flux/pole load');
d=(phinl-phil)*100/phinl;
disp(d,'reduction in phi due to armature rxn(%)');
|
fbb1bb3b783053a499502128ea6cddb936fdbb77 | 717ddeb7e700373742c617a95e25a2376565112c | /10/CH10/EX6/cha10_6.sce | 30685c0667ccf7b193fc76b8c032180c086dd87c | [] | 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 | 201 | sce | cha10_6.sce | V=300;I=540;Angle=45;
t0=0:0.1:%pi;
t=0;
integrate('540*sin((x-45*%pi/180))','x',t,t0)/%pi
Is=242.89;
Ps=V*I
Vo1=(4*V)/(%pi*sqrt(2))
Pout=Vo1*Io/sqrt(2)*cos(%pi*Angle/180)
|
570e61011e094109a970ecb154098c4f0f226b02 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1847/CH6/EX6.1/Ch06Ex1.sce | 20b6fd30e51c62e2f32f72ddbeb18c9d69b2f549 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 660 | sce | Ch06Ex1.sce | // Scilab Code Ex6.1:: Page-6.19 (2009)
clc; clear;
T = 300; // Temperature of pure semiconductor, K
n_i = 2.5e+019; // Intrinsic carrier density, per metre square
e = 1.6e-019; // Charge on an electron, C
mu_e = 0.39; // Mobility of electrons, Sq.m/V/s
mu_h = 0.19; // Mobility of holes, Sq.m/V/s
sigma_i = e*n_i*(mu_e+mu_h); // Conductivity of intrinsic semiconductor at 300 K, mho/m
rho_i = 1/sigma_i; // Resistivity of intrinsic semiconductor at 300 K, ohm-m
printf("\nThe resistivity of intrinsic semiconductor at 300 K = %4.2f ohm-m", rho_i);
// Result
// The resistivity of intrinsic semiconductor at 300 K = 0.43 ohm-m
|
4e73c33659d9ccd807c77a93c82ea176194945e0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /764/CH4/EX4.1.a/data4_1.sci | 24a2b04c6812680b33c4c7d7bf002579efefafc7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 288 | sci | data4_1.sci |
//(Design against Static Load) Example 4.1
//Refer Fig.4.10 on page 85
//Tensile force acting on two plates P (kN)
P = 50
//Tensile yield strength of the plates Syt (N/mm2)
Syt = 250
//Factor of safety fs
fs = 2.5
//Number of rivets n
n = 3
//Length of plate L (mm)
L = 200
|
6b59066417f64dd2437fc51c180f800aaaa71238 | 3592fbcb99d08024f46089ba28a6123aeb81ff3c | /testLinkVdotx3.sce | 10425f10caf1b0a688b4ab0238ae733e4e800fb2 | [] | no_license | clairedune/sciGaitanLib | a29ab61206b726c6f0ac36785ea556adc9ef03b9 | 7498b0d707a24c170fc390f7413359ad1bfefe9f | refs/heads/master | 2020-12-11T01:51:13.640472 | 2015-01-28T13:52:26 | 2015-01-28T13:52:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 5,175 | sce | testLinkVdotx3.sce | //---------------------------//
// Compute a cost function over a time horizon
// With a free 3d camera
// Created 11/12 updated 27 july 2012
// Etude pour ICRA 2012
// Dune
// Note :
// On etudie le lien entre dx/dt=(dotp dotu) et v=(v, w)
//---------------------------//
getd("src/transformation")
posecMo_m = [0 0 1 0*%pi/180 0*%pi/180 0*%pi/180]
cMo_m = homogeneousMatrixFromPos(posecMo_m);
oMc_m = inv(cMo_m);
poseoMc_m = pFromHomogeneousMatrix(oMc_m)';
// petit deplacement de la camera dans le repere de l'objet
Delta = [0 0. 0. 0.001 0.002 0.003];
dt = 1/25;
dotx = Delta / dt;
dotu = Delta (4:6)'/dt;
dotp = Delta (1:3)'/dt;
disp('deltaX par definition')
disp(Delta)
disp('dotX par definition')
disp(dotx)
//-----On cherche v qui produit le meme deplacement sur dt--------
// la matrice de rotation qui nous interesse ici est celle qui est construite
// parti des Euler Angle Rate
cRo = cMo_m(1:3,1:3)
r = RxRyRzfromRotationMatrix(cRo);//camera dans objet
//a=r(3);
//b=r(2);
//c=r(1);
//R1= [cos(a)*cos(b) cos(a)*sin(b)*sin(c)-sin(a)*cos(c) cos(a)*sin(b)*cos(c)+sin(a)*sin(c)
// sin(a)*cos(b) sin(a)*sin(b)*sin(c)+cos(a)*cos(c) sin(a)*sin(b)*cos(c)-cos(a)*sin(c)
// -sin(b) cos(b)*sin(c) cos(b)*cos(c)];
//R=[cos(a)*cos(b) -sin(a)*cos(b) sin(b)
// cos(c)*sin(a)+sin(c)*sin(b)*cos(a) cos(a)*cos(c)-sin(c)*sin(a)*sin(b) -sin(c)*cos(b)
// sin(a)*sin(c)-cos(c)*sin(b)*cos(a) cos(a)*sin(c)+cos(c)*sin(a)*sin(b) cos(b)*cos(c)];
// on calcul la matrice E pour obtenir w dans le repere objet
oT = eulerAngleRatesMatrix(r);
ow = oT*dotu;
ow = ow .*(ow >100*%eps);
//disp('Eijk');
//disp(oT);
//disp('w dans le repere objet');
//disp(ow);
// on calcul la matrice conjuguee pour obtenir w dans le repere camera
cT = eulerAngleRatesConj(r);
cw = cT*dotu;
cw =cw .*(cw >100*%eps);
//Rtest=cT*inv(oT);
//disp('Rtest')
//disp(Rtest)
//Rtest2=oT*inv(cT);
//disp('Rtest2')
//disp(Rtest2)
//disp('Eijk conj');
//disp(cT);
//disp('w dans le repere camera');
//disp(cw);
//verif :
//winv2 = cRo*ow;
//disp ('verif on doit retrouver cw');
//disp (winv2);
//pause
// dans le repere objet :
ov = [dotp ; ow];
disp('vitesse exprimee dans le repere objet')
disp(ov)
Lx = computeLxInObj(cMo_m);
ov = Lx*dotx';
disp('vitesse exprimee dans le repere objet en utilisant Lx')
disp(ov)
//translation = cMo_m(1:3,4);
//tx = skew(translation);
//cv = [cRo*dotp+tx*cw;cw];
//disp('vitesse exprimee dans le repere camera')
//disp(cv)
Lx = computeLxInCam(cMo_m);
cv = Lx*dotx';
disp('vitesse exprimee dans le repere camera en utilisant Lx')
disp(cv)
//cv3 = cameraVelFromDeltaX(cMo_m, Delta', dt);
//disp('vitesse exprimee dans le repere camera en utilisant Fonction')
//disp(cv3)
cVo_m=twistMatrix(cMo_m);
camv = cVo_m*ov;
disp('vitesse dans le repere de la camera en utilisant cVo');
disp(camv)
pause
//-----TESTS-------//
//--- Build the target
a_m = 0.30; // dimension of the target
oP_m = mire5points(a_m); // create the Npbts Points Target
Nbpts_m = length(oP_m)/3 ;
//--- compute the init projection on the view
cP_m = changeFrameMire(oP_m,cMo_m);
s_m = projectMireDirect(cP_m);
Z_m = cP_m(3:3:$) ;
// ------ Delta est un ajout a la pose courante de la camera ----//
poseoMcm_m = poseoMc_m+Delta;
disp('Position d arrivee en utilisant ce petit dx')
disp('poseoMcm_m = poseoMc_m+Delta;')
disp(poseoMcm_m)
// ----- Appliquons la vitesse camera pendant dt
vitesse = cv;
cMcm_m = expMapDirectThetaU(vitesse,dt);
//cMcm_m = expMapDirectRxRyRz(vitesse',dt);
vexpMap = expMapInverse(cMcm_m,dt);
//vexpMap = expMapInverseRxRyRz(cMcm_m,dt);
disp('vitesse camera retrouvee')
disp(vexpMap)
posecMcm_m = pFromHomogeneousMatrix(cMcm_m)';
disp('deplacement de la cam dans le repere cam si on applique cv')
disp(posecMcm_m)
oMcm_m = oMc_m*cMcm_m;
poseoMcm_m = pFromHomogeneousMatrix(oMcm_m)';
disp('pose d arrivee obtenu par deplacement de la camera')
disp(poseoMcm_m)
cmP_m = changeFrameMire(oP_m,inv(oMcm_m));
sm_m = projectMireDirect(cmP_m);
Zm_m = cmP_m(3:3:$) ;
L_m = matIntMireC(s_m,Z_m);
DeltacXest = pinv(L_m*Lx)*(sm_m-s_m);///dt;
DeltacXest2= pinv(L_m)*(sm_m-s_m);///dt;
disp('DeltaX_m')
disp(DeltacXest)
disp('DeltacXest 2')
disp(DeltacXest2)
disp('dots=(sm_m-s_m)/dt')
disp(((sm_m-s_m))'/dt)
disp('dots=Lv')
disp((L_m*vitesseL)')
disp('----Idem en O----')
vitesse = ov;
cMcm_m = expMapDirectThetaU(vitesse,dt);
//cMcm_m = expMapDirectRxRyRz(vitesse',dt);
vexpMap = expMapInverse(cMcm_m,dt);
//vexpMap = expMapInverseRxRyRz(cMcm_m,dt);
disp('vitesse camera retrouvee')
disp(vexpMap)
posecMcm_m = pFromHomogeneousMatrix(cMcm_m)';
disp('deplacement de la cam dans le repere cam si on applique cv')
disp(posecMcm_m)
oMcm_m = oMc_m*cMcm_m;
poseoMcm_m = pFromHomogeneousMatrix(oMcm_m)';
disp('pose d arrivee obtenu par deplacement de la camera')
disp(poseoMcm_m)
|
cb1605230d642cdadf00e1dde8d6ed50ddea7442 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.4.1/Unix-Windows/scilab-2.4.1/macros/percent/%r_v_r.sci | 02f452f384bf3ac5d2430d5d579406c6eef3b139 | [
"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 | 350 | sci | %r_v_r.sci | function h=%r_v_r(h1,h2)
// %r_v_r(h1,h2)=(I+h1*h2)\h1. h1 and h2 rational matrices
//!
// Copyright INRIA
[h1,h2]=sysconv(h1,h2),
[m1,n1]=size(h1(2))
[m2,n2]=size(h2(2))
if abs(n1-m2)+abs(m1-n2)<>0 then error('inconsistent dimensions'),end
if m1*n1==1 then
h=h1;h(2)=h1(2)*h2(3);h(3)=h1(2)*h2(2)+h1(3)*h2(3);
else
h=(eye(m1,m1)+h1*h2)\h1
end
|
bf441fe9e8fc91f5ce489d8151cff41ffa457d7d | 449d555969bfd7befe906877abab098c6e63a0e8 | /491/CH3/EX3.6/3_6.sce | 374312b9d7b4d615f6435ac703df2016fee05183 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 871 | sce | 3_6.sce | d1 = 0.06 ; // Inner diameter in meter
d2 = 0.08 ; // Outer diameter in meter
r = d2/2; // Outer radius
G = 27e09 ; // Modulus of elasticity
T = 4000 ; // Torque in N-m
Ip = (%pi/32)*((d2^4)-(d1^4)); // Polar moment of inertia
t_max = (T*r)/Ip ; // maximum shear stress
disp("Pa",t_max,"Maximum shear stress in tube is ")
s_t = t_max ; // Maximum tensile stress
disp("Pa",s_t,"Maximum tensile stress in tube is ")
s_c = -(t_max); // Maximum compressive stress
disp("Pa",s_c,"Maximum compressive stress in tube is ")
g_max = t_max / G ; // Maximum shear strain in radian
disp("radian",g_max,"Maximum shear strain in tube is ")
e_t = g_max/2 ; // Maximum tensile strain in radian
disp("radian",e_t,"Maximum tensile strain in tube is ")
e_c = -g_max/2 ; // Maximum compressive strain in radian
disp("radian",e_c,"Maximum compressive strain in tube is ")
|
cd30c165c5894712d75a287f4c35045ba5773d4b | 717ddeb7e700373742c617a95e25a2376565112c | /3044/CH2/EX2.14/Ex2_14.sce | 6e41624137517e302e69c2ff030083adb4184996 | [] | 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 | 406 | sce | Ex2_14.sce | //Variable declaration
l = [19.7, 21.5, 22.5, 22.2, 22.6,21.9, 20.5, 19.3, 19.9, 21.7,22.8, 23.2, 21.4, 20.8, 19.4,22.0, 23.0, 21.1, 20.9, 21.3]
sum1 = 0.0
//Calculation
Mean=sum(l)/length(l)
for i = 1:length(l)
sum1 = sum1 + l(i)*l(i)
end
variance = (sum1 - (sum(l)^2.0/length(l)))/(length(l)-1) // variance
//Results
printf ( "mean : %.3f mpg",Mean)
printf ( "variance : %.3f",variance )
|
f5afb4a5abb0b9ac99a88260dec8d6051fc44c66 | 374395881798ff447606eadadb281e02ce4ec55e | /t1064200/ExampleInput.tst | 27225dc7348bb13b8c3e5aed431019306be45692 | [] | no_license | aisopuro/compiler | 0f8e1e575101129a997ab636e0cdb76076bf82dd | 0f33dbcecfd90c17985fdf8354f13bc9e22b3efe | refs/heads/master | 2021-01-13T02:09:06.634940 | 2013-12-06T09:42:55 | 2013-12-06T09:42:55 | 14,859,067 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 51 | tst | ExampleInput.tst | main {
int a;
boolean b;
statements
return
} |
ae7efba85db6fded1ce6e1a270423ae97595fccb | 449d555969bfd7befe906877abab098c6e63a0e8 | /1736/CH9/EX9.7/Ch09Ex7.sce | afe7a53d212943185897303a41bbee33ca7d24f7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 586 | sce | Ch09Ex7.sce | // Scilab Code Ex9.7 :Page:285 (2006)
clc; clear;
Lambda_0 = 390; // Penetration depth at absolute zero, angstorm
T_c = 7; // Transition temperature of Pb, K
T = 2; // Givn temperature, K
Lambda = Lambda_0*[1-(T/T_c)^2]^(-1/2); // London penetration depth in Pb at 2K, angstorm
printf("\nThe London penetration depth in Pb at 2K = %7.4f angstorm", Lambda);
printf("\nThe London penetration depth at T = T_c becomes %d", %inf);
// Result
// The London penetration depth in Pb at 2K = 406.9644 angstorm
// The London penetration depth at T = T_c becomes Inf
|
2bc8754c3cb8f2a09ad30adc2159fbdcc8d0dc72 | 683d2599aa2be1a5f74b928d545b20e7ea656cd1 | /microdaq/macros/microdaq_macros/mdaq_pwm_write.sci | 9847c29ef7dc3d34eaa709414c4d822bfc82895f | [
"BSD-3-Clause"
] | permissive | pj1974/Scilab | 5c7fb67d5cae5ac0cdf78e3dd66b97ba50f9fc95 | cd54f1bd8502d6914ad6ff5271ca0e6e3d323935 | refs/heads/master | 2020-12-25T17:12:56.934984 | 2015-10-06T17:16:11 | 2015-10-06T17:16:11 | 41,862,822 | 0 | 0 | null | 2015-09-03T14:00:56 | 2015-09-03T14:00:56 | null | UTF-8 | Scilab | false | false | 1,092 | sci | mdaq_pwm_write.sci | function mdaq_pwm_write(link_id, module, channel_a, channel_b)
if link_id < 0 then
disp("Wrong link ID!")
return;
end
if module > 3 | module < 1 then
disp("Wrong PWM module!")
return;
end
if channel_a > 100 | channel_a < 0 then
disp("WARNING: Channel A duty outside the limit (0-100)!");
if channel_a > 100 then
channel_a = 100;
end
if channel_a < 0 then
channel_a = 0;
end
end
if channel_b > 100 | channel_b < 0 then
disp("WARNING: Channel B duty outside the limit (0-100)!");
if channel_b > 100 then
channel_b = 100;
end
if channel_b < 0 then
channel_b = 0;
end
end
result = [];
result = call("sci_mlink_pwm_set",..
link_id, 1, "i",..
module, 2, "i",..
channel_a, 3, "d",..
channel_b, 4, "d",..
"out",..
[1, 1], 5, "i");
if result < 0 then
mdaq_error(result)
end
endfunction
|
2c8995ee67f83cf76442bb7c919a90b63b0cc5ea | 449d555969bfd7befe906877abab098c6e63a0e8 | /2399/CH2/EX2.12.1/Example2_12_1.sce | b6cbf1cbc8f255e09bf86d1859f87b79b6c3343d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 913 | sce | Example2_12_1.sce | // Example 2.12.1
clc;
clear;
a=4.5d-6; //core diameter
delta=0.25/100; //relative index difference
lamda=0.85d-6; //operating wavelength
n1=1.46; //core refractive index
v= 2*%pi*a*n1*sqrt(2*delta)/lamda; //computing normalized frequency
lamda_cut_off=v*lamda/2.405; //computing cut off wavelength
lamda_cut_off=lamda_cut_off*10^9;
printf("\nCut off wavelength is %.d nanometer.",lamda_cut_off);
printf("\n\nWhen delta is 1.25 percent-");
delta=1.25/100;
v= 2*%pi*a*n1*sqrt(2*delta)/lamda; //computing normalized frequency
lamda_cut_off=v*lamda/2.405; //computing cut off wavelength
lamda_cut_off=lamda_cut_off*10^7;
lamda_cut_off=round(lamda_cut_off);
lamda_cut_off=lamda_cut_off*100;
printf("\nCut off wavelength is %.d nanometer.",lamda_cut_off);
//answer in the book for cut off wavelength in the book is given as 1214nm, deviation of 1nm.
|
f403be249314834d145fce1e77dc80ca5ee20d27 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1967/CH11/EX11.3/11_3.sce | e9d231b143a3a5f23b5cccfb27baa4fec0a0505a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 246 | sce | 11_3.sce | clc
//initialisation of variables
clear
T= 100 //C
j= 0.0242 //cal cc^-1 atm6-1
k= 539 //cal g^-1
p= 1664 //cc g^-1
//CALCULATIONS
r= (273.2+T)*(p-1)*j/k
//RESULTS
printf ('Rise in temperature per unit of pressure= %.1f deg atm^-1',r)
|
4cd42afd633ded755c158c6b7889c97b0980a7e4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3756/CH3/EX3.12/Ex3_12.sce | 34f704c3456e840af6528bd071277f78285b82e2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 388 | sce | Ex3_12.sce | clc
//
//
//
//Variable declaration
theta1=12 //rotation of plane
l1=2 //length
theta2=24 //rotation of plane
l2=3 //length
c1=0.08 //Concentration
//Calculations
s=((theta1)/(l1*c1))
c2=((theta2)/(s*l2))
Ms=10*10*10*c2
Ms2=Ms*2
//Result
printf("\n The Mass of sugar dissolved in 2 liter of water for optical rotation 24 deg is %3.1f gm",Ms2)
|
f32261af080cbcfdbe48e3d5b7b07eccbb1b8baa | 449d555969bfd7befe906877abab098c6e63a0e8 | /2594/CH5/EX5.30/Ex5_30.sce | d3b29bb6fc0e6f4251bbe480d238f601551529b5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex5_30.sce | clc
Eg=-1.1
disp("Eg = "+string(Eg)+"V") //initializing value of energy gap.
Vf1=0.6
disp("Vf1 = "+string(Vf1)+"V") //initializing value of forward voltage for case 1.
T1=300
disp("T1 = "+string(T1)+"K") //initializing value of temperature for case 1.
T2=310
disp("T2 = "+string(T2)+"K") //initializing value of temperature for case 2 .
Vf2=(((Eg+Vf1)*T2)/(T1))-Eg
disp("Forward voltage for case 2,Vf2=((Eg+Vf1)*T2)/(T1)+Eg)="+string(Vf2)+" V")//calculation.
|
1b3e227b6f7b1ee2cae81c5c58ae92f3b1790591 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3311/CH6/EX6.30/Ex6_30.sce | 9d67af1b609d1e64c1062bcd19512c54cd14f769 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,063 | sce | Ex6_30.sce | // chapter 6
// example 6.30
// Compute the average generator voltage
// page-373
clear;
clc;
// given
E=415; // in V (supply voltage per phase)
f=50; // in Hz (supply frequency)
X_L=0.3; // in ohm (source reactance)
R=0.05; // in ohm (resistance per phase)
V_drop_Thyristor=1.5; // in V (voltage drop across Thyristor)
Id=60; // in A (continuous load current)
Beta=35; // in degree (firing advance angle)
u=0; // in degree (overlap angle at no load)
// calculate
V_drop_reactance=(3*X_L/%pi)*Id; // voltage drop due to overlap
V_drop_Thyristors=2*V_drop_Thyristor; // voltage drop due to SCRs
V_drop_resistance=2*R*Id; // voltage drop due to supply resistance
Emph=E*sqrt(2/3);// calculation of peak voltage
Edc_noload=-((3*sqrt(3)/%pi)*Emph*cosd(u-Beta));// calculation of average voltage at no load
Edc=abs(Edc_noload-V_drop_Thyristors-V_drop_reactance-V_drop_resistance);// calculation of average generator voltage
printf("\nThe average generator voltage is Edc=%.2f V",Edc);
// Note: The answers vary slightly due to precise calculation upto 6 decimal digits |
3f8d02e11cd57dc24802f30eb3079b6ae3d9baea | 449d555969bfd7befe906877abab098c6e63a0e8 | /761/CH16/EX16.6/16_6.sce | fb5581a530e186cbeb6027ba1502b38b705b6d6a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 246 | sce | 16_6.sce | clc;
//page no 573
//prob no. 16.6
//ERP of Tx statn=17W
ERP=17;
//Determnation of EIRP
ERP_dBm=10*log10(ERP/10^-3);//Converting ERP in dBm
EIRP_dBm=ERP_dBm+2.14;//Converting ERP in EIRP
disp('dBm',EIRP_dBm,'EIRP in dBm is expressed as'); |
ff94885e7b30d32624f70a363c3e3cdeddb06707 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/tests/examples/ctr_gram.man.tst | 156c3c0b93a88419cc169fb86db0033a648239eb | [
"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 | 134 | tst | ctr_gram.man.tst | clear;lines(0);
A=diag([-1,-2,-3]);B=rand(3,2);
Wc=ctr_gram(A,B)
U=rand(3,3);A1=U*A/U;B1=U*B;
Wc1=ctr_gram(A1,B1) //Not invariant!
|
3e7ad8665e435e8b5e52c8a9bf4d7ec547def4c3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2792/CH7/EX7.8/Ex7_8.sce | a9a70059ed5b23af92f408f52fe81ab766fee028 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,864 | sce | Ex7_8.sce | clc
Ndc = 5*10^15
disp("Ndc= "+string(Ndc)+"cm^-3")//inializing value of collector doping
Nab = 5*10^16
disp("Nab= "+string(Nab)+"cm^-3")//inializing value of base doping
ni = sqrt(2.25*10^20)
disp("ni = "+string(ni)+"cm^-3") //initializing value of electron density of ionisation electron for silicon
kbT = 0.026
disp("kbT = "+string(kbT)+"eV/K") //initializing value of thermal voltage at 300K
e = 1.6*10^-19
disp("e= "+string(e)+"C")//initializing value of charge of electron
Vbi= (kbT)*((log((Nab*Ndc)/(ni^2))))
disp("The built in voltage is ,Vbi= (kbT)*((log((Na*Nd)/Ni^2)))= "+string(Vbi)+"V")//calculation
disp(" for an applied bias of 1 V ")
VCB1 = 1
disp("VCB = "+string(VCB1)+" V")//initializing value of Collector-base bias voltage
apsilent_s = 11.9*8.85*10^-14
disp("apsilent_s = "+string(apsilent_s)+"F/cm") //initializing value of relative permitivity
Wb = 10^-4
disp("Wb= "+string(Wb)+"cm")//initializing value of base width
dWb1 = sqrt((2*apsilent_s*(Vbi+VCB1)*Ndc)/(e*Nab*(Nab+Ndc)))
disp("The extent of depletion into the base side is,dWb = sqrt((2*apsilent_s*(Vbi+Vcb1)*Ndc)/(e*Nab*(Nab+Ndc))) = "+string(dWb1)+"cm")//calculation
Wbn1 = Wb-dWb1
disp("The neutral base width is,Wbn = Wb-dWb1= "+string(Wbn1)+"cm")//calculation
nbo = ((ni)^2)/Nab
disp("The required base doping is,nbo = (ni^2)/Nab = "+string(nbo)+"cm^-3")//calculation
Db = 20
disp("Db= "+string(Db)+"cm^2/s")//initializing value of diffusion coefficient in the base
VBE = 0.7
disp("VBE= "+string(VBE)+"V")//initializing value of base-Emitter bias voltage
Jc1 = ((e*Db*nbo)/Wbn1)*(exp(VBE/kbT))
disp("The collector current density is,Jc = ((e*Db*nbo)/Wbn)*(exp((e*VBE)/kbT))= "+string(Jc1)+"A/cm^2")//calculation
disp(" for an applied bias of 5 V ")
VCB2 = 5
disp("VCB = "+string(VCB2)+" V")//initializing value of Collector-base bias voltage
VCE1= VCB1+VBE
disp("The collector emitter voltage is ,VCE= VCB+VBE= "+string(VCE1)+" V")//calculation
VCE2= VCB2+VBE
disp("The collector emitter voltage is ,VCE= VCB+VBE= "+string(VCE2)+" V")//calculation
dWb2 = sqrt((2*apsilent_s*(Vbi+VCB2)*Ndc)/(e*Nab*(Nab+Ndc)))
disp("The extent of depletion into the base side is,dWb = sqrt((2*apsilent_s*(Vbi+Vcb1)*Ndc)/(e*Nab*(Nab+Ndc))) = "+string(dWb2)+"cm")//calculation
Wbn2 = Wb-dWb2
disp("The neutral base width is,Wbn = Wb-dWb1= "+string(Wbn2)+"cm")//calculation
Jc2 = ((e*Db*nbo)/Wbn2)*(exp(VBE/kbT))
disp("The collector current density is,Jc = ((e*Db*nbo)/Wbn)*(exp((e*VBE)/kbT))= "+string(Jc2)+" A/cm^2")//calculation
VA = (Jc1/((Jc2-Jc1)/(VCE2-VCE1)))-(VCE1)
disp("The Early voltage is,VA = (Jc1/((Jc2-Jc1)/(VCE2-VCE1)))-(VCE1)= "+string(VA)+"V")//calculation
// Note : due to different precisions taken by me and the author ... my answer differ by "0.2" value.
|
81e1eb95ceb21a5facfeebcd7650f9bc642f333c | e41b69b268c20a65548c08829feabfdd3a404a12 | /3DCosmos/Data/Scripts/Mathematics/HarmonicObjects.SCI | a044724e6fcc68e320cc24d1a8a5c44b4306b6cd | [
"LicenseRef-scancode-khronos",
"MIT"
] | permissive | pvaut/Z-Flux | 870e254bf340047ed2a52d888bc6f5e09357a8a0 | 096d53d45237fb22f58304b82b1a90659ae7f6af | refs/heads/master | 2023-06-28T08:24:56.526409 | 2023-03-01T12:44:08 | 2023-03-01T12:44:08 | 7,296,248 | 1 | 1 | null | 2023-06-13T13:04:58 | 2012-12-23T15:40:26 | C | UTF-8 | Scilab | false | false | 4,123 | sci | HarmonicObjects.SCI | codeblock readtextfile(ScriptDir+"\_TOOLS.sci");
sf=T_scene_create;
sss=T_getscene;
sss.ambientlightcolor=color(0.15,0.15,0.15);
######################################################################################
# SETTINGS DIALOG BOX
######################################################################################
dsize=0.03;
psy=0.95;
controlids= list("fsa","psa","fca","pca","fsb","psb","fcb","pcb");
controls=list;
cframe=root.SC.Universe.addscreenframe("Controls Frame");
cframe.EnabeMouseArrow(point(0.5,0.5),point(0,0),point(1,1),0.03);
cframe.enablelight=false;
cframe.BlendType=BlendTranslucent;
cframe.DepthMask=DepthMaskDisable;
cframe.color=color(1,1,1,0.5);
foreach ctrlid in controlids do {
cframe.add("TextControl","Size":dsize,"Position":point(0.01,psy),"Content":ctrlid);
ctrl=cframe.add("ScalarControl","Size":dsize,"Position":point(0.09,psy));
ctrl.SizeX=0.04;ctrl.RangeSizeX=0.1;
ctrl.min=0;ctrl.max=6;ctrl.step=1;
ctrl.value=0;
if ctrlid=="fsa" then ctrl.value=3;
if ctrlid=="psa" then ctrl.value=2;
if ctrlid=="fcb" then ctrl.value=4;
if ctrlid=="pcb" then ctrl.value=2;
psy=psy-0.05;
controls.add(ctrl);
}
cframe.add("TextControl","Size":dsize,"Position":point(0.28,0.95),"Content":'Resolution');
resolctrl=cframe.add("ScalarControl","Size":dsize,"Position":point(0.28+0.12,0.95));
resolctrl.SizeX=0.08;resolctrl.RangeSizeX=0.1;
resolctrl.min=30;resolctrl.max=200;resolctrl.step=10;
resolctrl.value=70;
calcbutton=cframe.add("ButtonControl","Size":dsize,"SizeX":0.11,"Position":point(0.28,0.9),"Content":'Calculate');
#Initialise variables
fsa=0;psa=0;fca=0;pca=0;fsb=0;psb=0;fcb=0;pcb=0;
function createobject()
{
refframe.clearobjects;
rendermessage('Calculating');
resol=resolctrl.value;
fsa=controls(0).value;
psa=controls(1).value;
fca=controls(2).value;
pca=controls(3).value;
fsb=controls(4).value;
psb=controls(5).value;
fcb=controls(6).value;
pcb=controls(7).value;
fnc=functor("radial2point(sin(fsa*a)^psa+cos(fca*a)^pca+sin(fsb*b)^psb+cos(fcb*b)^pcb,a,b)","a","b");
cfnc=functor("color(0.3*(@vector(p).size),0.5,1-0.3*(@vector(p).size))","p");
obj=refframe.add("Surface");
obj.renderback=true;
obj.color=color(1,1,1);
obj.SpecularValue=30;
obj.SpecularColor=color(0.35,0.35,0.35);
obj.canbuffer=true;
obj.Generate(fnc,0,2*Pi,resol,-0.5*Pi,0.5*Pi,resol);
obj.GenerateVertexProperty(cfnc,VertexPropertyColor);
#make formula
txtframe.clearobjects;
txt=txtframe.add("FormattedText","Position":point(0.02,0.07),"Size":0.05,"Color":color(0.7,0.7,0.7),"MaxLenX":10);
st="";const=0;
if (fsa>0) and (psa>0) then {
if st.length>0 then st=st+" + ";
st=st+"sin";
if psa>1 then st=st+"^"+str(psa);
if fsa>1 then st=st+" "+str(fsa);
st=st+" \theta";
} else const=const+1;
if (fca>0) and (pca>0) then {
if st.length>0 then st=st+" + ";
st=st+"cos";
if pca>1 then st=st+"^"+str(pca);
if fca>1 then st=st+" "+str(fca);
st=st+" \theta";
} else const=const+1;
if (fsb>0) and (psb>0) then {
if st.length>0 then st=st+" + ";
st=st+"sin";
if psb>1 then st=st+"^"+str(psb);
if fsb>1 then st=st+" "+str(fsb);
st=st+" \phi";
} else const=const+1;
if (fcb>0) and (pcb>0) then {
if st.length>0 then st=st+" + ";
st=st+"cos";
if pcb>1 then st=st+"^"+str(pcb);
if fcb>1 then st=st+" "+str(fcb);
st=st+" \phi";
} else const=const+1;
if const>0 then {
if st.length>0 then st=st+" + ";
st=st+str(const);
}
txt.content=txt.content+"$";
txt.content="$R="+st+"$";
txt.enablelight=false;
hiderendermessage;
}
refframe=sf.addsubframe("refframe");
refframe.transf.rotate(vector(1,0,0),Pi/2);
txtframe=sf.addscreenframe("txtframe");
createobject;
vp=root.Viewports.main;
while true do {
dr1=-1*vp.cameradir;
dr2=vecnorm(dr1*vector(0,1,0));
dr3=vecnorm(dr1*dr2);
sss.light0pos=point(0,0,0)+500*(dr1-dr2-0.5*dr3);
if calcbutton.wasmodified then createobject;
render;
}
|
65d7b33ffb01555134192c6bba138970e02d73a7 | fd6e45f66c41ad779a3d47c3bf8ebfa140d3d657 | /P3 - Non-linear equations /Métodos/4- newton CHECK.sci | 6a5446a9db43e2561bb139c353071a887a7ffcc6 | [] | no_license | jere1882/Numerical-Analysis-Assignments | 7f474e2020d010f9f9c3dceff5e48c03b0d38652 | 1074f92ca93d0a402259f92a0f61f105f25e5230 | refs/heads/master | 2021-09-06T20:00:36.411386 | 2018-02-10T18:04:38 | 2018-02-10T18:04:38 | 121,039,769 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 986 | sci | 4- newton CHECK.sci | function y=fea(x)
y=(%e)^x+2 - x^3
endfunction
//MÉTODO DE NEWTON-RAPHSON -
//Según el x0 inicial puede o no converger, es un método LOCAL
function c=newton1(f,x0,delta,niter)
//niter: cantidad máxima de iteraciones
//delta: tolerancia
c=x0
for x=0:niter
c= c - f(c)/numderivative(f,c)
if (abs(f(c))<delta) then break end
end
endfunction
function c=newton2(f,df,x0,delta,niter)
//df es la derivada de primer orden de f. A veces conviene pasarla de argumento para minimizar errores.
//niter: cantidad máxima de iteraciones
//delta: tolerancia
c=x0
i=0;
while (abs(f(c))<delta & i<niter)
c= c - f(c)/df(c)
i=i+1
end
endfunction
function x0=newton_check(f,df,x0,delta,epsilon,maxit)
for k=1:maxit
x1=x0 - f(x0)/df(x0);
err=abs(x1-x0)
x0=x1;
if (err<delta) | (abs(f(x0))<epsilon) then break end
end
endfunction
|
a4f1a8917b6e120be0712572613ee02b22bb5817 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1748/CH1/EX1.7/Exa1_7.sce | fbbc36f8d6b4dc19e67a772f37630adf5bfcaed8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 604 | sce | Exa1_7.sce | //Exa 1.7
clc;
clear;
close;
//given data
format('v',7);
NoOfPhase=3;//no of phase
Eph=3300/sqrt(3);//in Volts
f=50;//in Hz
Poles=12;//No. of poles
StatorSlots=144//No. of stator slots
SlotsPerPhase=StatorSlots/NoOfPhase;//no. of slots/phase
Conductors=5;//per slot
ConductorsPerphase=SlotsPerPhase*Conductors;//Conductors/Phase
S=ConductorsPerphase;//Conductors/phase
SlotsPerPolePerPhase=SlotsPerPhase/Poles;//no. of slots/phase
Kf=1.11;//Form Factor
Kb=0.96;//Breadth Factor
Kp=1;//For concentric winding
fi=Eph/(2*Kf*Kb*Kp*S*f);//in weber
disp(fi,"The Flux per pole in weber : "); |
54483c46436344191b5c3ff7fe5c35d4aceaa646 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3835/CH4/EX4.4/Ex4_4.sce | d008291cfe1c60ddc7eb19b522af1e59929d7c38 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 179 | sce | Ex4_4.sce | clear
//
i=20
im=i/(1.414) //that is i*root 2
//the heat produced by i is the sum of heat produced by dc and ac current
p=i**2
q=im**2
r=p+q
I=(r**0.5)
printf("\n I= %0.1f A",I)
|
831d1b4237441b3f0c756f2b8cf4dd4cd18f74ef | 449d555969bfd7befe906877abab098c6e63a0e8 | /1871/CH6/EX6.14/Ch06Ex14.sce | 9063d379dbcfaa70fed398e0e4bc0283eed5fa42 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 638 | sce | Ch06Ex14.sce | // Scilab code Ex6.14: Pg:262 (2008)
clc;clear;
mu_O = 1.544; // Refractive index for an ordinary beam
mu_E = 1.553; // Refractive index for an extra-ordinary beam
lambda = 6000e-08; // Wavelength of light, cm
t = lambda/(2*(mu_E - mu_O)); // Thickness of doubly refracting crystal, cm
printf("\nThe thinnest possible quartz = %4.2e cm", t);
printf("\nThe thicknesses which would give the same result are %4.2e cm, %4.2e cm, %4.2e cm,...", t, 3*t, 5*t);
// Result
// The thinnest possible quartz = 3.33e-003 cm
// The thicknesses which would give the same result are 3.33e-003 cm, 1.00e-002 cm, 1.67e-002 cm,...
|
edb9ca3c5a803740d76574910fe4b1490af250e3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /569/CH4/EX4.15/4_15.sci | 0b9208a63c4189d739e84685fd056ee29434a30d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 186 | sci | 4_15.sci | // Calculate natural frequency and setteling time
clc;
K=60*10^3;
M=30;
wn=(K/M)^0.5;
disp(wn,'natural frequency (rad/sec)')
eta=0.7;
ts=4/(eta*wn);
disp(ts,'setteling time (s)') |
63ba32c3a8245bc918ad5951873c7de0b6d8268f | 8781912fe931b72e88f06cb03f2a6e1e617f37fe | /scilab/ofemdemo/ref_elt_test.sci | 7eefdf4d291c2a6c2513998668e6c11803b135f9 | [] | no_license | mikeg2105/matlab-old | fe216267968984e9fb0a0bdc4b9ab5a7dd6e306e | eac168097f9060b4787ee17e3a97f2099f8182c1 | refs/heads/master | 2021-05-01T07:58:19.274277 | 2018-02-11T22:09:18 | 2018-02-11T22:09:18 | 121,167,118 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 10,409 | sci | ref_elt_test.sci | function [Eig_ref,Load_ref,Mat_ref] = ref_elt_test()
// Elts tests with SDT5.1
st=makecell([1 20],'q4p','q8p','t3p','t6p',...
'hexa8','hexa20','penta6','penta15',...
'tetra4','tetra10','tria3','tria6',...
'quad4','quadb','quad9','bar1','flui4',...
'flui6','flui8','beam1');
// missing: mitc4, , beam3, , celas , q5p, q9a ,'dktp',
Eig_ref = cell(28,2);
Load_ref = cell(28,2);
Mat_ref = cell(28,2);
Eig_ref(:,1)=makecell([28 1],...
'[model,def]=q4p(''testeig_0'');',...
'[model,def]=q4p(''testeig_1'');',...
'[model,def]=q4p(''testeig_2'');',...
'[model,def]=q8p(''testeig_0'');',...
'[model,def]=q8p(''testeig_1'');',...
'[model,def]=q8p(''testeig_2'');',...
'[model,def]=t3p(''testeig_0'');',...
'[model,def]=t3p(''testeig_1'');',...
'[model,def]=t3p(''testeig_2'');',...
'[model,def]=t6p(''testeig_0'');',...
'[model,def]=t6p(''testeig_1'');',...
'[model,def]=t6p(''testeig_2'');',...
'[model,def]=hexa8(''testeig'');',...
'[model,def]=hexa20(''testeig'');',...
'[model,def]=penta6(''testeig'');',...
'[model,def]=penta15(''testeig'');',...
'[model,def]=tetra4(''testeig'');',...
'[model,def]=tetra10(''testeig'');',...
'[model,def]=tria3(''testeig'');',...
'[model,def]=tria6(''testeig'');',...
'[model,def]=quad4(''testeig'');',...
'[model,def]=quadb(''testeig'');',...
'[model,def]=quad9(''testeig'');',...
'[model,def]=bar1(''testeig'');',...
'[model,def]=flui4(''testeig'');',...
'[model,def]=flui6(''testeig'');',...
'[model,def]=flui8(''testeig'');',...
'[model,def]=beam1(''testeig'');');
Eig_ref(:,2)=makecell([28 1],... // 5 first frequencies
[4.290291308356445e+002 1.029468636991385e+003 1.231617703770857e+003 ...
2.243426897960302e+003 2.623009060845864e+003],...
[4.290291308356445e+002 1.029468636991385e+003 1.231617703770857e+003 ...
2.243426897960302e+003 2.623009060845864e+003],...
[4.290291308356445e+002 1.029468636991385e+003 1.231617703770857e+003 ...
2.243426897960302e+003 2.623009060845864e+003],...
[4.142427945181728e+002 1.026807469917128e+003 1.220302297159396e+003 ...
2.184430056407337e+003 2.611028503198020e+003],...
[4.142427945181728e+002 1.026807469917128e+003 1.220302297159396e+003 ...
2.184430056407337e+003 2.611028503198020e+003],...
[4.142427945181728e+002 1.026807469917128e+003 1.220302297159396e+003 ...
2.184430056407337e+003 2.611028503198020e+003],...
[4.320148932501105e+002 1.033057952114468e+003 1.277577946848218e+003 ...
2.442645647088966e+003 2.726387923881986e+003],...
[4.320148932501105e+002 1.033057952114468e+003 1.277577946848218e+003 ...
2.442645647088966e+003 2.726387923881986e+003],...
[4.320148932501105e+002 1.033057952114468e+003 1.277577946848218e+003 ...
2.442645647088966e+003 2.726387923881986e+003],...
[4.142816502365818e+002 1.026830998717464e+003 1.221167244359760e+003 ...
2.187347803907836e+003 2.613847849438219e+003],...
[4.142816502365818e+002 1.026830998717464e+003 1.221167244359760e+003 ...
2.187347803907836e+003 2.613847849438219e+003],...
[4.142816502365818e+002 1.026830998717464e+003 1.221167244359760e+003 ...
2.187347803907836e+003 2.613847849438219e+003],...
[2.369319824534588e+002 4.432948705364461e+002 4.441539199366413e+002 ...
1.059701830480197e+003 1.333458699398739e+003],...
[2.004436785427672e+002 4.123575690606958e+002 4.221692869112317e+002 ...
1.034895970117207e+003 1.062616448050249e+003],...
[2.260921850720664e+002 4.449924104312450e+002 4.825413497306591e+002 ...
1.046548578081568e+003 1.263647980847690e+003],...
[1.991636602919263e+002 4.105826286332820e+002 4.196672118522673e+002 ...
1.032662583673201e+003 1.052152322938195e+003],...
[2.330521328094594e+002 4.325465214140272e+002 4.878360332092557e+002 ...
1.026220614384172e+003 1.152063012952191e+003],...
[2.330521328094594e+002 4.325465214140272e+002 4.878360332092557e+002 ...
1.026220614384172e+003 1.152063012952191e+003],...
[6.280657063801294e+000 1.791959245732961e+001 4.994096519040203e+001 ...
6.352001684174435e+001 7.733618138128993e+001],...
'error tria6',...
[6.346021934348538e+000 1.829010649608402e+001 5.729190849598430e+001 ...
6.998476082340356e+001 8.617272848630813e+001],...
[6.279510125347771e+000 1.777159655733382e+001 4.945133978014305e+001 ...
6.374728975055643e+001 7.693504846998744e+001],...
'error quad9',...
[9.462764552681526e+001 3.305515251003152e+002 3.874255569492929e+002 ...
6.663461886157351e+002 1.020312082890833e+003],...
[1.128916716519793e+003 1.395677509724138e+003 1.395677509724340e+003 ...
1.633056209189190e+003 2.108740158389825e+003],...
[1.151386858774883e+003 1.385892352561525e+003 1.385892352561538e+003 ...
1.592071311791083e+003 2.015182364725996e+003],...
[1.137891192596138e+003 1.382144188142123e+003 1.382144188142126e+003 ...
1.589291901269960e+003 2.091034987589612e+003],...
[5.500532920947419e+000 1.692434891456080e+001 4.268331361883924e+001 ...
6.374319296752912e+001 8.902604694376785e+001]);
Load_ref(:,1)=makecell([28 1],...
'[model,def]=q4p(''testload_0'');',...
'[model,def]=q4p(''testload_1'');',...
'[model,def]=q4p(''testload_2'');',...
'[model,def]=q8p(''testload_0'');',...
'[model,def]=q8p(''testload_1'');',...
'[model,def]=q8p(''testload_2'');',...
'[model,def]=t3p(''testload_0'');',...
'[model,def]=t3p(''testload_1'');',...
'[model,def]=t3p(''testload_2'');',...
'[model,def]=t6p(''testload_0'');',...
'[model,def]=t6p(''testload_1'');',...
'[model,def]=t6p(''testload_2'');',...
'[model,def]=hexa8(''testload'');',...
'[model,def]=hexa20(''testload'');',...
'[model,def]=penta6(''testload'');',...
'[model,def]=penta15(''testload'');',...
'[model,def]=tetra4(''testload'');',...
'[model,def]=tetra10(''testload'');',...
'[model,def]=tria3(''testload'');',...
'[model,def]=tria6(''testload'');',...
'[model,def]=quad4(''testload'');',...
'[model,def]=quadb(''testload'');',...
'[model,def]=quad9(''testload'');',...
'[model,def]=bar1(''testload'');',...
'[model,def]=flui4(''testload'');',...
'[model,def]=flui6(''testload'');',...
'[model,def]=flui8(''testload'');',...
'[model,def]=beam1(''testload'');');
Load_ref(:,2)=makecell([28 1],... // norm of rhs (sum)
[3.726779962499650e-001],...
[3.726779962499650e-001],...
[3.726779962499650e-001],...
[2.991758226185836e-001],...
[2.991758226185836e-001],...
[1.449654510422562e+000],...
[3.726779962499650e-001],...
[3.726779962499650e-001],...
[3.726779962499650e-001],...
[2.991758226185836e-001],...
[2.991758226185836e-001],...
[2.991758226185836e-001],...
[4.599044706869436e-001],...
[7.428519928701292e-001],...
[3.612545291956079e-001],...
[4.207492800372717e-001],...
[2.905776397546601e-001],...
[2.905776397546601e-001],...
[2.069139172231414e+000],...
'error tria6',...
[2.067877117114162e+000],...
'error quadb',...
'error quad9',...
[1.108655439013544e-004],...
'error flui4',...
'error flui6',...
'error flui8',...
[7.499033124746842e-005]);
Mat_ref(:,1)=makecell([28 1],...
'k=q4p(''testmat_0'');',...
'k=q4p(''testmat_1'');',...
'k=q4p(''testmat_2'');',...
'k=q8p(''testmat_0'');',...
'k=q8p(''testmat_1'');',...
'k=q8p(''testmat_2'');',...
'k=t3p(''testmat_0'');',...
'k=t3p(''testmat_1'');',...
'k=t3p(''testmat_2'');',...
'k=t6p(''testmat_0'');',...
'k=t6p(''testmat_1'');',...
'k=t6p(''testmat_2'');',...
'k=hexa8(''testmat'');',...
'k=hexa20(''testmat'');',...
'k=penta6(''testmat'');',...
'k=penta15(''testmat'');',...
'k=tetra4(''testmat'');',...
'k=tetra10(''testmat'');',...
'k=tria3(''testmat'');',...
'k=tria6(''testmat'');',...
'k=quad4(''testmat'');',...
'k=quadb(''testmat'');',...
'k=quad9(''testmat'');',...
'k=bar1(''testmat'');',...
'k=flui4(''testmat'');',...
'k=flui6(''testmat'');',...
'k=flui8(''testmat'');',...
'k=beam1(''testmat'');');
Mat_ref(:,2)=makecell([28 1],... // First value of svd for K and M
[3.102772713667655e+011 1.950000000000000e+003],...
[3.800561035200435e+011 1.950000000000000e+003],...
[1.612161301022247e+012 4.084070449666731e+003],...
[9.823923670078130e+011 4.216337962957679e+003],...
[1.162316292536501e+012 4.216337962957679e+003],...
[6.010527746475593e+012 1.373459194188233e+004],...
[3.560133726144175e+011 1.300000000000000e+003],...
[4.368459515211880e+011 1.300000000000000e+003],...
[1.272147901026296e+012 2.722713633111154e+003],...
[1.063787654405139e+012 1.392418991184935e+003],...
[1.265663701554579e+012 1.392418991184935e+003],...
[4.092164186367988e+012 3.199395317077768e+003],...
[2.441860355956611e+011 9.749999527819462e+002],...
[6.330222443973812e+011 3.965718244950989e+003],...
[2.430028333362581e+011 6.500000042119781e+002],...
[8.514963709996585e+011 1.671081632270233e+003],...
[1.859383657182347e+011 3.250000096857548e+002],...
[4.307001902768686e+011 3.403025592105917e+002],...
[3.560133726154119e+009 1.381337170886616e+001],...
'error',...
[2.937062937062937e+009 1.950000000000000e+001],...
[5.798967689221895e+009 1.508165308406692e+001],...
'error',...
[1.319468914507713e+012 1.225221134900020e+004],...
[9.958122890254858e-004 3.281073683617672e-011],...
[6.763038603641406e-004 3.390173746379251e-011],...
[5.000000000000000e-004 5.555555555555552e-011],...
[8.017844029046270e+003 4.200000000000000e+012]); // beam1 new prop
if 1==2
for j1=1:length(Mat_ref)
if iscell(Mat_ref(j1,2).entries)
[max(svd(Mat_ref(j1,2).entries(1))) max(svd(Mat_ref(j1,2).entries(2)))]
else
'error'
end
end
end //1==2
|
1887dcc276f582e2f3271fefe70287bf1a0482fd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2084/CH17/EX17.8w/17_8w.sce | 1e8ab5dd2808c2203bc2793085ae688e90caf3c2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,094 | sce | 17_8w.sce | //developed in windows XP operating system 32bit
//platform Scilab 5.4.1
clc;clear;
//example 17.8w
//calculation of the distance of bright fringe from the central maximum
//given data
lambda1=6500*10^-10//wavelength(in m) of the light beam1
lambda2=5200*10^-10//wavelength(in m) of the light beam2
d=2.0*10^-3//separation(in m) between the slits
D=120*10^-2//separation(in m) between the slits and the screen
n=3//number of the bright fringe
//calculation
y=n*lambda1*D/d//the distance of bright fringe from the central maximum
//from the equation of the distance of bright fringe from the central maximum.....y=n*lambda*D/d
//let m th bright fringe of beam 1 coincides with n th bright fringe of beam 2
//ym = yn
//m : n = 4 : 5.....is their minimum integral ratio
m=4
ym=m*lambda1*D/d//least distance from the central maximum where both wavelengths coincides
printf('the distance of the third bright fringe from the central maximum is %3.2f cm',y*10^2)
printf('\nthe least distance from the central maximum where both the wavelengths coincides is %3.2f cm',ym*10^2)
|
94965caaf7441b777b77ebae92df97905e27212d | 5f48beee3dc825617c83ba20a7c82c544061af65 | /tests/s/63.tst | e369da82737bf9bad11c11632e04776a7cf12638 | [] | no_license | grenkin/compiler | bed06cd6dac49c1ca89d2723174210cd3dc8efea | 30634ec46fba10333cf284399f577be7fb8e5b61 | refs/heads/master | 2020-06-20T12:44:17.903582 | 2016-11-27T03:08:20 | 2016-11-27T03:08:20 | 74,863,612 | 3 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 58 | tst | 63.tst | int f(float x, int y) {
f(x, y);
}
void main(void)
{
} |
bc67e902c40db16a97092b6cbbc1836441a19ba7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /323/CH1/EX1.23/Ex1_23.sce | 9567bd51b331c8d6cce070ceab82aa3994b2835f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 360 | sce | Ex1_23.sce | //Chapter 1,Example 1.23,Pg1.27
clc;
disp("Refer to the figure shown in the diagram")
I1=20/15 //Voltage in the loop divided by the sum of resistances
I2=15/10 //Voltage in the loop divided by the sum of resistances
printf("\n I1=%.2f A \n",I1)
printf("\n I2=%.1f A \n",I2)
Vab=5*I1-6*I2+5+15 //By applying KVL to the loop
printf("\n Vab=%.2f V",Vab)
|
b7105a10491212972c4a8e1477f7a0f688989bfb | 449d555969bfd7befe906877abab098c6e63a0e8 | /1628/CH9/EX9.10/Ex9_10.sce | 6ad2ffb19573035028c6aa19d619133b834228cc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 602 | sce | Ex9_10.sce |
// Example 9.10
// Given i= 10+10SinQ A
// Since it is Unsymetrical waveform
// Average can be found over 1 cycle
// i.e Average Value of Current is i= 10 Amp
I1=10; // Dc Current 10 Amp
I2=10/1.414; // Sinusoidal Current 10/root(2)
Irms=sqrt(I1^2+I2^2); // Rms Value of resultant Current
disp(' Average value of Resultant Current = '+string(I1)+' Amp');
disp(' Rms value of Resultant Current = '+string(Irms)+' Amp');
// p 319 9.10
|
737fb304d613d465f7c55d034ee2bcce6fd6b0f2 | 262ac6443426f24d5d9b13945d080affb0bd6d9b | /opgaves/cijfer/run-me-first.sce | 6be41ba445c45ea83b6063c1db8932110c2afbcc | [] | no_license | slegers/Scilab | 9ebd1d486f28cf66e04b1552ad6e94ea4bc98a0b | 1b5dc3434def66355dafeb97c01916736a936301 | refs/heads/master | 2021-01-12T01:42:01.493578 | 2017-01-09T10:54:09 | 2017-01-09T10:54:09 | 78,420,343 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,625 | sce | run-me-first.sce | funcprot(0)
test_cases = list()
test_cases($+1) = struct('input', struct('n', 1, 'k', 1), 'output', struct('digit', 1))
test_cases($+1) = struct('input', struct('n', 2, 'k', 1), 'output', struct('digit', 2))
test_cases($+1) = struct('input', struct('n', 15, 'k', 7), 'output', struct('digit', 4))
test_cases($+1) = struct('input', struct('n', 17, 'k', 11), 'output', struct('digit', 9))
test_cases($+1) = struct('input', struct('n', 50, 'k', 26), 'output', struct('digit', 8))
function Result = test_case(index)
Result = test_cases(index)
endfunction
function Result = test_case_count()
Result = size(test_cases)
endfunction
function show(index)
tc = test_case(index)
disp('Inputs')
disp('n')
disp(tc.input.n)
disp('k')
disp(tc.input.k)
disp('Outputs')
disp('digit')
disp(tc.output.digit)
endfunction
function Result = check(index)
tc = test_case(index)
[digit] = solve(tc.input.n, tc.input.k)
Result = %t
Result = Result & isequal(digit, tc.output.digit)
endfunction
function Result = failures()
n = test_case_count()
failures = []
for index = 1:n
if ~check(index) then
failures = [ failures, index ]
end
end
Result = failures
endfunction
function report()
[temp, n] = size(failures())
disp( strcat( [ "Number of test cases: ", string(test_case_count()) ] ) )
disp( strcat( [ "Number of failures: ", string(n) ] ) )
disp( strcat( [ "Number of successes: ", string(test_case_count() - n) ] ) )
if n == 0 then
disp("SUCCESS")
else
disp("FAIL")
end
endfunction
|
5456622f3e4d9a858b8420060dbe2004c76a72da | d5bd4b5a4760efd0a3d16d7c39c7b495c5874d28 | /AnalogDigtitalCommunication/Alaw.sci | 937fe0eb8e02d250e10cac07316c5b88afc4a538 | [] | no_license | APU-PhasedArrayBeamForming/Array-Based-Beam-Forming | 27a61bc3cf93e544364121e508dc4d140b7e0cb1 | 4cde46b7aa3f4e995297ac72fc5038fa0cdf083d | refs/heads/master | 2021-01-25T08:01:17.468481 | 2017-06-15T18:47:40 | 2017-06-15T18:47:40 | 93,699,808 | 1 | 1 | null | 2017-06-15T18:47:40 | 2017-06-08T02:36:01 | Scilab | UTF-8 | Scilab | false | false | 475 | sci | Alaw.sci | function [Cx,Xmax] = Alaw(x,A)
//Non-linear Quantization
//A-law: A-law nonlinear quantization
//x = input vector
//Cx = A-law compressor output
//Xmax = maximum of input vector x
Xmax = max(abs(x));
for i = 1:length(x)
if(x(i)/Xmax < = 1/A)
Cx(i) = A*abs(x(i)/Xmax)./(1+log(A));
elseif(x(i)/Xmax > 1/A)
Cx(i) = (1+log(A*abs(x(i)/Xmax)))./(1+log(A));
end
end
Cx = Cx/Xmax; //normalization of output vector
Cx = Cx';
endfunction
|
4589ef2b2d16d2eebd3e6a94b814b6e65f500cf4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /22/CH3/EX3.18/ch3ex18.sce | 5d868c99aa10e8d8e8b60d144a9d932c61dc8b10 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 297 | sce | ch3ex18.sce | //signals and systems
//time domain analysis of discreet time systems
//convolution by sliding tape method
clear;
close;
clc;
n=(0:10)';
y=[0;zeros(length(n)-1,1)];
x=(n+1)^2;
for k=1:length(n)-1
y(k+1)=y(k)+x(k);
end;
clf;
a=gca();
plot2d3(n,y);xtitle('sum','n')
plot(n,y,'b.') |
7ea8715ad7a64de0fd1ea31322c41c79d0b913a0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3821/CH7/EX7.2/Example7_2.sce | 12f2d372cd74f41f986bf55f3f743ed970e22a22 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 693 | sce | Example7_2.sce | ///Chapter No 7 Fluid Mechanics
////Find mass density of oil
///Example 7.2 Page No:114
///Input data
clc;
clear;
V=3*10^-3; //3l of oil in m**3
W=24; //Weight of oil in N
g=9.81; //Gravity in m/s**2
rhow=1000; //Constant value
//Calculation
m=W/g; //Mass in Kg
rho=m/V; //Mass density in kg/m**3
w=W/V; //Weight Density in N/m**3
v=V/m; //Specific volume in m**3/kg
S=rho/rhow; //Specific gravity
//Output
printf('mass= %f kg \n',m);
printf('Mass density= %f kg/m^3 \n',rho);
printf('Weight Density= %f N/m^3\n ',w);
printf('Specific volume= %f m^3/kg \n ',v);
printf('Specific gravity= %f \n ',S);
|
0ed1cd4dbae9f2610c515b29771c467bed545e46 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3782/CH11/EX11.2/Ex11_2.sce | 9e516193333b13aef74790d3174afbfb7e597d98 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 348 | sce | Ex11_2.sce |
//
//
v1=7.534
v2=16.871
v3=15.326
RLatp=255.750+v1+1.825
RLofA=265.109+v2-1.6
RLatB=280.380+v3+2.315
RLofB=298.021-1.450
D3=118.009
printf("\n RL of axis when isnt. at P= %0.3f ", RLatp)
printf("\n RL of A= %0.3f ", RLofA)
printf("\n RL at B= %0.3f ", RLatB)
printf("\n RL of B= %0.3f ", RLofB)
printf("\n Distance between A and B= %0.3f ", D3)
|
cef12f62c9bffc52dc4dd6ea5a3476d09d81f7e5 | 5f48beee3dc825617c83ba20a7c82c544061af65 | /tests/s/46.tst | b3fd1e7581c4983517deaeb5cb01de5e5704ddc5 | [] | no_license | grenkin/compiler | bed06cd6dac49c1ca89d2723174210cd3dc8efea | 30634ec46fba10333cf284399f577be7fb8e5b61 | refs/heads/master | 2020-06-20T12:44:17.903582 | 2016-11-27T03:08:20 | 2016-11-27T03:08:20 | 74,863,612 | 3 | 0 | null | null | null | null | WINDOWS-1251 | Scilab | false | false | 122 | tst | 46.tst | int main(void)
{
int func_arr(int a); /* ошибка: объявление функции внутри блока */
}
|
a651a6c78b862fdd869192ca062c4d7c7da79dcc | 6e257f133dd8984b578f3c9fd3f269eabc0750be | /ScilabFromTheoryToPractice/Programming/testplay_sudoku.sce | c4de8f41e877138bbca1ebfa313e8290381069fd | [] | no_license | markusmorawitz77/Scilab | 902ef1b9f356dd38ea2dbadc892fe50d32b44bd0 | 7c98963a7d80915f66a3231a2235010e879049aa | refs/heads/master | 2021-01-19T23:53:52.068010 | 2017-04-22T12:39:21 | 2017-04-22T12:39:21 | 89,051,705 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 288 | sce | testplay_sudoku.sce | exec('scilab-base-program-load_sudoku-fct.sce',-1) //to delete
S=[ 5 3 0 0 8 0 0 2 0;
8 0 0 0 4 2 0 0 0;
0 0 1 3 0 6 0 8 0;
6 5 3 0 0 0 1 0 2;
2 1 4 6 0 3 5 7 8;
9 0 8 0 0 0 3 6 4;
0 6 0 5 0 1 8 0 0;
0 0 0 4 6 0 0 0 5;
0 4 0 0 3 0 0 1 6];
play_sudoku(S)
|
ec32a321ec2b997db00828017a2f911a0d61659a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1835/CH7/EX7.11/Ex7_11.sce | 6389c17a9c4b5a50a7e05c351db592b0420c9ac1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,067 | sce | Ex7_11.sce | //CHAPTER 7 ILLUSRTATION 11 PAGE NO 207
//TITLE:GOVERNORS
//FIGURE 7.11
clc
clear
//===========================================================================================
//INPUT DATA
PI=3.147
g=9.81// ACCELERATION DUE TO GRAVITY IN N/mm^2
AE=.25// LENGTH OF UPPER ARM IN m
CE=.25// LENGTH OF LOWER ARM IN m
ER=.175// FROM FIGURE 7.11
AP=.025// FROM FIGURE 7.11
FR=AP// FROM FIGURE 7.11
CQ=FR// FROM FIGURE 7.11
m=3.2// MASS OF BALL IN Kg
M=25// MASS OF SLEEVE IN Kg
h=.2// VERTICAL HEIGHT OF GOVERNOR IN m
EM=h// FROM FIGURE 7.11
AF=h// FROM FIGURE 7.11
N=160// SPEED OF THE GOVERNOR IN rpm
HM=(895*EM*(m+M)/(h*N^2*m))
x=HM-EM// LENGTH OF EXTENDED LINK IN m
T1=g*(m+M/2)*AE/AF// TENSION IN UPPER ARM IN N
printf('LENGTH OF EXTENDED LINK = %.3f m\n TENSION IN UPPER ARM =%.3f N',x,T1)
|
b2109469c707f12a7c6ba44b5b8ca5aec7c412ca | 449d555969bfd7befe906877abab098c6e63a0e8 | /3760/CH5/EX5.5/Ex5_5.sce | 4ea7fe6f3655c43f435eb1d37e908867fc135280 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 774 | sce | Ex5_5.sce | clc;
v=230; // rated voltage of motor
f=50; // frequency
p=4; // number of poles
zs=0.6+3*%i; // synchronous impedance
ia1=10; // current drawn by motor at upf
ia2=40; // final current after load is inceased to certain value
vt=v/sqrt(3); // per phase voltage
al=atand(real(zs),imag(zs));
Ef=sqrt((vt-ia1*real(zs))^2+(ia1*imag(zs))^2); // excitation EMF
t1=(ia2*abs(zs))^2;
t2=Ef^2+vt^2;
t3=-2*Ef*vt; // terms needed to evaluate load angle
de=acosd((t1-t2)/t3); // load angle
pi=(Ef*vt*sind(de-al))/abs(zs)+(vt^2*real(zs))/abs(zs)^2; // input power
pf=pi/(vt*ia2);
printf('Power factor is %f lagging\n',pf);
pd=3*(pi-ia2^2*real(zs)); // developed power
ns=(120*f)/p; // synchronous speed
T=(pd*60)/(2*%pi*ns);
printf('Torque developed is %f N-m',T);
|
bcd3ddb0c8b48e525391425916b7a1f7c1be44ce | f294d21389e241f24256934c6349dba3d6fc7991 | /Tests/WT3000.tst | 9482f7bf09b8753a7ed4319137eeb9e0d3ac0701 | [] | no_license | EstefanCanmet/svp_energy_lab | 253b8419cdd4494766da9e7b5c5f197c3fbddf35 | b59c630d5992961a95326eedb48afe7e2716234a | refs/heads/dev | 2021-01-22T20:26:48.570731 | 2020-08-06T13:15:14 | 2020-08-06T13:15:14 | 85,324,762 | 0 | 1 | null | 2020-08-06T13:15:15 | 2017-03-17T15:07:56 | Python | UTF-8 | Scilab | false | false | 915 | tst | WT3000.tst | <scriptConfig name="WT3000" script="das_test">
<params>
<param name="das.wt3000.sample_interval" type="int">1000</param>
<param name="das.wt3000.chan_4_label" type="string" />
<param name="das.wt3000.chan_1_label" type="string">1</param>
<param name="das.wt3000.ip_addr" type="string">192.168.0.10</param>
<param name="das.wt3000.chan_2_label" type="string">2</param>
<param name="das.wt3000.chan_3_label" type="string">3</param>
<param name="das.wt3000.chan_1" type="string">AC</param>
<param name="das.wt3000.chan_2" type="string">AC</param>
<param name="das.wt3000.chan_3" type="string">AC</param>
<param name="das.wt3000.chan_4" type="string">DC</param>
<param name="hil.mode" type="string">Disabled</param>
<param name="das.wt3000.comm" type="string">Network</param>
<param name="das.mode" type="string">Yokogawa WT3000</param>
</params>
</scriptConfig>
|
35e7f2233e3a75c0a7f45c4c9bfd69e2f77172ae | 449d555969bfd7befe906877abab098c6e63a0e8 | /24/CH15/EX15.7/Example15_7.sce | 7182631880f8cbb307e0ac22960117c182e2c4cb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 402 | sce | Example15_7.sce | exec('Bernauli.sci', -1)
//Given that
Ao = 1.2*10^-4 //in m^2
A = 0.35*10^-4 //in m^2
h = 45*10^-3 //in m
density_water = 998 //in kg/m^3
//Sample Problem 15-7
printf("**Sample Problem 15-7\n")
A = [A, Ao]
deltaP = 0 //in N/m^2
density = density_water
V = fsolve([0,0], Bernauli)
FlowRate = A(1)*V(1)
printf("The volume flow rate from the tap is equal to %fcm^3/s", FlowRate*10^6) |
5f53d917b60e6d539a856de0065b72509e420dcf | 449d555969bfd7befe906877abab098c6e63a0e8 | /1217/CH6/EX6.4/Exa6_4.sce | 702174008fbdf67f7988d37642b3ace2138e6f80 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 274 | sce | Exa6_4.sce | // Exa 6.4
clc;
clear;
close;
// given data
fc_original=2;//in KHz
fc_new=3;//in KHz
R_original=8;//in Kohm
R_new=fc_original*R_original/fc_new;//in Kohm
disp("Change the resistance value 8 Kohm to a new value.");
disp(R_new,"New value of resistance in ohm is :") |
d7ec4c8b1e63c5ee4330acfe0858268866e89fe1 | 31cc146b7597c1571ad100fc4dd888898b1b4eb0 | /io/read_ply.sce | f0ed82457ad93423ffc75a36ea75c742d2090511 | [] | no_license | rigid1980/gpp_scilab | a525ae046722e7ba52ebea6003ce712b51631ff6 | fadb75dea26cf341e6dc60874efd88c016df4f3b | refs/heads/master | 2016-09-11T08:37:44.538715 | 2014-03-26T08:37:35 | 2014-03-26T08:37:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,678 | sce | read_ply.sce | //// read_ply
// Read mesh data from ply format mesh file
//
//// Syntax
// [face,vertex]= read_ply(filename)
// [face,vertex,color] = read_ply(filename)
//
//// Description
// filename : string, file to read.
//
// face : double array, nf x 3 array specifying the connectivity of the mesh.
// vertex : double array, nv x 3 array specifying the position of the vertices.
// color : double array, nv x 3 or nf x 3 array specifying the color of the vertices or faces.
//
//// Example
// [face,vertex] = read_ply('cube.ply');
// [face,vertex,color] = read_ply('cube.ply');
//
//// Contribution
// Author: Meng Bin
// Created: 2014/03/05
// Revised: 2014/03/07 by Meng Bin, Block read to enhance reading speed
// Revised: 2014/03/17 by Meng Bin, modify doc format
//
// Copyright 2014 Computational Geometry Group
// Department of Mathematics, CUHK
// http://www.lokminglui.com
function [face,vertex,color] = read_ply(filename)
fid = fopen(filename,'r');
if( fid==-1 )
error('Can''t open the file.');
return;
end
// read header
str = '';
while (~feof(fid) && isempty(str))
str = strtrim(fgets(fid));
end
if ~strcmp(lower(str(1:3)), 'ply')
error('The file is not a valid ply one.');
end
file_format = '';
nvert = 0;
nface = 0;
stage = '';
while (~feof(fid))
str = strtrim(fgets(fid));
if strcmp(lower(str), 'end_header')
break;
end
tokens = regexp(str,'\s+','split');
if (size(tokens,2) <= 2)
continue;
end
if strcmp(lower(tokens(1)), 'comment')
elseif strcmp(lower(tokens(1)), 'format')
file_format = lower(tokens(2));
elseif strcmp(lower(tokens(1)), 'element')
if strcmp(lower(tokens(2)),'vertex')
nvert = str2num(tokens{3});
stage = 'vertex';
elseif strcmp(lower(tokens(2)),'face')
nface = str2num(tokens{3});
stage = 'face';
end
elseif strcmp(lower(tokens(1)), 'property')
end
end
if strcmp(lower(file_format), 'ascii')
[face,vertex,color] = read_ascii(fid, nvert, nface);
//elseif strcmp(lower(file_format), 'binary_little_endian')
//elseif strcmp(lower(file_format), 'binary_big_endian')
else
error('The file is not a valid ply one. We only support ascii now.');
end
fclose(fid);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function [face,vertex,color] = read_ascii(fid, nvert, nface)
// read ASCII format ply file
color = [];
//read vertex info
tot_cnt = 0;
cols = 0;
A = [];
tline = '';
while (~feof(fid) && (isempty(tline) || tline(1) == '#'))
pos = ftell(fid);
tline = strtrim(fgets(fid));
end
C = regexp(tline,'\s+','split');
// read columns of vertex line
cols = size(C,2);
//rewind to starting of the line
fseek(fid, pos,-1);
//vertex and color line format string
format = strcat(repmat('//f ', [1, cols]), '\n');
//start reading
while (~feof(fid) & tot_cnt < cols*nvert)
[A_,cnt] = fscanf(fid,format, cols*nvert-tot_cnt);
tot_cnt = tot_cnt + cnt;
A = [A;A_];
skip_comment_blank_line(fid,1);
end
if tot_cnt~=cols*nvert
warning('Problem in reading vertices. number of vertices doesnt match header.');
end
A = reshape(A, cols, tot_cnt/cols);
vertex = A(1:3,:)';
// extract vertex color
if cols == 6
color = A(4:6,:)';
elseif cols > 6
color = A(4:7,:)';
end
//read face info
tot_cnt = 0;
A = [];
tline = '';
while (~feof(fid) && (isempty(tline) || tline(1) == '#'))
pos = ftell(fid);
tline = strtrim(fgets(fid));
end
C = regexp(tline,'\s+','split');
// read columns of face line
nvert_f = str2num(C{1});
cols = nvert_f+1;
if isempty(color)
cols = size(C,2);
end
//rewind to starting of the line
fseek(fid, pos,-1);
//face and color line format string
format = strcat(repmat('//d ', [1, nvert_f+1]), repmat('//f ', [1, cols-nvert_f-1]));
format = strcat(format, '\n');
while (~feof(fid) & tot_cnt < cols*nface)
[A_,cnt] = fscanf(fid,format, cols*nface-tot_cnt);
tot_cnt = tot_cnt + cnt;
A = [A;A_];
skip_comment_blank_line(fid,1);
end
if tot_cnt~=cols*nface
warning('Problem in reading faces. Number of faces doesnt match header.');
end
A = reshape(A, cols, tot_cnt/cols);
face = A(2:nvert_f+1,:)'+1;
// extract face color
if cols > nvert_f+1
color = A(nvert_f+2:cols,:)';
end
color = color*1.0/255;
function [tline] = skip_comment_blank_line(fid,rewind)
// skip empty and comment lines
// get next content line
// if rewind==1, then rewind to the starting of the content line
tline = '';
if rewind==1
pos = ftell(fid);
end
while (~feof(fid) && (isempty(tline)))
if rewind==1
pos = ftell(fid);
end
tline = strtrim(fgets(fid));
end
if rewind==1
fseek(fid, pos,-1);
end
|
a3ffdc8af73213255b0f7d4b9d66ee4457d5e934 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1964/CH12/EX12.6/ex12_6.sce | 9c15a4be8cbd7e12528cfafba7666d0dfc61c237 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 513 | sce | ex12_6.sce | //Chapter-12, Example 12.6, Page 345
//=============================================================================
clc
clear
//INPUT DATA
Pdc=50;//power in W
Rl=200;//resistance in ohms
ripplefactor=0.01
//CALCULATIONS
Vdc=sqrt(Pdc*Rl);//DC voltage
Vac=ripplefactor*Vdc;//AC voltage
mprintf("Thus AC ripple voltage across the load is %d V",Vac);
//=================================END OF PROGRAM======================================================================================================
|
8b350d65cbe4f17ef7cd1ed40d89e5da586a9f03 | e806e966b06a53388fb300d89534354b222c2cad | /macros/detectFASTFeatures.sci | e78babae6af92018ea73f80e7737cd7dc3a8cf30 | [] | no_license | gursimarsingh/FOSSEE_Image_Processing_Toolbox | 76c9d524193ade302c48efe11936fe640f4de200 | a6df67e8bcd5159cde27556f4f6a315f8dc2215f | refs/heads/master | 2021-01-22T02:08:45.870957 | 2017-01-15T21:26:17 | 2017-01-15T21:26:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,449 | sci | detectFASTFeatures.sci | function [cornerPoints]=detectFASTFeatures(image,varargin)
// This function is used to detect the corner points using FAST Alogrithm
//
// Calling Sequence
// [ Location Count Metric ] = detectFASTFeatures( Image, Name, Value... )
//
// Parameters
// Image: Input Image, should be a 2-D grayscale. The Input Image should be real
// MinQuality [Optional Input Argument]: Minimum Accepted Quality of Corners, can be specified as a scalar value between [0,1]. Default: 0.1
// MinContrast [Optional Input Argument]: Minimum Intensity difference for Corners to be detected, can be specified as a scalar value between[0,1]. Default: 0.2
// ROI [Optional Input Argument]: Specify a rectangular region of operation. Format [ x y width height ]. Default: [1 1 size(Image,2) size(Image,1)]
// Location: Set of x,y coordinates for the deteccted points
// Count: Number of corner points detected
// Metric: Value describing the strength of each detected Point
//
// Description
// The detectFASTFeatures function uses the Features from Accelerated Segment Test (FAST) algorithm to find feature points.
//
// Examples
// image = imread('sample.jpg');
// [location count metric] = detectFastFeatures(image);
//
// With Optional Arguments:
// [location count metric] = detectFASTFeatures(image,"MinContrast",0.2);
//
// Authors
// Umang Agrawal
// Sridhar Reddy
[lhs rhs]=argn(0);
if lhs>3
error(msprintf(" Too many output arguments"));
elseif rhs-1>6
error(msprintf(" Too many input arguments"));
elseif modulo(rhs-1,2)<>0
error(msprintf("Either Argument Name or its Value missing"));
end
imageList=mattolist(image);
select rhs-1
case 0 then
[location count metric]=opencv_detectFASTFeatures(imageList);
case 2 then
[location count metric]=opencv_detectFASTFeatures(imageList,varargin(1),varargin(2));
case 4 then
[location count metric]=opencv_detectFASTFeatures(imageList,varargin(1),varargin(2),varargin(3),varargin(4));
case 6 then
[location count metric]=opencv_detectFASTFeatures(imageList,varargin(1),varargin(2),varargin(3),varargin(4),varargin(5),varargin(6));
end
cornerPoints=struct('Type','cornerPoints','Location',location,'Metric',metric,'Count',count);
//for i=1:count
// cornerPoints(i)=struct('Location',location(i,:),'metric',metric(i,:),'Count',1);
//end
endfunction
|
32f67c723769ade33dbda2a237a27451039378bd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2444/CH5/EX5.10/ex5_10.sce | 99dc75baf2225e306e8ec2448a1b40cfecf94790 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 623 | sce | ex5_10.sce | // Exa 5.10
clc;
clear;
close;
format('v',5)
// Given data
R_G = 3.9*10^6;// in ohm
R_L = 18*10^3;// in ohm
R_D = R_L;// in ohm
g_m = 2*10^-3;// in A/V
r_o = 250*10^3;// in ohm
Cgs = 1*10^-12;// in F
Cgd = 0.25*10^-12;// in F
Rsig = 50*10^3;// in ohm
A_VM =-R_G/(R_G+Rsig)*g_m*r_o*R_D*R_L/(r_o*R_D+R_D*R_L+R_L*r_o);
disp(A_VM,"The midband gain is");
RdasL = (r_o*R_D*R_L)/( (r_o*R_D) +(R_D*R_L)+(R_L*r_o) );// in ohm
Ceq = (1 + g_m*RdasL)*Cgd;// in F
Cin = Cgs+Ceq;// in F
f2 = 1/( 2*%pi*Cin*( (Rsig*R_G)/(Rsig+R_G) ) );// in Hz
f2 = f2 * 10^-3;// in kHz
disp(f2,"The upper 3dB frequency in kHz is");
|
ccaf4d3e6d9bbf1a454298b02744f88c4fffdee8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2168/CH3/EX3.1/Chapter3_example1.sce | 9b7e95257727fe628590b953622bc71e756e8082 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 349 | sce | Chapter3_example1.sce | clc
clear
//Input data
p=[1,8]//Pressure at the beginning and end of compression in kg/m^3
g=1.4//Ratio of specific heats
//Calculations
r=(p(2)/p(1))^(1/g)//Compression ratio
n=(1-(1/r)^(g-1))*100//Air standard efficiency in percent
//Output
printf('Air standard efficiency of an engine working on the Otto cycle is %3.1f percent',n)
|
0f1858e0a0bc344fc3331419e4b3aa6b296b3f5e | 9f9364e082d4bc2f7ee5cbd7a489642615821873 | /src/testCases/test3-12.tst | fdafb58f9ffa0de498f763e5cec26cc6a20bf179 | [] | no_license | abrageddon/DLX-Opt | 4602617f83ddf8cb0fea83fecd2faa362849dfcd | 20038078f11a7ae67e7ab336e551e23966551290 | refs/heads/master | 2021-01-01T05:49:33.218016 | 2013-03-14T06:08:45 | 2013-03-14T06:08:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 229 | tst | test3-12.tst | main
function fibo(n);
array[10] f;
var i;
{
let f[0] <- 0;
let f[1] <- 1;
let i <- 2;
while i < 10 do
let f[i] <- f[i - 1] + f[i - 2];
let i <- i + 1
od;
return f[n]
};
{
call outputnum(call fibo(9))
}.
|
020bf254517203595ad9a2357e092c5e43aa40db | 449d555969bfd7befe906877abab098c6e63a0e8 | /1529/CH13/EX13.9/13_09.sce | 96bbc084144652be3d8b8b210a2c68cc9d2a132e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 918 | sce | 13_09.sce | //Chapter 13, Problem 9, figure 13.41
clc;
E1=4; //e.m.f source 1
E2=2; //e.m.f source 2
r1=2; //resistance in ohm
r2=1; //resistance in ohm
R=4; //resistance in ohm
I1=(E1-E2)/(r1+r2); //current in amperes
E=E1-(I1*r1);
r=(r1*r2)/(r1+r2);
I=E/(r+R);
P=I^2*R; //power dissipated in watt
printf("(i) The 4ohm resistor is removed from the circuit as shown in Fig. 13.42(a)\n\n");
printf("(ii) Current I1 = %f A \n P.d across AB = %f V\n\n",I1,E);
printf("(iii) Removing the sources of e.m.f. gives the circuit shown in Fig. 13.42(b), from which, resistance\n r = %f ohm\n\n",r);
printf("(iv) The equivalent Thévenin’s circuit is shown in Fig. 13.42(c), from which, current,\n I = %f A\n\n",I);
printf("Power dissipated in the 4 resistor, \nP = %f W",P);
|
c6ac042be1f495240df314396cb449cc04ac6176 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2231/CH4/EX4.9/Ex_4_9.sce | ddb36ddaa21cf3a2a210612504bd503c30ea7e12 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex_4_9.sce | //Example 4_9
clc;
clear;close;
//Given data:
V=220;//V
N_NoLoad=1000;//rpm
alfa=0.6;//duty cycle
I=20;//A
Ra=1;//ohm
//Solution :
Eb1=V;//V////at no load
Vin=alfa*V;//V
Eb2=Vin-I*Ra;//V
N=N_NoLoad*Eb2/Eb1;//rpm
disp(N,"Speed of the motor(rpm)");
|
8c6712215daad3ddfbfd47c7d0cf6242b96b91c4 | 3cbee2296fd6b54f80587eead83813d4c878e06a | /sci2blif/sci2blif_added_blocks/speech.sce | 2a243ffd6531a79c1b23a9b713b48f09e917f3c7 | [] | no_license | nikhil-soraba/rasp30 | 872afa4ad0820b8ca3ea4f232c4168193acbd854 | 936c6438de595f9ac30d5619a887419c5bae2b0f | refs/heads/master | 2021-01-12T15:19:09.899590 | 2016-10-31T03:23:48 | 2016-10-31T03:23:48 | 71,756,442 | 0 | 0 | null | 2016-10-24T05:58:57 | 2016-10-24T05:58:56 | null | UTF-8 | Scilab | false | false | 1,197 | sce | speech.sce | //**************************** Speech **********************************
if (blk_name.entries(bl) =='speech') then
addvmm = %t;
mputl("# speech",fd_w);
for ss=1:scs_m.objs(bl).model.ipar(1)
speech_str= '.subckt speech in[0]=net' + string(blk(blk_objs(bl),2))+"_1 in[1]=net"+string(blk(blk_objs(bl),3))+"_1 in[2]=vcc out[0]=net'+ string(blk(blk_objs(bl),2+numofip))+"_" + string(ss)+" out[1]=net'+ string(blk(blk_objs(bl),3+numofip))+"_" + string(ss)+" #c4_ota_bias[0] =" +string(sprintf('%1.3e',scs_m.objs(blk_objs(bl)).model.rpar(2*ss-1)))+"&c4_ota_bias[1] =" +string(sprintf('%1.3e',scs_m.objs(blk_objs(bl)).model.rpar(2*ss)))+"&speech_fg[0] =0&c4_ota_p_bias[0] =105e-9&c4_ota_n_bias[0] =105e-9&c4_ota_p_bias[1] =105e-9&c4_ota_n_bias[1] =105e-9&speech_peakotabias[0] =100e-9&speech_pfetbias[0] =2e-11&speech_peakotabias[1] =9e-10";
mputl(speech_str,fd_w);
mputl(" ",fd_w);
select board_num
case 2 then plcloc=[plcloc;'net'+string(blk(blk_objs(bl),2+numofip))+'_'+ string(ss),'6 '+string(ss)+' 0'];
case 3 then plcloc=[plcloc;'net'+string(blk(blk_objs(bl),2+numofip))+'_'+ string(ss),'1 '+string(ss)+' 0'];
end
end
end
|
128083e698307260c3397488643894bd2ed17e8c | 717ddeb7e700373742c617a95e25a2376565112c | /278/CH8/EX8.4/ex_8_4.sce | 30fb21c4be03b607c50ce69fb140672ebd884e9c | [] | 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 | 532 | sce | ex_8_4.sce | //find working stress in flange
clc
//solution
//given
//refer fig 8.12
D=200//mm
p=0.35//N/mm^2
n=8
d=16//mm
Dp=290//mm
tf=20//mm
//using table ft=14//N/mm^2 ,table 8.2 gives C=9mm
C=9//mm
ft=14//N/mm^2
t=(p*D/(2*ft))+C//mm
d1=d+2//mm//dia of bolts
D1=Dp-d1//mm
pi=3.14
F=(pi/4)*[D1]^2*p//N//force acting to separate flanges
x=90//mm
y=[Dp/2]-[D/2+t]//mm
//let fb be working stress
M=F*y/n//N-mm
//Mr=fb*Z=(1/6)*x*(tf)^2=6000*fb
//M=6000*fb
fb=M/6000//N/mm^2
printf("the working stress is ,%f N/mm^2",fb) |
3fe38ee04f99f40773b778e116451f34a0226df2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3669/CH4/EX4.3/3.sce | aa477893d62062f687bebc334923c8f493c55035 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 511 | sce | 3.sce |
//Variable declaration
n=1;
e=1.6*10**-19;
m=9.1*10**-31; //mass(kg)
h=6.63*10**-34; //planck's constant
L=1*10**-10; //width(m)
//Calculation
E1=n**2*h**2/(8*m*e*L**2); //energy value in ground state(eV)
E2=4*E1; //energy value in 1st state(eV)
E3=9*E1; //energy value in 2nd state(eV)
//Result
printf('energy value in ground state is %0.4f eV",(E1))
printf('\nenergy value in 1st state is %0.2f eV",(E2))
printf('\nenergy value in 2nd state is %0.4f eV",(E3))
|
7fee687aa4a7f723636818f164544a1a21f4eb04 | 449d555969bfd7befe906877abab098c6e63a0e8 | /137/CH15/EX15.2/prob15_2.sce | c268523f371aa4729c5a7b38f11f7fe338d45be1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,721 | sce | prob15_2.sce | // Page no 688
// Example no. 15.2
// N=1
//Here we have given two messages with probabilities m1=0.8 and m2=0.2 . Therefore, Huffman code for the source is simply 0 and 1.
//The length L of this code is calculated as
clear;
clc;
close;
N=1;
p=[.8 .2];//enter probabilities in descending order
n=length(p)
l=[1 1];//code length of individual message according to order
L=0;
for i=1:n
L=L+(p(i)*l(i));
end
disp(L,"Length = ");
// Entropy of source is calculated as
H=0;
for i=1:n
H=H+(p(i)*log2(1/p(i)));
end
disp(+'bit',H,"Entropy of source is, H = ");
// Efficiency of code is given as
N1=H/L;
disp(N1,"Efficiency of code, N = ");
//for N=2
//There are four (2^N) combinations and their probabilities obtained by multiplying individuals probability.
//The length L of this code is calculated as
N=2;
p=[0.64 0.16 0.16 0.04];//enter probabilities in descending order
n=length(p);
l=[1 2 3 3];//code length of individual message according to order
L1=0;
for i=1:n
L1=L1+(p(i)*l(i));
end
L=L1/N;// word length per message
disp(L,"Length = ");
// Efficiency of code is given as
N2=H/L;
disp(N2,"Efficiency of code, N = ");
//for N=3
//There are eight (2^N)combinations and their probabilities obtained by multiplying individuals probability
//The length L of this code is calculated as
N=3;
p=[.512 .128 .128 .128 .032 .032 .032 .008];//enter probabilities in descending order
n=length(p);
l=[1 3 3 3 5 5 5 5];//code length of individual message according to order
L1=0;
for i=1:n
L1=L1+(p(i)*l(i));
end
L=L1/N;// word length per message
disp(L,"Length = ");
// Efficiency of code is given as
N3=H/L;
disp(N3,"Efficiency of code, N = ");
|
dfffda032c7ea045438adccb29eaad1d247e2278 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2606/CH6/EX6.20/ex6_20.sce | 78132ef6cbb17b92d75cc96f8d78b62d117c97bf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 636 | sce | ex6_20.sce | //Page Number: 6.23
//Example 6.20
clc;
//Given
pe=0.01; //Error probability
//(a) Probabilty of more than one error in 10 recieved digits
n=10;
//As P(X>1)=1-P(X=0)-P(X=1)
//Let x=P(X>1)
//s=P(X=0)+P(X=1)
s=0;
for t=0:1
f=(factorial(n))/((factorial(t))*(factorial(n-t)));
s=s+{f*(pe^t)*((1-pe)^(n-t))};
end
x=1-s;
disp(x,'Probabilty of more than one error in 10 recieved digits:');
//(b)Using Poisson approximation
//P(X=k)~[{(%exp)^(-n*p)}*{((n*p)^k)}]/k factorial
s1=0;
for k=0:1
j=factorial(k);
s1=s1+[{exp(-n*pe)}*{((n*pe)^k)}]/j;
end
x1=1-s1;
disp(x1,'Using Poisson Approximation:');
|
f1a7cc3bcd2bf905be3462daefba1c1d448f400f | 449d555969bfd7befe906877abab098c6e63a0e8 | /1388/CH4/EX4.29/4_29.sce | 375d5ede74828ed8bd8c75b61b29f2a230db2743 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 193 | sce | 4_29.sce | clc
//initialisation of variables
G= 145 //cal
R= 1.987 //cal/mole K
T= 95 //C
//CALCULATIONS
P= 10^(-G/(2.303*R*(273+T)))*(624/0.820)
//RESULTS
printf (' vapour pressure= %.f atm',P)
|
84179c59e3bb4d3e6c21af17b75746876a9f54d6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3863/CH8/EX8.12/Ex8_12.sce | 43cebdacd52b49fde44f5869212ad6d029bf9b6d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 426 | sce | Ex8_12.sce | clear
//
//
//Given
//Variable declaration
F=50*10**3 //Shear force in N
b=250 //Base width in mm
h=200 //height in mm
//Calculation
tau_max=int((3*F)/(b*h)) //Maximum shear stress in N/sq.mm
tau=((8*F)/(3*b*h)) //Shear stress at N.A. in N/sq.mm
//Result
printf("\n Maximum shear stress = %0.3f N/mm^2",tau_max)
printf("\n Shear stress at N.A. = %0.3f N/mm^2",tau)
|
f0fc82361bec4cd25db3cbb71242b163ad3be000 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1427/CH18/EX18.45/18_45.sce | a8148a13421d602a154011be8249019e778d9597 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 243 | sce | 18_45.sce | //ques-18.45
//Calculating change in chemical potential of a substance
clc
P1=1; P2=0.5;//partial pressure (in atm)
T=298;//temperature (in K)
C_P=8.314*T*log(P2/P1);
printf("The change in chemical potential is %.4f kJ/mol.",C_P/1000);
|
36196c4374f3186402c9428d0d3581c9f4884447 | 449d555969bfd7befe906877abab098c6e63a0e8 | /797/CH11/EX11.1s/11_01_solution.sce | 3be682b465571ee224aa6bfaecbafd798033c697 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 371 | sce | 11_01_solution.sce | //Solution 11-1
WD=get_absolute_file_path('11_01_solution.sce');
datafile=WD+filesep()+'11_01_example.sci';
clc;
exec(datafile)
//unit conversions
V = V * 1000 / 3600; //from [km/h] to [m/s]
P = P * 1.01325 * 10**5; //from [atm] to [Pa]
T = T + 273; //from [C] to [K]
rho_air = P / ( R * T);
C_D = 2 * F_D / (rho_air * A * V**2);
printf("Drag coefficient is %1.2f", C_D); |
2bdab6aba2c70a7c2cbfa4ccdd458ce6c69807e8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /680/CH4/EX4.01/4_01.sce | 668a51aeed4fe35d00f8c30999b3f746fc5efbf6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 352 | sce | 4_01.sce | //Problem 4.01:
//initializing the variables:
mdt = 0.15; // in kg/sec
v = 420; // in m/sec
//calculation:
vxin = v
vxout = 0
vyin = 0
vyout = v
Fxgc = mdt*(vxout - vxin)
Fygc = mdt*(vyout - vyin)
printf("\n\nResult\n\n")
printf("\n The x-direction supporting force is %.1f N and The y-direction supporting force is %.1f N",Fxgc,Fygc) |
d8097c3d089ad5a8af7e34b953fbadda8489c60e | 449d555969bfd7befe906877abab098c6e63a0e8 | /181/CH2/EX2.30/example2_30.sce | 507b5003dff9a62e349741006918d4a8d0aa0c17 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 716 | sce | example2_30.sce | // Dynamic resistance in forward,reverse direction
// Basic Electronics
// By Debashis De
// First Edition, 2010
// Dorling Kindersley Pvt. Ltd. India
// Example 2-30 in page 105
clear; clc; close;
// Given data
V_T=0.0343; // Thermal voltage at 398K in V
eta=1; // Constant for Ge
// Calculation
// Final expression for r derived after differentiating w.r.t V
r1=((35*10^-6)/(34.3*10^-3))*exp(5.83);
A1=1/r1;
r2=3.185*10^-6
A2=1/r2;
printf("(a)Dynamic resistance in forward direction = %0.3f ohm\n",A1);
printf("(b)Dynamic resistance in reverse direction = %0.3e ohm",A2);
// Result
// (a) Resistance in forward direction = 2.879 ohm
// (b) Resistance in reverse direction = 0.314 Mohm |
721a2845aac08880a25bf29cd4a1ddefb9f848aa | 449d555969bfd7befe906877abab098c6e63a0e8 | /3834/CH13/EX13.2.1/Ex13_2_1.sce | f18d08b292819042eabbec78088450339d06d46c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 709 | sce | Ex13_2_1.sce | //Fiber Optics Communication Technology, by Djafer K. Mynbaev and Lovell L.scheiner
//Windows 8
//Scilab version- 6.0.0
//Example 13.2.1
clc;
clear ;
//given
//case 1
lambda1=1540.56E-9;//wavelength in m
lambda2=1541.35E-9;//wavelength in m
d=5E-6;//grating pitch in m
x=lambda1/d;
theta1=asind(x);////Angle of separation in deg
y=lambda2/d;
theta2=asind(y);//Angle of separation in deg
Asep=theta2-theta1;//Angle of separation in deg
mprintf("Angle of separation = %.3f deg.",Asep);
//case 2
z=tand(theta2)-tand(theta1);
L=245E-6/z;//Length required to separate wavelength in m
mprintf("\nLength required to separate wavelength = %.3f m",L);//the answer vary due to rounding
|
9e6b0da8a21f3bcb5f610106af6d9bb384f867af | 449d555969bfd7befe906877abab098c6e63a0e8 | /2159/CH3/EX3.3/33.sce | 82ad558d19192da77248885bca05520e8a1f203a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 253 | sce | 33.sce | // problem 3.3
d1=0.2
d2=0.1
l=4
x=30
p1=392.4*1000
q=0.035
z1=0
z2=l*sind(x)
a1=3.142*d1*d1/4
a2=3.142*d2*d2/4
v1=q/a1
v2=q/a2
w=9810
g=9.81
p2=((z1-z2)+(((v1^2)-(v2^2))/(2*g))+(p1/w))*w
disp(p2,"pressure intensity at outlet in N/m2")
|
bf0f58ff116b1adee76a998ec4d0ea94ae31d797 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1865/CH3/EX3.2/prob_2.sce | 34deb6a318bf562a35d790071cbb2b85f1f69a11 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 344 | sce | prob_2.sce |
//Problem 2
//Calculate the maximum speed of electron striking the anti-cathode
clear
clc
V=18// Potential difference in kV
e=1.6*10^(-19)//charge on an electron in C
m=9.1*10^(-31)//mass of an electron in kg
v=(2*e*V/m)^(0.5)//maximum speed of electron in m/s
printf('maximum speed of electron striking the anti-cathode = %.1f m/s',v) |
da7f9a8f5666dc804723183e9ef7edcec2469380 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1760/CH5/EX5.65/EX5_65.sce | 89d14cda6d0983a9784fa7e7d707c99e16183b5b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 401 | sce | EX5_65.sce | //EXAMPLE 5-65 PG NO-346
V1=5;
G1=1;
V2=5;
G2=(1/2);
V3=10;
G3=(1/4);
EV=(V1*G1+V2*G2+V3*G3)/(G1+G2+G3); //EQUIVALENT VOLTAGE
ER=1/(G1+G2+G3);
I=(EV*ER)/(EV+ER);
disp('i) Euivalent Resistance (EV) is = '+string (EV) +' V ');
disp('ii) Equivalent Resistance (ER) is = '+string (ER) +' ohms ');
disp('ii) CURRENT (I) is = '+string (I) +' A ');
|
4521cc582aa6a46d88d4bfaac75bf51b6a322ae4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3673/CH2/EX2.a.11/Example_a_2_11.sce | 93467ad372ac3a74bddaeb92ade79fc0abdd1fb6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 155 | sce | Example_a_2_11.sce | //Example 2_11 page no:96
clc;
V=50;
V1=23.33/(0.2+0.5+0.33);
I=(V-V1)/5;
P=V*I;
disp(P,"the power delivered by the 50V voltage source is (in W)");
|
5db106a07d9c2477dfcb5d8736d3e39a65eecca8 | 717ddeb7e700373742c617a95e25a2376565112c | /3044/CH2/EX2.15/Ex2_15.sce | df5f263fba2ef8f14cb15ef28eb75fe7bf780dc3 | [] | 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 | 568 | sce | Ex2_15.sce | //Variable declaration
x = [225 3 ; 265 11; 305 23 ; 345 9 ; 385 4]
temp1 = 0
temp2 = 0
//Calculation
for i = 1:5
temp1 = temp1 + x(i,1)*x(i,2)
end
Mean = temp1/sum(x(1:5,2)) // mean=sum(x(i)*f(i))/sum(f(i) class average
for i = 1:5
temp2 = temp2 + x(i,1)*x(i,1)*x(i,2)
end
variance = (temp2 - (temp1^2) / sum(x(1:5,2))) / (sum(x(1:5,2))-1) // variance
std_dev= sqrt(variance) // standard deviation
//Results
printf ( "mean : %.f ",Mean )
printf ( "variance : %.2f",variance )
printf ( "standard deviation : %.1f",std_dev)
|
8e0eecc695525756632e93b8ba9aaf3b1259d563 | 449d555969bfd7befe906877abab098c6e63a0e8 | /509/CH4/EX4.3/4_3.sci | f9ee2a37abd0f69ad50219e346353669bad9085e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 719 | sci | 4_3.sci | //Chapter 4 Example 3//
clc
clear
// class demand factor=c,//
l1=400;l2=380;l3=350;l4=300;l5=350;l6=500;l7=700;l8=750;l9=900;l10=1200;l11=1350;l12=1200;l13=1000;l14=950;l15=1250;l16=1300;l17=1400;l18=1300;l19=1500;l20=1800;l21=2000;l22=1950;l23=1000;l24=800;// in kWh//
// class contribution factor of street load=cs, of rest of load=cr//
sl=200;// in kW//
md1=sl;// since max demand is street lighting load//
cde=0;// class demand=cde//
cs=cde/md1;
md2=l20;// here non coincident max demand=l20//
cde=l20;
cr=cde/md2;
// diversity factor=df//
df=(md1+md2)/(cs*md1+cr*md2);
printf("\n Diversity factor = %.3f \n",df);
// coincidence factor=cd//
cf=1/df;
printf("\n Coincidence factor = %.2f\n",cf);
|
e073a6d5defa6e0c0529a4af9e615ae8b0748595 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1026/CH13/EX13.2/Example13_2.sce | b8f3bc3ade13e881e5a2ae4f2f3bd4b555cb9c64 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 300 | sce | Example13_2.sce | //chapter13,Example13_2,pg 391
M235U=235//at.mass of 235U
m=10^-3
N=6.023*10^23
Eperfi=200*10^6//energy per fission
E=Eperfi*1.6*10^-19//energy per fission (in joules)
T=10^-6
A=M235U
P=((m*N)/A)*(E/T)//power output
printf("power of explosion\n")
printf("P=%.2f watt",P) |
a16eac7285b062fbe13a9d8d3dcf73785ec0284e | 449d555969bfd7befe906877abab098c6e63a0e8 | /291/CH8/EX8.7b/eg8_7b.sce | 6c6188ed69e0864a1841241df7d0e976742d5189 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | eg8_7b.sce | plant1 = [16 18 9 22 17 19 24 8];
plant2 = [22 18 26 30 25 28];
X1= sum(plant1);
X2 = sum(plant2);
n =length(X1);
m= length(X2);
//disp(X1, X2, X1+X2)
prob1 = 1 - cdfbin("PQ",X1 -1,X1+X2, (4/7), (3/7) );
prob2 = cdfbin("PQ",X1 ,X1+X2, 4/7, 3/7 );
disp(prob1, prob2)
pvalue = 2*min([prob1 prob2]);
disp(pvalue, "The pvalue is") |
61cb2fa56786ecf16aa552bd95c6cc9241506c28 | fa73b9454b1d003e901d57ef2121b7544bcdfef2 | /scenes/custom_4.sce | da160c557088df8b0500ffddc01de0b1a523c658 | [] | no_license | bernielampe1/ray_tracer | ea91cf08188194f6a0d1e8c9e95baa4aea12f021 | 7fa963ccd07695be3a78acd4837af6cd439698b9 | refs/heads/master | 2021-01-02T01:16:52.595743 | 2020-03-02T12:36:03 | 2020-03-02T12:36:03 | 239,428,546 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 7,115 | sce | custom_4.sce | sce1.0
# camera
eyepos 750 75 150
eyedir -0.2 1.0 0.3
eyeup 0.0 0.0 1.0
wdist 20.0
fovy_deg 70
nx 1280
ny 640
#options
max_recursion 24
aasample 20
# scene
ca 0.1 0.1 0.1
background 0 0 0
{
# cylinder cube frame around bottom plane
cr 0.8 0.0 0.8
cp 0.1 0.0 0.1
shininess 10.0
push_matrix
rotate 90.0 1.0 0.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
rotate 90.0 0.0 1.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
translate 1000.0 1000.0 0.0
rotate -90.0 0.0 1.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
translate 1000.0 1000.0 0.0
rotate -90.0 1.0 0.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
}
{
# cylinder cube frame around top plane
cr 0.8 0.0 0.8
cp 0.1 0.0 0.1
shininess 10.0
push_matrix
translate 0.0 0.0 1000.0
push_matrix
rotate 90.0 1.0 0.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
rotate 90.0 0.0 1.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
translate 1000.0 1000.0 0.0
rotate -90.0 0.0 1.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
translate 1000.0 1000.0 0.0
rotate -90.0 1.0 0.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
pop_matrix
}
{
# cylinder cube frame vertically around box
cr 0.8 0.0 0.8
cp 0.1 0.0 0.1
shininess 10.0
push_matrix
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
translate 1000.0 0.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
translate 0.0 1000.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
push_matrix
translate 1000.0 1000.0 0.0
scale 35.0 35.0 1000.0
cylinder
pop_matrix
}
{
#bottom
ca 0.4 0.2 0.2
cr 0.7 0.4 0.4
cp 1.0 1.0 1.0
shininess 100.0
triangle 0.0 0.0 0.0 0.0 1000.0 0.0 1000.0 0.0 0.0
triangle 0.0 1000.0 0.0 1000.0 1000.0 0.0 1000.0 0.0 0.0
}
{
#top
push_matrix
translate 0.0 0.0 1000.0
ca 0.4 0.2 0.2
cr 0.7 0.4 0.4
cp 1.0 1.0 1.0
shininess 100.0
triangle 0.0 0.0 0.0 0.0 1000.0 0.0 1000.0 0.0 0.0
triangle 0.0 1000.0 0.0 1000.0 1000.0 0.0 1000.0 0.0 0.0
pop_matrix
}
{
#left
push_matrix
rotate -90.0 0.0 1.0 0.0
ca 0.2 0.4 0.2
cr 0.4 0.7 0.4
cp 1.0 1.0 1.0
shininess 100.0
triangle 0.0 0.0 0.0 0.0 1000.0 0.0 1000.0 0.0 0.0
triangle 0.0 1000.0 0.0 1000.0 1000.0 0.0 1000.0 0.0 0.0
pop_matrix
}
{
#right
push_matrix
translate 1000.0 0.0 0.0
rotate -90.0 0.0 1.0 0.0
ca 0.2 0.4 0.2
cr 0.4 0.7 0.4
cp 1.0 1.0 1.0
shininess 100.0
triangle 0.0 0.0 0.0 0.0 1000.0 0.0 1000.0 0.0 0.0
triangle 0.0 1000.0 0.0 1000.0 1000.0 0.0 1000.0 0.0 0.0
pop_matrix
}
{
#front
push_matrix
rotate 90.0 1.0 0.0 0.0
ca 0.2 0.2 0.4
cr 0.4 0.4 0.7
cp 1.0 1.0 1.0
shininess 100.0
triangle 0.0 0.0 0.0 0.0 1000.0 0.0 1000.0 0.0 0.0
triangle 0.0 1000.0 0.0 1000.0 1000.0 0.0 1000.0 0.0 0.0
pop_matrix
}
{
#back
push_matrix
translate 0.0 1000.0 0.0
rotate 90.0 1.0 0.0 0.0
ca 0.2 0.2 0.4
cr 0.4 0.4 0.7
cp 1.0 1.0 1.0
shininess 100.0
triangle 0.0 0.0 0.0 0.0 1000.0 0.0 1000.0 0.0 0.0
triangle 0.0 1000.0 0.0 1000.0 1000.0 0.0 1000.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 200.0 775.0 650.0
scale 1.1 0.8 0.9
ball 39.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 724.0 620.0 950.0
scale 1.0 0.6 0.4
ball 39.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 430.0 138.0 74.0
scale 1.4 1.1 0.9
ball 38.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 900.0 900.0 900.0
scale 1.2 1.0 0.8
ball 33.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 102.0 185.0 148.0
scale 0.8 0.9 1.2
ball 41.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 502.0 589.0 448.0
scale 0.7 0.8 1.5
ball 40.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 302.0 389.0 348.0
scale 0.7 0.8 0.5
ball 36.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 302.0 389.0 348.0
scale 0.7 0.8 0.5
ball 45.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 785.0 375.0 103.0
scale 0.8 0.3 1.2
ball 37.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 650.0 230.0 190.0
rotate 15.0 1.0 0.0 0.0
scale 1.0 0.5 1.5
ball 42.0 0.0 0.0 0.0
pop_matrix
}
{
#red ball
ca 0.9 0.1 0.1
cr 1.0 0.2 0.2
cp 0.5 0.2 0.2
push_matrix
translate 500.0 512.0 492.0
scale 1.1 0.5 0.8
ball 32.0 0.0 0.0 0.0
pop_matrix
}
{
push_matrix
translate 250 250 100
pointlight 0 0 0 1.0 1.0 1.0
pop_matrix
}
{
push_matrix
translate 750 800 750
pointlight 0 0 0 1.0 1.0 1.0
pop_matrix
}
end
|
1e138f5e828ce247c03d67b3d53b9a87f9719a58 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/macros/util/mps2linpro.sci | 73e31b6bd71bb25ce6d79b188bf21c2f7836ef2f | [
"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 | 609 | sci | mps2linpro.sci | function [p,C,b,ci,cs,mi]=mps2linpro(mps)
[lhs,rhs]=argn(0)
if type(mps)==10 then //a file name
mps=readmps(mps,[-1000 1000])
end
m=size(mps('rownames'),1)
n=size(mps('colnames'),2)
kobj=mps('irobj')
rowstat=mps('rowstat')
keq=find(rowstat==1)
kge=find(rowstat==2)
kle=find(rowstat==3)
C=full(adj2sp(mps('colpnts'),mps('rownmbs'),mps('acoeff'),[m,n]))
p=C(kobj,:)'
C(kge,:)=-C(kge,:)
C=C([keq;kle;kge],:)
b=mps('rhs');
b(kge,:)=-b(kge,:)
b=b([keq;kle;kge],:)
ci=mps('bounds')(:,1)
cs=mps('bounds')(:,2)
mi=size(keq,'*')
if lhs==1 then
p=tlist(['linpro','p','C','b','ci','cs','mi'],p,C,b,ci,cs,mi)
end
|
bd55451e6541243d85d691f3c67893ac50bf8c88 | 132b4ac959b21691290ffeefbc31eefe24500a25 | /a7/a7/test2.tst | 879bf5f7edb9dfb1de81806ebcfe424863b97cd9 | [] | no_license | HanlonsStraightRazor/cs310 | df790b8c10b1ebb942313b4a620fd3ce655a075b | 0a053116659eb65ffacb9bf410774e31b17e8fbd | refs/heads/master | 2023-03-12T22:35:35.357502 | 2021-03-02T20:47:48 | 2021-03-02T20:47:48 | 343,901,992 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,072 | tst | test2.tst | load Larc.hdl,
set RAM4K[0] %X8101, // 1. li R1 1
set RAM4K[1] %X8202, // 2. li R2 2
set RAM4K[2] %XD512, // 3. sw 5(R1) R2 MEM[6] <-- 2
set RAM4K[3] %XC324, // 4. lw R3 4(R2) R3 <-- MEM[6]
set RAM4K[4] %XF000, // 5. halt
set ROM32K[0] %B0000000001000000,
set ROM32K[1] %B0100100000100001,
set ROM32K[2] %B0000100000000010,
set ROM32K[3] %B1000000000000011,
set ROM32K[4] %B0000100010000100,
set ROM32K[5] %B1000000000000101,
set ROM32K[6] %B0000100100000110,
set ROM32K[7] %B1000000000000111,
set ROM32K[8] %B0000100110001000,
set ROM32K[9] %B1000000000001001,
set ROM32K[10] %B1000000000001010,
set ROM32K[11] %B1000000000001011,
set ROM32K[12] %B1000110000001100,
set ROM32K[13] %B1000101000001101,
set ROM32K[14] %B0000100000101110,
set ROM32K[15] %B0000000000001111,
set ROM32K[16] %B1000000000010000,
set ROM32K[17] %B0000100000110001,
set ROM32K[18] %B1000000000010010,
set ROM32K[19] %B1001000000010011,
set ROM32K[20] %B1100000000010100
;
repeat 100 { tick, tock; }
|
7d1af76b76cb949d6990836da8ea366d4d2b02d4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1949/CH6/EX6.1/Ex6_1.sce | 987ff7c8c3a0e5ae494f5645867d447f9624f6ce | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex6_1.sce | //Chapter-6,Example 6_1,Page 6-26
clc()
//Given Values:
H=198 //Magnetizing Force in Ampere per meter
M=2300 //Magnetization in Ampere per meter
u0=4*%pi*10^-7 //Permeability in vacuum
//Calculations:
//H=(B/u0)-M
B=u0*(H+M) //Flux Density
ur=B/(u0*H) //Relative Permeability
printf('Corresponding Flux Density is =%.5f Wb/m^2 \n \n',B)
printf(' Relative Permeability is =%.2f \n',ur)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.