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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
be5984ebf742427b576512e8deaef3e5ae66320c | d0a6d5d85ead04c9e381d2f60cc2409632e9b3be | /tests/ieee-div-nans.tst | e85a8fbbfe49295bf0187a137f4d804283ce7284 | [
"LicenseRef-scancode-unknown-license-reference",
"Zlib",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-other-permissive",
"BSD-2-Clause"
] | permissive | imane1992/hercules-390 | 841d40e09d28827f24b19edf3c84f602af2a01b0 | 3f185e1a9b5ad526aef41eb48d566e5a5e90a500 | refs/heads/master | 2021-01-19T00:13:57.946438 | 2016-06-12T18:42:38 | 2016-06-12T18:42:38 | 61,064,180 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 10,103 | tst | ieee-div-nans.tst |
*Testcase IEEE-NaNs Test DIVIDE instruction with zero, QNaNs and SNaNs
*Message Testcase ieee-div-nans.tst: IEEE Division with zero and NaNs
*Message ..Test case values include zero, QNaNs, and SNaNs
# Divide adjacent pairs of values in the input set (six values means five results).
#
# Test data: 2, 0, QNaN(1), QNaN(2), SNaN(3), SNaN(4).
# Expected Results +inf, QNaN(1), QNaN(1), SNaN(3), SNaN(3).
#
# NaN payload--in parentheses--is used to confirm that the right NaN ends up in the result.
#
# Tests seven division instructions:
# DIVIDE (BFP short RRE) DEBR
# DIVIDE (BFP short RXE) DEB
# DIVIDE (BFP long, RRE) DDBR
# DIVIDE (BFP long, RXE) DDB
# DIVIDE (BFP extended, RRE) DXBR
#
# Interrupts are masked; no program checks are expected
#
# Also tests the following floating point support instructions
# LOAD (Short)
# LOAD (Long)
# LOAD ZERO (Long)
# STORE (Short)
# STORE (Long)
sysclear
archmode esame
r 1a0=00000001800000000000000000000200 # z/Arch restart PSW
r 1d0=0002000000000000000000000000DEAD # z/Arch pgm chk new PSW disabled wait
# Mainline program.
r 200=B60003EC # STCTL R0,R0,CTLR0 Store CR0 to enable AFP
r 204=960403ED # OI CTLR0+1,X'04' Turn on AFP bit
r 208=B70003EC # LCTL R0,R0,CTLR0 Reload updated CR0
r 20C=4DC00600 # BAS R12,TESTDIV Perform divisions
r 210=B2B203F0 # LPSWE WAITPSW All done, load disabled wait PSW
# BFP Division Short RXE and RRE using NaNs as inputs.
# We cannot use Load Rounded to shrink extended BFP into the shorts needed
# for this test because Load Rounded will convert the SNaNs into QNaNs
# ORG X'600'
#TESTDIV DS 0H
r 600=41200005 # LA R2,5 Set count of division operations
r 604=41300400 # LA R3,SHORTRES Point to start of short BFP quotients
r 608=41700300 # LA R7,SHORTBFP Point to start of short BFP input values
r 60C=0DD0 # BASR R13,0 Set top of loop for short BFP tests
# Top of loop; clear residuals from FPR0, 4, 5
r 60E=B3750000 # LZDR R0 Zero FPR0
r 612=B3750040 # LZDR R4 Zero FPR4
# Collect dividend and divisor, do four divisions, store quotients.
r 616=78007000 # LE R0,0(,R7) Get BFP ext dividend
r 61A=2850 # LDR R5,R0 Duplicate dividend for RRE test
r 61C=78407004 # LE R4,4(,R7) Get BFP ext divisor for RRE test
r 620=ED007004000D # DEB R0,4(,R7) Generate RXE
r 626=B30D0054 # DEBR R5,R4 Generate RRE
r 62A=70003000 # STE R0,0(,R3) Store short BFP RXE
r 62E=70503004 # STE R5,4(,R3) Store short BFP RRE
r 632=41707004 # LA R7,4(,R7) Point to next short BFP input pair
r 636=41303008 # LA R3,8(,R3) Point to next short BFP result pair
r 63A=062D # BCTR R2,R13 Loop through all short BFP test cases
r 63C=47F00700 # B TESTLONG Go test long BFP division.
# BFP Division long RXE and RRE
# ORG X'700'
#TESTLONG DS 0H
r 700=41200005 # LA R2,5 Set count of division operations
r 704=41300440 # LA R3,LONGRES Point to start of long BFP quotients
r 708=41700320 # LA R7,LONGBFP Point to start of extended BFP input values
r 70C=0DD0 # BASR R13,0 Set top of loop for long BFP tests
# Top of loop
# Collect dividend and divisor, do two divisions, store quotients
r 70E=68007000 # LD R0,0(,R7) Get BFP ext dividend
R 712=2850 # LDR R5,R0 Save dividend for RRE
r 714=68407008 # LD R4,8(,R7) Get BFP ext divisor
r 718=ED007008001D # DDB R0,8(,R7) Generate RXE long
r 71E=B31D0054 # DDBR R5,R4 Generate RRE long
r 722=60003000 # STD R0,0(,R3) Store long BFP RXE quotient
r 726=60503008 # STD R5,8(,R3) Store long BFP RRE quotient
r 72A=41707008 # LA R7,8(,R7) Point to next long BFP input pair
r 72E=41303010 # LA R3,16(,R3) Point to next long BFP result pair
r 732=062D # BCTR R2,R13 Loop through all long test cases
r 734=47F00800 # B TESTEXT Skip across patch area
# BFP division extended, RRE only.
# ORG X'800'
#TESTEXT DS 0H
r 800=41200005 # LA R2,5 Set count of division operations
r 804=41300500 # LA R4,EXTDRES Point to start of extended BFP quotients
r 808=41700360 # LA R7,EXTDBFP Point to start of extended BFP input values
r 80C=0DD0 # BASR R13,0 Set top of loop for l*l tests
# Top of loop
# Collect dividend & divisor, do division and Load FP Integer, store results.
r 80E=68007000 # LD R0,0(,R7) Get BFP ext dividend part 1
r 812=68207008 # LD R2,8(,R7) Get BFP ext dividend part 2
r 816=68D07010 # LD R13,16(,R7) Get BFP ext divisor part 1
r 81A=68F07018 # LD R15,24(,R7) Get BFP ext divisor part 2
r 81E=B34D000D # DXBR R0,R13 Generate RRE extended quotient
r 822=60003000 # STD R0,0(,R3) Store extended BFP RRE quotient part 1
r 826=60203008 # STD R2,8(,R3) Store extended BFP RRE quotient part 2
r 82A=41707010 # LA R7,16(,R7) Point to next extended BFP input pair
r 82E=41303010 # LA R4,16(,R3) Point to next extended BFP result
r 832=062D # BCTR R2,R13 Loop through all test cases
r 834=07FC # BR R12 Tests done, return to mainline
#
r 3EC=00040000 # CTLR0 Control register 0 (bit45 AFP control)
r 3F0=00020000000000000000000000000000 # WAITPSW Disabled wait state PSW - normal completion
# 300.20 SHORTBFP DS 0D 6 short BFP (Room for 8)
r 300=40000000 # DC 2
r 304=00000000 # DC 0
r 308=7FC10000 # QNaN(1)
r 30C=7FC20000 # QNaN(2)
r 310=7F830000 # SNaN(3)
r 314=7F840000 # SNaN(4)
# 320.40 LONGBFP DS 0D 6 long BFP (Room for 8)
r 320=4000000000000000 # 2
r 328=0000000000000000 # 0
r 330=7FF8100000000000 # QNaN(1)
r 338=7FF8200000000000 # QNaN(2)
r 340=7FF0300000000000 # SNaN(3)
r 348=7FF0400000000000 # SNaN(4)
# 360.80 EXTDBFP DS 0D 6 Extended BFP (Room for 8, but not 9)
r 360=40000000000000000000000000000000 # 2
r 370=00000000000000000000000000000000 # 0
r 380=7FFF8100000000000000000000000000 # QNaN(1)
r 390=7FFF8200000000000000000000000000 # QNaN(2)
r 3A0=7FFF0300000000000000000000000000 # SNaN(3)
r 3B0=7FFF0400000000000000000000000000 # SNaN(4)
# 400.40 SHORTRES DS 8D Results from short divide, five pairs, room for 8
# 440.80 LONGRES DS 16D Results from long divide, five pairs, room for 8
# 500.80 EXTDRES DS 16D Results from extended divide, five results, room for 8
runtest
r 400.40 # Display short BFP results in test log
r 440.80 # Display long BFP results in test log
r 500.80 # Display extended BFP results in test log
*Compare
r 400.10 # BFP Short quotients part 1 Expecting +inf, +inf, QNaN(1), QNaN(1)
*Want "DEB/DEBR NaN 1/4" 7F800000 7F800000 7FC10000 7FC10000
*Compare
r 410.10 # BFP Short quotients part 2 Expecting QNaN(1), QNaN(1), QNaN(3), QNaN(3)
*Want "DEB/DEBR NaN 2/4" 7FC10000 7FC10000 7FC30000 7FC30000
*Compare
r 420.10 # BFP Short quotients part 3 Expecting QNaN(3), QNaN(3), 0, 0
*Want "DEB/DEBR NaN 3/4" 7FC30000 7FC30000 00000000 00000000
*Compare
r 430.10 # BFP Short quotients part 4 Expecting QNaN(3), QNaN(3), 0, 0
*Want "DEB/DEBR NaN 4/4" 00000000 00000000 00000000 00000000
*Compare
r 440.10 # BFP Long quotients part 1 Expecting +inf, +inf
*Want "DDB/DDBR NaN 1/8" 7FF00000 00000000 7FF00000 00000000
*Compare
r 450.10 # BFP Long quotients part 2 Expecting QNaN(1), QNaN(1)
*Want "DDB/DDBR NaN 2/8" 7FF81000 00000000 7FF81000 00000000
*Compare
r 460.10 # BFP Long quotients part 3 Expecting QNaN(1), QNaN(1)
*Want "DDB/DDBR NaN 3/8" 7FF81000 00000000 7FF81000 00000000
*Compare
r 470.10 # BFP Long quotients part 4 Expecting QNaN(3), QNaN(3)
*Want "DDB/DDBR NaN 4/8" 7FF83000 00000000 7FF83000 00000000
*Compare
r 480.10 # BFP Long quotients part 5 Expecting QNaN(3), QNaN(3)
*Want "DDB/DDBR NaN 5/8" 7FF83000 00000000 7FF83000 00000000
*Compare
r 490.10 # BFP Long quotients part 6 Expecting 0, 0
*Want "DDB/DDBR NaN 6/8" 00000000 00000000 00000000 00000000
*Compare
r 4A0.10 # BFP Long quotients part 7 Expecting 0, 0
*Want "DDB/DDBR NaN 7/8" 00000000 00000000 00000000 00000000
*Compare
r 4B0.10 # BFP Long quotients part 8 Expecting 0, 0
*Want "DDB/DDBR NaN 8/8" 00000000 00000000 00000000 00000000
*Compare
r 500.10 # BFP Extended quotients part 1 Expecting +inf
*Want "DXBR NaN 1/8" 7FFF0000 00000000 00000000 00000000
*Compare
r 510.10 # BFP Extended quotients part 2 Expecting QNaN(1)
*Want "DXBR NaN 2/8" 7FFF8100 00000000 00000000 00000000
*Compare
r 520.10 # BFP Extended quotients part 3 Expecting QNaN(1)
*Want "DXBR NaN 3/8" 7FFF8100 00000000 00000000 00000000
*Compare
r 530.10 # BFP Extended quotients part 4 Expecting QNaN(3)
*Want "DXBR NaN 4/8" 7FFF8300 00000000 00000000 00000000
*Compare
r 540.10 # BFP Extended quotients part 5 Expecting QNaN(3)
*Want "DXBR NaN 5/8" 7FFF8300 00000000 00000000 00000000
*Compare
r 550.10 # BFP Extended quotients part 6 Expecting 0
*Want "DXBR NaN 6/8" 00000000 00000000 00000000 00000000
*Compare
r 560.10 # BFP Extended quotients part 7 Expecting 0
*Want "DXBR NaN 7/8" 00000000 00000000 00000000 00000000
*Compare
r 570.10 # BFP Extended quotients part 8 Expecting 0
*Want "DXBR NaN 8/8" 00000000 00000000 00000000 00000000
*Done
|
bf80c36f6d706b84e0141554c0e6bc515f06b8c1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2084/CH14/EX14.6/14_6.sce | b844596fa6f69a9186a9e60b17d34edacc3bf58e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 384 | sce | 14_6.sce | //developed in windows XP operating system 32bit
//platform Scilab 5.4.1
clc;clear;
//example 14.6
//calculation of the excess pressure inside a mercury drop
//given data
R=2*10^-3//radius(in m) of the drop
S=.464//surface tension(in N/m) of the drop
//calculation
deltaP=2*S/R//excess pressure
printf('the excess pressure inside a mercury drop is %d N/m^2',deltaP)
|
eaa34d6d41c315fc5989d8be7953fece76ba4566 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH5/EX5.20/Ex5_20.sce | 225c932643fb009a840290fcf975f0f171a629c3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 244 | sce | Ex5_20.sce | //Example 5_20
clc;
clear;
close;
format('v',5);
//given data :
I=5;//micro A
V=10;//V
//1/I0*dI0/dT=0.15 & 1/I*dI0/dT=0.07
I0=I/(0.15/0.07);//micro A
//I=I0+IR
IR=I-I0;//micro A
R=V/IR;//Mohm
disp(R,"Leakage Resistance(Mohm)");
|
d1b601d71e5a2d5266bb5f3dd9c5058825659ceb | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH5/EX5.5/5.sce | 07398f3b1bf3064b2a9b8979ffd2bd394563d26e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 276 | sce | 5.sce | clc
disp("(i) Heat abstracted from outside=")
Q1=2*10^5; //kJ/h
W=3*10^4; //kJ/h
Q2=Q1-W;
disp("Heat abstracted from outside=")
disp(Q2)
disp("kJ/h")
disp("(ii) Co-efficient of performance")
COP_hp=Q1/(Q1-Q2);
disp("Co-efficient of performance=")
disp(COP_hp) |
7edf13573d84eb78eb71b8f64af29683df8479b1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /371/CH8/EX8.7/8_7.sci | e81289dd092cd57506e8e156f32d7fd3d40e082f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 903 | sci | 8_7.sci | //Harmonic and Powerfactor with the Converter system//
//Example 8.7//
A=%pi/4;
h=6;
Wv=sqrt(2)*sqrt(h^2-cos(A)^2*(h^2-1))*100/(h^2-1);
printf('voltage ripple of the 6th harmonic=Wv=%fpercent',Wv);
printf('\nFor six pulse converter most effective harmonic is 6th and for worst case A=90degrees\n');
A=%pi/2;
Wv6=sqrt(2)*sqrt(h^2-cos(A)^2*(h^2-1))*100/(h^2-1);//maximum voltage ripple in percentage//
printf('\nmaximum voltage ripple=Wv6=%fpercent',Wv6);
A=%pi/4;
h=12;
Wv=sqrt(2)*sqrt(h^2-cos(A)^2*(h^2-1))*100/(h^2-1);
printf('\nvoltage ripple of the 12th harmonic=Wv=%fpercent',Wv);
A=%pi/2;
Wv12=sqrt(2)*sqrt(h^2-cos(A)^2*(h^2-1))*100/(h^2-1);//maximum voltage ripple in percentage//
printf('\nmaximum voltage ripple=Wv12=%fpercent',Wv12);
PR=(Wv6-Wv12)*100/Wv6;//percentage reduction in max. voltage ripple//
printf('\npercentage reduction in max. voltage ripple=PR=%fpercent',PR); |
97227d3f7f2c49114e001fb68751f8629291f9d8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1655/CH1/EX1.13.1/Example_1_13_1.sce | cc4d5a2401a82f4da0dabbb38b281c4d3a169448 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 566 | sce | Example_1_13_1.sce | // Example 1.13.1 page 1.30
clc;
clear;
Bit_rate = 2d9; // bit rate of channel
// Given sequence is 010111101110
Shortest_duration = 1 * (1/Bit_rate); // shortest duration is '1'
Widest_duration = 4 * (1/Bit_rate); //widest duration is '1111'
Shortest_duration=Shortest_duration*10^9; //Converting into nano seconds
Widest_duration=Widest_duration*10^9; //Converting into nano seconds
printf("\nShortest duration is %.1f nano second.",Shortest_duration);
printf("\nWidest duration is %d nano second.",Widest_duration);
|
1f145a184cc47630ace0f0c6acb8054bede77b23 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1109/CH13/EX13.19/13_19.sce | ed963100563662ae44e0e50b5cd924e804628d6f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 224 | sce | 13_19.sce | clear;
clc;
R1=3;R2=2;R3=2;
A=(R3+R3+R2+R2)/(R1+R3+R1+R2);
Zi1=sqrt((R2*(R1+R3)+(R1*R2))/A);
printf("Zi1 = %f ohms\n",round(Zi1*10)/10);
Zi2=R2+(R3*(R1+Zi1)/(R3+R1+Zi1));
printf(" Zi2 = %f ohms\n",round(Zi2*10)/10);
|
1195bd5f9eecfd74180f58b029da1f0514708486 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1529/CH4/EX4.2/4_02.sce | da3c3a5ff91464c3dfa3a3e8e6194a7a9840b558 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 395 | sce | 4_02.sce | //Chapter 4, Problem 2
clc;
r=0.02; //Internal resistance in ohm
emf=2.0; //e.m.f
I1=5; // Current in ampere
I2=50;
V1=emf-(I1*r); //Calculating Voltage
V2=emf-(I2*r);
printf("Terminal p.d when 5A current = %f V\n\n\n",V1);
printf("Terminal p.d when 50A current = %f V\n\n\n",V2);
|
206a140e962ba28709e421f33717a35c5bf42d28 | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/ismaxphase/ismaxphase1.sce | 9c4b099a459ad22dcb90163864cb6181f2685eba | [] | no_license | deecube/fosseetesting | ce66f691121021fa2f3474497397cded9d57658c | e353f1c03b0c0ef43abf44873e5e477b6adb6c7e | refs/heads/master | 2021-01-20T11:34:43.535019 | 2016-09-27T05:12:48 | 2016-09-27T05:12:48 | 59,456,386 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 282 | sce | ismaxphase1.sce | //
b=[0.7143 0.2857 1.0000];
flag = ismaxphase(b);
//output
//!--error 10000
//no. of columns must be 6
//at line 40 of function ismaxphase called by :
//flag = ismaxphase(b);
//at line 3 of exec file called by :
///ismaxphase1.sce', -1
//matlab o/p
// 1
|
c7eb08c2c5906d3af0ec219e0daccb30236042ab | 449d555969bfd7befe906877abab098c6e63a0e8 | /3845/CH20/EX20.4/Ex20_4.sce | e60949cc7ccf65eef7c4d9e511bc06c2e268a931 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 252 | sce | Ex20_4.sce | //Example 20.4
V=12;//Voltage (V)
I=2.50;//Current (A)
R=V/I;//Resistance from Ohm's law (ohm)
printf('Resistance of automobile headlight = %0.2f ohm',R)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|
fb007b411329047d2a29ecdbbff02824a819a141 | 66106821c3fd692db68c20ab2934f0ce400c0890 | /test/interpreter/mov03.tst | 5c43dcd684aca5dba46c4028b0e6a4ec6859277b | [] | no_license | aurelf/avrora | 491023f63005b5b61e0a0d088b2f07e152f3a154 | c270f2598c4a340981ac4a53e7bd6813e6384546 | refs/heads/master | 2021-01-19T05:39:01.927906 | 2008-01-27T22:03:56 | 2008-01-27T22:03:56 | 4,779,104 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 203 | tst | mov03.tst | ; @Harness: simulator
; @Format: atmel
; @Arch: avr
; @Purpose: "Test the MOV (move between registers) instruction"
; @Result: "r0 = 42, r31 = 42"
start:
ldi r31, 42
mov r0, r31
end:
break
|
9b0ad84791bd4ce26400598b4c2355c87e910afb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2708/CH14/EX14.7/ex_14_7.sce | f99d055a79477bb0c140dec3db6a8891b693bc0c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 496 | sce | ex_14_7.sce | //Example 14.7 // glancing angle
clc;
clear;
//given data :
// 1st part
lamda=1.549;// wavelength in A
d=4.255;// in ter planer spacing in A
n=1;//order of reflection
theta=asin(n*lamda/(2*d));// glacing angle in radian
theta=theta*180/%pi;// to convert in degree
disp(theta,"glancing angle in degree")
// 2nd part
n=2;//order of reflection
theta=asin(n*lamda/(2*d));// glacing angle in radian
theta=theta*180/%pi;// to convert in degree
disp(theta,"glancing angle in degree")
|
ba19d2a1a5bedc4206781ba9b0d9b0358c38ff68 | 8712e7b4614b1ab648f19bcce8ca17e378876546 | /Scilab Sem Interface Grafica/Engine/Funcoes.sce | 77c3c0891971014a4dfb4cc6843e77f054a6eeb5 | [] | no_license | Diogo-Rossi/Mestrado-Diogo-Rossi | d0d476d878c729c44778ea8f364c50c5464fc751 | d544d3bce094931eb96a6031aaa1ae1a833d2b04 | refs/heads/master | 2022-08-26T22:28:04.339221 | 2022-07-11T00:25:21 | 2022-07-11T00:25:21 | 236,889,761 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,740 | sce | Funcoes.sce | function p = Carregamento(n,nc,opC,desC,t0,t1,w1,F,t)
p = zeros(n,1);
for i=1:nc
switch opC(i)
case 1 // ------------------------ Carga Impulsiva Constante
if t < t0(i)
p(desC(i)) = 0;
elseif t <= t0(i)+t1(i)
p(desC(i)) = F(desC(i));
else
p(desC(i)) = 0;
end
case 2 // ------------------------ Carga Triangular Decrescente
slope = F(desC(i))/t1(i);
if t < t0(i)
p(desC(i)) = 0;
elseif t <= t0(i)+t1(i)
p(desC(i)) = F(desC(i)) - slope*(t-t0(i));
else
p(desC(i)) = 0;
end
case 3 // ------------------------ Carga Triangular Simétrica
slope = F(desC(i))/(t1(i)/2);
if t < t0(i)
p(desC(i)) = 0;
elseif t <= t0(i)+t1(i)/2
p(desC(i)) = slope*(t-t0(i));
elseif t <= t0(i)+t1(i)
p(desC(i)) = F(desC(i)) - slope*(t-(t0(i)+t1(i)/2));
else
p(desC(i)) = 0;
end
case 4 // ------------------------ Carga Harmônica Senoidal
p(desC(i)) = F(desC(i))*sin(w1(i)*t);
end
end
end
function f=f(x,CSIp,CSIm)
if 0<=x && x<(1/CSIp) ; f = x; end
if (1/CSIp)<=x && x<CSIp ; f = 1; end
if CSIp<=x && x<CSIm ; f = x; end
if CSIm<=x ; f = CSIm; end
end
|
90cc29784d430f4d89ef7861b271820e57e73853 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2795/CH12/EX12.1/Ex12_01.sce | ae284d941b25a5d4143d444ae4c3b284453bd3e4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 851 | sce | Ex12_01.sce | // Scilab Code Ex12.1: Page-432 (2014)
clc; clear;
h = 6.62e-034; // Planck's constant, Js
h_bar = h/(2*%pi); // Reduced Planck's constant, Js
m = 1.67e-027; // Rest mass of proton, kg
e = 1.602e-019; // Energy equivalent of 1 eV, J
c = 3.00e+008; // Speed of light, m/s
delta_x = 8.0e-015; // Size of the nucleus, m
delta_p = h_bar/(2*delta_x*e); // Uncertainty in momentum of proton from Heisenberg Uncertainty Principle, eV-s/m
p_min = delta_p; // Minimum momentum of the proton inside the nucleus, eV-s/m
K = (p_min*c)^2*e/(2*m*c^2*1e+006); // The minimum kinetic energy of the proton in a medium sized nuclecus, MeV
printf("\nThe minimum kinetic energy of the proton in a medium sized nuclecus = %4.2f MeV", K);
// Result
// The minimum kinetic energy of the proton in a medium sized nuclecus = 0.08 MeV |
3dc4522d641b3fed0a97d6f3718a64a9c5fefe0a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2075/CH8/EX8.6/pe8_6.sce | 25a5489537127f3507e2954bdffd410a4eb69673 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 523 | sce | pe8_6.sce | //example 8.6
clc;funcprot(0);
//Initialization of Variable
R=10;//load
V=120;//rms voltage
f=60;//hertz
T=83.3;//ms
t1=15;//ms
t2=55;//ms
//calculation
Tl=1/f;
disp(Tl*1000,"line period in ms:")
Th=Tl/2;
disp(Th*1000,"half-cycle time in ms:")
C=round(T/Th/100)*100;
disp(C/1000,"cycles:")
D1=.2;
V1=round(V*D1^.5);
disp(V1,"voltage for t1 in V:")
P1=V1^2/R;
disp(P1,"power for t1 in W:")
D2=.7;
V2=round(V*D2^.5);
disp(V2,"voltage for t2 in V:")
P2=V2^2/R;
disp(P2,"power for t2 in W:")
clear()
|
a38d7866b68a3d894c3efacbd6a89127af73158f | 449d555969bfd7befe906877abab098c6e63a0e8 | /608/CH28/EX28.11/28_11.sce | 706669966158ac4028fb4ae2804c4acbe24b7cae | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,296 | sce | 28_11.sce | //Problem 28.11: In an L–R–C series network, the inductance, L = 8 mH, the capacitance, C = 0.3 μF, and the resistance, R = 15 ohm. Determine the current flowing in the circuit when the input voltage is 7.56/_0° V and the frequency is (a) the resonant frequency, (b) a frequency 3% above the resonant frequency. Find also (c) the impedance of the circuit when the frequency is 3% above the resonant frequency.
//initializing the variables:
R = 15; // in ohms
L = 0.008; // IN Henry
C = 0.3e-6; // IN fARADS
rv = 7.56; //in volts
thetav = 0; // in degrees
x = 0.03;
//calculation:
//Resonant frequency,
fr = 1/(2*%pi*((L*C)^0.5))
wr = 2*%pi*fr
//At resonance,
Zr = R
//voltage
V = rv*cos(thetav*%pi/180) + %i*rv*sin(thetav*%pi/180)
//Current at resonance
Ir = V/Zr
//Q-factor at resonance, Q = wr*L/R
Qr = wr*L/R
//If the frequency is 3% above fr, then
del = x
I = Ir/(1 + (2*del*Qr*%i))
Z = V/I
printf("\n\n Result \n\n")
printf("\n (a)Current at resonance, Ir is %.2f A ",Ir)
printf("\n (b)current flowing in the circuit when frequency 3 percent above the resonant frequency is %.4f + (%.4f)i A ",real(I), imag(I))
printf("\n (c)impedance of the circuit when the frequency is 3 percent above the resonant frequency is %.0f + (%.2f)i A ",real(Z), imag(Z)) |
a6d3141063a2f460f6325c357a90863a3581a271 | e7055fdf94e8a24293cab7ccbeac12039d6fe512 | /macros/getParams.sci | 908acfc6d8ae0e596abefa94b834011b6adaf383 | [] | no_license | sidn77/FOSSEE-Image-Processing-Toolbox | 6c6b8b860f637362a73d28dcfe13e87d18af3e2c | 8dfbdbdfd38c73dc8a02d1a25678c4a6a724fe18 | refs/heads/master | 2020-12-02T16:26:06.431376 | 2017-11-08T17:54:03 | 2017-11-08T17:54:03 | 96,552,565 | 0 | 0 | null | 2017-07-07T15:37:18 | 2017-07-07T15:37:18 | null | UTF-8 | Scilab | false | false | 4,522 | sci | getParams.sci | // Copyright (C) 2015 - IIT Bombay - FOSSEE
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Author: Siddhant Narang
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
function param = getParams(classifier, modelName)
// This function is used view the parameters of a trained classifier.
//
// Calling Sequence
// param = getParams(classifier, modelName);
//
// Parameters
// classifier: Image category classifier
// modelName: Name of the model to which the classifier belongs to.
//
// Description
// This function can be used to view the parameters of a trained classifier and
// make changes accordingly in the training process to get accurate results.
//
// Examples
// load("argset3.dat", "knnclassi3"); // Use the scilab load function to load a trained classifier.
// params = getParamsKNN(knnclassi3, "KNN")
//
// Examples
// load("emclassi4.dat", "emclassi4"); // Use the scilab load function to load a trained classifier.
// params = getParams(emclassi4, "EM");
//
// See also
// trainEMClassifier
// trainLRClassifier
// trainKNNClassifier
// trainNBClassifier
// trainSVMClassifier
// trainSVMSGDClassifier
// trainANNClassifier
// trainRTreesClassifier
// trainDTreesClassifier
//
// Authors
// Siddhant Narang
classifier_list = classifierToList(classifier);
[lhs, rhs] = argn(0);
if lhs > 1
error(msprintf("Too many output arguments"));
elseif rhs < 2
error(msprintf("Not enough input arguments"));
elseif rhs > 2
error(msprintf("Too many input arguments"));
end
select modelName
// case "SVM" then
// temp = raw_getParamsSVM(classifier_list);
// param = struct();
// case "svm" then
// temp = raw_getParamsSVM(classifier_list);
// param = struct();
// case "SVMSGD" then
// temp = raw_getParamsSVMSGD(classifier_list, image);
// param = struct();
// case "svmsgd" then
// temp = raw_getParamsSVMSGD(classifier_list, image);
// param = struct();
case "EM" then
temp = raw_getParamsEM(classifier_list);
param = struct("No. of Clusters", temp(1), "Means", temp(2), "Weights", temp(3));
case "em" then
temp = raw_getParamsEM(classifier_list);
param = struct("No. of Clusters", temp(1), "Means", temp(2), "Weights", temp(3));
case "LR" then
temp = raw_getParamsLR(classifier_list);
param = struct("Iterations", temp(1), "Learning Rate", temp(2), "MiniBatchSize", temp(3), "Regularization", temp(4), "Train Method", temp(5), "Learnt Thetas", temp(6));
case "lr" then
temp = raw_getParamsLR(classifier_list);
param = struct("Iterations", temp(1), "Learning Rate", temp(2), "MiniBatchSize", temp(3), "Regularization", temp(4), "Train Method", temp(5), "Learnt Thetas", temp(6));
case "KNN" then
temp = raw_getParamsKNN(classifier_list);
param = struct("Algorithm Type", temp(1), "No of Neighbours", temp(2), "Emax", temp(3));
case "knn" then
temp = raw_getParamsKNN(classifier_list);
param = struct("Algorithm Type", temp(1), "No of Neighbours", temp(2), "Emax", temp(3));
// case "RT" then
// temp = raw_getParamsRT(classifier_list);
// param = struct("No. of Active Variables", temp(1), "CVfolds", temp(2), "maxCatgories", temp(3),"maxDepth", temp(4),"minSample", temp(5),"reg accuracy", temp(6),"isPruned", temp(7),"UseSurrogates", temp(8),"UseSE1Rule", temp(9));
// case "rt" then
// temp = raw_getParamsRT(classifier_list);
// param = struct("No. of Active Variables", temp(1), "CVfolds", temp(2), "maxCax xtgories", temp(3),"maxDepth", temp(4),"minSample", temp(5),"reg accuracy", temp(6),"isPruned", temp(7),"UseSurrogates", temp(8),"UseSE1Rule", temp(9));
// case "ANN" then
// temp = raw_getParamsANN(classifier_list);
// param = struct();
// case "ann" then
// temp = raw_getParamsANN(classifier_list);
// case "DTree" then
// temp = raw_getParamsDTree(classifier_list);
// case "dtree" then
// temp = raw_getParamsDTree(classifier_list);
// param = struct();
// case "Prob" then
// temp = raw_getParamsNB(classifier_list,image_list);
// param = struct("Active Variables", temp(1));
// case "prob" then
// temp = raw_getParamsNB(classifier_list,image_list);
// param = struct("Active Variables", temp(1));
else
mprintf("\nThe given modelName-%s is invalid\n", modelName);
end
endfunction
|
a55c605a0dae44752e6dd9016974229445c2b578 | 16579ad7ed41978f16b6d47b6b231aee1bd1a742 | /TP4/logique_floue.sce | 000da515b4cfd46337ca23105afc1738f6507ec9 | [] | no_license | ALX5/VisA | 0196520651acc9c0ca1e3b8a7bfea3127bbd9258 | 104d51192ed460073eaa48351c6ba9c0252dd19b | refs/heads/master | 2021-01-22T04:36:42.764020 | 2013-12-02T21:34:52 | 2013-12-02T21:34:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,781 | sce | logique_floue.sce | // 2. Opérateurs de la logique floue.
function C=operateurmin(A,B)
// [rows,cols]=size(A);
// for i=1:cols
// if basse(i)>moyenne(i) then
// C(i)=moyenne(i);
// else
// C(i)=basse(i);
// end
// end
C=min(A,B);
endfunction
function C=operateurmax(A,B)
// [rows,cols]=size(A);
// for i=1:cols
// if basse(i)>moyenne(i) then
// C(i)=basse(i);
// else
// C(i)=moyenne(i);
// end
// end
C=max(A,B);
endfunction
function A=appartenance(temperature,abcisses,sousensemble)
i=1;
while temperature>abcisses(1,i),
i=i+1;
end
// Calcul du degré d'appartenance à l'ensemble basse.
m=(sousensemble(i)-sousensemble(i-1))/(abcisses(i)-abcisses(i-1));
p=sousensemble(i-1)-(m*abcisses(i-1));
A=m*temperature+p;
endfunction
// 1. Fonctions.
// GENERATION DES ENSEMBLES FLOUS
abcisses=[0,5,10,15,20,25,30,35,40];
// Ensembles flous.
basse=[1,1,1,0.5,0,0,0,0,0];
moyenne=[0,0,0,0.5,1,0.5,0,0,0];
elevee=[0,0,0,0,0,0.5,1,1,1];
subplot(221);
plot2d(abcisses,basse,style=2);
plot2d(abcisses,moyenne,style=14);
plot2d(abcisses, elevee,style=5);
xtitle("Partition floue de l univers du discours","Température (°C)","Degré d appartenance");
//
// DEGRES D'APPARTENANCE AUX DIFFERENTS SOUS-ENSEMBLES
temperature = 16;
degres_appartenance=[appartenance(temperature,abcisses,basse);appartenance(temperature,abcisses,moyenne);appartenance(temperature,abcisses,elevee)];
// TRACAGE DU GRAPHIQUE DE L'ENSEMBLE FLOU 'TEMPERATURE BASSE OU MOYENNE'
// for i=1:9
// if basse(i)>moyenne(i) then
// basse_ou_moyenne(i)=basse(i);
// else
// basse_ou_moyenne(i)=moyenne(i);
// end
// end
basse_ou_moyenne=operateurmax(basse,moyenne);
subplot(222);
plot2d(abcisses,basse_ou_moyenne);
xtitle("Température basse ou moyenne","Température (°C)");
// 3. Implication floue.
abcisses_mamdani=[0,5,8,10,15,20,25,30,35,40];
chauffer_fort=[0,0,0,1,1,1,1,1,1,1];
subplot(223);
plot2d(abcisses_mamdani,chauffer_fort,style=21);
xtitle("Chauffer fort","Puissance chauffe (KW)");
temperature_mesuree=12;
basse_mamdani=[1,1,1,1,0.5,0,0,0,0,0];
degres_appartenance_mamdani=appartenance(temperature_mesuree,abcisses_mamdani,basse_mamdani);
implication_mamdani=operateurmin(chauffer_fort,degres_appartenance_mamdani);
subplot(224);
plot2d(abcisses_mamdani,implication_mamdani,style=21);
xtitle("Puissance de Chauffe","Puissance chauffe (KW)");
|
3dcb0efa436010b597ffaa6cceeb3ee7c73d3c49 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2063/CH9/EX9.1/9_1.sce | f0875b27aa36793e32654779699fbd6ed2b0b9a7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 919 | sce | 9_1.sce | clc
clear
//Input data
m=1;//Mass of air that has to be compressed in kg
P1=1;//Initial pressure of a single stage reciprocating air compressor in bar
P2=6;//Final pressure in bar
T1=303;//Initial temperature of air in K
n=1.2;//Polytropic index of air
R=287;//Gas constant for air in J/kg K
r=1.4;//Isentropic index
//Calculations
W1=(m*R*T1*log(P2/P1))/1000;//Work required for compression in kJ/kg in Isothermal compression process
W2=((n/(n-1))*m*R*T1*((P2/P1)^((n-1)/n)-1))/1000;//Work required for compression in a polytropic compression process in kJ/kg
W3=((r/(r-1))*m*R*T1*((P2/P1)^((r-1)/r)-1))/1000;//Work required for compression in a Isentropic compression process in kJ/kg
//Output
printf('(a)Work required in a isothermal compression is %3.3f kJ/kg \n(b)Work required in a polytropic compression is %3.3f kJ/kg \n(c)Work required in a isentropic compression is %3.3f kJ/kg',W1,W2,W3)
|
64e64e90d9377f074c8e844c75e85ded9c967e19 | e0124ace5e8cdd9581e74c4e29f58b56f7f97611 | /3899/CH5/EX5.1/Ex5_1.sce | c939730e434cfaa66c8d1ee97cfd351f1a839802 | [] | no_license | psinalkar1988/Scilab-TBC-Uploads-1 | 159b750ddf97aad1119598b124c8ea6508966e40 | ae4c2ff8cbc3acc5033a9904425bc362472e09a3 | refs/heads/master | 2021-09-25T22:44:08.781062 | 2018-10-26T06:57:45 | 2018-10-26T06:57:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,039 | sce | Ex5_1.sce | clear all;
g=9.8;
A1=1;
A2=0.0005;
h1=0;
h2=0;
f1=0.004;
Ts=[100,500,1000];
N=round(8000./Ts)
for m=1:length(Ts),
h1=0;
h=h1
for n=1:N(m),
h1=(100.*f1+A1*h1-A2*100*sqrt(2.*g.*(h1-h2)))./A1
h=[h;h1]
end
subplot(3,1,1);
plot2d3('gnn',Ts(m)*[0:N(m)]',h);
if m==length(Ts) then
xlabel('Time,t or {\itnT_s} (s)')
end
ylabel('h_1()t (m)')
end
for m=2,
h1=0;
h=h1;
for n=1:1:N(m),
h1=(500.*f1+A1*h1-A2*500*sqrt(2.*g.*(h1-h2)))./A1
h=[h;h1]
end
subplot(3,1,2);
plot2d3('gnn',Ts(m)*[0:N(m)]',h);
if m==length(Ts) then
xlabel('Time,t or {\itnT_s} (s)')
end
ylabel('h_2(t) (m)')
end
for m=3,
h1=0;
h=h1;
for n=1:N(m),
h1=(1000.*f1+A1*h1-A2*1000*sqrt(2.*g.*(h1-h2)))./A1;
h=[h;h1];
end
subplot(3,1,3);
plot2d3('gnn',Ts(m)*[0:N(m)]',h);
if m==length(Ts) then
xlabel('Time,t or {\itnT_s} (s)')
end
ylabel('h_3(t) (m)')
end
|
bc51c9ceefd5435bf15cc8367b712d72f9134c6f | 449d555969bfd7befe906877abab098c6e63a0e8 | /662/CH4/EX4.14/ex4_14.sce | 00269d7eb93439afe486e5f7662ad0d65b05dad9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 692 | sce | ex4_14.sce | //Example 4_14
clc
printf("\n [Enter values in single line]) ");
printf("\nEnter character values for c1, c2 and c3 : ");
[a,c1, c2, c3]=mscanf("%c%c%c");
printf("c1 = %c, c2 = %c, c3 = %c ", c1, c2, c3);
//if scanf written as scanf("%c %1s %1s", &c1, &c2, &c3)
printf("\nEnter character values for c1, c2 and c3 : ");
[a,c1, c2, c3]=mscanf("%c%1s%1s");
printf("c1 = %c, c2 = %c, c3 = %c ", c1, c2, c3);
//if scanf written as scanf("%c %c %c", &c1, &c2, &c3)
printf("\nEnter character values for c1, c2 and c3 : ");
[a,c1, c2, c3]=mscanf("%c %c %c"); //if spaces are included between %cs.
printf("c1 = %c, c2 = %c, c3 = %c ", c1, c2, c3);
|
b243ecef3a35541bfb36ccf0a67163939f203863 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.5/Unix-Windows/scilab-2.5/macros/m2sci/%x2sci.sci | 3a49fcd701039a43e423c5482cb9585377b497cc | [
"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 | 585 | sci | %x2sci.sci | function [stk,txt,top]=%x2sci()
// Copyright INRIA
txt=[]
s1=stk(top-1)
s2=stk(top)
if s2(5)=='4' then s2(1)='bool2s('+s2(1)+')',s2(5)='1';s2(2)='0';end
if s1(5)=='4' then s1(1)='bool2s('+s1(1)+')',s1(5)='1';s1(2)='0';end
[e1,te1]=s1(1:2);
[e2,te2]=s2(1:2);
//
if te2=='1'|te2=='2'|te2=='3' then e2='('+e2+')',end
if te1=='2'|te1=='3' then e1='('+e1+')',end
if s1(3)=='1'&s1(4)=='1' then
stk=list(e1+' .* '+e2,'1',s2(3),s2(4),s1(5))
elseif s2(3)=='1'&s2(4)=='1' then
stk=list(e1+' .* '+e2,'1',s1(3),s1(4),s1(5))
else
stk=list(e1+' .* '+e2,'1',s1(3),s1(4),s1(5))
end
top=top-1
|
f696eab1d384cb87dd8bf0b5b07d5c5b5afea37e | 449d555969bfd7befe906877abab098c6e63a0e8 | /431/CH2/EX2.4/EX2_4.sce | e84617383b1fc83662e7359b3b7e2bee38822ed1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 556 | sce | EX2_4.sce | //Calculating average induced emf
//Chapter 2
//Example 2.4
//page 92
clear;
clc;
disp("example 2.4")
P=2 //number of poles
Z=400 //number of conducters
n=300 //speed in rpm
E=200 //voltage of generator
A=2 //number of parallel paths
N=1200 //number of turns in each field coil
phi=(E*60*A)/(Z*n*P) //flux at the end of 0.15sec
t=0.15 //time
printf("magnitude of flux at the end of 15sec is %f wb",phi)
e=N*(phi/t)
printf("\ninduced emf in the field coil= %d volts",e)
|
671eb1ad34e15dde738afaea08b7015c0747b554 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1427/CH18/EX18.21/18_21.sce | ed531fd9aee3ebf32b533cc6ee6a9da185c16d14 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 340 | sce | 18_21.sce | //ques-18.21
//Determining heat of formation at constant volume
clc
H=-74.85;//heat of formation of methane at constant pressure (in kJ/mol)
n=1-2;//change in gaseous moles
T=273+25;//temperature (in K)
U=H*1000-n*8.314*T;//heat of formation at constant volume
printf("Heat of formation at constant volume is %.2f kJ/mol.",U/1000);
|
e5b7773894e937863aaedb1812fbc08dea3840c8 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/tests/examples/cspect.man.tst | 07058c8531fb42bf9f703b6a8eb8c2b17a067b86 | [
"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 | 439 | tst | cspect.man.tst | clear;lines(0);
rand('normal');rand('seed',0);
x=rand(1:1024-33+1);
//make low-pass filter with eqfir
nf=33;bedge=[0 .1;.125 .5];des=[1 0];wate=[1 1];
h=eqfir(nf,bedge,des,wate);
//filter white data to obtain colored data
h1=[h 0*ones(1:maxi(size(x))-1)];
x1=[x 0*ones(1:maxi(size(h))-1)];
hf=fft(h1,-1); xf=fft(x1,-1);yf=hf.*xf;y=real(fft(yf,1));
sm=cspect(100,200,'tr',y);
smsize=maxi(size(sm));fr=(1:smsize)/smsize;
plot(fr,log(sm))
|
780ab8fa1e903eedf5b8ceaedf5dc96c5ef1cff4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /866/CH6/EX6.2/6_2.sce | e956e8573ad4bab294636e8d1ac639b2a1e29679 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 653 | sce | 6_2.sce | clc
//initialisation of variables
W= -10 //KN/m
Yac= 7 //m
xad= -7.5 //m
xac= -15 //m
xcb= 10 //m
//CALCULATIONS
k= Yac/((xac)^2)
yb= k*(xcb)^2
hb= Yac-yb
yd= k*(xad)^2
hd= Yac-yd
A=[(xcb-xac),(hb);(xcb),(-yb)]
b=[-W*(-xac)*(-xad);0]
c= A\b
Rbv= c(1,1)
Rbh= c(2,1)
Rah= Rbh
Rav= -Rbv-W*(-xac)
dybydx= 2*k*xad
alpha= atand(-2*k*xad)
Nd= -Rav*sind(alpha)-Rah*cosd(alpha)+((-W)*(-xad)*sind(alpha))
Sd= -Rav*cosd(alpha)+Rah*sind(alpha)+((-W)*(-xad)*cosd(alpha))
Md= Rav*(-xad)-Rah*hd+W*(-xad)*(-xad/2)
//RESULTS
printf ('Normal force= %.2f kN',Nd)
printf ('\n Shear force=%.2f KN',Sd)
printf (' \n Bending moment=%.1f KNm',Md)
|
a0c6c844da42fd18f67bb8eb8a07cd400faecb62 | c565d26060d56f516d954d4b378b8699c31a71ef | /Scilab/virtual_old/pid_controller/pid_filter_virtual.sci | b82d9d03bac774d3d6b542ef2d2aeb2104d6b931 | [] | no_license | rupakrokade/sbhs-manual | 26d6e458c5d6aaba858c3cb2d07ff646d90645ce | 5aad4829d5ba1cdf9cc62d72f794fab2b56dd786 | refs/heads/master | 2021-01-23T06:25:53.904684 | 2015-10-24T11:57:04 | 2015-10-24T11:57:04 | 5,258,478 | 0 | 0 | null | 2012-11-16T11:45:07 | 2012-08-01T11:36:17 | Scilab | UTF-8 | Scilab | false | false | 941 | sci | pid_filter_virtual.sci | mode(0);
//PI Controller using trapezoidal approximation.
//Heater input is passed as input argument to introduce control effort u(n)
//Fan input is passed as input argument which is kept at constant level
//Range of Fan input :20 to 252
//Temperature is read
function [stop] = pid_filter_virtual(setpoint,fan,K,Ti,Td,N)
global temp heat C0 u_old u_new e_old e_new fdfh fdt fncr fncw m err_count stop q heatdisp fandisp tempdisp setpointdisp limits m x sampling_time e_old_old u_old_old
e_new = setpoint - temp;
Ts=1;
r1=-((Td/N)/((Td/N)+Ts));
S0=K*(1+(Ts/Ti)-(N*r1));
S1=K*((r1*(1+(Ts/Ti)+(2*N)))-1);
S2=-K*r1*(1+N);
u_new = r1*u_old_old-(r1-1)*u_old + S0*e_new + S1*e_old + S2*e_old_old;
heat=u_new;
u_old = u_new;
e_old_old = e_old;
e_old = e_new;
[stop,temp] = comm(heat,fan);//Never edit this line
plotting([heat fan temp setpoint],[0 0 30 0],[100 100 50 1000])
endfunction
|
2347dcd2c24b6e081af7807e8fd7f27df979e2cc | 449d555969bfd7befe906877abab098c6e63a0e8 | /1004/CH1/EX1.25/Ch01Ex25.sci | 738cd375c09cf0ed9cd10cb0c74169ef692a0c32 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 925 | sci | Ch01Ex25.sci | // Scilab Code Ex1.25 Decay of muon: Pg: 31 (2008)
c = 3e+08; // Speed of light, m/s
v = 0.992*c; // Relativistic speed of muon, m/s
S = 60*1e+03; // Distance travelled by muon before it decays, m
t_prime = S/v; // Time measured by observer on earth (Dilated Time), s
t = t_prime*sqrt(1 - (v/c)^2); // Time measured by muon in its own frame, s
s = v*t; // Distance covered by the muon in its own frame of reference, m
printf("\nThe time measured by observer on earth (Dilated Time) = %5.3e s", t_prime);
printf("\nThe time measured by muon in its own frame = %4.2e s", t);
printf("\nThe distance covered by the muon in its own frame of reference = %4.2f km", s/1e+03);
// Result
// The time measured by observer on earth (Dilated Time) = 2.016e-004 s
// The time measured by muon in its own frame = 2.55e-005 s
// The distance covered by the muon in its own frame of reference = 7.57 km |
751f4b7b0df30b6aae37b5c84714597b2c5ec535 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3472/CH2/EX2.1/Example2_1.sce | 641f5335a7822e63652b8d910e6b926edacf2bf1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,155 | sce | Example2_1.sce | // A Texbook on POWER SYSTEM ENGINEERING
// A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar
// DHANPAT RAI & Co.
// SECOND EDITION
// PART I : GENERATION
// CHAPTER 2: THERMAL STATIONS
// EXAMPLE : 2.1 :
// Page number 25-26
clear ; clc ; close ; // Clear the work space and console
//Given data
M = 15000.0+10.0 // Water evaporated(kg)
C = 5000.0+5.0 // Coal consumption(kg)
time = 8.0 // Generation shift time(hours)
//Calculations
//Case(a)
M1 = M-15000.0
C1 = C-5000.0
M_C = M1/C1 // Limiting value of water evaporation(kg)
//Case(b)
kWh = 0 // Station output at no load
consumption_noload = 5000+5*kWh // Coal consumption at no load(kg)
consumption_noload_hr = consumption_noload/time // Coal consumption per hour(kg)
//Results
disp("PART I - EXAMPLE : 2.1 : SOLUTION :-")
printf("\nCase(a): Limiting value of water evaporation per kg of coal consumed, M/C = %.f kg", M_C)
printf("\nCase(b): Coal per hour for running station at no load = %.f kg\n", consumption_noload_hr)
|
0be1ac89e4b68c4ae5ae9181bc9e2775ffb5ffc6 | 6a80aa5f62cfc2c1b93e4bb27545d2b94daa5bdb | /Assignment1/A1_1D_Conduction_Codes/A1_1D_Prob2.sce | 727f52efb4c4f74fdbf976f1569fb29aeada1a61 | [] | no_license | pulkitkatdare/CFD_assignment | ba6094efac2541722c842805c2145ef7d5c8cf70 | c8e599599f7bba38a1b564037df4b6b6fb5ddbdd | refs/heads/master | 2020-07-03T18:27:03.323182 | 2016-10-19T04:57:20 | 2016-10-19T04:57:20 | 67,068,495 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,831 | sce | A1_1D_Prob2.sce | clear
printf("\n*********************2D Heat Conduction***********\n");
//user input
rho = 7750.0; cp = 500.0; k = 16.2;
Lx=1.0; imax=12; jmax = imax;
T0 = 30; Twb = 100; Tsb = 200; Teb = 300; Tnb = 400;
Q_vol_gen=0; epsilon_st=0.0001;
alpha = k/(rho*cp);
DTc = Tnb - Twb; //maximum temperature difference
Dx = Lx/(imax-1); Dy = Dx; Dt = 0.99*0.25*Dx*Dx/(alpha); //grid paramters defined
Da = Dx*Dy //area of the square plate
Q_gen = Q_vol_gen*Da;
//ICs and BCs defined here
T(1, 2:imax-1) = Twb;
T(jmax, 2:imax-1) = Teb;
for j=2:jmax-2
T(j, 1) = Tsb;
T(j, imax) = Tnb;
end
for i =2:imax-1
for j = 2:imax-1
T(j,i) = T0;
end
end
for j=1:jmax-1,
X(j,1:imax-1) = linspace(0, Lx, imax-1);
for i=1:imax-1,
Y(j,i) = (j-1)*Dy;
end
end
Tx(1,1) = X(1,1); Tx(1, imax) = X(1, imax-1); Tx(jmax, 1) = X(jmax-1, 1); Tx(jmax, imax) = X(jmax-1, imax-1);
Ty(1,1) = Y(1,1); Ty(1, imax) = Y(1, imax-1); Ty(jmax, 1) = Y(jmax-1, 1); Ty(jmax, imax) = Y(jmax-1, imax-1);
for j=2:jmax-1,
for i=2:imax-1,
Tx(j, i) = (X(j,i)+X(j,i-1))/2;
Ty(j, i) = (Y(j,i)+Y(j-1,i))/2;
end
end
for i=2:imax-1
Tx(1, i) = (X(1,i)+X(1,i-1))/2;
Ty(1, i) = Y(1, 1);
Tx(jmax, i) = (X(jmax-1,i)+X(jmax-1,i-1))/2;
Ty(jmax, i) = Y(jmax-1, 1);
end
for j=2:jmax-1
Ty(j, 1) = (Y(j,1)+Y(j-1,1))/2;
Tx(j, 1) = X(1, 1);
Ty(j, imax) = (Y(j,imax-1)+Y(j-1,imax-1))/2;
Tx(j, imax) = X(1, imax-1);
end
figure(1)
plot(X,Y,'m-s');
xlabel('X'); ylabel('Y');
plot(Tx,Ty,'k-o');
unsteadiness_nd = 1;
n = 0 ;
T_old1 = T
while (unsteadiness_nd >= epsilon_st)//note that the y coordinate is always written first in a matrix notation
T_old = T
n = n + 1 ;
for j = 2:imax-1
for i = 1:imax-1
if (i == 1) | (i == imax-1)
qx(j,i) = -k*(T_old(j,i+1) - T_old(j,i))/(Dx/2.0);
else
qx(j,i) = -k*(T_old(j,i+1) - T_old(j,i))/(Dx);
end
end
end
for j = 1:imax-1
for i = 2:imax-1
if (j == 1) | (j == imax-1)
qy(j,i) = -k*(T_old(j+1,i) - T_old(j,i))/(Dx/2.0);
else
qy(j,i) = -k*(T_old(j+1,i) - T_old(j,i))/(Dx);
end
end
end
for j = 2:imax-1
for i = 2:imax-1
Q_cond(j,i) = (qx(j,i-1) - qx(j,i))*Dy + (qy(j-1,i) - qy(j,i))*Dx
T(j,i) = T_old(j,i) + (Dt/(rho*cp*Da))*(Q_cond(j,i)+Q_gen);
end
end
unsteadiness=max(abs(T-T_old))/Dt;
unsteadiness_nd=unsteadiness*Lx*Lx/(alpha*DTc); //STEP 5: Steady state converegnce criterion
printf("Time step no. %5d, Unsteadiness) = %8.4e\n", n , unsteadiness);
end
//
//figure(2)
//title('TEMPERATURE PROFILE PLOT','color','black','fontsize',3);
//Sgrayplot(linspace(0,Lx,12),linspace(0,Lx,12),T, strf='090')
xset("colormap", jetcolormap(64)),colorbar(0,150),Sgrayplot(linspace(0,Lx,12),linspace(0,Lx,12),T, strf='100')
|
6ffe04b235e84171881a899c010ef9c71fff6957 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3843/CH9/EX9.15/Ex9_15.sce | 9fde5451a9bee79e57a832fe02350a9baa80ebc4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 560 | sce | Ex9_15.sce | // Example 9_15
clc;funcprot(0);
// Given data
T_2=-10+273;// K
T_4=30+273;// K
r=10;// The compression ratio
c_p=1.00// kJ/kg.K
k=1.4;// The specific heat ratio
// Calculation
T_3=T_2*(r)^((k-1)/k);// K
T_1=T_4*(1/r)^((k-1)/k);// K
T_1C=T_1-273;// The minimum cycle temperature in °C
q_in=c_p*(T_2-T_1);// kJ/kg
w_comp=c_p*(T_3-T_2);// kJ/kg
w_turb=c_p*(T_4-T_1);// kJ/kg
COP=q_in/(w_comp-w_turb);// The coefficient of performance
printf("\nThe minimum cycle temperature,T_1=%3.0f°C \nThe coefficient of performance,COP=%1.2f",T_1C,COP);
|
6d9cf5d4ebafc61687e15745fbf5718ce8a3660a | 1ebbdce5d3f3daa6d9e8b439410e447941bc49f5 | /résolution numérique/script2.sce | 94851cfcac1de6d891b6ff4dc8b0661a2cfe3579 | [] | no_license | sebastienbaur/legionella_proliferation_modeling | 2aff0e2499584e99c07116a700e43218976b9b12 | ae9b5d4dde1912a98584c6319eae41980355ef03 | refs/heads/master | 2020-03-07T15:25:49.881820 | 2018-03-31T17:27:52 | 2018-03-31T17:27:52 | 127,554,634 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 6,777 | sce | script2.sce | // -----------------------------------------------------------------------------
// VALEURS NUMERIQUES DES CONSTANTES DU PROBLEME
// -----------------------------------------------------------------------------
// constantes de Monod :
k_1 = 100*10^(-5) ; // constante de vitesse légionnelle-nutriment
k_2 = 2*10^(-4) ;
k_3 = 100*10^(-5) ; // constante de vitesse légionnelle-amibe
k_4 = 2*10^(-4) ;
k_5 = 100*10^(-5) ; // constante de vitesse amibe-nutriment
k_6 = 2*10^(-4) ;
// masses volumiques
rho_A = 1;
rho_L = 1;
// coefficient de diffusion
D = 10^(-10);
// coefficient d'arrachement
lambda = 0;
// flux à la limite supérieure de substrat
phi_0 = 1;
// discrétisation du temps et de l'espace
N = 2000*201;
M = 100;
T = 2000;
L = 10^(-6)*M;
t = linspace(0,T,N+1);
z = linspace(0,L,M+1);
dt = t(2) - t(1);
dz = z(2) - z(1);
// VALEURS INITIALES DES VARIABLES, à t = 0
tCourant = 0;
L0 = zeros(M,1);
L0(1) = 1/2 ;// valeur du vecteur légionnelle à l'instant initial
L0(2)=1/2;
L0(3)=1/2;
L0(4)=1/2;
LCourant = l0;
LAvant = l0;
A0 = zeros(M,1); // valeur du vecteur amibe à l'instant initial
A0(1) = 1/2 ;
A0(2)=1/2;
A0(3)=1/2;
A0(4) = 1/2;
ACourant = A0;
AAvant = A0;
S0 = 100*ones(M,1);
//S0 = zeros(M,1); // valeur du vecteur substrat à l'instant initial
//S0(1,1) = 100;
//S0(2,1) = 100;
SCourant = S0;
//e0 = dz; // épaisseur initiale
//eCourant = e0;
vitesse0 = zeros(M,1);
// vitesse0(1)=10^(-8);
vitesseCourante = vitesse0;
multiplieur = ones(1,M);
m_L = [];
m_A = [];
m_S = [];
m_L_relatif = [];
m_A_relatif = [];
m_S_relatif = [];
// remarque : ci-dessous, la composante de la i_ème ligne, j_ème colonne des matrices l, a, S, et V donne les valeurs de l, a, S et V en z_i, à l'instant t_j
// remarque2 : ci-dessous, le vecteur ligne E contient à la j_ème colonne la valeur de l'épaisseur du biofilm à l'instant t_j
L = [L0];
A = [A0];
S = [S0];
V = [vitesse0];
//E = [e0];
m_L = [m_L dz*10^(-4)*(L(1,1)+L(2,1))];
m_A = [m_A dz*10^(-4)*(A(1,1)+A(2,1))];
m_S = [m_S dz*10^(-4)*(S(1,1)+S(2,1))];
m_L_relatif = [1];
m_A_relatif = [1];
m_S_relatif = [1];
// -----------------------------------------------------------------------------
// QUELQUES MATRICES UTILES DANS LES CALCULS
// -----------------------------------------------------------------------------
one = ones(M,1); // vecteur colonne à M lignes qui ne contient que des 1
anotherOne = ones(M-1,1);
identity = diag(one,0); // matrice identité de taille M
surDiag = diag(anotherOne,1); // matrice carrée de taille M dont la surdiagonale ne contient que des 1, le reste est nul
sousDiag = diag(anotherOne,-1); // matrice carrée de taille M dont la sousdiagonale ne contient que des 1, le reste est nul
matriceDeriveePremiere = identity - sousDiag;
matriceDeriveePremiere(1,1) = 0;
matriceDeriveeSeconde = -2*identity + surDiag + sousDiag;
matriceDeriveeSeconde(1,1) = 0;
matriceDeriveeSeconde(1,2) = 0;
matriceDeriveeSeconde(M,M) = 0;
matriceDeriveeSeconde(M,M-1) = 0;
matriceVitesse = identity;
for i = 1 : M
matriceVitesse = matriceVitesse + surDiag^i;
end
matriceVitesse = matriceVitesse';
i=-1;
// -----------------------------------------------------------------------------
// BOUCLE QUI CALCULE LES DIFFERENTES VALEURS DES LEGIONNELLES, AMIBES, SUBSTRATS, VITESSE, ET EPAISSEUR DU BIOFILM
// -----------------------------------------------------------------------------
while (tCourant < T)
i=i+1;
// calcul des valeurs des légionnelles, amibes, et substrats à l'instant j pour les différentes abscisses z_i
LCourant = LCourant + dt * (monodL(SCourant, LCourant, ACourant).*LCourant - (1/dz) * matriceDeriveePremiere * (vitesseCourante .* LCourant));
// lCourant = lCourant + dt * (monodL(SCourant, lCourant, aCourant) - deriveeVitesse(SCourant, lCourant, aCourant)) .* lCourant - dt * vitesseCourante.*((1/dz)*matriceDeriveePremiere*lCourant);
LCourant(1,1) = LCourant(2,1);
ACourant = ACourant + dt * (monodA(SCourant, LAvant, ACourant).*ACourant - (1/dz) * matriceDeriveePremiere * (vitesseCourante .* ACourant));
// aCourant = aCourant + dt * (monodA(SCourant,l(:,$),aCourant) - deriveeVitesse(SCourant,l(:,$),aCourant)) .* aCourant - dt*vitesseCourante.*((1/dz)*matriceDeriveePremiere*aCourant);
ACourant(1,1) = ACourant(2,1);
SCourant = SCourant + dt * (D * (1/(dz*dz) ) * (matriceDeriveeSeconde * SCourant) + consoNutri(SCourant,LAvant,AAvant)); //.* SCourant);
SCourant(1,1) = SCourant(2,1);
SCourant(M,1) = 100;
// calcul de l'épaisseur grâce à la condition à la limite de/dt = -lambda e^2 + u(t,e(t))
// indiceEpaisseur = round(eCourant/dz);
// eCourant = eCourant + dt * (-lambda * eCourant^2 + vitesseCourante(indiceEpaisseur,1) );
// calcul de la vitesse
vitesseCourante = dz * matriceVitesse * deriveeVitesse(SCourant,LCourant,ACourant);
// incrémentation du temps
tCourant = tCourant + dt;
// troncage des vecteurs au delà de l'épaisseur du biofilm
// for i = indiceEpaisseur+1:M
// lCourant(i,1)=0;
// aCourant(i,1)=0;
// SCourant(i,1)=0;
// end
// conditions limites : flux nul aux interfaces
// aCourant(1,1)=aCourant(2,1);
// lCourant(1,1)=lCourant(2,1);
// SCourant(1,1)=SCourant(2,1);
// aCourant(indiceEpaisseur,1)=aCourant(indiceEpaisseur-1,1);
// lCourant(indiceEpaisseur,1)=lCourant(indiceEpaisseur-1,1);
// SCourant(indiceEpaisseur,1)=SCourant(indiceEpaisseur-1,1);
// enregistrement des nouvelles valeurs des grandeurs observées
if modulo(i,1000) == 0 then
A = [A aCourant];
L = [L lCourant];
S = [S SCourant];
// E = [E eCourant];
V = [V vitesseCourante];
m_A = [m_A dz*10^(-4)*multiplieur*ACourant];
m_S = [m_S dz*10^(-4)*multiplieur*SCourant];
m_L = [m_L dz*10^(-4)*multiplieur*LCourant];
m_L_relatif = [m_L_relatif m_L(1,i/1000+2)/m_L(1,1)];
m_A_relatif = [m_A_relatif m_A(1,i/1000+2)/m_A(1,1)];
m_S_relatif = [m_S_relatif m_S(1,i/1000+2)/m_S(1,1)];
end
AAvant = ACourant;
LAvant = LCourant;
// permet de tomber pile sur T à la fin
dt = min(dt, T - tCourant);
end
//plot2d(linspace(0,T,N+2)',[m_S(1,:)',m_L(1,:)',m_A(1,:)'],leg = "m_S@m_L@m_A");
//xtitle("avec amibes","t (en s)","m (en kg)")
//plot2d(linspace(0,T,N+1)',[m_S_relatif(1,:)',m_L_relatif(1,:)',m_A_relatif(1,:)'],leg="m_S@m_L@m_A");
//xtitle("évolution temporelle des masses relatives avec amibes","t (en s)","m/m0 (sans unité)");
//plot2d(linspace(0,T,N+2)',[S(1,:)',S(5,:)',S(7,:)',S(10,:)',S(12,:)',S(13,:)'],leg="z=0@z=5@z=7@z=10@z=12@z=13", rect = [0,0,1000,0.4]);
//xtitle("évolution temporelle de S(z,t) à différents z, ","t (en s)","C_s (en g/L)");
|
d85e942d419dad345eb4cbd65607124a4295678f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2075/CH1/EX1.7/pe1_7.sce | 532397fe4f0ce87217072eea6b1d49f4a91670f3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 298 | sce | pe1_7.sce | //example 1.7
clc; funcprot(0);
// Initialization of Variable
Vs=18;//V
Rl=8;//load resistance
Pll=100;//power
//calculation
Vlp=Vs-4;
Vlr=Vlp/(2^.5);
disp(Vlr,"rms voltage in V:")
Pl=(Vlr^2)/Rl;
disp(Pl,"power delivered in W:")
Vl=(Pll*Rl)^.5;
disp(Vl,"load voltage in V:")
clear()
|
5f94e63c57fa02ec7c293c4544828f9b5c444566 | 449d555969bfd7befe906877abab098c6e63a0e8 | /929/CH11/EX11.4/Example11_4.sce | 40f332c5a10cbf689996ad76abda79946c965044 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 386 | sce | Example11_4.sce | //Example 11.4
clear;
clc;
a=2*10^5;
zo=75;
R1=39*10^3;
R2=24*10^3;
R3=3.3*10^3;
Vo=10;
VImin=12;
VImax=36;
b=R1/(R1+R2);
loadr=-zo/(1+(a*b));
PSRR=33333.333;
CMRRdB=90;
CMRR=10^(CMRRdB/20);
liner=(1+(R2/R1))*((1/PSRR)+(0.5/CMRR));
printf("Line Regulation=%.1f ppm/V",liner*10^5);
printf("\nLoad Regulation=%.2f ppm/mA",loadr*10^2); |
c04dd1255b82c03e27fef1f4843566917fdafbb9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /536/CH9/EX9.10/Example_9_10.sce | a88f68a00c6a8fd103b12da3cf62593efd8fa384 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 848 | sce | Example_9_10.sce | clc;
clear;
printf("\n Example 9.10\n");
G=15;//Mass flow rate of benzene
d_s=1; //Internal diameter of Heat Exchanger
l=5; //Length of tubes
od=19e-3; //Outer diameter of tubes
C=6e-3; //Clearance
l_b=0.25; //Baffle spacing
Meu=.5e-3;
Y=25e-3; //dimension of square pitch
N=19; //no. of Baffles
As=d_s*l_b*C/Y; //Cross-flow area
printf("\n Cross-flow area = %.2f m^2",As);
G_dash_s=G/As; //Mass flow
printf("\n Mass flow = %d kg/m^2 s",G_dash_s);
d_e=4*(Y^2-(%pi*od^2/4))/(%pi*od);//Equivalent Diameter
printf("\n Equivalent Diameter = %.4f m",d_e);
Re=G_dash_s*d_e/Meu;
//From Figure 9.29:
f_dash=.280;
rho_b=881;//density of benzene
DPf=f_dash*G_dash_s^2*(N+1)*d_s/(2*rho_b*d_e);
printf("\n The pressure drop over the tube bundle = %.0f N/m^2",DPf);
printf("\n\t\t\t\t\t= %.0f m of Benzene",DPf/(rho_b*9.81));
|
d38d0398a164d6df96ee1d4571536f522fc2ab6b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1163/CH6/EX6.10/example_6_10.sce | 487695b1f4c32e5172380c04cf2e502d92f7b9fb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,126 | sce | example_6_10.sce | clear;
clc;
disp("--------------Example 6.10---------------")
cps=250; // characters per second
unit=8; // 1 unit = 1 character = 8 bits
n=4; //number of sources
sb=1; // 1 synchronization bit
//a)the data rate of each source
data_rate_source=cps*unit;
printf("a)The data rate of each source is %d kps.\n",data_rate_source*10^-3); // display result
// b) the duration of each character in each source
character_duration=1/cps;
printf("\nb)The duration of each character in each source is %d ms.\n",character_duration*10^3); // display result
// c) the frame rate
frame_rate=cps;
printf("\nc)The frame rate is %d frames per second.\n",frame_rate);// display result
// d) the duration of each frame
frame_duration=1/frame_rate;
printf("\nd)The duration of each frame is %d ms.\n",frame_duration*10^3);// display result
//e) the number of bits in each frame
bits=n*unit+sb;
printf("\ne)The number of bits in each frame is %d.\n",bits); // display result
//f) the data rate of the link
data_rate_link=frame_rate*bits;
printf("\nf)The data rate of the link is %d bps.",data_rate_link); // display result
|
06c55fdbf4cb0891738628b195c3047137291d9e | 67310b5d7500649b9d53cf62226ec2d23468413c | /tags/archive/TestCaseGenerator-Plugin-OpeningSequenceCoverage/trunk/tests/large-system-tests/inputs/RadioButton/ground_truth/OpeningSequenceCoverage/length-1/max-150/t19.tst | 0c2da0931c70a078707301146e60c0f37ee7b9db | [] | no_license | csnowleopard/guitar | e09cb77b2fe8b7e38d471be99b79eb7a66a5eb02 | 1fa5243fcf4de80286d26057db142b5b2357f614 | refs/heads/master | 2021-01-19T07:53:57.863136 | 2013-06-06T15:26:25 | 2013-06-06T15:26:25 | 10,353,457 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 661 | tst | t19.tst | <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TestCase>
<Step>
<EventId>e16</EventId>
<ReachingStep>false</ReachingStep>
</Step>
<Step>
<EventId>e68</EventId>
<ReachingStep>false</ReachingStep>
</Step>
<Step>
<EventId>e45</EventId>
<ReachingStep>false</ReachingStep>
</Step>
<Step>
<EventId>e36</EventId>
<ReachingStep>false</ReachingStep>
</Step>
<Step>
<EventId>e64</EventId>
<ReachingStep>false</ReachingStep>
</Step>
<Step>
<EventId>e35</EventId>
<ReachingStep>false</ReachingStep>
</Step>
</TestCase>
|
23f6daa96aa7b81b9a1b0d24e4169e57e8169f19 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2087/CH4/EX4.4/example4_4.sce | 387839e40c2fc4395c45fdd7704081e97ff89a94 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 538 | sce | example4_4.sce |
//example 4.4
//calculate precipitation at A by inverse distance method
clc;funcprot(0);
//given
pB=74; //precipitation at B
pC=88; //precpitation at C
pD=71; //precipitation at D
pE=80; //precipitation at E
Bx=9;By=6;
Cx=12;Cy=-9;
Dx=-11;Dy=-6;
Ex=-7;Ey=7;
Ax=0;Ay=0;
Db=(Bx^2+By^2);
Dc=(Cx^2+Cy^2);
Dd=(Dx^2+Dy^2);
De=(Ex^2+Ey^2);
Wb=1/Db;
Wc=1/Dc;
Wd=1/Dd;
We=1/De;
s=pB*Wb+pC*Wc+pD*Wd+pE*We;
pA=s/(Wb+Wc+Wd+We);
pA=round(pA*10)/10;
mprintf("precipitation at A=%f mm.",pA);
|
935cba5ff425ed04c38371ccafb89f8aa318a61f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3683/CH5/EX5.8/Ex5_8.sce | 36fecaed66b2389d30db5ce7bda172724d308f20 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,395 | sce | Ex5_8.sce | P=850//in kN
sigma_cc=4//in MPa
m=18.66//modular ratio
sigma_sc=130//in MPa
Lef=5*1.001//effective length, in m
//assume 1% steel
Ag=P*10^3/(sigma_cc*0.99+sigma_sc*0.01)//in sq mm
l=sqrt(Ag)//in mm
l=400//approximately, in mm
a=Lef*1000/l
//as a>12, it is a long column
//Method I-section to be changed
b=Lef*1000/12//in mm
b=420//approximately, in mm
Ag=b^2//in sq mm
Asc=(P*1000-sigma_cc*Ag)/(sigma_sc-sigma_cc)//in sq mm
minimum_steel=0.8/100*b^2//in sq mm
//as Asc < minimum steel
Asc=minimum_steel//in sq mm
//assume 20 mm dia bars
n=Asc/(%pi/4*20^2)//no. of bars
n=5//round-off
//design of links
dia=1/4*20//in mm
//as dia < 6 mm, provide 6 mm diameter links
dia=6//in mm
spacing=min(b,16*20,48*dia,300)//in mm
mprintf("Method I\nColumn size %d x %d mm\nMain steel =%d-20 mm dia bars\nLinks=6 mm dia links @ %d mm c/c\n", b,b,n,spacing)
//Method II-same section
b=400//in mm
Ag=b^2//in sq mm
Cr=1.25-Lef*1000/(48*b)//reduction coefficient
sigma_cc=Cr*sigma_cc//in MPa
sigma_sc=Cr*sigma_sc//in MPa
Asc=(P*1000-sigma_cc*Ag)/(sigma_sc-sigma_cc)//in MPa
n=round(Asc/(%pi/4*20^2))//no. of bars
//design of links
dia=1/4*20//in mm
//as dia < 6 mm, provide 6 mm diameter links
dia=6//in mm
spacing=min(b,16*20,48*dia,300)//in mm
mprintf("Method II\nColumn size %d x %d mm\nMain steel =%d-20 mm dia bars\nLinks=6 mm dia links @ %d mm c/c", b,b,n,spacing)
|
ef0a1d5b4348b6fa8297e9316de3043177349e10 | a29c13fa4c58d566270fb640a4d1f184f92c1223 | /02_Software/02_Control_Design/04_Control_basic_dimensioning/Rotor_vs_Gener_Torque_Voltage_DCDC_4P1_refTurb_v3.sce | 5e9aac3effa6a69b87ff2e9d693b0c9ca2f20530 | [] | no_license | li-bre/li-bre-wind | e15bc80f955d02731fe6e7eb255f24478a2395ae | d65584798c48461484e3a3531797612e3ba18c32 | refs/heads/master | 2022-02-28T15:32:22.893410 | 2022-02-08T15:54:47 | 2022-02-08T15:54:47 | 232,623,593 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,638 | sce | Rotor_vs_Gener_Torque_Voltage_DCDC_4P1_refTurb_v3.sce | // Rotor vs. Generator Power
clear
close
scf(0); clf();
//
v1=3:10;
//n_Rotor=[84.034 112.045 140.056 168.068 196.079 224.090 252.101 280.113];
//P_Rotor=[0.008 0.022 0.049 0.089 0.143 0.214 0.303 0.409] * 1000;
n_Rotor=[84.034 112.045 140.056 168.068 196.079 224.090];
P_Rotor=[0.008 0.022 0.049 0.089 0.143 0.214] * 1000;
T_Rotor=[0.895 1.881 3.307 5.078 6.953 9.109];
n_Gen=[49.6 90.6 100.4 106.6 120.4];
P_Gen=[0 14.5 33.0 45.5 80.7 ];
T_Gen=[0.83 2.78 4.90 7.44 %nan];
n_Gen_LL=[88.9 124.3 244.2 372.4 483.7 580.1];
n_Gen_KS=[6.6 15 19.8 21.6];
T_Gen_LL=[1.02 1.17 1.46 1.70 1.80 1.71];
T_Gen_KS=[1.51 4.12 8.92 9.32];
n_Rotor_arb=1:250;
omega_Rotor_arb=n_Rotor_arb*2*%pi/60;
lambda_arb=2; // Hat den größten Einfluss auf das Moment
R_arb=0.75;
H_arb=1.2;
v1_arb=omega_Rotor_arb*R_arb/lambda_arb;
rho=1.2;
c_p_arb=0.3;
P_Rotor_arb=0.5*rho*2*R_arb*H_arb*c_p_arb*v1_arb.^3;
T_Rotor_arb=P_Rotor_arb./omega_Rotor_arb;
P_max=100;
T_max=P_max./omega_Rotor_arb;
PWM=[60 65 70 75 80 85 90 95 100 85 90 95 100];
T=[1.73 1.67 1.89 1.86 2.36 2.33 2.46 2.64 2.76 4.04 3.79 4.19 4.11];
P1=[4.845 5.755 10.862 11.021 14.950 17.329 18.562 18.880 20.884 50.995 50.630 51.168 48.732];
P2=[4.128 4.845 8.750 9.851 13.462 14.821 15.543 17.390 17.517 39.054 40.322 36.517 33.492];
V1=[31.600 33.200 34.300 32.100 30.100 27.800 25.900 24.000 22.700 32.900 30.500 28.800 27.900];
V2=[12.510 12.530 12.620 12.630 12.700 12.740 12.810 12.850 12.880 13.120 13.120 13.120 13.100];
I1=P1./V1;
I2=P2./V2;
RPM=[192.000 199.200 210.600 195.000 187.200 174.000 165.000 155.400 147.600 211.200 199.200 187.200 178.800];
PWM0=find(PWM==60);
PWM1=find(PWM==65);
PWM2=find(PWM==70);
PWM3=find(PWM==75);
PWM4=find(PWM==80);
PWM5=find(PWM==85);
PWM6=find(PWM==90);
PWM7=find(PWM==95);
PWM8=find(PWM==100);
V1_1=find(abs(V1-22)<1);
V1_2=find(abs(V1-24)<1);
V1_3=find(abs(V1-26)<1);
V1_4=find(abs(V1-28)<1);
V1_5=find(abs(V1-30)<1);
V1_6=find(abs(V1-32)<1);
V1_7=find(abs(V1-34)<1);
//plot(n_Rotor,P_Rotor,'x-k',"thickness",2,"MarkerSize",10)
//plot(n_Rotor,T_Rotor,'color',[0 0 0],'linest','-','marker','o',"thickness",2,'markersize',10)
plot(n_Rotor_arb,T_Rotor_arb,'color',[0 0 0],'linest','-',"thickness",2,'markersize',10)
plot(n_Gen_KS,T_Gen_KS,'color',[0 0.8 0],'linest','-','marker','*',"thickness",2,'markersize',14)
plot(n_Gen,T_Gen,'color',[0 0 1],'linest','-','marker','o',"thickness",2,'markersize',10)
plot(RPM(V1_1),T(V1_1),'color',[0.75 0 0.75],'linest','-','marker','x',"thickness",2,'markersize',10)
plot(RPM(V1_2),T(V1_2),'color',[0.25 0.75 1],'linest','-','marker','x',"thickness",2,'markersize',10)
plot(RPM(V1_3),T(V1_3),'color',[0.25 0.25 0.25],'linest','-','marker','x',"thickness",2,'markersize',10)
plot(RPM(V1_4),T(V1_4),'color',[0.75 0.75 0],'linest','-','marker','x',"thickness",2,'markersize',10)
plot(RPM(V1_5),T(V1_5),'color',[0 0.5 0.5],'linest','-','marker','x',"thickness",2,'markersize',10)
plot(RPM(V1_6),T(V1_6),'color',[0 0.75 0.75],'linest','-','marker','x',"thickness",2,'markersize',10)
plot(RPM(V1_7),T(V1_7),'color',[1 0 0],'linest','-','marker','x',"thickness",2,'markersize',10)
//plot(RPM(PWM1),T(PWM1),'color',[0 0.5 0],'linest','-','marker','x',"thickness",2,'markersize',10)
//plot(RPM(PWM0),T(PWM0),'color',[0.75 0.75 0.5],'linest','-','marker','x',"thickness",2,'markersize',10)
plot(n_Gen_LL,T_Gen_LL,'color',[0 0.75 1],'linest','-','marker','*',"thickness",2,'markersize',14)
//plot(n_Rotor_arb,T_max,'color',[0 1 0],'linest','-',"thickness",2,'markersize',10)
// Ploteigenschaften
xtitle("$ $", "$Rotational\ speed\ [rpm]$","$Torque\ [Nm]$");
l=legend(['$T_{turb,\ ref}$';'$T_{gen}\ short\ circuit$';'$T_{gen}\ V_1 = 12\,V=V_{Bat}$';'$T_{gen}\ V_1 = 22\,V$';'$T_{gen}\ V_1 = 24\,V$';'$T_{gen}\ V_1 = 26\,V$';'$T_{gen}\ V_1 = 28\,V$';'$T_{gen}\ V_1 = 30\,V$';'$T_{gen}\ V_1 = 32\,V$';'$T_{gen}\ V_1 = 34\,V$';'$T_{gen}\ open\ circuit$'],1);
//l=legend(['$P_{turb,\ opt}$';'$P_{gen,el}\ V_1 = 12\,V=V_{Bat}$';'$P_{gen,el}\ V_1 = 22\,V$';'$P_{gen,el}\ V_1 = 24\,V$';'$P_{gen,el}\ V_1 = 26\,V$';'$P_{gen,el}\ V_1 = 28\,V$';'$P_{gen,el}\ V_1 = 30\,V$';'$P_{gen,el}\ V_1 = 32\,V$';'$P_{gen,el}\ V_1 = 34\,V$'],2);
a=gca(); // get the handle of the current axes
f=get("current_figure");
f.figure_size=[800,700]
a.grid=[1 1];
a.font_size=4; //set the tics label font size
a.title.font_size=4;
a.x_label.font_size=4;
a.y_label.font_size=4;
l.font_size = 3;
a.axes_visible="on"; // makes the axes visible
a.data_bounds=[0,0,0;550,10,1]; //set the boundary values for the x, y and z coordinates.
//filename='Rotor_vs_Gen_Torque_Voltage_DCDC_v3';
//xs2pdf(0,filename);
//xs2pdf(gcf(),filename);
//
|
ffaa4cf6b4cf979aaeae0c9d99f448ca1d53a67e | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.4.1/macros/percent/%s_l_r.sci | f3cace365b9421910b244a9749a934b42157e20a | [
"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 | 517 | sci | %s_l_r.sci | function b=%s_l_r(a,b)
// a\b a scalar matrix, b rational matrix
//!
// Copyright INRIA
if size(a,'*')==0 then b=[],return,end
[num,den]=b(2:3);
[mb,nb]=size(num);mb=abs(mb);nb=abs(nb);
[ma,na]=size(a);na=abs(na);ma=abs(ma);
if ma==1&na==1 then
b(2)=a\b(2),
return,
end
if mb==1 then
num=a\num
den=ones(na,ma)*den
b(2)=num;b(3)=den
else
dd=[];nn=[]
for j=1:nb,
[y,fact]=lcm(den(:,j)),
nn=[nn,a\(num(:,j).*fact)];
dd=[dd y]
end
[num,den]=simp(nn,ones(na,1)*dd)
b(2)=num;b(3)=den
end
|
26ed2b112c69efe9e275435a53ac3f7b75d1ba00 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1205/CH3/EX3.1/S_3_1.sce | 3991497ce4d398a796f1e836113cd21bac8a3892 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,618 | sce | S_3_1.sce | clc;
// Given data
F=500; // N , Vertical force applied to end of lever
theta=60;// degree, angle made by lever with +ve X axis
theta=theta*%pi/180;// Conversion of angle into radian
l=600; // mm , length of lever
// a ) Momemt about O
d=l*cos(theta);// mm ,perpendicular distance from o to the line of action
d=d/1000; // m, conversion into meter
Mo=F*d;// N.m, Magnitude of moment about O
printf("Magnitude of moment about O of the 500 N is %.2f N.m and it is in clockwise direction as force tends to rotate lever clockwise\n",Mo);
// b) Horizontal force
d=l*sin(theta);//mm, perpendicular distance from o to the line of action
d=d/1000; // m, conversion into meter
F=Mo/d;// N, Horizontal Force at A required to produce same Moment about O
printf("Magnitude of Horizontal Force at A required to produce same Moment about O is %.2f N\n",F);
// c)Smallest force
// F is smaller when d is maximum in expression Mo=F*d, so we choose force perpendicular to OA
d=0.6;// m ,perpendicular distance from o to the line of action
F=Mo/d;// N, Smallest Force at A required to produce same Moment about O
printf("Magnitude of smallest Force at A required to produce same Moment about O is %.2f N\n",F);
//d) 1200 N vertical force
F=1200;// N, verical force producing same movement on lever acting at pt B
d=Mo/F;// m, perpendicular distance from o to the line of action of force
OB=d/cos(theta);//m, distance of point B from O
OB=OB*1000;//mm, conversion into millimeter
printf("Verical force of 1200 N must act at %.2f mm far from the shaft to create same moment about O\n",OB);
|
6791213fd83b15a0c58289f49375e3acf9a17fb7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /896/CH2/EX2.16/16.sce | 14481525a735ff342902bce24ce48e3d58c978e3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 324 | sce | 16.sce | clc
//calc pressure diff at the mouth of the fire place
g=32.2;//ft/s^2
h=20;//ft (height of fireplace)
rho_air=0.075;//lbm/ft^3
T_air=293;//K (surrounding temperature)
T_fluegas=422;//K
p_diff=g*h*(rho_air)*[1-(T_air/T_fluegas)]/32.2/144;//lbf/in^2
disp("The pressure difference is")
disp(p_diff)
disp("lbf/in^2") |
b76f887afff09dc2ce48a40f32c94bd140b96655 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2582/CH6/EX6.5/Ex6_5.sce | 3d6f765ac7b9ea210aec08969b8d24a0df0af99d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 290 | sce | Ex6_5.sce | //Ex 6.5
clc;clear;close;
n=8;//no. of bits
Res=20;//mV/bit(Resolution)
reading='00010110';//input in binary
Vo=Res*bin2dec(reading);//V
disp(Vo/1000,"(a) Output Voltage(V)");
reading='10000000';//input in binary
Vo=Res*bin2dec(reading);//V
disp(Vo/1000,"(b) Output Voltage(V)");
|
92b6194db56d55f9de84e1b4d9417b0c8dc7c3a4 | 25040eb5cf02d8e85c69979b9910a21bb054300a | /UNIT-4/gram-schmidt.sce | f1b04aff421dc448fa9712b532d0b2a0bee6cd47 | [] | no_license | sneha1999-bm/scilab-assignment | e52795c182c07052667a3a01024e5ce98942b1a2 | a7f1f64257f0da01e120bf04fe953cfbe5f4f0d8 | refs/heads/master | 2021-01-02T19:22:23.851397 | 2020-06-05T09:48:35 | 2020-06-05T09:48:35 | 239,763,271 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 541 | sce | gram-schmidt.sce | A=input("enter the maxtrix ")
a11=input("Enter a11: ");
a12=input("Enter a12: ");
a13=input("Enter a13: ");
a21=input("Enter a21: ");
a22=input("Enter a22: ");
a23=input("Enter a23: ");
a31=input("Enter a31: ");
a32=input("Enter a32: ");
a33=input("Enter a33: ");
A=[a11,a12,a13;a21,a22,a23;a31,a32,a33];
disp(A,'A=');
[m,n]=size(A);
for k=1:n
V(:,k)=A(:,k);
for j=1:k-1
R(j,k)=V(:,j)'*A(:,k);
V(:,k)=V(:,k)-R(j,k)*V(:,j);
end
R(k,k)=norm(V(:,k));
V(:,k)=V(:,k)/R(k,k);
end
disp(V,'Q=');
|
585d264c342a9a58816c79e18f7b78b75adda463 | 449d555969bfd7befe906877abab098c6e63a0e8 | /803/CH8/EX8.5/ex8_5.sce | c5bd3544c69aa542a3cdb93d99a714494e66f4d1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 739 | sce | ex8_5.sce | clc
n=10;...................................//total pulses selected
p=0.8;..................................//probability of pulses hitting the dish
q=0.2;..................................//probability of miss
add=0;
for k=2;
x(k)=((factorial(n)*(p^k)*((1-p)^(n-k)))/(factorial(k)*factorial(n-k)));
disp(x(k),"Exactly two pulses missing the target");
end;
for k=0:1
x(k)=((factorial(n)*(p^k)*((1-p)^(n-k)))/(factorial(k)*factorial(n-k)));
add=add+x(k);
end;
y(k)=1-add;
disp(y(k),"Two or more pulses missing the target");
for k=6:10
x(k)=((factorial(n)*(p^k)*((1-p)^(n-k)))/(factorial(k)*factorial(n-(k)));
y(k)=sum(x(k));
disp(y(k),"More than 5 pulses missing the target");
end;
|
16d3032b853a936deae5327f85aef80e42490e87 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1523/CH2/EX2.25/2_25.sce | e460c6b42622493ceb0b2be222c531e178aec9ef | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 2_25.sce | //Network Theorem 1
//page no-2.30
//example2.25
disp("Applying KCL to node 1:");
disp("8*VA-2*VB = 50");....//equation 1
disp("Applying KCL to node 2:");
disp("-3*VA+9*VB = 85");...//equation 2
disp("Solving equations 1 and 2");...//solving equations in matrix form
A=[8 -2;-3 9];
B=[50 85]'
X=inv(A)*B;
disp(X);
disp("VA= 9.39 V");
disp("VB= 12.58 V");
|
4e959c1cd97e01edab0a2f4a64f2711d33c249a9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1223/CH1/EX1.2/Ex1_2.sce | 9b5f48f556a89e1a5c3ce00eb6fc249a06ed9a60 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 389 | sce | Ex1_2.sce | clear;
clc;
//Example 1.2
T=300;//(°K)Given Temperature
Nd=10^16;//(cm^-3)Donor concentration
n_i=1.5*10^10;//(cm^-3)intrinsic carrier concentration
//since Nd>>n_i
n_o=10^16;//(cm^-3)electron concentration
//by using formula ::n_i^2=n_o*p_o
p_o=(n_i)^2/Nd;//hole concentration
printf('\nelectron concentration= %.e cm^-3',n_o);
printf('\nhole concentration =%e cm^-3',p_o);
|
0b80b76ec97a1b4fa89afac60c3ba6833b2a3c06 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2096/CH12/EX12.6/ex_12_6.sce | 7f9dbcd392154e53a20760f8a481a2f1758f8ca4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 374 | sce | ex_12_6.sce |
//Example 12.6 // difference
clc;
clear;
close;
//given data :
Q=0.015; // in m^3/s
D0=0.1; // in m
D1=0.2; // in m
Cc=0.6;
Cd=0.6;
g=9.81;
AO=((%pi/4)*D0^2);//in m^2
A1=((%pi/4)*D1^2);//in m^2
K=Cd/sqrt(1-(Cc*(AO/A1))^2);
S=sqrt((2*g)/(g*1000));
DP=((Q/(K*AO*S)))^2;//
disp("difference in thr pressure head is "+string(DP)+" N/m^2 or "+string(DP/9739.45)+" m of water")
|
05032fb1e31a6cf5e34ea6dd1f4822a66e0943bb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2498/CH5/EX5.31/ex5_31.sce | b4a1862eca0777b7ff8c394491c0079365b484b8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 664 | sce | ex5_31.sce | // Exa 5.31
clc;
clear;
close;
format('v',6)
// Given data
L = 100;// in µH
L = L * 10^-6;// in H
A=10;
C1 = 0.001;// in µF
C1 = C1 * 10^-6;// in F
C2 = 0.01;// in µF
C2 = C2 * 10^-6;// in F
C = (C1*C2)/(C1+C2);// in F
f = 1/(2*%pi*sqrt( L*C ));// in Hz
f = round(f * 10^-3);// in kHz
disp(f,"The operating frequency in kHz is");
Beta = C1/C2;// feedback fraction
disp(Beta,"The feed back fraction is");
//Minimum gain to sustain oscillations, Amin*Beta = 1;
Amin = 1/Beta;
disp(Amin,"The minimum gain to sustain oscillation is");
// A = R_C/R_E;
R_C = 2.5;// in ohm
R_E = R_C/A;// in ohm
disp(R_E,"The emitter resistance in ohm is");
|
48f7a0505dea2e2ed90326a4554a45490d8da29c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1280/CH8/EX8.2/8_2.sce | 3b52dd062846e7e801bb0a90ccc0a54164374755 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 262 | sce | 8_2.sce | clc
//Initialization ogf variables
Q=25 //gpm
A=.533 //in^2
//Calculations
nu=Q*19.25/(A*60) //Fluid velocity
nucylinder=Q*19.25/12.56 //Cylinder velocity
//Results
printf ('Fluid velocity = %.2f',nu)
printf ('\n Cylinder velocity = %.2f',nucylinder)
|
bb0bc096989e02ab99939b58bddafa8b10366620 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3537/CH1/EX1.5/Ex1_5.sce | 80c9118aeb5d0f607e1b84bdae9c4fc4e87f97ee | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 204 | sce | Ex1_5.sce | //Example 1_5
clc;
clear;
//To Calculate the amplitude ratio of the sources
Imax=9
Imin=1
Imax_Imin=Imax/Imin
amax_amin=sqrt(Imax_Imin)
a1_a2=amax_amin-1
printf("the ratio of amplitudes %d/%d",a1_a2,1) |
c3460bb88e6f788d4ed74cc5ca9ac1df960f2c3a | d52d3664d9650ed9473dfaa3c4b379f05ef9fa78 | /update_dv_sr_lspv/create_2ndfl_corr.tst | ca6b74226ba6a0225a601df5cbedf4b7e7eb9fcc | [] | no_license | ZVlad1980/excel_api | 7b517bf68b677f8e947cba8794ae557e48c9ce06 | b514dbea9cb619e0e73c67b2e8fec4a59301101a | refs/heads/master | 2020-04-04T01:51:22.004466 | 2018-10-02T05:52:04 | 2018-10-02T05:52:04 | 155,679,735 | 0 | 0 | null | null | null | null | WINDOWS-1251 | Scilab | false | false | 1,235 | tst | create_2ndfl_corr.tst | PL/SQL Developer Test script 3.0
47
-- Created on 04.11.2017 by V.ZHURAVOV
declare
-- Local variables here
l_ref_row f2ndfl_arh_spravki%rowtype;
l_list sys.odcinumberlist :=
sys.odcinumberlist(
/*
2887905,
2975008,
3082295,
3066320,
3043441
*/
1104149, --arh отличается от load и f6
1364381,
1490700,
1586560,
1706844,
1778962,
2920038,
2935541,
2965222,
3016916,
3040842
);
begin
--dbms_session.reset_package; return;
--
-- dbms_output.put_line(utl_error_api.get_exception_full); return;
-- Test statements here
--
for i in 1..l_list.count loop
f2ndfl_arh_spravki_api.create_reference_corr(
p_code_na => 1,
p_year => 2016,
p_contragent_id => l_list(i)
); --*/
end loop;
-- f2ndfl_arh_spravki_api.delete_reference(p_ref_id => 358593);
--FXNDFL_UTIL.calc_benefit_usage(p_spr_id => 358537);
exception
when others then
utl_error_api.fix_exception('Test script');
--dbms_output.put_line(utl_error_api.get_error_msg);
dbms_output.put_line(utl_error_api.get_exception_full);
raise;
end;
0
4
gl_SPRID
gl_CAID
l_result.nom_spr
p_src_ref_id
|
5d088f1bbdc53c1a3e7abea8833308f82d24adf5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2741/CH5/EX5.1/Chapter5_Example1.sce | 8c8808f45b1bd6a97b868b3a78830f2070a7c612 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 625 | sce | Chapter5_Example1.sce | clc
clear
//Input data
v=480;//The velocity of a lead bullet in m/s
Sp=0.03;//Specific heat of lead cal/g-K
//Calculations
m=10;//Let us assume the mass of bullet in gms
V=v*100;//The velocity of the bullet in cm/s
W=(1/2)*m*(V^2);//The work done in ergs
J=4.2*10^7;//The mechanical equivalent of heat in ergs/calorie
H=W/J;//The amount of heat produced in cals
H1=H/2;//Half of the heat energy is used to raise the temperature of the bullet in cals
t=H1/(m*Sp);//The rise in the temperature in degree centigrade
//Output
printf('The rise in the temperature is t = %3.2f degree centigrade ',t)
|
b544061d0211f2aa627b02bec4c65303c4235d39 | b5edeebe05a1c202431da00e95371261c6b7e3a6 | /templates/component.tst | ee98a85dba0d84a7006ace0c803e1a3e79cc0337 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | nouei/devextreme-angular2 | 7db29024a9d1b1ba20b1ec35c73bc857c70df334 | e27c3c8925424e7f66c3f24cfa725e7922b69303 | refs/heads/master | 2021-01-17T17:18:02.956531 | 2016-08-26T13:07:12 | 2016-08-26T13:07:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,506 | tst | component.tst | <#? it.isEditor #>
/* tslint:disable:directive-selector-name */
/* tslint:disable:directive-selector-type */
<#?#>
import {
Component,
ElementRef,
EventEmitter,
NgZone,
provide,
Input,
Output<#? it.isEditor #>,
Directive,
Provider,
forwardRef,
HostListener
<#?#>
} from '@angular/core';
<#? it.isEditor #>
import {
ControlValueAccessor,
NG_VALUE_ACCESSOR
} from '@angular/forms';
<#?#>
import { DxComponent } from '../core/dx.component';
import { DxTemplateHost } from '../core/dx.template-host';
@Component({
selector: '<#= it.selector #>',
template: '',
providers: [
provide(DxTemplateHost, { useClass: DxTemplateHost })
]
})
export class <#= it.className #> extends DxComponent {
<#~ it.properties :prop:i #>@Input() <#= prop.name #>: any;<#? i < it.properties.length-1 #>
<#?#><#~#>
<#~ it.events :event:i #>@Output() <#= event.emit #>: EventEmitter<any>;<#? i < it.events.length-1 #>
<#?#><#~#>
constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost) {
super(elementRef, ngZone, templateHost);
this.widgetClassName = '<#= it.widgetName #>';
this._events = [
<#~ it.events :event:i #>{ <#? event.subscribe #>subscribe: '<#= event.subscribe #>', <#?#>emit: '<#= event.emit #>' }<#? i < it.events.length-1 #>,
<#?#><#~#>
];
this._properties = [
<#~ it.properties :prop:i #>'this.<#= prop.name #>'<#? i < it.properties.length-1 #>,
<#?#><#~#>
];
<#~ it.events :event:i #>this.<#= event.emit #> = new EventEmitter();<#? i < it.events.length-1 #>
<#?#><#~#>
}
}
<#? it.isEditor #>
const CUSTOM_VALUE_ACCESSOR = new Provider(
NG_VALUE_ACCESSOR, { useExisting: forwardRef(() => <#= it.className #>ValueAccessor), multi: true });
@Directive({
selector: '<#= it.selector #>[formControlName],<#= it.selector #>[formControl],<#= it.selector #>[ngModel]',
providers: [CUSTOM_VALUE_ACCESSOR]
})
export class <#= it.className #>ValueAccessor implements ControlValueAccessor {
@HostListener('valueChange', ['$event']) onChange(_) { }
onTouched = () => {};
constructor(private host: <#= it.className #>) {
}
writeValue(value: any): void {
this.host.value = value;
}
registerOnChange(fn: (_: any) => void): void { this.onChange = fn; }
registerOnTouched(fn: () => void): void { this.onTouched = fn; }
}
<#?#>
|
0994bf14e571f4344e2ea38a877bbcf0fc85a0e2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2409/CH13/EX13.2/Ex13_2.sce | d347d13b37431af6e63ea93e849efbd54f942f8e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 381 | sce | Ex13_2.sce |
//Variable Decalration
PA=24 //Transmit power by station A(dBW)
G1=54 //Antenna Gain(dB)
PC=30 //Transmit power by station C(dBW)
G2=24.47//off-axis gain in the S1 direction(dB)
PD=4 //Polarization discrimination(dB)
//Calculation
CIR=PA-PC+G1-G2+PD //Carrier to Interference ratio(dB)
//Result
printf("The Carrier to interfernce ratio on uplink is %.2f dB",CIR)
|
bea81c5f2f7ef39df685b281dc26f1aba076f550 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1913/CH1/EX1.21/ex21.sce | 8ec73f993c0003489a2d8fe3bb10e5659e543f32 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 657 | sce | ex21.sce | clc
clear
//Input data
d=13596;//Density of Hg in kg/m^3
g=9.806;//Gravity in m/sec^2
df=0.8*1000;//Density of fluid in kg/m^3
Z=0.76;//Atmospheric pressure in m of Hg
Zf=0.3;//Height of fluid coloumn in m
//Calculations
Pa=d*g*Z;//Atmospheric perssure in N/m^2
P=df*g*Zf;//Pressure due to fluid in N/m^2
Pab=(Pa+P)/10^5;//Absolute pressure in bar
Zh=((Pab*10^5-Pa)/(d*g))*100;//Difference between the height of Hg coloumn in 2 arms in m
//Output
printf('(a)The Absolute pressure of the gas in pipe line Pab = %3.7f bar \n (b)If the fluid used is Hg then the difference of height of Hg coloumn in the 2 arms Zh = %3.3f cm of Hg ',Pab,Zh)
|
e7f01a1f586e55686f293994b0d9889073419b91 | 449d555969bfd7befe906877abab098c6e63a0e8 | /866/CH5/EX5.5/5_5.sce | ec6568352eee6026a4536c42ca15b17a5039d145 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 590 | sce | 5_5.sce | clc
//initialisation of variables
w= 120 //KN
D= 30 //m
L= 300 //m
sigmamax= 600 //N/mm^2
h= 50 //m
beta= 45 //degrees
//CALCULATIONS
Tmax= ((w*L)/2)*(sqrt(1+(L/(4*D))^2))
d= sqrt((4*Tmax*10^3)/(sigmamax*%pi))
H= (w*L^2)/(8*D)
alpha= atand((w*L)/(2*H))
Mt= Tmax*(cosd(alpha)-cosd(beta))*h
Vt= Tmax*(sind(alpha)+sind(beta))
Wa= Tmax*cosd(beta)
//RESULTS
printf ('Tmax= %.1f KN',Tmax)
printf (' \n d=%.1f mm',d)
printf (' \n H=%.0f KN',H)
printf (' \n alpha=%.1f degrees',alpha)
printf (' \n Mt=%.0f KNm',Mt)
printf (' \n Vt=%.0f KN',Vt)
printf (' \n Wa=%.0f KN',Wa)
|
a0d4a37fa0c5fda927fbbc23a33ec218386f0dfd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2498/CH7/EX7.11/ex7_11.sce | 7957f8565390828a22c373612e749a2c8df39b58 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 365 | sce | ex7_11.sce | // Exa 7.11
clc;
clear;
close;
format('v',6)
// Given data
I_DSS = 8.4;// in mA
V_P = -3;// in V
V_GS = -1.5;// in V
// The value of I_D,
I_D = I_DSS*((1-(V_GS/V_P))^2);// in mA
disp(I_D,"The value of I_D in mA is");
g_mo = (-2*I_DSS)/V_P;// in mA/V
// The value of g_m
g_m = g_mo*(1-(V_GS/V_P));// in mA/V
disp(g_m,"The value of g_m in mA/V is");
|
b4603e8c9a70461f3bc56033b761367e062bc613 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3685/CH5/EX5.5/Ex5_5.sce | d5281e1429b51f4fdfcf350c8482f9fae3898973 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,014 | sce | Ex5_5.sce | clc
t1 = 15 // Heat exchanger inlet temperature in degree Celsius
t2 = 800 // Heat exchanger exit temperature in degree Celsius
t3 = 650 // Turbine exit temperature in degree Celsius
t4 = 500 // Nozzle exit temperature in degree Celsius
v1 = 30 // Velocity of steam at heat exchanger inlet in m/s
v2 = 30// Velocity of steam at turbine inlet in m/s
v3 = 60 // Velocity of steam at nozzle inlet in m/s
w = 2 // mass flow rate in kg/s
cp = 1005 // Specific heat capacity of air in kJ/kgK
printf("\n Example 5.5")
Q1_2 = w*cp*(t2-t1) // rate of heat transfer
printf("\n The rate of heat transfer to the air in the heat exchanger is %d kJ/s",Q1_2/1e3)
W_T = w*( ((v2^2-v3^2)/2) + cp*(t2-t3)) // power output from the turbine
printf("\n The power output from the turbine assuming no heat loss is %f kW",W_T/1000)
v4 = sqrt( (v3^2) + (2*cp*(t3-t4)) ) // velocity at the exit of the nozzle
printf("\n The velocity at the exit of the nozzle is %d m/s",v4)
//The answers vary due to round off error
|
d78c0db081aa52e6500fc554d177c2102d668d1a | 449d555969bfd7befe906877abab098c6e63a0e8 | /32/CH1/EX1.09/1_09.sce | edb259d3080a30973fa7d3216967eccbdb10a612 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 732 | sce | 1_09.sce | //pathname=get_absolute_file_path('1.09.sce')
//filename=pathname+filesep()+'1.09-data.sci'
//exec(filename)
//Height of water column in limb AB(in m):
Hab=2*10^-2
//Height of mercury column in limb CD(in m):
Hcd=10*10^-2
//Barometer reading for atmospheric pressure(in m):
h=76*10^-2
//Density of mercury(in kg/m^3):
dm=13.6*10^3
//Density of water(in kg/m^3):
dw=1000
//Acceleration due to gravity(in m/s^2):
g=9.81
//Atmospheric pressure(in kPa):
Patm=dm*h*g*10^-3
//Pressure of water in column AB(in kPa):
Pab=dw*Hab*g*10^-3
//Pressure of mercury in column CD(in kPa):
Pcd=dm*Hcd*g*10^-3
//Pressure of steam(in kPa):
Ps=Patm+Pcd-Pab
printf("\n\n RESULT \n\n")
printf("\n\n Pressure of steam = %f kPa",Ps) |
ba4858eb52cf914dbf00227532fedd185acd3371 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH9/EX9.40/Ex9_40.sce | 475c174756f685f80c05162cb38f793acbea0588 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 236 | sce | Ex9_40.sce | clear
//Given
R1=400 //ohm
R2=800.0
R3=10
V=6
R11=10000.0
R22=400
//Calculation
Rt=R1+R2+R3
I=V/Rt
Rp=(R11*R22)/(R11+R22)
R=Rp+800
I1=V/R
Vab=I1*Rp
//Result
printf("\n Hence the voltmeter will read %0.2f V",Vab)
|
c945a7dc28d2cf19247540fe84c902600454c80b | 449d555969bfd7befe906877abab098c6e63a0e8 | /172/CH12/EX12.3/ex3.sce | 34e28fddbb205c8c0de135d4e237f595eb36a932 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 279 | sce | ex3.sce | //ques3
//efficiency of the cycle
clc
clear
wnet=395.2;//kJ/kg from example no 1
//Tx=T4
Tx=710.8;//K from example no 1
T3=1373.2;//K from example no 1
Cp=1.004;//specific heat in kJ/kg
qh=Cp*(T3-Tx);
nth=wnet/qh;
printf('Thermal efficiency = %.1f percent',nth*100); |
77933577a3b0ec9e2bd8618d05fe264ead3caf6f | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/RV12.prev.tst | 9ffc80893930470173be303e1f07184b88260785 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gfis/ramath | 498adfc7a6d353d4775b33020fdf992628e3fbff | b09b48639ddd4709ffb1c729e33f6a4b9ef676b5 | refs/heads/master | 2023-08-17T00:10:37.092379 | 2023-08-04T07:48:00 | 2023-08-04T07:48:00 | 30,116,803 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 151 | tst | RV12.prev.tst | [1/4,1/2,11/90,-2/15] / [1/2,1/3,-1/5] = divide: quot[1] = 2/3, remd = [1/4,1/6,-1/10]
divide: quot[0] = 1/2, remd = [0]
[1/2,2/3], remainder = [0]
|
3c531ade41db89582c1cc03264d068b45b0493b6 | 491f29501fa7d484a5860f64aef3fa89fb18ca3d | /examples/electronics/IdealSwitch/computeHandG.sce | 6f6b8f3eeab8059034631e8df805d67ded581bd6 | [
"Apache-2.0"
] | permissive | siconos/siconos-tutorials | e7e6ffbaaea49add49eddd317c46760393e3ef9a | 0472c74e27090c76361d0b59283625ea88f80f4b | refs/heads/master | 2023-06-10T16:43:13.060120 | 2023-06-01T07:21:25 | 2023-06-01T07:21:25 | 152,255,663 | 7 | 2 | Apache-2.0 | 2021-04-08T12:00:39 | 2018-10-09T13:26:39 | Jupyter Notebook | UTF-8 | Scilab | false | false | 289 | sce | computeHandG.sce | h_alpha=[L_alpha(5)-st;
X_alpha-L_alpha(4);
L_alpha(3)-20+L_alpha(1)*(L_alpha(7)+R1);
L_alpha(3)+L_alpha(2)*(L_alpha(9)+R1);
X_alpha-L_alpha(1)-L_alpha(2);
R2-L_alpha(7)-R1;
L_alpha(5)-L_alpha(4)+L_alpha(6);
R2-L_alpha(9)-R1;
-L_alpha(3)+L_alpha(8)];
g_alpha = (L_alpha(3)-L_alpha(4))/sL; |
dfc2646e86692ee2c812fff5f92025d97904b83c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2561/CH11/EX11.4/Ex11_4.sce | 3037cd78b75d50b4d2cf392c0ce1154b77e73a8b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 356 | sce | Ex11_4.sce | //Ex11_4
clc
tphL=40*10^(-9)
disp("tphL= "+string(tphL)+" seconds") // Time taken from Clear to output
n=3
disp("n= "+string(n))// Number of bits in counter i.e no. of flip-flops used
fmax=1/(n*tphL) // Using formulae fmax<= 1/(n*tphL)
disp("fmax=1/(n*tphL) = "+string(fmax)+" Hz")// Maximum counting rate at which flip-flop can operate reliably
|
8d909530748ad4fb0c48ba42a2f110421300d798 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1760/CH1/EX1.14/EX1_14.sce | 19b9d60bb6eb70a3810a2b47c82bbe06c2b2faa5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 554 | sce | EX1_14.sce | //EXAMPLE 1-14 PG NO-22
R1=4; //Resistance
R2=2; //Resistance
R3=8; //Resistance
RS=R1+R2; //resistance When Point A&B is short circuit
disp('i)resistance When Point A&B is short circuit = '+string (RS)+' ohm');
RO=R1+R2+R3; //resistance When Point A&B is open circuit
disp('i)resistance When Point A&B is open circuit = '+string (RO)+' ohm');
|
8e05b7fd596080c8ddf1e5699b42728415446d13 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1553/CH30/EX30.7/30Ex7.sce | f1da7ab6cafd79831a3a7afc3b887cfdbe43fbcc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 30Ex7.sce | //Chapter 30 Ex7
clc;
clear;
close;
S={'D','I','R','E','C','T','O','R'};
sizeS=size(S,"c");
n=6;
r=2; //since R occurs twice
noWays=factorial(n)/factorial(r);
Vowels=3;
noWaysVowels=factorial(Vowels); //no of ways in which vowels can be arranged
reqWays=noWaysVowels*noWays;
mprintf("The required number of ways are %.0f",reqWays);
|
6c8e8119d1bb481b353f349fc506a32b3176d114 | e86653ab56eded6714574f9f8f34013272027113 | /181/CH5/EX5.4/example5_4.sce | 006f30a4e6064c13dc0a1ed7c677a953f7ddab78 | [] | no_license | FOSSEE/Xcos_TBC_Uploads | 3637554f9dca20d0c5ec2c5d00d30942edafe09a | 37e81552cb6d9066617ba91b13c91098e5ab6758 | refs/heads/master | 2023-03-30T10:45:38.033053 | 2021-03-15T05:40:35 | 2021-03-17T09:45:20 | 346,244,418 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,227 | sce | example5_4.sce | // To establish Operating Point & Stability Factor
// Basic Electronics
// By Debashis De
// First Edition, 2010
// Dorling Kindersley Pvt. Ltd. India
// Example 5-4 in page 238
clear; clc; close;
// Given Data
beta_bjt=50; // Beta Gain of the BJT circuit
Vbe=0.7; // Base-Emitter voltage of BJT in V
Vcc=22.5; // DC voltage across Collector in V
Rc=5600; // Resistance across Collector in ohm
Vce=12; // Operating Collector-Emitter voltage of circuit in V
Ic=1.5*10^-3; // Operating Collector current of circuit in mA
sfactor=3; // Stability factor of the circuit
// Calculations
Re=((Vcc-Vce)/Ic)-Rc;
constant=((beta_bjt+1)*(sfactor-1))/((beta_bjt+1)-sfactor);
Rb=constant*Re;
Ib=Ic/beta_bjt;
voltage=(Ib*Rb)+Vbe+((Ib+Ic)*Re);
R1=Rb*(Vcc/voltage);
R2=(R1*voltage)/(Vcc-voltage);
printf("(a)The value of Emitter Resistance of the BJT circuit is %0.2e ohm \n",Re);
printf("(b)The value of Resistance-1 of the BJT circuit is %0.2e ohm \n",R1);
printf("(c)The value of Resistance-2 of the BJT circuit is %0.2e ohm \n",R2);
// Results
// The value of Emitter Resistance of the BJT circuit is 1.4 K-ohm
// The value of Resistance-1 of the BJT circuit is 22.8 K-ohm
// The value of Resistance-2 of the BJT circuit is 3.4 K-ohm
|
48798e1b5193bcea0f945f3801b2721ee09987da | 449d555969bfd7befe906877abab098c6e63a0e8 | /2732/CH2/EX2.5/Ex2_5.sce | cef88f7be49ac2e942761311bcc082ec3149d641 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex2_5.sce | clc
// initialization of variables
clear
sigma_1=100 //kg*f/cm^2
sigma_2=100 //kg*f/cm^2
sigma_3=-200 //kg*f/cm^2
// calculations
tau_oct=1/3*sqrt((sigma_1-sigma_2)^2+(sigma_2-sigma_3)^2+(sigma_3-sigma_1)^2)
// Results
printf('Octahedra shear stress at the point is=%.1f kgf/cm^2',tau_oct)
|
4598e26e601cf3a85aba52f36d1d5d2783dabff7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2126/CH3/EX3.4/4.sce | 3d453ff2fb235814dbe1e868c3afb6defd6a0613 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,605 | sce | 4.sce | clc
clear
//input data
C1=235 //Velocity at entrance in m/s
P1=13 //Static Pressure at entry in bar
P2=10 //Static Pressure at a point in duct in bar
T1=543 //Static temperature at entry in Kelvin
D=0.15 //inner duct diameter in m
f=0.005 //frictional factor
k=1.4 //Adiabatic constant
R=287 //Gas constant in J/kg-K
//calculation
a1=sqrt(k*R*T1) //Sound velocity in m/s
M1=C1/a1 //Mach number at entry
p1=2.138 //Static Pressure ratio from gas tables (fanno flow tables,k=1.4,M=0.5)
Pt=P1/p1 //Static critical pressure in bar
t1=1.143 //Static temperature ratio from gas tables (fanno flow tables,k=1.4,M=0.5)
Tt=T1/t1 //Static critical temperature in K
c1=0.534 //Velocity ratio from gas tables (fanno flow tables,k=1.4,M=0.5)
Ct=C1/c1 //Critical velocity in m/s
p2=1.644 //Pressure ratio from gas tables (fanno flow tables,k=1.4)
M2=0.64 //Mach number from gas tables (fanno flow tables,k=1.4,p2)
c2=0.674 //Velocity ratio from gas tables (fanno flow tables,k=1.4,p2)
C2=Ct*c2 //Air velocity at P2 in m/s
t2=1.109 //Temperature ratio from gas tables (fanno flow tables,k=1.4,p2)
T2=t2*Tt //Satic temperature at P2 is K
X1=1.06922 //frictional constant fanno parameter from gas tables @M1
X2=0.353 //frictional constant fanno parameter from gas tables @M2
X=X1-X2 //overall frictional constant fanno parameter
L=(X*D)/(4*f) //Length of the pipe in m
//output
printf('(A)Temperature and velocity at section of the duct where the pressure has dropped to %3i bar due to friction are %3.1f K and %3.2f m/s\n (B)The distance between two section is %3.3f m',P2,T2,C2,L)
|
55c9116ded5bcb3972259a5a840446c97ac56083 | 337f9a673603d008cbd1b3cef9500ae806fef452 | /ruidos/Aula_02_Ex8Uniforme.sce | 5056ea452cf3aa48801a4ec50e66d5b4a20f01fd | [] | no_license | Gervaes/PDI | 6608e3ce8dcde1373512429039e3e51de32de2d1 | 912a9f1b6e40facdbef75d8c298a52127f5403e7 | refs/heads/master | 2021-04-12T04:31:13.241166 | 2018-06-21T14:01:39 | 2018-06-21T14:01:39 | 125,973,311 | 0 | 2 | null | 2018-03-29T19:52:56 | 2018-03-20T06:48:59 | Scilab | UTF-8 | Scilab | false | false | 2,051 | sce | Aula_02_Ex8Uniforme.sce | //Lendo imagens
a = imread('a.jpg');
b = imread('b.jpg');
c = imread('c.jpg');
d = imread('d.jpg');
e = imread('e.jpg');
//Transformando imagem pra matriz de double
a=im2double(a);
b=im2double(b);
c=im2double(c);
d=im2double(d);
e=im2double(e);
a=matrix(a(:), size(a));
b=matrix(b(:), size(b));
c=matrix(c(:), size(c));
d=matrix(d(:), size(d));
e=matrix(e(:), size(e));
//Distribuição padrão 10%
dist = 0.10;
old_rand_gen=rand('info');
rand('uniform');
//Aplicando ruído pra imagem a
prob=rand(a);
rand(old_rand_gen);
asp=a;
asp(prob < dist/2) = 0;
asp(prob >=dist/2 & prob < dist) = 1;
//Aplicando ruído pra imagem b
prob=rand(b);
rand(old_rand_gen);
bsp=b;
bsp(prob < dist/2) = 0;
bsp(prob >=dist/2 & prob < dist) = 1;
//Aplicando ruído pra imagem c
prob=rand(c);
rand(old_rand_gen);
csp=c;
csp(prob < dist/2) = 0;
csp(prob >=dist/2 & prob < dist) = 1;
//Aplicando ruído pra imagem d
prob=rand(d);
rand(old_rand_gen);
dsp=d;
dsp(prob < dist/2) = 0;
dsp(prob >=dist/2 & prob < dist) = 1;
//Aplicando ruído pra imagem e
prob=rand(e);
rand(old_rand_gen);
esp=e;
esp(prob < dist/2) = 0;
esp(prob >=dist/2 & prob < dist) = 1;
//Criando histogramas das imagens com ruído
for k=1:256
ah(k) = 0;
bh(k) = 0;
ch(k) = 0;
dh(k) = 0;
eh(k) = 0;
end
for i=1:256
for j=1:256
indice = double(asp(i,j)) + 1;
ah(indice) = ah(indice) + 1;
indice = double(bsp(i,j)) + 1;
bh(indice) = bh(indice) + 1;
indice = double(csp(i,j)) + 1;
ch(indice) = ch(indice) + 1;
indice = double(dsp(i,j)) + 1;
dh(indice) = dh(indice) + 1;
indice = double(esp(i,j)) + 1;
eh(indice) = eh(indice) + 1;
end
end
//Printando imagens
figure; imshow(a);
figure; imshow(asp);
figure; bar(ah);
figure; imshow(b);
figure; imshow(bsp);
figure; bar(bh);
figure; imshow(c);
figure; imshow(csp);
figure; bar(ch);
figure; imshow(d);
figure; imshow(dsp);
figure; bar(dh);
figure; imshow(e);
figure; imshow(esp);
figure; bar(eh);
|
6eca20c75566740a2584d8b653bcc8e646961d1e | 449d555969bfd7befe906877abab098c6e63a0e8 | /767/CH1/EX1.4.2/Ch1Exa1_4_2.sci | 82cb26349c91b5668762d8ebc92c4a4e8aa7d0bf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 584 | sci | Ch1Exa1_4_2.sci | // Scilab code Exa1.4.2 : Estimation of the Nucleus type from its radius : Page 33 (2011)
r = 3.46e-015; // Radius of the nucleus, m
r0 = 1.2e-015; // Distance of closest approach of the nucleus, m
A = round((r/r0)^3); // Mass number of the nucleus
if A == 23 then
element = "Na";
elseif A == 24 then
element = "Mg";
elseif A == 27 then
element = "Al";
elseif A == 28 then
element = "Si";
end
printf("The mass number of the nucleus is %d and the nucleus is of %s", A, element);
// Result
// The mass number of the nucleus is 24 and the nucleus is of Mg |
7e34bfa95602460d6882006a4ab088f1e871ca47 | 31e4840b6243736b6c4603f5712ce9b7b666dc68 | /321A/labs/exp11/src.sce | d5f6c7ba0b46226d921e56dadf8ea9e58a3ba75f | [] | no_license | austinbeauch/thirdyearphys | ca1d64b0a19b36ba3ce2a20021a939dfae6ae32f | 71b4eb77ff4e323c3df2aef42fb9f6a83265ba3d | refs/heads/master | 2020-07-22T02:47:37.732073 | 2019-12-04T05:44:24 | 2019-12-04T05:44:24 | 207,051,918 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 754 | sce | src.sce | gcf().background = 1;
n=150;
t=(0:0.1:n);
s=sin(t);
c=cos(t);
figure(1);
plot(t, s)
xlabel("t")
ylabel("sin(t)")
xtitle("Resitricted Sin Graph")
figure(2);
plot3d3(t, s, c)
xlabel("t")
ylabel("sin(t)")
xtitle("3D sine/cosine plot");
figure(3)
plot(t, sin(t) .* exp(-t/10))
xlabel("t")
ylabel("sin(t) .* exp(-t/10)")
xtitle("Sine wave: Amplitude Decay");
figure(4)
plot(t, sin(t .* exp(-t/160)))
xlabel("t")
ylabel("sin(t .* exp(-t/10))")
xtitle("Sine wave: Frequency Decay");
figure(5)
plot(t, sin(t .* exp(-t/50)) .* exp(-t/10))
xlabel("t")
ylabel("sin(t .* exp(-t/50)) .* exp(-t/10)")
xtitle("Sine wave: Frequency and Amplitude Decay");
figure(6)
plot(t, sin(t) + sin(0.9.*t))
xlabel("t")
ylabel("sin(t) + sin(0.9.*t)")
xtitle("Beat frequency")
|
afdd67bffc359bb30d9fc0b63c972b1d30c742d3 | b2675f983fedb79e5e6f1940962373bda0570ec4 | /Bank v5/Tests/easy-techm.tst | 520565af0e6685320fcff12135fdb80e0a69445a | [] | no_license | Meena92/Projects | b854c40b91515bb429c9e13fb0cbc95c03e0a9d6 | 06361e24bf51883ff4140db5c37c3f40836a5752 | refs/heads/master | 2020-03-29T01:45:03.726432 | 2019-06-11T05:26:08 | 2019-06-11T05:26:08 | 149,404,524 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 10,120 | tst | easy-techm.tst | <?xml version="1.0" ?>
<TestCase name="easy-techm" version="5">
<meta>
<create version="10.0.0" buildNumber="10.0.0.431" author="admin" date="11/22/2017" host="inbasdpc10722" />
<lastEdited version="10.0.0" buildNumber="10.0.0.431" author="admin" date="11/22/2017" host="inbasdpc10722" />
</meta>
<id>4FF4DA7BCF6611E79757D8CB8A8AB1DA</id>
<Documentation>Put documentation of the Test Case here.</Documentation>
<IsInProject>true</IsInProject>
<sig>ZWQ9NSZ0Y3Y9LTEmbGlzYXY9MTAuMC4wICgxMC4wLjAuNDMxKSZub2Rlcz0tMTcyNDUwODcwMA==</sig>
<subprocess>false</subprocess>
<initState>
</initState>
<resultState>
</resultState>
<Node name="Get" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7A4BA142CF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="ClickElement: EASY - Login - Tech Mahindra" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"type":"get","url":"{{ENDPOINT1}}"}]</json>
<params>
<Parameter>
<key>Get</key>
<value>path={{ENDPOINT1}}</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="ClickElement: EASY - Login - Tech Mahindra" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AAC5EE5CF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="SetElementText: txtLanId" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"type":"clickElement","locator":{"type":"link text","value":"EASY - Login - Tech Mahindra"}}]</json>
<params>
<Parameter>
<key>ClickElement</key>
<value>values={},locator={"type":"link text","value":"EASY - Login - Tech Mahindra"}</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="SetElementText: txtLanId" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AAC85F8CF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="SetElementText: txtPassword" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"text":"DS00432238","type":"setElementText","locator":{"type":"id","value":"txtLanId"}}]</json>
<params>
<Parameter>
<key>SetValue</key>
<value>values={text=DS00432238},locator={"type":"id","value":"txtLanId"},value=DS00432238</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="SetElementText: txtPassword" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AACD41BCF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="ClickElement: btnlogin" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"text":"nov.2017","type":"setElementText","locator":{"type":"id","value":"txtPassword"}}]</json>
<params>
<Parameter>
<key>SetValue</key>
<value>values={text=nov.2017},locator={"type":"id","value":"txtPassword"},value=nov.2017</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="ClickElement: btnlogin" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AACFB2ECF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="SetElementText: txtSearch" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"type":"clickElement","locator":{"type":"id","value":"btnlogin"}}]</json>
<params>
<Parameter>
<key>ClickElement</key>
<value>values={},locator={"type":"id","value":"btnlogin"}</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="SetElementText: txtSearch" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AACFB31CF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="ClickElement" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"text":"Meenakshi N","type":"setElementText","locator":{"type":"id","value":"txtSearch"}}]</json>
<params>
<Parameter>
<key>SetValue</key>
<value>values={text=Meenakshi N},locator={"type":"id","value":"txtSearch"},value=Meenakshi N</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="ClickElement" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AAD2244CF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="ClickElement: PACE" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"type":"clickElement","locator":{"type":"xpath","value":"//ul[@id='userlist']/li[7]"}}]</json>
<params>
<Parameter>
<key>ClickElement</key>
<value>values={},locator={"type":"xpath","value":"//ul[@id='userlist']/li[7]"}</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="ClickElement: PACE" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AAD4957CF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="ClickElement: PACEHRLink" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"type":"clickElement","locator":{"type":"link text","value":"PACE"}}]</json>
<params>
<Parameter>
<key>ClickElement</key>
<value>values={},locator={"type":"link text","value":"PACE"}</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="ClickElement: PACEHRLink" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AAD706ACF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="ClickElement: TimesheetEntrylinkNew" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"type":"clickElement","locator":{"type":"id","value":"PACEHRLink"}}]</json>
<params>
<Parameter>
<key>ClickElement</key>
<value>values={},locator={"type":"id","value":"PACEHRLink"}</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="ClickElement: TimesheetEntrylinkNew" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AAD706DCF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="ClickElement: lnkLogout1" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"type":"clickElement","locator":{"type":"id","value":"TimesheetEntrylinkNew"}}]</json>
<params>
<Parameter>
<key>ClickElement</key>
<value>values={},locator={"type":"id","value":"TimesheetEntrylinkNew"}</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="ClickElement: lnkLogout1" log=""
type="com.itko.lisa.glass.SeleniumStep"
version="1"
uid="7AAD9780CF6611E79757D8CB8A8AB1DA"
think="500-1s"
useFilters="true"
quiet="false"
next="end" >
<onStepFail>fail</onStepFail>
<alertAction>1</alertAction>
<alertInput></alertInput>
<json>[{"negated":false,"type":"clickElement","locator":{"type":"id","value":"lnkLogout1"}}]</json>
<params>
<Parameter>
<key>ClickElement</key>
<value>values={},locator={"type":"id","value":"lnkLogout1"}</value>
</Parameter>
</params>
<screens>
</screens>
</Node>
<Node name="end" log=""
type="com.itko.lisa.test.NormalEnd"
version="1"
uid="4FFDB421CF6611E79757D8CB8A8AB1DA"
think="0h"
useFilters="true"
quiet="true"
next="fail" >
</Node>
<Node name="fail" log=""
type="com.itko.lisa.test.Abend"
version="1"
uid="4FFDB41FCF6611E79757D8CB8A8AB1DA"
think="0h"
useFilters="true"
quiet="true"
next="abort" >
</Node>
<Node name="abort" log=""
type="com.itko.lisa.test.AbortStep"
version="1"
uid="4FFDB41DCF6611E79757D8CB8A8AB1DA"
think="0h"
useFilters="true"
quiet="true"
next="" >
</Node>
</TestCase>
|
4bbcb44190ac2704eadfa8335f2227c442ef5d38 | 449d555969bfd7befe906877abab098c6e63a0e8 | /45/CH10/EX10.5/example_10_5.sce | 43a79cc5d341f2389618a7180550bab0503e2ac9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 96 | sce | example_10_5.sce | //example 10.5
clc;
clear;
printf('The correct expression is : (count-up clock)''(Qa)(Qb)(Qc)'); |
496008dd608a423bf467cc8f8ab051558341c6be | 5f48beee3dc825617c83ba20a7c82c544061af65 | /tests/s/18.tst | 33b4f37d6a203029151fa103c12ded44d2493dae | [] | 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 | 34 | tst | 18.tst | int main() /* ошибка */
{
} |
0aa941a6460f5e5e66a546ede744576404c81253 | 98a32c1c1584a5cab1581cf73464b2559cb54d20 | /SciLabInterface/LoadParODELibrary.sci | 80a111a511378eaf27ccc112b0c52e94e4b997af | [] | no_license | apatriciu/ParODE | ecdb3144912069d20ef79d6031a04c3c7e7e6563 | 55520212b7b16a915962b0e6680bb38d6bd9f472 | refs/heads/master | 2020-05-20T03:09:10.377853 | 2014-02-26T15:59:39 | 2014-02-26T15:59:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 816 | sci | LoadParODELibrary.sci | function ParODELibIndex = LoadParODELibrary(strPathParODELibrary)
// load the ParODE shared library
fullLibName = strPathParODELibrary + 'libParODEShared.so';
functionEntries = ['GetErrorDescription', ...
'InitializeAllGPUs', ...
'GetAvailableGPUs', ...
'GetDeviceName', ...
'InitializeSelectedGPUs', ...
'SimulateODE', ...
'RegisterInput', ...
'CloseGPUC', ...
'StartTimer', ...
'StopTimer'];
ParODELibIndex = link( fullLibName, functionEntries, 'c');
// list all the functions; just to make sure that we have them
disp( 'ParODE library functions' )
disp( link() );
endfunction
|
3bf3a2e6660bfd0d75953fe9c82cb9ddb7a2668b | 449d555969bfd7befe906877abab098c6e63a0e8 | /1631/CH4/EX4.2.i/Ex4_2i.sce | 86f4adddd56130fb6a524c312f689c72011e6090 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 264 | sce | Ex4_2i.sce | //Caption:code word length
//Example 4.2.i
//page no 167
//find code word length
clc;
clear;
//Given data
bandwidth=4.2*10^6;
fm=bandwidth;
q=512// Quantization levels
//q=2^v
v=log10(512)/log10(2);
disp(v,"The code word legth is ");
disp("bits");
|
c91727eff0ce63ff6230c2eb30bbd0f60db89285 | e41b69b268c20a65548c08829feabfdd3a404a12 | /3DCosmos/Data/Scripts/Mathematics/Polyhedron.SCI | 663bf52b847b809c25f4e9f50233861782c04453 | [
"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 | 1,836 | sci | Polyhedron.SCI | codeblock readtextfile(ScriptDir+"\_TOOLS.sci");
points=list;idx=list;
points.add(vecnorm(vector(1,0,0))); idx.add(0);
points.add(vecnorm(vector(0,1,0))); idx.add(0);
points.add(vecnorm(vector(0,0,1))); idx.add(0);
points.add(vecnorm(vector(-1,0,0))); idx.add(0);
points.add(vecnorm(vector(0,-1,0))); idx.add(0);
points.add(vecnorm(vector(0,0,-1))); idx.add(0);
points.add(vecnorm(vector(1,1,1))); idx.add(1);
points.add(vecnorm(vector(-1,1,1))); idx.add(1);
points.add(vecnorm(vector(1,-1,1))); idx.add(1);
points.add(vecnorm(vector(1,1,-1))); idx.add(1);
points.add(vecnorm(vector(1,-1,-1))); idx.add(1);
points.add(vecnorm(vector(-1,1,-1))); idx.add(1);
points.add(vecnorm(vector(-1,-1,1))); idx.add(1);
points.add(vecnorm(vector(-1,-1,-1))); idx.add(1);
points.add(vecnorm(vector(0,1,1))); idx.add(2);
points.add(vecnorm(vector(0,1,-1))); idx.add(2);
points.add(vecnorm(vector(0,-1,1))); idx.add(2);
points.add(vecnorm(vector(0,-1,-1))); idx.add(2);
points.add(vecnorm(vector(1,0,1))); idx.add(2);
points.add(vecnorm(vector(1,0,-1))); idx.add(2);
points.add(vecnorm(vector(-1,0,1))); idx.add(2);
points.add(vecnorm(vector(-1,0,-1))); idx.add(2);
points.add(vecnorm(vector(1,1,0))); idx.add(2);
points.add(vecnorm(vector(1,-1,0))); idx.add(2);
points.add(vecnorm(vector(-1,1,0))); idx.add(2);
points.add(vecnorm(vector(-1,-1,0))); idx.add(2);
planes=list;
foreach pt in points do planes.add(CreatePlane1(@point(pt),vecnorm(pt)));
s=Polyhedron(planes,idx);
sf=T_scene_create;
sss=T_getscene;
sss.ambientlightcolor=color(0.15,0.15,0.15);
refframe=sss.addsubframe("refframe");
obj=refframe.add("SolidObject");
obj.CreateShape(s);
obj.setcolor(0,color(0.4,0.4,0.8));
obj.setcolor(1,color(0.4,0.8,0.4));
obj.setcolor(2,color(0.8,0.4,0.4));
obj.SpecularValue=30;
obj.SpecularColor=color(0.35,0.35,0.35);
while true do render;
|
0fafeeddd826db228c04b8b2eccb526ae72e3e76 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2534/CH11/EX11.10/Ex11_10.sce | d5d94e96118f90831f6e9e95b56f4ec0803022f7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 596 | sce | Ex11_10.sce | //Ex11_10
clc
VCC = 18//collector voltage
Vp = 15//output peak voltage
RL = 12//load resistnce
disp("VCC = "+string(VCC)+"V")
disp("Vp = "+string(Vp)+"V")
disp("RL = "+string(RL)+"ohm")
Ip = Vp/RL//output peak current
Idc = (2/%pi)*Ip//input direct current
disp("Ip = Vp/RL = "+string(Ip)+"A")
disp("Idc = (2/%pi)*Ip = "+string(Idc)+"A")
Pi_dc = VCC*Idc//input power
disp("Pi_dc = VCC*Idc = "+string(Pi_dc)+"W")
Po_ac = (Vp^2)/(2*RL)//output power
disp("Po_ac = (Vp^2)/(2*RL) = "+string(Po_ac)+"W")
eta = Po_ac/Pi_dc//efficiency
disp("eta = Po_ac/Pi_dc = "+string(eta*100)+"%")
|
41c6d902059da471f807bcd9bde2c666ee362a7e | e3c27edbd2f0a8e733cee84b90a906c0a6d7c176 | /sem_3/c/olimp/template.tst | 0a619c69c1d62450ef2509868ee33e47a9a65c0e | [] | no_license | dmitryhd/dmitryhd_code | c32223da5506156a068bbb0f20ad4cd06fdf2166 | 5173f6f74d4fa1c9c5fba9ffc4fc9134c56f4b0c | refs/heads/master | 2021-01-17T11:56:50.221745 | 2011-04-26T18:31:58 | 2011-04-26T18:31:58 | 1,650,576 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 14 | tst | template.tst | 3 4
1 100 34
|
b9aab55732334b69341445f3416f18452228ed83 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1730/CH5/EX5.3/Exa5_3.sce | 65cb90c9d68dd928612be17497c8368162b57f1a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 784 | sce | Exa5_3.sce | //Exa 5.3
clc;
clear;
close;
format('v', 11)
// given data
nita=628;// in J/m^3
B_max=1.3;// in Wb/m^2
f=25;// in Hz
ironMass=50;// in kg
densityOfIron=7.8*10^3;// in kg/m^3
V=ironMass/densityOfIron;
x=12.5;// in AT/m
y=0.1;// in T
// formula Hysteresis loss/second = nita*B_max^1.6*f*V
H_Loss_per_second = nita*B_max^1.6*f*V ;// in J/s
H_Loss_per_second=floor(H_Loss_per_second);
H_Loss_per_hour= H_Loss_per_second*60*60;// in J
disp("Hysteresis Loss per hour is : "+string(H_Loss_per_hour)+" J");
// Let Hysteresis Loss per m^3 per cycle = H1
H1=nita*B_max^1.6;
// formula hysteresis loss/m^3/cycle = x*y*area of B-H loop
Area_of_B_H_loop=H1/(x*y);
Area_of_B_H_loop=floor(Area_of_B_H_loop);
disp("Area of B-H loop is : "+string(Area_of_B_H_loop)+" cm^2");
|
18c9e963ac75b3ec44ca4b2f2888776a8feb31d3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2048/CH13/EX13.8/lqg_as1.sce | 438669db947e91af8a7904814f59bd09a1d5c0d7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 830 | sce | lqg_as1.sce | // LQG control design for the problem discussed in Example 13.6 on page 474.
// 13.8
// Solves Example 3.1 of Ahlen and Sternad in Hunt's book
exec('lqg1.sci',-1);
exec('specfac.sci',-1);
exec('flip.sci',-1);
exec('polmul.sci',-1);
exec('polsize.sci',-1);
exec('poladd.sci',-1);
exec('polyno.sci',-1);
exec('putin.sci',-1);
exec('clcoef.sci',-1);
exec('xdync.sci',-1);
exec('rowjoin.sci',-1);
exec('left_prm.sci',-1);
exec('t1calc.sci',-1);
exec('indep.sci',-1);
exec('seshft.sci',-1);
exec('makezero.sci',-1);
exec('move_sci.sci',-1);
exec('colsplit.sci',-1);
exec('cindep.sci',-1);
exec('ext.sci',-1);
A = [1 -0.9]; dA = 1; B = [0.1 0.08]; dB = 1;
k = 2; rho = 0.1; C = 1; dC = 0;
V = 1; dV = 0; F = 1; dF = 0; W = [1 -1]; dW = 1;
[R1,dR1,Sc,dSc] = ...
lqg1(A,dA,B,dB,C,dC,k,rho,V,dV,W,dW,F,dF)
|
facfa4be938e956ff49ee59a81a9393cbcf61c40 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1019/CH6/EX6.10/Example_6_10.sce | 88fd3e22af3da1323e76a69b7c38b6ecbaf48f4c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 791 | sce | Example_6_10.sce | //Example 6.10
clear;
clc;
//Given
Et=3.716;//transitioal energy in J
T=298;//temperature in K
Ht=6.193;//transitional enthalpy in J
R=8.314;//gas constant in J mol^-1 K^-1
Cp=20.785;//transitional heat capacity in J K^-1 mol^-1
h=6.626*10^(34);//plancks constant in Js
NA=6.023*10^(23);//Avogadro number
k=1.38*(10^(-23));//in J K^-1
P=101325;//Pressure in N m^-2
m=5.313*10^-26;//mass of one molecule of O2 in kg
//To calculate the transitional entropy,work function,and free energy for oxygen gas
qt=7.906*10^6;//the transitional partion function
St=R*(2.5+log(qt));//transitional entropy in J K^-1 mol^-1
Gt=-R*T*log(qt);//transitional free energy in J mol^-1
mprintf('the transitional entropy = %f J K^-1 mol^-1',St);
mprintf('\n the transitional free energy = %f J mol^-1',Gt);
//end |
840a74e89269aac1af56f218a1dd38e7478b446e | 08992297ffb99b22817696ef041cbe34f9469536 | /PulseSensor_Capture/capturehr.sce | e5c1678f6307289f0c5be06df0a809cd541d58ba | [
"MIT"
] | permissive | meefik/PulseSensor_Amped_Arduino | 1bb5945e59e56e2b0c3a7fcdea0b816ebe06831b | 4b25a41f1a72ee9516c5e4730598f98825a5818d | refs/heads/master | 2020-12-03T09:11:23.168345 | 2015-11-26T10:46:57 | 2015-11-26T10:54:00 | 38,135,790 | 2 | 0 | null | 2015-06-26T21:54:34 | 2015-06-26T21:54:34 | null | UTF-8 | Scilab | false | false | 575 | sce | capturehr.sce | atomsLoad("serial")
h = openserial("/dev/ttyACM0","115200,n,8,1")
data=zeros(1,500)
figure(1)
clf()
plot(1:500,data)
set(gca(),"auto_clear","on")
buf = ''
for k = 1:5000
buf = buf + readserial(h)
arr = strsplit(buf,'/\n/')
[r,n] = size(arr)
for i = 1:r-1
x = arr(i)
if strindex(x,'S') == 1 then
d = strtod(part(x,2:length(x)))
//printf("_%d_\n",d)
data = [data(2:length(data)), d]
end
end
buf = arr(r)
//printf("%s_", buf)
plot(1+k:500+k,data)
end
//printf("%s", buf)
closeserial(h)
|
51f208c82d6ef340a469519fb18aedf25fcd05b6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1598/CH5/EX5.12/ex5_12.sce | 0b209849a3bdbf46d2ff6e302142593eb01a91ba | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 487 | sce | ex5_12.sce | clc;
R1=2; //resisitance in Ohm
R2=3; //resistance in Ohm
R3=1; //resistance in Ohm
Rp=(R1*R2)/(R1+R2); //calculating parallel resistance
R=Rp+1; //1 Ohm in series
disp(R,"(1)Equivalent Resisitance in Ohm = "); //displaying result
Rs=(R1+R2+R3); //series resistances
disp(Rs,"(2)All resistances in series in Ohm = "); //displaying result
Rp=(1/R1)+(1/R2)+(1/R3); //calculating parallel resistance
disp((1/Rp),"(3)All in Parallel in Ohm = "); //displaying result |
64821d310ab053659932f635acaaf1b14251f3d3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1061/CH8/EX8.18/Ex8_18.sce | 5f5e151f5651a309f39eca5017b70d53ee59e4d4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 432 | sce | Ex8_18.sce | //Ex:8.18
clc;
clear;
close;
y1=550*10^-3;// peak of eyes response in um
y2=10.6;// standard wavelength in um
y3=2.39;// predominant IR line of He-Ne laser in um
E1=1.24/y1;// energy in electron volts
E2=1.24/y2;// energy in electron volts
E3=1.24/y3;// energy in electron volts
printf("The energy =%f electron volts", E1);
printf("\n The energy =%f electron volts", E2);
printf("\n The energy =%f electron volts", E3); |
f95b9f66ade9eca17d411c402c00f681b04caddc | 449d555969bfd7befe906877abab098c6e63a0e8 | /1460/CH8/EX8.1/8_1.sce | 553b82657b01a7f6b2e1b1444abdafc41bc57f7a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 440 | sce | 8_1.sce | clc
//Initialization of variables
ratio=7
Q=300 //B/lbm
T1=60+460 //R
P1=14.7 //lb/in^2
cv=0.1715 //B/lvm F
g=1.4
//calculations
Tratio=(ratio)^(g-1)
T2=Tratio*T1
T3=T2+Q/cv
eta=1- 1/Tratio
WbyJ=eta*Q
W=778*WbyJ
//results
printf("Final temperature = %d R",T3)
printf("\n Thermal efficiency = %.3f",eta)
printf("\n Work done = %d ft-lb/lbm",W)
//The answers in the textbook are a bit different due to rounding off error
|
c97d843cd87d69baf6b9428367d2dd075384ea29 | 717ddeb7e700373742c617a95e25a2376565112c | /608/CH36/EX36.13/36_13.sce | 144c51540ecdee2a06fa58aa6e44e5a78650be29 | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 1,567 | sce | 36_13.sce | //Problem 36.13: In the circuit shown in Figure 36.17 the supply voltage v is given by v = 300sin314t + 120sin(942t + 0.698) Volts.Determine (a) an expression for the supply current, i, (b) the percentage harmonic content of the supply current, (c) the total power dissipated, (d) an expression for the p.d. shown as v1, and (e) an expression for current ic.
//initializing the variables:
V1m = 300; // in volts
V3m = 120; // in volts
phiv1 = 0; // in rad
phiv2 = 0.698; // in rad
w1 = 314; // in rad
C = 2.123E-6; // in farads
R1 = 560; // in ohms
R2 = 2000; // in Ohm
//calculation:
//voltage
V1 = V1m*cos(phiv1) + %i*V1m*sin(phiv1)
V3 = V3m*cos(phiv3) + %i*V3m*sin(phiv3)
//capacitive reactance,
Xc1 = 1/(w1*C)
//impedance at the fundamental frequency,
Z1 = R1 + %i*Xc1*R2/(R2 + %i*Xc1)
//Maximum current at fundamental frequency
I1m = V1/Z1
I1mag = (real(I1m)^2 + imag(I1m)^2)^0.5
phii1 = atan(imag(I1m)/real(I1m))
//Third harmonic
Xc3 = Xc1/3
//impedance at the third harmonic frequency,
Z3 = R1 + %i*Xc3*R2/(R2 + %i*Xc3)
//Maximum current at third harmonic frequency
I3m = V3/Z3
I3mag = (real(I3m)^2 + imag(I3m)^2)^0.5
phii3 = atan(imag(I3m)/real(I3m))
//Percentage harmonic content of the supply current is given by
percent = I3mag*100/I1mag
//total active power
P = (0.707*V1m)*(0.707*I1mag)*cos(phiv1 - phii1) + (0.707*V3m)*(0.707*I3m)*cos(phiv3 - phii3)
printf("\n\n Result \n\n")
printf("\n(b)Percentage harmonic content of the supply current is %.0f percent",percent)
printf("\n(c)total active power is %.2f W",P) |
8dc0f2568e4d73339f713d3332b0c167921cac77 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2912/CH9/EX9.15/Ex9_15.sce | 810533c57353423156f9f52735a02ed53ad22ae3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,101 | sce | Ex9_15.sce | // chapter 9
// example 9.15
// Find the electron and hole densities and conductivity and the resistance
// page 278-279
clear;
clc;
//given
ue=0.39; // in m^2/V-s (mobility of electron)
n=5E13;// number of donor atoms
ni=2.4E19; // in atoms/m^3 (intrinsic carrier density)
l=10; // in mm (length of rod)
a=1; // in mm (side of square cross-section)
e=1.6E-19;// in C (charge of electron)
//calculate
l=l*1E-3; // changing unit from mm to m
a=a*1E-3; // changing unit from mm to m
A=a^2; // calculation of cross-section area
Nd=n/(l*A); // calculation of donor concentration
ne=Nd; // calculation of electron density
nh=ni^2/Nd; // calculation of hole density
printf('\nThe electron density is \tne=%1.0E /m^3',ne);
printf('\nThe hole density is \tnh=%1.2E /m^3',nh);
// since sigma=ne*e*ue+nh*e*ue and since ne>>nh
// therefore sigma=ne*e*ue
sigma=ne*e*ue; // calculation of conductivity
printf('\nThe conductivity is \t%.f /ohm-m',sigma);
rho=1/sigma; // calculation of resistivity
R=rho*l/A; // calculation of resistance
printf('\nThe resistance is \tR=%.f ohm',R);
|
1be97d10fc2ccacba61f82ca817ee0f7a5553e7e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3731/CH5/EX5.3/Ex5_3.sce | 79a209292f02c33804df503b1dbeb3c448ef7103 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 683 | sce | Ex5_3.sce | //Chapter 5:Dc Motor Drives
//Example 3
clc;
//Variable Initialization
//Motor ratings
V1=220 //rated voltage in V
Ia1=200 //rated current in A
Ra=0.06 //armature resistance in ohms
Rb=0.04 //internal resistance of the variable source in ohms
N1=800 //speed in rpm
N2=600 //speed when motor is operatingin regenerative braking in rpm
//Solution
Ia2=0.8*Ia1 //motor is opereting in regenerative braking at 80% of Ia1
E1=V1-Ia1*Ra //back emf at rated operation
E2=(N2/N1)*E1 //back emf at the given speed N2
V2=E2-Ia2*(Ra+Rb) //internal voltage of thevariable source
//Results
mprintf("\n Internal voltage of the variable source:%.1f V",V2)
|
dd30371786e262fd3a472cf5511b42afa28b5973 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1511/CH2/EX2.21/ex2_21.sce | 13c4d903d1178186dc9e2f424af56d280697b89e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 282 | sce | ex2_21.sce | // Example 2.21 page no-75
clear
clc
A=9.64*10^21
T=320
e=1.6*10^-19
Eg=0.75
k=1.37*10^-23
ni=A*T^(3/2)*%e^(-(e*Eg)/(2*k*T))
printf("\nni=%.2f *10^19 electrons(holes)/m^3",ni/10^19)
mup=0.36
mun=0.17
sig=e*ni*(mup+mun)
printf("\nConductivity, Sigma=%.3f Mho/m",sig)
|
5c41e383ff60a1f57333898fd376e2960c2bf769 | 449d555969bfd7befe906877abab098c6e63a0e8 | /260/CH10/EX10.2/10_2.sce | 7f2621cbf7b61a3f8449e33b3a5b4456729b7171 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,515 | sce | 10_2.sce | //Eg-10.2
//pg-432
clear
clc
close()
// A = (x-x0)/h = 0.1*(x-30)
//A is the greek alphabet 'alpha'
Y = [31.8;55.3;92.5;149.4];
X = [30;40;50;60];
T = zeros(4,4);
T(:,1) = Y;
for(j = 2:4)
for(i = 1:4+1-j)
T(i,j) = T(i+1,j-1) - T(i,j-1);
end
end
//disp(T)
//from equation [10], the interpolating polunomial is
//p3 = f(x0) + A*Df(x0) + A(A-1)/2!*D2f(x0) + A(A-1)(A-2)/3!*D3f(x0)
//note that A is used in place of 'alpha' and D in place of 'delta'
// The above expression p3 can also be written as
//p3 = f(x0) + A * [ Df(x0) - D2f(x0)/2 + 1/3*D3f(x0) ] + A^2 * [ D2f(x0)/2 - 1/2*D3f(x0)] + A^3/6 * D3f(x0)..............call this expression 1
f = T(1,1);
Df = T(1,2);
D2f = T(1,3);
D3f = T(1,4);
//Substituting the values of D,D2,D3 in the expression 1 we finally get
// p3 = a0 + a1*A + a2*A^2 + a3*A^3
a0 = f;
a1 = Df - D2f/2 + 1/3*D3f;
a2 = D2f/2 - 1/2*D3f;
a3 = 1/6*D3f;
//disp(a0,a1,a2,a3)
//Now taking A = 0.1*(x-30)
//p3 = b0 + b1*x + b2*x^2 + b3*x^3
b0 = a0 -3*a1 + 9*a2 - 27*a3;
b1 = 0.1*a1 - 0.6*a2 + 2.7*a3;
b2 = 0.01*a2 - 0.09*a3;
b3 = 0.001*a3;
//disp(b3,b2,b1,b0)
printf('The polynomial is p(T) = (%f)*T^3 + (%f)*T^2 + (%f)*T + (%f)\n',b3,b2,b1,b0)
deff('out = func(in)','out = b3*in^3 + b2*in^2 + b1*in + b0')
x = 30:60;
y = func(x);
plot(x,y)
plot(X,Y,'db')
legend('Interpolated polynomial','Experimental data points')
xlabel('Temperature')
ylabel('Vapour Pressure of Water')
|
e5c84cb1c429729a8912cd3bf6345ead83716b4f | 449d555969bfd7befe906877abab098c6e63a0e8 | /284/CH12/EX12.1/ex1.sce | c2d4c11d139b4c8f8f20933af30070af52973e0d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 480 | sce | ex1.sce | // Chapter 12_The junction field effect transistor
//Caption_Device characteristics
//Ex_1//page 557
T=300
Na=10^18
e=1.6*10^-19
eps=8.85*10^-14*11.7
ni=1.5*10^10
Nd=10^16 //donor concentration
a=0.75*10^-4 //metallurgical channel thichness
Vpo=e*a^2*Nd/(2*eps) //internal pinch off voltage
Vbi=0.0259*log(Na*Nd/ni^2) //built in potential barrier
Vp=Vbi-Vpo //pinch off voltage
printf('The pinch off voltage of this n-channel JFET is %1.2fV',Vp)
|
16ad8d87e49fe566dcdabd93e82f402d72d536f2 | 01ecab2f6eeeff384acae2c4861aa9ad1b3f6861 | /xcos_blocks/analg_arch.sce | 8196b5afc77f2279741af2793508c4bf0de1872a | [] | no_license | jhasler/rasp30 | 9a7c2431d56c879a18b50c2d43e487d413ceccb0 | 3612de44eaa10babd7298d2e0a7cddf4a4b761f6 | refs/heads/master | 2023-05-25T08:21:31.003675 | 2023-05-11T16:19:59 | 2023-05-11T16:19:59 | 62,917,238 | 3 | 3 | null | null | null | null | UTF-8 | Scilab | false | false | 487 | sce | analg_arch.sce | .model ota
.inputs in[0] in[1]
.outputs out
.blackbox
.end
.model cap
.inputs in
.outputs out
.blackbox
.end
.model nfet
.inputs in[0] in[1]
.outputs out
.blackbox
.end
.model pfet
.inputs in[0] in[1]
.outputs out
.blackbox
.end
.model tgate
.inputs in[0] in[1]
.outputs out
.blackbox
.end
.model nmirror
.inputs in[0]
.outputs out
.blackbox
.end
.model volswc
.inputs in[0] in[1] in[2] in[3] in[4] in[5] in[6] in[7] ci[0] ci[1] ci[2]
.outputs out co[0] co[1] co[2]
.blackbox
.end |
72d713e0a89e626071de124192defb86315df31a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1466/CH9/EX9.2/9_2.sce | 748929dd83723852719256d33ab43b5b2176b3b0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 306 | sce | 9_2.sce |
clc
//initialisation of variables
w=64//lb/ft^3
g=32.2//ft/sec^2
s=10//mph
l=100//ft
r=1/8//in
cf=0.0047
A=1600//ft^2
v1=27*10^-6//engineer units
//CALCULATIONS
v=s*5280/3600
p=w/g
k1=l*12/r
Re=p*v*l/(v1)
R=cf*p*A*v*v/2
fhp=R*v/550
//RESULTS
printf ('Frictional horse power= %.f',fhp)
|
d625ce75eb13526f328ac1959383c0af2cea6762 | bccc40c870821aa0926bcb3bcd6e30c02f5c9ea7 | /TopGuidesProcedure_TEST.tst | be3c6b81c6499a757c221e25759568e0d93d4ef3 | [] | no_license | rivkazi/DataBaseProject--PLSQL | 27c7c8b3cf34f64de9709030064c41020d1595d4 | 70c6f93f6fa0f1f4ec3e42c7051f883ad118d018 | refs/heads/main | 2023-06-30T21:02:42.217915 | 2021-08-04T21:22:05 | 2021-08-04T21:22:05 | 392,821,978 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 147 | tst | TopGuidesProcedure_TEST.tst | PL/SQL Developer Test script 3.0
4
begin
-- Call the procedure
TopGuidesProcedure(treshold => :treshold);
end;
1
treshold
1
10
4
0
|
bbf98407d93b28c192eeee1541d9585eb5d4cae6 | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/eqtflength/eqtflength7.sce | 6c08e2a125c5d284419821f05339ffa99147f3da | [] | no_license | deecube/fosseetesting | ce66f691121021fa2f3474497397cded9d57658c | e353f1c03b0c0ef43abf44873e5e477b6adb6c7e | refs/heads/master | 2021-01-20T11:34:43.535019 | 2016-09-27T05:12:48 | 2016-09-27T05:12:48 | 59,456,386 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 133 | sce | eqtflength7.sce | num=['a' 'a' 'a'];
den=[1 2 3];
[b,a]=eqtflength(num,den);
disp(b);
disp(a);
////output
//
//!a a a !
//
// 1. 2. 3.
|
b3d2f22a8e3e6753ad021f31167660eb1d211502 | 717ddeb7e700373742c617a95e25a2376565112c | /3424/CH5/EX5.14/Ex5_14.sce | e695d19744d17cacb40fec57a4886bbde1faeb66 | [] | 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 | 358 | sce | Ex5_14.sce | clc
// Intialization of variables
d2 = 0.12 //m
A2 = (%pi/4)*(d2)^2
Df = 1000 // Pa
D = 1.23 //Kg/m^3
Kl1 = 0.05
Kl2 = 0.5
// calculations
Q1 = A2*((Df)/(D*(1+Kl1)/2))^0.5
Q2 = A2*((Df)/(D*(1+Kl2)/2))^0.5
//Results
printf(" Volume rate for rounded entrance is %.3f m^3/s",Q1)
printf("\n Volume rate for cylindrical entrance is %.3f m^3/s",Q2)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.