blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 6 214 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 6 87 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 15 values | visit_date timestamp[us]date 2016-08-04 09:00:04 2023-09-05 17:18:33 | revision_date timestamp[us]date 1998-12-11 00:15:10 2023-09-02 05:42:40 | committer_date timestamp[us]date 2005-04-26 09:58:02 2023-09-02 05:42:40 | github_id int64 436k 586M ⌀ | star_events_count int64 0 12.3k | fork_events_count int64 0 6.3k | gha_license_id stringclasses 7 values | gha_event_created_at timestamp[us]date 2012-11-16 11:45:07 2023-09-14 20:45:37 ⌀ | gha_created_at timestamp[us]date 2010-03-22 23:34:58 2023-01-07 03:47:44 ⌀ | gha_language stringclasses 36 values | src_encoding stringclasses 17 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 1 class | length_bytes int64 5 10.4M | extension stringclasses 15 values | filename stringlengths 2 96 | content stringlengths 5 10.4M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
51fab6b3b3b1f6662b5e5895fccdc1732a1a5455 | abdfb2db73e5240261372a514baa0c1a7bed7467 | /cudd-3.0.0/nanotrav/adj49.tst | 571c9ee707a9cabbf4fd3c5bedd6da104879eb15 | [] | no_license | steefbrown/ece6740 | 21001ca156e24e23b71d6b719f11010ba4ce2a40 | cefe8dd498c7849546ece98fbd4d70b844f2bd5c | refs/heads/master | 2021-01-01T05:23:01.008122 | 2016-05-09T19:16:56 | 2016-05-09T19:16:56 | 57,227,414 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 177 | tst | adj49.tst | # Nanotrav Version #0.12, Release date 2003/12/31
# nanotrav/nanotrav -p 1 -ordering dfs -reordering cogroup -drop -char2vect -cofest ./nanotrav/adj49.blif
# CUDD Version 3.0.0
|
87ac0b9287ae4a08f3b888bcfcda6534918cde71 | f98e6eb45cba97e51f3e190748f75d277fc4c38d | /Lab/Lab5/lab05_solution.sce | 40148a45bb5c1482e1d44e98a4be1fc85509495c | [] | no_license | sctpimming/SC422401 | 68359adab92095e4c60121ff17ac43efc9c46fb4 | 5c43c58c9bf0e923b640c115b4ef618ad72d15a6 | refs/heads/master | 2020-11-25T18:37:53.377582 | 2020-02-26T07:56:39 | 2020-02-26T07:56:39 | 228,796,306 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,730 | sce | lab05_solution.sce | ////////////////////////////////////////////////////////////////////////
// SC422401 การเขียนโปรแกรมคอมพิวเตอร์สำหรับคณิตศาสตร์
// ภาคการศึกษาปลาย ปีการศึกษา 2562
// เฉลยใบกิจกรรมที่ 5
// โดย ผศ. ดร.ทศพร ทองจันทึก
// แก้ไขล่าสุด : 23 มกราคม 2563
////////////////////////////////////////////////////////////////////////
clear
function [sn] = MyTerm_r(n)
// หาค่าของจำนวนจริง s_n เมื่อ n เป็นจำนวนเต็มบวก โดยใช้ฟังก์ชันเวียนเกิด
// Input:
// n : จำนวนเต็มบวก
// Output:
// sn : จำนวนจริง
if n < 1 then
// แจ้งข้อผิดพลาด ถ้า n > 1
error("n ต้องเป็นจำนวนเต็มบวกเท่านั้น")
elseif n == 1 then
sn = 2
elseif n == 2 then
sn = -1
else
s1 = MyTerm_r(n-1) // s_{n-1}
s2 = MyTerm_r(n-2) // s_{n-2}
sn = (3*s1-1)/(s2^2+1)
end
endfunction
function [sn] = MyTerm_i(n)
// หาค่าของจำนวนจริง s_n เมื่อ n เป็นจำนวนเต็มบวก โดยใช้ฟังก์ชันทำซ้ำ
// Input:
// n : จำนวนเต็มบวก
// Output:
// sn : จำนวนจริง
if n < 1 then
// แจ้งข้อผิดพลาด ถ้า n > 1
error("n ต้องเป็นจำนวนเต็มบวกเท่านั้น")
elseif n == 1 then
sn = 2
elseif n == 2 then
sn = -1
end
s1 = -1 // กำหนดค่าของ s_{n-1}
s2 = 2 // กำหนดค่าของ s_{n-2}
i = 3 // กำหนดค่าตัวนับ
while i <= n
sn = (3*s1-1)/(s2^2+1)
// ปรับปรุงค่า s_{n-1}, s_{n-2} และตัวนับ
s2 = s1
s1 = sn
i = i + 1
end
endfunction
// แสดงค่าของ s_10 และเวลาที่ใช้ในการคำนวณ
// เมื่อเรียกใช้ฟังก์ชัน MyTerm_r
tic // เริ่มจับเวลา
sn_r = MyTerm_r(30) // ค่าของ s_10 ที่ได้จากฟังก์ชัน MyTerm_r
t_r = toc() // เวลาที่ฟังก์ชัน MyTerm_r ใช้ในการคำนวณ s_10 (หน่วยเป็นวินาที)
printf("ค่าของ s10 จากฟังก์ชัน MyTerm_r = %.6f\n", sn_r)
printf("เวลาที่ฟังก์ชัน MyTerm_r ใช้ = %.6f วินาที\n", t_r)
// แสดงค่าของ s_10 และเวลาที่ใช้ในการคำนวณ
// เมื่อเรียกใช้ฟังก์ชัน MyTerm_i
tic // เริ่มจับเวลา
sn_i = MyTerm_i(30) // ค่าของ s_10 ที่ได้จากฟังก์ชัน MyTerm_i
t_i = toc() // เวลาที่ฟังก์ชัน MyTerm_i ใช้ในการคำนวณ s_10 (หน่วยเป็นวินาที)
printf("ค่าของ s10 จากฟังก์ชัน MyTerm_i = %.6f\n", sn_i)
printf("เวลาที่ฟังก์ชัน MyTerm_i ใช้ = %.6f วินาที\n", t_i)
|
87274d532603c54283fb8a4223cdf0aa98011ffe | 449d555969bfd7befe906877abab098c6e63a0e8 | /2606/CH8/EX8.23/ex8_23.sce | 34c4231617d3deb066f55d4c6e9f9188b4b49f32 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 411 | sce | ex8_23.sce | //Page Number: 8.23
//Example 8.23
clc;
//Given,
// S=10D-8*(1-(|f|/10D+8));
//(a)Power contenet of output noise
//Bandwidth of 2MHz centered at 50MHz
//Therefore, first limits will be
x0=-51D+6;
x1=-49D+6;
P1=integrate('1+(f/10^8)','f',x0,x1);
//And,second limits will be
x2=49D+6;
x3=51D+6;
P2=integrate('1-(f/10^8)','f',x2,x3);
P=10D-8*(P1+P2);
disp('W',P,'Power content:');
|
f924fc0bd6fcc24e8b99cae723fa86a6a0439d33 | 449d555969bfd7befe906877abab098c6e63a0e8 | /896/CH6/EX6.12/12.sce | f2f8b4497fe191f974d5823b1f914ac5929d3fcf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 275 | sce | 12.sce | clc
//Example 6.12
//Calculate pressure drop due to valves and fittings
K=27.56//deimentionless
rho=62.3//lbm/ft^3
v=13//ft/s
//1 ft = 12 in
//1 lbf.s^2 = 32.2 lbm.ft
dp=rho*K*(v^2/2)/32.2/144//psi
printf("THe pressure drop due to valves and fittings is %d psi",dp); |
5572d498fec8014a51daf0175e6f60211d1b9def | 280a6ba512debfe9018f27b12c6777807f321b28 | /secant-method.sci | 510626fc97ac4dcb140421ef38ab302302090347 | [] | no_license | remullo/Computational-Mathematical-Modeling-Projects-for-Scientific-Approaches | 326381bbbeb4933ccb3ad2e9455a894018130393 | f902df127645a158c9f4bdc37a59652e0e71a845 | refs/heads/master | 2023-04-12T08:08:32.288263 | 2021-07-26T22:22:06 | 2021-07-26T22:22:06 | 54,357,173 | 2 | 0 | null | 2021-07-26T22:22:07 | 2016-03-21T03:29:15 | Scilab | UTF-8 | Scilab | false | false | 991 | sci | secant-method.sci | //False Position method by Rêmullo Costa
function y = f(x);
p = 3.5;
y = (x ./ (1-x)) .* sqrt(2 * p./(2 + x)) - 0.04; //função a ser utilizada (fuction to be used - can be any function)
endfunction
x = [0:0.01:0.1]; //valores de x para checar a função no gráfico (velues of 'x' to check the function on the graphic)
//plot da função
plot(x,f(x), '-o');
xgrid;
x_velho = 0.01; //chute inicial (guess)
x = 0.1;
erro = 1; //erro inicial para rodar a função (initial error to run the function)
it = 1; //iteracão inicial
precisao = -2 //(accuracy)
while(erro >= 10^precisao)&it<200 do //if the error is bigger than the accuracy and the iteration is smaller than 200
x_velho2 = x_velho; //save the first initial guess
x_velho = x; //change the initial guess for x
secante = (f(x_velho)-f(x_velho2))/(x_velho-x_velho2)
x = x_velho - (f(x_velho)/secante); //calcular o proximo x
erro = abs((x-x_velho)/ x);
disp([it x erro]);
it = it+1;
end
|
36ec5b2f9f3634b78e2083e9d8bf075e4332f230 | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/MX41.prev.tst | aeab326336a2feae0ae3dd897b0fc1940de00761 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gfis/ramath | 498adfc7a6d353d4775b33020fdf992628e3fbff | b09b48639ddd4709ffb1c729e33f6a4b9ef676b5 | refs/heads/master | 2023-08-17T00:10:37.092379 | 2023-08-04T07:48:00 | 2023-08-04T07:48:00 | 30,116,803 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,204 | tst | MX41.prev.tst | chain 2, fact 1 [[-2,-2,1,0],[1,0,2,2],[2,2,0,1],[0,1,-2,-2]] [9,10,-1,-12] => [-39,-17,26,36] => [138,85,-76,-141] ?? [-522,-296,305,519]
chain 2, fact 1 [[-2,-1,0,-1],[2,1,1,1],[0,1,1,0],[1,0,-1,1]] [9,10,-1,-12] => [-16,15,9,-2] => [19,-10,24,-27] ?? [-1,25,14,-32]
chain 2, fact 1 [[-2,1,1,-2],[2,-1,-2,1],[1,0,0,0],[0,1,2,2]] [9,10,-1,-12] => [15,-2,9,-16] => [9,-2,15,-16] ?? [27,-26,9,-4]
chain 8, fact 1 [[-2,1,-2,0],[2,0,2,1],[1,2,0,2],[0,-2,1,-2]] [9,10,-1,-12] => [-6,4,5,3] => [6,1,8,-9] => [-27,19,-10,24] => [93,-50,59,-96] => [-354,208,-199,351] => [1314,-755,764,-1317] => [-4911,2839,-2830,4908] => [18321,-10574,10583,-18324]
chain 2, fact 1 [[0,-2,1,-2],[1,2,0,2],[2,0,2,1],[-2,1,-2,0]] [9,10,-1,-12] => [3,5,4,-6] => [6,1,8,-9] ?? [24,-10,19,-27]
chain 8, fact 1 [[0,1,-2,-2],[2,2,0,1],[1,0,2,2],[-2,-2,1,0]] [9,10,-1,-12] => [36,26,-17,-39] => [138,85,-76,-141] => [519,305,-296,-522] => [1941,1126,-1117,-1944] => [7248,4190,-4181,-7251] => [27054,15625,-15616,-27057] => [100971,58301,-58292,-100974] => [376833,217570,-217561,-376836]
chain 2, fact 1 [[2,0,0,1],[1,1,-1,1],[-2,2,1,0],[0,-2,1,-1]] [9,10,-1,-12] => [6,8,1,-9] => [3,4,5,-6] ?? [0,-4,7,3]
elapsed time: nn s
|
b3fba182e02f4db218fa19ab621a45251ba2d04c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2837/CH11/EX11.3/Ex11_3.sce | f5ae7427b2174703f16086ab6fe02c1288f0c96e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex11_3.sce | clc
clear
//Initialization of variables
v1=60 //ft/s
d1=10 //in
d2=15 //in
P=15 //psia
R=53.35
T=540 //R
g=32.17 //ft/s^2
v1=60 //ft/s
//calculations
v2=v1*d1^2 /d2^2
rho=P*144/(R*T)
dp=rho*(v2^2 -v1^2)/(2*g) /144
p2=P-dp
//results
printf("Final pressure = %.3f psia",p2)
|
3a5ab1b3a9e366b981bd07d37a87342c19c409b3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2300/CH8/EX8.14.1/Ex8_1.sce | 3e8f5424290837a826dd6fc8f712ed1622365cbb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 808 | sce | Ex8_1.sce |
//scilab 5.4.1
//windows 7 operating system
//chapter 8:Junction Transistors:Biasing and Amplification
clc;
clear;
//given data
b=99;
Vbe=0.7; //Volatge between base and emitter in V
Vcc=12; //Volatge source applied at collector in V4
Rl=2*10^3; //load resistance in ohms
Rb=100*10^3; //Resistance at base in ohms
Ib=(12-0.7)/((100*Rl)+Rb); //Base current in micro Ampere
format("v",7)
disp('mA',Ib*10^3,'Ib=');
Ic=b*Ib;
format("v",7)
disp('mA',Ic*10^3,'Ic=');
Vce=4.47; //Voltage between collector and emitter in V
S=(b+1)/(1+b*Rl/(Rl+Rb)); //stabilty factor 1
disp(S,'S=');
S1=b/(Rb+Rl*(1+b)); //stabilty factor 2 in A/V
disp('A/V',S1,'S1=');
S2=(Vcc-Vbe-(Ic*Rl))/(Rb+Rl*(1+b)); //stability factor 3 in A
disp('A',S2,'S2=');
|
18a8e438f6414fac4244c83c5762055b59a31990 | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/S02.prev.tst | 8df49d6c0fc12dda9934a188ba88a26b4ee68439 | [
"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 | 114 | tst | S02.prev.tst | Identity: [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
*(x + 1): [[x+1,0,0,0],[0,x+1,0,0],[0,0,x+1,0],[0,0,0,x+1]]
|
b4fe3ddbaf7e031576d648a62176d4c3022a078d | fe12be33b783b1c97dc63b619d60d64fb004c2d4 | /Cálculo-II/paraquedas.sce | 345c68592a8fe58f1e335284f9b8df6ee2bf64b0 | [] | no_license | josecleiton/scilab | 6b0c86068807596cd3852824de92d13f1a81f7b8 | 5ac1eaffb57fd7508024674fb5481a7c568d1069 | refs/heads/master | 2020-03-30T08:30:20.827333 | 2018-12-15T11:59:29 | 2018-12-15T11:59:29 | 151,020,551 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 600 | sce | paraquedas.sce | function paraquedas() // skydiving
p=800 // Peso em Newton
g=9.8 // Aceleração da gravidade m/s2
k=13 // Coeficiente de atrito viscoso
dt=0.1 // intervalo de tempo em segundos
m=p/g // massa
v(1)=0 // Condições iniciais
t(1)=0 // T inicial
h(1)=1400 // Altura inicial em metros
cor=5 // 5 é vermelho 2 azul
clf(); // limpa janela grafica
for i=1:1000
// segunda lei de Newton
v(i+1)=(p-k*v(i))/m*dt+v(i)// edo
t(i+1)=t(i)+dt
end
plot2d(t,v,2)
//disp(t(i), 'tempo do salto em segundos')
endfunction
|
7e11ba033dc75d7568c9d0429c0efe50d8ed394c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2006/CH12/EX12.5/ex12_5.sce | 3af8c61ddcc79701e3f358e604edddf21c89d28a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,200 | sce | ex12_5.sce | clc;
DBT=35; // Dry bulb temperature in degree celcius
WBT=23; // Wet bulb temperature in degree celcius
P=100; // Pressure of air in kPa
Cpo=1.0035; // Specific heat at constant pressure in kJ/kg K
R=0.287; // characteristic gas constant of air in kJ/kg K
// (a).Humidity ratio
hv=2565.3; // specific enthalpy hg at DBT in kJ/kg
hfWBT=96.52; hfgWBT=2443; // specific enthalpy at WBT in kJ/kg
PsatWBT=2.789;// Saturation pressure at WBT in kPa
shWBT=0.622*PsatWBT/(P-PsatWBT);// specific humidity
sh=((Cpo*(WBT-DBT))+(shWBT*hfgWBT))/(hv-hfWBT); // Humidity ratio
disp ("kg w.v /kg d.a",sh,"(a).Humidity ratio =");
// (b).Relative Humidity
pv=sh*P/(0.622+sh); // Partial pressure of water vapour
pg=5.628; // Saturation pressure at DBT in kPa
RH=pv/pg; //Relative Humidity
disp ("%",RH*100,"(b).Relative Humidity =");
// (d).Dew point temperature
DPT=17.5; // Saturation temperature at pg in degree celcius
disp ("oC",DPT,"(d).Dew point temperature =");
// (e).Specific volume
v=(R*(DBT+273))/(P-pv); // Specific volume
disp ("m^3/kg",v,"(e).Specific volume = ");
// (d).Enthalpy of air
h=(Cpo*DBT)+(sh*hv); //Enthalpy of air
disp ("kJ/kg d.a",h,"(d).Enthalpy of air =");
|
62f78f4e6e0429ddc48e2a5a7387b3d3c3828946 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3845/CH7/EX7.11/Ex7_11.sce | d2e3589871cf67b52aac94fe7cef4acab7899797 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 373 | sce | Ex7_11.sce | //Example 7.11
m=60;//Mass of the woman (kg)
v_f=2;//Final speed (m/s)
g=9.80;//Acceleration due to gravity (m/s^2)
h=3;//Height (m)
t=3.50;//Time taken (s)
P=[(1/2*m*v_f^2)+(m*g*h)]/t;//Power (W)
printf('Power output = %0.1f W',P)
//Answer varies due to round off error
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|
fd6227fb8e7784317ae7ad59812996238f8c7f39 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2747/CH16/EX16.7/Ex16_7.sce | bbbad4f45c5a773ff851bb72e5df6576d4a270e6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 295 | sce | Ex16_7.sce | clc
clear
//Initialization of variables
N2=78.1
M=29
ba=2.12
co2=8.7
co=8.9
x4=0.3
x5=3.7
x6=14.7
//calculations
O2=N2/3.76
c=14.7
Z=2.238
X=(Z*17-x4*4-x5*2)/2
a=co2+co/2+x4+x6/2
b=3.764*a
AF=(O2+N2)*M/(Z*113)
//results
printf("Air fuel ratio = %.1f lbm air/lbm fuel",AF)
|
3ddfa9dc8defbf2a7471b480958e922ecbdb0c28 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2213/CH1/EX1.3/ex_1_3.sce | cb4d0067cf77ada6627cf3d33cde443cfb3b96f8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 631 | sce | ex_1_3.sce | //Example 1.3 // design heating element
clc;
clear;
close;
format('v',7)
V=440;// volts
P=20;//in kW
T1=1200;//in degree celsius
T2=700;// in degree celsius
K=0.6;//radiating efficiency
e=0.9;//emissivity
t=0.025;//thickness in mm
p=1.05*10^-6;//resisitivity in ohm - meter
Pp=(round(P*10^3))/3;//power per phase in watts
Pv= (V/sqrt(3));//phase voltage
R=Pv^2/Pp;//resistance of strip in ohms
x=((R*t*10^-3)/(p));//
H=((5.72*K*e)*(((T1+273)/100)^4-((T2+273)/100)^4));//in W/m^2
y=((Pp)/(H*2));//in m^2
w=sqrt(y/x)*10^3;//width in mm
l=x*w*10^-3;//length of strip in meter
disp(w,"width in mm")
disp(l,"length of strip in meter")
|
3bdb60ea7df96914058a502283bf7e68ea96aff3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2063/CH1/EX1.2/1_2.sce | 1ce2da2d5ce0972bbe316c3d173f00674097f1d9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 498 | sce | 1_2.sce | clc
clear
//Input data
r1=6;//Initial compression ratio
r2=7;//Final compression ratio
r=1.4;//Isentropic coefficient of air
//Calculations
nr1=(1-(1/r1)^(r-1))*100;//Otto cycle efficiency when compression ratio is 6 in percentage
nr2=(1-(1/r2)^(r-1))*100;//Otto cycle efficiency when compression ratio is 7 in percentage
n=nr2-nr1;//Increase in efficiency in percentage
//Output
printf('The increase in efficiency due to change in compression ratio from 6 to 7 is %3.1fpercent',n)
|
d1f039b923ad131d264228aed2b5757515f78450 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1553/CH4/EX4.11/4Ex11.sce | afd947797e2ce69bc5f826c411df7247f549caa8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 132 | sce | 4Ex11.sce | //Chapter 4 Ex 11
clc;
close;
clear;
expr=4-(5/(1+(1/(3+(1/(2+(1/4)))))));
mprintf("The Value of expression is %.3f",expr);
|
7af283fb3c5c042de725904525ab7b33fab0aeb3 | 8f7af88e9232d36ea846925102bf91f7c6e1fd11 | /files/FEM_bending.sce | b8a729be726b92b028592ebf2b345e2a01fc4740 | [] | no_license | maldmitrix/maldmitrix.github.io | 121c1d9675fc6decbe2b0850710adfd2606ca7d3 | 9ec7c8c87b9b3131c4d32a861fd6ef1ba4c1839e | refs/heads/master | 2020-04-06T06:52:53.867056 | 2014-12-03T15:28:27 | 2014-12-03T15:28:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,982 | sce | FEM_bending.sce | m = 100; // число конечных элементов
P = -100; // нагрузка
// Массив из m+1 равномерно распределенных точек на интервале [0,1]
nodeCoordinates = linspace(0, 1, m+1)';
L = max(nodeCoordinates); // Наибольшая координата узлов, т.е. L=1
numberNodes = size(nodeCoordinates,1);
xx = nodeCoordinates;
E = 1; I = 1; EI = E*I; // Изгибная жесткость балки
GDof = 2*numberNodes; // Глобальное число степеней свобод
U = zeros(GDof,1);
force = zeros(GDof,1); // Глобальный столбец сил
stiffness = zeros(GDof,GDof); // Глобальная матрица жесткости
displacements = zeros(GDof,1); // Глобальный столбец прогибов
// Нумерация узлов каждого элемента (для первого индексы: [1, 2])
for i = 1:m
elementNodes(i,1) = i;
elementNodes(i,2) = i+1;
end
for e=1:m // Пробегаем все элементы
indice=elementNodes(e,:); // Номера узлов элемента (2 штуки)
// Номера степеней свобод, принадлежащих элементу (4 штуки)
elementDof = [ 2*(indice(1)-1)+1 2*(indice(2)-1) ...
2*(indice(2)-1)+1 2*(indice(2)-1)+2];
h = xx(indice(2)) - xx(indice(1)); // Длина элемента
// Набиваем локальный столбец сил каждого элемента
f1 = (P*h/2)*[1 6*h 1 -6*h]';
force(elementDof)=force(elementDof)+f1;
// Набиваем локальную матрицу жесткости каждого элемента
k1=(EI/h^3)*[ 12 6*h -12 6*h ;...
6*h 4*h^2 -6*h 2*h^2 ;...
-12 -6*h 12 -6*h ;...
6*h 2*h^2 -6*h 4*h^2 ]';
stiffness(elementDof,elementDof)=stiffness(elementDof,elementDof)+k1;
end
// Граничные условия: оба конца защемлены
fixedNodeU = [1 2*m+1];
fixedNodeV = [2 2*m+2];
prescribedDof = [fixedNodeU;fixedNodeV];
activeDof = setdiff([1:GDof]',[prescribedDof]);
U = stiffness(activeDof,activeDof) \ force(activeDof);
displacements = zeros(GDof,1);
displacements(activeDof) = U;
U = displacements(1:2:2*numberNodes);
plot(nodeCoordinates,U,'b:'); // синий штрих чере две точки
// Граничные условия: оба конца свободно оперты
fixedNodeU = [1 2*m+1];
fixedNodeV = [];
prescribedDof = [fixedNodeU;fixedNodeV];
activeDof = setdiff([1:GDof]',[prescribedDof]);
U = stiffness(activeDof,activeDof) \ force(activeDof);
displacements = zeros(GDof,1);
displacements(activeDof) = U;
U = displacements(1:2:2*numberNodes);
plot(nodeCoordinates,U,'r--'); // красный штрих
// Граничные условия: левый конец защемлен
// правый конец свободно оперт
fixedNodeU = [1 2*m+1];
fixedNodeV = [2 2*m+1];
prescribedDof = [fixedNodeU;fixedNodeV];
activeDof = setdiff([1:GDof]',[prescribedDof]);
U = stiffness(activeDof,activeDof) \ force(activeDof);
displacements = zeros(GDof,1);
displacements(activeDof) = U;
U = displacements(1:2:2*numberNodes);
plot(nodeCoordinates,U,'k-'); // черная сплошная линия
// Граничные условия: левая половина балки защемлена,
// правая половина вся свободна
fixedNodeU = [1:m];
fixedNodeV = [1:m];
prescribedDof = [fixedNodeU;fixedNodeV];
activeDof = setdiff([1:GDof]',[prescribedDof]);
U = stiffness(activeDof,activeDof) \ force(activeDof);
displacements = zeros(GDof,1);
displacements(activeDof) = U;
U = displacements(1:2:2*numberNodes);
plot(nodeCoordinates,U,'g-'); // зеленая сплошная линия |
ce07b5d122b30d080a599bbff29b8b3dd86d2ed3 | 7b040f1a7bbc570e36aab9b2ccf77a9e59d3e5c2 | /Scilab/virtual/2dof_controller/dc/place/scilab/delc2d.sci | ed1140a93d50df5acf3b6e357d5f9247c979b5b6 | [] | no_license | advait23/sbhs-manual | e2c380051117e3a36398bb5ad046781f7b379cb9 | d65043acd98334c44a0f0dbf480473c4c4451834 | refs/heads/master | 2021-01-16T19:50:40.218314 | 2012-11-16T04:11:12 | 2012-11-16T04:11:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,082 | sci | delc2d.sci | // Discretizing a tf with delay
// Exact solution
// Applicable for first order system
// Ref.: pg.287,Digital Control,Prof.Kannan Moudgalya
// D: Delay
// TF: e^(-Ds) OR e^(-Ds)
// ------------ ------------ (gen.)
// tau*s + 1 tau*s + a
//D = kTs + D' (gen.)
// G: TF with delay component
// G1: TF with zero delay
// Required because G cannot be directly used in Scilab
// Coefficients are returned for ascending powers of z^-1
function [B,A,k1] = delc2d(G,G1,Ts)
D = G.iodelay;
d = coeff(G1('den'));
if d(1) == 1
tau = d(2);
mu = 1;
else
tau = d(2)/d(1);
mu = 1/d(1);
end;
k = floor(D/Ts);
Dpri = D - k*Ts;
Dis = ((%z*(1 - (exp(-(Ts - Dpri)/tau)) ) )+ (exp(-(Ts - Dpri)/tau) - exp(-Ts/tau) ))/ ((%z^(k+1))*(%z - exp(-Ts/tau)))
Dis1 = Dis*mu;
disp('Warning: Exact discretization of first order system only');
k1 = degree(Dis1('den')) - degree(Dis1('num'));
B = coeff(Dis1('num'));
A = coeff(Dis1('den'));
B = flip(B);
A = flip(A);
endfunction;
|
45f9f07450961720b5d56f1cd5ca4c63d8ed7fff | 449d555969bfd7befe906877abab098c6e63a0e8 | /1445/CH1/EX1.28/Ex1_28.sce | e83ad9418d2f5647881d6a2cf8ce1224524f7b61 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 571 | sce | Ex1_28.sce | //CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 28
clc;
disp("CHAPTER 1");
disp("EXAMPLE 28");
//VARIABLE INITIALIZATION
I1=5; //current source in Amperes
va=100; //voltage source in Volts
r1=20; //in Ohms
r2=10; //in Ohms
r3=20; //in Ohms
//SOLUTION
IN=I1-(va/r1); //using nodal analysis at point 'a'
rN=r1+((r3*0)/(r3+0));
I=(rN*IN)/(rN+r2);
disp(sprintf("By Norton Theorem, the value of I is %d A",I));
//END
|
a2b3c99104fe60e14f980be72ce1480c9a7cb3b3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3850/CH27/EX27.1/Ex27_1.sce | 8ae506cc50beff598c8db47722f89c300d0c48cf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 512 | sce | Ex27_1.sce |
//Find the Amount of Heat needed to raise the temperature from 25 degree celsius to 35 degree celsius.
//Example 27.1
clear;
clc;
Ao=0.32;//Mass of Oxygen kept in gram
W=32;//Molecular weight of Oxygen in g/mol
n=Ao/W;//Number of moles of oxygen
Cv=20;//Molar Heat Capacity of Oxygen at constant volume
T1=25;//Initial Temperature
T2=35;//Final Temperature
delT=T2-T1;//Change in Temperature
Q=n*Cv*delT;//Amount of Heat needed
printf("Amount of Heat required=%d joule",Q);
|
90c54759efd4ac5a9cbdf7d75f47877cd2d8e9d4 | 734830c483d7180158343b9b5599994878b8b197 | /make-tests/unfinished/err3.tst | 76038aeb415b9460dd0a986c52409a686b18ef59 | [] | no_license | aykamko/proj61b | b53a3b569f82522144e010505859aa3ab66585bb | 5f6688b70f907107512267712a325f907e5e627b | refs/heads/master | 2021-01-16T22:08:56.235971 | 2013-12-12T09:19:39 | 2013-12-12T09:19:39 | 13,669,280 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 46 | tst | err3.tst | T=1: T2 T4 T7
T3:
T4: T5 T6
T5:
T6: T5
T7: T6
|
94aa52f5494f7486011e9d579b090f7810492afd | 33b999fc269838e0059075764bf3295c6ba7ee84 | /h_infinity.sce | 861e97717347ab6e909283cb89e82462c72620de | [] | no_license | sofiacerbi/H-infinity | c415b53c0a89ee30facad034d61b65e64cb3c532 | f4009031439e9f6cfd367c7e7a0859a31e46b55c | refs/heads/master | 2023-09-02T09:10:27.252552 | 2021-11-06T20:32:34 | 2021-11-06T20:32:34 | 424,006,720 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,249 | sce | h_infinity.sce | clear
s=poly(0,'s')
////////////////////////////////////Planta//////////////////////////////////////
//Definición de parámetros
Mc = 1
Mp = 0.25
Ip = 7.88*10e-3
lp = 0.33
ng = 1
Kg = 3.7
nm = 1
Kt = 0.00767
Rm = 2.6
rmp = 6.35*10e-3
Beq = 5.4
Km = 0.00767
g = 9.81
Bp = 0.0024
//Constantes definidas
betaa = (Mc+Mp)*Ip + Mc*Mp*lp*lp;
gammaa = ng*Kg*nm*Kt/(Rm*rmp*rmp);
//Matriz A
A22 = -(Ip + Mp*lp*lp)*Beq/betaa - (Ip+Mp*lp*lp)*Kg*Km*gammaa/betaa;
A23 = Mp*Mp*lp*lp*g/betaa;
A24 = Mp*lp*Bp/betaa;
A42 = (Mp*lp*Beq + Mp*lp*Kg*Km*gammaa)/betaa;
A43 = -(Mc+Mp)*Mp*g*lp/betaa;
A44 = -(Mc+Mp)*Bp/betaa;
A = [0,1,0,0; 0,A22,A23,A24; 0,0,0,1; 0,A42,A43,A44];
//Matriz B
B2 = (Ip + Mp*lp*lp)*rmp*gammaa/betaa;
B4 = -Mp*lp*rmp*gammaa/betaa;
B = [0; B2; 0; B4];
//Matriz C
//Si se toma como salida la posición del carrito
C1 = [1, 0, 0, 0];
//Si se toma como salida el ángulo del péndulo
C2 = [0, 0, 1, 0];
//Matriz D: se asume cero
D = [0.001];
//Modelo de la planta
planta=syslin('c',A,B,C1,D);
////////////////////////Controlador H-infinito//////////////////////////////////
//Se usa el mixed-sensitivity approach
//A = error de seguimiento mínimo en estado estable
//ωB = ancho de banda mínimo
//M = magnitud máxima de S
a=0.0002; m=2; wb=100;
//Selección de pesos w
w1_n = ((1/m)*s+wb);
w1_d = (s+wb*a);
w1 = syslin('c',w1_n,w1_d);
w2_d = 2*(s/1000 + 1);
w2_n = s/300+1;
w2 = syslin('c',w2_n,w2_d);
//Se crea una planta generalizada
[Ap0,Bp0,Cp0,Dp0] = abcd(planta);
[Aw1,Bw1,Cw1,Dw1] = abcd(w1);
[Aw2,Bw2,Cw2,Dw2] = abcd(w2);
Ap = [Ap0 zeros(size(Ap0,1),size(Aw1,2)) zeros(size(Ap0,1),size(Aw2,2)); -Bw1*Cp0 Aw1 zeros(size(Aw1,1),size(Aw2,2)); Bw2*Cp0 zeros(size(Aw2,1),size(Aw1,2)) Aw2];
Bp = [zeros(size(Bp0,1),size(Bw1,2)) Bp0; Bw1 zeros(size(Bw1,1),size(Bp0,2)); zeros(size(Bw2,1),size(Bw1,2)) zeros(size(Bw2,1),size(Bp0,2))];
Cp = [-Dw1*Cp0 Cw1 zeros(size(Cw1,1),size(Cw2,2)); Dw2*Cp0 zeros(size(Cw2,1),size(Cw1,2)) Cw2; -Cp0 zeros(size(Cp0,1),size(Cw1,2)) zeros(size(Cp0,1),size(Cw2,2))];
Dp = [Dw1 0.001; 0 0; 1 0]; //D12 para que la matriz sea de rango completo
p_gen = syslin('c',Ap,Bp,Cp,Dp);
//Se sintetiza el controlador
Sk = ccontrg(p_gen,[1,1],5); //SISO = single input single output
[Ak,Bk,Ck,Dk] = abcd(Sk);
|
dd04d50a272316f127e196d0043237b79142b31f | 3592fbcb99d08024f46089ba28a6123aeb81ff3c | /test-unitary/testVelField.sce | b5fa4371aff7335ce8e24fb6ca81d609c9208b0b | [] | no_license | clairedune/sciGaitanLib | a29ab61206b726c6f0ac36785ea556adc9ef03b9 | 7498b0d707a24c170fc390f7413359ad1bfefe9f | refs/heads/master | 2020-12-11T01:51:13.640472 | 2015-01-28T13:52:26 | 2015-01-28T13:52:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 865 | sce | testVelField.sce | // on veut creer un champ de vitesse pour un objet...
// histoire de se derouiller les meninges
clear
getd("src/transformation")
//1 . Creation de l'objet : c'est un ensemble de points 3D
// creation d'un cube
body = [0,0,0;0,0,1;0,1,0;0,1,1;1,0,0;1,0,1;1,1,0;1,1,1];
//2. On definit la position du cube dans un repere fixe o
pose = [0, 2, 3, %pi/8, 0, 0];
oMb = homogeneousMatrixFromPos(pose);
body_in_o =[];
//3. On place le cube dans le repere 0
for i=1:size(body,1)
//on construit un point sous la forme homogene
bP = [body(i,:),1]';
oP = oMb*bP;
body_in_o=[body_in_o;oP(1:3)'] ;
end
//4. On trace le Cube
plot3d ([0,0.5],[0,1],[0,1]);
hr1 = gce ();
hr1.thickness=3;
hr1.foreground=5;
//5. On definit la vitesse a applique au cube
//6. Pour tous les points en en deduis la vitesse
//7. On trace le cube
//8. On trace le champs de vitesse
|
b082ecd66156b05f379d21f6c2698e17af92cf05 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1865/CH6/EX6.1/prob_1.sce | 0c20b3ddc050f347a5f018768612d17f2af3f6fd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 272 | sce | prob_1.sce |
//Problem 1
//Calculate the fringe shift
clear
clc
l=10// Optical path of each beam in m
w=550// wavwlength of light used in nm
v= 10^(-4)// ratio of velocity of beam and velocity of light
f=(2*l*(v^2))/(w*10^(-9))// fringe shift
printf('fringe shift = %.2f ',f) |
7268622e17328fe96a75258efaa48ad15fe5afd8 | c6196553a0199f808a6ec5cdb7c257bffc4e1832 | /TP_EDP/2.1.sce | 8ebbb46536ce436f57c8594def4a20675a753dc6 | [] | no_license | rianaR/T.I.A | 034b5e503145e54460fa17404c4b51524e269dd8 | b1a3011f4d4101cbe163399c9f46abd31c4977e5 | refs/heads/master | 2021-01-10T05:09:03.931399 | 2015-11-05T08:55:45 | 2015-11-05T08:55:45 | 43,305,164 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 916 | sce | 2.1.sce | // 2.1.SCE
exec("grad2.sci");
exec("div2.sci");
imOrigins = double(imread("Images/lena.bmp"));
im = double(imread("Images/lena.bmp"));
// moyenne nullle (pour le bruit à venir)
noise_mean = 0;
// écart-type 20
noise_sigma = 20;
// variance calculée à partir de l'écart-type
noise_var = noise_sigma^2;
noisyImg = im + noise_sigma * rand(im,"normal") + noise_mean;
dt=0.25;
nbIterations = 100;
result = noisyImg;
for i=1:nbIterations
g=grad2(result);
d=div2(g);
result=result+dt*d;
end
result
ShowImage(uint8(result), "ShowImage pu*ain de me*de");
imwrite(result/255, "lena_EDPfilter.jpg");
imwrite((result-imOrigins)/255, "lena_EDPdiffOrig.jpg");
// écart-type filtre gaussien
sigma = sqrt(2 * nbIterations * dt);
gaussianFilter = fspecial("gaussian", [7, 7], sigma);
// version "à la main"
filtered = imfilter(noisyImg, gaussianFilter);
imwrite(filtered/255, "lena_GaussianFilter.jpg");
|
0e7dba81f6a5e53dc5bf148c307a50ae6a39a4fd | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set10/s_Fluid_Mechanics_I._A._Khan_1962.zip/Fluid_Mechanics_I._A._Khan_1962/CH9/EX9.10/example9_10.sce | 75987a4a50ea1e8a5fbda42edba6b1345bf9b8b2 | [] | no_license | hohiroki/Scilab_TBC | cb11e171e47a6cf15dad6594726c14443b23d512 | 98e421ab71b2e8be0c70d67cca3ecb53eeef1df6 | refs/heads/master | 2021-01-18T02:07:29.200029 | 2016-04-29T07:01:39 | 2016-04-29T07:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 323 | sce | example9_10.sce | errcatch(-1,"stop");mode(2);
//example 9.10
//page 333
; funcprot(0);
//initialisation of variable
f1=0.021//friction in pipe 1
d1=0.2;
k=f1*(10+50+30+20+100)/d1^5+2*0.9/d1^4+10/d1^4+2*1.2/d1^4;//k=(HL)1/(16Q^2/2pi^2g)
f2=0.023//friction pipe 2
d2=0.15;
L2=k*d2^5/f2;
disp(L2,"length of pipe2 (m)=")
exit();
|
3db9a971abe9c3b1a5d18c7dd958d55cf34d5878 | 449d555969bfd7befe906877abab098c6e63a0e8 | /51/CH5/EX5.15/5_15.sce | 5309b859a3178758c82d045e6ec68dc066d6c53b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 308 | sce | 5_15.sce | clc;
clear;
v1=200;//m/s
v2=500;//m/s
A1=1;//m^2
p1=78.5;//kPa(abs)
T1=268;//K
p2=101;//kPa(abs)
//F=-p1*A1 + p2*A2 + m*(v2-v1)
//m=d1*A1*v1
//d1=(p1)/(R*T1)
d1=(p1*1000)/(286.9*T1);
m=d1*v1*A1;
F=-((p1-p2)*A1*1000) + m*(v2-v1);
disp("N",F,"The thrust for which the stand is to be designed=") |
d02ba3af3dd1f85193824774b82ecd6e56b6ffe8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1430/CH13/EX13.16/exa13_16.sce | 6e91b4760c1233c8c4708a16f1b9112f61b7bb0a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 471 | sce | exa13_16.sce | // Example 13.16
// Impulsive Zero -State Response
C_1=1/20;
C_2=1/20;
R=5;
L=1;
s=%s;
Z_s=1/(s*C_1)+1/((s*C_2)+1/R+1/(s*L)); // Overall impedance of the circuit
V_s=80/s;
I_s=V_s/Z_s;
t=0:0.01:10
pfe=pfss(I_s);
// Taking inverse Laplace transfrom we get
// Inverse laplace transform of pfe(1)
i_1=4.80*exp(-t).*cos(3*t-((%pi*33.7)/180));
//inverse laplace of pfe(2)
i_2=2;
i=i_1+i_2;
plot(t,i)
xlabel('t')
ylabel('i(t)')
title("Current waveform")
|
f75717bb5be344ff4cfc632e4b9ebe43357bacb0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH14/EX14.4/Ex14_4.sce | e92241a68378da7b6a867e6acfb3a59f444fb942 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 210 | sce | Ex14_4.sce | clear
//Given
N=100
A=3
B=0.04 //T
w=60
R=500 //ohm
//Calculation
E0=N*A*B*w
I0=E0/R
P=E0*I0
//Result
printf("\n Maximum power dissipated in the coil is %0.3f W", P)
|
1b3f441e49ba8d35b0d78c100fee1ba99ad56e3f | 449d555969bfd7befe906877abab098c6e63a0e8 | /1892/CH1/EX1.75/Example1_75.sce | 2f9ed6775ca6ec45445915d06392dba979df429f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 235 | sce | Example1_75.sce | // Example 1.75
clc;clear;close;
// Given data
format('v',6);
R2=0.05;//in ohm
X2=0.1;//in ohm
//calculations
R2dash=X2;//for max Torque
r=R2dash-R2;//in ohm
disp(r,"External resistance per phase required in ohm : ");
|
291c83473b1deb4b465cd533697c608392964b03 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1475/CH1/EX1.53/Example_1_53.sce | d1f8ed71b456f3369094ed7083610bf8c92f984f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 531 | sce | Example_1_53.sce | // Example 1.53 The probabibility that an entering college student
clc;
clear;
function result= binomial(n, k, p)
result = factorial(n)*(p^k)*((1-p)^(n-k))/(factorial(k)*factorial(n-k))
endfunction
n=5;
k1=0;
k2=1;
p=0.4;
prob1=binomial(n , k1 , p);
prob2=binomial(n , k2 , p);
disp(1-prob1,"Probability that atleast one is graduate",prob2," Probability that one is graduate =",prob1, " Probability that none is a graduate=",p,"Probability that student will be graduate =",n,"No. of student entering the college =");
|
1cb39495c6f525c61f23b4647ef642068321d13f | a8592d34f144b71794ebf30f1c2a1b5faf0b053c | /PDE/scilab/test_wave_2d.sce | cd3b64d2f162ee2906d32ebfaca102173b92fb37 | [] | no_license | f-fathurrahman/ffr-MetodeNumerik | ee9a6a7153b174b1ba3d714fe61ccbd1cb1dd327 | e3a9da224c0fd5b32e671708e890018a3c4104c4 | refs/heads/master | 2023-07-19T22:29:38.810143 | 2023-07-07T10:02:34 | 2023-07-07T10:02:34 | 107,272,110 | 2 | 2 | null | null | null | null | UTF-8 | Scilab | false | false | 335 | sce | test_wave_2d.sce | exec("to_string.sce",-1)
exec("wave_2d.sce",-1)
function z = it0(x,y)
kx = 2*%pi
ky = 2*%pi
z = sin(3*kx*x)*sin(ky*y)
endfunction
function z = i1t0(x,y)
z = 0.0
endfunction
function z = bxyt(x,y,t)
z = 0.0
endfunction
a = 0.25
D = [0 1 0 1]
T = 2
Mx = 40
My = 40
N = 100
[u,x,y,t] = wave_2d(a,D,T,it0,i1t0,bxyt,Mx,My,N)
|
a99d970e414de1e23eecf35bfa3fe13242d567f4 | ad617742f184bf6d4cceb3e9c99232d8bd52b862 | /tests/cr.tst | ac2032bcac9281e600c6b8025745484acf4d1151 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"BSD-2-Clause"
] | permissive | 9track/hyperion | d621343e7eea27c45db49c7c284dd1680491c82c | 9ceed2cc7261820eef01c55dac9b9a6ae47636b2 | refs/heads/master | 2022-09-15T12:19:09.059528 | 2020-05-28T03:05:29 | 2020-05-28T03:05:29 | 268,044,749 | 3 | 1 | NOASSERTION | 2020-05-30T09:03:56 | 2020-05-30T09:03:55 | null | UTF-8 | Scilab | false | false | 1,216 | tst | cr.tst | #-------------------------------------------------------------------------------
*Testcase Initial control register values
msglevel -debug
numcpu 1
*Compare
#-------------------------------------------------------------------------------
# start with z
archlvl z/arch
cr
*Cr 14 00000000C2000000
#-------------------------------------------------------------------------------
# change 14, then switch to 390; 14 should have initial value
cr 14=abc
*Cr 14 0000000000000ABC
archlvl 390
cr
*Cr 14 C2000000
#-------------------------------------------------------------------------------
# change 2, then switch to 370; 2 should have initial value
cr 2=abc
*Cr 2 00000ABC
archlvl 370
cr
*Cr 2 FFFFFFFF
#-------------------------------------------------------------------------------
# change 14, then switch to 390; 14 should have initial value
cr 14=abc
*Cr 14 00000ABC
archlvl 390
cr
*Cr 14 C2000000
#-------------------------------------------------------------------------------
# change 14, then switch to z; 14 should have initial value
cr 14=abc
*Cr 14 00000ABC
archlvl z/arch
cr
*Cr 14 00000000C2000000
*Done nowait
#-------------------------------------------------------------------------------
|
175db265e741d26ebf5361f4ea78ffa37382eb42 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3432/CH5/EX5.2/Ex5_2.sce | 74f73049db7ae0c261c521ceb1a95e096cfba84e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 641 | sce | Ex5_2.sce | //Example 5.2
//Root locus with respect to a plant open loop pole.
xdel(winsid())//close all graphics Windows
clear;
clc;
//------------------------------------------------------------------
//System transfer function and its root locus
s=poly(0,'s');
Gs=s/(s*s+1);
//Title, labels and grid to the figure
exec .\fig_settings.sci; //custom script for setting figure properties
evans(Gs,100)
title(['Root locus vs. damping factor','$c$',...
'for','$1+G(s)=1+1/[s(s+c)]=0$'],'fontsize',3)
zoom_rect([-2 -1.5 2 1.5])
h=legend('');
h.visible = "off"
//------------------------------------------------------------------
|
b981e6ebae3289ba0116fcacc7aa2d5c71b19df3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /416/CH15/EX15.1/exp15_1pp.sce | e77d7dc45e1e32decccbc9b9c513d094cb362ef9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 352 | sce | exp15_1pp.sce | clc
clear
disp('example 15.1')
a=0.1 //plate area
b=3 //flux density
d=0.5 //distence between plates
v=1000 //average gas velosity
c=10 //condectivity
e=b*v*d
ir=d/(c*a) //internal resistence
mapo=e^2/(4*ir) //maximum power output
printf("E=%dV \ninternal resistence %.1fohm \nmaximum power output %dW =%.3fMW",e,ir,mapo,mapo/10^6) |
c588d22db82a21322cff5051b3ca07e2280a7043 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronic_Measurements_And_Instrumentation_R._K._Rajput_2096.zip/Electronic_Measurements_And_Instrumentation_R._K._Rajput_2096/CH1/EX1.1.a/ex_1_1_a.sce | 1d2bba82595801c5dcec95959e48706e71a5eafc | [] | no_license | hohiroki/Scilab_TBC | cb11e171e47a6cf15dad6594726c14443b23d512 | 98e421ab71b2e8be0c70d67cca3ecb53eeef1df6 | refs/heads/master | 2021-01-18T02:07:29.200029 | 2016-04-29T07:01:39 | 2016-04-29T07:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 196 | sce | ex_1_1_a.sce | errcatch(-1,"stop");mode(2);
// Example 1.a : static error
,
// given :
vm=112.68; // voltmeter in volts
vt=112.6; // voltage in volts
Es=vm-vt;
disp(Es,"static error,Es = (V)")
exit();
|
0048d9e25680ff31f1ec26f86e835b6cc33fb52a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1922/CH2/EX2.5/2_5.sce | e13d76c8a3755dcce135732dc8e2596048920982 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 231 | sce | 2_5.sce | clc
clear
//Initialization of variables
Pc=22.12*10^6 //Pa
Tc=647.3 //K
Zc=0.234
T=973.1 //K
P=25*10^6 //Pa
//calculations
Tr=T/Tc
Pr=P/Pc
Z=0.916
Zn=Z+0.05*(Zc-0.27)
//results
printf("Compresson factor = %.3f ",Zn)
|
0a680ef976a10c0c015fc3479559184fd6cfdb88 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/macros/m2sci/sci_find.sci | 5e13d898ad4c08f43be3aa1758418038fd8ebd22 | [
"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 | 876 | sci | sci_find.sci | function [stk,txt,top]=sci_find()
// Copyright INRIA
if lhs==1 then
[m,n]=checkdims(stk(top))
if m==1 then //row vector
stk=list('find('+stk(top)(1)+')','0','1','?','1')
elseif n==1 then //column vector
stk=list('find('+stk(top)(1)+')''','0','1','?','1')
else
stk=list('matrix(find('+stk(top)(1)+'),1,-1)','0','1','?','1')
end
elseif lhs==2 then
[i,j]=lhsvarsnames()
txt='['+j+','+i+'] = find('+stk(top)(1)+');'+i+' = '+i+'(:);'+j+' = '+j+'(:);'
stk=list(list('?','-2','1','?','1'),list('?','-2','1','?','1'))
else
[i,j,v]=lhsvarsnames()
temp=gettempvar()
txt=[temp+' = '+stk(top)(1)+';'
'['+j+','+i+'] = find('+temp+');'+i+'='+i+'(:);'+j+'='+j+'(:);'
temp+' = '+temp+'(:)'
'if '+i+'<>[] then '+v+' = '+temp+'('+i+'+size('+temp+',1)*('+j+'-1)) ;else '+v+' = [],end']
r=list('?','-2','1','?','1'),
stk=list(r,r,r)
end
|
f4bc3dcfcd5ff179f619b74032cc97a478dd4b9b | 6e257f133dd8984b578f3c9fd3f269eabc0750be | /ScilabFromTheoryToPractice/CreatingPlots/testhandletype.sce | bd81ebec9e9b3c158e7baa37cfad20f080b67342 | [] | no_license | markusmorawitz77/Scilab | 902ef1b9f356dd38ea2dbadc892fe50d32b44bd0 | 7c98963a7d80915f66a3231a2235010e879049aa | refs/heads/master | 2021-01-19T23:53:52.068010 | 2017-04-22T12:39:21 | 2017-04-22T12:39:21 | 89,051,705 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,760 | sce | testhandletype.sce | //différents types de handles
//***************************
// les handles de lignes
//***************************
//Polyline
clf; plot();E=gce();E.children(1).type
clf; param3d();E=gce();E.type
clf; param3d1();E=gce();E.type
clf; plot2d();E=gce();E.children(1).type
clf; plot2d2();E=gce();E.children(1).type
clf; plot2d3();E=gce();E.children(1).type
clf; plot2d4();E=gce();E.children(1).type
clf; histplot();A=gca();E=A.children(2);E.type
//Champ
clf; champ();E=gce();E.type
clf; champ1();E=gce();E.type
//Arc
clf; xarcs([0;1;1;1;0;64*180]);E=gce();E.children(1).type
clf; xfarcs([0;1;1;1;0;64*180]);E=gce();E.children(1).type
//Rectangle
clf; xrect([0,1,1,1]);E=gce();E.type
clf; xrects([0;1;1;1],5);E=gce();E.children(1).type
clf; xfrect([0,1,1,1]);E=gce();E.type
//Segs
clf; xarrows([0,0],[1,1]);E=gce();E.type
clf; xsegs([0,0],[1,1]);E=gce();E.type
//***************************
// les handles de Surfaces
//***************************
//Fac3d
clf; surf();E=gce();E.type
clf; hist3d();E=gce();E.children(1).type
//plot3d
clf; fplot3d();E=gce();E.type
clf; plot3d();E=gce();E.type
clf; plot3d1();E=gce();E.type
//Grayplot
clf; grayplot();E=gce();E.type
clf; fgrayplot();E=gce();E.type
//Fec
clf; Sgrayplot();E=gce();E.children(1).children(1).type
clf; Sfgrayplot();E=gce();E.children(1).children(1).type
//Matplot
clf; Matplot();E=gce();E.children(1).type
clf; Matplot1();E=gce();E.children(1).type
//***************************
// Les handles de textes
//***************************
//Text
clf; xstring(0,0,'abcde');E=gce();E.type
clf; plot2d();legends('courbe',5,1);E=gce();E.children(1).type
//Legends
clf; plot2d();A=gca();legend(A,'f','g','h');E=gce();E.type
//Axis
clf; drawaxis();E=gce();E.type
//Labels
clf; plot3d();A=gca();E=A.x_label;E.type
|
6278214a9d482f40560018335154c7ff4f90ec40 | 5a05d7e1b331922620afe242e4393f426335f2e3 | /macros/wind.sci | 9e1708f95e91899f859c155dbd898ebc9c9fcc35 | [] | no_license | sauravdekhtawala/FOSSEE-Signal-Processing-Toolbox | 2728cf855f58886c7c4a9317cc00784ba8cd8a5b | 91f8045f58b6b96dbaaf2d4400586660b92d461c | refs/heads/master | 2022-04-19T17:33:22.731810 | 2020-04-22T12:17:41 | 2020-04-22T12:17:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,470 | sci | wind.sci | function w_out = wind (f, m, varargin)
//This function creates an m-point window from the function f given as input.
//Calling Sequence
//w = window(f, m)
//w = window(f, m, opts)
//Parameters
//f: string value/window name
//m: positive integer value
//opts: string value, takes in "periodic" or "symmetric"
//w: output variable, vector of real numbers
//Description
//This function creates an m-point window from the function f given as input, in the output vector w.
//f can take any valid function as a string, for example "blackmanharris".
//Examples
//window("hanning",5)
//ans =
// 0.
// 0.5
// 1.
// 0.5
// 0.
funcprot(0);
rhs = argn(2)
lhs = argn(1)
if(type(f)==10) // Checking whether 'f' is string or not
if(f=="bartlett" | f=="blackman" | f=="blackmanharris" | f=="bohmanwin" | f=="boxcar" |...
f=="barthannwin" | f=="chebwin"| f=="flattopwin" | f=="gausswin" | f=="hamming" |...
f=="hanning" | f=="hann" | f=="kaiser" | f=="parzenwin" | f=="triang" |...
f=="rectwin" | f=="tukeywin" | f=="blackmannuttall" | f=="nuttallwin")
if(rhs<2)
error("Wrong number of input arguments.")
else
c =evstr (f);
w=c(m, varargin(:))
if (lhs > 0)
w_out = w;
end
end
else
error("Use proper Window name")
end
else
error("The first argument f that is window name should be a string")
end
endfunction
|
24de5d0d34cdc97ee49aa8f165d8b23469b51c4d | 449d555969bfd7befe906877abab098c6e63a0e8 | /28/CH6/EX6.2/ex6_2.sce | 8a7652cf04ffa1c48bab0f4cd016f55f334112ea | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 198 | sce | ex6_2.sce | s=%s;
p=s^4+8*s^3+18*s^2+16*s+5
r=routh_t(p)
m=coeff(p)
l=length(m)
c=0;
for i=1:l
if (r(i,1)<0)
c=c+1;
end
end
if(c>=1)
printf("System is unstable")
else ("Sysem is stable")
end
|
c2f3487915284f7c260413191ab3cbe17abd1df5 | 51635684d03e47ebad12b8872ff469b83f36aa52 | /external/gcc-12.1.0/gcc/testsuite/ada/acats/tests/c2/c23003g.tst | 5769937adc9c4b34a2b0e7b5a2aa65a2a4401519 | [
"LGPL-2.1-only",
"GPL-3.0-only",
"GCC-exception-3.1",
"GPL-2.0-only",
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"FSFAP",
"Zlib",
"LicenseRef-scancode-public-domain"
] | permissive | zhmu/ananas | 8fb48ddfe3582f85ff39184fc7a3c58725fe731a | 30850c1639f03bccbfb2f2b03361792cc8fae52e | refs/heads/master | 2022-06-25T10:44:46.256604 | 2022-06-12T17:04:40 | 2022-06-12T17:04:40 | 30,108,381 | 59 | 8 | Zlib | 2021-09-26T17:30:30 | 2015-01-31T09:44:33 | C | UTF-8 | Scilab | false | false | 2,674 | tst | c23003g.tst | -- C23003G.TST
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT THE NAME OF A GENERIC LIBRARY UNIT PACKAGE AND THE NAME
-- OF A GENERIC LIBRARY UNIT SUBPROGRAM CAN BE AS LONG
-- JBG 5/26/85
-- DTN 3/25/92 CONSOLIDATION OF C23003G.TST AND C23003H.TST.
-- KAS 12/4/95 CHANGE "LINE" TO "IDENTIFIER"
GENERIC
PACKAGE
$BIG_ID1
IS
A : INTEGER := 1;
END
$BIG_ID1
;
GENERIC
PACKAGE
$BIG_ID2
IS
B : INTEGER := 2;
END
$BIG_ID2
;
GENERIC
FUNCTION
$BIG_ID3
RETURN INTEGER;
FUNCTION
$BIG_ID3
RETURN INTEGER IS
BEGIN
RETURN 3;
END
$BIG_ID3
;
GENERIC
FUNCTION
$BIG_ID4
RETURN INTEGER;
WITH REPORT; USE REPORT;
PRAGMA ELABORATE (REPORT);
FUNCTION
$BIG_ID4
RETURN INTEGER IS
BEGIN
RETURN IDENT_INT(4);
END
$BIG_ID4
;
WITH
$BIG_ID3
;
PRAGMA ELABORATE (
$BIG_ID3
);
FUNCTION F1 IS NEW
$BIG_ID3
;
WITH
$BIG_ID1
;
PRAGMA ELABORATE (
$BIG_ID1
);
PACKAGE C23003G_PKG IS NEW
$BIG_ID1
;
WITH C23003G_PKG, F1,
$BIG_ID2
,
$BIG_ID4
;
USE C23003G_PKG;
WITH REPORT; USE REPORT;
PROCEDURE C23003G IS
PACKAGE P2 IS NEW
$BIG_ID2
;
USE P2;
FUNCTION F2 IS NEW
$BIG_ID4
;
BEGIN
TEST ("C23003G", "CHECK LONGEST POSSIBLE IDENTIFIER CAN BE USED " &
"FOR GENERIC LIBRARY PACKAGE AND SUBPROGRAM");
IF A + IDENT_INT(1) /= B THEN
FAILED ("INCORRECT PACKAGE IDENTIFICATION");
END IF;
IF F1 + IDENT_INT(1) /= F2 THEN
FAILED ("INCORRECT FUNCTION IDENTIFICATION");
END IF;
RESULT;
END C23003G;
|
391ea7f3084818607e3ed41314b3d8410fbf3fa0 | 0a4a624c2aa1241962ca0adf212284d4fbf653ec | /1st/2-1.sce | afa2d2d21db4890f0abf781bc2f64270daba5afb | [] | no_license | zy414563492/Advanced-Course-in-Computational-Algorithms | 719a469c4b4f0aede9d89378408672d9ac712df5 | d6f5a089883b415ecd93b18bee81aac9bec69577 | refs/heads/master | 2020-08-29T07:13:39.251114 | 2019-12-17T16:11:40 | 2019-12-17T16:11:40 | 217,963,283 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 302 | sce | 2-1.sce | figure(1);
clf;
//2 6
a = 5;
b = 1.5;
t = linspace(0, 12*%pi, 300);
//x = (a - b) * cos(t) + b * cos((a - b) / b * t);
//y = (a - b) * sin(t) - b * sin((a - b) / b * t);
x = (a - b) * cos(3 * t) + b * cos((a - b) / b * 3 * t);
y = (a - b) * sin(2 * t) - b * sin((a - b) / b * 2 * t);
plot(x, y);
|
1b70db11202202d0ca0265c5b135171e42c15b69 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.3/macros/sci2for/f_expm.sci | 65c6f0ec736b2e65f3ad77ae74a9504c45fbc852 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | 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 | 2,987 | sci | f_expm.sci | function [stk,nwrk,txt,top]=f_expm(nwrk)
//!purpose
// Scilab expm function translation
//!parameters
// - stk :
// On entry stk is a global variable of type list
// entries indexed from top-1+rhs:top give the definition of the rhs
// function input variables
//
// After execution stk(1:lhs) must contain the definition of the
// lhs returned variables
//
// stk entries have the following structure:
// stk(k)=list(definition,type_expr,type_var,nb_lig,nb_col)
//
// *definition may be:
// - a character string containing a Fortran expression with
// a scalar value ex:'a+2*b-3*c(1);
// - a character string containing a reference to the first
// entry of a Fortran array
// 'a' if a is a defined matrix
// 'work(iwn)' if variable is stored in the double
// precision working array work
// 'iwork(iiwn)' if variable is stored in the integer
// working array iwork
// remark: complex array are defined by a definition part
// with 2 elements (real and imaginary parts definition)
// *type_expr a character string: the expression type code (used
// to indicate need of parenthesis )
// '2' : the expression is a sum of terms
// '1' : the expression is a product of factors
// '0' : the expression is an atome
// '-1': the value is stored in a Fortran array
// *type_var a character string: codes the variable fortran type:
// '1' : double precision
// '0' : integer
// '10': character
//
// *nb_lig (, nb_col) : character strings:number of rows
// (columns) of the matrix
// des chaines de caracteres
//
// nwrk : this variable contain information on working arrays, error
// indicators. It only may be modified by call to scilab functions
// outname adderr getwrk
//
// txt : is a column vector of character string which contain the
// fortran code associated to the function translation if
// necessary.
// top : an integer
// global variable on entry
// after execution top must be equal to top-rhs+lhs
//!
nam='expm'
txt=[]
s2=stk(top)
if (s2(4)=='1'&s2(5)=='1') then
v=s2(1)
it2=prod(size(v))-1
if it2==0 then
[stk,nwrk,txt,top]=f_gener(nam,nwrk)
else
error(nam+' complex is not implemented')
end
else
[s2,nwrk,t0]=typconv(s2,nwrk,'1')
n=s2(4)
[errn,nwrk]=adderr(nwrk,'exp fails!')
[out,nwrk,t1]=outname(nwrk,'1',n,n,s2(1))
[wrk,nwrk,t2]=getwrk(nwrk,'1',mulf(n,addf(mulf('4',n),'5')),'1')
[iwrk,nwrk,t3]=getwrk(nwrk,'0',mulf('2',n),'1')
txt=[t0;t1;t2;t3;
gencall(['dexpm1',n,n,s2(1),out,n,wrk,iwrk,'ierr']);
genif('ierr.ne.0',[' ierr='+string(errn);' return'])]
[nwrk]=freewrk(nwrk,wrk)
[nwrk]=freewrk(nwrk,iwrk)
stk=list(out,'-1','1',n,n)
end
|
4b0fb0032229d86ddc6b00e4e1a99d4092f0e198 | 449d555969bfd7befe906877abab098c6e63a0e8 | /503/CH7/EX7.43/ch7_43.sci | 4deb818427c526d65f9bd1022711d37c1e5eb275 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 326 | sci | ch7_43.sci | //to find the no of starter sections reqd,and resistance of each section
clc;
I1=55;
I2=35;
g=I1/I2;
V1=220;
R1=V1/I1;
Ra=.4;
n=log((R1/Ra)-g)+1;
disp((n),'no of starter sections reqd');
function [R]=res (re)
R=(1/g)*re;
endfunction
R_1=R1-res(R1);disp(R_1,'R1(ohm)');
R_2=res(R_1);disp(R_2,'R2(ohm)');
|
67d02421e9ba1a432b09393767dbbe3139748625 | efa427de3490f3bb884d8ac0a7d78829ec7990f9 | /plot-two-functions.sce | f3bfecdeb180f0bcff931ffa10341e914f5ef8a9 | [] | no_license | letyrobueno/Scilab | a47648473aa681556561d5cea20659d143e4f492 | 2f23623dccea89a3ab2db12ec1f615186f785aa4 | refs/heads/master | 2020-09-01T19:00:30.804237 | 2019-11-01T17:45:22 | 2019-11-01T17:45:22 | 219,031,973 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 113 | sce | plot-two-functions.sce | // Plot two functions
x = -20:0.01:20
y1 = x.^2-2*x-3
y2 = x.^2+8*x+16
plot(x,y1)
plot(x,y2)
plot(-1.9,4.5,'g*')
|
76c39d0c402d14e3c4a7d082bfa17340e7ccb501 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1332/CH9/EX9.7/9_7.sce | cf497efe87c009422fa087844ec47ca666928c7c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,199 | sce | 9_7.sce | //Example 9.7
//Givens QR Method
//Page no. 303
clc;clear;close;
A=[4,2,1;2,5,-2;1,-2,7]
deff('y=c(i,j)','y=A(j,j)/sqrt((A(i,j)^2+A(j,j)^2))')
deff('y=s(i,j)','y=A(i,j)/sqrt((A(i,j)^2+A(j,j)^2))')
disp(A,'A=')
R=A;Q=eye(3,3);
m=1;
for j=1:2
for i=j+1:3
for k=1:3 //C matrix evaluation
for l=1:3
if(k==l)
if(k==i | k==j)
C(k,l)=c(i,j)
else
C(k,l)=1
end
end
if(k>l)
if(k==i & l==j)
C(k,l)=-1*s(i,j)
else
C(k,l)=0
end
end
if(k<l)
if(k==j & l==i)
C(k,l)=s(i,j)
else
C(k,l)=0
end
end
end
end
printf('\n\n Iteration %i',m)
m=m+1
disp(C,'C=');
R=C*R;
Q=Q*C';
disp(Q,'Q=',R,'R=')
end
end
disp(Q*R,'Q*R=A=') //verification |
a066cbf0784c5111e0038f0c0a2b10812fe2e6fd | 417f69e36190edf7e19a030d2bb6aa4f15bb390c | /SMTTests/tests/ok_ite.tst | fc266628b45a5fdca6a16ca485de3ba9a76eda11 | [] | no_license | IETS3/jSMTLIB | aeaa7ad19be88117c7454d807a944e8581184a66 | c724ac63056101bfeeb39cc3f366c8719aa23f7b | refs/heads/master | 2020-12-24T12:41:17.664907 | 2019-01-04T10:47:43 | 2019-01-04T10:47:43 | 76,446,229 | 1 | 0 | null | 2016-12-14T09:46:41 | 2016-12-14T09:46:41 | null | UTF-8 | Scilab | false | false | 92 | tst | ok_ite.tst | ; checks ite as a formula
(set-logic QF_UF)
(declare-fun a () Bool)
(assert (ite true a a))
|
836821f7e335418f6836df9fcf95dd9306b9d2e5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1016/CH9/EX9.4/ex9_4.sce | 17051430f2e66cd35f4564a03eddcada33aa023e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 332 | sce | ex9_4.sce | clc;clear;
//Example 9.4
//given data
e=1.6*10^-19;//the charge on electron in C
m=9.12*10^-31;//mass of electron in kg
c=3*10^8;//speed of light in m/s
h=6.625*10^-34;//Plank's constant
//calculations
E=m*c^2;
mp=1836*m;
//(0.5*m*v^2)=E
mv=sqrt(E*2*mp);
W=h/mv;
disp((W/10^-10),'de broglie wavelength in Angstrom') |
3ab53362280db810dd06c1e96afab1325720e7a4 | 52cbfb547384bc9612dc59f5280971ed5a701a9d | /Continuous Cosine Signal.sce | 2a868837281b94aa406ba581dcfca72b8d105c8f | [] | no_license | allenbenny419/Scilab-Codes | efa5402bea6d03088f77dafcf9ed87bd1f93e915 | 48109cd70c8a66a56e87f88152e866565dd52362 | refs/heads/main | 2023-06-23T21:10:24.227426 | 2021-07-21T11:09:15 | 2021-07-21T11:09:15 | 388,086,261 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 125 | sce | Continuous Cosine Signal.sce | clear;
clc;
x=0:.1:11
f=0.2;
plot(x,cos(2*%pi*x*f));
xtitle('Continuous Cosine Signal')
xlabel('x')
ylabel('cos(x)')
|
a076b1ab7a4a9745ca07c8d55626da9faa6defbc | f6134e0a162a059c42ec3ef8de2a63941d73936c | /Scilab_code/Local_Planner/createQuaternion.sci | 9970e8664ff71e6052a9bef66afe32842fa649b1 | [] | no_license | mxch18/SRL-WRT_pathPlanning | 38a1701934a4a0e919a6c1c7990092b242df72da | 6992febbbe103814d2cef5351a0e8917b183a2b0 | refs/heads/master | 2020-03-23T06:43:54.155192 | 2018-09-26T17:26:56 | 2018-09-26T17:26:56 | 141,226,032 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 597 | sci | createQuaternion.sci | function q = createQuaternion(alpha,u)
//Author : Maxens ACHIEPI
//Space Robotics Laboratory - Tohoku University
//Description:
//Outputs the quaternion qOut = q1*q2;
//INPUT
//alpha: angle of rotation (radian)
//u: axis of rotation
//OUTPUT
//q: the quaternion of unit magnitude representing the rotation of alpha around u
//----------------------------------------------------------------------------//
u = u/norm(u);
q = [cos(alpha/2), sin(alpha/2)*u(1), sin(alpha/2)*u(2), sin(alpha/2)*u(3)];
q = q/norm(q);
endfunction
|
e7cd9a08e7b25d7fc1024502074e7e2a618b0a7b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2399/CH2/EX2.8.3/Example2_8_3.sce | 8162e224779415c7651e588b55b7e2d19283a8c6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 869 | sce | Example2_8_3.sce | // Example 2.8.3
clc;
clear;
n1=1.482; //refractive index of core
n2=1.474; //refractive index of cladding
lamda=820d-9; //Wavelength
NA=sqrt(n1^2 - n2^2); //computing Numerical aperture
theta= asind(NA); //computing acceptance angle
solid_angle=%pi*(NA)^2; //computing solid angle
a=2.405*lamda/(2*3.14*NA); //computing core radius
a=a*10^6;
printf("\nNumerical aperture is %.3f.\nAcceptance angle is %.1f degrees.\nSolid angle is %.3f radians.\nCore radius is %.2f micrometer.",NA,theta,solid_angle,a);
//answer in the book for Numerical aperture is 0.155, deviation of 0.001.
//answer in the book for acceptance angle is 8.9, deviation of 0.1.
//answer in the book for solid acceptance angle is 0.075, deviation of 0.001.
//answer in the book for core radius is 2.02 micrometer, deviation of 0.02 micrometer.
|
47489a1a46ac6871226f8e473622993a31627299 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2150/CH1/EX1.21/ex1_21.sce | 1207696c27872342193154ba1df4398fee0f37df | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 218 | sce | ex1_21.sce | // Exa 1.21
clc;
clear;
close;
// Given Data
V_S = 4;// in V
V_D1 = 0.7;// in V
V_D2 = 0.7;// in V
R = 5.1*10^3;// in ohm
I_T = (V_S-V_D1-V_D2)/R;// in A
disp(round(I_T*10^6),"The total current in µA is");
|
53bada6e4cbdec3373c56fae446daa894665152e | 449d555969bfd7befe906877abab098c6e63a0e8 | /812/CH9/EX9.04/9_04.sce | db1fd7c5a750d2d7425e05a37fb9e2c38f985bc7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,203 | sce | 9_04.sce | //Displacement thickness and stress//
pathname=get_absolute_file_path('9.04.sce')
filename=pathname+filesep()+'9.04-data.sci'
exec(filename)
//Reynolds number:
ReL=U*L/v
//FOR TURBULENT FLOW
//Disturbance thickness(in m):
dL1=0.382/ReL^0.2*L
//Displacement thickness(in m):
function y=f(n),y=dL1*(1-n^(1/7))
endfunction
dl1=intg(0,1,f)
//Skin friction coefficient:
Cf1=0.0594/ReL^0.2
//Wall shear stress(in N/m^2):
tw1=Cf1*0.5*d*U^2
//For LAMINAR FLOW:
//Disturbance thickness(in m)
dL2=5/sqrt(ReL)*L
//Displacement thickness(in m):
dl2=0.344*dL2
//Skin friction coefficient:
Cf2=0.664/sqrt(ReL)
//Wall shear stress(in N/m^2):
tw2=Cf2*0.5*d*U^2
//COMPARISON OF VALUES WITH LAMINAR FLOW
//Disturbance thickness
D=dL1/dL2
//Displacement thickness
DS=dl1/dl2
//Wall shear stress
WSS=tw1/tw2
printf("\n\nRESULTS\n\n")
printf("\n\nDisturbace thickness: %.3f m\n\n",dL1)
printf("\n\nDisplacement thickness: %.3f m\n\n",dl1)
printf("\n\nWall shear stress: %f N/m^2\n\n",tw1)
printf("\n\nCOMPARISON WIH LAMINAR FLOW\n\n\n")
printf("\n\n Disturbance thicknes: %.3f \n\n",D)
printf("\n\nDisplacement thickness: %.3f\n\n",DS)
printf("\n\nWall shear stress: %.3f \n\n",WSS)
|
94e0f3de42005022e7a8b461c9996128c144a88e | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.2/Unix/scilab-2.2/macros/scicos/CLKOUT_f.sci | c5287d8c047ac01c1edd1443f763edaa36667eee | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 1,580 | sci | CLKOUT_f.sci | function [x,y,typ]=CLKOUT_f(job,arg1,arg2)
x=[];y=[];typ=[];
select job
case 'plot' then
graphics=arg1(2); [orig,sz,orient,label]=graphics(1:4)
model=arg1(3);prt=model(9)
if orient then
x=[orig(1);orig(1)+sz(1);orig(1)+sz(1);orig(1)]
y=[orig(2)+sz(2)/2;orig(2)+sz(2);orig(2);orig(2)+sz(2)/2]
else
x=[orig(1);orig(1);orig(1)+sz(1);orig(1)]
y=[orig(2);orig(2)+sz(2);orig(2)+sz(2)/2;orig(2)]
end
thick=xget('thickness');xset('thickness',2)
pat=xget('pattern');xset('pattern',10)
xfpoly(x,y,1)
xset('thickness',thick)
xset('pattern',pat)
xstring(orig(1),orig(2)-sz(2)/2,label+' '+string(prt))
xset('thickness',thick)
case 'getinputs' then
graphics=arg1(2)
[orig,sz,orient]=graphics(1:3)
if orient then
x=orig(1)
y=orig(2)+sz(2)/2
else
x=orig(1)+sz(1)
y=orig(2)+sz(2)
end
typ=-ones(x) //undefined type
case 'getoutputs' then
x=[];y=[];typ=[];
case 'getorigin' then
[x,y]=standard_origin(arg1)
case 'set' then
x=arg1;
[graphics,model]=arg1(2:3);
prt=model(9);label=graphics(4);
while %t do
[ok,label,prt]=getvalue('Set Clock Output block parameters',..
['Output name';'Port number'],list('str',1,'vec',1),..
[label;string(prt)])
if ~ok then break,end
if prt<=0 then
x_message('Port number must be a positive integer')
ok=%f
end
if ok then
model(9)=prt
graphics(4)=label
x(2)=graphics;
x(3)=model
break
end
end
case 'define' then
model=list('output',0,0,1,0,[],[],[],[1],'d',%f,[%f %f])
x=standard_define([1 1],model,'Out')
end
|
22586101992b30798647f99ff49705b1053bc631 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1938/CH3/EX3.19/3_19.sce | b9f9b6e01fe0245e9f10c903f4b20e0c4bc2d553 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,169 | sce | 3_19.sce | clc,clear
printf('Example 3.19\n\n')
V=219,I=10
dN=1030 - 970 //given
t_1=36 //time with no excitation
t_2=9// time with full excitation and armature supporting an extra load of 10 A at 219 V
t_3=15 //time with full exciation
W_dash = V*I //additioanl loss when armature is suddenly connected to loads
W_s= W_dash *(t_2/(t_3-t_2)) //total stray losses
N=1000 //speed in rpm
//Using W_s = (2*pi/60)^2 * I *N *dN / t_3 where W_s is stray losses
I= W_s*(t_3/dN)*(30/%pi)^2/N //moment of inertia
W_m=W_s*(t_3/t_1) //mechanical losses
iron_losses= W_s - W_m
printf('(i)The moment of inertia of armature is %.2f kg-m^2\n',I)
printf('(ii)Iron loss= %.2f W\n',iron_losses)
printf('(iii)Mechanical losses at 1000 rpm mean speed is %.2f W',W_m)
printf('\n\nNoteworthy points:\n(1)When armature is slowing down and there is no excitation,then kinetic energy is used to overcome mechanical losses only.Iron losses are absent as excitation is absent\n(2)When excitation is given, kinetic energy is used to overcome both mechanical as well as iron losses.Total called stray losses.\n(3)If moment of inertia is in kg-m^2,then loss of energy is in watts')
|
0aa7fd5d21c8899702f61cbc29fbce3e13ed59dd | abed134eb329d44a339af93997f34c76b7649173 | /p5codes_10252020/Memory.tst | b63c9e9f690a6c8818059560e31f35ed500aa338 | [] | no_license | Patrickyyh/CSCE-312 | 8823df9f53d378b96c8018064da3823faef95ce3 | b9ba0fd8592ce5d91d1689219ff48d638a66aee0 | refs/heads/master | 2023-05-03T18:46:15.689810 | 2021-05-22T06:02:17 | 2021-05-22T06:02:17 | 369,727,875 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 633 | tst | Memory.tst | load Memory.hdl,
output-file Memory.out,
compare-to Memory.cmp,
output-list in%D1.6.1 load%B2.1.2 address%B1.16.1 out%D1.16.1;
echo "Before you run this script, select the 'Screen' option from the 'View' menu";
set in -1, // Set RAM[0] = -1
set load 1,
set address 0,
tick,
output;
tock,
output;
set in 9999, // Set RAM[0] = -1
set load 0,
set address %B0000000000000000,
tick,
output;
tock,
output;
set in 9999, // Set RAM[0] = -1
set load 0,
set address %B0100000000000000,
tick,
output;
tock,
output;
set in 2222, // Set RAM[0] = -1
set load 1,
set address %B0100000000000000,
tick,
output;
tock,
output;
|
e0a385de33161e7a1a3e4e7bf54603a1e4e9ccbd | 449d555969bfd7befe906877abab098c6e63a0e8 | /1946/CH6/EX6.6/Ex_6_6.sce | 3d9a23e12af43ef768764fe20555ffdc814802f0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 439 | sce | Ex_6_6.sce | // Example 6.3;//wavelength spacing and frequency spacing
clc;
clear;
close;
Br1=7.21*10^-10;//Bit rate
n=10^18;//hole concentration
Trg=((Br1*n)^-1)*10^9;//radiative minority carrier lifetime in GaAs in ns
Br2=1.79*10^-15;//Bit rate
Trs=((Br2*n)^-1)*10^3;//radiative minority carrier lifetime in Si in ms
disp(Trg,"radiative minority carrier lifetime in GaAs in ns")
disp(Trs,"radiative minority carrier lifetime in Si in ms")
|
56f97780ed071b846d60d71c12fcf22c111d3675 | 449d555969bfd7befe906877abab098c6e63a0e8 | /405/CH2/EX2.9/2_9.sce | 77b37670b3ce2b26360314a7f61bd603733d6adf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,209 | sce | 2_9.sce | clear;
clc;
printf("\t\t\tExample Number 2.9\n\n\n");
// circumferential aluminium fin
// illustration2.9
// solution
t = 0.001;// [m] thickness of fin
L = 0.015;// [m] length of fin
Ts = 170;// [degree celsius] surface temperature
Tfluid = 25;// [degree celsius] fluid temperature
k = 200;// [W/m per degree celsius] heat transfer coefficient of aluminium fin
h = 130;// [W/square meter per degree celsius] convectional heat transfer coefficient
d = 0.025;// [m] tube diameter
Lc = L+t/2;// [m] corrected length
r1 = d/2;// [m] radius of tube
r2_c = r1+Lc;// [m] corrected radius
Am = t*(r2_c-r1);// [square meter] profile area
c = r2_c/r1;// constant to determine efficiency of fin from curve
c1 = ((Lc)^(1.5))*((h/(k*Am))^(0.5));// constant to determine efficiency of fin from curve
// using c and c1 to determine the efficiency of the fin from figure (2-12)
// we get nf = 82 percent
// heat would be transferred if the entire fin were at the base temperature
// both sides of fin exchanging heat
q_max = 2*%pi*(r2_c^(2)-r1^(2))*h*(Ts-Tfluid);// [W] maximum heat transfer
q_act = 0.82*q_max;//[W] actual heat transfer
printf("the actual heat transferred is %f W",q_act);
|
257109755ebe9fb989a61fbd36257f010f99b70e | b12941be3faf1fd1024c2c0437aa3a4ddcbbfd67 | /normal/fase_3.tst | cbf5c006cbec48a2956bdae960aa4ab8d6571daa | [] | no_license | JanWielemaker/optica | 950bd860825ab753236ce1daa399ee7a0b31b3ee | 3a378df314b5a60926b325089edac89c00cc8c6d | refs/heads/master | 2020-06-12T14:22:46.567191 | 2019-06-21T11:24:41 | 2019-06-21T11:24:41 | 194,328,239 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,505 | tst | fase_3.tst | question(1, 'item 3-1',
'Welke afstand geeft weer waar een
divergerende lichtbundel samenkomt? Het
lampje staat 1 centimeter boven de hoofdas.',
[ 'Afstand A',
'Afstand B',
'Afstand C',
'weet niet'
],
state(state, '',
[ m16 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(6),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(11.95),
show_gauge(true),
instrument_name(lens)),
l17 = lamp3(switch(false),
angle(0),
divergence(5),
pos_x(-0.05),
pos_y(1),
instrument_name(lamp3)),
c3 = construction_line(pos_x(17.95),
instrument_name(consline)),
c4 = construction_line(pos_x(23.9),
instrument_name(consline)),
c5 = construction_line(pos_x(29.95),
instrument_name(consline)),
d12 = ruler(from(c3),
to(m16),
pos_y(6.65),
varname('A')),
d13 = ruler(from(m16),
to(c4),
pos_y(5.8),
varname('B')),
d14 = ruler(from(m16),
to(c5),
pos_y(4.6),
varname('C')),
d15 = ruler(from(m16),
to(centerline),
pos_y(6.2))
])).
question(2, 'item 3-2',
'Op welke afstand van de lens komt de
lichtbundel samen als het lampje 3 centimeter
onder de hoofdas staat en de middelste
lichtstraal in de bundel in een hoek van 30
graden op de lens gericht staat?',
[ 'Afstand A',
'Afstand B',
'Afstand C',
'weet niet'
],
state(state, '',
[ l1 = lamp3(switch(true),
angle(25),
divergence(5),
pos_x(0),
pos_y(-3),
instrument_name(lamp3)),
m1 = lens(label(''),
radius(5),
thickness(0.1),
focal_distance(5),
sfere_left(*),
sfere_right(*),
breaking_index(1.51),
pos_x(9.95),
show_gauge(true),
instrument_name(lens)),
d1 = ruler(from(m1),
to(centerline),
pos_y(6.1)),
c1 = construction_line(pos_x(19.95),
instrument_name(consline)),
c2 = construction_line(pos_x(24.95),
instrument_name(consline)),
c3 = construction_line(pos_x(29.95),
instrument_name(consline)),
d2 = ruler(from(c1),
to(m1),
pos_y(6.75),
varname('A')),
d5 = ruler(from(m1),
to(c2),
pos_y(5.8),
varname('B')),
d6 = ruler(from(m1),
to(c3),
pos_y(5.35),
varname('C')),
a2 = protractor(path('l1-beam2'),
segment(1),
location(2.55))
])).
|
442ad59c17bc08ce97489f72fb9e9ecb9dd89d99 | 449d555969bfd7befe906877abab098c6e63a0e8 | /503/CH5/EX5.5/ch5_5.sci | 3507a6566fc10ab7117e6e238d808498994ade90 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 325 | sci | ch5_5.sci | // to calculate useful flux/pole and ares of pole shoe
clc;
p=1500*1000; //power
v=600;
I_a=p/v;
cu=25*1000; //copper losses
R_a=cu/I_a^2;
E_a=v+I_a*R_a;
n=200;
Z=2500;
p=16;
A=16;
phi=E_a*60*A/(p*n*Z);
disp(phi,'flux/pole(Wb)');
fd=0.85; //flux density
a=phi/fd;
disp(a,'area of pole shoe(m*m)'); |
b30d22c27612ba92d1017df54be7ed842a90599a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2420/CH5/EX5.6/5_6.sce | c3f3d4f27910f233c27f0f0210608a2c0c35cbd7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 249 | sce | 5_6.sce | clc
clear
//Initialization of variables
P=200 //psia
T=600 //F
m=1 //lb
//calculations
disp("From mollier chart,")
hx=1322 //Btu/lb
sx=1.676 //Btu/lb F
//results
printf("Enthalpy = %d Btu/lb",hx)
printf("\n entropy = %.3f Btu/lb F",sx)
|
1a037efab2ace8191e4bc9fb7c9d6ed4c6cf3dae | 449d555969bfd7befe906877abab098c6e63a0e8 | /38/CH7/EX7.3/3.sce | 161d4a51492e34c14dae26229f220426265bab37 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 3.sce | // Caption: Finding internal starting torque
clear;
close;
clc;
P_r=380-3*5.7^2*0.262;
//from test 1
Z_nl=219/(sqrt(3)*5.7);//phase Y
R_nl=380/(3*5.7^2);
//from test 2
Z_bl=26.5/(sqrt(3)*18.57);//phase at 15 hz
R_bl=675/(3*18.75^2)//
//internal starting torque
P_g=20100-3*83.3^2*0.262;//air gap power
T_start=P_g/188.5;//starting torque in N-m
|
f061b21e8e78b017680ddc8f9600b38ead200b78 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2240/CH28/EX27.10/EX27_10.sce | a6884ffe45cc78b59cd6a397a4e82996402a5046 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 378 | sce | EX27_10.sce | // Grob's Basic Electronics 11e
// Chapter No. 27
// Example No. 27_10
clc; clear;
// Calculate the maximum rated zener current for a 1 W, 10 V zener.
// Given data
Pzm = 1; // Power rating of zener= 1 Watts
Vz = 10; // Voltage rating of zener= 10 Volts
Izm = Pzm/Vz;
disp (Izm,'The Maximum Rated Current of Zener in Amps')
disp ('i.e 100 mAmps')
|
f3bcf4ca09654d5a3a350e6cbea41e5992234bcd | 449d555969bfd7befe906877abab098c6e63a0e8 | /1931/CH3/EX3.18/18.sce | 695bc6af6f23b24e1ccf9f92b854369500f6d757 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 510 | sce | 18.sce | clc
clear
//INPUT DATA
x=23//atomic weight of sodium
y=35.45//atomic weight of chloide
AW=58.45//atomic weight of sodium chloride(NaCl)
n=4//no.of atoms in FCC structure
d=2.18*10^6//density of NaCl crystal of FCC structure in kg/m^3
N=6.023*10^23//Avogadro's Number per Kg mol
//CALCULATION
a=(((n*AW)/(d*N))^(1/3))/10^-10//The lattice constant in m
r=(a/2)//The distance between two adjacent atoms in m *10^-10
//OUTPUT
printf('The distance between two adjacent atoms is %3.2f*10^-10 m',r)
|
c3945c14a06bf16f7e6e6914b7bc69124787dc0b | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/macros/xdess/chart.sci | 5d7dc7f5451b8161f29d958344d2d8bbe806b9dc | [
"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 | 2,097 | sci | chart.sci | function []=chart(attenu,angl,flags)
// Copyright INRIA
titre='amplitude and phase contours of y/(1+y)'
l10=log(10);
ratio=%pi/180;
//
[lhs,rhs]=argn(0)
select rhs
case 3 then
case 2 then,
if type(angl)==15 then
flags=angl
angl=-[1:10,20:10:160]*ratio;
else
angl=-angl*ratio
flags=[]
end
case 1 then
if type(attenu)==15 then
flags=attenu
attenu=[-12 -8 -6 -5 -4 -3 -2 -1.4 -1 -.5 ,..
0.25 0.5 0.7 1 1.4 2 2.3 3 4 5 6 8 12];
else
flags=list()
end
angl=-[1:10,20:10:160]*ratio;
else
flags=list()
attenu=[-12 -8 -6 -5 -4 -3 -2 -1.4 -1 -.5 ,..
0.25 0.5 0.7 1 1.4 2 2.3 3 4 5 6 8 12];
angl=-[1:10,20:10:160]*ratio
end
//
select size(flags)
case 0 then
flags=list(0,-1,1,2)
case 1 then
flags=list(flags(1),-1,1, 2)
case 2 then
flags=list(flags(1),flags(2), 1, 2)
case 3 then
flags(4)=2
end
//
rect=[-360,-50,0,40];
strf='011'
if flags(1) then strf='000',end
//
plot2d(0,0,flags(3),strf," ",rect,[2,6,3,9]);
if flags(2) then xtitle(titre,'phase(y) - degree','magnitude(y) - db'),end
llrect=xstringl(0,0,'1')
//contours de gain constant
lambda=exp(l10*attenu/20)
rayon=lambda./(lambda.*lambda-ones(lambda))
centre=-lambda.*rayon
//
for i = 1:prod(size(attenu)),
if attenu(i)<0 then
w=%eps:0.03:%pi;
else
w=-%pi:0.03:0;
end;
n=prod(size(w))
rf=centre(i)*ones(w)+rayon(i)*exp(%i*w);
phi=atan(imag(rf),real(rf))/ratio;
module=20*log(abs(rf))/l10;
plot2d([-360*ones(phi)-phi(n:-1:1) phi]',...
[module(n:-1:1) module]',[flags(3),flags(4)],"000"," ",rect);
att=attenu(i);
if att<0 then
xstring(phi(n)+llrect(3),module(n),string(att),0,0);
else
xstring(phi(1),module(1)+llrect(4)/4,string(att),0,0);
end
end;
//
//phase
eps=100*%eps;
for teta=angl,
if teta < -%pi/2 then
last=teta-eps,
else
last=teta+eps,
end;
w=[-170*ratio:0.03:last last]'
n=prod(size(w));
module=real(20*log((sin(w)*cos(teta)/sin(teta)-cos(w)))/l10)
w=w/ratio
plot2d([w,-360*ones(w)-w(n:-1:1)],[module,module(n:-1:1)],[flags(4),flags(4)],"000");
end;
|
2fc81aa00527cbeb91c73957159c15e8c5dfbaa3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3472/CH20/EX20.4/Example20_4.sce | 654ae14ea704a3630ea766e8f245106e220fc6f6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,401 | sce | Example20_4.sce | // A Texbook on POWER SYSTEM ENGINEERING
// A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar
// DHANPAT RAI & Co.
// SECOND EDITION
// PART II : TRANSMISSION AND DISTRIBUTION
// CHAPTER 13: WAVE PROPAGATION ON TRANSMISSION LINES
// EXAMPLE : 13.4 :
// Page number 366
clear ; clc ; close ; // Clear the work space and console
// Given data
R_1 = 60.0 // Surge impedance of underground cable(ohm)
R_2 = 400.0 // Surge impedance of overhead line(ohm)
e = 100.0 // Maximum value of surge(kV)
// Calculations
i = e*1000/R_1 // Current(A)
k = (R_2-R_1)/(R_2+R_1)
e_ref = k*e // Reflected voltage(kV)
e_trans = e+e_ref // Transmitted voltage(kV)
e_trans_alt = (1+k)*e // Transmitted voltage(kV). Alternative method
i_ref = -k*i // Reflected current(A)
i_trans = e_trans*1000/R_2 // Transmitted current(A)
i_trans_alt = (1-k)*i // Transmitted current(A). Alternative method
// Results
disp("PART II - EXAMPLE : 13.4 : SOLUTION :-")
printf("\nReflected voltage at the junction = %.f kV", e_ref)
printf("\nTransmitted voltage at the junction = %.f kV", e_trans)
printf("\nReflected current at the junction = %.f A", i_ref)
printf("\nTransmitted current at the junction = %.f A\n", i_trans)
printf("\nNOTE: ERROR: Calculation mistake in textbook in finding Reflected current")
|
ad64f76208ecb0b05522449ee4e3918d4378c938 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3782/CH9/EX9.4/Ex9_4.sce | f6a49af3032a83056266c53d06f17e1d3e7d9318 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 465 | sce | Ex9_4.sce |
//ch-9 page 307 pb-4
//
//
l1=75.5,l2=80.25,l3=75,
t1=30.25,t2=40.5,t3=60.5,
L1=l1*cos(t1*(%pi/180))
L2=-l2*cos(t2*(%pi/180))
L3=-l3*cos(t3*(%pi/180))
printf("\n latitudes of AQ,QR,RB are %0.3f %0.3f %0.3f",L1,L2,L3)
D1=l1*sin(t1*(%pi/180))
D2=l2*sin(t2*(%pi/180))
D3=-l3*sin(t3*(%pi/180))
printf("\n Depature of AQ,QR,RB are %0.3f %0.3f %0.3f",D1,D2,D3)
L4=-(L1+L2+L3)
D4=-(D1+D2+D3)
l4=sqrt(L4*L4+(D4*D4))
printf("\n length of AB= %0.3f meters',l4)
|
2f86623cb6cd97cc7e775b26dd0461fcea63c704 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3845/CH23/EX23.9/Ex23_9.sce | 7d059cc0d4a942a877a33c15744adffa86f1f7ad | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 672 | sce | Ex23_9.sce | //Example 23.9
L=7.5*10^-3;//Inductance (H)
R=3;//Resistance (ohm)
tau=L/R;//Time constant (s)
printf('a.Time constant tau = %0.2f ms',tau*1000)
I_0=10;//Initial current (A)
I=0.368*I_0;//Current decreases to 0.368 times the initial value in tau seconds (A)
t=tau;//Time (s)
while t<5*10^-3
I=0.368*I;//Current (A)
t=t+tau;//Time (s)
end// To find decline in current with time
printf('\nb.Current = %0.2f A',I)
//Here we used two iterations as we know 5ms is twice the characteristic time tau. I=I_0*exp(-t/tau) can also be used to find the current at 5ms.
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest |
8e5beda25d3112e5128d4fec2014a331fd58015d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2288/CH8/EX8.13.1/ex8_13_1.sce | 96b9e8b81f79d6387a1df0e52da855c7bbafe6a9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 363 | sce | ex8_13_1.sce | // Exa 8.13.1
clc;
clear;
close;
// Given data
R= 10;// in kΩ
R= R*10^3;// in Ω
// Part (i)
V=300;// in V
I_A= V/R;// in A
disp("Part (i) : For 300 V voltage : ")
disp(I_A*10^3,"The anode current in mA is : ");
// Part (ii)
V=100;// in V
I_A= V/R;// in A
disp("Part (ii) : For 100 V voltage : ")
disp(I_A*10^3,"The anode current in mA is : ");
|
91ae27f0fb5ae5aebbbd5cf7a83a0dd2314b229d | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set14/s_Material_Science_S._L._Kakani_And_A._Kakani_1085.zip/Material_Science_S._L._Kakani_And_A._Kakani_1085/CH18/EX18.2/ex18_2.sce | e45dd06e7820508a70f1c1c0591d99a6386cc15c | [] | no_license | hohiroki/Scilab_TBC | cb11e171e47a6cf15dad6594726c14443b23d512 | 98e421ab71b2e8be0c70d67cca3ecb53eeef1df6 | refs/heads/master | 2021-01-18T02:07:29.200029 | 2016-04-29T07:01:39 | 2016-04-29T07:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 476 | sce | ex18_2.sce | errcatch(-1,"stop");mode(2);//Exam:18.2
;
;
E_f=69;//modulus of elasticity in GPa
V_f=40/100;//Volume of glass fibres %
E_m=3.4;//modulus (in GPa)
V_m=60/100;//Volume of polyester resin %
E_cl=E_m*E_f/(E_m*V_f+E_f*V_m);//modulus of elasticity when the stress is applied perpendicular to the direction of the fibre alignment(in Gpa)
disp(E_cl,'modulus of elasticity when the stress is applied perpendicular to the direction of the fibre alignment(in Gpa)=');
exit();
|
f5a2d27c2513f06c42ce1c07994383ab05717aca | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set6/s_Electronic_Circuits_M._H._Tooley_995.zip/Electronic_Circuits_M._H._Tooley_995/CH3/EX3.2/Ex3_2.sce | 25d4d6ed2726cd5c6738eb5b4b1ae25fe768e543 | [] | no_license | hohiroki/Scilab_TBC | cb11e171e47a6cf15dad6594726c14443b23d512 | 98e421ab71b2e8be0c70d67cca3ecb53eeef1df6 | refs/heads/master | 2021-01-18T02:07:29.200029 | 2016-04-29T07:01:39 | 2016-04-29T07:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 169 | sce | Ex3_2.sce | errcatch(-1,"stop");mode(2);//Ex:3.2
;
;
E1=6;
E2=3;
V2=E1-E2;
V1=4.5;
E3=V1-E2;
printf("Value of V2 = %f A",V2);
printf("\n Value of E3 = %f A",E3);
exit();
|
5eead4959f2ed779f002461392bfa428fda3e10e | 2cbec1c1c33a3ddb024a9547d04b8471048d1304 | /Scilab - Matheus Saliba/TestFunction.sce | b475deebad98dc361bddab35aa97efa69cd57d07 | [] | no_license | danieliasantos/CalculoNumerico | 81f89933f8e2a9f711bdce17e9f8867fa9323371 | c7a5b95e841396abd3092de3e5967ccccbcf5495 | refs/heads/master | 2020-03-22T20:29:21.064914 | 2018-07-07T05:46:36 | 2018-07-07T05:46:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,992 | sce | TestFunction.sce |
n = 20;
tempos(8) = 0;
//1. Fibonacci (use n>=20)
function [s]=fib(y)
s1=1;
s2=1;
s=zeros(1,y);
s(1)=s1;
s(2)=s2;
for i=3:y
s(i)=s(i-1)+s(i-2) ;
end
endfunction
tic();
fib(n);
tempo = toc();
disp("Fibonacci: ");
disp(tempo);
tempos(1) = tempo;
t = 1000;
//2. Parse Int (use t>=1000)
function n = parseintperf(t)
for i = 1:t
s = dec2hex(i); //Converte decimal para hexadecimal
m = hex2dec(s); //Converte hexadecimal para decimal
end
end
tic();
parseintperf(t);
tempo = toc();
disp("Parse Int: ");
disp(tempo);
tempos(2) = tempo;
function a = qsort_kernel(a, lo, hi) //Funo agregada do quicksort
i = lo;
j = hi;
while i < hi
pivot = a(floor((lo+hi)/2)); //floor significa funcao piso
while i <= j
while a(i) < pivot, i = i + 1; end
while a(j) > pivot, j = j - 1; end
if i <= j
t = a(i);
a(i) = a(j);
a(j) = t;
i = i + 1;
j = j - 1;
end
end
if lo < j; a=qsort_kernel(a, lo, j); end
lo = i;
j = hi;
end
end
//3. Quicksort (use n>=5000)
function b = qsort(a) //Funo agregada do quicksort
b = qsort_kernel(a, 1, length(a));
end
tic();
qsort(rand(1, 5000));
tempo = toc();
disp("Quicksort: ");
disp(tempo);
tempos(3) = tempo;
function v = sortperf(n) //Funo principal de chamada do quicksort
v = rand(n,1); //Gera uma matriz nx1 de numeros aleatrios entre 0 e 1
v = qsort(v);
end
z = 100;
//4. Mandelbrot
function n = mandel(z) //Funo agregada do mandelperf
n = 0;
c = z;
for n=0:79
if abs(z)>2 //Se z=a+bi ento abs(z)=sqrt(a^2+b^2)
return
end
z = z^2+c;
end
n = 80;
end
tic();
mandelperf(z);
tempo = toc();
disp("Mandelbrot: ");
disp(tempo);
tempos(4) = tempo;
function M = mandelperf(ignore) //Funo principal
M = zeros(length(-2.0:.1:0.5), length(-1:.1:1));
count = 1;
for r = -2:0.1:0.5
for i = -1:.1:1
M(count) = mandel(complex(r,i)); //complex(a,b)=a+bi
count = count + 1;
end
end
end
ignore = 1000;
//5. Gerao de \pi
function sum = pisum(ignore) //Forma no vetorizada
sum = 0.0;
for j=1:500
sum = 0.0;
for k=1:10000
sum = sum + 1.0/(k*k);
end
end
end
tic();
pisum(ignore);
tempo = toc();
disp("Soma PI: ");
disp(tempo);
tempos(5) = tempo;
function s = pisumvec(ignore) //Forma vetorizada
a = [1:10000]
for j=1:500
s = sum( 1./(a.^2));
end
end
t = 1000;
//6. Estatstica em matriz aleatria (use t>=1000)
function randmatstat(t)
n = 5;
v = zeros(t); //Gera uma matriz txt de zeros
w = zeros(t);
for i = 1:t
a = rand(n,n); //Matriz nxn de n aleatrios com distribuio normal
b = rand(n,n);
c = rand(n,n);
d = rand(n,n);
P = [a b c d];
Q = [a b; c d];
v(i) = trace((P'*P)^4); //trace=Trao de matriz e P'=transposta de A
w(i) = trace((Q'*Q)^4);
end
stdev(v)/mean(v); //desvio e mdia so calculados por coluna da matriz.
stdev(w)/mean(w);
end
tic();
randmatstat(t);
tempo = toc();
disp("Estatstica em matriz aleatoria: ");
disp(tempo);
tempos(6) = tempo;
//7. Relao sucessiva
// Faa um teste para
A=[4 -2 1 3 0;-1 10 0 8 1;-1 1 15 2 4;0 1 10 5 1; 2 -3 1 2 20];
b=[15;56;74;57;107];w=1.6;Toler=1e-5;IterMax=500;
function [Iter,x,NormaRel]=SOR(A,b,w,Toler,IterMax)
n=size(A,2);
for i=1:n
r=1/A(i,i);
for j=1:n
if (i~=j), A(i,j)=A(i,j)*r;
end
end
b(i)=b(i)*r; x(i)=b(i);
end
Iter=0; NormaRel=1000;
while (NormaRel > Toler && Iter < IterMax)
Iter=Iter+1;
for i=1:n
soma=0;
for j=1:n
if (i~=j), soma=soma+A(i,j)*x(j); end
end
v(i)=x(i); x(i)=w*(b(i)-soma)+(1-w)*x(i);
end
NormaNum=0; NormaDen=0;
for i=1:n
t=abs(x(i)-v(i));
if (t>NormaNum), NormaNum=t; end
if abs(x(i))>NormaDen, NormaDen=abs(x(i)); end
end
NormaRel=NormaNum/NormaDen; //Iter,x,NormaRel;
end
if NormaRel <= Toler
CondErro =0;
else
CondErro=1;
end
end
tic();
[Iter,x,NormaRel]=SOR(A,b,w,Toler,IterMax) ;
tempo = toc();
disp("Relacao sucessiva: ");
disp(tempo);
tempos(7) = tempo;
//8. Mtodo de Newton
//Faa um teste com
x0=4;Toler=1.0000e-05;IterMax=100;
function [f]=f(x)
f=x^4+2*x^3-13*x^2-14*x+24;
end
//
function [f]=df(x)
f=4*x^3+6*x^2-26*x-14;
end
function [Raiz,Iter,CondErro]=Newton(x0,Toler,IterMax)
//Saida: Raiz a raiz da funcao;
// Iter a quantidade de itearacoes feitas;
// CondErro=0 se a raiz foi encontrada e
// CondErro=1 se nao for encontrada
Fx=f(x0); DFx=df(x0);x=x0;Iter=0; //f=funo e df=derivada de f
DeltaX=1000;
DF=1;
while ( (abs(DeltaX)>Toler || abs(Fx)>Toler) && (DF~=0) && (Iter <IterMax) )
DeltaX=-Fx/DFx;x=x+DeltaX;Fx=f(x);DFx=df(x);Iter=Iter+1;
end
Raiz=x;
if abs(DeltaX)<=Toler && abs(Fx)<=Toler
CondErro=0;
else
CondErro=1;
end
end
tic();
[Raiz,Iter,CondErro]=Newton(x0,Toler,IterMax) ;
tempo = toc();
disp("Newton: ");
disp(tempo);
tempos(8) = tempo;
disp(tempos);
|
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") |
4fc2d6358a6766cde45ee70189f0b7cca6cf0fc7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /608/CH24/EX24.12/24_12.sce | 7bfc7808824983c03ebcf69b4d673b4c4dc257f4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 957 | sce | 24_12.sce | //Problem 24.12: For the circuit shown in Figure 24.17, determine the values of voltages V1 and V2 if the supply frequency is 4 kHz. Determine also the value of the supply voltage V and the circuit phase angle. Draw the phasor diagram.
//initializing the variables:
C = 2.653E-6; // in Farads
R1 = 8; // in ohms
R2 = 5; // in ohms
L = 0.477E-3; // in Henry
f = 4000; // in Hz
ri = 6; // in Amperes
thetai = 0; // in degrees
//calculation:
I = ri*cos(thetai*%pi/180) + %i*ri*sin(thetai*%pi/180)
//Capacitive reactance, Xc
Xc = 1/(2*%pi*f*C)
//impedance Z1
Z1 = R1 - %i*Xc
//inductive reactance XL
XL = 2*%pi*f*L
//impedance Z2,
Z2 = R2 + %i*XL
//voltage V1
V1 = I*Z1
//voltage V2
V2 = I*Z2
//Supply voltage, V
V = V1 + V2
phiv = atan(imag(V)/real(V))*180/%pi
phi = phiv - thetai
printf("\n\n Result \n\n")
printf("\n supply voltage is %.2f + (%.2f)i V\n",real(V), imag(V))
printf("and Circuit phase angle is %.2f° \n",phi) |
2afa45099b9bdd48176cd1212f94e0732dbf4f3d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2048/CH9/EX9.1/ball_basic.sce | a77321e8bfce5f320ba8185353b3bc241d46af58 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,823 | sce | ball_basic.sce | // Pole placement controller for magnetically suspended ball problem, discussed in Example 9.3 on page 331.
// 9.1
exec('myc2d.sci',-1);
exec('desired.sci',-1);
exec('zpowk.sci',-1);
exec('polsplit2.sci',-1);
exec('polsize.sci',-1);
exec('t1calc.sci',-1);
exec('indep.sci',-1);
exec('move_sci.sci',-1);
exec('colsplit.sci',-1);
exec('clcoef.sci',-1);
exec('cindep.sci',-1);
exec('polmul.sci',-1);
exec('seshft.sci',-1);
exec('makezero.sci',-1);
exec('xdync.sci',-1);
exec('left_prm.sci',-1);
exec('rowjoin.sci',-1);
exec('pp_basic.sci',-1);
exec('polyno.sci',-1);
exec('cosfil_ip.sci',-1);
// Magnetically suspended ball problem
// Operating conditions
M = 0.05; L = 0.01; R = 1; K = 0.0001; g = 9.81;
//Equilibrium conditions
hs = 0.01; is = sqrt(M*g*hs/K);
// State space matrices
a21 = K*is^2/M/hs^2; a23 = - 2*K*is/M/hs; a33 = - R/L;
b3 = 1/L;
a1 = [0 1 0; a21 0 a23; 0 0 a33];
b1 = [0; 0; b3]; c1 = [1 0 0]; d1 = 0;
// Transfer functions
G = syslin('c',a1,b1,c1,d1); Ts = 0.01;
[B,A,k] = myc2d(G,Ts);
//polynomials are returned
[Ds,num,den] = ss2tf(G);
num = clean(num); den = clean(den);
// Transient specifications
rise = 0.15; epsilon = 0.05;
phi = desired(Ts,rise,epsilon);
// Controller design
[Rc,Sc,Tc,gamm] = pp_basic(B,A,k,phi);
// Setting up simulation parameters for basic.xcos
st = 0.0001; // desired change in h, in m.
t_init = 0; // simulation start time
t_final = 0.5; // simulation end time
// Setting up simulation parameters for c_ss_cl.xcos
N_var = 0; xInitial = [0 0 0]; N = 1; C = 0; D = 1;
[Tc1,Rc1] = cosfil_ip(Tc,Rc); // Tc/Rc
[Sc2,Rc2] = cosfil_ip(Sc,Rc); // Sc/Rc
[Tcp1,Tcp2] = cosfil_ip(Tc,1); // Tc/1
[Np,Rcp] = cosfil_ip(N,Rc); // 1/Rc
[Scp1,Scp2] = cosfil_ip(Sc,1); // Sc/1
[Cp,Dp] = cosfil_ip(C,D); // C/D
|
ee3980b2a143a161990ec4ccb5d80bab51b052b5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1061/CH8/EX8.8/Ex8_8.sce | b9c74e1f4ade066b2fa16781bc24a707759c4910 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 387 | sce | Ex8_8.sce | //Ex:8.8
clc;
clear;
close;
Eg=1.43;// bandgap energy in eV
dy=0.15*10^-9;
c=3*10^8;// speed of light in m/s
y=1.24/Eg;// in um
y1=y*10^-6;// wavelength of optical emission in m
df=(c*dy)/(y1^2);// the line width in Hz
Df=df/10^9;// the line width in GHz
printf("The wavelength of optical emission =%f um", y);
printf("\n The frequency separation of the modes =%d GHz", Df); |
31e25c236842a145919ff147c735d3fe2947c75a | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.3.1/macros/util/g_det.sci | 0e27bd676f2902a07282e719d7a40ec99ad86386 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 346 | sci | g_det.sci | function x=g_det(a)
// only to be called by function det
//!
a1=a(1);
select type(a)
case 2 then
x=determ(a)
//-compat next case retained for list/tlist compatibility
case 15 then
if a1(1)=='r' then
x=detr(a);
else
error(43)
end
case 16 then
if a1(1)=='r' then
x=detr(a);
else
error(43)
end
else
error(43)
end
|
3c4541c508b8d35e01aac751e746e149427d21df | 449d555969bfd7befe906877abab098c6e63a0e8 | /626/CH3/EX3.1/3_1.sce | df99419c01d13bad571cd498b89ea2b04aee4cad | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 258 | sce | 3_1.sce | clear;
clc;
close;
disp("Example 3.1")
M0=0.85 //Mach no.
a0=300 //speed of sound in m/s
m=50 //Air mass flow rate in kg/s
//Calculations
V0=M0*a0 //Flight speed
Dr=m*V0 //Ram drag
Dk=Dr/1000 //in kN
disp(Dk,"The ram drag for given engine in kN:") |
45d377e2ca5f87460f4184c4a3a562fb62e34c24 | 47c032497e2d1d166b7f6688009c798a82003bbb | /Largest Eigen value for any 3x3 matrix.sce | 9733fc2df87ed8b99b6acf9ffa18a4b0dee53093 | [] | no_license | mitravinda462/Linear-Algebra | a4bd070b9ca6aba6e92744ac7b7b1d34e4703f3f | 97174a1ad29a6d11f3077d2adb330877312fada9 | refs/heads/master | 2021-08-16T11:14:40.296151 | 2021-01-10T11:36:58 | 2021-01-10T11:36:58 | 240,181,145 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 877 | sce | Largest Eigen value for any 3x3 matrix.sce | disp('Enter the coefficient matrix');
a11=input("Enter value for a11: ");
a12=input("Enter value for a12: ");
a13=input("Enter value for a13: ");
a21=input("Enter value for a21: ");
a22=input("Enter value for a22: ");
a23=input("Enter value for a23: ");
a31=input("Enter value for a31: ");
a32=input("Enter value for a32: ");
a33=input("Enter value for a33: ");
A=[a11,a12,a13;a21,a22,a23;a31,a32,a33];
disp(A,'The given matrix is:');
//Initial vector
u0=[1 1 1]';
disp(u0,'The initial vector is:');
v=A*u0;
a=max(u0);
disp(a,'First approximation to eigen value is:');
while abs(max(v)-a)>0.002
disp(v,"Current eigen vector is:");
a=max(v);
disp(a,"Current eigen value is:");
u0=v/max(v);
v=A*u0;
end
format('v',4);
disp(max(v),"The largext Eigen Value is:");
format('v',5);
disp(u0,'The corresponding Eigen vector is:');
|
909730919788c399f0b8161ec8faf30115d2a5d5 | e82d1909ffc4f200b5f6d16cffb9868f3b695f2a | /Lista 9/Lista Baron/jacobi.sci | d005c52bd754c5d336b597dca0e7b0b5864fe998 | [] | no_license | AugustoCam95/Computational-Linear-Algebra | eb14307dd3b45ccc79617efe74d1faca639c36c5 | 99b1a1f9499fbc4343bd5c878444e9e281952774 | refs/heads/master | 2020-03-30T22:26:23.790763 | 2018-10-05T03:34:06 | 2018-10-05T03:34:06 | 151,666,289 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 531 | sci | jacobi.sci | function xout=jacobi(A,b)
[l,c]=size(A);
D=diag(diag(A));
L=-1*(D-tril(A));
U=-1*(D-triu(A));
invD=diag(diag(1/D));
x=zeros(l,1);
oldx=x;
M=D
N=-(L+U)
MN=-inv(D)*(L+U)
for i=1:1000
if (max(abs(x-oldx))<0.001) then
xout=x;
else
oldx=x;
x=inv(D)*b-inv(D)*(L+U)*x;
end
end
M=D
N=-(L+U)
MN=-inv(D)*(L+U)
disp("M:\n")
disp(M)
disp("N:\n")
disp(N)
disp("M^-1N:\n")
disp(MN)
endfunction
//M=D.N=-(L+U).M^-1*N=-D^-1(L+U)
|
e845b92569d9435bf8e5dd97778e0b2b117d4552 | 10f03cb9e3dec53d29b7bd71ceded24525c620fc | /FoosballApi/Models/TypeScript/ModelsGenerator.tst | a752aebeb55a71469253db9a35a8d3293912c08c | [] | no_license | Mezaru/FoosballWarriors | 62454bdfcd11599dd252e4c20464b33a00b81e3b | 85fe289a3c97c1c16c2994b1d55426ec0faaa38e | refs/heads/master | 2023-01-14T17:14:49.330965 | 2021-06-20T18:29:14 | 2021-06-20T18:29:14 | 241,671,553 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,828 | tst | ModelsGenerator.tst | ${
// $Classes/Enums/Interfaces(filter)[template][separator]
// filter (optional): Matches the name or full name of the current item. * = match any, wrap in [] to match attributes or prefix with : to match interfaces or base classes.
// template: The template to repeat for each matched item
// separator (optional): A separator template that is placed between all templates e.g. $Properties[public $name: $Type][, ]
// More info: http://frhagn.github.io/Typewriter/
// Enable extension methods by adding using Typewriter.Extensions.*
using Typewriter.Extensions.Types;
using System.Diagnostics;
// Uncomment the constructor to change template settings.
Template(Settings settings)
{
settings.OutputFilenameFactory = (file) => $"{file.Name.Replace("Model.cs", ".model.ts")}";
}
string ModellessName(Class c)
{
return c.Name.Replace("Model", "");
}
string ModellessName(Property p)
{
return p.Type.Name.Replace("Model", "");
}
string Imports(Class c)
{
var names = c.Properties.Where(x => !GetChildType(x.Type).Namespace.Contains("System")).Select(x => $"import {{ {x.Type.Name.Replace("Model", "").Replace("[]", "")} }} from 'src/app/shared/models/{x.Type.Name.Replace("Model", "").Replace("[]", "")}.model'").Distinct();
return string.Join(Environment.NewLine, names);
}
Type GetChildType(Type t)
{
if(t.TypeArguments != null && t.TypeArguments.Count > 0)
return GetChildType(t.TypeArguments.First());
else
return t;
}
string RemoveModel(string s)
{
return s.Replace("Model", "");
}
}$Classes(*Model)[$Imports
export class $ModellessName {
$Properties[
public $name: $ModellessName = $Type[$Default];]
}] |
e7fcc8ff495a8788bcc48cd5e339d6cb393d74e8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2939/CH4/EX4.35/Ex4_35.sce | 2253c2706b624fd9e5519e6ac08584b37bcfb8fb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 253 | sce | Ex4_35.sce |
// Ex4_35
clc;
// Given:
t1=2.7;// h
t2=3.6;// h
// Solution:
k1=0.693/t1;
k2=.693/t2;
tmax=(log(k2/k1))/(k2-k1);
printf("The time when daughter activity reaches maximum is %f and this is same when activities of both are equal.",tmax)
|
1ddabeeecab40776241e113a45f0e7d354916244 | b29e9715ab76b6f89609c32edd36f81a0dcf6a39 | /ketpic2escifiles6/Texif.sci | 8cbae5dcb5cbd4ef9d3283d4fed5b213314fdd7f | [] | no_license | ketpic/ketcindy-scilab-support | e1646488aa840f86c198818ea518c24a66b71f81 | 3df21192d25809ce980cd036a5ef9f97b53aa918 | refs/heads/master | 2021-05-11T11:40:49.725978 | 2018-01-16T14:02:21 | 2018-01-16T14:02:21 | 117,643,554 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 280 | sci | Texif.sci | // 10.04.16
// 10.04.18
// 10.05.03
function Texif(varargin)
Condstr=varargin(1);
Tp=0;
if length(varargin)>1
Tp=varargin(2);
end;
Texcom('');
Texcom('{');
if Tp==0
Texcom('\ifnum ');
else
Texcom('\ifdim ');
end;
Texcom(Condstr+' ');
endfunction;
|
e90fe22bd246d9ddd4b14b8c4b192c995a3da40f | 1d7cb1dbfad2558a4145c06cbe3f5fa3fc6d2c08 | /Scilab/PCIeGen3/DFEStudy/DFETest.sci | e5c431fef6484f40670b8ac2d5372ded4d61cd37 | [] | no_license | lrayzman/SI-Scripts | 5b5f6a8e4ae19ccff53b8dab7b5773e0acde710d | 9ab161c6deff2a27c9da906e37aa68964fabb036 | refs/heads/master | 2020-09-25T16:23:23.389526 | 2020-02-09T02:13:46 | 2020-02-09T02:13:46 | 66,975,754 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 5,450 | sci | DFETest.sci | // DFE Test
clear;
getf("DFEFunction.sci"); // Include DFE function
getf("HSPiceUtilities.sci"); // Include HSpice utilities
/////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////Main Routine////////////////////////////////////
waveformstr=emptystr(); // Waveform to be analyzed
ftrdata = emptystr(); // Filename(s) of the pulse response *.tr* file(s)
fcnvpar = emptystr(); // Converter instructions file
cmdlinestr=emptystr(); // HSpice converter command line string.
olddir=emptystr(); // Original directory path
t = []; // Time points vector from tr* file
D = []; // Waveform vector from tr* file
coeffs_in=[0.25 -0.25 64 1;... // DFE coefficients specification
0.2 -0.2 64 1;...
0.1 -0.1 64 1];
opt_coeffs_out=[]; // Optimized coefficients values
Dfe_alg_type=2; // Dfe algorithm type
prerr=0; // Pulse response error
///////////////////
// Get Scilab Version
///////////////////
version_str=getversion();
version_str=tokens(version_str,'-');
version_str=tokens(version_str(2),'.');
version(1)=msscanf(version_str(1), '%d');
version(2)=msscanf(version_str(2), '%d');
///////////////////
// Setup files/directories
///////////////////
if (version(1)==5) & (version(2) >= 1) then // tr* file(s)
ftrdata=uigetfile("*.tr*", "", "Please choose pulse response *.tr* file(s)", %f);
else
ftrdata=tk_getfile("*.tr*", "", Title="Please choose pulse response *.tr* file(s)", multip="0");
end
if ftrdata==emptystr() then
if (version(1)==5) & (version(2) >= 1) then
messagebox("Invalid file selection. Script aborted", "","error","Abort");
else
buttondialog("Invalid file selection. Script aborted", "Abort");
end
abort;
end
///////////////////
// Waveform Info
///////////////////
dialogstr=x_mdialog(['Enter waveform parameters:'], ['Waveform Name'],['V(rxbump_p, rxbump_n)']);
if length(dialogstr)==0 then
if (version(1)==5) & (version(2) >= 1) then
messagebox("Invalid parameters selection. Script aborted", "","error","Abort");
else
buttondialog("Invalid parameters selection. Script aborted", "Abort");
end
chdir(olddir);
abort;
end
waveformstr=strcat(tokens(dialogstr(1), " ")); // Strip spaces in the waveform string
///////////////////
// Run file conversion
///////////////////
//Set new directory name for Hspice conversion
olddir=getcwd();
chdir(fileparts(ftrdata, "path"));
//Create conversion command line
cmdlinestr="converter -t PWL -i " + strcat([fileparts(ftrdata, "fname"), fileparts(ftrdata, "extension")]) + " -o " + strcat([fileparts(ftrdata, "fname"), ".dat"]) + " < cnvparams.txt";
//Create converter input file
fcnvpar=strcat([fileparts(ftrdata, "path"), "cnvparams.txt"]); // Set instructions file.
[fhandle,err]=mopen(fcnvpar, "w");
if err<0 then
chdir(olddir);
error("Pulse Convolver: Unable to create conversion instructions file");
abort;
end
mfprintf(fhandle,"1\n%s\n\n%s\n\n\n",waveformstr,waveformstr);
mclose(fhandle);
//run converter
if unix(cmdlinestr) ~= 0 then // Run simulation
if (version(1)==5) & (version(2) >= 1) then // Source file
messagebox("Pulse Convolver: Conversion Failed. Script aborted", "","error","Abort");
else
buttondialog("Pulse Convolver: Conversion Failed. Script aborted", "Abort");
end
chdir(olddir);
abort;
end
fwvfrm = strcat([fileparts(ftrdata, "fname"), ".dat0"]);
//Extract frequency response from file
[t, D]=extract_from_PWL(fwvfrm);
//Revert to original directory
chdir(olddir);
///////////////////
// Run DFE
///////////////////
xinit();
plot2d(t, D, style=2);
xtitle("Pulse Response before DFE", "Time", "Voltage");
[t, D, opt_coeffs_out, prerr]= DFE_pr(t, D, coeffs_in, 125e-12, Dfe_alg_type);
///////////////////
// Create PWL
///////////////////
[fhandle, err]=mopen("impulse.inc", 'w');
mfprintf(fhandle, ".SUBCKT impulse_src Out Gnd_Src\n");
mfprintf(fhandle, "Vsrc Out Gnd_Src PWL (\n");
for i=1:length(t),
mfprintf(fhandle, "+ %0.6e %0.16e\n", t(i),D(i));
end
mfprintf(fhandle, ")\n");
mfprintf(fhandle, ".ENDS\n");
mclose(fhandle);
///////////////////
// Post REsults
///////////////////
xinit();
plot2d(t, D, style=2);
xtitle("Pulse Response after DFE", "Time", "Voltage");
//Post values of optimized coefficients
for i=1:length(opt_coeffs_out)
printf("\n*Optimized value for coefficient %d= %0.2f", i, opt_coeffs_out(i));
end
printf("\n*Pulse response residual error = %0.6f\n", prerr);
|
28ab66b4d641cc3dd366bbb25a765a9307251d78 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1026/CH8/EX8.4/Example8_4.sce | 0415b7c328328ec2bd92e025d763040c6ba52c70 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Example8_4.sce | //chapter8,Example8_4,pg 182
i=45*(%pi/180)
u=1.33
r=asin(sin(i)/u)
r=r*(180/%pi)
//for bright fringe 2*u*t*cos(r)=(2*n+1)(lam/2)
//for minimum thickness n=0
lam=5000*10^-8
t=lam/(4*u*cos(r))
printf("min. thickness of film\n")
disp(t) |
73bf59fc35ccacc514aa19c6b80833010fcea792 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1286/CH8/EX8.24/8_24.sce | 0f90acb9831956f315532cabd116785968c29721 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 243 | sce | 8_24.sce | clc
//initialisation of variables
T2=300///k
T1=900//k
T3=600//k
Q2=15000//k.cal
Q1=12000//k.cal
//CALCULATIONS
na=1-(T2/T1)
nb=1-(T2/T3)
w1=Q1*na
w2=Q2*nb
//results
printf(' \n w1= % 1f kcal',w1)
printf(' \n w2= % 1f kcal',w2)
|
70b65df81fef946a8387a7fe4017c789668aa240 | f6b3a0c494772f6ca78e2f620df06d393dafcc51 | /hemisphere.sce | fed5c69c994c7bf37ea5f8d553b9b015b02b79cf | [] | no_license | rishabhthecoder/scilab | f914595f7af9682a731f49fc1203925c9529297a | f0460b09d16d7349f408183d4089553360ca4ba5 | refs/heads/master | 2020-03-31T05:47:43.762852 | 2018-10-07T16:06:20 | 2018-10-07T16:06:20 | 151,958,910 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 163 | sce | hemisphere.sce | a =linspace(180,360,100);
th=linspace(-90,90,50);
R =5;
[A,Th]=meshgrid(a,th);
Z = R*sind(Th);
X = R*cosd(Th).*cosd(A);
Y = R*cosd(Th).*sind(A);
//clf
surf(Z,X,Y)
|
6d52b0c10f8d11c963c39f57942115f9794d1054 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.5/Unix-Windows/scilab-2.5/macros/util/mfile2sci.sci | a67b6d39161e66902a9a7ca7531cdd7bcf816c0e | [
"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 | 3,652 | sci | mfile2sci.sci | function mfile2sci(fil,res_path,Imode,Recmode)
// preforms translation of a single m-file
// Copyright INRIA
// default arguments
[lhs,rhs]=argn(0)
if rhs<4 then Recmode=%f,end
if rhs<3 then Imode=%f,end
if rhs<2 then res_path='./',end
if part(res_path,length(res_path))<>'/' then res_path=res_path+'/',end
// get context
if exists('m2scilib')==0 then load('SCI/macros/m2sci/lib'),end
global('m2sci_infos')
[l,mac]=where()
Reclevel=size(find(mac=='mfile2sci'),'*')
if Reclevel==1 then
nametbl=[]
else
m2sci_infos_save=m2sci_infos
end
m2sci_infos=[%f %f]
if exists('logfile')==0 then
logfile=%io(2) // logical unit of the logfile
end
// output "begin of translation" message
mss='------------'+part(' ',ones(1,3*Reclevel))+'begin of translation of '+fil+' -----------'
write(logfile,mss)
if logfile<>%io(2) then
write(%io(2),mss)
end
res=[]
// handle file path
k=strindex(fil,'.')
if k<>[]
ke=k($)-1
basename=part(fil,1:ke)
else
ke=length(fil)
basename=fil
end
k=strindex(fil,'/')
if k==[] then
file_path='./'
else
file_path=part(fil,1:k($))
end
if exists('Paths')==0 then
Paths=file_path,
if MSDOS then
mfiles=unix_g('dir /b '+Paths+'*.m')
sep='\'
else
mfiles=unix_g('ls '+Paths+'*.m')
sep='/'
end
end
fnam=part(basename,k($)+1:ke) // name of the file witout extension
// read in the file as text
txt=readmfile(fil)
txt=strsubst(txt,code2str(-40),' ')
if txt==[] then
write(logfile,'Empty file! nothing done'),
return,
end
// make minor changes on syntax
[helppart,txt]=m2sci_syntax(txt)
// write .cat file and update whatis
if helppart<>[] then
catfil=res_path+fnam+'.cat'
whsfil=res_path+'whatis'
u=file('open',catfil,'unknown')
write(u,helppart,'(a)')
file('close',u)
if exists('whsfil_unit')==1 then
write(whsfil_unit,stripblanks(helppart(1))+' |'+fnam,'(a)')
end
end
if txt==[] then return,end
killed=[];
quote='''';
dquote="""";
batch=%f
kc=strindex(txt(1),'function');kc=kc(1);
// define scilab function
deff(part(txt(1),kc+8:length(txt(1))),txt(2:$),'n')
w=who('get');mname=w(1);nametbl=[nametbl;mname]
if fnam<>mname then
mss=['Warning: file '+fil+' defines function '+mname+' instead of '+fnam;
' '+mname+'.sci, '+mname+'.cat and sci_'+mname+'.sci will be generated']
if logfile<>%io(2) then write(%io(2),mss,'(a)');end
if logfile>0 then write(logfile,mss,'(a)'),end
end
//prot=funcprot();funcprot(0);
execstr('comp('+mname+',1)')
// get its pseudo code
code=macr2lst(evstr(mname))
//funcprot(prot)
// perform the translation
[res,trad]=m2sci(code,w(1),Imode,Recmode)
//strip last return and blank lines
n=size(res,1)
while res(n)==part(' ',1:length(res(n))) then n=n-1,end
res=res(1:n-1)
ext='.sci'
// write sci-file
scifil=res_path+fnam+ext
u=file('open',scifil,'unknown')
write(u,res,'(a)')
file('close',u)
// write sci_* translation file
if trad<>[] then
sci_fil=res_path+'sci_'+mname+'.sci'
u=file('open',sci_fil,'unknown')
write(u,trad,'(a)')
file('close',u)
end
// output summary information
infos=[]
if m2sci_infos(1)&~m2sci_infos(2) then
infos='Translation may be improved (see the //! comments)'
elseif m2sci_infos(1)&m2sci_infos(2) then
infos='Translation may be wrong (see the //!! comments) or improved see the (//! comments)'
elseif ~m2sci_infos(1)&m2sci_infos(2) then
infos='Translation may be wrong (see the //!! comments)'
end
mss='------------'+part(' ',ones(1,3*Reclevel))+'end of translation of '+fil+' -----------'
write(logfile,[infos;mss])
if logfile<>%io(2) then
write(%io(2),[infos;mss])
end
if Reclevel>1 then
m2sci_infos=m2sci_infos_save
end
nametbl($)=[]
nametbl=resume(nametbl)
|
673804fc110ee9c31b6836866410e697e0826a33 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3754/CH3/EX3.31/3_31.sce | 7121fac8550654b5440c6369eef0b3b701fd7a96 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 281 | sce | 3_31.sce | clear//
//Variables
R = 750.0 //Resistance (in ohm)
I = 32.0 //Current (in milliAmpere)
//Calculation
P = I**2 * 10**-6 * R //Power (in watt)
//Result
printf("\n Power consumed by relay coil is %0.3f mW.",P*1000)
|
59ce0a681b7270a6ff3549913fb006542d187670 | 449d555969bfd7befe906877abab098c6e63a0e8 | /50/DEPENDENCIES/simpson38.sci | ca057dfa7aa34662b65f92c52771c1b9a24793f5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 957 | sci | simpson38.sci | function [I] = simpson38(x,f)
//This function calculates the numerical integration of f(x)dx
//between limits x(1) and x(n) using Simpson's 3/8 rule
//Check that x and f have the same size (which must be of the form 3*i+1,
//where i is an integer number)
//Also, the values of x must be equally spaced with spacing h
y=feval(x,f);
[nrx,ncx]=size(x)
[nrf,ncf]=size(y)
if ((nrx<>1)|(nrf<>1)) then
error('x or f, or both, not column vector(s)');
abort;
end;
if ((ncx<>ncf)) then
error('x and f are not of the same length');
abort;
end;
//check that the size of the lists xL and f is odd
if (modulo(ncx-1,3)<>0) then
disp(ncx,"list size =")
error('list size must be of the form 3*i+1, where i=integer');
abort
end;
n = ncx;
xdiff = mtlb_diff(x);
h = xdiff(1,1);
I = f(x(1)) + f(x(n));
for j = 2:n-1
if(modulo(j-1,3)==0) then
I = I + 2*f(x(j));
else
I = I + 3*f(x(j));
end;
end;
I = (3.0/8.0)*h*I
endfunction
|
92f8977c51d15f4a9a8d62a455a74bddf70a0fba | e02aa9695b075784e5d6aba93cab02d1864f1039 | /Analyse/TP1/carre.sce | b9127fd69f69d66325418735e16329890475e705 | [] | no_license | michelprojets/Ensimag1 | 1a4cf84203f0e63a71ece278bf364d32d2219825 | b9ed4a050c7c548781a9e26d99747e8883c5c1f5 | refs/heads/master | 2021-09-13T15:47:16.632446 | 2018-05-01T18:17:26 | 2018-05-01T18:17:26 | 103,514,194 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 66 | sce | carre.sce | //fonction carre
function d = carre(x)
d = x .* x
endfunction
|
d5d45f86e747b4b01e10c1e4b8e69b27c50d260e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2681/CH8/EX8.18/Ex8_18.sce | 3153e4259b832e3d66ea4c4951fa877b89d25fc4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex8_18.sce | //power gain of square horn antenna
//given
clc
lemda=1//as value of lemda do not affect the expression
for(lemda!=0)
d=10*lemda // dimentions
W=10*lemda//dimentions
gp=4.5*W*d/lemda^2//power gain
gp_decibles=10*log10(gp)//changing to decibles
end
gp_decibles=round(gp_decibles*1000)/1000///rounding off decimals
disp(gp_decibles,'the power gain in decibles')//decibles
|
9fe90e786d2da6ab3a993409cfb010f6f8122267 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2534/CH6/EX6.10/Ex6_10.sce | 8a91fdd9219dc831385f317655fce753d0ffb505 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 206 | sce | Ex6_10.sce | //Ex6_10
clc
ic = 2.5*10^-3
ib = 50*10^-6
disp("ib = "+string(ib)+"A")//base current
disp("ic = "+string(ic)+"A")//collector current
beta = ic/ib
disp("beta = ic/ib = "+string(beta))//current gain
|
08207aa008e36b3971c5c05137af9edf65fe7788 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3472/CH9/EX9.2/Example9_2.sce | af7bf6c61939286ad9d6421adf7997e99a7e61e7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,023 | sce | Example9_2.sce | // A Texbook on POWER SYSTEM ENGINEERING
// A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar
// DHANPAT RAI & Co.
// SECOND EDITION
// PART II : TRANSMISSION AND DISTRIBUTION
// CHAPTER 2: CONSTANTS OF OVERHEAD TRANSMISSION LINES
// EXAMPLE : 2.2 :
// Page number 101
clear ; clc ; close ; // Clear the work space and console
// Given data
l = 100.0 // Length of 3-phase transmission line(km)
D = 120.0 // Distance between conductors(cm)
d = 0.5 // Diameter of conductor(cm)
// Calculations
r_GMR = 0.7788*d/2.0 // GMR of conductor(cm)
L = 2.0*10**-4*log(D/r_GMR) // Inductance per phase(H/km)
L_l = L*l // Inductance per phase for 100km length(H)
// Results
disp("PART II - EXAMPLE : 2.2 : SOLUTION :-")
printf("\nInductance per phase of the system, L = %.4f H \n", L_l)
printf("\nNOTE: ERROR: In textbook to calculate L, log10 is used instead of ln i.e natural logarithm. So, there is change in answer")
|
e3c792f330730695b8835d52c04ac0079d71f633 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2024/CH5/EX5.5/5_5.sce | 1f154b8a42134d503ff1d21d4e4266665fa0b1d3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 206 | sce | 5_5.sce | clc
//Initialization of variables
cp=0.25
T1=3460 //R
T2=520 //R
//calculations
Q=cp*(T2-T1)
ds=cp*log(T2/T1)
G= Q - T2*ds
eta= G/Q
//results
printf("Thermal efficiency = %.1f percent",eta*100)
|
1156c550c00bbce9a1c4a2501382ce6efb8373b7 | a5f0fbcba032f945a9ee629716f6487647cafd5f | /Machine_cloud/tests/RunDemos.sce | 2758e913ef323367f6da118ff90225acc3e4bbe9 | [
"BSD-2-Clause"
] | permissive | SoumitraAgarwal/Scilab-gsoc | 692c00e3fb7a5faf65082e6c23765620f4ecdf35 | 678e8f80c8a03ef0b9f4c1173bdda7f3e16d716f | refs/heads/master | 2021-04-15T17:55:48.334164 | 2018-08-07T13:43:26 | 2018-08-07T13:43:26 | 126,500,126 | 1 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 294 | sce | RunDemos.sce | getd('../macros')
scripts = listfiles('../demos')
numfiles = size(scripts)
for i = 1:numfiles(1)
script = scripts(i);
disp('Running ' + string(i) + ' of ' + string(numfiles(1)) + ' : ' + script)
if(strcmp('Datasets', script) ~= 0)
exec('../demos/' + script, -1)
end
disp('Complete')
end |
dea2a866d420c8c288a297b448c4697f89fd1040 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/1.1/Unix/scilab-1.1/macros/metanet/g_ntype.sci | 68b1b1c3a010cc7c80e0a552c136e2819ff9ff63 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] | 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 | 76 | sci | g_ntype.sci | function n=g_ntype(g)
[lhs,rhs]=argn(0), if rhs=0 then g=the_g, end
n=g(15)
|
45bce1805cccfffb3e26ed551a4d0c79cc18bfd8 | 717ddeb7e700373742c617a95e25a2376565112c | /1301/CH5/EX5.20/ex5_20.sce | 691351143d3ecc28c54ee7cf875dec74aa66be8e | [] | 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 | 243 | sce | ex5_20.sce | clc;
P=10^8; //power in Watt
t=60*60*24; //t in seconds for 1 day
E=P*t; //calculating energy in Joule using E=P*t
m=E/(c*c); //calculating m in kg using Einstein's equation:E=m*c*c
disp(m,"Mass in kg = "); //displaying result |
5774774108b9d729a16f2e67f2552d693556ea0d | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.4.1/macros/elem/cotg.sci | 2da3f7f7e8a5ec21a92508791dd67d3277621274 | [
"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 | 121 | sci | cotg.sci | function t=cotg(x)
//Eelemt wise cotangent of x
// Copyright INRIA
if type(x)<>1 then error(53),end
t=sin(x).\cos(x)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.