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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9c663b432ca79bbae1dc617a432d2036c9094fac | cede801b0b2a0e368ebefd69dc10f5e5e897c4ec | /legal_moves.tst | 7ec7cac702d3d69820ab580340671f9547161e17 | [
"MIT"
] | permissive | tchell/cmput496-assignment1-tests | 414486e70bcb6770369d72c6edfe6b1ec4cd23f0 | 74ce65863b5963d137ec092a552aadb880bced42 | refs/heads/master | 2020-04-17T16:09:17.629016 | 2019-01-28T05:23:18 | 2019-01-28T05:23:18 | 166,728,639 | 0 | 2 | null | null | null | null | UTF-8 | Scilab | false | false | 473 | tst | legal_moves.tst | # Use this file to test your implementation of the gogui-rules_legal_moves
# command.
boardsize 3
clear_board
1 gogui-rules_legal_moves
#?[a1 a2 a3 b1 b2 b3 c1 c2 c3]
play b a1
play b a2
play b a3
play b b1
play b b2
play b b3
2 gogui-rules_legal_moves
#?[c1 c2 c3]
play w c1
play w c2
play w c3
# if board is full
3 gogui-rules_legal_moves
#?[]
boardsize 5
clear_board
play b a1
play b b1
play b c1
play b d1
play b e1
# if somebody has won
4 gogui-rules_legal_moves
#?[]
|
b42c1b467a78909888dcf7514e799a18539ba822 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1775/CH4/EX4.4/Chapter4_Example4.sce | a0ca9dec82d430763afafccd9876bea68b394e8e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,147 | sce | Chapter4_Example4.sce | //Chapter-4, Illustration 4, Page 165
//Title: Steam Nozzles and Steam Turbines
//=============================================================================
clc
clear
//INPUT DATA
P1=2.2;//Pressure at entry in MN/(m^2)
T1=533;//Temperature at entry in K
P2=0.4;//Pressure at exit in MN/(m^2)
m=11;//mass flow rate of steam in kg/s
n=0.85;//Efficiency of expansion
h1=2940;//Enthalpy at entrance in kJ/kg from Moiller chart
ht=2790;//Enthalpy at throat in kJ/kg from Moiller chart
h2s=2590;//Enthalpy below exit level in kJ/kg from Moiller chart
vt=0.16;//Throat volume in (m^3)/kg
v2=0.44;//Volume at exit in (m^3)/kg
//CALCULATIONS
Ct=(2000*(h1-ht))^0.5;//Throat velocity in m/s
h2=ht-(0.85*(ht-h2s));//Enthalpy at exit in kJ/kg
C2=(2000*(h1-h2))^0.5;//Exit velocity in m/s
At=((m*vt)/Ct)*(10^6);//Area of throat in (mm^2)
A2=((m*v2)/C2)*(10^6);//Area of exit in (mm^2)
//OUTPUT
mprintf('Throat velocity is %3.0f m/s \n Exit velocity is %3.0f m/s \n Throat area is %3.0f (mm^2) \n Exit area is %3.0f (mm^2) \n',Ct,C2,At,A2)
//==============================END OF PROGRAM=================================
|
c4cdb01ba4d0a152c22d01ff3730a9ef5df838e5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /260/CH1/EX1.6/1_06.sce | cf402cab5577afc9a85351c9073021324f7bdd1e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 125 | sce | 1_06.sce | //Example 1.6
//Pg No. 18
choice = 'a'
while choice ~= 'T'
choice = input('Type T and press enter to terminate')
end |
a711848c6f32b9db13999266f94c3aa47ffa3c20 | 63d888492eb5760997d28f7e464620ab560589cc | /DataStoreTest/Src/C#/Level_4B/Level_4B/DataStore.tst | f7548f207d5d0a26071d06d7edf20fcc265b5a80 | [] | no_license | Samraksh/TestSuite | ef4ea58b7bf844d6263d52ad2a4fe2d91852bf48 | 5a2ad0157ff878e9460fc85d222191ce7dcd595f | refs/heads/master | 2022-10-28T22:51:33.354774 | 2020-03-10T18:29:06 | 2020-03-10T18:29:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 149 | tst | DataStore.tst | COM_receive file enable testTemp\test_results.txt
sleep 10000
COM_send string start
sleep 500000
COM_receive file disable testTemp\test_results.txt
|
6da275de81f5b4a5768607fa43242630539871f6 | ebfed86dee276110294a4e93fa80377908bbd317 | /macros/imhmin.sci | 6e22e081e536295ebe737c9d0ce3097cbed90d56 | [] | no_license | gursimarsingh/FOSSEE-Image-Processing-Toolbox | a9d46b698c98566fec867eb2ce3cfeb427058d5c | 165f6d7d1f20262a1637a923c6aad6e663ad1538 | refs/heads/master | 2021-08-16T19:18:59.591175 | 2017-11-08T17:55:04 | 2017-11-08T17:55:04 | 96,531,802 | 0 | 0 | null | 2017-07-07T11:21:10 | 2017-07-07T11:21:10 | null | UTF-8 | Scilab | false | false | 1,662 | sci | imhmin.sci | // Copyright (C) 2015 - IIT Bombay - FOSSEE
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Author: Vinay Bhat,Gursimar Singh
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
function [dstMat] = imhmin(srcImg, Hmin)
// This fucntion is used to get H-minima transform in the form of an image.
//
// Calling Sequence
// I2 = imhmin(I,h)
//
// Parameters
// I: image matrix of the source image.
// h: h-maxima transform, specified as a nonnegative scalar.
// I2: Transformed image, returned as a nonsparse numeric array of any class, the same size as I.
//
// Description
// I2 = imhmin(I,h) suppresses all minima in the intensity image I whose depth is less than h, where h is a scalar. Regional minima are connected components of pixels with a constant intensity value, t, whose external boundary pixels all have a value greater than t
//
// Examples
// i = imread('images/lena.jpeg');
// i2 = imhmin(i,200);
// imshow(i2);
//
//Authors
//Vinay Bhat
//Gursimar Singh
//
//See also
//imhmax
//imhistmax
[lhs, rhs] = argn(0);
if rhs>2 then
error(msprintf("Too many input arguments"));
end
if rhs<2 then
error(msprintf("Not enough input arguments"));
end
if lhs >1
error(msprintf("Too many output arguments"));
end
srcMat = mattolist(srcImg)
out = raw_imhmin(srcMat, Hmin)
channel = size(out)
for i = 1: channel
dstMat(:,:,i) = out(i)
end
endfunction
|
a1d02c0934e61fc11e76f17a01032c524b84b665 | 449d555969bfd7befe906877abab098c6e63a0e8 | /401/CH14/EX14.4/Example14_4.sce | 38cac7c7b46d59581e14459668b2a703ad97982c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 616 | sce | Example14_4.sce | //Example 14.4
//Program to calculate:
//(a)3 dB Pulse Broadening in ns/km
//(b)Fiber Bandwidth-Length product
clear;
clc ;
close ;
//Given data
tau_o=12.6; //ns - 3 dB width of Output Pulse
tau_i=0.3; //ns - 3 dB width of Input Pulse
L=1.2; //km - LENGTH
//(a)3 dB Pulse Broadening in ns/km
tau=sqrt(tau_o^2-tau_i^2)/L;
//(b)Fiber Bandwidth-Length product
Bopt=0.44/tau;
//Displaying the Results in Command Window
printf("\n\n\t (a)3 dB Pulse Broadening is %0.1f ns/km.",tau);
printf("\n\n\t (b)Fiber Bandwidth-Length product is %0.1f MHz km.",Bopt*10^3); |
420db514ebc1761f198f3a6a758294822163899e | 449d555969bfd7befe906877abab098c6e63a0e8 | /534/CH8/EX8.4/8_4_Solar_Energy.sce | 2dae80a474dfb313eaa6604ab49ac4461f483c5c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,182 | sce | 8_4_Solar_Energy.sce | clear;
clc;
printf('FUNDAMENTALS OF HEAT AND MASS TRANSFER \n Incropera / Dewitt / Bergman / Lavine \n EXAMPLE 8.4 Page 506 \n'); //Example 8.4
// Length of tube for required heating
// Surface temperature Ts at outlet section
//Operating Conditions
m = .01; //[kg/s] mass flow rate of water
Ti = 20+273; //[K] Inlet temp
To = 80+273; //[K] Outlet temperature
D = .06; //[m] Diameter
q = 2000; //[W/m^2] Heat flux to fluid
//Table A.4 Air Properties T = 323 K
cp = 4178; //[J/kg.K] specific heat
//Table A.4 Air Properties T = 353 K
k = .670; //[W/m] Thermal Conductivity
u = 352*10^-6; //[N.s/m^2] Viscosity
Pr = 2.2; //Prandtl Number
cp = 4178; //[J/kg.K] specific heat
L = m*cp*(To-Ti)/(%pi*D*q);
//Using equation 8.6
Re = m*4/(%pi*D*u);
printf("\n (a) Length of tube for required heating = %.2f m\n\n (b)As Reynolds Number is %i. The flow is laminar.",L,Re);
Nu = 4.364; //Nusselt Number
h = Nu*k/D; //[W/m^2.K] Heat convection Coefficient
Ts = q/h+To; //[K]
printf("\n Surface Temperature at tube outlet = %i degC",Ts-273);
//END |
ecd74630d655a9b212037a29e7e03ef3b0e32abc | 449d555969bfd7befe906877abab098c6e63a0e8 | /845/CH6/EX6.17/Ex6_17.sce | b3a35ca0830d41b4b4e7e97435c24e3451fb5d9f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex6_17.sce | //Example 6.17
clc
clear
x = [0 1 4];
y = [2 1 4];
n = length(x);
del = %nan*ones(n,3);
del(:,1) = y';
for j = 2:3
for i = 1:n-j+1
del(i,j) = (del(i+1,j-1) - del(i,j-1)) / (x(i+j-1) - x(i));
end
end
del(:,1) = [];
Y = 0;
X = 2;
for i = 1:n
t = x;
t(i) = [];
p = 1;
for j = 1:length(t)
p = p * (X-t(j))/(x(i)-t(j));
end
Y = Y + p*y(i);
end
disp(Y,"y(2) = ")
|
875c3549d76398d66e2ca36dc2fae4b62438d4d9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2132/CH2/EX2.4/Example2_4.sce | 3d692e27ed1501caaa9d7935258a3b4439f20b31 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 254 | sce | Example2_4.sce | //Example 2.4
clc;
clear;
close;
//Given data :
A=0.2;//m^2
dy=0.02/100;//m
du=20/100;//cm/s
mu=0.001;//Ns/m^2
tau=mu*du/dy;//in N/m^2
F=tau*A;//N
disp(F,"Force required in N : ");
Power=F*du;//Watts
disp(Power,"Power required in W : ");
|
3e2f856b92d688ac7a574f2a0c7321dcff2b9422 | 449d555969bfd7befe906877abab098c6e63a0e8 | /154/DEPENDENCIES/ch7_23.sce | 2109c678aa8a41d85f16ba71c9204feb7eaa748a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 481 | sce | ch7_23.sce | clc
disp("Example 7.23")
printf("\n")
//Sketch voltage 'v'
t=-.001:0.00005:0
t1=0:0.00005:.001
T=1*10^-3;
V0=10;
v=V0*exp(t/T)
v1=V0*exp(-t1/T)
figure
a= gca ();
plot(t,v)
plot(t1,v1)
xtitle ('v vs t','t (ms)','v ');
a. thickness = 2;
//Sketch current 'i'
t=-.001:0.00005:0
t1=0:0.00005:.001
T=1*10^-3;
I0=10*10^-3;
i=I0*exp(t/T)
i1=-I0*exp(-t1/T)
figure
a= gca ();
plot(t,i)
plot(t1,i1)
xtitle ('i vs wt','t (ms)','i (mA)');
a. thickness = 2;
|
8c6712215daad3ddfbfd47c7d0cf6242b96b91c4 | 3cbee2296fd6b54f80587eead83813d4c878e06a | /sci2blif/sci2blif_added_blocks/speech.sce | 2a243ffd6531a79c1b23a9b713b48f09e917f3c7 | [] | no_license | nikhil-soraba/rasp30 | 872afa4ad0820b8ca3ea4f232c4168193acbd854 | 936c6438de595f9ac30d5619a887419c5bae2b0f | refs/heads/master | 2021-01-12T15:19:09.899590 | 2016-10-31T03:23:48 | 2016-10-31T03:23:48 | 71,756,442 | 0 | 0 | null | 2016-10-24T05:58:57 | 2016-10-24T05:58:56 | null | UTF-8 | Scilab | false | false | 1,197 | sce | speech.sce | //**************************** Speech **********************************
if (blk_name.entries(bl) =='speech') then
addvmm = %t;
mputl("# speech",fd_w);
for ss=1:scs_m.objs(bl).model.ipar(1)
speech_str= '.subckt speech in[0]=net' + string(blk(blk_objs(bl),2))+"_1 in[1]=net"+string(blk(blk_objs(bl),3))+"_1 in[2]=vcc out[0]=net'+ string(blk(blk_objs(bl),2+numofip))+"_" + string(ss)+" out[1]=net'+ string(blk(blk_objs(bl),3+numofip))+"_" + string(ss)+" #c4_ota_bias[0] =" +string(sprintf('%1.3e',scs_m.objs(blk_objs(bl)).model.rpar(2*ss-1)))+"&c4_ota_bias[1] =" +string(sprintf('%1.3e',scs_m.objs(blk_objs(bl)).model.rpar(2*ss)))+"&speech_fg[0] =0&c4_ota_p_bias[0] =105e-9&c4_ota_n_bias[0] =105e-9&c4_ota_p_bias[1] =105e-9&c4_ota_n_bias[1] =105e-9&speech_peakotabias[0] =100e-9&speech_pfetbias[0] =2e-11&speech_peakotabias[1] =9e-10";
mputl(speech_str,fd_w);
mputl(" ",fd_w);
select board_num
case 2 then plcloc=[plcloc;'net'+string(blk(blk_objs(bl),2+numofip))+'_'+ string(ss),'6 '+string(ss)+' 0'];
case 3 then plcloc=[plcloc;'net'+string(blk(blk_objs(bl),2+numofip))+'_'+ string(ss),'1 '+string(ss)+' 0'];
end
end
end
|
b396759571aa9e539770d6ef3a7304c99a6d7109 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3764/CH3/EX3.9/Ex3_9.sce | 061d048aeee10802a422fd6bafabf40b90a72ba4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,502 | sce | Ex3_9.sce | clc
//
//Bar with Square Cross Section
//Variable declaration
tALL=40 // Stress(MPa)
//Calculation
// Bar with square cross section
a=0.040 // Length(m)
b=0.040 // Length(m)
temp=(a/b)
c1=0.208 // Coefficient
tmax=tALL // Maximum stress(MPa)
T1=(40)*((10**6))*(0.208)*((0.040**3)) // Torque(N.m)
// Bar with Rectangular Cross Section.
a=0.064 // Length(m)
b=0.025 // Length(m)
temp2=(a/b)
T2=(40)*((10**6))*(0.259)*(0.064)*((0.025**2)) // Torque(N.m)
//Square Tube
A=(0.034)*(0.034) // Area bounded by the center line of the cross section(m**2)
T3=((40)*((10**6))*(2)*(0.006)*(1.156)*((10**-3))**0) // Torque(N.m)
// Result
printf("\n Largest torque on bar with square cross section = %1f N.m' ,T1)
printf("\n Largest torque on bar with rectangular cross section = %1f N.m' ,T2)
printf("\n Largest torque on square tube = %1f N.m' ,T3)
|
bc8b1faa8a0725e2687b3bc9d798f52860da56a6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /275/CH8/EX8.8.49a/Ch8_8_49a.sce | 95fe639c737f7dad9c06155c5927702fcb35dba6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 558 | sce | Ch8_8_49a.sce | clc
clear
disp("Example 8.49a")
printf("\n")
disp("Prove the following boolean identities")
disp("A+BC=(A+B)(A+C)")
A=[0 0 0 0 1 1 1 1]
B=[0 0 1 1 0 0 1 1]
C=[0 1 0 1 0 1 0 1]
for i=1:length(A)
Y(i)=A(i)+(B(i)*C(i))
if(Y(i)==2)
Y(i)=1
end
end
for i=1:length(A)
Z(i)=(A(i)+B(i))*(A(i)+C(i))
if(Z(i)==2)
Z(i)=1
end
if(Z(i)==3)
Z(i)=1
end
if(Z(i)==4)
Z(i)=1
end
end
for i=1:length(A)
if(Z(i)==Y(i))
printf("_")
else
printf("NOT")
abort
end
end
printf("proved")
|
76ebcdc5529622661115773fd4f73c99f7a83592 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1760/CH2/EX2.74/EX2_74.sce | 2ac6c44c33b73d8ae09788b1918c64c33d40836a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 667 | sce | EX2_74.sce | //EXAMPLE 2-74 PG NO-112
ZA=10+%i*7.226; //IMPEDANCE
ZB=5+%i*10.99; //IMPEDANCE
V=200+%i*0; //VOLTAGE
IA=V/ZA; //CURRENT
disp('i) CURRENT (IA) is in polar form = '+string (IA) +' A ');
IB=V/ZB;
disp('ii) CURRENT (IB) is in polar form = '+string (IB) +' A ');
I=IA+IB;
disp('iii) CURRENT (I) is in polar form = '+string (I) +' A ');
S=V*I;
disp('i) Apparent Power (S) is = '+string (S) +' VA ');
P=V*I*0.63;
disp('i) Active Power (P) is = '+string (P) +' W ');
Q=V*I*0.775;
disp('i) Reactive Power (Q) is = '+string (Q) +' Var ');
|
5f98a9b615f3754388e724e67d4b7460ca43e0b8 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.4.1/Unix-Windows/scilab-2.4.1/macros/mtlb/mtlb_fwrite.sci | 2bb81825135f5c35366a99ad147c273d049841a5 | [
"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 | 1,141 | sci | mtlb_fwrite.sci | function count=mtlb_fwrite(fid,a,prec)
prectbl=['c' 'char' 'char'
'?' 'schar' 'signed char'
's' 'short' 'short'
'l' 'int' 'int'
'l' 'long' 'long'
'f' 'float' 'float'
'd' 'double' 'double'
'uc' 'uchar' 'unsigned char'
'us' 'ushort' 'unsigned short'
'ul' 'uint' 'unsigned int'
'ul' 'ulong' 'unsigned long'
'c' 'char' 'char*1'
'f' 'float32' 'real*4'
'd' 'float64' 'real*8'
'c' 'int8' 'integer*1'
's' 'int16' 'integer*2'
'l' 'int32' 'integer*4'
'?' '' 'integer*8'
'?' 'intN' ''
'?' 'uintN' '' ]
[lhs,rhs]=argn(0)
if rhs<3 then prec='uchar';end
[l,k]=find(prec==prectbl)
if l==[] then
error('The format:'+prec+' is unknown')
end
Prec=prectbl(l,1)
if Prec=='?' then
error('The format:'+prec+' is not yet handled')
end
mput(size(a,'*'),Prec,fid)
count=size(a,'*')
|
37e3775e1130237473a838bb1cfbf264e93f54a5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1627/CH5/EX5.6/Ex5_6.sce | 3d5d7308e9cd7b7574b809038ff80773c2449ff6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 320 | sce | Ex5_6.sce | clc
//initialisation of variables
m=27*10^-3//N.s/m^2
sg=0.90
m1=27//cp
v1=5.6*10^-4//lbf.sec/ft^2
v2=2.5*10^-2//m
y=9802//N/m^3
g=9.8//m/s^2
Nr=4000
Nr1=2000
//CALCULATIONS
P=(y*sg)/g//N.s^2/m^4
V1=(Nr*m)/(v2*P)//m/s
V2=(Nr1*m)/(v2*P)//m/s
//RESULTS
printf('The critical velocity range is=% f m/s',V2)
|
fadb1686e4c6b2681e2f237ca04619609ebd127a | 449d555969bfd7befe906877abab098c6e63a0e8 | /557/CH3/EX3.3/3.sce | d119bc2f5a34878875d4c12e7d79dbc6e54da1cf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 579 | sce | 3.sce | clc;funcprot(0);
//Example 3.3
//Initializing the variables
D = 1.8; //Depth of tank
h = 1.2; //Depth of water
l = 3; //Length of wall of tank
p = 35000; //Air pressure
rho = 10^3; //Density of water
g = 9.81; //Acceleration due to gravity
//Calculations
Ra = p*D*l; //Force due to air
Rw = .5*(rho*g*h)*h*l; //Force due to water
R = Ra + Rw; // Resultant force
x = (Ra*0.9+Rw*0.4)/R; // Height of center of pressure from base
disp(x,"Height of the centre of pressure above the base(m) :",R/1000,"Resultant force on the wall(kN)"); |
74bf69be493cd4afd3278ab404fc0446c720ae97 | 449d555969bfd7befe906877abab098c6e63a0e8 | /770/CH1/EX1.8/1_8.sce | 2f602ba7cd6ac971e4e805b65bf7cbc10a396084 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,725 | sce | 1_8.sce | clear;
clc;
//Example - 1.8
//Page number - 24
printf("Example - 1.8 and Page number - 24\n\n");
// Given
V = 10;// [m^(3)] - volume of vessel
P_1 = 1;// [bar] - initial pressure
V_liq_sat = 0.05;// [m^(3)] - saturated liquid volume
V_gas_sat = 9.95;// [m^(3)] - saturated vapour volume
//At 1 bar pressure
V_liq_1 = 0.001043;// [m^(3/kg)] - specific saturated liquid volume
U_liq_1 = 417.33;// [kJ/kg] - specific internal energy
V_gas_1 = 1.69400;// [m^(3/kg)] - specific saturated vapour volume
U_gas_1 = 2506.06;// [kJ/kg]
M_liq_1 = V_liq_sat/V_liq_1;// [kg] - mass of saturated liqid
M_gas_1 = V_gas_sat/V_gas_1;// [kg] - mass of saturated vapour
M = (M_liq_1+M_gas_1);// [kg] - total mass
U_1t = (M_liq_1*U_liq_1)+(M_gas_1*U_gas_1);// [kJ] - initial internal energy
V_gas_2 = (V/M);//[m^(3/kg)]
//from steam table at 10 bar pressure as reported in the book
V_vap_2 = 0.19444;// [m^(3/kg)]
U_vap_2 = 2583.64;// [kJ/kg]
//from steam table at 11 bar pressure as reported in the book
V_vap_3 = 0.17753;//[m^(3/kg)]
U_vap_3 = 2586.40;//[kJ/kg]
//Now computing pressure when molar volume of saturated vapour=Vg_2
//By interpolation (P2-10)/(11-10)=(Vg_2-Vv_2)/(Vv_3-Vv_2)
P_2 = (((V_gas_2 - V_vap_2)/(V_vap_3 - V_vap_2)*1)+10);// [bar] - final pressure
//By interpolation calculating internal energy at state 2
//(P2-10)/(11-10)=(U2-Uv_2)/(Uv_3-Uv_2)
U_2 = (((P_2-10)/(11-10))*(U_vap_3 - U_vap_2))+U_vap_2;//[kJ/kg]
U_2t = U_2*M;//[kJ]
H = U_2t - U_1t;//[kJ] - Heat supplied
H = H/1000;//[MJ]
printf(" Total heat supplied is %f MJ',H);
// since volume is constant,no work is done by the system and heat supplied is used in increasing the internal energy of the system.
|
2cdbb9f1afaf1d419f6c70f31d8ca56c51b53a0b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2780/CH2/EX2.25/Ex2_25.sce | 657da51b24ca6729e1b1e79fea7ae88c1cb57e3c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 319 | sce | Ex2_25.sce | clc
//to calculate radius of curvature
lambda=5900*10^-10 //wavelength in m
n=10
Dn=5*10^-3 // diameter of 10th dark ring in m
R=Dn^2/(4*n*lambda)
disp("the radius of curvature of the lens is R="+string(R)+"m")
//to calculate thichness
t=n*lambda/2
disp("the thickness of the air film is t="+string(t)+"m")
|
55758e9507e32c890e29f91366f6cd2fe59975a1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1943/CH1/EX1.12/Ex1_12.sce | 483b99e8f25d6f094a16a6822a909a8407a91326 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 423 | sce | Ex1_12.sce |
clc
clear
//Input data
CC=(80*10^6)//Capital cost in Rs
L=30//Useful life in years
S=5//Salvage value of the capital cost in percent
i=0.06//Yearly rate of compound interest
//Calculations
A=((100-S)/100)*CC//Difference of capital cost and salvage value in Rs
P=((A*i)/((1+i)^L-1))//The amount of money to be saved annually in Rs
//Output
printf('The amount of money to be saved annually is Rs.%3.0f/-',P)
|
cc24f3b04110bb924814c55896dfac9d1745025d | 449d555969bfd7befe906877abab098c6e63a0e8 | /626/CH4/EX4.17/4_17.sce | fc898b35b121eba8e335d4a70a7dc66f9504ce40 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,678 | sce | 4_17.sce | clear;
clc;
close;
disp("Example 4.17")
M0=0.7 //Mach no.
T0=228 // in K
p0=16 //kPa
eprop=0.85 // prop efficiency
m=10 //Kg/s
pd=0.98 //diffuser pressure ratio
pc=30 //compressor pressurer ratio
ec=0.92 //thermal efficiency of compressor
Tt4=1600 //in K
Qr=42000000 //in kJ/kg
eb=0.99 //thermal efficiency of burner
pb=0.96 //burner pressure ratio
etHPT=0.82
emHPT=0.99
alfa=0.85
emLPT=0.99
eLPT=0.88
egb=0.995
en=0.95
gmc=1.4 //gamma of compressor
Cpc=1004 // in J/kg.K
gmt=1.33 //gamma of turbine
Cpt=1152 // in J/kg.K
Tt0=T0*(1+((gmc-1)*(M0)^2)/2)
pt0=p0*(1+((gmc-1)*(M0)^2)/2)^(gmc/(gmc-1))
a0=((gmc-1)*Cpc*T0)^(1/2);
V0=a0*M0
pt2=pt0*pd
Tt2=Tt0 //Adiabatic
pt3=pt2*pc
tc=pc^((gmc-1)/(ec*gmc))
Tt3=Tt2*tc
f=(Cpt*Tt4-Cpc*Tt3)/(Qr*eb-Cpt*Tt4)
pt4=pt3*pb
ht45=Cpt*Tt4-(Cpc*Tt3-Cpc*Tt2)/((1+f)*emHPT)
Tt45=ht45/Cpt
pt45=pt4*(Tt45/Tt4)^(gmt/((gmt-1)*etHPT))
m9=(1+f)*m
sp=(1+f)*m*eLPT*alfa*ht45*(1-(p0/pt45)^((gmt-1)/gmt))/10^6
Tt5=(ht45-sp*10^6/((1+f)*m))/Cpt
tt=Tt5/Tt45
et=log(tt)/(log(1-((1-tt)/eLPT)))
pt=tt^(gmt/(et*(gmt-1)))
pt5=pt45*pt
p9=p0 //assumption
pi=p9/pt5
ti=pi^((gmt-1)/gmt)
T9i=Tt5*ti
T9=Tt5-en*(Tt5-T9i)
V9=(2*Cpt*(Tt5-T9))^(1/2)
Fprop=eprop*egb*emLPT*sp*10^3/V0
a9=((gmt-1)*Cpt*T9)^(1/2)
M9=V9/a9
pt9=p9*(1+((gmt-1)*M9^2)/2)^(gmt/(gmt-1))
pn=pt9/pt5
Fncore=m*((1+f)*V9-V0)/1000
spp=egb*emLPT*sp
Ft=Fprop+Fncore
mp=((m9*V9^2)/2-m*(V0^2)/2)/10^3
mf=m9-m
PSFC=mf*10^6/((spp*10^3)+mp)
TSFC=mf*10^3/(Ft)
eth=(spp*10^3+mp)*10^3/(mf*Qr)
ep=(Ft*V0)/(spp*10^3+mp)
eo=eth*ep
disp("a(1)Total pressures throughout the engine in kPa:")
disp(pt0,"Total pressure of flight:")
disp(pt2,"Total pressure at engine face:")
//disp(p19,"Static pressure at nozzle exit:")
disp(pt3,"Total pressure at compressor exit:")
disp(pt4,"Total pressure at burner exit:")
disp(pt45,"Total pressure across HPT :")
disp(pt5,"Total pressure at turbine exit:")
disp(pt9,"Total pressure at nozzle exit:")
disp("a(2)Total temperatures across the engine in K:")
disp(Tt0,"Total temperature of flight:")
disp(Tt2,"Total temperature at engine face:") //Tt0=Tt2, since adiabatic!
disp(Tt3,"Total temperature at compressor exit:")
disp(Tt4,"Total temperature at burner exit:")
disp(Tt45,"Total temperature across HPT :")
disp(Tt5,"Total temperature at turbine exit:")
disp(f,"a(3)fuel-to-air ratio in burner :")
disp(Fncore,"(b)Engine core thrust in kN :")
disp(Fprop,"(c)Propeller thrust in kN :")
disp(PSFC,"(d)Power-specific fuel consumption in mg/s/kW :")
disp(TSFC,"(e)TSFC in mg/s/N :")
disp(ep,"f(1)Propulsive efficiency :")
disp(eth,"f(2)Thermal efficiency :")
disp(eo,"(g)Overall efficiency :")
|
6133f4ebcf9e85171973b9ce2b646a08d3dd8c7c | 449d555969bfd7befe906877abab098c6e63a0e8 | /548/DEPENDENCIES/4_28data.sci | 96baa85677853841e70ae8f16e37442a4c0635a9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 711 | sci | 4_28data.sci | //In this example flow over the wing is both turbulent and laminar.so to find drag we need to find drag on both laminar and turbulent layer and add them.
b=12.202;//wing span in meter
S=23.69;//wing area in m^2
c=S/b //wing width
Ret=6.5*10^5;//transition reynolds number or critical reynolds number
D=1.225;//density at standard sea level,Kg/m^3
u=1.79*10^-5;//Viscosity in at standard sea level in kg/(m)(s)
V=48.3*5/18 //velocity of flyer
q=D*V^2/2 //dynamic pressure
Re=D*V*c/u //reynolds no. at trailing edge
Xcr=(Ret*u)/(D*V) //distance from leading edge where transition occur
A=Xcr*b //area over which laminar flow occur in m^2
B=(c-Xcr)*b //area over which turbulent flow occur in m^2
|
f07c090a52dd8eb73d92ce22811cce40133a5052 | 449d555969bfd7befe906877abab098c6e63a0e8 | /662/CH4/EX4.13/ex4_13.sce | d725b61070b39486581f48cebc75b8166288b4ed | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 340 | sce | ex4_13.sce | //Example 4.13
clc
printf("Enter value for Item, partno, cost : ");
printf("\n [Enter values in single line seperated by spaces]) ");
[a,Item, partno,cost]=mscanf("%11s %*d %f");;
//due to uncertainity of values assigned, omitted use of printf here
disp( " = cost",cost," = Partno ",partno, " = Item ",Item);
|
5b863aae046a0db89b1f9c09184801ff2a08f07f | 449d555969bfd7befe906877abab098c6e63a0e8 | /1919/CH9/EX9.13/Ex9_13.sce | 4f14f6c5ba4b81e38274b2204c950e13697fe17a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,750 | sce | Ex9_13.sce |
// Theory and Problems of Thermodynamics
// Chapter 9
// Air_water Vapor Mixtures
// Example 13
clear ;clc;
//Given data
mw3 = 1000 // cooling tower supply rate in kg/min
T1 = 303.15 // Temp of air entering cooling tower in K
RH1 = 0.3 // relative humidity of air entering cooler
T2 = 308.15 // Temp of air leaving cooling tower in K
RH2 = 0.8 // relative humidity of air leaving cooler
T3 = 318.15 // Temp of water entering cooling tower in K
T4 = 300.15 // Temp of water leaving cooling tower in K
// subscript 1 and 2 denotes the state of air entering and leaving the cooling tower respectively
// subscript 3 and 4 denotes the state of water entering and leaving the cooling tower respectively
// data from psychometric chart for T = 30 degree C and RH = 0.3
SH1 = 0.0078 // in kg H2O/kg air
h1 = 51 // in kJ/kg air
// data from psychometric chart for T = 35 degree C and RH = 0.8
SH2 = 0.029 // in kg H2O/kg air
h2 = 110 // in kJ/kg air
hw3 = 188.45 // in kJ/kg
hw4 = 113.25 // in kJ/kg
// mass balance for H2O:
//mw3-mw4 = ma*(SH2-SH1)
// energy balance gives:
// mw3*hw3 - mw4*hw4 = ma*(h2-h1)
// x(1) = ma; x(2)= mw4;
function[f] =F(x)
f(1) = mw3-x(2)-x(1)*(SH2-SH1);
f(2) = mw3*hw3 - x(2)*hw4 -x(1)*(h2-h1);
endfunction
x = [10 10];
y = fsolve(x,F)
ma = y(1); // air flow rate in kg/min
mw4 = y(2);
wat_mak = mw3-mw4; // make up water required
// Output Results
mprintf('Make up water required = %4.2f kg/min' , wat_mak);
mprintf('\n Air flow rate = %4.1f kg/min' , ma);
|
492f599060aab6eca1dc2c4222a9f36ef9ae2875 | 449d555969bfd7befe906877abab098c6e63a0e8 | /575/DEPENDENCIES/9_5_6.sci | 590bdd7155cb204dc0b866e1a8a87342e033b81e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 108 | sci | 9_5_6.sci | x=0.1
y=0.2
MAcid=98.1
MS=32
MSalt=142
MBase=40
MWater=18
MNa=46
basis=1000 //g
T2=35
T1=25
T3=40 |
bafdd9c94dd757418efc31471af9a73d78c2473f | 20253970b7dd99e615215029609de822e2bf855d | /judge/tests/52063/11.tst | e52b987c10f863c0b7cd9152d68a9c2aa21e913b | [] | no_license | B-Rich/CATS | d26d6c85cfc1dbdc78fa16f691adbfccc615df03 | d299e328f9e7498ecd9f58f64069fcd57536db00 | refs/heads/master | 2021-01-01T06:10:11.322262 | 2011-06-21T15:06:06 | 2011-06-21T15:06:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 22 | tst | 11.tst | 6 6
2
2 4 1
4 2 1
|
034cbd42dabf65cb0b8efdea49c08956bd7804be | 449d555969bfd7befe906877abab098c6e63a0e8 | /2333/CH1/EX1.10/10.sce | 0626a48172e05ab736e10e66876d191196982964 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 10.sce | clc
// Given that
l_0 = 1// let initial length of rod in m
l = 0.99 // Observed length in m
c = 3e8 // speed of light in m/s
// Sample Problem 10 on page no. 27
printf("\n # PROBLEM 10 # \n")
printf(" Standard formula used \n")
printf(" l = l_0/((1-v^2/c^2)^1/2) \n")
v = c* sqrt(1-(l/l_0)^2)// speed of rocket in m/s
printf("\n Speed of rocket is %e m/s.",v)
|
1cfac05a7e94b83ed329cf97201a322670dfb5c7 | 475a9e3173cbf116c786e8a60b1323f29f10a134 | /fmmod.sci | d73f688d317e0ecbb91bab3565ca267e87804f23 | [] | no_license | jatinmandav/Sci-Lab-Implementations | bee5e375735ca0ebee9fd7afa69ddddbdadb5e3c | d1f65da040022b785763fe74d4b49468dc6078f3 | refs/heads/master | 2020-03-10T06:35:07.107772 | 2018-04-12T19:13:37 | 2018-04-12T19:13:37 | 129,242,875 | 4 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 923 | sci | fmmod.sci | /*
* By: Jatin Kumar Mandav
*
* Frequency Modulation
*
* Inputs: Amplitude of Carrier Wave, Frequency of Carrier Wave
* Amplitude of Message Wave, Frequency of Message Wave
* Sampling Frequency or Sampling/sec
*
*/
function [] = fm_mod(amp_carrier, freq_carrier, amp_message, freq_message, freq_sampling)
t = 0:1/freq_sampling:1
message_signal = amp_message*sin(2*%pi*freq_message*t)
carrier_signal = amp_carrier*sin(2*%pi*freq_carrier*t)
k = 1.5
modulated_signal = amp_carrier*sin(2*%pi*freq_carrier*t + (k*amp_message/freq_message)*cos(2*%pi*freq_message*t))
subplot(3, 1, 1)
plot(message_signal)
title("Message Signal")
subplot(3, 1, 2)
plot(carrier_signal)
title("Carrier Signal")
subplot(3, 1, 3)
plot(modulated_signal)
title("Modulated Signal")
endfunction
|
ed30f2222993644a42c644ffdec2139dae9168ec | 449d555969bfd7befe906877abab098c6e63a0e8 | /1733/CH3/EX3.4/3_4.sce | 118155563573a6003b17a21e2a44489dd7d5dce1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 377 | sce | 3_4.sce | //3.4
clc;
tq=50*10^-6;
Vin=40;
Vo=230;
IL=2;
IL_ref=2*Vo/Vin;
// C/L=(IL-ref/Vin)^2; (i)
// Assume that circuit is reverse biased for one-fourth period of resonant circuit. thus
//%pi/3*(L*C)^0.5=50*10^-6; (ii)
// on solving (i) and (ii)
C=13.73*10^-6;
L=C/(IL_ref/Vin)^2*10^6;
C=13.73*10^-6*10^6;
printf("C=%.3f uF",C)
printf("\nL=%.2f uH",L) |
780881c019eaea6c1272332c6810ff61e938ca1c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1538/CH4/EX4.2/Ex4_2.sce | 32ce7363fbd365d7e85ea767578321ef690a39c6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 614 | sce | Ex4_2.sce | //example-4.2
//page no-115
//given
//height of zinc unit cell
h=4.935*10^-10 //m
//side of the lattice
a=2.66*10^-10 //m
//as we know that zinc has HCP unit cell.
//the number of effective atoms
Ne=6
//as we know
//tan(%pi/3)=x/(a/2)
//so
x=a/2*tan (%pi/3) //m
//area of basal plane
Ar=6*a*x/2 //m^2
//volume of the unit cell
V=Ar*h //m^3
//atomic weight of zinc
Aw=65.37
//avogadro's number
NA=6.023*10^23
//density of zinc
rho=Aw*Ne/(NA*V)/1000 //kg/m^3
printf ("the no of effective atoms, the volume of unit cell and density of zinc are 6, 9.07*10^-29 and 7180 kg/m^3 resp")
|
9b34d95193b6f5971da2e1aeb4b37c5995bf9d13 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2141/CH9/EX9.14/Ex9_14.sce | c998a8dd4c0a936fe62375342e60867ded86acd4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 431 | sce | Ex9_14.sce |
clc
//initialisation of variables
P1=14.7//lbf/in^2
T1=520 //R
P2=70 //lbf/in^2
T2=814 //R
Wc=70.6 //Btu/lbm
P3=70 //lbf/in^2
T3=2060 //R
Cp=0.24 //R
Wt=70.6 //lbf/in^2
T=294//R
T5=1318//R
P=1.167 //Btu/lbm
p=1.715 //Btu/lbm
g=32.17//lbf/in^2
t=778//F
//CALCULATIONS
T4=T3-T//R
P4=P3/p//lbf/in^2
V=sqrt (2*g*t)*Cp*(T4-T5)//ft/sec
//RESULTS
printf('The velocity of the air leaving the nozzle=% f ft/sec',V)
|
1137ab64465be768ebbbc0e773e04970e4982bca | 449d555969bfd7befe906877abab098c6e63a0e8 | /2219/CH11/EX11.2/Ex11_2.sce | 2ec1c21e9dee58bde94d72447251665bb795ee59 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 474 | sce | Ex11_2.sce | // Chapter 11 example 2
//------------------------------------------------------------------------------
clc;
clear;
// Given data
Ap_Pe_diff = 30000; // difference between apogee and perigee in Km
a = 16000; // semi major axis of orbit
// Calculations
e = Ap_Pe_diff/(2*a); // Eccentricity
// Output
mprintf('Eccentricity = %3.2f',e);
//------------------------------------------------------------------------------
|
bd7f11cf7767b9f24c955c9df0d1529dfc6bda8c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1574/CH8/EX8.19/TL_Ex_8_19.sce | d9911bd9d76949cc98dc467ea1ebfc014ff20908 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 675 | sce | TL_Ex_8_19.sce | clc
//Chapter8
//Example8.19, page no 350
//Given
Zo=100// Characteristic Impedance
P=100e-3//Load power
Zr=140//Load Resistance
f=100e3// Operating freq
//a
K=(Zr-Zo)/(Zo+Zr)//Vtg Reflection coeff
//b
S=(1+K)/(1-K)//VSWR
//c+d
Emax=sqrt(Zr*P)//Max line vltg
Imin=Emax/Zr//Min line current
Emin=Emax/S// Min line vltg
Imax=S*Imin//Max line current
//e
R=14000/40
Zr=(Zo^2)/R//
mprintf('\nThe voltage reflection coeff is %f\nThe VSWR is %f\n\n\nThe Max and min voltage and crresponding crrent is\n Emax= %fV Imin= %fmA\n Emin= %fV Imax= %fmA\n\n The Termination resistance should be %f ohm',K,S,Emax,Imin*1e3,Emin,Imax*1e3,Zr)
|
07f16e3ec2415be887fa95cb77694d8a767d35b1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3588/CH4/EX4.3/EX4_3.sce | 61e93cd2972cfb0529b2d2aaa97a22a3d9f5fc04 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,294 | sce | EX4_3.sce | //Clearing console
clc
clear
//Intializing Variables
b = 40
h = 40
I = (b*h^3)/12
L1=300
L2=300
L3=200
E1 = 207*10^3
E3 = 69*10^3
A1= 1600
A3 = 78.54
//Calculating elemental stiffness matrices
K1 = ((E1*I)/(L1^3))*[12 6*L1 -12 6*L1;6*L1 4*(L1)^2 -6*L1 2*(L1)^2; -12 -6*L1 12 -6*L1; 6*L1 2*(L1)^2 -6*L1 4*(L1)^2]
K2 = K1 //as L1 = L2 and both are of same material (E1 = E2)
K3 = (A3*E3/L3)*[1 -1;-1 1]
//Constructing Global Stiffness matrix
K(1,[1:7])= [K1(1,[1:4]) 0 0 0]
K(2,[1:7])= [K1(2,[1:4]) 0 0 0]
K(3,[1:7])= [K1(3,[1:2]) K1(3,3)+K2(1,1)+K3(1,1) K1(3,4)+K2(1,2) K2(1,[3:4]) K3(1,2)]
K(4,[1:7])= [K1(4,[1:2]) K1(4,3)+K2(2,1) K1(4,4)+K2(2,2) K2(2,[3:4]) 0]
K(5,[1:7])= [0 0 K2(3,[1:4]) 0 ]
K(6,[1:7])= [0 0 K2(4,[1:4]) 0 ]
K(7,[1:7])= [0 0 K3(2,1) 0 0 0 K3(2,2)]
//Constructing Force matrix (required values)
F([2:6],1) = [0; 0; 0; -10000; 0]
//Solving for displacements
U(2:6,1)=linsolve(K(2:6,2:6),-F(2:6,1)) //K*U=F (equlibrium equation)
//Solving Axial stress of BD element
stress_BD = E3*[-1/L3 1/L3]*[0 1 0 0;0 0 0 1]*[0;U(3,1);0;0]
U(1,1)=0
U(7,1)=0
//Calculating Reaction forces
F = [K]*[U]
//Printing Results
printf('\nResults\n')
printf('\nNode-C Displacement Components \nU=%fmm \nTheta=%frad',U(3,1),U(4,1))
printf('\nReaction Forces \nR1=%fN \nR4=%fN',F(1,1),F(7,1))
|
82c363d7b920c19ec5fe474a5d0fa161c5555da5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /135/CH7/EX7.1/EX1.sce | e96969d94382730bb39ff30f90783d5b573f03cb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 318 | sce | EX1.sce | // Example 7.1: Transfer curve
clc, clear
IDSS=12; // in mili-amperes
VP=-5; // in volts
// Plotting transfer curve
VGS=[0:-0.01:VP]; // Gate source voltage in volts
// Using Shockley's equation
ID=IDSS*(1-VGS/VP)^2; // Drain current in mili-amperes
plot(VGS,ID);
xtitle("Transfer Curve","VGS (V)","ID (mA)"); |
4e7da686ee2280d17a82c781f287ee596d4f8174 | 527c41bcbfe7e4743e0e8897b058eaaf206558c7 | /NZFunctions/Hypothesis/FLAnova1WayUdt-NZ-UM-01.tst | 1da90ce6606952be93d946339cd7197142e2ffc2 | [] | no_license | kamleshm/intern_fuzzy | c2dd079bf08bede6bca79af898036d7a538ab4e2 | aaef3c9dc9edf3759ef0b981597746d411d05d34 | refs/heads/master | 2021-01-23T06:25:46.162332 | 2017-07-12T07:12:25 | 2017-07-12T07:12:25 | 93,021,923 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,031 | tst | FLAnova1WayUdt-NZ-UM-01.tst | -- Fuzzy Logix, LLC: Functional Testing Script for DB Lytix functions on Netezza
--
-- Copyright (c): 2016 Fuzzy Logix, LLC
--
-- NOTICE: All information contained herein is, and remains the property of Fuzzy Logix, LLC.
-- The intellectual and technical concepts contained herein are proprietary to Fuzzy Logix, LLC.
-- and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
-- secret or copyright law. Dissemination of this information or reproduction of this material is
-- strictly forbidden unless prior written permission is obtained from Fuzzy Logix, LLC.
--
--
-- Functional Test Specifications:
--
-- Test Category: Hypothesis Testing Functions
--
-- Last Updated: 05-29-2017
--
-- Author: <deept.mahendiratta@fuzzylogix.com>
--
-- BEGIN: TEST SCRIPT
--timing on
-- BEGIN: TEST(s)
-----*******************************************************************************************************************************
---FLAnova1WayUdt
-----*******************************************************************************************************************************
DROP VIEW UM_view_ANOVA1Way;
CREATE VIEW UM_view_ANOVA1Way AS
SELECT s.serialval AS GroupID,
t.City,
t.SalesPerVisit
FROM tblCustData t,
fzzlserial s
WHERE City <> 'Boston'
AND serialval <= 1;
--Created VIEW
SELECT *
FROM UM_view_ANOVA1Way
LIMIT 20;
--Output Table
SELECT a.*
FROM(SELECT a.GroupID,
a.City,
a.SalesPerVisit,
NVL(LAG(0) OVER (PARTITION BY a.GroupID ORDER BY a.City), 1)
AS begin_flag,
NVL(LEAD(0) OVER (PARTITION BY a.GroupID ORDER BY a.City), 1)
AS end_flag
FROM UM_view_ANOVA1Way a) AS z,
TABLE(FLANOVA1WAYUdt(z.GroupID,
z.City,
z.SalesPerVisit,
z.begin_flag,
z.end_flag)) AS a;
DROP VIEW UM_view_ANOVA1Way;
-- END: TEST(s)
-- END: TEST SCRIPT
--timing off
|
7dd78416b393dcc5d2ea0b78f9fa85d93c4de754 | 86c829c74bf901607fe0ed427edea9909c7bb4ce | /nand2tetris/projects/02/Mult4.tst | 64e7e767c3156ba1e96e23fd32ac875ec2f594e2 | [] | no_license | raghavnauhria/Systems-Design-Lab | 69ef12807dd045a5ea210dcbd02186511afed63d | 7818399a3d0379e72827821f4ccf08861be8ae18 | refs/heads/master | 2020-07-20T01:22:03.489636 | 2019-09-05T08:55:21 | 2019-09-05T08:55:21 | 206,546,810 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 593 | tst | Mult4.tst | // This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/02/Add4.tst
load Mult4.hdl,
output-file Mult4.out,
compare-to Mult4.cmp,
output-list a%B1.4.1 b%B1.4.1 c%B1.1.1 out%B1.8.1;
set a %B0000,
set b %B0000,
set c 0,
eval,
output;
set a %B0000,
set b %B1111,
set c 0,
eval,
output;
set a %B1111,
set b %B0001,
set c 0,
eval,
output;
set a %B0100,
set b %B0010,
set c 0,
eval,
output;
set a %B0011,
set b %B0000,
set c 0,
eval,
output;
set a %B0001,
set b %B1001,
set c 0,
eval,
output;
|
f2a9ca060a720b068651061c38adb636c86e7afd | 449d555969bfd7befe906877abab098c6e63a0e8 | /710/CH2/EX2.3/2_3.sci | 799c988a2afeb32ed1102f92202dd2352c0fd70a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | sci | 2_3.sci | clc();
clear;
//To determine the ratio of vacancies
k=8.625*10^-5; //Boltzmann constant ineV/K
//n1000/n500=ln[n1000/n500]=Ev/1000k
Ev=1.08; //average energy required to create a vacancy in eV
N=exp(Ev/(1000*k)) //n1000/n500
printf("The ratio of vacancies is %f",N);
|
39368fe2034696a7837d4b3368165f922f2c750e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1382/CH6/EX6.3/EX_6_3.sce | cbffd39730a8aed0c06e554ff169cda5ce64787b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 292 | sce | EX_6_3.sce | // Example 6.3;// feedback output
clc;
clear;
close;
A= 600;// open voltage gain
Af=50;//
Beta=( (A/Af)-1)/A;// feedback ratio
fop= (Beta*100);//percentage of output voltage which is fedback to the input is
disp(fop,"percentage of output voltage which is fedback to the input is ")
|
56a00c06b3a777956fd9a6d1d9f48786dafd693b | 1573c4954e822b3538692bce853eb35e55f1bb3b | /DSP Functions/zpklp2mb/test_6.sce | d290e881bb52146e9e380bb96f4297986143bf4e | [] | no_license | shreniknambiar/FOSSEE-DSP-Toolbox | 1f498499c1bb18b626b77ff037905e51eee9b601 | aec8e1cea8d49e75686743bb5b7d814d3ca38801 | refs/heads/master | 2020-12-10T03:28:37.484363 | 2017-06-27T17:47:15 | 2017-06-27T17:47:15 | 95,582,974 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 271 | sce | test_6.sce | // Test # 6 : Range test for Input Argument #4 or Input Argument #5
exec('./zpklp2mb.sci',-1);
[z,p,k,n,d]=zpklp2mb(0.2,1,4,4,0.7);
//!--error 10000
//Wo must lie between 0 and 1
//at line 48 of function zpklp2mb called by :
//[z,p,k,n,d]=zpklp2mb(0.2,1,4,4,0.7);
|
89e7e0d3a5dfada5e98c6cf2c3721d10cb7c1ef7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2660/CH2/EX2.12/Ex2_12.sce | 50276de592b4addf6b09188bcb0b6baea93a5122 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 285 | sce | Ex2_12.sce | clc
k = 1.33 // die opening factor
l = 1200 // bend length in mm
sigma = 455 // ultimate tensile strength in N/mm^2
t = 1.6 // blank thickness in mm
w = 8*t // width of die opening in mm
F = k*l*sigma*t^2/w // bending force in N
printf("\n bending force = %0.2f kN", F/1000)
|
9354a99482264d3e868b58d78cfbe4e381f82472 | 1218e33055a066314bb364402221c6449cb2b1f9 | /Ipopt-3.12.7/ThirdParty/Mumps/MUMPS/SCILAB/loader.sce | 8aec3971ae928b97c3c658844388ec75125d3cce | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | yueyangdk/CarND-MPC-Project | 1086c912bf8313d34dc47f2020483c7abd1729e4 | a4edcf25a7312ec3a79c04db6cfe66df6f7b1479 | refs/heads/master | 2020-04-06T19:42:43.737116 | 2018-11-15T17:54:14 | 2018-11-15T17:54:14 | 157,746,640 | 1 | 0 | MIT | 2018-11-15T17:16:39 | 2018-11-15T17:16:38 | null | UTF-8 | Scilab | false | false | 804 | sce | loader.sce | path= get_absolute_file_path('loader.sce');
exec(path+"/loader_inc.sce");
functions1 = ["dmumpsc"];
functions2 = ["zmumpsc"];
entrypoint1 = "scidmumps";
entrypoint2 = "scizmumps";
addinter(objects,entrypoint1,functions1)
num_interface = floor(funptr("dmumpsc")/100);
intppty(num_interface)
addinter(objects,entrypoint2,functions2)
num_interface = floor(funptr("zmumpsc")/100);
intppty(num_interface)
[units,typs,nams]=file();
clear units typs
for k=size(nams,'*'):-1:1
l=strindex(nams(k),'loader.sce');
if l<>[] then
DIR_SCIMUMPS = part(nams(k),1:l($)-1);
break
end
end
DIR_SCIMUMPS_DEM=DIR_SCIMUMPS+ "examples/";
getf(DIR_SCIMUMPS+"initmumps.sci")
getf(DIR_SCIMUMPS+"dmumps.sci")
getf(DIR_SCIMUMPS+"zmumps.sci")
add_help_chapter("Interface to the MUMPS package",path+"Help");
|
c47040dd829acc1dccf005a13560db32b1fe28af | 449d555969bfd7befe906877abab098c6e63a0e8 | /32/CH11/EX11.11/11_11.sce | 2a29e3941b98b23187bd821dc3021c54dc01600a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,281 | sce | 11_11.sce | //pathname=get_absolute_file_path('11.11.sce')
//filename=pathname+filesep()+'11.11-data.sci'
//exec(filename)
//Time of trial(in hrs):
t=24
//Pressure at which steam is generated(in bar):
p=16
//Coal consumed(in kg):
c=10000
//Rate of steam generation(in kg/hr):
r=2500
//Feed water temperature(in C):
Tf=27
//Total heating surface area(in m^2):
hsa=3000
//Total grate area(in m^2):
ga=4
//Calorific value of coal(in kJ/kg):
C=28000
//From steam tables:
hg=2794 //kJ/kg
//Latent heat at 100 C:
L=2257
//Coal burnt per hour(in kg/hr):
m=c/t
//Coal burnt per m^2 of grate per hour:
mg=m/ga
//Rate of steam generated per kg of coal(in kg steam/kg coal):
r1=r/m
//Heat added to steam per kg of coal(in kJ):
Q=r1*(hg-4.18*Tf)
//Equivalent evaporation from and at 100 C per kg of coal(in kg):
Ee=Q/L
//Equivalent evaporation from and at 100 C per m^2 of total surface per hour(in kg):
Eepm=Ee*m/hsa
//Boiler efficiency:
n=Ee*L/C*100
printf("\n RESULT \n")
printf("\nMass of coal burnt per m^2 of grate per hour = %f kg",mg)
printf("\nEquivalent evaporation from and at 100 C per kg of coal = %f kg",Ee)
printf("\nEquivalent evaporation from and at 100 C per m^2 of total surface per hour = %f",Eepm)
printf("\nBoiler efficiency = %f percent",n) |
d1e98d517f31f950eb3f35c76eaff90a7019e719 | 717ddeb7e700373742c617a95e25a2376565112c | /1592/CH1/EX1.7/Example1_7.sce | e6f31fdfa7989fb5671a1ba1d2faa2000b997cfc | [] | 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 | 699 | sce | Example1_7.sce | //Scilab Code for Example 1.7 of Signals and systems by
//P.Ramakrishna Rao
clear;
clc;
n=1;
for t=-10:0.1:10;
//Function for Even signal
y1(n)=0.5*(exp(-t)*u(t)+exp(t)*u(-t));
n=n+1;
end
a=gca();
a.x_location="origin";
a.y_location="origin";
t=-10:0.1:10;
//Plot of Even Signal
plot(t,y1);
title('y1(t)');
xlabel('Time in seconds');
n=1;
for t=-1:0.01:1;
//Function for Odd signal
y2(n)=0.5*(exp(-t)*u(t)-exp(t)*u(-t));
n=n+1;
end
figure(1);
a=gca();
a.x_location="origin";
a.y_location="origin";
t=-1:0.01:1;
//Plot of Odd Signal
plot(t,y2)
disp('plotted the signal both in even and odd forms');
title('y2(t)');
xlabel('Time in seconds');
|
9bfa2716a0416df96823a222ac4558331fd78c1b | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set5/s_Electrical_Machines_-_1_T._Singh_704.zip/Electrical_Machines_-_1_T._Singh_704/CH2/EX2.51/ex2_51.sce | 07cb22cf4650f8191d7dafbdf898712636e4500b | [] | 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 | 902 | sce | ex2_51.sce | errcatch(-1,"stop");mode(2);//Caption:Calculate the speed and BHP of the motor
//Exam:2.51
;
;
V=250;//applied emf(in V)
R_sh=0.05;//field resistance (in Ohm)
R_a=0.1;//armature resistance(in Ohm)
I=80;//motor current(in Amp)
A_s=240;//armature slots
C_s=4;//number of conductor per slot
Z=A_s*C_s;//total number of conductor
E_b=V-I*(R_a+R_sh);//Back emf(in V)
A=2;//number of parallel paths for wave wound
P=6;//poles
F=1.75;//flux per pole (in megalines)
F_1=1.75*10^-2;//flux per pole (in Wb)
N=E_b*60*A/(F_1*Z*P);//speed of the motor (in rpm)
disp(N,'speed of the motor (in rpm)=');
I_p=V*I;//input to the motor(in watts)
L_c=(I^2)*(R_a+R_sh);//copper losses(in watts)
L_i=900;//iron and friction losses(in watts)
L_t=L_c+L_i;//total losses(in watts)
O_p=I_p-L_t;//output(in watts)
B.H.P=O_p/746;//B.H.P. of the motor
disp(B.H.P,'B.H.P. of the motor(in H.P)=');
exit();
|
affa76ccde79dd8208b1985d799fe29ba5a08bfb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2267/CH7/EX7.6/ex7_6.sce | f11c6f0ae68d1bbb7edef2544c4a87ea47df14fc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 167 | sce | ex7_6.sce | //Part A Chapter 7 Example 6
clc;
clear;
close;
p=2;//MPa
T=500+273.15;//K
dh_by_ds=T;//for constant pressure
disp("Slope of an isobar is "+string(dh_by_ds));
|
48eab94ef2073a59fe99b5385f134ecf99c1c6d0 | 584105ff5b87869494a42f632079668e4c3f82de | /wrapppers/help_files/composeRT.sci~ | a8b947b4d72c2e8d2a33fa4c656e6782b5b16fd9 | [] | no_license | kevgeo/FOSSEE-Computer-Vision | 0ceb1aafb800580498ea7d79982003714d88fb48 | 9ca5ceae56d11d81a178a9dafddc809238e412ba | refs/heads/master | 2021-01-17T21:11:31.309967 | 2016-08-01T14:45:40 | 2016-08-01T14:45:40 | 63,127,286 | 6 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 169 | composeRT.sci~ | function [RotVec3 TransVec3] = composeRT(RotVec1,TransVec1,RotVec2,TransVec2)
[RotVec3 TransVec3] = opencv_composeRT(RotVec1,TransVec1,RotVec2,TransVec2)
endfunction
| |
67126ac79640dad8ab562c21911a9db356665178 | 449d555969bfd7befe906877abab098c6e63a0e8 | /788/CH3/EX3.17.b/3_17_soln.sce | 3e7a2ab7f5718cf5ce431d3d9568dfcc45dedc2e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,136 | sce | 3_17_soln.sce | clc;
pathname=get_absolute_file_path('3_17_soln.sce')
filename=pathname+filesep()+'3_17_data.sci'
exec(filename)
// Solution:
// Acceleration due to gravity,
g=9.81; //m/s^2
// Energy Equation between Station 1 and Station 2 is given by,
// (Z+P1+K1+Hp-Hm-Hl)=(P2+K2)
// since, There is no Hydraulic motor between Station 1 and 2,
// Therefore Motor Head,
Hm=0; //m
// also, cross section of oil tank is very large, as a result oil is at rest,
v1=0; //m/s
// Kinetic Energy Head at inlet,
K1=(v1^2)/(2*g); //m
// Pressure Head at inlet,
P1=p1/SG; //m
// specific weight of oil,
gamma1=round(SG*9797); //N/m^3
// Pump Power,
W=HHP*1000; //W
// Pump Head,
Hp=(W/(Q*gamma1)); //m
// Area of pipe,
A=((%pi)*(D^2))/4; //m^2
// Therefore, velocity in pipe,
v2=Q/A; //m/s
// Kinetic Energy head at Station 2,
K2=(v2^2)/(2*g); //m
// Therefore, Pressure Head at outlet,
P2=Z+P1+K1+Hp-Hm-Hl-K2; //m
// Pressure available at inlet of hydraulic motor at station 2,
p2=floor((P2*gamma1)/1000); // kPa gage
// Results:
printf("\n Results: ")
printf("\n The Pressure available at inlet of hydraulic motor at Station 2 is %.0f kPa gage.",p2)
|
6f289e1bd0fbcba641920ecd5dce8afaeb4aaee0 | f9c73c209e1694d1a1b246e59b9174a3124e5c3e | /project-08/Prog1.tst | 73fb2aee341b1143ef8ea3fa4f2589f1eaba419a | [] | no_license | atompkin/AssemblyLogic | c1a621a374008c765770986947cf09fb2e1baa32 | 026bab2372ed0a578a850604d2a93208d028ebff | refs/heads/master | 2020-04-06T06:29:29.903705 | 2015-11-16T15:35:56 | 2015-11-16T15:35:56 | 68,478,929 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 453 | tst | Prog1.tst | load Prog1.vm,
output-file Prog1.out,
compare-to Prog1.cmp,
output-list RAM[16]%D2.6.2,
set RAM[0] 256,
set RAM[16] 8,
set RAM[17] 5,
repeat 10 {
vmstep;
}
output;
load Prog1.vm,
set RAM[0] 256,
set RAM[16] -1,
set RAM[17] 5,
repeat 10 {
vmstep;
}
output;
load Prog1.vm,
set RAM[0] 256,
set RAM[16] 0,
set RAM[17] 0,
repeat 10 {
vmstep;
}
output;
load Prog1.vm,
set RAM[0] 256,
set RAM[16] 10,
set RAM[17] 20,
repeat 10 {
vmstep;
}
output;
|
d48ff768865b5a41066bd8ae73bca897450b98c7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2297/CH7/EX7.2/Ex7_2.sce | 0ee18e4d919297a1458435ce8ecca38f666e3396 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 475 | sce | Ex7_2.sce | //Example 7.2// power required
clc;
clear;
close;
format('v',6)
l=0.2;//length in meter
w=0.1;//width in meter
th=25;//thickness in mm
vw=l*w*th*10^-3;//volume in m^3
ww=600;//weight of wood in kg/m^3
ww1=vw*ww;//weight of wood kg
shw=1500;//specific heat of wood in J/kg/degree celsius
t=200;//temperature in degree celsius
rg=t*shw*ww1;//energy in joules
h=(rg/(3.6*10^3));//Wh
t=15;//time in minutes
pr=h*(60/t);//power required in Watt
disp(pr,"power required is,(W)=")
|
cd2d25041ee734c7b11a5d644a80d78a7b64aa92 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set6/s_Electronic_Circuit_Analysis_And_Design_D._A._Neamen_1223.zip/Electronic_Circuit_Analysis_And_Design_D._A._Neamen_1223/CH14/EX14.8/Ex14_8.sce | bac5eeaf40f09d470e4b807f4d63a7122e2c4a35 | [] | 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 | 166 | sce | Ex14_8.sce | errcatch(-1,"stop");mode(2);;
;
//Example 14.8
Is1=10^-14;
Is2=1.05*10^-14;
Vt=0.026;
Vos=Vt*log(Is2/Is1);
printf('\nthe offset voltage =%fV\n',Vos)
exit();
|
4ee96d6c5f96367486f7eb6597a51f01d331f4da | c61d570c37971fa455028a89d2163f455f91c291 | /interpolador_newton.sci | c64a98ce0e7a21424e6af11eab958c61969033e1 | [] | no_license | OgliariNatan/-ScientificComputing | a0af891f900f3f146a9751fd169f96052bd4ba83 | 070ea9d70430ef0c9e7944f491426b73af7c12b0 | refs/heads/master | 2020-04-04T23:13:12.585946 | 2017-07-03T21:46:18 | 2017-07-03T21:46:18 | 81,988,821 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,307 | sci | interpolador_newton.sci | //
// Autor: Jonas Vieira de Souza
//
// TODO: Função para ajuste de curvas por regressão linear
// Exemplo de chamada:
// $$ exec( caminho + 'regressao_linear.sci', -1 );
// $$ x [1 2 5 7 9 21];
// $$ y [4 5 6 7 9 20];
// $$ [ vi ] = interpolador_newton( x, y );
//
// Retornos:
// $$ vi $$ variavel independente do interpolado
//
// Argumentos:
// $$ _x $$ vetor de valores da Variavel Dependente
// $$ _y $$ vetor de valores da Variavel Independente
// $$ _pa $$ ponto de avalição do Polinônio Interpolador
//
clc
function v_indep = interpolador_newton( _x, _y, _pa )
[ mx, nx ] = size(_x);
[ my, ny ] = size(_y);
if nx ~= ny then
disp("Dados incompatíveis - Tamanho dos dados desiguais");
error("x e y devem ter a mesma dimensão");
end
b = _y;
//Encontrando os termos do polinomio de Newtom
// f(n-1) = b1+b2(x-x1)+...+bn(x-x1)(x-x2)...(x-xn)
for i = 2:nx
for j = nx:-1:i
b(j) = (b(j)-b(j-1))/(_x(j)-_x(j-(i-1))); //
end
end
disp(b,"Termos de b -->");
//Avaliando o ponto no polinomio interpolador
v_indep = 0;
for i = nx:-1:1
jota = 1;
for j = 1:i-1
jota = jota*(_pa-_x(j));
end
v_indep = v_indep + jota*b(i);
end
endfunction
|
6c43bf1fa3594d257be09ab8893ccfd5e825cd5a | 449d555969bfd7befe906877abab098c6e63a0e8 | /851/CH7/EX7.41/Figure7_41.sce | 56dea89711c44ec1ec87d74a1eca7a8a52342696 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 564 | sce | Figure7_41.sce | //clear//
//Caption:Matched Filter output of rectangular pulse
//Figure7.41
//Matched Filter Output
clear;
clc;
T =4;
a =2;
t = 0:T;
g = 2*ones(1,T+1);
h =abs(convol(g,g));
for i = 1:length(h)
if(h(i)<0.01)
h(i) =0;
end
end
h = h-T;
t1 = 0:length(h)-1;
figure
a =gca();
a.data_bounds = [0,0;6,4];
plot2d(t,g,5)
xlabel('t--->')
ylabel('g(t)---->')
title('Rectangular pulse duration T = 4, a =2')
figure
plot2d(t1,h,6)
xlabel('t--->')
ylabel('Matched Filter output')
title('Output of filter matched to rectangular pulse g(t)')
|
967df035051bc6d54b019984520f4d9696fa20c5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3845/CH24/EX24.4/Ex24_4.sce | 7ca5f5d64483e84e26187301c28a7371f6233a37 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 640 | sce | Ex24_4.sce | //Example 24.4
P=1*10^3;//Power (W)
A=0.30*0.40;//Area (m^2)
I_ave=P/A;//Intensity (W/m^2)
printf('a.Intensity = %0.2e W/m^2',I_ave)
I_0=2*I_ave;//Peak intensity (W/m^2)
printf('\n Peak Intensity = %0.2e W/m^2',I_0)
c=3*10^8;//Speed of light (m/s)
eps_0=8.85*10^-12;//Permittivity of free space (C^2/N.m^2)
E_0=sqrt(2*I_ave/(c*eps_0));//Peak electric field strength (V/m)
printf('\nb.Peak electric field strength = %0.2e V/m',E_0)
B_0=E_0/c;//Peak magnetic field strength (T)
printf('\nc.Peak magnetic field strength = %0.2e T',B_0)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|
294d5bb88ef6326fe54850f39d61cd3a174a985f | 449d555969bfd7befe906877abab098c6e63a0e8 | /1092/CH4/EX4.6/Example4_6.sce | ff1dc93c1cde8d29c51bf97cba0daf4edadb2d46 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 836 | sce | Example4_6.sce | // Electric Machinery and Transformers
// Irving L kosow
// Prentice Hall of India
// 2nd editiom
// Chapter 4: DC Dynamo Torque Relations-DC Motors
// Example 4-6
clear; clc; close; // Clear the work space and console.
// Given data
T_old = 150 ; // Torque developed by a motor in N-m.
disp("Example 4-6")
disp("Given data : ")
printf("\n \t\t\t phi \t I_a \t T ");
printf("\n \t\t\t ________________________");
printf("\n Original condition \t 1 \t 1 \t 150 N-m ");
printf("\n New condition \t\t 0.9 \t 1.5 \t ? ");
// Calculation
T_new = T_old * ( 0.9 / 1 ) * ( 1.5 / 1 ) ; // New torque produced in N-m
// Display the result
printf("\n\n Solution : ")
printf("\n Using the ratio method, the new torque is the product ");
printf("\n of two new ratio changes : ");
printf("\n T = %.1f N-m ", T_new );
|
9befc696a44409b6c0d2c93032cb6943f740a567 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set4/s_Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_S._Franco_929.zip/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_S._Franco_929/CH1/EX1.3/Example1_3.sce | 62a952ae5f9b341f963fe2122b0e1f1ac123450b | [] | 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 | 281 | sce | Example1_3.sce | errcatch(-1,"stop");mode(2);//Example 1.3
;
;
R1=10*10^3;
R2=100*10^3;
Ri=R1;//Input Resistance
Ro=0;//Output Resistance
A=-(R2/R1);// Ideal Overall Gain
printf("Ri=%.2f kohms",(Ri/1000));
printf("\nRo=%.f ohms",Ro);
printf("\nA=%.2f V/V",A);
exit();
|
8e45a2fe545957d98f3f6bc0a8438528fc71d21a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2411/CH3/EX3.a.05/Ex3a_a_5.sce | 8719ee4b63ba8a3f949a87b96d9cc3b0b0d26237 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 877 | sce | Ex3a_a_5.sce | // Scilab Code Ex3a.a.5: Page-135 (2008)
clc; clear;
phi1 = 0; // Phase of the first SHM, degree
phi2 = 60; // Phase of the second SHM, degree
phi3 = 90; // Phase of the third SHM, degree
a1 = 1.0; // Amplitude of the first SHM, cm
a2 = 1.5; // Amplitude of the second SHM, cm
a3 = 2.0; // Amplitude of the third SHM, cm
A = sqrt((a1 + a2*cosd(phi2)+a3*cosd(phi3))^2 + (a2*sind(phi2)+a3*sind(phi3))^2); // Resultant amplitude relative to the first SHM, cm
phi = atand((a2*sind(phi2)+a3*sind(phi3))/(a1 + a2*cosd(phi2)+a3*cosd(phi3))); // Resultant phase angle relative to the first SHM, degree
printf("\nThe resultant amplitude and phase angle relative to the first SHM = %4.2f cm and %2d degrees respectively", A, phi);
// Result
// The resultant amplitude and phase angle relative to the first SHM are 3.73 cm and 62 degrees respectively |
32b846cf12d1b2983074cb7d076e38f6678bc598 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.4.1/Unix-Windows/scilab-2.4.1/macros/m2sci/sci_pause.sci | 1c22496117b657746cece79b3d9ba9d3621864db | [
"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 | 388 | sci | sci_pause.sci | function [stk,txt,top]=sci_pause()
// Copyright INRIA
txt=[]
if rhs<1 then
stk=list('halt()','0','0','0','1')
else
if stk(top)(5)=='10' then
write(logfile,'Warning: pause('+stk(top)(1)+') ignored')
txt='//! pause('+stk(top)(1)+') ignored'
write(logfile,txt)
stk=list(' ',-2,'0','0','1')
else
stk=list('xpause(1000*('+stk(top)(1)+'))','0','0','0','1')
end
end
|
2efbbc6b4c41c3f66579df63ceb35c4b7b085103 | 717ddeb7e700373742c617a95e25a2376565112c | /1766/CH5/EX5.13/EX5_13.sce | 6074b1fea92843f776af55de60e55eb3ba38c7d1 | [] | 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 | 837 | sce | EX5_13.sce | clc;funcprot(0);//Example 5.13
//Initilisation of Variables
L=3;......//Length of rectangular box in m
W=2;...//Width of rectangular box in m
H=7;.......//height of rectangular box in m
Ts=290;....//Surface Temparature of box in K
Ta=330;....//Temparature of air in K
U=16.67;....//Velocity of air in m/s
//Properties of air at 310 K
rho=1.147;......//Density in kg/m^3
mu=16.48*10^-6;......//Viscocity in m^2/s
K=0.0271;........//Thermal conductivity in W/mK
Cp=1.005;......//Specific heat in kJ/kg K
//calculation
Re=(U*H)/mu;....//reynolds number
Pr=(Cp*rho*mu)/(K*10^-3);.....//Prandtl number
Nua=0.036*Re^(0.8)*Pr^(1/3);....//Nusselt number
ha=(Nua*K)/H;...//Heat transfer coefficient in W/m^2 K
Q=ha*H*2*(L+W)*(Ta-Ts)*10^-3;....//Heat transfer rate from plate in W
disp(Q,"Heat transfer rate from plate in W:")
|
9ed93e63afa15ce5987b2ff2702561f6995c685c | 449d555969bfd7befe906877abab098c6e63a0e8 | /191/CH2/EX2.9/Example2_9.sce | a6a83da542e32bc6abec4067c08fa25a13842e82 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,732 | sce | Example2_9.sce | //Solving four linear system of equations with Gauss-Seidel and SOR method
//the convergence is much faster in SOR method
clear;
close();
clc;
format('v',7);
x1=[0,0];
x2=[0,0];
x3=[0,0];
x4=[0,0];
x1(1,2)=-0.33333*(1-x2(1,1)-3*x4(1,1));
x2(1,2)=0.16667*(1-x1(1,2)-x3(1,1));
x3(1,2)=0.16667*(1-x2(1,2)-x4(1,1));
x4(1,2)=-0.33333*(1-3*x1(1,2)-x3(1,2));
i=1;
while (abs(x1(1,1)-x1(1,2))>0.5*10^-2 | abs(x2(1,1)-x2(1,2))>0.5*10^-2 | abs(x3(1,1)-x3(1,2))>0.5*10^-2 | abs(x4(1,1)-x4(1,2))>0.5*10^-2)
x1(1,1)=x1(1,2);
x2(1,1)=x2(1,2);
x3(1,1)=x3(1,2);
x4(1,1)=x4(1,2);
x1(1,2)=-0.33333*(1-x2(1,1)-3*x4(1,1));
x2(1,2)=0.16667*(1-x1(1,2)-x3(1,1));
x3(1,2)=0.16667*(1-x2(1,2)-x4(1,1));
x4(1,2)=-0.33333*(1-3*x1(1,2)-x3(1,2));
i=i+1;
end
disp([x1; x2; x3; x4],'Answers are:')
disp(i,'Number of Iterations :')
w=1.6;
x1=[0,0];
x2=[0,0];
x3=[0,0];
x4=[0,0];
x1(1,2)=x1(1,1)-0.33333*w*(1+3*x1(1,1)-x2(1,1)-3*x4(1,1));
x2(1,2)=x2(1,1)+0.16667*w*(1-x1(1,2)-6*x2(1,2)-x3(1,1));
x3(1,2)=x3(1,1)+0.16667*w*(1-x2(1,2)-6*x3(1,2)-x4(1,1));
x4(1,2)=x4(1,1)-0.33333*w*(1-3*x1(1,2)-x3(1,2)+3*x4(1,1));
i=1;
while (abs(x1(1,1)-x1(1,2))>0.5*10^-2 | abs(x2(1,1)-x2(1,2))>0.5*10^-2 | abs(x3(1,1)-x3(1,2))>0.5*10^-2 | abs(x4(1,1)-x4(1,2))>0.5*10^-2)
x1(1,1)=x1(1,2);
x2(1,1)=x2(1,2);
x3(1,1)=x3(1,2);
x4(1,1)=x4(1,2);
x1(1,2)=x1(1,1)-0.33333*w*(1+3*x1(1,1)-x2(1,1)-3*x4(1,1));
x2(1,2)=x2(1,1)+0.16667*w*(1-x1(1,2)-6*x2(1,2)-x3(1,1));
x3(1,2)=x3(1,1)+0.16667*w*(1-x2(1,2)-6*x3(1,2)-x4(1,1));
x4(1,2)=x4(1,1)-0.33333*w*(1-3*x1(1,2)-x3(1,2)+3*x4(1,1));
i=i+1;
end
disp([x1; x2; x3; x4],'Answers are :')
disp(i,'Number of Iterations :') |
48beae2f8e31502b6b34f46409c6be7ca2e189fa | 449d555969bfd7befe906877abab098c6e63a0e8 | /1049/CH12/EX12.13/ch12_13.sce | f0b00085c9a67bece8186e58e4af022f6a74b6ff | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 179 | sce | ch12_13.sce | clear;
clc;
//after calculating
//t=w_m/6000-%pi/360
N=1000;
w_m=2*%pi*N/60;
t=w_m/6000-%pi/360; printf("time reqd=%.5f s",t);
//printing mistake in the answer in book |
a356e678126da401b8959eeade8200320b03c4a3 | b9117a375dfd4994834bffe24f28414f4599c02e | /test/ifdef.tst | e0c12b554f27d78d6acb1f9d84d827ad98599eed | [] | no_license | mdolgun/NLPParser | 2a7e1ab5f820c902ecb7ecd05a90a9caca7fb4bf | 54d8494a8799efb94ff0dfa21c8c46292dd9cb22 | refs/heads/master | 2021-07-16T08:32:55.973580 | 2020-10-17T20:28:51 | 2020-10-17T20:28:51 | 218,727,320 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,072 | tst | ifdef.tst | ###grammar
%define token1 token2
%ifdef token1
%ifdef token2
S -> in : out1
%else
S -> in : out2
%endif
%else
%ifdef token2
S -> in : out3
%else
S -> in : out4
%endif
%endif
S -> in : out
###input
in
###enum
out1
out
###grammar
%define token1
%ifdef token1
%ifdef token2
S -> in : out1
%else
S -> in : out2
%endif
%else
%ifdef token2
S -> in : out3
%else
S -> in : out4
%endif
%endif
S -> in : out
###input
in
###enum
out2
out
###grammar
%define token2
%ifdef token1
%ifdef token2
S -> in : out1
%else
S -> in : out2
%endif
%else
%ifdef token2
S -> in : out3
%else
S -> in : out4
%endif
%endif
S -> in : out
###input
in
###enum
out3
out
###grammar
%ifdef token1
%ifdef token2
S -> in : out1
%else
S -> in : out2
%endif
%else
%ifdef token2
S -> in : out3
%else
S -> in : out4
%endif
%endif
S -> in : out
###input
in
###enum
out4
out
|
63acb4e007ed0db54b72071ce6be20b8d39c5016 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3041/CH1/EX1.20/Ex1_20.sce | c045b11f69dd7e19d791960a410a689677723153 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 424 | sce | Ex1_20.sce |
//Calculations
//Part a
// 200*1.141 4
//v1(t)=-------------(1- - cos628t)
// 3.14 3
// 200*1.141 800*1.141
//v2(t)=----------- - ------------ cos(628t+<(V2/V1))
// 3.14 3*3.14
//
//V2/V1|w=0 =0.8;V2/V1|w=628 =6.43*10^-4 <V2/V1|w=628 =180
//v2(t)=72.02+0.0538 cos628t
//Part b
vrms=0.0538
vdc=sqrt(2)*72.02
r=vrms/vdc
//Results
printf ("ripple factor is %.2e",r)
|
5d3740a79fb021362d2d4bc2d973641340f126e5 | c3f74a8101e605a189fabf0d9a1e831519bc9c61 | /Sources/S1.sce | 7b6633faed913c25c35335039df2e2fb69d0fff4 | [] | no_license | Varal7/ProjetScilab | 26f8cf730ced1247f9409dae70076f7182f69d1a | bc6e0d8ae9fb131a128dbd4cc4f8cf4bd0cd74c4 | refs/heads/master | 2021-01-20T11:31:45.820662 | 2015-06-29T14:25:05 | 2015-06-29T14:25:05 | 35,808,084 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 451 | sce | S1.sce | M=10;
p=0.7;
nb_lancers = 5000;
nb_iterations = 15;
X = grand(1,nb_lancers,"bin",M,p);
function y=F(x,K,U)
y=x;
if (K>x) &(U<=p) then
y=x+1;
elseif (K<=x)&(U>p) then
y= x-1
else
y=x
end
endfunction
for i =1 : nb_iterations
for j=1 : nb_lancers
K = grand(1,1,"uin",1,M);
U = grand(1,1,"unf",0,1);
X(j)= F(X(j),K,U);
end
end
histplot(0.5:10.5,X,style=2)
|
da99ccff6afee5ffaa8d90a92d29cf57315aa6f3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH3/EX3.18/18.sce | 461b5dadd51e44fd9be5e91190502e961033387f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 527 | sce | 18.sce | clc
m=1; //kg
p=20; //bar
T_sup=400; //0C
x=0.9;
c_ps=2.3; //kJ/kg.K
disp("(i) Internal energy of 1 kg of superheated steam")
// At 20 bar: From steam tables
T_s=212.4; //0C
h_f=908.6; //kJ/kg
h_fg=1888.6; //kJ/kg
v_g=0.0995; //m^3/kg
h_sup = h_f+h_fg+c_ps*(T_sup-T_s);
v_sup=v_g*(T_sup+273)/(T_s+273);
u=h_sup-p*v_sup*10^2;
disp("Internal energy=")
disp(u)
disp("kJ/kg")
disp("(ii) Internal energy of 1 kg of wet steam")
h=h_f+x*h_fg;
u=h-p*x*v_g*10^2;
disp("Internal energy=")
disp(u)
disp("kJ/kg") |
eada2b6d437beb7db7278e7178a53448dbdd979a | 449d555969bfd7befe906877abab098c6e63a0e8 | /896/CH1/EX1.4/4.sce | 666c9ba515863e17118d1149cd5b989206abcf41 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 172 | sce | 4.sce | clc
//Example 1.4
//Convert 327 miles/hr into ft/s
V=327//miles/hr
//1 mile = 5280 ft
//1 hour = 3600 sec
V1=V*(5280/3600)//ft/s
printf("327 miles/hr = %f ft/s",V1); |
08e4e5f1e7f4e5949eed8b223a51ef55f9077ce0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH8/EX8.2/2.sce | c985e62c90513fa20db916fa797716e6434317b6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 375 | sce | 2.sce | clc
V=0.04; //m^3
p=120*10^5; //Pa
T=293; //K
R0=8314;
disp("(i) kg of nitrogen the flask can hold")
M=28; //molecular weight of Nitrogen
R=R0/M;
m=p*V/R/T;
disp("kg of nitrogen=")
disp(m)
disp("kg")
disp("(ii) Temperature at which fusible plug should melt")
p=150*10^5; //Pa
T=p*V/R/m; //K
t=T-273; //0C
disp("Temperature =")
disp(t)
disp("°C") |
b82ca2e7f6baf778b6f630abf81a474f9e2c6660 | 567cea2cb660fcde8ef1be76f83726e67ebb0c23 | /homework5/TestSortedCollection.tst | c07d686eb1e8166f8e0233f834fee7f1065fd854 | [] | no_license | vw0389/cs351 | 3fdd0c276c851a0854e47eecb26470e7034b7b02 | c5655dc713d0f8a6f325d106e602729662fbfda6 | refs/heads/main | 2023-08-16T18:41:17.515448 | 2021-09-27T20:13:39 | 2021-09-27T20:13:39 | 408,193,869 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 302 | tst | TestSortedCollection.tst | 2127135785=0
978402736="Jingyuan"
1180449268="Omar"
27322186="The Harrowing of Hell"
319044975="The Desperate Man"
105019561=true
1866459795="Jingyuan"
988370360="Omar"
1076862205="Potsdamer Platz"
29737522="Fitz"
570352297=2
353461707="Jingyuan"
840018027=true
1300594462="Jingyuan"
948989387="Bobby"
|
8ae2f18e2a094532d43ff9a4b4fdeeb5773c1c5d | 449d555969bfd7befe906877abab098c6e63a0e8 | /3537/CH1/EX1.25/Ex1_25.sce | a055c32e0f1fdf77984415ebdaf48adb5c781e35 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 267 | sce | Ex1_25.sce | //Example 1_25
clc();
clear;
//To find the value of the slit width
lemda=6500 //units in angstroam
theta=30 //units in degrees
a=lemda/sin(theta*%pi/180)
printf("The value of the slit is %.0f angstroam",a)
|
632288637448b00ce8955132f05b1fb6183cb622 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.1/Unix/scilab-2.1/macros/optim/karmarkar.sci | 772a199d7c09a13df63a875cf28d4d91067b9794 | [
"MIT",
"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 | 932 | sci | karmarkar.sci | function [x1,crit]=karmarkar(a,b,c,x0,eps,gamma)
maxiter=200;
epsdef=1.d-5
//
[lhs,rhs]=argn(0)
select rhs
case 4 then
gamma=1/4,eps=epsdef
case 5 then
gamma=1/4
case 6,
else
error('[x1,crit]=karmarkar(a,b,c,x0 [,eps [,gamma]])')
end
//verification des donnees
[n,p]=size(a)
w=size(b)
if w(1)<>n then error('invalid B dimension'),end
w=size(c)
if w(1)<>p then error('invalid A dimension'),end
w=size(x0)
if w(1)<>p then error('invalid x0 dimension'),end
if mini(x0)<0|norm(a*x0-b)>eps then
error('x0 is not feasible'),
end
//
x1=x0;tc=c';
crit=tc*x1;
test=eps+1
count=0
while test>eps&count<=maxiter
count=count+1
ax=a*diag(x1);xc=x1.*c
y=(ax*ax')\(ax*xc)
d=-xc+ax'*y
dk=x1.*d
if mini(dk)>0 then error('Unbounded problem!'),end
alpha=-gamma/mini(d)
test=alpha*(norm(d)**2)/maxi(1,abs(crit))
x1=x1+alpha*dk
crit=tc*x1
write(%io(2),[count,crit,test],'(f3.0,3x,e10.3,3x,e10.3)')
end
|
09126438b7e435ce3448f1e9e979c5a3ca43ab39 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/tests/examples/comma.man.tst | cefd413946159847faceb13030b2b1d57e150109 | [
"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 | 45 | tst | comma.man.tst | clear;lines(0);
a=[1,2,3;4,5,6];
a=1,b=1;c=2
|
74add07270727b472d3349c5797d91aecf0be674 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3516/CH13/EX13.5/Ex13_5.sce | 308dd8fa4dc60520b6a799fece5322ccea905cf5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 3,649 | sce | Ex13_5.sce | printf("\t example 13.5 \n");
// for a Basis of one Hour
printf("\t approximate values are mentioned in the book \n");
c(1)=1544; // Flow rate of CO2, Lb/hr
h(1)=4500; // Flow rate of H20, Lb/hr
c(2)=35; //Flow rate of CO2, Mol/hr
h(2)=250;//Flow rate of H20, Mol/hr
t(1)=c(1)+h(1); //Total flow rate , Lb/hr
t(2)=c(2)+h(2); //Total flow rate, Mol/hr
Pt = (30+14.7)/(14.7); //Total Pressure in atm
printf("\t Pt is %.2f\n",Pt);
Pw = ( h(2)/t(2) )*Pt; //Partial pressure of Water in atm
printf("\t Partial Pressure of Water: %.2f atm \n",Pw);
Tw = 267; // from table 7 at 2.68atm
Mm = (t(1)/t(2));
printf("\t mean molecular weight : %.1f \n",Mm);
// weighted temperature difference
// overall balance
//for Inlet
Pv=2.68; // water vapour pressure, atm
Pg=Pt-Pv; // Inert pressure
//for Exit
Pw1 = 0.1152 // Partial pressure of water at 120 F
Pv1 = 0.115; // Water vapor pressure
Pg1 = 2.935; // Inert pressure
w1 = 250; //Pound mols steam inlet
w2 = c(2)*(Pv1/Pg1);
printf("\tPound mols steam exit:%.2f\n",w2);
w3 = w1 - w2;
printf("\tPound mols steam condessed:%.2f\n",w3);
//Assume points at 267, 262, 255,225,150,120 deg F
//For the interval from 267 to 262 F
Pv2 = 2.49; // From table 7 at 262 F
Pg2 = Pt - Pv2; //Inert pressure
printf("\tPg is %.2f",Pg2);
w4 = c(2) * (Pv2/Pg2); //Mol steam remaining
w5 = h(2) - w4; //Mol steam condensed
printf("\tMol steam remaining:%.0f\n",w4);
printf("\tMol steam condensed:%.0f\n",w5);
h1 = (w5*18*937.3) + (0.46*(267-262) * w5 * 18); //Heat of condensation
h2 = (w4 * 18 * 0.46*(267-262)); //Heat from uncondensed steam
h3 = c(1)*0.22*5.0; //Heat from noncondensable
printf("\tHeat of condensation:%.2e\n",h1);
printf("\tHeat from uncondensed steam:%.2e\n",h2);
printf("\tHeat from noncondensable:%.1e\n",h3);
ht = h1+h2+h3;//Total heat
printf("\tTotal heat:%.0f\n",ht);
//Similarily calculating the Heat balance for other intervals
printf("\tInterval,F\tTotal Heat\n\t267-262\t1,598,000\n\t262-255\t1,104,000\n\t255-225\t1,172,000\n\t225-150\t751,000\n\t150-120\t177,000\n\tTotal\t4,802,000\n");
w=4802000/(115-80); //Total water
printf("\tTotal water: %.2e\n",w);
//Water coefficient
Nt = 246;
at1 = 0.302;
n = 4;
at = Nt * (at1/(144*n)); // From eq 7.48
printf("\tat is %.3f ft^2\n",at);
Gt = w/at;
printf("\tGt is %.2e lb/(hr)(ft^2)\n",Gt);
ro = 62.5;
V = Gt/(3600*ro);
printf("\tV is %.2f fps\n",V);
hi = 1120; // From fig. 25
ID = 0.62;
OD = 0.75;
hi0= hi *(ID/OD); //From eq 6.5
printf("\thi0 is %.0f\n",hi0);
//Mean properties at 267 F
c = ((c(1)*0.22)+(h(1)*0.46))/t(1); // Calculation mistake in Book
printf("\tMean c:%.3f Btu/(lb)(F)\n",c);
k = ((c(1)*0.0128)+(h(1)*0.015))/t(1); // Calculation mistake in Book
printf("\tMean k:%.4f Btu/(hr)(ft^2)(F/ft)\n",k);
mu = (((c(1)*0.019)+(h(1)*0.0136))/t(1))* 2.42; // Calculation mistake in Book
printf("\tMean mu:%.4f lb/(hr)(ft)\n",mu);
ID1 = 21.25;
C = 0.25;
B = 12;
PT = 1.0;
as = ID1 * C * (B/(144*PT)); //From eq 7.1
printf("\tas is %.3f ft^2\n",as);
Gs = t(1)/as //From eq 7.2
printf("\tGs is %.3e lb/(hr)(ft^2)\n",Gs);
Ds = 0.0792; // From Fig 28
Res = Ds * (Gs/0.0363); // From eq 7.3
printf("\tRes is %.2e\n",Res);
jH = 102; // From Fig 28
x = ((c*mu)/k)^(1/3);
printf("\t(c.mu/k)^1/3 is %.0f\n",x);
h0 = jH * 0.0146 * (x/Ds); //From eq 6.15b
printf("\th0 is %.0f\n",h0);
y = 0.62 // y = (mu/ro * kd)^(2/3)
z = 1.01; // z = ((c*mu)/k)^(2/3)
K = (h0*z)/(0.407*Mm*y); //KG = K/p0f
printf("\tK is %.2f\n",K);
//at point 1
Tg = 244; // F
tW = 115;
delt=(Tg-tW);
printf("\t delt is %.0f F \n",delt);
|
1f87e5d8a4cf307fb382af740fed9a1da72006d5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1733/CH2/EX2.9/2_9.sce | d75d2adb9dae15ddad1342adec301c300823336f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 324 | sce | 2_9.sce | //2.9
clc;
Vm=150*2^0.5;
Vdc=(Vm/(%pi))*(1+cosd(45));
R=30;
Load_current_average=Vdc/R;
printf("\nAverage Load current = %.2f A", Load_current_average)
Vrms=Vm*(((%pi-(%pi/4))/(2*%pi))+(sind(90)/(4*%pi)))^0.5;
printf("\nRMS voltage = %.1f V", Vrms)
RMS_current=Vrms/R;
printf("\nRMS current = %.3f A", RMS_current) |
240219e3cd587a994e4e5677c17cdf0bc242f813 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1388/CH7/EX7.9/7_9.sce | 703a64c0414b14b50994065c5fef91fc39fdae33 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 250 | sce | 7_9.sce | clc
//initialisation of variables
G1= -7800 //cal
G2= -24600 //cal
G3= -39700 //cal
R= 1.987 //cal/mol K
T= 25 //C
//CALCULATIONS
G= G1+G2-G3
Ksp= 10^(-G/(2.303*R*(273.2+T)))
//RESULTS
printf (' solubility product constant = % 1e ',Ksp)
|
a3d1eeea527c8ab2cb427f2a52bee7edcc3ea7a6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1898/CH6/EX6.30/Ex6_30.sce | 6e72712b4cf5ff63bcee31a4a99029bad17a03e7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 594 | sce | Ex6_30.sce | clear all; clc;
disp("Scilab Code Ex 6.30 : ")
//Given:
sigma_y = 250; //MPa
t = 12.5; //mm
w = 200; //mm
h = 225; //mm
c = (h/2)+t;
I = 82.44*10^6;//mm^4
Mp = 188; //kN
//Calculations:
sigma_allow = (Mp*10^6*c)/(I);
y = (sigma_y*c)/(sigma_allow);
//Display:
printf("\n\nThe point of zero normal stress = %1.2f mm',y);
printf("\nThe Residual Stress distribution is shown in the text book.");
//------------------------------------------------------------------------END---------------------------------------------------------------------------------------
|
3ffd50191c6d10d70bf1ab2e67332cec9a8c38da | 665eac2bfd0d2f1d559f485375f89e8a91632c6e | /VOL_300/335_02/AS7000.TST | df8f95a08f16266173ee142b508d0864cf3b4a01 | [] | no_license | kubohisa/CUGL | 615c29732e5fc2c6bcb29a4013be3351dc21dda6 | 75fc7cb2f8c5f3869a091b2b5c50c09323bc1c03 | refs/heads/main | 2023-03-15T16:19:49.355867 | 2020-10-02T21:19:00 | 2020-10-02T21:19:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,230 | tst | AS7000.TST | imm equ $55
label equ $3456
port equ $102
rd equ $78
rs equ $34
adc b,a
adc rs,a
adc rs,b
adc rs,rd
adc #imm,a
adc #imm,b
adc #imm,rd
add b,a
add rs,a
add rs,b
add rs,rd
add #imm,a
add #imm,b
add #imm,rd
and b,a
and rs,a
and rs,b
and rs,rd
and #imm,a
and #imm,b
and #imm,rd
andp a,port
andp b,port
andp #imm,port
br label
br label(b)
br [rs]
btjo b,a,jmpdst
btjo rs,a,jmpdst
btjo rs,b,jmpdst
btjo rs,rd,jmpdst
btjo #imm,a,jmpdst
btjo #imm,b,jmpdst
btjo #imm,rd,jmpdst
btjop a,port,jmpdst
btjop b,port,jmpdst
btjop #imm,port,jmpdst
btjz b,a,jmpdst
btjz rs,a,jmpdst
btjz rs,b,jmpdst
btjz rs,rd,jmpdst
btjz #imm,a,jmpdst
btjz #imm,b,jmpdst
btjz #imm,rd,jmpdst
btjzp a,port,jmpdst
btjzp b,port,jmpdst
btjzp #imm,port,jmpdst
call label
call label(b)
call [rs]
clr a
clr b
clr rd
clrc
cmp b,a
cmp rs,a
cmp rs,b
cmp rs,rd
cmp #imm,a
cmp #imm,b
cmp #imm,rd
cmpa label
cmpa label(b)
cmpa [rs]
dac b,a
dac rs,a
dac rs,b
jmpdst dac rs,rd
dac #imm,a
dac #imm,b
dac #imm,rd
dec a
dec b
dec rd
decd a
decd b
decd rd
dint
djnz a,jmpdst
djnz b,jmpdst
djnz rd,jmpdst
dsb b,a
dsb rs,a
dsb rs,b
dsb rs,rd
dsb #imm,a
dsb #imm,b
dsb #imm,rd
eint
idle
inc a
inc b
inc rd
inv a
inv b
inv rd
jc jmpdst
jeq jmpdst
jge jmpdst
jgt jmpdst
jhs jmpdst
jl jmpdst
jlt jmpdst
jmp jmpdst
jn jmpdst
jnc jmpdst
jne jmpdst
jnz jmpdst
jp jmpdst
jpz jmpdst
jz jmpdst
lda label
lda label(b)
lda [rs]
ldsp
mov a,b
mov a,rd
mov b,a
mov b,rd
mov rs,a
mov rs,b
mov rs,rd
mov #imm,a
mov #imm,b
mov #imm,rd
movd rs,rd
movd #imm(b),rd
movd #imm,rd
movp a,port
movp b,port
movp port,a
movp port,b
movp #imm,port
mpy b,a
mpy rs,a
mpy rs,b
mpy rs,rd
mpy #imm,a
mpy #imm,b
mpy #imm,rd
nop
or b,a
or rs,a
or rs,b
or rs,rd
or #imm,a
or #imm,b
or #imm,rd
orp a,port
orp b,port
orp #imm,port
pop a
pop b
pop rd
pop st
push a
push b
push rd
push st
reti
rets
rl a
rl b
rl rd
rlc a
rlc b
rlc rd
rr a
rr b
rr rd
rrc a
rrc b
rrc rd
sbb b,a
sbb rs,a
sbb rs,b
sbb rs,rd
sbb #imm,a
sbb #imm,b
sbb #imm,rd
setc
sta label
sta label(b)
sta [rs]
stsp
sub b,a
sub rs,a
sub rs,b
sub rs,rd
sub #imm,a
sub #imm,b
sub #imm,rd
swap a
swap b
swap rd
trap 00
trap 01
trap 02
trap 03
trap 04
trap 05
trap 06
trap 07
trap 08
trap 09
trap 10
trap 11
trap 12
trap 13
trap 14
trap 15
trap 16
trap 17
trap 18
trap 19
trap 20
trap 21
trap 22
trap 23
tsta
tstb
xchb a
xchb b
xchb rd
xor b,a
xor rs,a
xor rs,b
xor rs,rd
xor #imm,a
xor #imm,b
xor #imm,rd
xorp a,port
xorp b,port
xorp #imm,port
|
ca8162215c29e878fa84174054fc80470552179b | f5c2e0ea265d02956c8c61c9f3d5a0a297b9fea9 | /file_test_branch.tst | 75162444da314b20dd699d689a21a9046e38992e | [] | no_license | ozetel/test_repo | b4fa930fb6137ed21245d0d19351035db3c21107 | 6730213f02138e7df42427b144a3784128dbdcc9 | refs/heads/master | 2021-01-10T06:00:19.908599 | 2016-03-20T04:50:29 | 2016-03-20T04:50:29 | 49,968,442 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 25 | tst | file_test_branch.tst | file while in test branch |
bed07759ee99f3e7e504e384834afce69d861e2a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2507/CH10/EX10.14/Ex10_14.sce | 141905ee1d86b95292ad83f2ea9dab664c2a2561 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 372 | sce | Ex10_14.sce | clc
clear
printf("Example 10.14 | Page number 363 \n\n");
//Find the flow rate of feed water into the heater.
//Given data
m1 = 0.2 //kg/s
p = 4 //bar
//Solution
//From superheated steam table
h1 = 2752.8 //kJ/kg
h2 = 209.31 //kJ/kg
h3 = 604.73 //kJ/kg
m2 = (m1*h1-m1*h3)/(h3-h2) //kg/s
printf("The flow rate of feed water into the heater = %.3f kg/s",m2)
|
46e84e5696e9c24750179c41cbc0a6d0dc7f80db | 449d555969bfd7befe906877abab098c6e63a0e8 | /608/CH39/EX39.03/39_03.sce | ded0295b2dc592b285dc72ca6ef628eea99bf63a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 865 | sce | 39_03.sce | //Problem 39.03: A 2000 pF capacitor has an alternating voltage of 20 V connected across it at a frequency of 10 kHz. If the power dissipated in the dielectric is 500 μW, determine (a) the loss angle, (b) the equivalent series loss resistance, and (c) the equivalent parallel loss resistance.
//initializing the variables:
P = 500E-6; // in Watt
C = 2000E-12; // in Farads
V = 20; // in Volts
f = 10000; // in Hz
//calculation:
//power loss = w*C*V^2*tan(del)
//loss angle
del = atan(P/(2*%pi*f*V*V*C))
//for an equivalent series circuit,
//tan(del) = (Rs*w*Cs)
Cs = C
Cp = C
Rs = (tan(del))/(2*%pi*f*Cp)
//for an equivalent parallel circuit
//tan(del) = 1/(Rp*w*Cp)
Rp = 1/(2*%pi*f*Cp*tan(del))
printf("\n\n Result \n\n")
printf("\n (a)loss angle %.6f rad.",del)
printf("\n (b)series resistance %.2f ohm.",Rs)
printf("\n (c)parallel resistance %.2E ohm.",Rp) |
73da039fafd1eeefcb6779afc0e8f70a7b344fd7 | 5c35e3133eb6ed4ccd14a5eaf3672132a6d88abc | /res/input.tst | 5dd714cea03022ea09b7f66d74a98c4885b8fbe3 | [] | no_license | myasnikovsg/NeuralNetwork | 72ebb5edebc14ca5d47fbbf7746975cde89d82c4 | 417c8b795c4b7897d0ccfa0b5c2ce38070393fa7 | refs/heads/master | 2020-06-06T11:10:29.609547 | 2014-01-15T13:49:49 | 2014-01-15T13:49:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 40 | tst | input.tst | 8
0.0 0.0
1.0 0.0
0.0 1.0
1.0 1.0 |
4c96420a7d3547cc7fecd733f38d6827f003fcb4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /887/CH14/EX14.6/14_6.sce | 885911ba16bb1350f49b5747fd47545f37fdad6e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 156 | sce | 14_6.sce | clc
//initialisation of variables
SR= 0.5 //V/us
Vcon= 12 //V
//CALCULATIONS
f= SR*1000/(2*%pi*Vcon)
//RESULTS
printf ('full power = %.2f kHz ',f)
|
bc1516779dc2ae9aaa71a9be40531623b3fb4c38 | bc0a6b4d5e326bd35c72bec024b555ed91a1c543 | /ellipse.sce | 0877669e2acb342f5420ed60b30e7cead1527876 | [] | no_license | askmrsinh/SEM1_AM | 0c9e7b4a51caa1321d1203cf9060e454b685e0ee | 31da57ba40d0741b370dd3c789a1dfec5c99bdea | refs/heads/master | 2021-09-28T03:09:18.743057 | 2016-08-18T15:01:52 | 2016-08-18T15:01:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 166 | sce | ellipse.sce | //(x^2)/(a^2) + (y^2)/(b^2)=1
a=1;
b=2;
x=-1:.0001:1;
y=(b/a)*sqrt((a^2)-(x^2));
plot(x,y)
plot(x,-y)
legend('(x^2)/(a^2) + (y^2)/(b^2)=1')
title('ELLIPSE')
|
4c4b611a5f8c68e043f50d0c820cdad840b27db3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /257/CH6/EX6.25/example6_25.sce | a9ff30b86ed4f734f94ec6dabc2200a408be08d1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 348 | sce | example6_25.sce | syms G1 G2 G3 G4 G5 H2 H3;
T1=G1*G3*G2;
T2=G1*G3*G5;
T3=G4*G2*G3;
T4=-G4*G2*G5*G3*H2
L1=-G2*H3;
L2=-G3*H3;
L3=-G5*H2*H3*G3;
L4=-G1*G2*G3;
L5=-G1*G3*G5;
L6=-G2*G3*G4;
L7=G2*G3*G4*G5*H2;
delta=1-(L1+L2+L3+L4+L5+L6+L7)
del1=1;
del2=1;
del3=1
del4=1;
TF=(T1*del1 + T2*del2 + T3*del3 + T4*del4)/delta ;
disp(TF,"C/R = ")
|
ed7b140aa1f5b842c4e06ce655c1fbf6fe53d866 | 449d555969bfd7befe906877abab098c6e63a0e8 | /728/CH8/EX8.3/Ex8_3.sce | bf7dd832e89a91ab6890cf4c6562f81e3be853a7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 398 | sce | Ex8_3.sce | //Caption:Calculate (i)-input power in watts,(ii)-output power in watts, (iii)-efficiency
//Exa:8.3
clc;
clear;
close;
n=2;
V_o=300;//in volts
I_o=20*10^-3;//in A
V_i=40;//in volts
J=1.25;//J(X')
P_dc=V_o*I_o;
P_ac=2*V_o*I_o*J/(2*n*%pi-%pi/2);
eff=(P_ac/P_dc)*100;
disp(P_dc,'Input power (in watts) =');
disp(P_ac,'Output power (in watts) =');
disp(eff,'Efficiency (in percent) ='); |
b4b6a8722a83decc21d379fc1cd3e516a85e6c30 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1319/CH10/EX10.3/10_3.sce | 8dfe7ebb20539fb31d16e3c679a468e34b6b1495 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 709 | sce | 10_3.sce | //Detemine the load and pf of the other machine
clc;
clear;
Pa=3000*(10^3);// Lighting load
Pma=5000*(10^3); // Aggregate Motor load
pfm=0.71; // power factor of motor load
P1a=5000*(10^3); // One Machine load
pf1=0.8;// Power factor machine 1 (lagging)
Pta=Pa+Pma; // Total load active power requirement
// Reactive power
Pr=0; // Lighting
Pmr=Pma*tand(acosd(pfm)); // Motor
P1r=P1a*tand(acosd(pf1)); // Machine 1
P2a=Pta-P1a; // Active power by other machine
P2r=Pr+Pmr-P1r; // Reactive power by other machine
pf2=cosd(atand(P2r/P2a)); // Power factor of other machine
printf('The other machine supplies:\n')
printf(' A load of %g kw at a p.f of %g\n',P2a/1000,pf2)
|
b68431026d2d0b336b131f9602ad719517e6179f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3648/CH19/EX19.5/Ex19_5.sce | 72f1dcd6f7418f9e1eec7c591393d7f9ec2f645a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 366 | sce | Ex19_5.sce | //Example 19_5
clc();
clear;
//To find the time constant of the circuit and the final energy stored
l=0.5 //Units in H
r1=2 //Units in Ohms
r2=4 //Units in Ohms
r=r1+r2 //Units in Ohms
l_r=l/r //Units in sec
i=2 //Units in A
ene=0.5*l*i^2
printf("The time constant is L/R=%.4f Sec\n The energy stored is=%d J",l_r,ene)
|
4f81b5387067702a22ec1f5068e05aa3d7fba739 | 207c864c3f938783d617dca78232e70445ae21e6 | /Ch8_I.sce | 86f29903b6a053e3f617afd9d6d7065afec60db5 | [] | no_license | raresica/CalculNumeric | a211a57fd4851e546c0b5eb866b3b228534a982c | 5564822ff9f5dab745208898ef9162322b28bff2 | refs/heads/master | 2021-02-11T05:03:13.720791 | 2020-04-15T10:42:58 | 2020-04-15T10:42:58 | 244,457,154 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 339 | sce | Ch8_I.sce | --> A=[5 3 -11; 4 -5 4; 3 -13 19]
A =
5. 3. -11.
4. -5. 4.
3. -13. 19.
--> [L,U,P]=lu(A)
L =
1. 0. 0.
0.6 1. 0.
0.8 0.5 1.
U =
5. 3. -11.
0. -14.8 25.6
0. 0. 1.421D-15
P =
1. 0. 0.
0. 0. 1.
0. 1. 0.
|
58de05287fffe07a3209eaba4c562455d7e92f4a | 4058f38b392324aa5099819881f3c7d7219a174f | /3 bit Shift Register/PISO_using_cd4014bm/PISO ic cd4014bm XCOS/cmd_shift_in_xcos.sci | a4ccbc560435e37b6f2b604712bb837facc73c6c | [] | no_license | anupma-s/Scilab-Xcos-Arduino-Digital-Circuits | 612a033422bf14e2e58bcdce371f15cafb30224f | 2b4bf8e8f155d20a5eda2feb31c5523a51569d73 | refs/heads/master | 2021-01-20T17:20:13.073180 | 2016-07-04T15:25:07 | 2016-07-04T15:25:07 | 62,569,455 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,688 | sci | cmd_shift_in_xcos.sci | function[y]=cmd_shift_in_xcos(dataPin,clockPin,latchPin,ledPin,clockLed)
dataPinout=O;
cmd_digital_out(1,latchPin,1)// parallel load mode
for j=1:10 //to perform 10 iterations of parallel loading
disp('Give input, Parallel load mode')
sleep(2000)
cmd_digital_out(1,clockPin,1) //positive edge of clock pulse
disp('Inputs stored, Serial shift mode:')
sleep(500)
cmd_digital_out(1,clockPin,0)//negative edge of clock pulse
cmd_digital_out(1,latchPin,0)// serial out mode
value=zeros(1,8);//matrix representing 8 bit number
value2=zeros(8,8);
for i=1:8
dataPinout=cmd_digital_in(1,dataPin);//reads input at the dataPin given by the register as its LSB
disp(dataPinout);
if(dataPinout==1)
cmd_digital_out(1,ledPin,1); //Led glows
sleep(100);
else if(dataPinout==0)
cmd_digital_out(1,ledPin,0);
sleep(100);
end
end
value2(i,i)=cmd_digital_in(1,dataPin); //sets the (i,i)th element of 8x8 zeros matrix as the logic level of the serial data out of register
value = value | value2((i),:);
cmd_digital_out(1,clockPin,1); cmd_digital_out(1,clockLed,1);
sleep(100);
cmd_digital_out(1,clockPin,0);cmd_digital_out(1,clockLed,0);
end
cmd_digital_out(1,latchPin,1);
y=value;
disp(y);
end
endfunction
|
2428fc3cb41f2b2f111bcecd2b5488a15dfd5651 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2489/CH8/EX8.4/8_4.sce | 7f2abd809f8d72d28ec54441d340be6de46aebbd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 194 | sce | 8_4.sce | clc
//Intitalisation of variables
clear
R= 1.987 //cal
T= 25 //C
p= 23.76 //mm
//CALCULATIONS
dF= R*(273.2+T)*log(760/p)
//RESULTS
printf ('Free energy change = %.f cal mole^-1',dF+1)
|
308194a0ec7e1181c36f93855962bb4a13b2f444 | 449d555969bfd7befe906877abab098c6e63a0e8 | /575/CH9/EX9.3.1/9_3_1.sce | dc1be6f4d2f09cd83bd032035e825f0e86aaad5a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 294 | sce | 9_3_1.sce | clc
pathname=get_absolute_file_path('9_3_1.sce')
filename=pathname+filesep()+'931.sci'
exec(filename)
printf(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
Hr=5*HCO2+6*HH2O-HC5H12
printf(" \n Heat of the rxn= %f KJ/mol",Hr) |
421e35faff5b91e29681246c19171c53f005adb5 | 86b07272c2e128fdec8e3fb2a793cd56b3f8876d | /test/scenarios/set-max-cap.sce | 431cb5fbe2d02b301b05aaf41d22a84ea3cdd081 | [
"MIT"
] | permissive | jimjag/ls-qpack | f582623269c38006f997ab5ac1bd597d960dcc19 | 79c136923681d7187feade455225543335525c3f | refs/heads/master | 2023-06-01T08:21:41.291968 | 2023-05-26T12:37:58 | 2023-05-26T12:37:58 | 211,070,438 | 0 | 0 | MIT | 2019-09-26T11:13:34 | 2019-09-26T11:13:34 | null | UTF-8 | Scilab | false | false | 139 | sce | set-max-cap.sce | TABLE_SIZE=256
ANNOTATIONS=1
QIF=$(cat<<'EOQ'
dude nude
dude nude
dude where is my car?
## t 0
one fish
two fish
red fish
blue fish
EOQ
) |
e3e48d53a53b4534b5d03977bb5981eef6d9ec3f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3740/CH5/EX5.5/Ex5_5.sce | 514b322d2fca86f9f1c4ecfb8ae51fc0911b7189 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex5_5.sce | //Optoelectronics - An Introduction, 2nd Edition by J. Wilson and J.F.B. Hawkes
//Example 5.5
//OS=Windows XP sp3
//Scilab version 5.5.2
clc;
clear;
//given
lambda=0.84e-6;//wavelength in m
DeltaNu=1.45e13;//Transition linewidth in Hz
Gamma=3.5e3;//Loss coefficient in m^(-1)
n=3.6;//Refractive index of GaAs medium
n1=1;//Refractive index of air medium
l=300e-6;//Length in m
d=2e-6;//Diameter in m
etai=1;//Internal quantum efficiency
e=1.6e-19;//Electronic charge in C
R=((n-n1)/(n+n1))^2;//Reflectance at GaAs/air interface by Fresnel equation
mprintf("\n R = %.2f",R);
Kth=Gamma+1/(2*l)*log(1/R^2);//Threshold gain in m^(-1)
mprintf("\n Kth = %.1f m^(-1)",Kth);//The answers vary due to round off error
Jth=8*%pi*e*d*DeltaNu*(n^2)/(etai*(lambda^2))*Kth;//Threshold current density in A m^(-2)
mprintf("\n Jth = %.1f A mm^-2",Jth/1e6);//Dividing by 10^6 to convert into A mm^(-2)
//The answers vary due to round off error
|
08ab5883834f8f379eb02bd7af191fffedfc850d | 449d555969bfd7befe906877abab098c6e63a0e8 | /61/CH12/EX12.1/ex12_1.sce | e9642895e25068ab89d20d7077af6816c0610424 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 178 | sce | ex12_1.sce | //ex12.1
A_ol=100000; //open loop voltage gain
A_cm=0.2; //common mode gain
CMRR=A_ol/A_cm;
CMRR_dB=20*log10(CMRR);
disp(CMRR,'CMRR')
disp(CMRR_dB,'CMRR in decibels') |
b4a4d92b678cd97eeaedc51d02f9766bdae6d12a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3776/CH6/EX6.4/Ex6_4.sce | 98157a320962afc522b7828ba226eff85dc83632 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 526 | sce | Ex6_4.sce | clear
//Given
l = 400 //mm - Length
b = 300 //mm - breath
F = 20 //KN _ the force applied on the beam
F_d = 0.75 //KN-m - The force distribution
d = 2 //mt - the point of interest from the free end
//calculations
//From moment diagram
M = F*d - F_d*d*1
I = b*(l**3)/12 //mm4 - Bending moment diagram
c = l/2 // the stress max at this C
S = I/c //The maximum shear stress
shear_max = M*(10**6)/S //MPa - the maximum stress
printf("\n The maximum stress at 2 mt is %0.2f MPa",shear_max)
|
202d5e2845cf2dfbe264479a3aebdf82ab845b77 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2606/CH9/EX9.8/ex9_8.sce | 1ad9e434f8c0695bc8383cda3353135fd62c6cc8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | ex9_8.sce | //Page Number: 9.15
//Example 9.8
clc;
//Given
p=0.99;
u=1;
q=1-p;
//As exp(-Ac^2/4*n*B)=1-p
//AndAC^2/2*n*B=S/N
//Therefore exp(-(1/2)*(S/N))=1-p
SN=2*(log(1/q));
SN1=(round(SN)+1); //Upper limit
disp('db',SN1,'S/N:');
//Hence proved
|
2a085d8d0cc61d65b1cadccd5c4c391a197b5fb0 | 1489f5f3f467ff75c3223c5c1defb60ccb55df3d | /tests/test_bundle_1_x.tst | 576e8eb8fdc1d5063090ffd41c211f6b87f82317 | [
"MIT"
] | permissive | ciyam/ciyam | 8e078673340b43f04e7b0d6ac81740b6cf3d78d0 | 935df95387fb140487d2e0053fabf612b0d3f9e2 | refs/heads/master | 2023-08-31T11:03:25.835641 | 2023-08-31T04:31:22 | 2023-08-31T04:31:22 | 3,124,021 | 18 | 16 | null | 2017-01-28T16:22:57 | 2012-01-07T10:55:14 | C++ | UTF-8 | Scilab | false | false | 38 | tst | test_bundle_1_x.tst | adding "~temp.jpg"
append "~temp.png"
|
e123f4ca743d90b10467a8a6692800d761d5a31b | 717ddeb7e700373742c617a95e25a2376565112c | /3424/CH5/EX5.5/Ex5_5.sce | 437ff2835edd77644a066c5b832e0a0a5f3308f7 | [] | 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 | 303 | sce | Ex5_5.sce | clc
//Initialization of variables
D = 1.94 // slugs/ft^3
A1 = 0.06 //ft^2
V1 = 10 // ft/s
// Calculations
Fax = -D*A1*(V1)^2
Faz = D*A1*(V1)^2
// Results
printf (" the force required in x direction is %.2f(1-cosT) lb",Fax)
printf ("\n the force required in z direction is %.2f(sinT) lb",Faz)
|
9a0dc089a063ac7f025358ec1568e46d045bb1b6 | 09fb666c0701b49ab031e9c772024f96f6ed1c7e | /Lab 7/laboratorio7.sce | 062ceb368ac70b08411ac3cf34dedaae913fa736 | [] | no_license | Alejandro287/Numerica_Methods | ccbf8fa032809f6f6398a0f8100a268a750d8491 | 968f6cf10b651ff1049855a677753e6b2a44ca26 | refs/heads/master | 2020-04-02T02:45:35.586981 | 2018-10-20T16:38:01 | 2018-10-20T16:38:01 | 153,926,195 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 567 | sce | laboratorio7.sce | format(12)
function dy = f(t,y)
dy = y - t^2 + 1
return dy
endfunction
function yt = y(t)
yt = (t+1)^2 -0.5*%e^t
return yt
endfunction
clc
disp("> La aproximación a la solución de la ecuación diferencial")
disp(" usando el método de Euler es: ")
E = UN_ecua_dif_Euler(0,0.5,1,10)
disp(E)
disp("> La aproximación a la solución de la ecuación diferencial")
disp(" usando el método de Runge-Kutta es: ")
RK4 = UN_ecua_dif_RK4(0,0.5,1,10)
disp(RK4)
disp("> El valor de la solución exacta de la ecuación diferencia es: ")
disp(y(1))
|
1f3695bc78ef2bc4a9c2d26e5f7192aeff85e791 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronic_Measurements_And_Instrumentation_R._K._Rajput_2096.zip/Electronic_Measurements_And_Instrumentation_R._K._Rajput_2096/CH1/EX1.4.b/ex_1_4_b.sce | 4d580add9159b773f77b862cd2af16d822f44011 | [] | 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 | 205 | sce | ex_1_4_b.sce | errcatch(-1,"stop");mode(2);
// Example 1.4.b :correction
,
// given :
vm=42; // pressure in bar
vt=41.4; // pressure in bar
Es=vm-vt;
Cs=-Es;
disp(Cs,"static corrction,Cs = (bar)")
exit();
|
f53577f00c4db960d98869623d4833a268abb76d | 449d555969bfd7befe906877abab098c6e63a0e8 | /75/CH6/EX6.1/ex_1.sce | 76c04902460736c837dd9c6cb91c6e0c36408482 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 128 | sce | ex_1.sce | // PG (334)
// dy/dt=-y
function ydot=f(y,t),ydot=-y,
endfunction
y0=0;t0=0;t=0:1:%pi;
y=ode(y0,t0,t,f)
plot(t,y) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.