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
36889e8f45e268d8522bfcf5bee21ed1b8a80e3b
bbc11c0776778eadc6701c4eedfe19ae8dfa1584
/scilab/euler.sci
8b433a2655837c3a43fea84a65aa08448542f216
[]
no_license
ceconelli/Metodos-Computacionais
842eeebf11cc74acc66fa08d7ca67f9c45f3b268
07f4326c4821facaf5989f89d5d959f8000e062c
refs/heads/master
2020-06-03T03:23:51.762483
2017-06-12T16:12:12
2017-06-12T16:12:12
94,114,311
0
0
null
null
null
null
UTF-8
Scilab
false
false
364
sci
euler.sci
function[VetX,VetY]=euler(a,b,m,y0) h = (b-a)/m; x = a; y = y0; deff('[Fxy]=f(x,y)','Fxy=(1.5*10⁴)/(5*10⁸)-(1.5*10^(-3)+3*10^(-4))*C'); Fxy = feval(x,y,f); VetX(1) = x; VetY(1) = y; for i=1:m x = a + i*h; y = y + h*Fxy; disp(i,x,y,Fxy); VetX(i+1) = x; VetY(i +1) = y; end endfunction
b0c7e4f3a3442f29366697689b5bd868e8200d59
449d555969bfd7befe906877abab098c6e63a0e8
/1133/CH9/EX9.20/Example9_20.sce
12268deb181964f0012d535a8f2d7b913d84f7b5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
613
sce
Example9_20.sce
//Example 9.20 clc disp("The requirement is that the door must be open for 15 sec after receiving a trigger signal and then gets shut door automatically. This requires IC 555 in a monostable mode with a pulse width of 15 sec.") disp("Therefore, W = 15 sec") disp("Now W = 1.1 RC") disp("Therefore, 15 = 1.1 RC") disp("Choose C = 100 uF") r=(15/(1.1*100*10^-6))*10^-3 format(8) disp(r,"Therefore, R(in k-ohm) =") disp("The designed circuit is shown in the fig. 9.80") disp("The supply voltage 10 or 15 V has no effect on the operation of the circuit or the values of R and C selected.")
120843fc6cd456a21e3d0e9f041f2797d6a8bfc3
449d555969bfd7befe906877abab098c6e63a0e8
/3733/CH32/EX32.10/Ex32_10.sce
4ec762a2d105d0a6e70836d715e56a2d2237c227
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
597
sce
Ex32_10.sce
// Example 32_10 clc;funcprot(0); //Given data ML=30;// Maximum load in MW ml=10;// Minimum load in MW L_p=72;// Peak load in MWh/day // Calculation // From Fig.Prob.32.10 // Area BGFA=(1/2)*xy-72; // FED=(1/2)*(20-x)*(24-y); function[X]=capacity(y) X(1)=(y(1)*y(2)-144)-(0.45*(20-y(1))*(24-y(2))); X(2)=(y(1)/y(2))-(20/24); endfunction y=[1 1]; z=fsolve(y,capacity); x=z(1);// Hydel capacity in MW Spc=ML-x;// Steam plant capacity in MW printf('\nHydel plant capacity=%0.0f MW \nSteam plant capacity=%0.0f MW',x,Spc); // The answer provided in the textbook is wrong
7fd6a74de4b3864420f794a10565e29b14fecd67
676ffceabdfe022b6381807def2ea401302430ac
/solvers/CompressibleFlowSolver/Tests/Perturbation_M15_square_CBC_par.tst
d31cea239a884e4f5af5b1a258b2027494ea8444
[ "MIT" ]
permissive
mathLab/ITHACA-SEM
3adf7a49567040398d758f4ee258276fee80065e
065a269e3f18f2fc9d9f4abd9d47abba14d0933b
refs/heads/master
2022-07-06T23:42:51.869689
2022-06-21T13:27:18
2022-06-21T13:27:18
136,485,665
10
5
MIT
2019-05-15T08:31:40
2018-06-07T14:01:54
Makefile
UTF-8
Scilab
false
false
1,204
tst
Perturbation_M15_square_CBC_par.tst
<?xml version="1.0" encoding="utf-8"?> <test> <description>Euler, pressure perturbation to test RiemannInvariant CBC supersonic, parallel</description> <executable>CompressibleFlowSolver</executable> <parameters>--use-scotch Perturbation_M15_square_CBC_par.xml</parameters> <processes>3</processes> <files> <file description="Session File"> Perturbation_M15_square_CBC_par.xml</file> <file description="Restart File"> Perturbation_M15_square_CBC_par.rst</file> </files> <metrics> <metric type="L2" id="1"> <value variable="rho" tolerance="1e-12">0.0910004</value> <value variable="rhou" tolerance="1e-12">40.244</value> <value variable="rhov" tolerance="1e-12">0.0038368</value> <value variable="E" tolerance="1e-12">23023.8</value> </metric> <metric type="Linf" id="2"> <value variable="rho" tolerance="1e-12">0.364797</value> <value variable="rhou" tolerance="1e-12">161.179</value> <value variable="rhov" tolerance="1e-12">0.431771</value> <value variable="E" tolerance="1e-12">92248.6</value> </metric> </metrics> </test>
beaf1296253ae621141fa2e523e3448a600f06a0
d928b1aab410da87208944a0d34890254d7b7897
/Design Exp 1/Not8.tst
46edc9ad3921f757a1d4d820ad14d4dbc62f2681
[]
no_license
karthikswarna/CS4110-Computer-System-Design-Lab
e19a0d9d69ca666acfe054b5058e7355a32a62fe
2fd40644f2dbf79624a736f267aecf057477e6dc
refs/heads/master
2023-02-06T16:11:02.458719
2020-12-28T08:31:30
2020-12-28T08:31:30
292,209,978
0
0
null
null
null
null
UTF-8
Scilab
false
false
261
tst
Not8.tst
load Not8.hdl, output-file Not8.out, compare-to Not8.cmp, output-list in%B1.8.1 out%B1.8.1; set in %B00000000, eval, output; set in %B11111111, eval, output; set in %B10101010, eval, output; set in %B00111100, eval, output; set in %B00010010, eval, output;
7297bcd0eb733d5a9f9fc6aad9407750ea69c60f
449d555969bfd7befe906877abab098c6e63a0e8
/1673/CH7/EX7.1/7_1.sce
f82cba223821be4c5ea8b341f10e8882604afef7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
207
sce
7_1.sce
//example 7.1 //inverse of matrix //page 256 clc;clear;close; A=[1,2,3;0,1,2;0,0,1]; A_1=1/A//inverse of matrix for i=1:3 for j=1:3 printf('%d ',A_1(i,j)) end printf('\n') end
c89eda0965f7732a5222a6f6948695455ed329d5
b29e9715ab76b6f89609c32edd36f81a0dcf6a39
/ketpic2escifiles6/Powersum.sci
b23dfdc8e2bf01fb148f24823afd344759ad3632
[]
no_license
ketpic/ketcindy-scilab-support
e1646488aa840f86c198818ea518c24a66b71f81
3df21192d25809ce980cd036a5ef9f97b53aa918
refs/heads/master
2021-05-11T11:40:49.725978
2018-01-16T14:02:21
2018-01-16T14:02:21
117,643,554
1
0
null
null
null
null
UTF-8
Scilab
false
false
291
sci
Powersum.sci
// 09.03.12 function Out=Powersum(varargin) Nargs=length(varargin); COEFF=varargin(1); x=varargin(2); if Nargs>2 x=x-varargin(3); end; NL=Mixop(1,COEFF); A=Mixop(2,COEFF); Upto=min(size(NL,2),size(A,2)); NL=NL(1:Upto); A=A(1:Upto); Out=sum(A.*x^NL); endfunction;
c0c55a5b1279eaa3741c75e8ee525a20abe7273d
71ad8ef6fba3006cf2e7d8d16a3e2451b2df7459
/classifiers/simple_classifier.sci
3e8568985f580801ae1cfe068dd03a88ff4a1e33
[]
no_license
carloscdias/aln_reconhecimento_faces
ec356608bba71e74bc7c275707fa03ec33522629
7e14c443b60fd513cc1e410c6632aaaa87c40679
refs/heads/main
2023-05-02T09:29:46.151745
2021-05-18T20:00:14
2021-05-18T20:00:14
364,701,815
1
1
null
2021-05-18T20:00:15
2021-05-05T20:46:40
Scilab
UTF-8
Scilab
false
false
2,082
sci
simple_classifier.sci
/** * Classifies a given column-vector into a class in 'model_labels' * according to the minimum distance given by 'fn_distance' between the x and * each row in 'model' * * x: image to be classified * model: matrix of all known images as column-vectors * model_labels: vector where the ith element corresponds to the label of the * ith column in 'model' * fn_distance: function used to calculate distance between two vectors * * class: predicted class/label of image given by 'x' * projection: column-vector image as seen by the 'model' glass */ function [class, projection] = simple_classifier(x, model, model_labels, fn_distance) model_size = size(model, 2); min_distance = %inf; for i = 1:model_size distance = fn_distance(model(:, i), x); if distance < min_distance then min_distance = distance; class = model_labels(i); projection = model(:, i); end end endfunction /** * Same as 'simple_classifier' but with default 'manhattan_distance' */ function [class, projection] = simple_classifier_manhattan(x, model, model_labels) [class, projection] = simple_classifier(x, model, model_labels, manhattan_distance); endfunction /** * Same as 'simple_classifier' but with default 'euclidean_distance' */ function [class, projection] = simple_classifier_euclidean(x, model, model_labels) [class, projection] = simple_classifier(x, model, model_labels, euclidean_distance); endfunction /** * Builds a simple model with available 'train_indexes' * * train_indexes: vector of indexes used to build the model * dataset: matrix of all column-vector images available * labels: vector where the ith element corresponds to the label of the * ith column in 'dataset' * * model: column-vector images that the classifier knows * model_labels: labels that the classifier knows */ function [model, model_labels] = simple_classifier_model(train_indexes, dataset, labels) model = dataset(:, train_indexes); model_labels = labels(train_indexes); endfunction
8be31ce473d0c6ece3a05ac57e9ec6a6ef974b80
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.4/examples/intersci-examples/ex8.sce
bd00bfef82269c5e1c112dbf9bcf8d8bc5f242c4
[ "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
500
sce
ex8.sce
//1-Creating interface source file (matusr.f) // from ex8fi.desc file by call to intersci // Making object files // Interface file '/tmp/ex8fi.o' // User's files '/tmp/ex8c.o'; files=G_make(['/tmp/ex8fi.o','/tmp/ex8c.o'],'ex8.dll'); //2-Link object files .o with addinter //addinter(files,'ex8fi',matusr_funs); exec('ex8fi.sce'); //Test Scilab functions: //calc8: matrix of integer type created by C function (malloc and free). a=calc8(); if norm(a - matrix(0:14,3,5)) > %eps then pause,end
a6e247994e3b05972ac98e5be8ffb07026b92e0a
f4cfee6e4201b01843e6de00cc439883a49aa4f1
/my scilab files/yogesh5.sce
df8dd2e1e711479334801c6eb39e93606c2eb94b
[]
no_license
yogeshkhatana/All_programming_language_files
a17bb49ea4d3aef2b667bdbb03f3af5c4224b0d1
bec946abcf8e69a6e6ebc568d14db73c52029170
refs/heads/master
2022-11-19T09:05:08.861581
2020-07-24T17:40:32
2020-07-24T17:40:32
282,181,013
0
0
null
null
null
null
UTF-8
Scilab
false
false
310
sce
yogesh5.sce
x=[30 40 30 50 20 60] y=[1 2 3 4 5 6] subplot(3,1,1) bar(x,y,'c') xlabel('x-axis') ylabel('y-axis') xtitle('Bargrap 1') xgrid() subplot(3,1,2) bar(x,y,'c') xlabel('x-axis') ylabel('y-axis') xtitle('bargraph 2') xgrid() subplot(3,1,3) bar(x,y,'c') xlabel('x-axis') ylabel('y-axis') xtitle('bargraph 3') xgrid()
ba0dfce560d32f0332dd3d61eec2cbea1dd0dbee
6eb42df0d9f452fee0d084e0b0058e4e4ac242ef
/Updated_Exercises_March_2015/Exercise 9/Refraction.sce
45c9d8d1b989eefdceb426ef7938dece854118d2
[]
no_license
huangqingze/ocean_modelling_for_beginners
b21c1b398efe91e4a3aa1fa5a1d732e2eb4ec16e
3e73a511480c73f4e38b41c17b2defebb53133ed
refs/heads/main
2023-07-03T12:00:01.326399
2021-08-14T21:16:12
2021-08-14T21:16:12
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,218
sce
Refraction.sce
//******************************************* // This is the Scilab script for Exercise 9. // // Use the help facility for more information // on individual functions used. // // Author: J. Kaempf, 2015 (updated) //******************************************** clf; scf(0); a=gcf(); a.figure_size= [1500,500]; // read input data eta=read("eta.dat",-1,201); eta0=read("eta0.dat",-1,201); h0=read("h0.dat",-1,201); x = (1:1:201)'; y = (1:1:51)'; // location vectors ntot = 100; // total number of frames for n = 1:100 // animation loop drawlater; clf; // grab respective data block jtop = (n-1)*51+1; jbot = jtop+50; etac = eta(jtop:jbot,1:201); etacc = etac-eta0; // exclude unwanted data from plot for j = 1:51; for k = 1:201; if h0(j,k) < 0; etacc(j,k) = %nan; end; end; end; plot3d(x,y,-0.6*h0',-70,50-5,'',[5,1,0]); plot3d(x,y,15*etacc',-70,50-5,'',[4,5,3],ebox=[0,200,1,51,-20,20]) drawnow(); // save frames as GIF files (optional) //if n < 10 then // xs2gif(0,'ex100'+string(n)+'.gif') //else // if n < 100 then // xs2gif(0,'ex10'+string(n)+'.gif') // else // xs2gif(0,'ex1'+string(n)+'.gif') // end // end end; // end of animation loop
b13879ee30e75addd375adf972ac9c3cde4efa73
449d555969bfd7befe906877abab098c6e63a0e8
/1691/CH5/EX5.12/exmp5_12.sce
9e3eb68076ebae1095efafb20df3746ac54f247c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
544
sce
exmp5_12.sce
//Example 5.12 clc fr=1/(2*%pi*sqrt(100*1000*10^-18)) format(8) disp(fr,"(i) Resonant frequency f_r(in kHz) = 1 / 2*pi*sqrt(L*C) =") disp("(ii) Tank circuit impedance at resonance can be given as") rp=((100*10^6)/5000)*10^-3 disp(rp,"R_P(in k-ohm) = L / C*R =") av=(-5*10^-3)*((500*20*10^3)/(520)) format(6) disp(av,"(iii) A_v = -g_m*R_L = -g_m*(r_d||R_P) =") bw=(5/(2*%pi*100*10^-6))*10^-3 disp("(iv) BW = f_r/Q") disp(" BW = f_r*R / omega_r*L Therefore, Q = omega_r*L / R") disp(bw," BW(in kHz) = R / 2*pi*L =")
b44d581cb8427e84a9783d6c6c26adb16cf0c83f
449d555969bfd7befe906877abab098c6e63a0e8
/3507/CH11/EX11.4/Ex11_4.sce
f2c1b38bb52c2f77241d2bb03410f295f41e4078
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
134
sce
Ex11_4.sce
//chapter11 //example11.4 //page205 Ic=0.95 Ib=0.05 Ie=Ib+Ic alpha=Ic/Ie printf("amplification factor = %.3f \n",alpha)
519fce3766f0be30518f8ec8243ab86244f3a36a
449d555969bfd7befe906877abab098c6e63a0e8
/3636/CH4/EX4.7/Ex4_7.sce
26ecf12e3a389e5eeba165f6475d54503e3a1b3d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,124
sce
Ex4_7.sce
clc; clear; delp=4*10^14 //excess EHP in cm^-3 deln=4*10^14 //excess EHP in cm^-3 n0=10^15 //donor atoms in cm^-3 p0=0 //in cm^-3 t=0.5*10^-6 //hole-lifetime in s myu_n=1200 //mobility of electron in cm^2/V*s myu_p=400 //mobility of hole in cm^2/V*s q=1.6*10^-19 //electron charge in eV ni=1.5*10^10 //in cm^-3 Const=0.0259 //constant value for kT in eV //Calculation //a) gop=delp/t //b) rho_0=(q*n0*myu_n)^-1 //Before illumination n=n0+deln //in cm^-3 p=p0+delp //in cm^-3 rho=1/(q*((myu_n*n)+(myu_p*p)))//conductivity rho1=q*myu_p*delp //in mho/cm Pcond=(rho*rho1)*100 //c) delE_e=Const*log(n/ni) delE_h=Const*log(p/ni) mprintf("a)\n") mprintf("photo generation rate= %g EHPs/cm^3s\n",gop) mprintf("b)\n") mprintf("resistivity before illumination= %1.2f ohm-cm\n",rho_0) mprintf("resistvity after illumination= %1.3f ohm-cm\n",rho) mprintf("percent of conductivity= %1.2f percent\n",Pcond) //The answers vary due to round off error mprintf("c)\n") mprintf("quasi Fermi level due to electron=Efi+%0.3f eV\n",delE_e) mprintf("quasi Fermi level due to holes=Efi-%0.3f eV\n",delE_h)
424e237165a40f5add0536fe1de161baa3bb9f11
1bb72df9a084fe4f8c0ec39f778282eb52750801
/test/B01.prev.tst
8085931f0ee4fbb6c32b7cbb16d0097b4544ff49
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gfis/ramath
498adfc7a6d353d4775b33020fdf992628e3fbff
b09b48639ddd4709ffb1c729e33f6a4b9ef676b5
refs/heads/master
2023-08-17T00:10:37.092379
2023-08-04T07:48:00
2023-08-04T07:48:00
30,116,803
2
0
null
null
null
null
UTF-8
Scilab
false
false
277
tst
B01.prev.tst
[0/1.0] - p^2 + 2*q^2 p0 q0: -p_0^2+2*q_0^2; success 0 {p=0, q=0} - trivial SOLUTION p1 q0: -1-4*p_0-4*p_0^2+8*q_0^2; failure constant=-1, vgcd=4 ? p0 q1: 1-2*p_0^2+4*q_0+4*q_0^2; failure constant=1, vgcd=2 ? p1 q1: 1-4*p_0-4*p_0^2+8*q_0+8*q_0^2; failure constant=1, vgcd=4 ?
5aa162e69900db1d452cc83197aef811b6a39bb5
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/taylorwin/taylorwin5.sce
0a0bb2ba1a390f80bcee022fc9de2e3924c14b1b
[]
no_license
deecube/fosseetesting
ce66f691121021fa2f3474497397cded9d57658c
e353f1c03b0c0ef43abf44873e5e477b6adb6c7e
refs/heads/master
2021-01-20T11:34:43.535019
2016-09-27T05:12:48
2016-09-27T05:12:48
59,456,386
0
0
null
null
null
null
UTF-8
Scilab
false
false
76
sce
taylorwin5.sce
//check o/p when nbar is negative w = taylorwin(6,-4); disp(w); ////output
b5d41ab3a073a4e5044150b166ebd60fb89b9816
449d555969bfd7befe906877abab098c6e63a0e8
/1970/CH16/EX16.4/CH16Exa4.sce
77304f67ba9d084c94e6023887bc5fc3ecfbab2a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
495
sce
CH16Exa4.sce
// Scilab code Exa16.4 : : Page-673 (2011) clc; clear; A = 80*10^6; // Activity, becquerel t_half = 6*3600; // Half life, s N = A*t_half/0.693; // Number of surviving radionuclei E_released = 0.9*N*(140e+03)*1.6e-19; // Energy released, joule m_l = 1.8; // Mass of liver of average man, Kg liv_dose = E_released*10^2/m_l; // Liver dose, centigray printf("\nThe requiresd liver dose = %3.1f cGy", liv_dose); // Result // The requiresd liver dose = 2.8 cGy
9880298193a1d45e23fc6daf5321f324971732f0
449d555969bfd7befe906877abab098c6e63a0e8
/1913/CH2/EX2.22/ex22.sce
88f1a7d9a1ca6e9e5735b8ed5d712f076771a271
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
871
sce
ex22.sce
clc clear //Input data h1=3000;//Specific enthalpy of steam at inlet in kJ/kg h2=2762;//Specific enthalpy of steam at the outlet in kJ/kg v1=0.187;//Specific volume of steam at inlet in m^3/kg v2=0.498;//Specific volume of steam at the outlet in m^3/kg A1=0.1;//Area at the inlet in m^2 q=0;//There is no heat loss z=0;//The nozzle is horizontal ,so no change in PE c1=60;//Velocity of the steam at the inlet in m/s //Calculations c2=[(2*1000)*((h1-h2)+(c1^2/2000))]^(1/2);//Velocity of the steam at the outlet in m/s m=(A1*c1)/v1;//Mass flow rate of steam in kg/s m1=m*3600;//Mass flow rate of steam in kg/hr A2=(m*v2)/c2;//Area at the nozzle exit in m^2 //Output printf('(a)Velocity of the steam at the outlet c2 = %3.2f m/s \n (b)Mass flow rate of steam m = %3.3f kg/s (or) %3.2f kg/hr \n (c)Area at the nozzle exit A2 = %3.4f m^2 ',c2,m,m1,A2)
104070148c07287914a6726c51c472b213fc77d6
7b040f1a7bbc570e36aab9b2ccf77a9e59d3e5c2
/Scilab/local/2dof_controller/dc/lqg/scilab/lqg_visc.sce
84b4769cf11e506e34d2a071f22bcdc4d780f5dd
[]
no_license
advait23/sbhs-manual
e2c380051117e3a36398bb5ad046781f7b379cb9
d65043acd98334c44a0f0dbf480473c4c4451834
refs/heads/master
2021-01-16T19:50:40.218314
2012-11-16T04:11:12
2012-11-16T04:11:12
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
400
sce
lqg_visc.sce
// Updated(19-7-07) // 13.6 // Viscosity control problem of MacGregor A = [1 -0.44]; dA = 1; B = [0.51 1.21]; dB = 1; C = [1 -0.44]; dC = 1; k = 1; int1 = 1; F = [1 -1]; dF = 1; V = 1; W = 1; dV = 0; dW = 0; rho = 1; getf lqg.sci; [R1,dR1,Sc,dSc] = lqg(A,dA,B,dB,C,dC,k,rho,V,dV,W,dW,F,dF); [Nu,dNu,Du,dDu,Ny,dNy,Dy,dDy,yvar,uvar] = ... cl(A,dA,B,dB,C,dC,k,Sc,dSc,R1,dR1,int1);
63a39f6d450407380ea7e9cd76b200a27f6e5877
449d555969bfd7befe906877abab098c6e63a0e8
/25/CH11/EX11.5/11_5.sce
7928608371e7971aae652ed95fc32008232b0d4d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
760
sce
11_5.sce
//example:-11.5,page no.-617. //program to determine the stability of the transistor by calculating k and |delta|. s11=0.894*expm(%i*(-60.6)*%pi/180); s21=3.122*expm(%i*(123.6)*%pi/180); s12=0.02*expm(%i*(62.4)*%pi/180); s22=0.781*expm(%i*(-27.6)*%pi/180); delta=(s11*s22)-(s12*s21); [mag_delta,theta_delta]=polar(delta); k=(1+(abs(delta)^2)-(abs(s11)^2)-(abs(s22)^2))/(2*abs(s12*s21)); Cl=conj(s22-delta*conj(s11))/(abs(s22)^2-abs(delta)^2); [mag_Cl,theta_Cl]=polar(Cl); Rl=abs(s12*s21)/(abs(s22)^2-abs(delta)^2); Cs=conj(s11-delta*conj(s22))/(abs(s11)^2-abs(delta)^2); [mag_Cs,theta_Cs]=polar(Cs); Rs=abs(s12*s21)/(abs(s11)^2-abs(delta)^2); disp([mag_Cl,theta_Cl]) disp([mag_Cs,theta_Cs]) disp(Rl) disp(Rs) disp("NOTE:-theta is in radian")
aaf613b3107cf877bc144cfb9156bcbda06d6864
449d555969bfd7befe906877abab098c6e63a0e8
/2579/CH3/EX3.22/Ex3_22.sce
9fb60bfe165b253cde6d2e62a3baef8da876c433
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
918
sce
Ex3_22.sce
//Ex:3.22 clc; clear; close; n=20; // d=y/2, where y is wavelength // FNBW=2y/nd, then // FNBW=2y/(n*y/2)=4/n radian FNBW=4/n;// beam width for broad side array in radian Fnbw=(180*FNBW)/%pi;// beam width for broad side array in degree HPBW=Fnbw/2;// the half power beam width for broad side array in degree // d1=y/4, for end fire array // then FNBW1=2*sqrt(2y/nd1) // FNBW1=2*sqrt(2y/(n*y/4))=2*sqrt(8/n) FNBW1=2*sqrt(8/n);// beam width for end fire array in radian Fnbw1=(180*FNBW1)/%pi;// beam width for end fire array in degree HPBW1=(2/3)*Fnbw1;// the half power beam width for end fire array in degree printf("The beamwidth for a broad side array = %f degree", Fnbw); printf("\n The half power beam width for broad side array = %f degree", HPBW); printf("\n The beam width for end fire array = %f degree", Fnbw1); printf("\n The half power beam width for end fire array = %f degree", HPBW1);
83d1c9b8e847671ac62b4defafb64467bf9d3a87
449d555969bfd7befe906877abab098c6e63a0e8
/1055/CH13/EX13.6/ch13_6.sce
c5300c971b046a0e23021f9b653c1f86e5f06fd0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,116
sce
ch13_6.sce
//Determine the fault current when (i)L-G (ii)L-L (iii)L-L-G fault takes place at P. clear clc; Vbl=13.8*115/13.2;// base voltage on the line side of transformer(kV) Vbm=120*13.2/115;// base voltage on the motor side of transformer(kV) Xt=10*((13.2/13.8)^2)*30/35;// percent reactance of transformer Xm=20*((12.5/13.8)^2)*30/20;// percent reactance of motor Xl=80*30*100/(120*120);//percent reactance of line Xn=2*3*30*100/(13.8*13.8);// neutral reactance Xz=200*30*100/(120*120); Zn=%i*.146;// negative sequence impedence Zo=.06767;// zero sequence impedence Z=%i*.3596;//total impedence Ia1=1/Z; Ia2=Ia1; Iao=Ia2; If1=3*Ia1; Ib=30*1000/(sqrt(3)*13.8); Ibl=30*1000/(sqrt(3)*120); Ifc=Ibl*abs(If1); Z1=%i*.146; Z2=Z1; IA1=1/(Z1+Z2) IA2=-IA1 L=(cosd(120)+ %i*sind(120)); IAo=0; IB=(L^2)*IA1 + L*IA2; IC=-IB; IF=abs(IB)*Ibl; Zo=%i*.06767; ia1=1/(Z1+(Zo*Z2/(Zo+Z2))); ia2=ia1*Zo/(Z2+Zo); iao=%i*3.553; If2=3*iao; IF2=abs(If2*Ibl); mprintf("Fault Current (i)L-G fault, If=%.0f amps\n ",Ifc); mprintf("(ii)L-L fault ,If=%.1f amps\n",IF); mprintf("(iii)L-L-G, If =%.0f amps\n",IF2);
4fac1ac24b4fd6967e51a089ea0e990187ffb358
449d555969bfd7befe906877abab098c6e63a0e8
/343/CH2/EX2.60/ex2_60.sce
79c3d4690d6ab24ba57c84f05f741db55a90f463
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
364
sce
ex2_60.sce
clc V=200; //Assigning values to parameters f=50; Ra=10; La=0.12; Rb=20; Cb=40*10^-6; Xla=2*%pi*f*La; Xcb=1/(2*%pi*f*Cb); Za=Ra+%i*Xla; Zb=Rb-%i*Xcb; Zeq=(Za*Zb)/(Za+Zb); [r,t]=polar(Zeq); Ia=V/Za; Ib=V/Zb; pf=cos(t); disp("Amperes",polar(Ia),"Branch current 1"); disp("Amperes",polar(Ib),"Branch current 2"); disp(real(pf),"power factor");
8e2b7346770e08dc64c2d38144cf25a3cf9a995c
449d555969bfd7befe906877abab098c6e63a0e8
/1739/CH2/EX2.10/Exa2_10.sce
2104ad5aeb6c15ec37247f24ba4956ccc2ec476c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
502
sce
Exa2_10.sce
//Exa 2.10 clc; clear; close; //Given data : fi_o=22;//in Degree delta=3;//relative refractive index difference in % //Part (a) : //Formula : NA=sin(fi_o).....(max) NA=sind(fi_o);//Numerical Aperture(Unitless) disp(NA,"Numerical Aperture : "); //Part (b) : //Formula : n2/n1=1-delta //Let say, n2/n1=n2byn1 n2byn1=(1-delta/100);//refractive index(unitless) //Formula : sin(fi_C)=n2/n1; fi_c=asind(n2byn1);//in degree disp(fi_c,"Critical Angle at core cladding interface in Degree : ");
4ca7ac9fdac28c905ba15633f657e3c936757ef5
1489f5f3f467ff75c3223c5c1defb60ccb55df3d
/tests/test_ods_5_e.tst
d01e66310c5623e01b138f70599301433234740d
[ "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
8,592
tst
test_ods_5_e.tst
** File Info Version: 1.0 Num Logs = 1 Num Trans = 0 Num Writers = 0 Total Entries = 6 Tranlog Offset = 1051 Transaction Id = 5 Index Free List = n/a Total Size of Data = 203 Data Transformation Id = 4 Index Transformation Id = 17 ** Entry Info for: all num: 0000000000000000 pos: 0000000000000051 len: 0000000000000044 txn: 0000000000000004 txo: 0000000000000000 flags: lk=0 tx=0 0000000000000051 04 00 00 00 00 00 00 00 72 6f 6f 74 ff ff ff ff ........root.... 0000000000000061 ff ff ff ff 05 00 00 00 00 00 00 00 01 00 00 00 ................ 0000000000000071 00 00 00 00 02 00 00 00 00 00 00 00 03 00 00 00 ................ 0000000000000081 00 00 00 00 04 00 00 00 00 00 00 00 05 00 00 00 ................ 0000000000000091 00 00 00 00 .... num: 0000000000000001 pos: 0000000000000036 len: 000000000000001b txn: 0000000000000004 txo: 0000000000000000 flags: lk=0 tx=0 0000000000000036 03 00 00 00 00 00 00 00 61 61 61 ff ff ff ff ff ........aaa..... 0000000000000046 ff ff ff 00 00 00 00 00 00 00 00 ........... num: 0000000000000002 pos: 000000000000001b len: 000000000000001b txn: 0000000000000004 txo: 0000000000000000 flags: lk=0 tx=0 000000000000001b 03 00 00 00 00 00 00 00 62 62 62 ff ff ff ff ff ........bbb..... 000000000000002b ff ff ff 00 00 00 00 00 00 00 00 ........... num: 0000000000000003 pos: 0000000000000000 len: 000000000000001b txn: 0000000000000004 txo: 0000000000000000 flags: lk=0 tx=0 0000000000000000 03 00 00 00 00 00 00 00 63 63 63 ff ff ff ff ff ........ccc..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... num: 0000000000000004 pos: 00000000000000b0 len: 000000000000001b txn: 0000000000000004 txo: 0000000000000000 flags: lk=0 tx=0 00000000000000b0 03 00 00 00 00 00 00 00 64 64 64 ff ff ff ff ff ........ddd..... 00000000000000c0 ff ff ff 00 00 00 00 00 00 00 00 ........... num: 0000000000000005 pos: 0000000000000095 len: 000000000000001b txn: 0000000000000004 txo: 0000000000000000 flags: lk=0 tx=0 0000000000000095 03 00 00 00 00 00 00 00 65 65 65 ff ff ff ff ff ........eee..... 00000000000000a5 ff ff ff 00 00 00 00 00 00 00 00 ........... ** Freelist Info No freelist entries. ** Transaction Log Info version = 1.0 sequence = 1 entry_offs = 1051 append_offs = 1588 ** Transaction Log Info for: all tx_id = 1 (offs = 56) commit_offs = 161 commit_items = 1 next_entry_offs = 214 prior_entry_offs = 0 total_data_bytes = 0 data_transform_id = 0 index_transform_id = 0 flags = 1 (create) offs = 144 tx_oid = 0 index_entry_id = 0 flags = 16 (store) offs = 161 data_pos = 0 data_size = 28 index_entry_id = 0 0000000000000000 04 00 00 00 00 00 00 00 72 6f 6f 74 ff ff ff ff ........root.... 0000000000000010 ff ff ff ff 00 00 00 00 00 00 00 00 ............ [xxx] tx_id = 2 (offs = 214) commit_offs = 414 commit_items = 4 next_entry_offs = 647 prior_entry_offs = 56 total_data_bytes = 28 data_transform_id = 1 index_transform_id = 2 flags = 1 (create) offs = 302 tx_oid = 0 index_entry_id = 1 flags = 2 (update) offs = 319 tx_oid = 1 data_pos = 0 data_size = 28 index_entry_id = 0 0000000000000000 04 00 00 00 00 00 00 00 72 6f 6f 74 ff ff ff ff ........root.... 0000000000000010 ff ff ff ff 00 00 00 00 00 00 00 00 ............ flags = 1 (create) offs = 380 tx_oid = 0 index_entry_id = 2 flags = 1 (create) offs = 397 tx_oid = 0 index_entry_id = 3 flags = 16 (store) offs = 414 data_pos = 28 data_size = 52 index_entry_id = 0 0000000000000000 04 00 00 00 00 00 00 00 72 6f 6f 74 ff ff ff ff ........root.... 0000000000000010 ff ff ff ff 03 00 00 00 00 00 00 00 01 00 00 00 ................ 0000000000000020 00 00 00 00 02 00 00 00 00 00 00 00 03 00 00 00 ................ 0000000000000030 00 00 00 00 .... flags = 16 (store) offs = 491 data_pos = 80 data_size = 27 index_entry_id = 3 0000000000000000 03 00 00 00 00 00 00 00 63 63 63 ff ff ff ff ff ........ccc..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... flags = 16 (store) offs = 543 data_pos = 107 data_size = 27 index_entry_id = 2 0000000000000000 03 00 00 00 00 00 00 00 62 62 62 ff ff ff ff ff ........bbb..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... flags = 16 (store) offs = 595 data_pos = 134 data_size = 27 index_entry_id = 1 0000000000000000 03 00 00 00 00 00 00 00 61 61 61 ff ff ff ff ff ........aaa..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... [yyy] tx_id = 3 (offs = 647) commit_offs = 854 commit_items = 3 next_entry_offs = 1051 prior_entry_offs = 214 total_data_bytes = 161 data_transform_id = 2 index_transform_id = 7 flags = 1 (create) offs = 735 tx_oid = 0 index_entry_id = 4 flags = 2 (update) offs = 752 tx_oid = 2 data_pos = 28 data_size = 52 index_entry_id = 0 0000000000000000 04 00 00 00 00 00 00 00 72 6f 6f 74 ff ff ff ff ........root.... 0000000000000010 ff ff ff ff 03 00 00 00 00 00 00 00 01 00 00 00 ................ 0000000000000020 00 00 00 00 02 00 00 00 00 00 00 00 03 00 00 00 ................ 0000000000000030 00 00 00 00 .... flags = 1 (create) offs = 837 tx_oid = 0 index_entry_id = 5 flags = 16 (store) offs = 854 data_pos = 161 data_size = 68 index_entry_id = 0 0000000000000000 04 00 00 00 00 00 00 00 72 6f 6f 74 ff ff ff ff ........root.... 0000000000000010 ff ff ff ff 05 00 00 00 00 00 00 00 01 00 00 00 ................ 0000000000000020 00 00 00 00 02 00 00 00 00 00 00 00 03 00 00 00 ................ 0000000000000030 00 00 00 00 04 00 00 00 00 00 00 00 05 00 00 00 ................ 0000000000000040 00 00 00 00 .... flags = 16 (store) offs = 947 data_pos = 229 data_size = 27 index_entry_id = 5 0000000000000000 03 00 00 00 00 00 00 00 65 65 65 ff ff ff ff ff ........eee..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... flags = 16 (store) offs = 999 data_pos = 256 data_size = 27 index_entry_id = 4 0000000000000000 03 00 00 00 00 00 00 00 64 64 64 ff ff ff ff ff ........ddd..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... tx_id = 4 (offs = 1051) commit_offs = 1139 commit_items = 6 next_entry_offs = 0 prior_entry_offs = 647 total_data_bytes = 283 data_transform_id = 3 index_transform_id = 11 flags = 32 (store) offs = 1139 tx_oid = 2 data_pos = 0 data_opos = 80 data_size = 27 index_entry_id = 3 0000000000000000 03 00 00 00 00 00 00 00 63 63 63 ff ff ff ff ff ........ccc..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... flags = 32 (store) offs = 1207 tx_oid = 2 data_pos = 27 data_opos = 107 data_size = 27 index_entry_id = 2 0000000000000000 03 00 00 00 00 00 00 00 62 62 62 ff ff ff ff ff ........bbb..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... flags = 32 (store) offs = 1275 tx_oid = 2 data_pos = 54 data_opos = 134 data_size = 27 index_entry_id = 1 0000000000000000 03 00 00 00 00 00 00 00 61 61 61 ff ff ff ff ff ........aaa..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... flags = 32 (store) offs = 1343 tx_oid = 3 data_pos = 81 data_opos = 161 data_size = 68 index_entry_id = 0 0000000000000000 04 00 00 00 00 00 00 00 72 6f 6f 74 ff ff ff ff ........root.... 0000000000000010 ff ff ff ff 05 00 00 00 00 00 00 00 01 00 00 00 ................ 0000000000000020 00 00 00 00 02 00 00 00 00 00 00 00 03 00 00 00 ................ 0000000000000030 00 00 00 00 04 00 00 00 00 00 00 00 05 00 00 00 ................ 0000000000000040 00 00 00 00 .... flags = 32 (store) offs = 1452 tx_oid = 3 data_pos = 149 data_opos = 229 data_size = 27 index_entry_id = 5 0000000000000000 03 00 00 00 00 00 00 00 65 65 65 ff ff ff ff ff ........eee..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ........... flags = 32 (store) offs = 1520 tx_oid = 3 data_pos = 176 data_opos = 256 data_size = 27 index_entry_id = 4 0000000000000000 03 00 00 00 00 00 00 00 64 64 64 ff ff ff ff ff ........ddd..... 0000000000000010 ff ff ff 00 00 00 00 00 00 00 00 ...........
2b74f1bf503aba7456a028d4f887ab45438c8ca8
13c3ed7bef4d80dabd836219bbf4396f07cb934a
/mattranspose.sci
22628f35ca0807d094db2d925a2c5429d0104dc4
[]
no_license
Mushirahmed/scilab_workspace
99f489a110a5e295ce9fca9991122d14840018d3
f58b91b87bb0357fff82dcb97b05541e7e976eca
refs/heads/master
2021-01-10T15:48:40.576771
2016-02-10T10:32:46
2016-02-10T10:32:46
43,348,489
0
0
null
null
null
null
UTF-8
Scilab
false
false
335
sci
mattranspose.sci
//SCI2C: DEFAULT_PRECISION= FLOAT function mattranspose() a = int8([1,-2,3;4,5,6;-7,8,9]); b = int16([10,-11,19;1,2,-3;0,-10,18]); c = uint8([21,1,0;3,56,90;1,2,3]); d = uint16([1,2,4;10,15,20;90,12,100]); e = a'; f = b'; g = c'; h = d'; disp(e); disp(f); disp(g); disp(h); endfunction
fa6192602fed3d8f5c5efce6da0fe04c2887d3e3
3b9a879e67cbab4a5a4a5081e2e9c38b3e27a8cc
/Pack/Área 1/M6/resolucao_jacobi_gauss_Q3.sce
7ba1b37970eafdaa2c95157c40800cf371e00ea9
[ "MIT" ]
permissive
JPedroSilveira/numerical-calculus-with-scilab
32e04e9b1234a0a82275f86aa2d6416198fa6c81
190bc816dfaa73ec2efe289c34baf21191944a53
refs/heads/master
2023-05-10T22:39:02.550321
2021-05-11T17:17:09
2021-05-11T17:17:09
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
167
sce
resolucao_jacobi_gauss_Q3.sce
//rode o código jacobi.sce ou gauss_seidel antes //essa aqui é a Q3 do questionário A = [ 6 1 ; -1 4 ] b = [ 1 ; 2] x1 = [2 ; 0] [x,dx] = jacobi(A,b,x1,10^(-3),4)
d66eae453c992860283bf862a83b2b3f52e72d8b
d963a50c09b7380dd7b1b97cd9997e9bd17ea8f3
/r30/factor.tst
828dd83d3a8089f037fe770e726f2767ccee6210
[ "BSD-3-Clause" ]
permissive
reduce-algebra/reduce-historical
8220e211b116e0e01ff1a38f51917cac9db6069f
e014152729c4d62bb1ce4f5c311a027042a5495a
refs/heads/master
2023-04-10T22:54:00.796596
2021-04-16T08:52:19
2021-04-16T08:52:19
343,245,204
7
1
NOASSERTION
2021-04-16T08:53:31
2021-03-01T00:15:22
TeX
UTF-8
Scilab
false
false
5,168
tst
factor.tst
COMMENT FACTORIZER TEST FILE; ARRAY A(20),B(20); FACTORIZE(X**2-1,A); %To make sure factorizer is loaded; SYMBOLIC RANDOMIZE(); %To set RANDOM-SEED. This can be set direct if %deterministic behavior is required. ALGEBRAIC PROCEDURE TEST(PROB,NFAC); BEGIN SCALAR BASETIME; P := FOR I:=1:NFAC PRODUCT A(I); WRITE "Problem number ",PROB; LISP BASETIME := TIME(); LISP PRIN2T LIST("The random seed is",RANDOM!-SEED); M := FACTORIZE(P, B); LISP BASETIME := TIME() - BASETIME; LISP LPRI LIST("Time =",BASETIME); LISP TERPRI(); Q := FOR I:=0:M PRODUCT B(I); IF (M=NFAC) AND (P=Q) THEN RETURN OK; WRITE "This example failed"; FOR I:=0:M DO WRITE B(I); RETURN FAILED END; % Wang test case 1; A(1) := X*Y+Z+10$ A(2) := X*Z+Y+30$ A(3) := X+Y*Z+20$ TEST(1,3); % Wang test case 2; A(1) := X**3*Z+X**3*Y+Z-11$ A(2) := X**2*Z**2+X**2*Y**2+Y+90$ TEST(2,2); % Wang test case 3; A(1) := X**3*Y**2+X*Z**4+X+Z$ A(2) := X**3+X*Y*Z+Y**2+Y*Z**3$ TEST(3,2); % Wang test case 4; A(1) := X**2*Z+Y**4*Z**2+5$ A(2) := X*Y**3+Z**2$ A(3) := -X**3*Y+Z**2+3$ A(4) := X**3*Y**4+Z**2$ TEST(4,4); % Wang test case 5; A(1) := 3*U**2*X**3*Y**4*Z+X*Z**2+Y**2*Z**2+19*Y**2$ A(2) := U**2*Y**4*Z**2+X**2*Z+5$ A(3) := U**2+X**3*Y**4+Z**2$ TEST(5,3); % Wang test case 6; A(1) := W**4*X**5*Y**6-W**4*Z**3+W**2*X**3*Y+X*Y**2*Z**2$ A(2) := W**4*Z**6-W**3*X**3*Y-W**2*X**2*Y**2*Z**2+X**5*Z -X**4*Y**2+Y**2*Z**3$ A(3) := -X**5*Z**3+X**2*Y**3+Y*Z$ TEST(6,3); % Wang test case 7; A(1) := X+Y+Z-2$ A(2) := X+Y+Z-2$ A(3) := X+Y+Z-3$ A(4) := X+Y+Z-3$ A(5) := X+Y+Z-3$ TEST(7,5); % Wang test case 8; A(1) := -Z**31-W**12*Z**20+Y**18-Y**14+X**2*Y**2+X**21+W**2$ A(2) := -15*Y**2*Z**16+29*W**4*X**12*Z**3+21*X**3*Z**2+3*W**15*Y**20$ TEST(8,2); % Wang test case 9; A(1) := 18*U**2*W**3*X*Z**2+10*U**2*W*X*Y**3+15*U*Z**2+6*W**2*Y**3*Z**2$ A(2) := X$ A(3) := 25*U**2*W**3*Y*Z**4+32*U**2*W**4*Y**4*Z**3- 48*U**2*X**2*Y**3*Z**3-2*U**2*W*X**2*Y**2+44*U*W*X*Y**4*Z**4- 8*U*W*X**3*Z**4+4*W**2*X+11*W**2*X**3*Y+12*Y**3*Z**2$ A(4) := Z$ A(5) := Z$ A(6) := U$ A(7) := U$ A(8) := U$ A(9) := U$ TEST(9,9); % Wang test case 10; A(1) := 31*U**2*X*Z+35*W**2*Y**2+40*W*X**2+6*X*Y$ A(2) := 42*U**2*W**2*Y**2+47*U**2*W**2*Z+22*U**2*W**2+9*U**2*W*X**2+21 *U**2*W*X*Y*Z+37*U**2*Y**2*Z+U**2*W**2*X*Y**2*Z**2+8*U**2*W**2 *Z**2+24*U**2*W*X*Y**2*Z**2+24*U**2*X**2*Y*Z**2+12*U**2*X*Y**2 *Z**2+13*U*W**2*X**2*Y**2+27*U*W**2*X**2*Y+39*U*W*X*Z+43*U* X**2*Y+44*U*W**2* Z**2+37*W**2*X*Y+29*W**2*Y**2+31*W**2*Y*Z**2 +12*W*X**2*Y*Z+43*W*X*Y*Z**2+22*X*Y**2+23*X*Y*Z+24*X*Y+41*Y**2 *Z$ TEST(10,2); % Wang test case 11; A(1) := -36*U**2*W**3*X*Y*Z**3-31*U**2*W**3*Y**2+20*U**2*W**2*X**2*Y**2 *Z**2-36*U**2*W*X*Y**3*Z+46*U**2*W*X+9*U**2*Y**2-36*U*W**2*Y**3 +9*U*W*Y**3-5*U*W*X**2*Y**3+48*U*W*X**3*Y**2*Z+23*U*W*X**3*Y**2 -43*U*X**3*Y**3*Z**3-46*U*X**3*Y**2+29*W**3*X*Y**3*Z**2- 14*W**3*X**3*Y**3*Z**2-45*X**3-8*X*Y**2$ A(2) := 13*U**3*W**2*X*Y*Z**3-4*U*X*Y**2-W**3*Z**3-47*X*Y$ A(3) := X$ A(4) := Y$ TEST(11,4); % Wang test case 12; A(1) := X+Y+Z-3$ A(2) := X+Y+Z-3$ A(3) := X+Y+Z-3$ TEST(12,3); % Wang test case 13; A(1) := 2*W*Z+45*X**3-9*Y**3-Y**2+3*Z**3$ A(2) := W**2*Z**3-W**2+47*X*Y$ TEST(13,2); % Wang test case 14; A(1) := 18*X**4*Y**5+41*X**4*Y**2-37*X**4+26*X**3*Y**4+38*X**2*Y**4-29* X**2*Y**3-22*Y**5$ A(2) := 33*X**5*Y**6-22*X**4+35*X**3*Y+11*Y**2$ TEST(14,2); % Wang test case 15; A(1) := 12*W**2*X*Y*Z**3-W**2*Z**3+W**2-29*X-3*X*Y**2$ A(2) := 14*W**2*Y**2+2*W*Z+18*X**3*Y-8*X*Y**2-Y**2+3*Z**3$ A(3) := Z$ A(4) := Z$ A(5) := Y$ A(6) := Y$ A(7) := Y$ A(8) := X$ A(9) := X$ A(10) := X$ A(11) := X$ A(12) := X$ A(13) := X$ TEST(15,13); % Test 16 - the 40th degree polynomial that comes from % SIGSAM problem number 7; A(1) := 8192*Y**10+20480*Y**9+58368*Y**8-161792*Y**7+198656*Y**6+ 199680*Y**5-414848*Y**4-4160*Y**3+171816*Y**2-48556*Y+469$ A(2) := 8192*Y**10+12288*Y**9+66560*Y**8-22528*Y**7-138240*Y**6+ 572928*Y**5-90496*Y**4-356032*Y**3+113032*Y**2+23420*Y-8179$ A(3) := 4096*Y**10+8192*Y**9+1600*Y**8-20608*Y**7+20032*Y**6+87360*Y**5- 105904*Y**4+18544*Y**3+11888*Y**2-3416*Y+1$ A(4) := 4096*Y**10+8192*Y**9-3008*Y**8-30848*Y**7+21056*Y**6+146496* Y**5-221360*Y**4+1232*Y**3+144464*Y**2-78488*Y+11993$ TEST(16,4); % Test 17 - taken from Erich Kaltofen's thesis. This polynomial % splits mod all possible primes p; A(1) := X**25-25*X**20-3500*X**15-57500*X**10+21875*X**5-3125$ TEST(17,1); % Test 18 - another 'hard-to-factorize' univariate; A(1) := X**18+9*X**17+45*X**16+126*X**15+189*X**14+27*X**13- 540*X**12-1215*X**11+1377*X**10+15444*X**9+46899*X**8+ 90153*X**7+133893*X**6+125388*X**5+29160*X**4- 32076*X**3+26244*X**2-8748*X+2916$ TEST(18,1); % Test 19 - another example chosen to lead to false splits mod p; A(1) := X**16+4*X**12-16*X**11+80*X**9+2*X**8+160*X**7+ 128*X**6-160*X**5+28*X**4-48*X**3+128*X**2-16*X+1$ A(2) := X**16+4*X**12+16*X**11-80*X**9+2*X**8-160*X**7+ 128*X**6+160*X**5+28*X**4+48*X**3+128*X**2+16*X+1$ TEST(19,2); % End of all tests; END;
1e4533db781acfedacc2930b58cd50b1b011b98e
449d555969bfd7befe906877abab098c6e63a0e8
/3862/CH4/EX4.13/Ex4_13.sce
10766b63cbd87e4105782610c663346b17b08699
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,024
sce
Ex4_13.sce
clear //The given composite section can be divided into two rectangles //variable declaration A1=125.0*10.0 //Area of 1,mm^2 A2=75.0*10.0 //Area of 2,mm^2 A=A1+A2 //Total area,mm^2 //First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) //The distance of centroid from the axis (1)–(1) X1=5.0 X2=10.0+75.0/2 xc=(A1*X1+A2*X2)/A //Similarly, the distance of the centroid from the axis (2)–(2) Y1=125.0/2 Y2=5.0 yc=(A1*Y1+A2*Y2)/A //With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). Ixx=(10*(125**3)/12)+(A1*(21.56**2))+(75.0*(10.0**3.0)/12)+(A2*((39.94)**2)) printf("\n Ixx= %0.1f mm^4",Ixx) Iyy=(125*(10**3)/12)+(A1*(15.94**2))+(10*(75**3)/12)+(A2*(26.56**2)) printf("\n Iyy= %0.1f mm^4",Iyy) //Izz=Polar moment of inertia Izz=Ixx+Iyy printf("\n Izz= %0.1f mm^4",Izz)
a31a8925aa2a7570a1a1de5e913bfd09dc9a5acf
9bc415d58bf063a1bca303fea640e644333dbdbd
/Scilab/Sinais_e_Sistemas/Funcao_de_Transferencia.sci
e6f3f7f29ff69a10ac1566ee0f796dec65d93cad
[]
no_license
Roast-Lord/SMGcodes
36e55be6c1cc17af91ab2e3f5117c78684f20604
b75107be829fb4373dc1bc4b8696fe4b9cec437a
refs/heads/main
2023-07-05T05:25:50.557705
2021-08-17T17:46:25
2021-08-17T17:46:25
301,012,145
1
0
null
null
null
null
UTF-8
Scilab
false
false
230
sci
Funcao_de_Transferencia.sci
function H=Funcao_de_Transferencia(a,b) npolos=length(a)-1 nzeros=length(b)-1 q=poly(0,'q') num=0; den=1; for p=1:npolos den=den+a(p+1)*q^p; end for p=0:nzeros num=num+b(p+1)*q^p; end H=num/den; endfunction
2db01184d9c15c83f39d47dc6003014e6379c0d5
abd7728083df51a785c94e61999237380b32c4f8
/examples/Presentation Packs/Cognitive Psychology Experiments III (Version 3)/AX-CPT/Scenarios/AX-CPT.sce
669f25a0d97a1a763cdc72ab8954903a050faa46
[]
no_license
LCTO-TLCO/UAVpresentation
93b0c0e0eb123b550218bbae4e0bb1db8c30cb5e
83e0f22cfdc2b7172bf0b90a9a14ddf77e6ccf2a
refs/heads/master
2023-07-25T14:03:39.874916
2021-09-07T07:19:38
2021-09-07T07:19:38
301,918,691
0
0
null
null
null
null
UTF-8
Scilab
false
false
20,053
sce
AX-CPT.sce
# -------------------------- Header Parameters -------------------------- scenario = "AX-CPT"; write_codes = EXPARAM( "Send ERP Codes" ); default_font_size = EXPARAM( "Default Font Size" ); default_background_color = EXPARAM( "Default Background Color" ); default_text_color = EXPARAM( "Default Font Color" ); default_font = EXPARAM( "Default Font" ); max_y = 100; active_buttons = 2; response_matching = simple_matching; stimulus_properties = event_cond, string, block_name, string, block_number, number, trial_number, number, trial_condition, string, stim_type, string, tgt_type, string, stim_number, number, stim_caption, string; event_code_delimiter = ";"; # ------------------------------- SDL Part ------------------------------ begin; trial { trial_duration = forever; trial_type = specific_response; terminator_button = 1,2; picture { text { caption = "Instructions"; preload = false; } instruct_text; x = 0; y = 0; }; } instruct_trial; trial { stimulus_event { picture { text { caption = "+"; font_size = EXPARAM( "Fixation Point Size" ); } fix_text; x = 0; y = 0; }; code = "Fixation"; } fix_event; } fix_trial; trial { clear_active_stimuli = false; stimulus_event { picture { text { caption = "Stim"; preload = false; font = EXPARAM( "Stimulus Font" ); font_size = EXPARAM( "Stimulus Font Size" ); font_color = EXPARAM( "Stimulus Font Color" ); } stim_text; x = 0; y = 0; } stim_pic; } stim_event; } stim_trial; trial { stimulus_event { picture {} ISI_pic; code = "ISI"; } ISI_event; } ISI_trial; # ----------------------------- PCL Program ----------------------------- begin_pcl; include_once "../../Library/lib_visual_utilities.pcl"; include_once "../../Library/lib_utilities.pcl"; # --- Constants --- string SPLIT_LABEL = "[SPLIT]"; string LINE_BREAK = "\n"; int BUTTON_FWD = 2; int BUTTON_BWD = 1; string PRACTICE_TYPE_PRACTICE = "Practice"; string PRACTICE_TYPE_MAIN = "Main"; string TARGET_LETTER_LABEL = "[TARGET_LETTER]"; string VALID_CUE_LABEL = "[VALID_CUE_LETTER]"; string INVALID_CUE_LABEL = "[INVALID_CUE_LETTER]"; string LANGUAGE_FILE_TOTAL_BLOCKS_LABEL = "[TOTAL_BLOCKS]"; string LANGUAGE_FILE_BLOCK_NUMBER_LABEL = "[BLOCK_NUMBER]"; string STIM_EVENT_CODE = "Stim"; string COND_CUE = "Cue"; string COND_PROBE = "Probe"; int COND_CUE_IDX = 1; int COND_PROBE_IDX = 2; string COND_VALID = "Valid"; string COND_INVALID = "Invalid"; int COND_VALID_IDX = 1; int COND_INVALID_IDX = 2; int STIM_TYPE_IDX = 1; int VALIDITY_IDX = 2; string COND_TGT = "Target"; string COND_NTGT = "Non-target"; int COND_TGT_IDX = 1; int COND_NTGT_IDX = 2; string CUE_VALID = "A"; string CUE_INVALID = "B"; string PROBE_VALID = "X"; string PROBE_INVALID = "Y"; int VAL_VAL_PORT_CODE = 1; int VAL_INVAL_PORT_CODE = 2; int INVAL_VAL_PORT_CODE = 3; int INVAL_INVAL_PORT_CODE = 4; int BUTTON_TGT = 1; int BUTTON_NTGT = 2; string CHARACTER_WRAP = "Character"; # --- Set up fixed stimulus parameters --- string language = parameter_manager.get_string( "Language" ); language_file lang = load_language_file( scenario_directory + language + ".xml" ); bool char_wrap = ( get_lang_item( lang, "Word Wrap Mode" ).lower() == CHARACTER_WRAP.lower() ); adjust_used_screen_size( parameter_manager.get_bool( "Use Widescreen if Available" ) ); double font_size = parameter_manager.get_double( "Default Font Size" ); int fix_dur = parameter_manager.get_int( "Fixation Duration" ); trial_refresh_fix( fix_trial, fix_dur ); if ( parameter_manager.get_bool( "Show Fixation Point" ) ) then ISI_pic.add_part( fix_text, 0, 0 ); end; # --- Stimulus Setup --- array<string> all_stim[2][2][0]; begin # Get the valid cue all_stim[COND_CUE_IDX][COND_VALID_IDX].add( parameter_manager.get_string( "Valid Cue" ) ); if ( all_stim[COND_CUE_IDX][COND_VALID_IDX][1].count() == 0 ) then exit( "Error: 'Valid Cue' must contain at least one character." ); end; # Get the distractor stim parameter_manager.get_strings( "Distractor Stimuli", all_stim[COND_CUE_IDX][COND_INVALID_IDX] ); if ( all_stim[COND_CUE_IDX][COND_INVALID_IDX].count() == 0 ) then exit( "Error: 'Distractor Stimuli' must contain at least one string." ); end; # Get the target stim all_stim[COND_PROBE_IDX][COND_VALID_IDX].add( parameter_manager.get_string( "Target Stimulus" ) ); if ( all_stim[COND_PROBE_IDX][COND_VALID_IDX][1].count() == 0 ) then exit( "Error: 'Target Stimulus' must contain at least one character." ); end; all_stim[COND_PROBE_IDX][COND_INVALID_IDX].append( all_stim[COND_CUE_IDX][COND_INVALID_IDX] ); # Make sure the valid and invalid cues are different if ( all_stim[COND_CUE_IDX][COND_VALID_IDX][1] == all_stim[COND_PROBE_IDX][COND_VALID_IDX][1] ) then exit( "Error: 'Valid Cue' must be different from 'Target Stimulus'" ); end; # Make sure there aren't any repeats between the cue and probe stimuli loop int i = 1 until i > all_stim[COND_CUE_IDX][COND_INVALID_IDX].count() begin if ( all_stim[COND_CUE_IDX][COND_INVALID_IDX][i] == all_stim[COND_CUE_IDX][COND_VALID_IDX][1] ) then exit( "Error: 'Distractor Stimuli' cannot contain 'Valid Cue'" ); end; if ( all_stim[COND_CUE_IDX][COND_INVALID_IDX][i] == all_stim[COND_PROBE_IDX][COND_VALID_IDX][1] ) then exit( "Error: 'Distractor Stimuli' cannot contain 'Target Stimulus'" ); end; i = i + 1; end; end; # --- sub main_instructions --- # string next_screen = get_lang_item( lang, "Next Screen Caption" ); string prev_screen = get_lang_item( lang, "Previous Screen Caption" ); string final_screen = get_lang_item( lang, "Start Experiment Caption" ); string split_final_screen = get_lang_item( lang, "Multi-Screen Start Experiment Caption" ); bool split_instrucs = parameter_manager.get_bool( "Multi-Screen Instructions" ); sub main_instructions( string instruct_string ) begin bool has_splits = instruct_string.find( SPLIT_LABEL ) > 0; # Split screens only if requested and split labels are present if ( has_splits ) then if ( split_instrucs ) then # Split at split points array<string> split_instructions[0]; instruct_string.split( SPLIT_LABEL, split_instructions ); # Hold onto the old terminator buttons for later array<int> old_term_buttons[0]; instruct_trial.get_terminator_buttons( old_term_buttons ); array<int> new_term_buttons[0]; new_term_buttons.add( BUTTON_FWD ); # Present each screen in sequence loop int i = 1 until i > split_instructions.count() begin # Remove labels and add screen switching/start experiment instructions # Remove leading whitespace string this_screen = split_instructions[i]; this_screen = this_screen.trim(); this_screen = this_screen.replace( SPLIT_LABEL, "" ); this_screen.append( LINE_BREAK + LINE_BREAK ); # Add the correct button options bool can_go_backward = ( i > 1 ) && ( BUTTON_BWD > 0 ); new_term_buttons.resize( 0 ); new_term_buttons.add( BUTTON_FWD ); if ( can_go_backward ) then new_term_buttons.add( BUTTON_BWD ); this_screen.append( prev_screen + " " ); end; if ( i < split_instructions.count() ) then this_screen.append( next_screen ); else this_screen.append( split_final_screen ); end; instruct_trial.set_terminator_buttons( new_term_buttons ); # Word wrap & present the screen full_size_word_wrap( this_screen, font_size, char_wrap, instruct_text ); instruct_trial.present(); if ( response_manager.last_response_data().button() == BUTTON_BWD ) then if ( i > 1 ) then i = i - 1; end; else i = i + 1; end; end; # Reset terminator buttons instruct_trial.set_terminator_buttons( old_term_buttons ); else # If the caption has splits but multi-screen isn't requested # Remove split labels and present everything on one screen string this_screen = instruct_string.replace( SPLIT_LABEL, "" ); this_screen = this_screen.trim(); this_screen.append( LINE_BREAK + LINE_BREAK + final_screen ); full_size_word_wrap( this_screen, font_size, char_wrap, instruct_text ); instruct_trial.present(); end; else # If no splits and no multi-screen, present the entire caption at once full_size_word_wrap( instruct_string, font_size, char_wrap, instruct_text ); instruct_trial.present(); end; default.present(); end; # --- sub present_instructions --- sub present_instructions( string instruct_string ) begin full_size_word_wrap( instruct_string, font_size, char_wrap, instruct_text ); instruct_trial.present(); default.present(); end; # --- sub block_status --- string block_complete = get_lang_item( lang, "Block Complete Caption" ); sub block_status( int total_blocks, int current_block ) begin if ( current_block < total_blocks ) then string block_temp = block_complete.replace( LANGUAGE_FILE_TOTAL_BLOCKS_LABEL, string(total_blocks) ); block_temp = block_temp.replace( LANGUAGE_FILE_BLOCK_NUMBER_LABEL, string(current_block) ); present_instructions( block_temp ); end; end; # --- sub get_port_code # AX = 1, AY = 2, BX = 3, BY = 4 # sub int get_port_code( int trial_type, string trial_cond ) begin string rval = string( trial_type ); if ( trial_cond.find( CUE_VALID ) > 0 ) then if ( trial_cond.find( PROBE_VALID ) > 0 ) then rval.append( string( VAL_VAL_PORT_CODE ) ); else rval.append( string( VAL_INVAL_PORT_CODE ) ); end; else if ( trial_cond.find( PROBE_VALID ) > 0 ) then rval.append( string( INVAL_VAL_PORT_CODE ) ); else rval.append( string( INVAL_INVAL_PORT_CODE ) ); end; end; return int( rval ) end; # --- sub get_condition sub string get_condition( int cue_type, int probe_type ) begin string rval = ""; if ( cue_type == COND_VALID_IDX ) then rval.append( CUE_VALID ); else rval.append( CUE_INVALID ); end; if ( probe_type == COND_VALID_IDX ) then rval.append( PROBE_VALID ); else rval.append( PROBE_INVALID ); end; return rval end; # --- sub show_block --- array<string> stim_conds[2]; stim_conds[COND_CUE_IDX] = COND_CUE; stim_conds[COND_PROBE_IDX] = COND_PROBE; array<string> tgt_conds[2]; tgt_conds[COND_TGT_IDX] = COND_TGT; tgt_conds[COND_NTGT_IDX] = COND_NTGT; array<int> ISI_durations[0]; parameter_manager.get_ints( "ISI Durations", ISI_durations ); if ( ISI_durations.count() == 0 ) then exit( "Error: 'ISI Durations' must contain at least one value." ); end; array<int> stim_durs[2]; stim_durs[COND_CUE_IDX] = parameter_manager.get_int( "Cue Duration" ); stim_durs[COND_PROBE_IDX] = parameter_manager.get_int( "Probe Duration" ); # -- Set up info for summary stats -- # int SUM_TYPE_IDX = 1; # Put all the condition names into an array # Used later to add column headings array<string> cond_names[1][0]; cond_names[SUM_TYPE_IDX].assign( tgt_conds ); # Now build an empty array for all DVs of interest array<int> acc_stats[cond_names[1].count()][0]; array<int> RT_stats[cond_names[1].count()][0]; # --- End Summary Stats --- # sub double show_block( array<int,2>& trial_order, string prac_check, int block_num ) begin # Start with an ISI trial_refresh_fix( ISI_trial, ISI_durations[random(1,ISI_durations.count())] ); ISI_trial.present(); # Loop to show the block double block_acc = 0.0; loop string pair_cond = ""; int hits = 0; int i = 1 until i > trial_order.count() begin # Trial info int this_type = trial_order[i][STIM_TYPE_IDX]; int this_validity = trial_order[i][VALIDITY_IDX]; # "pair_cond" can be "AX", "BX", "AY", or "BY" trial, updated every other trial if ( i % 2 == 1 ) then pair_cond = get_condition( this_validity, trial_order[i+1][VALIDITY_IDX] ); end; # Set cue text int stim_number = random( 1, all_stim[this_type][this_validity].count() ); stim_text.set_caption( all_stim[this_type][this_validity][stim_number], true ); # Set target button string tgt_type = COND_NTGT; if ( this_type == COND_PROBE_IDX ) && ( pair_cond == CUE_VALID + PROBE_VALID ) then stim_event.set_target_button( BUTTON_TGT ); tgt_type = COND_TGT; else stim_event.set_target_button( BUTTON_NTGT ); end; # Set cue port code # port codes: 1(cue)/2(probe) + 1AX/2AY/3BX/4BY int p_code = get_port_code( this_type, pair_cond ); stim_event.set_port_code( p_code ); # Set ISI duration trial_refresh_fix( ISI_trial, ISI_durations[random(1,ISI_durations.count())] ); # Set stim duration int this_dur = stim_durs[this_type]; if ( this_dur > 0 ) then stim_trial.set_type( stim_trial.FIXED ); trial_refresh_fix( stim_trial, this_dur ); else stim_trial.set_type( stim_trial.FIRST_RESPONSE ); stim_trial.set_duration( stim_trial.FOREVER ); end; # Set event code stim_event.set_event_code( STIM_EVENT_CODE + ";" + prac_check + ";" + string( block_num ) + ";" + string( i ) + ";" + pair_cond + ";" + stim_conds[this_type] + ";" + tgt_type + ";" + string( stim_number ) + ";" + stim_text.caption() ); # Show cue and ISI if ( fix_dur > 0 ) then fix_trial.present(); end; stim_trial.present(); stimulus_data last = stimulus_manager.last_stimulus_data(); ISI_trial.present(); # Update block accuracy if ( last.type() == last.HIT ) then hits = hits + 1; end; block_acc = double(hits) / double(i); # Record trial info for summary stats if ( prac_check == PRACTICE_TYPE_MAIN ) then # Make an int array specifying the condition we're in # This tells us which subarray to store the trial info array<int> this_trial[cond_names.count()]; this_trial[SUM_TYPE_IDX] = COND_TGT_IDX; if ( tgt_type == COND_NTGT ) then this_trial[SUM_TYPE_IDX] = COND_NTGT_IDX; end; int this_hit = int( last.type() == last.HIT ); acc_stats[this_trial[1]].add( this_hit ); if ( last.reaction_time() > 0 ) then RT_stats[this_trial[1]].add( last.reaction_time() ); end; end; i = i + 1; end; return block_acc end; # --- Conditions & Trial Order array<int> cond_array[0][0]; array<int> prac_array[0][0]; sub randomize_trial_order( array<int,2>& trial_order ) begin # Randomizing is complicated because we need to keep # pairs of indices together (e.g., 1-2, 3-4, etc.) # Start by generating a random list of the cue indices (1,3,5,7...) array<int> idx_order[ trial_order.count()/2 ]; idx_order.fill( 1,0,1,2 ); idx_order.shuffle(); # Now step through that randomized order and assign # both that index and the subsequent index to the cond_array array<int> temp_array[0][0]; loop int i = 1 until i > idx_order.count() begin temp_array.add( trial_order[idx_order[i]] ); temp_array.add( trial_order[idx_order[i]+1] ); i = i + 1; end; trial_order.assign( temp_array ); end; # --- sub add_trials # will add a specified number of specified cue/probe trials # Note that because the cue and probe are presented as distinct trials # each "trial" here adds two subarrays to the condition array sub add_trials( int num_trials, int cue_validity, int probe_validity ) begin loop array<int> temp[2]; int i = 1 until i > num_trials begin temp[STIM_TYPE_IDX] = COND_CUE_IDX; temp[VALIDITY_IDX] = cue_validity; cond_array.add( temp ); temp[STIM_TYPE_IDX] = COND_PROBE_IDX; temp[VALIDITY_IDX] = probe_validity; cond_array.add( temp ); i = i + 1; end; end; begin # Build the condition array based on parameter values add_trials( parameter_manager.get_int( "AX Trials per Block" ), COND_VALID_IDX, COND_VALID_IDX ); add_trials( parameter_manager.get_int( "AY Trials per Block" ), COND_VALID_IDX, COND_INVALID_IDX ); add_trials( parameter_manager.get_int( "BY Trials per Block" ), COND_INVALID_IDX, COND_INVALID_IDX ); add_trials( parameter_manager.get_int( "BX Trials per Block" ), COND_INVALID_IDX, COND_VALID_IDX ); # Exit if no trials were requested if ( cond_array.count() == 0 ) then exit( "Error: No trials specified." ); end; # Build a practice array based on requested number of trials # The condition array should contain 2 * number of requested trials # because we have a cue trial and a probe trial for each "Trial" int prac_trials = parameter_manager.get_int( "Practice Trials" ); loop until prac_array.count() >= prac_trials * 2 begin # The random trial we select must be an odd number (i.e., a cue) # Once we have that, we add that index (cue) and the next (probe) int rand_num = random( 1, cond_array.count() - 1 ); if ( rand_num % 2 == 0 ) then rand_num = rand_num + 1; end; prac_array.add( cond_array[rand_num] ); prac_array.add( cond_array[rand_num + 1] ); end; end; # --- Main Sequence --- int block_count = parameter_manager.get_int( "Blocks" ); bool show_block_status = parameter_manager.get_bool( "Show Status Between Blocks" ); int prac_threshold = parameter_manager.get_int( "Minimum Percent Correct to Complete Practice" ); string rest_caption = get_lang_item( lang, "Rest Screen Caption" ); string instructions = get_lang_item( lang, "Instructions" ); instructions = instructions.replace( TARGET_LETTER_LABEL, all_stim[COND_PROBE_IDX][COND_VALID_IDX][1] ); instructions = instructions.replace( VALID_CUE_LABEL, all_stim[COND_CUE_IDX][COND_VALID_IDX][1] ); instructions = instructions.replace( INVALID_CUE_LABEL, all_stim[COND_CUE_IDX][COND_INVALID_IDX][1] ); # Show practice trials or instructions if ( prac_array.count() > 0 ) then main_instructions( instructions + " " + get_lang_item( lang, "Practice Caption" ) ); loop double block_accuracy = -1.0 until block_accuracy >= ( double( prac_threshold ) / 100.0 ) begin randomize_trial_order( prac_array ); block_accuracy = show_block( prac_array, PRACTICE_TYPE_PRACTICE, 0 ); end; present_instructions( get_lang_item( lang, "Practice Complete Caption" ) ); else main_instructions( instructions ); end; # Main block loop loop int i = 1 until i > block_count begin # Shuffle the trial order and show the block randomize_trial_order( cond_array ); show_block( cond_array, PRACTICE_TYPE_MAIN, i ); # Update participant if requested if ( show_block_status ) then block_status( block_count, i ); elseif ( i < block_count ) then present_instructions( rest_caption ); end; i = i + 1; end; present_instructions( get_lang_item( lang, "Completion Screen Caption" ) ); # --- Print Summary Stats --- # string sum_log = logfile.filename(); if ( sum_log.count() > 0 ) then # Open & name the output file string TAB = "\t"; int ext = sum_log.find( ".log" ); sum_log = sum_log.substring( 1, ext - 1 ) + "-Summary-" + date_time( "yyyymmdd-yyyymmdd-hhnnssss" ) + ".txt"; string subj = logfile.subject(); output_file out = new output_file; out.open( sum_log ); # Print the headings for each columns array<string> cond_headings[cond_names.count() + 1]; cond_headings[1] = "Subject ID"; cond_headings[SUM_TYPE_IDX + 1] = "Stimulus Type"; cond_headings.add( "Accuracy" ); cond_headings.add( "Accuracy (SD)" ); cond_headings.add( "Avg RT" ); cond_headings.add( "Avg RT (SD)" ); cond_headings.add( "Median RT" ); cond_headings.add( "Number of Trials" ); cond_headings.add( "Date/Time" ); loop int i = 1 until i > cond_headings.count() begin out.print( cond_headings[i] + TAB ); i = i + 1; end; # Loop through the DV arrays to print each condition in its own row # Following the headings set up above loop int i = 1 until i > acc_stats.count() begin out.print( "\n" + subj + TAB ); out.print( cond_names[1][i] + TAB ); out.print( round( arithmetic_mean( acc_stats[i] ), 3 ) ); out.print( TAB ); out.print( round( sample_std_dev( acc_stats[i] ), 3 ) ); out.print( TAB ); out.print( round( arithmetic_mean( RT_stats[i] ), 3 ) ); out.print( TAB ); out.print( round( sample_std_dev( RT_stats[i] ), 3 ) ); out.print( TAB ); out.print( round( median_value( RT_stats[i] ), 3 ) ); out.print( TAB ); out.print( acc_stats[i].count() ); out.print( TAB ); out.print( date_time() ); i = i + 1; end; # Close the file and exit out.close(); end;
cfae8a28cc51aeb707f7592ef099edcc44421f60
449d555969bfd7befe906877abab098c6e63a0e8
/1457/CH8/EX8.6/8_6.sce
7500efe532f6591c0e9416beb6dfda8ae944e235
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
224
sce
8_6.sce
clc //Initialization of variables z=260 //ft f=0.02 //calculations V2by2g=z/(1.11*256 + 6000*f) V2=V2by2g*2*32.2 V=sqrt(V2) Q=0.545*V V3=16*V H=z-f*6000*V2by2g //results printf("rate of discharge = %.2f cfs",Q)
ee4ca3fcfa6165b792fc96c04c9b3af0c33dd6d8
449d555969bfd7befe906877abab098c6e63a0e8
/2471/CH5/EX5.15/Ex5_15.sce
aeb2df8105b2eb95bd7bbaabf61cb2ac2097a67c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,803
sce
Ex5_15.sce
clear ; clc; // Example 5.15 printf('Example 5.15\n\n'); printf('Page No. 137\n\n'); // given T = 25;// Wet-bulb temperature in degree celcius T1 = 30;//Dry-bulb temperature in degree celcius V = 5;// Volumetric flow rate of initial air-water mixture in m^3/s T2 = 70;// Final Dry-bulb temperature in degree celcius //By using the humidity chart and steam tables for air-water mixtures at the given temperatures, the all following data can be obtained w = 0.018;// humidity at 25/30 degree celcius in kg/kg Cpa_1 = 1.00*10^3;// Heat Capacity of bone dry air at 30 degree celcius in J/kg-K Cpwv_1 = 1.88*10^3;// Heat Capacity of water vapour at 30 degree celcius in J/kg-K Cpa_2 = 1.008*10^3;// Heat Capacity of bone dry air at 70 degree celcius in J/kg-K Cpwv_2 = 1.93*10^3;// Heat Capacity of water vapour at 70 degree celcius in J/kg-K lo = 2.50*10^6;// Specifc Latent heat of vapourisation of water at 0 degree celcius in J/kg S_1 = Cpa_1 + (w*Cpwv_1);// the humid heat at 30 degree celcius in J/kg-K S_2 = Cpa_2 + (w*Cpwv_2);//the humid heat at 70 degree celcius in J/kg-K hG_1 = ((S_1*T1) + (w*lo));//the specific enthalpy at 30 degree celcius in J/kg hG_2 = ((S_2*T2) + (w*lo));//the specific enthalpy at 70 degree celcius in J/kg VG_1 = ((1/29)+(w/18))*22.41*((T1 + 273)/273);// Humid volume at 30 degree celcius in m^3/kg m = V/VG_1;// Mass flow rate in kg/s Q = m*(hG_2 - hG_1);// in Watts printf('The required heat is %3.2f W \n',Q)// Deviation in answer is due to some approximation in calculation in the book w_2 = w;// given in the question VG_2 = ((1/29)+(w_2/18))*22.41*((T2 + 273)/273);// Humid volume at 70 degree celcius in m^3/kg V_f = m*VG_2;;// in m^3/s printf( 'The volumetric flow rate of initial air-water mixture is %3.2f m^3/s',V_f)
5c6c42080cb2f3fa1cab6aebf93a6973c130de37
449d555969bfd7befe906877abab098c6e63a0e8
/858/CH7/EX7.3/example_3.sce
2bdb3166af87c5215c0bcaf106be5cc75d7e82ac
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
621
sce
example_3.sce
clc clear printf("example 7.3 page number 305\n\n") //to find the change on rate of reaction //part 1 //rate equation r = kC_NO^2*C_O2 //if pressure increases 3 times r = 3^2*3; //according to the rate reaction printf("reaction reate will be increased by with 3 times increase in pressure = %f times",r) //part 2 r = 3^2*3; //according to the rate reaction printf("\n\nreaction reate will be increased by with 3 times decrease in volume = %f times",r) r = 3^2; //according to the rate reaction printf("\n\nreaction reate will be increased by with 3 times increase in conc of NO = %f times",r)
c23026cb7c388978c3d3a854f46b9d838c447ba1
449d555969bfd7befe906877abab098c6e63a0e8
/3564/CH1/EX1.3/Ex1_3.sce
1d6ab8d393b31cfd32fb9e4daac197a0a7f93e37
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,374
sce
Ex1_3.sce
// Display mode mode(0); // Display warning for floating point exception ieee(1); clc; disp("Introduction to Fluid Mechanics, 3rd Ed. William S. Janna Chapter - 1 Example # 1.3 ") //Solving part a disp("Part a)") //Mass in kg m = 0.001; //Deltay in mm deltay = 5; //Acceleration due to gravity in m/s2 g = 9.81; //Area of contact in m2 A = 0.5; //Using Appendix table A.5 for properties of linseed oil //Viscosity myu in N.s/m2 myu = 0.0331; //Force therefore in N is F = m*g; //Shear stress in N/m2 is tau = F/A; //Since shear stress is myu*(velocity gradient) i.e. myu*(deltaV/deltay) //deltaV = V - 0 = V //Velocity of the plate in mm/s is disp("Velocity of the plate in mm/s is") V = (tau*deltay)/myu //Answer varies slightly because of round-off error //Solving part b disp("Part b)") //Using Appendix table A.5 for properties of water //Viscosity myu in N.s/m2 myu = 0.89/1000; //Velocity of the plate in mm/s is V = (tau*deltay)/myu; disp("Velocity of the plate in m/s is") V = V/1000 //Answer varies slightly because of round-off error //Solving part c disp("Part c)") //Initial shear stress in N/m2 is tau0 = 4; //Inital viscosity myu0 in N.s/m2 myu0 = 0.004; if tau<tau0 then disp("Applied shear stress is less than initial shear stress") disp("Therefore velocity of plate is 0 m/s") end;
5fcf4cbf58ba18203135eacd755e4fd0b8677d45
117d2e73730351cc15ef378cd319a907c507e476
/Interpolação/legendre.sce
d4c389206bd18c611dfe8fde287e84ff892a9f66
[ "Apache-2.0" ]
permissive
Trindad/algoritmos-calculo-numerico
b900768350277a46da636a3d0da9b8c83c4da780
1dcafd39d2281cb3065ba9742c693e5e49e2a08c
refs/heads/master
2021-01-22T21:28:09.251265
2014-07-23T14:08:55
2014-07-23T14:08:55
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
861
sce
legendre.sce
// legendre clear clc format (3) function pn = legPoly(x,i), //LEGPOLY calculates the legendre polynomial of i-th order in x // x can be a scalar, a vector or a matrix //pn : nth legendre polynomial //pn_1 : n-1 legendre polynomial //pn_p1 : n+1 legendre polynomial // Konstantinos G. //Modified version of the C code in "Numerical recipes in C" pn_p1 = 1; pn = ones(size(x,1), size(x,2)); disp(pn); if(i > 0) pn_1 = x.*pn; disp(pn); if(i==1) pn = pn_1; else for i = 2 : i pn_p1 = (x .* (2 * i - 1).*pn_1 - (i - 1)*pn)/i; pn = pn_1; pn_1 = pn_p1; disp(pn_p1); end pn = pn_p1; end end disp(pn); endfunction x = [1,2;2,5]; disp(x); leg = legPoly(x,2);
dde4f03df5636cbb6fb87ae02ad6e04a19a7f0b8
449d555969bfd7befe906877abab098c6e63a0e8
/32/CH8/EX8.16/8_16.sce
9509258cd34878ba304c26b8c106d0c714fc84d7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
691
sce
8_16.sce
//pathname=get_absolute_file_path('8.16.sce') //filename=pathname+filesep()+'8.16-data.sci' //exec(filename) //Steam flow rate(in kg/s): m=35 //From steam tables: h1=3530.9 //kJ/kg s1=6.9486 //kJ/kg.K s2=s1 x2=0.864 h2=2288.97 //kJ/kg v3=0.001017 //m^3/kg h3=251.40 //kJ/kg //Pump work(in kJ/kg): Wp=v3*(70-0.20)*10^2 //Turbine work(in kJ/kg): Wt=h1-h2 //Net work(in kJ/kg): Wnet=Wt-Wp //Power produced(in MW): P=m*Wnet/10^3 //Enthalpy at state 4(in kJ/kg): h4=h3+Wp //Total heat supplied to the boiler(in kJ/s): Q=m*(h1-h4) //Thermal efficiency: n=Wnet*m/Q*100 printf("\n RESULT \n") printf("\nNet power = %f MW",P) printf("\nThermal efficiency = %f percent",n)
547746b482d814c49d3ef1867ef9ade0572d64f7
39c5c468df5e2bde0147a30cf092fc8da3e7ed3e
/UFRGS/calcNumerico/area2/jacobi.sce
cc717bfe03f7eb4f1b9c88ef51bcb43f603c889e
[]
no_license
andredxc/Files
9dffc9fe5f7e923b83035d794dfa15c930cdb898
e32309b9ab548b829b04be66c2776cf9c9c6656e
refs/heads/master
2021-06-03T10:44:01.606242
2020-09-21T15:39:48
2020-09-21T15:39:48
107,410,076
0
0
null
null
null
null
UTF-8
Scilab
false
false
339
sce
jacobi.sce
format(25) x = [3 4]' y = 3 ./ x n = length(x) plot(x, y, 'ro-'); xgrid // Matriz de Vandermonde for i = 1:n V(i,j) = x(i)^(j - 1) end end //Interpolação X = 3 + (28 / 100) // Ponto para fazer a intepolação a = inv(V) * y p = 0 for k = 1:n p = p + a(k) * X.^(k - 1) end plot(X, p, 'b.-'); xgrid disp(p, "P = ")
27eb39bf41c6fcadfc4efb9ea8c737c52f0627fd
449d555969bfd7befe906877abab098c6e63a0e8
/1448/CH20/EX20.1.i/I20_1.sce
ba925bf94d650100b297d190c3dbccac1064cb67
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
200
sce
I20_1.sce
clc //Initialization of variables E=22*10^3 //kJ/mol T=293 //K //calculations ratio=%e^(-E/(8.31451*T)) //results printf("Relative populations of boat and chair conformations is %.1e",ratio)
a1cca21b85706a2a792d176643ae1a56efe6ffa8
449d555969bfd7befe906877abab098c6e63a0e8
/416/CH14/EX14.15/example14_15.sce
a7def9a214bfe53c84e92a245762489da98469d4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
627
sce
example14_15.sce
clc clear disp('example 14.15') v=220 //line voltage ps=11 ;ss=220;pr=220;sr=11 //primer and secondary end terminal voltages of tapping transformer zr=20;zi=60 //impedence of line in real ndimagenary parts p=100 //power at recieving end is 100MVA pf=0.8 //power factor at recievin end t=1 //prodect of 2 off terminal tap setting is 1 vt=11 //tap setting for 11 kv voltage bus P=(p*pf*10^6)/3 //real power Q=(p*sind(acosd(pf))*10^6)/3 //reactance power v1=v*(10^3)/sqrt(3) ts=(1/(1-(zr*P+zi*Q)/(v1^2)))^(0.5) printf(" tapping ratio at the source %.3f \n tapping ratio at the receving end %.2f",ts,1/ts)
83e7a013e9899c2e78f866424e6fc9869f762ba6
948c6e0314c1822f872350cf63aaceb3d28fa497
/tests/test-detect-partial.tst
59589be6c8c13762501a7d7ef98b6d75dae6c230
[ "Apache-2.0" ]
permissive
archiecobbs/bom
832eb815b40f4955e6551496bdd2598cb4f00442
0bab1a015bb5e53345e5422902e16f802bd4c07f
refs/heads/main
2023-08-25T05:43:51.470221
2021-11-04T16:12:49
2021-11-04T16:12:49
417,213,171
1
1
null
null
null
null
UTF-8
Scilab
false
false
68
tst
test-detect-partial.tst
FLAGS='--detect' STDIN='\xff' STDOUT='NONE\n' STDERR='' EXITVAL='0'
99074386ce7d945de56216479c13c7e411e32000
449d555969bfd7befe906877abab098c6e63a0e8
/611/CH9/EX9.19/Chap9_Ex19_R1.sce
12bb442f6d8cb2970669b752ebe9aa5f0047cca1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,420
sce
Chap9_Ex19_R1.sce
// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India. //Chapter-9,Example 19,Page 341 //Title: Fugacity and fugacity coefficient using the virial coefficient correlation //================================================================================================================ clear clc //INPUT T=600;//temperature of the equimolar n-butane and n-octane mixture in K P=16;//pressure of the equimolar n-butane and n-octane mixture in bar Bm=-309*10^-6;//second virial coefficient in m^3/mol taken from Example (9.7) R=8.314;//universal gas constant in J/molK //CALCULATION //Using Eq.(3.91) and Eq.(9.58) ln(phi)=BP/RT, which is used to compute phi phi=(exp((Bm*P*10^5)/(R*T)));//calculation of the fugacity coefficient using the above expression (no unit) f=phi*P;//calculation of the fugacity using Eq.(9.37) in bar //OUTPUT mprintf("\n The fugacity coefficient of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = %f \n",phi); mprintf("\n The fugacity of an equimolar mixture of n-butane and n-octane using the virial coefficient correlation = %f bar\n",f); //===============================================END OF PROGRAM=================================================== //DISCLAIMER: THE VALUE OF FUGACITY COEFFICIENT AS CALCULATED IN THE TEXTBOOK IS WRONG.THIS HAS BEEN CORRECTED IN THIS PROGRAM.
4c837ac74a5dfa141d4acc653bd0e491c826d212
42ce2af59b85049f5ba64be2ba3f2614cc2041a5
/reglin.sce
215a427f73a15869a8c885a8056d71689d72bdd3
[]
no_license
ece2lr/tp13
7f74b688b4bca71438ae216c603c881a8bec9171
84a9d7882ec8405bab119f8ffba2e89659c74ae4
refs/heads/master
2021-05-02T03:44:18.688503
2018-02-09T12:21:42
2018-02-09T12:21:42
120,901,701
0
0
null
null
null
null
UTF-8
Scilab
false
false
592
sce
reglin.sce
N = 10^5 U = grand(1,N,"exp",1) V = grand(1,N,"exp",1) //U = rand(1,N) //V = rand(1,N) X = min(U,V) // + 2*U Y = max(U,V) // + 2*U [a,b,sig] = reglin(X,Y) //help reglin //// --> coef dir, ord orig, écart type inexpliqué x = linspace(0,max(X)) clf() plot(X,Y) // cosmétique nuage de points c = gce().children c.line_mode = "off" c.mark_size = 5 c.mark_style = 0 c.mark_foreground = 13 plot(x,a*x+b) // cosmétique droite de régression c = gce().children c.thickness=3 coef = 1 - sig^2/variance(Y) title("coefficient de détermination " + string(floor(100*coef)) + "%","fontsize",5)
f68714b9ec23ac34dade17c0818ec1baf380d37f
01697f0dc71290a6b6e233849a73d19a883845f1
/sem03/lab12/q01.sce
27d493ecd203d4bdf28ad626fd7ac6c285127dbe
[]
no_license
aaruni96/Math-Lab
5d83a13547308bd9d1b7daa28be29a49e1020fbd
488469c9aba9251f5725e0851fb19e2aef38d234
refs/heads/master
2021-01-12T06:29:53.790743
2018-04-27T09:21:40
2018-04-27T09:21:40
77,370,232
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,432
sce
q01.sce
clc; clear; g=[1,-1,sqrt(-1),-sqrt(-1)]; h=[1,-1]; i=1; if h(i)*h(i+1)==h(i) | h(i)*h(i+1)==h(i+1) then if h(i)*h(i)==h(i) | h(i)*h(i)==h(i+1) then if h(i+1)*h(i+1)==h(i) | h(i+1)*h(i+1)==h(i+1) then printf("H is closed under multiplication\n"); else printf("H is not closed and hence H is not a group\n"); end end end if h(i)*h(i)==h(i) & h(i+1)*h(i) == h(i+1) then e=h(i); elseif h(i)*h(i+1)==h(i) & h(i+1)*h(i+1) == h(i) then e=h(i+1) else printf("No identitiy element exists\nH is not a group\n"); abort end printf("e=%f is a unique identity element \n",e); in1=e/h(i); in2=e/h(i+1); if in1==h(i) | in1==h(i+1) then printf("i=%f is a unique inverse element of %d\n",in1,h(i)); if in2==h(i) | in2==h(i+1) then printf("i=%f is a unique inverse element of %d\n",in2,h(i+1)); else printf("No inverse element exists\nH is not a group\n"); abort end printf("H satisfies all the three axioms under multiplicatin\n"); printf("Hence H is a group\n"); printf("H is a subset of G. Implies H is a subgroup of G\n"); printf("Lagrange's theorem : O(H) divides O(G)\n"); n=length(g); m=length(h); printf("Order of G = %d",n); printf("Order of H = %d",m); k=n/m; if modulo(n,m)==0 then printf("O(G)/O(H) = %d",k); printf("Hence Lagrange's theorem holds\n"); printf("Hence H is a subgroup of G\n"); else printf("%d is not divisor\n", k); printf("Hence thereom don't hold\n"); printf("Hence H is not subgroup\n"); end
b8cbf520f2a55d228933bd1e24af7e41cb6f2207
449d555969bfd7befe906877abab098c6e63a0e8
/42/CH1/EX1.1/sadiku_1_1.sce
d53165a9ae05496d1b55f71b5a47caf4b273367c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
279
sce
sadiku_1_1.sce
clear; clc; format('v',6) A=[10,-4,6]; B=[2,1,0]; disp(A(1,2),'Component of A along ay : ') P=3*A-B; disp((P(1,1)^2+P(1,2)^2+P(1,3)^2)^0.5,'magnitude is :') C=A+2*B; det_C=(C(1,1)^2+C(1,2)^2+C(1,3)^2)^0.5; format('v',7) ac=C/det_C; disp(ac,'Unit Vector along C is :')
2ce08e9fc96a64c50ead75714a8e53bd9be30c0c
449d555969bfd7befe906877abab098c6e63a0e8
/662/CH10/EX10.13/Example10_13.sci
27d16b7cab56e8061e67fb90684beb0e6c10b51b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
479
sci
Example10_13.sci
//Example 10.13 //Program to convert lowercase alphabets to uppercase in a given text function[] = main() text = input("Enter line of text: ","string"); len= length(text); for i = 1 : len txt(i) = convstr(part(text,i), 'u'); end printf("The text after converting lowercase alphabets to uppercase is \n"); for i = 1 : len printf("%c",txt(i)); end endfunction //calling main() funcprot(0); main();
6033eb713522d9febeb8a92fa5265ea81510aa49
8deb8b00af1f85fe3a035cab47cd1b7a8c9c67db
/Test_runs/DCV_5-zone/out_5ZoneVAV-DCV-tweaked/5ZoneVAV-DCV-tweaked.sci
b160510e48e087ba53f0595bc0202cc5988e9a72
[]
no_license
tsbyq/SDI
cbaf1ae7ab2d2d0a338b65effcd9a6bd3fc39ddf
d9e8c699fc765cba4cdec57e3d0e1a771564c4b1
refs/heads/master
2020-03-31T01:24:59.608748
2018-12-07T19:40:36
2018-12-07T19:40:36
151,163,580
0
0
null
null
null
null
UTF-8
Scilab
false
false
4,785
sci
5ZoneVAV-DCV-tweaked.sci
53 39 data for surfaces useful for cost information Number, Name, Construction, class, area, grossarea 7,ZN_1_FLR_1_SEC_1_WALL_1,ASHRAE 30PERC GUIDE_ZONE 5_STEEL-FRAMED_EXT-WALL,Wall, 91.20038, 152.00000 8,ZN_1_FLR_1_SEC_1_WALL_1_WINDOW_1,ASHRAE 30PERC GUIDE_ZONE 5_0.3_0.4_FIXED_SOUTH_WINDOW,Window, 60.79962, 60.79962 9,ZN_1_FLR_1_SEC_1_WALL_2,ASHRAE 30PERC GUIDE_ZONE 5_INTERIOR WALL_INT-WALL,Wall, 24.55923, 24.55923 10,ZN_1_FLR_1_SEC_1_WALL_3,ASHRAE 30PERC GUIDE_ZONE 5_INTERIOR WALL_INT-WALL,Wall, 117.26800, 117.26800 11,ZN_1_FLR_1_SEC_1_WALL_4,ASHRAE 30PERC GUIDE_ZONE 5_INTERIOR WALL_INT-WALL,Wall, 24.55923, 24.55923 12,ZN_1_FLR_1_SEC_1_FLOOR,ASHRAE 30PERC GUIDE_ZONE 5_UNHEATED_EXT-SLAB,Floor, 161.91510, 161.91510 13,ZN_1_FLR_1_SEC_1_CEILING,ASHRAE 30PERC GUIDE_ZONE 5_IEAD_ROOF,Roof, 161.91510, 161.91510 14,ZN_1_FLR_1_SEC_1_INTERNALMASS_1,INTERIORFURNISHINGS,Internal Mass, 323.83020, 323.83020 15,ZN_1_FLR_1_SEC_2_WALL_1,ASHRAE 30PERC GUIDE_ZONE 5_STEEL-FRAMED_EXT-WALL,Wall, 45.60076, 76.00000 16,ZN_1_FLR_1_SEC_2_WALL_1_WINDOW_1,ASHRAE 30PERC GUIDE_ZONE 5_0.3_0.4_FIXED_EAST_WINDOW,Window, 30.39924, 30.39924 17,ZN_1_FLR_1_SEC_2_WALL_2,ASHRAE 30PERC GUIDE_ZONE 5_INTERIOR WALL_INT-WALL,Wall, 24.55923, 24.55923 18,ZN_1_FLR_1_SEC_2_WALL_3,ASHRAE 30PERC GUIDE_ZONE 5_INTERIOR WALL_INT-WALL,Wall, 41.26800, 41.26800 20,ZN_1_FLR_1_SEC_2_FLOOR,ASHRAE 30PERC GUIDE_ZONE 5_UNHEATED_EXT-SLAB,Floor, 70.51510, 70.51510 21,ZN_1_FLR_1_SEC_2_CEILING,ASHRAE 30PERC GUIDE_ZONE 5_IEAD_ROOF,Roof, 70.51510, 70.51510 22,ZN_1_FLR_1_SEC_2_INTERNALMASS_1,INTERIORFURNISHINGS,Internal Mass, 141.03020, 141.03020 23,ZN_1_FLR_1_SEC_3_WALL_1,ASHRAE 30PERC GUIDE_ZONE 5_INTERIOR WALL_INT-WALL,Wall, 117.26800, 117.26800 25,ZN_1_FLR_1_SEC_3_WALL_3,ASHRAE 30PERC GUIDE_ZONE 5_STEEL-FRAMED_EXT-WALL,Wall, 91.20038, 152.00000 26,ZN_1_FLR_1_SEC_3_WALL_3_WINDOW_1,ASHRAE 30PERC GUIDE_ZONE 5_0.3_0.4_FIXED_NORTH_WINDOW,Window, 60.79962, 60.79962 27,ZN_1_FLR_1_SEC_3_WALL_4,ASHRAE 30PERC GUIDE_ZONE 5_INTERIOR WALL_INT-WALL,Wall, 24.55923, 24.55923 28,ZN_1_FLR_1_SEC_3_FLOOR,ASHRAE 30PERC GUIDE_ZONE 5_UNHEATED_EXT-SLAB,Floor, 161.91510, 161.91510 29,ZN_1_FLR_1_SEC_3_CEILING,ASHRAE 30PERC GUIDE_ZONE 5_IEAD_ROOF,Roof, 161.91510, 161.91510 30,ZN_1_FLR_1_SEC_3_INTERNALMASS_1,INTERIORFURNISHINGS,Internal Mass, 323.83020, 323.83020 32,ZN_1_FLR_1_SEC_4_WALL_2,ASHRAE 30PERC GUIDE_ZONE 5_INTERIOR WALL_INT-WALL,Wall, 41.26800, 41.26800 34,ZN_1_FLR_1_SEC_4_WALL_4,ASHRAE 30PERC GUIDE_ZONE 5_STEEL-FRAMED_EXT-WALL,Wall, 45.60076, 76.00000 35,ZN_1_FLR_1_SEC_4_WALL_4_WINDOW_1,ASHRAE 30PERC GUIDE_ZONE 5_0.3_0.4_FIXED_WEST_WINDOW,Window, 30.39924, 30.39924 36,ZN_1_FLR_1_SEC_4_FLOOR,ASHRAE 30PERC GUIDE_ZONE 5_UNHEATED_EXT-SLAB,Floor, 70.51510, 70.51510 37,ZN_1_FLR_1_SEC_4_CEILING,ASHRAE 30PERC GUIDE_ZONE 5_IEAD_ROOF,Roof, 70.51510, 70.51510 38,ZN_1_FLR_1_SEC_4_INTERNALMASS_1,INTERIORFURNISHINGS,Internal Mass, 141.03020, 141.03020 43,ZN_1_FLR_1_SEC_5_FLOOR,ASHRAE 30PERC GUIDE_ZONE 5_UNHEATED_EXT-SLAB,Floor, 335.13960, 335.13960 44,ZN_1_FLR_1_SEC_5_CEILING,ASHRAE 30PERC GUIDE_ZONE 5_IEAD_ROOF,Roof, 323.24801, 335.13960 45,ZN_1_FLR_1_SEC_5_CEILING_SKYLIGHT_1,ASHRAE 30PERC GUIDE_ZONE 5_0_0.03_ALL SKYLIGHTS WITHOUT CURB_SKYLIGHT,Window, 1.48645, 1.48645 46,ZN_1_FLR_1_SEC_5_CEILING_SKYLIGHT_2,ASHRAE 30PERC GUIDE_ZONE 5_0_0.03_ALL SKYLIGHTS WITHOUT CURB_SKYLIGHT,Window, 1.48645, 1.48645 47,ZN_1_FLR_1_SEC_5_CEILING_SKYLIGHT_3,ASHRAE 30PERC GUIDE_ZONE 5_0_0.03_ALL SKYLIGHTS WITHOUT CURB_SKYLIGHT,Window, 1.48645, 1.48645 48,ZN_1_FLR_1_SEC_5_CEILING_SKYLIGHT_4,ASHRAE 30PERC GUIDE_ZONE 5_0_0.03_ALL SKYLIGHTS WITHOUT CURB_SKYLIGHT,Window, 1.48645, 1.48645 49,ZN_1_FLR_1_SEC_5_CEILING_SKYLIGHT_5,ASHRAE 30PERC GUIDE_ZONE 5_0_0.03_ALL SKYLIGHTS WITHOUT CURB_SKYLIGHT,Window, 1.48645, 1.48645 50,ZN_1_FLR_1_SEC_5_CEILING_SKYLIGHT_6,ASHRAE 30PERC GUIDE_ZONE 5_0_0.03_ALL SKYLIGHTS WITHOUT CURB_SKYLIGHT,Window, 1.48645, 1.48645 51,ZN_1_FLR_1_SEC_5_CEILING_SKYLIGHT_7,ASHRAE 30PERC GUIDE_ZONE 5_0_0.03_ALL SKYLIGHTS WITHOUT CURB_SKYLIGHT,Window, 1.48645, 1.48645 52,ZN_1_FLR_1_SEC_5_CEILING_SKYLIGHT_8,ASHRAE 30PERC GUIDE_ZONE 5_0_0.03_ALL SKYLIGHTS WITHOUT CURB_SKYLIGHT,Window, 1.48645, 1.48645 53,ZN_1_FLR_1_SEC_5_INTERNALMASS_1,INTERIORFURNISHINGS,Internal Mass, 670.27920, 670.27920
944486330e1eda6d94f113f9f0c209c8830c484a
67549df2a087a841e4e04a54509843c18795a981
/packets/echantillons/dojo/edit.sci
161f7945e273caca3c0edcc83cf9172e181c6c2e
[]
no_license
scicasoft/CRUD-generator
60494434091147e1f8aa62c02b7d34339747885e
037a7dabdf4d84933ffec560c0bd1a85c45deb03
refs/heads/master
2020-05-03T11:30:19.887391
2011-06-12T10:33:38
2011-06-12T10:33:38
719,111
0
2
null
null
null
null
UTF-8
Scilab
false
false
37
sci
edit.sci
<div><?php echo $this->form; ?></div>
ededd32cdd5f10ca7d4f2b2a133f9cd0967d1956
449d555969bfd7befe906877abab098c6e63a0e8
/2417/CH9/EX9.12/Ex9_12.sce
7633c1daf4341da4036e1d735cd20eed210db4cc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
897
sce
Ex9_12.sce
//scilab 5.4.1 clear; clc; printf("\t\t\tProblem Number 9.12\n\n\n"); // Chapter 9 : Gas Power Cycles // Problem 9.12 (page no. 478) // Solution //An air-standard Diesel engine rc=16; //Compression Ratio Rc=v2/v3 v4byv3=2; //Cutoff ratio=v4/v3 k=1.4; //with the cycle starting at 14 psia and 100 F //It is apparent incerease in compression ratio yields an increased cycle efficiency T2=100+460; //temperatures converted to absolute temperatures; ndiesel=1-((inv(rc))^(k-1)*(((v4byv3)^k-1)/(k*(v4byv3-1)))); //The efficiency of the diesel engine printf("The efficiency of the diesel engine is %f percentage\n",ndiesel*100); // T3/T2=rc^k-1 and T5/T4=(1/re^k-1) //re=expansion ratio=v5/v4 //But T4/T3=v4/v3=rc/re //So, T5=T2*(v4byv3)^k; //The temperature of the exhaust of the cycle //Unit:R printf("The temperature of the exhaust of the cycle is %f R i.e. %f F",T5,T5-460);
d2ba9948959343aaf5e7553c96513a46e9a63233
449d555969bfd7befe906877abab098c6e63a0e8
/1583/CH3/EX3.3/NNID_Ex_3_3.sce
9f34dd46d8d90bdf2ee9221c6c474ed1a340730e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
517
sce
NNID_Ex_3_3.sce
clc //Chapter 3:Network noise and intermodulation distortion //example 3.3 page no 80 //given NF1=2//first stage noise figure NF2=6//second stage noise figure F1=10^(NF1/10)//first stage noise factor F2=10^(NF2/10)//second stage noise factor G1=15.9//gain of first stage equivalent to 12dB G2=10//gain of second stage equivalent to 10dB F=F1+(F2-1)/G1//overall noise factor NF=10*log10(F)//noise figure of the two-stage systemm printf('the noise figure of the two-stage system is %f dB',round(NF*10)/10)
142590c56d58bd2dd52f7245091fa5fa55c24736
449d555969bfd7befe906877abab098c6e63a0e8
/3537/CH2/EX2.10/Ex2_10.sce
5d8bcb19fe9a95386ce2deb2aae82fcdd1abdb93
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex2_10.sce
//Example 2_10 clc(); clear; //To calculate the width of the central maxima d=2 //units in meters lemda=500*10^-9 //units in meters a=1.5*10^-3 //units in meters x=((2*d*lemda)/a)*10^3 printf("width of central maximum is %.2f mm",x)
33ea7501a6068125d9f4a3d1daa7a8bec4b2bf1f
449d555969bfd7befe906877abab098c6e63a0e8
/858/CH7/EX7.8/example_8.sce
b4f412a7887ff08d5c1e71867a5fa39edbc8b332
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
133
sce
example_8.sce
clc clear printf("example 7.8 page number 312\n\n") printf("it is a theoritical problem, book shall be referred for solution")
8f9e727b740c84c0d9de5f965c1043f3c424d064
ee3626ca13823b55caeb86e78fe258aad67d85e9
/scenes/toon_faces/toon_faces.sce
76a5c4ecd6d1f1db9ead7af83ca7a2d25721d53d
[]
no_license
Maleedo/ComputerGraphics
ea334e6a16520706e7934e61b2224e866b6f62dc
8e7bab0824676a67c1ea2faabddf128bbe9ef63c
refs/heads/master
2020-09-04T18:04:41.768905
2020-01-31T19:44:14
2020-01-31T19:44:14
219,843,157
0
0
null
null
null
null
UTF-8
Scilab
false
false
907
sce
toon_faces.sce
# camera: eye-point, look-at-point, up, fovy, width, height camera 0 16 50 0 12 -1 0 1 0 30 600 300 # recursion depth depth 1 # background color background 0.5 0.7 1.0 # global ambient light ambience 0.2 0.2 0.2 # light: position and color light 5 20 0 1.0 1.0 1.0 25 # meshes: filename, shading, material (ambient, diffuse, specular, shininess) mesh neutral.obj PHONG 0.2 0.2 0.2 0.9 0.9 0.4 1.0 1.0 1.0 30.0 0.0 mesh sad.obj PHONG 0.2 0.2 0.2 0.9 0.5 0.1 1.0 1.0 1.0 30.0 0.0 mesh confused.obj PHONG 0.2 0.2 0.2 0.9 0.2 0.2 1.0 1.0 1.0 30.0 0.0 mesh smile.obj PHONG 0.2 0.2 0.2 0.2 0.2 0.7 1.0 1.0 1.0 30.0 0.0 mesh kiss.obj PHONG 0.2 0.2 0.2 0.7 0.2 0.7 1.0 1.0 1.0 30.0 0.0 mesh puff.obj PHONG 0.2 0.2 0.2 0.2 0.7 0.7 1.0 1.0 1.0 30.0 0.0 # planes: center, normal, material plane 0 0 0 0 1 0 0.2 0.9 0.2 0.2 0.9 0.2 0.0 0.0 0.0 100.0 0.1
142b987e540e64d55eb547ed44a84b6e25858fb7
80fc9b7a10b546c9071b974c5328180e74ee1c5d
/TP1/4.5.sce
beb9d079e1fefdf1f7ab2e37a7a88ddbea023543
[]
no_license
ASokem/TP_MAP101
a443ddbd656d63918dd5caad3ce89418d02c0123
b87d45faea6bc793161bae2238bd6489e5d9ede5
refs/heads/main
2023-08-10T20:42:07.377878
2021-09-29T09:15:34
2021-09-29T09:15:34
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
445
sce
4.5.sce
// Copyright (C) 2021 - UGA - JIANG Yilun // // Date of creation: 2021-9-19 // disp("Exemple 1") for i = 1:10 disp(i) end disp("Exemple 2") t = [2.4 7.4 8 3.1 9.5 0.1] somme_t = 0; min_t = t(1) for i = i : length(t) v = t(i) disp(v) somme_t = somme_t + v if min_t > v then min_t = v end end mprintf("La somme des elements de tab_v est %f\n", somme_t) mprintf("Le min . des elements de tab_v est %f\n", min_t)
8a863c0a972443f88ae71e8fdacd2e93e366b684
449d555969bfd7befe906877abab098c6e63a0e8
/2084/CH11/EX11.8/11_8.sce
160e36a8a763ae28c918b63297a2f38d70329533
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
800
sce
11_8.sce
//developed in windows XP operating system 32bit //platform Scilab 5.4.1 clc;clear; //example 11.8 //calculation of the value of acceleration due to gavity //given data h=5*10^3//height(in m) above the earth's surface R=6400*10^3//radius(in m) of the earth g0=9.8//gravitational acceleration(in m/s^2) of the earth d=5*10^3//depth(in m) below the earth's surface //calculation gh=g0*(1-(2*h/R))//formula of gravitational acceleration at height h above the earth's surface gd=g0*(1-(d/R))//formula of gravitational acceleration at depth d below the earth's surface printf('the value of gravitational acceleration at height 5 km above the earth surface is %3.2f m/s^2',gh) printf('\nthe value of gravitational acceleration at depth 5 km below the earth surface is %3.2f m/s^2',gd)
e0399b3d29bc8593000cee78787c2a2f775df333
449d555969bfd7befe906877abab098c6e63a0e8
/278/CH4/EX4.17/ex_4_17.sce
12cc8fa4fc0d32bea93418f5de9e6f67db965c49
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
301
sce
ex_4_17.sce
clc //solution //given l=2400//mm//length A=900//mm^2//area P=500000//N//load m=1/0.25 E=0.2*10^6//N/mm^2//young's modulus //let dV be change in volume V=A*l//mm^3//volume of rod st=P/(A*E)//strain //dV/V=st*(1-(2/m)) dV=V*st*(1-(2/m))//mm^3 printf("the change in volume is approximately,%f mm^3",dV)
354f9dabd4f4f019ff4438b54dc421753104a3dc
449d555969bfd7befe906877abab098c6e63a0e8
/1445/CH2/EX2.36/Ex2_36.sce
3ec7e82b8f1e23ff18783e296bacf1933934d468
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
942
sce
Ex2_36.sce
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT //Example 36 // read it as example 35 in the book on page 2.90 clc; disp("CHAPTER 2"); disp("EXAMPLE 36"); //VARIABLE INITIALIZATION R1=10; //in Ω XL=15; //in R2=12; // C=20; //capacitative reactance in Ω V=230; // volts f=50; //Hz // //SOLUTION //Solution (a) //conductance g, susceptance b Z12=(R1^2 +XL^2); //squared impedance Z^2 for branch 1 Z22=(R1^2 +C^2); //squared impedance Z^2 for branch 2 g1=R1/Z12; g2=R2/Z22; b1=-XL/Z12; b2=C/Z22; g=g1+g2; b=b1+b2; Y=sqrt(g^2+b^2); I=V*Y; disp("SOLUTION (a)"); disp(sprintf("The total current is %f Amp", I)); pf=g/Y; disp("SOLUTION (b)"); disp(sprintf("The power factor is %f", pf)); disp(" "); // //END
0df382faba24a44b81eb11c765a7ff3e02ceede5
d7087cf730b37f76170323e080c090f8094979ac
/test/eval_expr/more_4.tst
c36d0069dba39a34b5db493716c51986839d6ce7
[]
no_license
VladimirMeshcheriakov/42sh
025dffe358b86f48eaf7751a5cb08d4d5d5366c4
52d782255592526d0838bc40269f6e71f6a51017
refs/heads/master
2023-03-15T17:26:20.575439
2015-06-26T12:44:05
2015-06-26T12:44:05
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
110
tst
more_4.tst
<cmd> ./main_test/eval_expr_tst "0-0"</cmd> <ref> echo "$((0-0))"</ref> <stdout> 0 </stdout> <ret> 0</ret>
8509557b034fd8ec11be9e24f543fba469f2d109
449d555969bfd7befe906877abab098c6e63a0e8
/2096/CH1/EX1.30.a/ex_1_30_a.sce
65c58052537552614f271039168c761e366f068e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
436
sce
ex_1_30_a.sce
//Example 1.30.a // determine the maximum value of temperature clc; clear; close; //given data : T=20; // rate change of temperature may be +ve or -ve in celcius t=120; // in seconds t1=18; // time constant for the bulb in seconds t2=36; // time constant for the well in seconds w=2*%pi*(1/t); a=1/sqrt(1+(w*t1)^2); b=1/sqrt(1+(w*t2)^2); I=a*b; Tmax=T*I; disp(Tmax,"the maximum indicated temperature,Tmax(celcius) = ±")
a525b281cdefbcd5d502dafeaf96550a38b38d13
8781912fe931b72e88f06cb03f2a6e1e617f37fe
/scilab/final/ga/steepest.sci
7f59af5601f6caaed8036103771a2a955d3744a9
[]
no_license
mikeg2105/matlab-old
fe216267968984e9fb0a0bdc4b9ab5a7dd6e306e
eac168097f9060b4787ee17e3a97f2099f8182c1
refs/heads/master
2021-05-01T07:58:19.274277
2018-02-11T22:09:18
2018-02-11T22:09:18
121,167,118
1
0
null
null
null
null
UTF-8
Scilab
false
false
2,749
sci
steepest.sci
// // // steepest descent method with backtracking line search applied to the rastrigin function // // function y=rastrigin(x) // the function to optimize n=max(size(x)); y=n+sum(x.^2-cos(2*%pi*x)); endfunction //----------------------------------------------------- function y=rastrigingrad(x) // the gradient of the function to optimize y=2*x+2*%pi*sin(2*%pi*x); endfunction //-------------------------------------------------------- function z=dotprod(x,y); // computes the dot product of x and y z=sum(x.*y); endfunction //----------------------------------------------------- function d=descentdirection(f,x,fx,gx); // descent direction: gradient d=-gx; endfunction //---------------------------------------------------- function [xnew,fnew,itback]=backtracking(f,x,fx,gx,d);// line search by backtracking until Armijo condition tau=0.3; bet=0.0001; alphainit=1; alpha=alphainit;xnew=x+alpha*d; fnew=f(xnew); itback=1; while(fnew>fx+bet*alpha*dotprod(gx,d)) alpha=tau*alpha; xnew=x+alpha*d; fnew=f(xnew); itback=itback+1; end endfunction //------------------------------------------------- // main program // disp('steepest descent method for the rastrigin function:'); // timer(); n=evstr(x_dialog('number of variables of the rastrigin function to minimize','2')); epsilon=1E-5; // xmin=-5.12*ones(1,n); xmax=5.12*ones(1,n); u=rand(1,n); x0=xmin+(xmax-xmin).*u; x=x0;fx=rastrigin(x);gx=rastrigingrad(x); itgrad=1; itfct=1; Xbest=x;Fbest=fx; // while (norm(gx)>epsilon) d=descentdirection(rastrigin,x,fx,gx); [x,fx,itback]=backtracking(rastrigin,x,fx,gx,d); Xbest=[Xbest;x]; Fbest=[Fbest;fx]; gx=rastrigingrad(x); itgrad=itgrad+1; itfct=itfct+itback; end //------------------------------------------------------ // results display // disp('function evaluation number:');disp(itfct); disp('gradient evaluation number:');disp(itgrad); // disp('minimum obtained:');disp(x); disp('corresponding value by f:');disp(fx); disp('corresponding value by g:');disp(gx); disp('computational time:');disp(timer()); // // case of the rastrigin function with 2 parameters (trajectory display)------ // if (n==2) xmin=-5.12;xmax=5.12;N=300; xplot=xmin:((xmax-xmin)/(N-1)):xmax; yplot=xplot; zplot=zeros(N,N); for i=1:N for j=1:N zplot(i,j)=rastrigin([xplot(i),yplot(j)]); end end xset('window',0) xbasc() plot2d(Xbest(:,1),Xbest(:,2),rect=[-5.12,-5.12,5.12,5.12]); contour2d(xplot,yplot,zplot,[0:0.01:0.1,0.2:1,1:10]); xtitle('trajectory display'); xset('window',1) xbasc() plot2d(Xbest(:,1),Xbest(:,2),rect=[x(1)-0.1,x(2)-0.1,x(1)+0.1,x(2)+0.1]); contour2d(xplot,yplot,zplot,[fx:0.1:(fx+1)]); xtitle('trajectory display'); end
af45b8066fac39a913cecbe1a3454a26b1c03027
449d555969bfd7befe906877abab098c6e63a0e8
/3363/CH6/EX6.6/Ex6_6.sce
aa7e0680c18683db73f5568b92af3f2c62340ae6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
573
sce
Ex6_6.sce
//Example 6.6, page 237 clc h=10^-34//in j-s m=10^-30//in kg a=10^-14//in m c=3*10^8//in m/s E=((%pi*h)^2)/(2*m*a*a) printf("\n Energy is %e J ",E) //convert to ev e=E/(1.6*10^-19) printf("\n Energy is %e ev ",e) //Answer difference is due to round off E1=(%pi*c*h)/a printf("\n Zero level Energy is %e J ",E1) e1=E1/(1.6*10^-19) printf("\n Zero level Energy is %e ev ",e1) //Answer difference is due to round off //when A=100 A=100 r=10^-14//in m x=10^-10//in coul2/nt-m2 ec=1.6*10^-19//in c Q=(-(A*ec*ec)/(x*r))*(1/ec) printf("\n Typical value Energy is %e ev ",Q)
af7b930918ab028aa428f3c0c3ca0d0d3accdb6a
8df791f9387f1c5538e8fb4cccb82ea4a130e879
/itpp_berc_get_errors/builder_gateway_cpp.sce
a010f0ee539f97a6c8044876856e3b7281dc89fc
[]
no_license
tripathiaishwarya/itpp_repo
b94552677dbbfc2ed461d59de6a7efde37ec547e
fcd832287f3651b192339dbdbf15933045ca8aff
refs/heads/master
2021-01-10T21:54:05.263442
2015-06-25T08:19:01
2015-06-25T08:19:01
37,813,835
2
1
null
null
null
null
UTF-8
Scilab
false
false
395
sce
builder_gateway_cpp.sce
// Builder gateway function for BERC get errors function builder_gw_cpp() WITHOUT_AUTO_PUTLHSVAR = %t; tbx_build_gateway("skeleton_cpp", .. ["berc_get_errors","itpp_berc_get_errors"], .. ["itpp_berc_get_errors.cpp"], .. get_absolute_file_path("builder_gateway_cpp.sce"), [], "-litpp"); endfunction builder_gw_cpp(); clear builder_gw_cpp; // remove builder_gw_cpp on stack
e5c0342e94e2cf1a4914d15e98b35e8415937310
449d555969bfd7befe906877abab098c6e63a0e8
/1883/CH5/EX5.7.5/Example5_19.sce
97b605dde67a96ec3157e6787d9c211dbe56c6e9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
722
sce
Example5_19.sce
//Chapter-5,Example5_7_5,pg 5-28 //By Heisenberg's uncertainty principle //(delta_E*delta_t)>=h/(4*%pi) //therefore (h*c*delta_wavelength*delta_t/wavelength^2) >= h/(4*%pi) wavelength=4*10^-7 //wavelength of spectral line c=3*10^8 //velocity of light in air delta_wavelength=8*10^-15 //width of spectral line delta_t=wavelength^2/(4*%pi*c*delta_wavelength) printf("\nThe minimum time required by the electrons in upper energy state Delta_t = \n") disp(delta_t) printf("sec\n")
4a070dc49528e98013839326051e6a06f301da7a
449d555969bfd7befe906877abab098c6e63a0e8
/377/CH9/EX9.9/9_9.sce
052cec22d56340e94b4fb4f057af976cfb7c8976
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
349
sce
9_9.sce
disp("Vbi=φm-((K*T/q)*log(Nc/n))"); a=0.72; //say φm=a b=0.0259; //say b=K*T/q Nc=3.22*10^19; n=10^15; Vbi=a-(b*log(Nc/n)); printf('\n The value of Vbi is %fV',Vbi); disp("W=sqrt(2*Єs*(Vbi-V)/(q*Nd))"); c=11.9*8.854*10^-14; V=0; q=1.6*10^-19; Nd=10^15; W=sqrt(2*c*(Vbi-V)/(q*Nd)); printf('\n The value of W is %f*10^-5 cm',W*10^5);
7f2edd98155ab1cb54ef199b7023a34dc2dc3544
449d555969bfd7befe906877abab098c6e63a0e8
/896/CH11/EX11.3/3.sce
9a967c2510cbabe05bc00f0a06c2f5c85cf22637
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
3.sce
clc //Example 11.3 //Calculate the permeability Q=1//ft^3/min mew=0.018//cP dx=0.5//in A=1//ft^2 dP=2//lbf/in^2 //1 ft = 12 in //1 min = 60 sec //1 ft^2.cP = 2.09*10^(-5) lbf.s //1 darcy = 1.06*10^(-11) ft^2 k=(Q*mew*(dx/12)/A/dP)*(1/144)*2.09*10^(-5)*(1/60)*(1/(1.06*10^(-11)))//darcy printf("The permeability is %f darcy",k);
db2e90780cf60ea69fc6a84359f2a7c2c722df85
1bb72df9a084fe4f8c0ec39f778282eb52750801
/test/PV2.prev.tst
eec3f4ed2629721c5f69326ee95ea42cbe3734be
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gfis/ramath
498adfc7a6d353d4775b33020fdf992628e3fbff
b09b48639ddd4709ffb1c729e33f6a4b9ef676b5
refs/heads/master
2023-08-17T00:10:37.092379
2023-08-04T07:48:00
2023-08-04T07:48:00
30,116,803
2
0
null
null
null
null
UTF-8
Scilab
false
false
45
tst
PV2.prev.tst
[a,b,c].powerSum(2, 2, 1) = a^2 + b^2 - c^2
2ddd6428094e09c9513aff4cbd6636a75cf5db2e
449d555969bfd7befe906877abab098c6e63a0e8
/2378/CH1/EX1.8/Exa_1_8.sce
ba6bf3667fc8d00a2748300ea0e60ead4e5ad2fe
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
380
sce
Exa_1_8.sce
//clearance in a bearing //Exa_1_5 clc; clear; F=400; //damping resistance in N v=10; //velocity in m/s mu=0.3445; //absolute viscosity in Pa-s A=0.1; //area of plates in m^2 c=F/v; //damping constant in N-s/m //modelling as flat plate type damper h=mu*A/c; //clearance between the plates disp(h,"clearance between the plates in m = ");
3cf4ed523de4e4c66c93b6daf402b2e948738fab
ef7da921e1289d3deaaf9727db2b6f025656e8d9
/DefiniteIntegral.sce
7de9086c90a97d6c4dfee7075bbf7d74a4eb0060
[]
no_license
PrayagS/SciLab_Exercises
ea88438207f2dc5d3f211c9abfe137a4bd43f68f
0495ba76e693750980fefb386c28209a6fd6563e
refs/heads/master
2020-09-08T01:52:22.914681
2019-11-16T05:39:29
2019-11-16T05:39:29
220,977,317
2
1
null
null
null
null
UTF-8
Scilab
false
false
137
sce
DefiniteIntegral.sce
clear; clf; dt = 1/1000; ts = 0; te = 4; t = ts : dt : te; N = length(t); // x = 2.*ones(1,N-1); x = t.*t; z = sum(x.*dt); disp(z);
d13df1d1458ae3b2cd156dd2f946ee52e2fb4a79
449d555969bfd7befe906877abab098c6e63a0e8
/1376/CH2/EX2.1/2_1.sci
d1e893ac3ae5bbd906f4cbdd9da66b3f64732631
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
139
sci
2_1.sci
//2.1 clc; N=400; a=4*10^-4; MUo=4*%pi*10^-7; MUr=800; l=0.3; L=(MUo*MUr*a*N^2)/l; printf("Self inductance of the coil=%.3f H",L)
3d24d69754646fd54b1217cef6c0a039fb9b5b1e
449d555969bfd7befe906877abab098c6e63a0e8
/647/CH5/EX5.1/Example5_1.sce
4dffa7e93c1d4d193aee7ee2fdb7acae5cfa0e11
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
448
sce
Example5_1.sce
clear; clc; // Example: 5.1 // Page: 150 printf("Example: 5.1 - Page: 150\n\n"); // Solution //*****Data*****// Th = 550 + 273;// [K] Tl = 27 + 273;// [K] //************// // The theoretical efficiency of a heat engine is given by: // eta = Net Work Output/Net Work Input // eta = Wnet/Qin // eta = (Qin - Qout)/Qin = (Th - Tl)/Th eta = (Th - Tl)/Th; printf("The theoretical efficiency of heat engine is %.1f %%",eta * 100)
8f0722fc52c3fc8592df35600328361266ae407b
449d555969bfd7befe906877abab098c6e63a0e8
/3137/CH12/EX12.3/Ex12_3.sce
0dff24b4fc35e50cd927236efbb22c7198a506df
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
429
sce
Ex12_3.sce
//Defining Matrices t=[0 1 2 3 4 5 10] //s //Displacement matrix s=[8*t^2+2*t] //m //Velocity Matrix v=[16*t+2] //m/s //Acceleration Matrix a=16 //m/s^2 //Plotting the curves //S-T curve subplot(221) plot(t,s) xlabel('t(s)') ylabel('s(m)') subplot(222) plot(t,v) xlabel('t(s)') ylabel('v(m/s)') subplot(223) plot(t,a) xlabel('t(s)') ylabel('a(m/s^2)') //Result clc printf('The graphs are the solutions')
c5cf604e41086ccff2e72661a53e4055a2cbefb9
449d555969bfd7befe906877abab098c6e63a0e8
/3517/CH15/EX15.3/Ex15_3.sce
caa0484d068b4eb6290148b99e42219517338b36
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
330
sce
Ex15_3.sce
//Caption:Determine the error due to capacitance //Ex15.3 clc; clear; close; Vgs=10//Gate source voltage(in volts) C=10.5//Capacitance(in pF) Vs=1//Supply voltage(in volts) C1=0.25//Capacitance(in micro farad) V1=-(Vs+Vgs+1) Vgsm=Vs-(V1) Q=C*Vgsm Vo=Q/C1 e=Vo*10^(-6)*100/Vs disp(e,'Error due to capacitance(in %)=')
e5709ca8c8f85f51593c22d792c67d1fe14bd118
573df9bfca39973c9bf2fa36f6e5af2643d7771e
/scilab/lib/fat.sci
26178d7af25e4258c354700f7f8303c4b82aff24
[]
no_license
DCC-CN/152cn
ef92c691edabe211b1a552dbb963f9fd9ceec94a
4fe0b02f961f37935a1335b5eac22d81400fa609
refs/heads/master
2016-08-13T01:34:17.966430
2015-04-07T07:31:58
2015-04-07T07:31:58
44,502,526
1
0
null
null
null
null
UTF-8
Scilab
false
false
98
sci
fat.sci
function resp = fat(n) resp = 1; for i = 2:n resp = resp * i; end endfunction
80845323514d4a031f21c01cf61c2de86d3596b0
089894a36ef33cb3d0f697541716c9b6cd8dcc43
/NLP_Project/test/blog/bow/bow.14_4.tst
44b660cadac0c956687b89c49c1abc65ef746d2a
[]
no_license
mandar15/NLP_Project
3142cda82d49ba0ea30b580c46bdd0e0348fe3ec
1dcb70a199a0f7ab8c72825bfd5b8146e75b7ec2
refs/heads/master
2020-05-20T13:36:05.842840
2013-07-31T06:53:59
2013-07-31T06:53:59
6,534,406
0
1
null
null
null
null
UTF-8
Scilab
false
false
5,716
tst
bow.14_4.tst
14 6:0.25 12:0.5 15:0.6666666666666666 16:0.025 33:0.2 35:0.16666666666666666 67:2.0 69:0.5 70:0.125 138:1.0 155:0.3333333333333333 156:1.0 207:0.3333333333333333 216:0.2 358:1.0 468:1.0 936:1.0 986:1.0 1095:1.0 1278:1.0 1325:1.0 1422:1.0 14 1:0.09090909090909091 15:0.3333333333333333 16:0.0125 18:0.3333333333333333 55:1.0 67:1.0 113:1.0 147:1.0 155:0.3333333333333333 285:1.0 742:1.0 759:1.0 1094:1.0 1424:1.0 14 6:0.5 7:1.0 18:0.3333333333333333 19:1.0 33:0.4 67:1.0 69:0.5 90:1.0 138:1.0 139:0.125 155:0.3333333333333333 184:1.0 225:1.0 355:1.0 729:1.0 759:1.0 815:1.0 1076:1.0 1077:1.0 1090:1.0 1120:1.0 1325:1.0 1422:1.0 1440:1.0 1609:1.0 14 112:1.0 769:1.0 890:0.3333333333333333 14 1:0.09090909090909091 4:1.0 6:0.25 12:0.5 15:0.6666666666666666 16:0.0375 18:1.6666666666666667 24:1.0 27:2.0 33:0.4 35:0.5 41:2.0 78:0.5 79:2.0 82:1.0 90:1.0 92:0.5 118:1.0 139:0.25 143:1.0 150:1.0 152:1.0 155:0.6666666666666666 181:0.5 184:1.0 239:1.0 306:1.0 335:1.0 502:1.0 511:2.0 581:1.0 757:1.0 890:0.3333333333333333 1044:1.0 1212:1.0 1216:1.0 1279:1.0 1364:1.0 1426:1.0 1557:1.0 1567:1.0 14 4:1.0 15:0.3333333333333333 16:0.0125 56:0.25 63:0.25 156:1.0 174:1.0 391:1.0 835:1.0 14 1:0.18181818181818182 12:1.5 15:0.3333333333333333 16:0.0125 27:2.0 33:0.2 35:0.16666666666666666 63:0.25 67:2.0 69:0.5 112:1.0 133:1.0 139:0.25 155:0.3333333333333333 184:1.0 186:1.0 225:2.0 232:0.6666666666666666 254:1.0 310:0.3333333333333333 356:1.0 358:3.0 417:0.5 484:1.0 793:1.0 951:1.0 1167:1.0 1177:1.0 1263:1.0 1325:1.0 1463:1.0 1512:1.0 1619:1.0 14 1:0.09090909090909091 53:1.0 63:0.25 77:1.0 133:0.5 171:1.0 14 504:1.0 14 6:0.5 67:1.0 90:1.0 112:1.0 155:0.3333333333333333 283:0.2 734:1.0 14 6:0.25 16:0.025 33:0.2 90:1.0 139:0.125 143:1.0 178:1.0 1120:1.0 1142:1.0 14 1:0.18181818181818182 16:0.0125 18:1.0 33:0.6 90:1.0 139:0.25 181:0.5 417:0.5 617:1.0 626:1.0 768:1.0 986:1.0 1095:1.0 1235:1.0 1288:1.0 1475:1.0 14 16:0.0125 18:0.3333333333333333 28:1.0 67:1.0 139:0.125 541:0.5 918:1.0 1070:1.0 1131:1.0 1534:1.0 14 12:0.5 18:0.3333333333333333 63:0.25 90:1.0 484:1.0 1212:1.0 1558:1.0 14 1:0.18181818181818182 6:0.5 12:1.0 16:0.0125 18:1.0 19:1.0 27:1.0 28:1.0 33:0.2 35:0.16666666666666666 38:1.0 56:0.25 68:1.0 70:0.125 118:1.0 139:0.375 147:1.0 197:1.0 484:1.0 637:1.0 867:1.0 878:1.0 952:1.0 966:1.0 969:1.0 1095:1.0 1232:2.0 1278:1.0 1609:1.0 14 1:0.18181818181818182 12:1.5 16:0.0125 33:0.6 35:0.16666666666666666 63:0.25 94:1.0 100:1.0 139:0.125 225:2.0 233:1.0 763:1.0 878:1.0 1177:1.0 1179:2.0 1440:1.0 1504:1.0 1620:1.0 14 1:0.36363636363636365 15:0.3333333333333333 27:1.0 61:1.0 77:1.0 90:1.0 94:1.0 147:1.0 358:1.0 369:1.0 385:1.0 574:1.0 601:0.5 793:2.0 1049:1.0 1107:1.0 1126:1.0 1214:1.0 14 1:0.09090909090909091 18:0.6666666666666666 33:0.2 147:1.0 162:0.3333333333333333 204:0.5 402:1.0 553:1.0 690:1.0 695:1.0 768:1.0 793:3.0 830:1.0 878:1.0 1154:0.5 1392:1.0 14 1:0.09090909090909091 33:0.2 61:1.0 90:1.0 358:2.0 369:1.0 685:2.0 966:1.0 1126:1.0 1526:1.0 14 1:0.2727272727272727 6:0.25 14:1.0 16:0.075 18:1.3333333333333333 33:0.6 35:0.5 48:0.5 67:1.0 92:0.25 122:0.2 137:0.5 139:0.25 178:2.0 181:1.0 193:1.0 207:0.3333333333333333 226:1.0 241:0.14285714285714285 258:1.0 307:1.0 323:1.0 347:0.5 370:1.0 405:1.0 469:0.5 711:1.0 777:1.0 793:1.0 934:1.0 936:1.0 986:1.0 1048:1.0 1049:1.0 1140:1.0 1348:1.0 1391:1.0 1422:1.0 14 1:0.09090909090909091 6:0.5 18:0.6666666666666666 19:1.0 148:0.5 181:0.5 285:1.0 686:1.0 966:1.0 1066:1.0 1200:1.0 1212:1.0 14 6:0.25 16:0.0125 18:0.3333333333333333 35:0.16666666666666666 41:0.5 94:1.0 189:0.3333333333333333 546:1.0 829:1.0 1229:1.0 14 133:0.5 138:1.0 155:0.3333333333333333 417:0.5 1491:1.0 14 15:0.3333333333333333 16:0.025 35:0.16666666666666666 44:0.5 56:0.25 138:1.0 155:0.3333333333333333 178:1.0 181:0.5 225:1.0 565:1.0 566:1.0 734:1.0 14 15:0.3333333333333333 16:0.05 18:0.3333333333333333 23:1.0 27:1.0 35:0.16666666666666666 38:1.0 41:0.5 46:0.045454545454545456 55:1.0 67:1.0 80:1.0 90:1.0 139:0.125 156:1.0 186:1.0 189:0.3333333333333333 347:0.5 780:1.0 1154:0.5 1424:1.0 14 1:0.09090909090909091 15:0.6666666666666666 16:0.025 56:0.25 90:1.0 112:1.0 178:1.0 453:1.0 14 4:1.0 6:0.25 16:0.0125 18:0.3333333333333333 33:0.2 48:0.5 69:0.5 94:1.0 155:0.6666666666666666 251:1.0 702:1.0 757:1.0 986:1.0 14 6:0.5 16:0.025 18:0.6666666666666666 19:1.0 56:0.5 67:1.0 90:1.0 139:0.125 232:0.3333333333333333 367:1.0 368:1.0 423:1.0 780:1.0 1051:1.0 1054:1.0 1200:1.0 1212:1.0 1609:1.0 14 18:0.3333333333333333 209:1.0 305:1.0 358:1.0 538:1.0 586:1.0 14 16:0.0125 30:1.0 32:1.0 35:0.16666666666666666 133:0.5 310:0.3333333333333333 14 1:0.09090909090909091 6:0.5 12:0.5 28:1.0 30:1.0 33:0.4 35:0.3333333333333333 48:0.5 63:0.25 100:1.0 139:0.125 362:1.0 369:1.0 417:0.5 796:1.0 1006:1.0 1354:1.0 14 1:0.09090909090909091 6:0.25 16:0.0125 18:0.3333333333333333 30:1.0 33:0.4 35:0.3333333333333333 63:0.25 139:0.25 358:1.0 370:1.0 549:1.0 754:1.0 14 1:0.18181818181818182 18:0.3333333333333333 30:1.0 33:0.2 14 16:0.0125 18:0.3333333333333333 56:0.25 705:1.0 14 6:0.25 12:0.5 16:0.025 18:0.3333333333333333 23:1.0 30:1.0 33:0.2 35:0.16666666666666666 46:0.045454545454545456 91:1.0 135:1.0 139:0.125 347:0.5 768:1.0 966:1.0 1070:1.0 14 1:0.09090909090909091 12:0.5 16:0.025 35:0.16666666666666666 78:0.5 139:0.25 142:1.0 502:1.0 632:1.0 14 1:0.18181818181818182 14:1.0 16:0.025 30:2.0 33:0.2 35:0.16666666666666666 46:0.045454545454545456 139:0.125 152:1.0 189:0.3333333333333333 196:1.0 245:0.5 349:1.0 447:0.5 915:0.3333333333333333 952:1.0 14 15:0.3333333333333333 16:0.0125 986:1.0 1141:1.0 14 12:0.5 15:0.6666666666666666 16:0.0125 33:0.4 35:0.3333333333333333 63:0.25 94:1.0 118:1.0 139:0.125 174:1.0 199:1.0 793:1.0 829:1.0 886:1.0 966:1.0 1407:1.0
9d9be3819d4368718c6b2ed011ccdc13f3a237ff
449d555969bfd7befe906877abab098c6e63a0e8
/3751/CH17/EX17.23/Ex17_23.sce
5503e692e5f703bf8dc03a40e0c878e07c1afb0a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
852
sce
Ex17_23.sce
//Fluid Systems - By Shiv Kumar //Chapter 17- Dimensional and Model Analysis //Example 17.23 //To Find the Velocity of the Prototype and Force Required to Propel the Prototytpe. clc clear //Given Data:- Lr=40; //Scale Ratio (Lp/Lm) //For Model, Vm=2; //Velocity for the Model, m/s Fm=0.5; //Propulsive Force in Model, N //For Prototype, Lp=45; //m //Computations:- //By Froude's Law of Similarity, Vp=Vm*Lr^(1/2); //Velocity for the Prototype, m/s Fp=Fm*Lr^3; //Force Required to Propel the Prototytpe, N //Results:- printf("The Velocity of the Prototype, Vp=%.2f m/s \n",Vp) //The Answer vary due to Round off Error printf("The Force Required to Propel the Prototytpe , Fp=%.f N \n",Fp)
bcf8495c8f1dcf3b40767ed74e6e213e586655fc
449d555969bfd7befe906877abab098c6e63a0e8
/2672/CH3/EX3.4/Ex3_4.sce
7f9cd70a7e5b1ea3581ae0f8fd484690151a4ecb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
309
sce
Ex3_4.sce
//Example 3_4 clc; clear; close; format('v',5); //given data : //Let T=1 for calculation T=1; //i=5*t/T+5;//A Iav=1/T*integrate('5*t/T+5','t',0,T); disp(Iav,"Average value(A)"); Irms=sqrt(1/T*integrate('(5*t/T+5)^2','t',0,T));//V disp(Irms,"rms value(A)"); //Answer is not accurate in the book.
afccc55c4b38e486ac6d2223d1c9837dc641b80d
449d555969bfd7befe906877abab098c6e63a0e8
/1332/CH6/EX6.1/6_1.sce
a80a928f1da39c4e7850e0237aab82ce1fec598e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
563
sce
6_1.sce
//Example 6.1 //Gaussian Elimination Method //Page no. 220 clc;clear;close; A=[5,10,1,28;1,1,1,6;4,8,3,29]; //augmented matrix //triangularization for i=1:4 B(1,i)=A(1,i) B(2,i)=A(2,i)-(A(2,1)/A(1,1))*A(1,i) B(3,i)=A(3,i)-(A(3,1)/A(1,1))*A(1,i) end disp(A,'Augmented Matrix=') disp(B,'Triangulated Matrix=') //back substitution x(3)=B(3,4)/B(3,3); printf('\nx(3)=%f\n',x(3)) for i=2:-1:1 k=0 for j=i+1:3 k=k+B(i,j)*x(j) end x(i)=(1/B(i,i))*(B(i,4)-k) printf('\nx(%i)=%f\n',i,x(i)) end
081ee754aecdcb585f80df266914901ee4739e48
449d555969bfd7befe906877abab098c6e63a0e8
/3755/CH13/EX13.14/Ex13_14.sce
01e2b3a6798df961099f07fe5617cdf130e2c0ea
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
298
sce
Ex13_14.sce
clear // // // //Variable declaration lamda=1.1*10^-6; //wavelength(m) r=60/2*10^-6; //radius(m) NA=0.25; //numerical aperture //Calculations V=2*%pi*r*NA/lamda; Nm=V^2/4; //number of guided modes //Result printf("\n number of guided modes is %0.3f ",Nm)
cba66e047a794c7ff0aec618ea4724edeb7eaef4
449d555969bfd7befe906877abab098c6e63a0e8
/2132/CH3/EX3.21/Example3_21.sce
f2e65e25015ee5169581698c20d24c610124b350
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
674
sce
Example3_21.sce
//Example 3.21 clc; clear; close; format('v',7); //Given data : r=2;//meter l=4;//meter A=r*l;//m^2 xbar=2+r/2;//meter w=9.81;//kN/m^2 PH=w*A*xbar;//kN disp(PH,"Horizontal component of resulting Pressure in kN : "); PV=2*r*l*w+%pi*r^2/4*l*w;//kN disp(PV,"Verticalal component of resulting Pressure in kN : "); IG=(l*r^3)/12;//in m^4 h_bar=IG/A/xbar+xbar;//in meter disp(h_bar,"Position of centre of horizontal component of pressure in meter : "); x=(2*r+%pi*r^2/4*(4*r/3/%pi))/(2*r+%pi*r^2/4);//meter P=sqrt(PH^2+PV^2);//kN disp(P,"Resultant pressure in kN : "); theta=atand(PV/PH);//degree disp(theta,"Direction of resultant pressure in degree : ");
34f3c6892c2d9c9e551ff4e477acddced7de0026
449d555969bfd7befe906877abab098c6e63a0e8
/1775/CH7/EX7.3/Chapter7_Example3.sce
c5437a38f4e904ad24c129cbe1d7859cd620bbbb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,801
sce
Chapter7_Example3.sce
//Chapter-7, Illustration 3, Page 347 //Title: Air Conditioning //============================================================================= clc clear //INPUT DATA RSH=10;//Room sensible heat in kW RLH=10;//Room latent heat in kW td1=25;//Inside temperature in oC RH1=0.5;//Inside Re-Heat factor h1=50.4;//Enthalpy at point 1 in kJ/kg td2=35;//Out door Dry bulb temperature in oC tw2=28;//Out door Wet bulb temperature in oC CR=4;//Cooling coil ratio BPF=0.1;//Cooling coil bypass factor tADP=10;//Apparatus dew point temperature in oC RH3=0.55;//Re-Heat factor at point 3 h3=58.2;//Enthalpy at point 3 in kJ/kg RH4=0.95;//Re-Heat factor at point 4 h4=32.2;//Enthalpy at point 4 in kJ/kg RH5=0.81;//Re-Heat factor at point 5 h5=36.8;//Enthalpy at point 5 in kJ/kg RH6=0.54;//Re-Heat factor at point 6 h6=43.1;//Enthalpy at point 5 in kJ/kg td6=22;//Temperature at point 6 in oC //CALCULATIONS td3=((td2-td1)/5)+td1;//Temperature at point 3 from Psychrometric chart shown in Page 348 in oC td4=(BPF*(td3-tADP))+tADP;//Temperature at point 4 from Psychrometric chart shown in Page 348 in oC td5=td4+((td1-td4)/5);//Temperature at point 5 from Psychrometric chart shown in Page 348 in oC RSHF=RSH/(RSH+RLH);//Room Sensible Heat Factor QR=h1-h6;//Total heat removed in kJ/kg S=(RSH+RLH)/QR;//Supply air quantity in kg/s R=(S*(h6-h5))/3.5;//Refrigeration load due to reheat in ton D=(S*4)/5;//Dehumidified air quantity in kg/s T=(D*(h3-h4))/3.5;//Total refrigerating capacity in ton Q=(D/5)/1.2;//Quantity of fresh air supplied in (m^3)/s //OUTPUT mprintf('Supply air condition to the room is %3.2f kg/s \n Refrigeration load due to reheat is %3.2f ton \n Total refrigerating capacity is %3.2f ton \n Quantity of fresh air supplied is %3.3f (m^3)/s',S,R,T,Q)
bfec6725cc9a33e6cb3c41494b1ff70ca023a512
449d555969bfd7befe906877abab098c6e63a0e8
/506/CH9/EX9.6.a/Example9_6a.sce
b51c30f27a91e6b7ac72ebff150aac18fc1641ae
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
549
sce
Example9_6a.sce
clear; clc; //Caption: To find parameters of power amplifier using pnp gemanium transistor //Given Data B=100;//beta Ico=-5;//in mA Ic=-1;//in mA Vcc=40; Re=5;//in ohm Rc=10;//in ohm //Ic= BIb + (1+B)*Ico //Ic=B(Ib+Ico) Ib=-(Ic/B)+Ico; disp('mA',Ib,'Ib='); //Neglecting Vbe Rb=(5-Vcc)/(Ib*0.001); disp('ohm',Rb,'Rb='); Vce=Vcc-15; if(Vce>(Vcc/2)) S=(1+B)*(1+(Rb/Re))/(1+B+(Rb/Re)); disp(S,'Stability Factor is='); end A=-(Vcc+(2*Ic*(Re+Rc)))*(S)*(0.007*Ico*0.01); disp('degreeC/W',1/A,'theta='); //end
ac73252129626effef440144580ed460cf0e4ceb
3fdbef4226f5b8cf3206c452750d4d9e60d57d77
/gradiente1.sce
6fd85f86c83fe6a4c5ba9974f4bd6a75b28f2d79
[ "BSD-3-Clause" ]
permissive
OtacilioNeto/scilab-examples
14bf80aff5ef8eb3754c345ade13ea6a7ef470c5
d8f87c8a311d88db862b74da5878dadd6d09f6b1
refs/heads/master
2023-07-09T07:10:09.483942
2023-06-29T01:12:25
2023-06-29T01:12:25
126,159,372
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,069
sce
gradiente1.sce
// Implementação do método do gradiente para f(x)=sen(x); funcprot(0); function str=mydisplay2D(h) pt = h.data; str=msprintf('(%0.3f, %0.4f)', pt(1), pt(2)); endfunction function [d]=plotaLabel2D(x, fx, janela, varargin) [lhs,rhs]=argn(0); scf(janela); e=gce(); e=e.children; drawlater(); d1=datatipCreate(e(1), [x, fx]); d1.visible="off"; d1.font_size=6; d1.orientation=1; d1.box_mode=%T; datatipSetDisplay(d1,"mydisplay2D"); drawnow(); d1.visible="on"; if rhs>=4 then d = varargin(1); d.visible="off"; end d = d1; endfunction x=[0:0.01:2*%pi]; fx=sin(x); scf(1); clf(1); plot(x, fx); // pause();// A implementação do algoritmo começa neste ponto erro = 0.00001; p = 0.1; xi = %pi/2+0.1; // Este eh o valor inicial de x xi_1 = xi-erro; d = 1; // Esta eh a implementação do gradient descendent para uma variável while(norm(xi-xi_1)>=erro) d = plotaLabel2D(xi, sin(xi), 1, d); xi_1 = xi; xi = xi_1 - p*cos(xi_1); // cos(x) é o gradiente de sen(x) end
9e1099ebf054cd68b247b519ab41609b39669667
449d555969bfd7befe906877abab098c6e63a0e8
/1970/CH7/EX7.3/Ch07Exa3.sce
cc3ae49548ee6816ecb19a2516319fd83a007eea
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
399
sce
Ch07Exa3.sce
// Scilab code Exa7.3: : Page-292 (2011) clc; clear; a_c = 0.221; // Attenuation coefficient, cm^2/g A = (1-exp(-0.22))*100; // Attenuation of beam of X-rays in passing through human tissue printf("\nThe attenuation of beam of X-rays in passing through human tissue = %d percent", ceil(A)); // Result // The attenuation of beam of X-rays in passing through human tissue = 20 percent
d979cfb04b8b2eab4f812236b198b084e8145b44
ebd6f68d47e192da7f81c528312358cfe8052c8d
/swig/Examples/test-suite/scilab/abstract_typedef_runme.sci
bfb03a2f1fff71d078cd16e3db51287f352764cf
[ "LicenseRef-scancode-swig", "GPL-3.0-or-later", "LicenseRef-scancode-unknown-license-reference", "GPL-3.0-only", "Apache-2.0" ]
permissive
inishchith/DeepSpeech
965ad34d69eb4d150ddf996d30d02a1b29c97d25
dcb7c716bc794d7690d96ed40179ed1996968a41
refs/heads/master
2021-01-16T16:16:05.282278
2020-05-19T08:00:33
2020-05-19T08:00:33
243,180,319
1
0
Apache-2.0
2020-02-26T05:54:51
2020-02-26T05:54:50
null
UTF-8
Scilab
false
false
195
sci
abstract_typedef_runme.sci
exec("swigtest.start", -1); try e = new_Engine(); catch swigtesterror(); end try a = new_A(); catch swigtesterror(); end // TODO: test write method exec("swigtest.quit", -1);
02f87f1a226adb2fa477e4d0d56f5ede4888a42a
449d555969bfd7befe906877abab098c6e63a0e8
/491/CH5/EX5.16/5_16.sce
fc3cec0457b6e898b69d7f02c05dc1b20d67c1a6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
509
sce
5_16.sce
Af = 40*180; // Area of flange in mm2 V = 10500 ; // Shear force acting on cross section F = 800 ; // Allowable load in shear df = 120 ; // Distance between centroid of flange and neutral axis in mm Q = Af*df ; // First moment of cross section of flange I = (1/12)*(210*280^3) - (1/12)*(180*200^3) ; // Moment of inertia of entire cross section in mm4 f = (V*Q)/I; // Shear flow s = (2*F)/f // Spacing between the screw disp("mm",s,"The maximum permissible longitudinal spacing s of the screws is")
c8b5ac7a7bc26afe4c8d9f93145b8b40ac36cb3f
449d555969bfd7befe906877abab098c6e63a0e8
/2175/CH5/EX5.1/5_1.sce
35dfc527e3513d2aba6b64da6af7b8374797405b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
113
sce
5_1.sce
clc; T2=10+273;//K T1=2000+273;//K eta=1-T2/T1; disp("highest possible efficiency is:"); disp("%",eta*100)
099b2840cdd817f2452201345aae4b3db2ad0e55
5a05d7e1b331922620afe242e4393f426335f2e3
/macros/convmtx.sci
c1f0109e7b692a21426c17a7b334fe6fc99600cf
[]
no_license
sauravdekhtawala/FOSSEE-Signal-Processing-Toolbox
2728cf855f58886c7c4a9317cc00784ba8cd8a5b
91f8045f58b6b96dbaaf2d4400586660b92d461c
refs/heads/master
2022-04-19T17:33:22.731810
2020-04-22T12:17:41
2020-04-22T12:17:41
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
815
sci
convmtx.sci
function b = convmtx (a, n) //Calling sequence: //b=convmtx(a,n); //convmtx(a,n); //This function returns the convolution matrix 'b'. //If 'a' is a column vector and if we need the convolution of 'a' with another column vector 'x' of length 'n' then an operation "convmtx(a,n)*x" yeilds the convoluted sequence much faster. //Similarily, if 'a' is a row vector then to convolve with another row vector 'x' of length n , then convoluted sequence can be obtained by //x*convmtx(a,n) [nargout,nargin]=argn(); if (nargin ~= 2) error("wrong number of input arguments"); end [r, c] = size(a); if ((r ~= 1) & (c ~= 1)) | (r*c == 0) error("convmtx: expecting vector argument"); end b = toeplitz([a(:); zeros(n-1,1)],[a(1); zeros(n-1,1)]); if (c > r) b = b.'; end endfunction
8223a2036fecebf84e2b2c771c136b3c7f02f131
449d555969bfd7befe906877abab098c6e63a0e8
/3740/CH5/EX5.4/Ex5_4.sce
b72806df3e0aff8bfcb201dbf181b82cf8b3f214
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
355
sce
Ex5_4.sce
//Optoelectronics - An Introduction, 2nd Edition by J. Wilson and J.F.B. Hawkes //Example 5.4 //OS=Windows XP sp3 //Scilab version 5.5.2 clc; clear; //given n1=1;//Refractive index of air medium n2=3.6;//Refractive index of GaAs medium R=((n2-n1)/(n2+n1))^2;//Reflectance at GaAs/air interface by Fresnel equation mprintf("\n R = %.2f",R);
a7caa546af48284cc07edbe5353aebeccf50c025
449d555969bfd7befe906877abab098c6e63a0e8
/599/CH6/EX6.14/example6_14.sce
1ca0104774363b079b79f4634bdef011fde7b4aa
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,164
sce
example6_14.sce
clear; clc; printf("\t Example 6.14\n"); d=450; //density of dry pulp in kg/m^3; thickness=0.05; //thickness in m^2 Ls=d*thickness; //mass of bone dry solid ais the drying surface A=1; //area in m^2 v=1*5*10^-2; //volume of material Nc=4.8; //in kg/m^2*hr xcr=.2; xbar=0.02; x1=.45; //new moisture content on wet basis x2=0.05; //new moisture content on wet basis X1=x1/(1-x1); //new moisture content on dry basis intially X2=x2/(1-x2); //new moisture content on dry basis finally after drying Xbar=xbar/(1-xbar); //crtical moisture content Xcr=xcr/(1-xcr); //equillibrium moisture //tbar=(Ls/(A*Nc))*((Xcr-Xbar)*log((Xcr-Xbar)/(X2-Xbar))); // but initial moisture is more than Xcr, so there is constant rate drying period and only falling rate peroid is observed tbar=Ls/(A*Nc) * ((X1-Xcr)+(Xcr-Xbar)*log((Xcr-Xbar)/(X2-Xbar))); printf("\n the time for drying the sheets from 45 to 5 percent moisture under same drying conditions is :%f min",tbar); //end
644d0e6f58a30cef7cf7020f643042d99bf89b11
449d555969bfd7befe906877abab098c6e63a0e8
/2708/CH18/EX18.2/ex_18_2.sce
77f94d6ae60b30605efbb6deb375216b4bea35d1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
387
sce
ex_18_2.sce
//Example 18.2 // Energy difference clc; clear; //given data : h=1.0545D-34;// averge Plank's constant in J-s m=9.1D-31;// mass of electron in kg a=1D-10;// dimension of box in meter E1=((h^2)/(2*m))*(%pi/a)^2;//fermi energy of first level in j E2=2*((h^2)/(m))*(%pi/a)^2;//fermi energy of second level in J D=E2-E1;// difference of energy disp(D,"energy difference in J")
be666500a828791991240b585e20bee3b977c7d2
449d555969bfd7befe906877abab098c6e63a0e8
/3886/CH17/EX17.4/17_4.sce
cad50745b17910f01563b9ccf82cd9784e0b91a8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
296
sce
17_4.sce
//Automobile moving //refer fig. 17.4 //initial velocity u=19.44 //m/sec //final velocity v=0 //applying impulse momentum equation //t=1.982/mu //on concrete road t1=1.982/0.75 //sec //on ice t2=1.982/0.08 //sec printf("\nOn concrete road t=%.3f sec\nOn ice t=%.3f sec",t1,t2)
e281bfb171d023c9d3aa78a554bb8fdc5a9b1f9d
449d555969bfd7befe906877abab098c6e63a0e8
/50/CH2/EX2.1/ex_1.sce
fe2fd52ce351013f5e1362eb86420f1b50623f39
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
742
sce
ex_1.sce
// The equation 8*x^3-12*x^2-2*x+3==0 has three real roots. // the graph of this function can be observed here. xset('window',0); x=-1:.01:2.5; // defining the range of x. deff('[y]=f(x)','y=8*x^3-12*x^2-2*x+3'); //defining the cunction y=feval(x,f); a=gca(); a.y_location = "origin"; a.x_location = "origin"; plot(x,y) // instruction to plot the graph title(' y = 8*x^3-12*x^2-2*x+3') // from the above plot we can infre that the function has roots between // the intervals (-1,0),(0,1),(1,2).
2ca825aef5493d8b23a5035c297231c989fe1df9
20299e0ddeae804fa1b39a7e3d2964b4d6f29638
/labs/lab1/Const0.tst
1926ca11a57f40990976ade165087377368f703f
[ "MIT" ]
permissive
Spud304/nand2tetris
4cdc53ec18ff65ab44f50d6cf95367476171c6e4
0e4448f403721b5d2720c1fadbc74eebeee093fb
refs/heads/master
2023-03-04T06:55:53.733219
2020-11-09T06:47:24
2020-11-09T06:47:24
308,123,827
0
0
null
null
null
null
UTF-8
Scilab
false
false
118
tst
Const0.tst
load Const0.hdl, output-file Const0.out, compare-to Const0.cmp, output-list out%B3.1.3; eval, output; eval, output;
f563867fc6aa52fdc8f6d137bd473410f0b1d2ee
449d555969bfd7befe906877abab098c6e63a0e8
/623/CH19/EX4.2.10/U4_C2_10.sce
da3c64df27a9ae15a3a86adfa0d0f09ae94e0f12
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
786
sce
U4_C2_10.sce
//variable initialization e=1.6*10^-19; //charge of electron (C) m=9.1*10^-31; //mass of electron (kg) B=0.1 //external magnetic field (Wb/m^2) g=4/3 mu=9.27*10^-24; //(J/T) //calculation E=g*mu*B; //The spacing of adjacent sub-levels (J) v=(e*B)/(4*%pi*m); //Larmor frequency (Hz) printf("\n The spacing of adjacent sub-levels = %e J\n Larmor frequency = %.1e Hz",E,v);
db0c4d54a759da102b06b683691651e505941516
449d555969bfd7befe906877abab098c6e63a0e8
/405/CH4/EX4.9/4_9.sce
c0cbccf7db3007b3d617bbdb14a5158d7289e3c9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,834
sce
4_9.sce
clear; clc; printf("\t\t\tExample Number 4.9\n\n\n"); // finite length cylinder suddenly exposed to convection // illustration4.9 // solution d = 0.05;// [m] diameter of aluminium cylinder Ti = 200;// [degree celsius] initial temperature of of cylinder Te = 70;// [degree celsius] environment temperature k = 215;// [W/m degree celsius] heat transfer coefficient of plate h = 525;// [W/square meter degree celsius] convection heat transfer coefficient alpha = 8.4*10^(-5);// [square meter/s] constant x1 = 0.00625;// [m] distance at which temperature is calculated from end t = 60;// [s] time after which temperature is measured r = 0.0125;// [m] radius at which temperature is calculated // to solve this problem we combine the solutions from heisler charts for an infinite cylinder and an infinite plate in accordance with the combination shown in fig (4-18f) // for the infinite plate problem L = 0.05;// [m] // the x position is measured fromthe center of the plate so that x = L-x1;// [m] A = k/(h*L); B = (alpha*t/L^(2)); // from figures (4-17) and (4-10) respectively thetha_o_by_i = 0.75; thetha_by_i = 0.95; // so that thetha_by_i_plate = thetha_o_by_i*thetha_by_i; // for the cylinder r_o = d/2;// [m] radius of the cylinder R = r/r_o; C = k/(h*r_o); D = (alpha*t/r_o^(2)); // and from figures (4-8) and (4-11), respectively thetha_o_by_i_cyl = 0.38; thetha_by_o = 0.98; // so that thetha_by_i_cyl = thetha_o_by_i_cyl*thetha_by_o; // combibing the solutions for the plate and cylinder gives thetha_by_i_short_cyl = thetha_by_i_plate*thetha_by_i_cyl; // thus T = Te+thetha_by_i_short_cyl*(Ti-Te); printf("the temperature at a radial position of 0.0125 m and a distance of 0.00625m from one end of cylinder 60 second after exposure to environment is %f degree celsius",T);
4c7c66e488da8feaf0f16a411151af4093561f46
449d555969bfd7befe906877abab098c6e63a0e8
/1373/CH7/EX7.11/Chapter7_Example11.sce
2f4ef4c334ec446f306ba1a2fb2496cc64b9eb21
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,104
sce
Chapter7_Example11.sce
//Chapter-7, Example 7.11, Page 298 //============================================================================= clc clear //INPUT DATA Ta=30;//Temperature of air stream in degree C v=25;//Velocity of stream in m/s x=0.05;//Side of a square in m D=0.05;//Diameter of circular cylinder in m Ts=124;//Surface temperature in degree C //CALCULATIONS Tf=(Ta+Ts)/2;//Film temperature in degree C k=0.03;//Thermal conductivity of air at 77 degree C Pr=0.7;//prantL number of air at 77 degree C v1=(20.92*10^-6);//Kinematic viscosity of air at 77 degree C Re=(v*D)/v1;//Reynolds number Nu1=0.027*Re^0.805*Pr^(1/3);//Nussults number for circulat tube h1=(Nu1*k)/D;//Heat tansfer coefficient for circular tube in W/m^2.K Nu2=0.102*Re^0.675*Pr^(1/3);//Nussults number for square tube h2=(Nu2*k)/D;//Heat transfer coefficient for square tube in W/m^2.K //OUTPUT mprintf('Heat transfer coefficient for circular tube is %3.1f W/m^2.K \nHeat transfer coefficient for square tube is %3.2f W/m^2.K',h1,h2) //=================================END OF PROGRAM==============================
4737892d1c707f9eca3c3c5e16b5951ea48cc74a
449d555969bfd7befe906877abab098c6e63a0e8
/839/CH12/EX12.2/Example_12_2.sce
d8ee5f923092177718eb77cb7d6cdf05d61757b7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,531
sce
Example_12_2.sce
//clear// clear; clc; //Example 12.2 //Given Tb1 = 141; //[F] Tb2 = 79; //[F]/ Tw1 = 65; //[F] Tw2 = 75; //[F] Vb_bar = 5; //[ft/s] rho_b = 53.1; //[lb/ft^3] mu_b = 1.16; //[lb/ft-h], Form Appendix 9 k_b = 0.089; //[Btu/ft-h-F], From Appendix 13 Cp_b = 0.435; //[Btu/lb-F], From Appendix 16 //Using Appndix 14 rho_w = 62.3; //[lb /ft^3] mu_w = 2.34; //[lb/ft-h] k_w = 0.346; //[Btu/ft-h-F] Cp_w = 1; //[Btu/lb-F] //Soultion Tavg_b = (Tb1+Tb2)/2; //[F] Tavg_w = (Tw1+Tw2)/2; //[F] Dit = 0.745/12; //[ft] Dot = 0.875/12; //[ft] //Using Appendix 5 //The inside diameter of the jacket Dij = 1.610/12; //[ft] //From Appendix 6, the inside sectional area of the copper tube (for a 7/8 in. BWG 16 tube) S = 0.00303; //[ft^2] //Equivalent diameter of the annular jacket space De = 4*(%pi/4*(Dij^2-Dot^2)/(%pi*(Dij+Dot))); //[ft] mb_dot = Vb_bar*rho_b*S; //[lb/s] //The rate of heat flow q = mb_dot*Cp_b*(Tb1-Tb2); //[Btu/s] //mass flow rate of water mw_dot = q/(Cp_w*(Tw2-Tw1)); //[lb/s] //Water velocity Vw_bar = mw_dot/(%pi/4*(Dij^2-Dot^2)*rho_w); //[ft/s] //Reynolds number for benzene and water Nre_b = Dit*Vb_bar*rho_b*3600/mu_b; Nre_w = De*Vw_bar*rho_w*3600/mu_w; //Prandtl Number for benzene and water Npr_b = Cp_b*mu_b/k_b; Npr_w = Cp_w*mu_w/k_w; //Preliminary estimates of the coefficients are obtained using Eq.(12.32), omitting the //correction for viscosity ratio: //Benzene hi = 0.023*Vb_bar*3600*rho_b*Cp_b/(Nre_b^0.2*Npr_b^(2/3)); //[Btu/ft^2-h-F] //Water ho = 0.023*Vw_bar*3600*rho_w*Cp_w/(Nre_w^0.2*Npr_w^(2/3)); //[Btu/ft^2-h-F] //Using Eq.(12.39) //Temperature drop over the benzene resistance delta_Ti = (1/hi)/(1/hi+Dit/(Dot*ho))*(Tavg_b-Tavg_w); //[F] Tw = Tavg_b - delta_Ti; //[F] //The viscosities of the liquids at Tw muw_b = 1.45; //[lb/ft-h] muw_w = 2.42*0.852; //[lb/ft-h] //Using Eq.(12.24), viscosity-correction factors phi are phi_b = (mu_b/muw_b)^0.14; phi_w = (mu_w/muw_w)^0.14; //The corrected coefficients are hi = hi*phi_b; //[Btu/ft^2-h-F] ho = ho*phi_w; //[Btu/ft^2-h-F] //The temperature drop over the benzene resistance and the wall temperature delta_Ti = (1/hi)/(1/hi+Dit/(Dot*ho))*(Tavg_b-Tavg_w); //[F] Tw = Tavg_b - delta_Ti //[F] //This is so close to previously calculated wall temperature that a second approximation //is unnecessary //Using Eq.(11.29), neglecting the resistance of the tube wall Uo = 1/(Dot/(Dit*hi)+1/ho); //[Btu/ft^2-h-F] disp('The overall coefficient is'); disp('Btu/ft^2-h-F',Uo);
1299d277fec18a11c99888aea50eecb6e7a2dfc4
b24d354cfcd174c92760535d8b71e22ced005d81
/DSP functions/tf2cl/tf2cl.sci
6b85d57dd186705f73628f3a32d3fcc6e04a6cc2
[]
no_license
shreniknambiar/FOSSEE-Signal-Processing-Toolbox
57ad8e2a71d64f95c4ccfd131e00095cf2b9c6f8
143cf61eff31240870dc0c4f61e32818a4482365
refs/heads/master
2021-01-01T18:25:34.435606
2017-07-25T18:23:47
2017-07-25T18:23:47
98,334,322
0
0
null
2017-07-25T17:48:00
2017-07-25T17:47:59
null
UTF-8
Scilab
false
false
2,418
sci
tf2cl.sci
function [k1,k2,c]= tf2cl(b,a) // Transfer function to coupled allpass lattice // //Calling Sequences // // [k1,k2] = tf2cl(b,a) where b is a real, symmetric vector of numerator coefficients and a is a real vector of denominator coefficients, corresponding to a stable digital filter, will perform the coupled allpass decomposition of a stable IIR filter H(z) and convert the allpass transfer functions H1(z) and H2(z) to a coupled lattice allpass structure with coefficients given in vectors k1 and k2. // // H(z)=B(z)A(z)=(1/2)[H1(z)+H2(z)] // //[k1,k2] = tf2cl(b,a) where b is a real, antisymmetric vector of numerator coefficients and a is a real vector of denominator coefficients, corresponding to a stable digital filter, performs the coupled allpass decomposition of a stable IIR filter H(z) and convert the allpass transfer functions H1(z) and H2(z) to a coupled lattice allpass structure with coefficients given in vectors k1 and k2. // // H(z)=B(z)A(z)=(1/2)[H1(z)−H2(z)] // // [k1,k2,be] = tf2cl(b,a) performs the generalized allpass decomposition of a stable IIR filter H(z) and converts the complex allpass transfer functions H1(z) and H2(z) to corresponding lattice allpass filters // H(z)=B(z)A(z)=(1/2)[β'*H1(z)+β*H2(z)] //Input Parameters: // b: Vector of numerator coefficients of the digital filters // a: Vector of denominator coefficients of the digital filters // //Output Parameters: // k1 & k2: Coefficients of coupled lattice allpass structure given in vectors // be: Complex Scalar // //Example: // [b,a]=cheby1(9,.5,.4); // [k1,k2]=tf2cl(b,a); // [num1,den1]=latc2tf(k1,'allpass'); // [num2,den2]=latc2tf(k2,'allpass'); // num = 0.5*conv(num1,den2)+0.5*conv(num2,den1); // den = conv(den1,den2); // // Author: Shrenik Nambiar // //References: S. K. Mitra, Digital Signal Processing, A Computer Based Approach, McGraw-Hill, N.Y., 1998 // Input validation statements // if argn(2)~=2 then error("Only 2 input arguments allowed"); end if argn(1)<1 | argn(1)>3 then error("The number of output arguments allowed are 1-3"); end [d1,d2,c]= tf2ca(b,a); // To obtain the coefficients of the coupesd all pass filters k1= tf2latc(1,d1); k2= tf2latc(1,d2); endfunction
7b4ef311385c8f4ae02b1775d0dd5104a638f087
4b3c8d2302d37ad5981adb6f68fae3db1d9820c8
/createNewRegfile.sci
d0be8ddb36e9426982f13e5ca95d21a486f53d24
[]
no_license
mayank1513/littleBird_RD_ResourceManagementSystem
002d19579b3b55a314450ec75d2874131741564b
090d016248164580defc9b4629ba54c9dc362949
refs/heads/master
2020-03-15T04:48:31.637752
2018-05-03T09:46:53
2018-05-03T09:46:53
131,970,842
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,697
sci
createNewRegfile.sci
function regNo = createNewRegfile(fc_name,regNoList,nFamily,regColInd,regValues,vilStr,regDate,regN) if regN~=-1 then n = find(regNoList(:,1)==regN); if isempty(n) then btn = messagebox('registration number' + string(regN) + 'does not exist', 'littleBird', 'error', ['Enter Correct Registration Number', 'Cancel'], 'modal'); if btn == 1 then while isempty(n) regN = x_mdialog('Enter Correct Registration Number','GEV'); if isempty(regN) break; end n = find(regNoList(:,1)==regN); end if isempty(n) then return -1; end else return -1; end end if sum(length(stripblanks(regNoList(n,regColInd))~=0)) then mStr = 'Entries already Exist:'; mStr(2:3,1:size(regColInd,2)) = regNo([1 n],regColInd); btn = messagebox(mStr , 'littleBird', 'error', ['Over Write New Values', 'Cancel'], 'modal'); if btn == 1 regNoList(n,regColInd) = regValues; //overwriting if there was any existing entry else return -1; end end regNoList(n,regColInd) = regValues; //overwriting if there was any existing entry // implement check for nFamily return regN; end nReg = size(regNoList,1); [d, m, y] = str2date(regDate); if m<4 then y = y-1; end n = '000'; n = part(n,1:3-length(string(nReg))) + string(nReg); regNo = 'GEV' + string(y) + vilStr + n; regNoList($+1,[1 2 regColInd]) = [regNo nFamily regValues]; csvWrite(regNoList,fc_name); endfunction
10a45b29cd298c437885b360acdb624028fca032
449d555969bfd7befe906877abab098c6e63a0e8
/3630/CH9/EX9.1/Ex9_1.sce
1af2d0c9f6a6ad67f17b3d4173aaf1418f892de2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
227
sce
Ex9_1.sce
clc; R2=2200; //ohm R1=10000; //ohm Vcc=10; //volt Vb=Vcc*(R2/(R1+R2)); //volt Ve=Vb-0.7; //volt Re=1000; //ohm Ie=Ve/Re; //Ampere re=0.025/Ie; //Ohm disp('ohm',re,"re=");//The answers vary due to round off error