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
f3520707fe0a6858cd99a994b60476b6c9275f1e
40384c4066dda9a87b764f8c78f44f4b87a9af5f
/PontoFixo.sci
46af18e8f7a75174be1ca7e2ce20dc6e4a562490
[]
no_license
SergioNoivak/Calculo-Numerico
97866ab7ead8ee4b8f5dd4aacaea411b6eebd5e5
25be9c05a5331bfd053433a09f77a4d9b76c3bb7
refs/heads/master
2021-01-02T22:41:21.556896
2018-08-19T22:44:55
2018-08-19T22:44:55
99,368,088
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,070
sci
PontoFixo.sci
clear clc //##############################Método da iteração linear#############################// function tabela (A) if A<0 then mprintf (" %1.7f",A); else mprintf (" %1.7f",A); end; endfunction; deff ('y=f(x)', 'y=x^2 -3'); FUNC='y=x^2 -3';//prinf da função x0=1.0; posicao=0.001; Imax=100; i=0; x=f(x0); mprintf ("///////////////////Método da iteração linear///////////////////"); disp (""); mprintf (" Para a função: %s\n Com a condição inicial: %.4f e precisão %.7f\n\n", FUNC, x0, posicao); mprintf (" # x0 x f(x0) f(x) x-x0"); disp (""); mprintf (" %i",i); tabela (x0); tabela (x); tabela (f(x0)); tabela (f(x)); tabela (x-x0); disp (""); while (abs(x-x0)>posicao) & (i<Imax) i=i+1; x0=x; x=f(x0); mprintf (" %i",i); tabela (x0); tabela (x); tabela (f(x0)); tabela (f(x)); tabela (x-x0); disp (""); end; mprintf ("\n///////////////Raiz aproximada: %1.7f \n", x); mprintf ("///////////Qtde. de Interações: %i", i); disp ("");
eb82de4c6341ca646a69341f9716a3331629a377
449d555969bfd7befe906877abab098c6e63a0e8
/2744/CH13/EX13.6/Ex13_6.sce
4166bb2739708c1770243c488a21d8057004dbcf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
694
sce
Ex13_6.sce
clear; clc; W = 180;// lb per sq.foot l = 10;// feet b = 12;//inches c = 750;// lb/in^2 m = 15; M = W*l*l*12/8;//lb-inches d_new = sqrt(M/(126*b));//inches A_t = 0.8*b*d_new/100;//in^2 //using 3/8 inch rods d1 = 3/8;//inches A1 = 0.25*%pi*(d1)^2;//in^2 r1 = A1*b/A_t;//inch //using 1/2 inch rods d2 = 1/2;//inches A2 = 0.25*%pi*(d2)^2;//in^2 r2 = A2*b/A_t;//inches printf('d = %.3f inches',d_new); printf('\n A_t = %.3f in^2',A_t); printf('\n Using %.3f inch rods, spacing centre to centre will be %.2f inches',d1,r1); printf('\n Using %.2f inch rods, spacing centre to centre will be %.1f inches',d2,r2); //there are round-off errors in the answer given in textbook
59f0d226dc9f4c9d882207510eb65c61ab00382b
5f48beee3dc825617c83ba20a7c82c544061af65
/tests/s/53.tst
004e563c9625d1ae4862839f222670d068a87297
[]
no_license
grenkin/compiler
bed06cd6dac49c1ca89d2723174210cd3dc8efea
30634ec46fba10333cf284399f577be7fb8e5b61
refs/heads/master
2020-06-20T12:44:17.903582
2016-11-27T03:08:20
2016-11-27T03:08:20
74,863,612
3
0
null
null
null
null
UTF-8
Scilab
false
false
35
tst
53.tst
int f(void) { } int f1(void) { }
eb0d4153beb46ecd141067f285d350cedef5b30a
449d555969bfd7befe906877abab098c6e63a0e8
/2855/CH6/EX6.19/Ex6_19.sce
ac59577202b2156eb951599bbf113dcd4936c92c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
504
sce
Ex6_19.sce
//chapter 6 //page no184 //Ex6_19 //given clear; clc; dV=45; //in mV di=2.5; //in Amp CT=2.2; //in microF LT=0.05; //in nH fCL=di/(dV*10^-3*2*%pi*CT*10^-6); printf("\n fLnoise = %0.0f MHz\n ",fCL/10^6); //Result fCH=42.3; //in MHz taken from last question i.e. 6.18 printf("\n fHnoise (from last question i.e. 6.18)= %0.1f MHz\n ",fCH); printf("\n %0.0fMHz <= B.W.noise <= %0.2fMHZ",fCL/10^6,fCH); //Result
09caf201bd89bda230aea17864d22b2c91f40d29
449d555969bfd7befe906877abab098c6e63a0e8
/569/CH7/EX7.5/7_5.sci
42254ce352819cc952554ddbb8e4522047fe23e6
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
289
sci
7_5.sci
// calculating maximum error clc; R=5*10^6; V=0.00005*R; disp(V,'0.005 percent of the reading(micro sec)='); LSD=1; ME=V+1; disp(ME,'Maximum error (micro sec)=') R=500; V=0.00005*R; disp(V,'0.005 percent of the reading(sec)='); LSD=1; ME=V+1; disp(ME,'Maximum error (sec)=')
c48384722924ee6165956c70436d1de5d7f14c8c
449d555969bfd7befe906877abab098c6e63a0e8
/137/CH11/EX11.8a/11_8a.sce
919acfe25e9f3cf26a876ce02df3db1837fe0a72
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
201
sce
11_8a.sce
//page 507 // example 11.8a clc; P1=input("enter prob of symbol 1"); P0=input("enter prob of symbol 0"); ak=(1)*P1+(0)*P2; disp(ak,"mean is"); Ro=(1^2)*P1+((0)^2)*P2; disp(Ro,"mean square is");
5899c6ecc68282374860587f6a1624760329d4b1
449d555969bfd7befe906877abab098c6e63a0e8
/632/CH12/EX12.19/example12_19.sce
7fb2f5f97f4995141fc47502988be48de2941dd8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
595
sce
example12_19.sce
//clc() Nco = 1;//mol CO // CO + 1/2 O2 = CO2 O2r = 1;//mol N2r = 3.76;//mol COr = 1;//mol O2p = 0.5;//mol N2p = 3.76;//mol CO2p = 1;//mol Hco = 29.23;//J/molK Ho2 = 34.83;//J/molK Hn2 = 33.03;//J/molK Hco2 = 53.59;//J/molK Hcomb1 = -282.99;//kJ/mol T1 = 298;//K T2 = 373;//K H1 = (O2r * Ho2 + N2r * Hn2 + COr * Hco) * (T1 - T2); //For product at temp T, H2 = (O2p * Ho2 + N2p * Hn2 + CO2p * Hco2) * (T - T1) //For adiabatic condition, -(H1 + Hcomb1) = H2 T = -(H1 + Hcomb1 * 1000) / (O2p * Ho2 + N2p * Hn2 + CO2p * Hco2) + T1; disp("K",T,"Theoretical flame temperature = ")
3f6600f3bf62e3c0de8e89663ba3e9413fb3bcc1
449d555969bfd7befe906877abab098c6e63a0e8
/3755/CH13/EX13.7/Ex13_7.sce
d09b8551d9cfe89e85578b43935a490cf6e5c743
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
599
sce
Ex13_7.sce
clear // // // //Variable declaration vf=3*10^8; //velocity of light in free space(m/s) vc=2*10^8; //velocity of light in core(m/s) thetac=60*%pi/180; //critical angle(radians) //Calculations n1=vf/vc; //core refractive index n2=n1*sin(thetac); //cladding refractive index NA=sqrt(n1^2-n2^2); //numerical aperture //Result printf("\n core refractive index is %0.3f ",n1) printf("\n cladding refractive index is %0.1f ",n2) printf("\n numerical aperture is %0.3f ",NA) printf("\n answer for numerical aperture varies due to rounding off errors")
725efa6a4846e3045217e4ed7dc61b9c4d1fab8e
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.3.1/Unix-Windows/scilab-2.3/tests/metanet.tst
43ad94b81224e6dd88af4d14559f5e8a81c9d0a8
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
17,858
tst
metanet.tst
// add_edge ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); g=add_edge(1,7,g) // add_node ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); g('node_x')=[283 163 63 57 164 164 273 271 339 384 504 513 439 623 631 757 642]; g('node_y')=[59 133 223 318 227 319 221 324 432 141 209 319 428 443 187 151 301]; n=g('node_number'); g1=add_node(g,[270 140]) // adj_lists ta=[2 3 3 5 3 4 4 5 8]; he=[1 2 4 2 6 6 7 7 4]; g=make_graph('foo',1,8,ta,he); [lp,la,ls]=adj_lists(1,g('node_number'),ta,he) // arc_graph ta=[1 1 2 4 4 5 6 7 2 3 5 1]; he=[2 6 3 6 7 8 8 8 4 7 3 5]; g=make_graph('foo',1,8,ta,he); g1=arc_graph(g) // arc_number ta=[1 1 2 4 4 5 6 7 2 3 5 1]; he=[2 6 3 6 7 8 8 8 4 7 3 5]; g=make_graph('foo',1,8,ta,he); arc_number(g) // articul ta=[2 1 3 2 2 4 4 5 6 7 8 8 9 10 10 10 10 11 12 13 14 15 16 17 17]; he=[1 10 2 5 7 3 2 4 5 8 6 9 7 7 11 13 15 12 13 14 11 16 17 14 15]; g=make_graph('foo',1,17,ta,he); nart = articul(g) // banwr ta=[2 1 3 2 2 4 4 5 6 7 8 8 9 10 10 10 10 11 12 13 13 14 15 16 16 17 17]; he=[1 10 2 5 7 3 2 4 5 8 6 9 7 7 11 13 15 12 13 9 14 11 16 1 17 14 15]; g=make_graph('foo',0,17,ta,he); n=g('node_number'); [lp,la,ls] = adj_lists(1,n,g('tail'),g('head')); aa=graph_2_mat(g); ij=[g('tail')' g('head')']; v=1*ones(g('tail')'); vv=sparse(ij,v,[n n]); ww=tril(vv+vv')';ww=ww+eye; ww1=full(ww); [iperm,mrepi,profile,ierr]=bandwr(ww) g2=g;g2('node_name')=string(iperm); yy=0*ones(n,n); for i=1:n, for j=1:n, yy(i,j)=ww1(mrepi(i),mrepi(j));end;end; [ij,v,mn]=spget(ww); g1=make_graph('foo',0,n,ij(:,1)',ij(:,2)'); [lp,la,ls] = adj_lists(1,n,g1('tail'),g1('head')); [iperm,mrepi,profile,ierr]=bandwr(lp,ls,n,0) // best_match ta=[27 27 3 12 11 12 27 26 26 25 25 24 23 23 21 22 21 20 19 18 18]; ta=[ta 16 15 15 14 12 9 10 6 9 17 8 17 10 20 11 23 23 12 18 28]; he=[ 1 2 2 4 5 11 13 1 25 22 24 22 22 19 13 13 14 16 16 9 16]; he=[he 10 10 11 12 2 6 5 5 7 8 7 9 6 11 4 18 13 3 28 17]; n=28; g=make_graph('foo',0,n,ta,he); [card,match] = best_match(g) // chain_struct ta=[1 1 2 3 5 4 6 7 7 3 3 8 8 5]; he=[2 3 5 4 6 6 7 4 3 2 8 1 7 4]; g=make_graph('foo',1,8,ta,he); [lp,la,ls]=adj_lists(1,g('node_number'),ta,he); [fe,che,fn,chn] = chain_struct(lp,la,ls) // check_graph ta=[1 1 2 3 5 4 6 7 7 3 3 8 8 5]; he=[2 3 5 4 6 6 7 4 3 2 8 1 7 4]; g=make_graph('foo',1,8,ta,he); check_graph(g) // circuit ta=[1 1 2 3 5 4 6 7 7 3 3 8 8 5]; he=[2 3 5 4 6 6 7 4 3 2 8 1 7 4]; g=make_graph('foo',1,8,ta,he); p=circuit(g) g=make_graph('foo',1,4,[1 2 2 3],[2 3 4 4]); [p,r]=circuit(g) // con_nodes ta=[1 1 2 2 2 3 4 4 5 7 7 9 10 12 12 13 13 14 15]; he=[2 6 3 4 5 1 3 5 1 8 9 8 11 10 11 11 15 13 14]; g=make_graph('foo',1,15,ta,he); con_nodes(2,g) // connex ta=[1 1 2 2 2 3 4 4 5 6 7 7 7 8 9 10 12 12 13 13 14 15]; he=[2 6 3 4 5 1 3 5 1 7 5 8 9 5 8 11 10 11 11 15 13 14]; g=make_graph('foo',1,15,ta,he); [nc,ncomp]=connex(g) // contract_edge ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 13 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); g1=contract_edge(10,13,g) // convex_hull xx=[46 120 207 286 366 453 543 544 473 387 300 206 136 250 346 408]; g('node_x')=[xx 527 443 306 326 196 139 264 55 58 46 118 513]; yy=[36 34 37 40 38 40 35 102 102 98 93 96 167 172 101 179]; g('node_y')=[yy 198 252 183 148 172 256 259 258 167 109 104 253]; xy=[g('node_x');g('node_y')]; [nhull,ind] = convex_hull(xy) // cycle_basis ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 13 15 12 13 9 10 14 11 16 1 17 14 15]; gt=make_graph('foo',1,17,ta,he); g=graph_simp(gt); spc=cycle_basis(g) // delete_arcs ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 13 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); ij=[10 13;8 6;5 4;4 2]; gt=delete_arcs(ij,g) // delete_nodes ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 13 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); v=[10 13 4]; gt=delete_nodes(v,g) // edge_number ta=[1 1 2 4 4 5 6 7 2 3 5 1]; he=[2 6 3 6 7 8 8 8 4 7 3 5]; g=make_graph('foo',1,8,ta,he); edge_number(g) // find_path ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); p=find_path(1,14,g) // gen_net v=[1,10,2,1,0,10,100,100,0,100,50,50]; g=gen_net('foo',1,v) // girth ta=[1 6 2 4 7 5 6 8 4 3 5 1]; he=[2 1 3 6 4 8 8 7 2 7 3 5]; g=make_graph('foo',1,8,ta,he); d=girth(g) // glist ta=[1 1 2 7 8 9 10 10 10 10 11 12 13 13]; he=[2 10 7 8 9 7 7 11 13 13 12 13 9 10]; g=glist('foo',1,13,ta,he,[],[],[],[],[],[],[],[],[],[],[],.. [],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]) // graph_2_mat g=load_graph(SCI+'/demos/metanet/colored'); a=graph_2_mat(g) // graph_center ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 11 12 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 15 12 13 9 14 11 16 1 17 14 15]; g=make_graph('foo',0,17,ta,he); [no,rad] = graph_center(g) // graph_complement ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 11 12 13 13 13 14 15 17 17 16 16]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 15 12 13 9 10 14 11 16 14 15 1 17]; g=make_graph('foo',1,17,ta,he); g1=graph_complement(g) // graph_diameter ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 11 12 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 15 12 13 9 14 11 16 1 17 14 15]; g=make_graph('foo',0,17,ta,he); [d,p] = graph_diameter(g) // graph_power ta=[1 1 2 4 4 5 6 7 2 3 5 1]; he=[2 6 3 6 7 8 8 8 4 7 3 5]; g=make_graph('foo',1,8,ta,he); g1=graph_power(g,2) // graph_simp ta=[1 1 1 2 2 2 3 4 4 4 5 5 6 7 7 8 8 9 9 10 10 10 10 10 11 12 12 13 13 13 14 15 16 16 17 17]; he=[1 2 10 3 5 7 4 2 9 9 4 6 6 8 2 6 9 7 4 7 11 13 13 15 12 11 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); g1=graph_simp(g) // graph_sum ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); ta=[2 3 4 5 11 12 1]; he=[10 5 6 7 15 17 7]; g1=make_graph('foo',1,17,ta,he); g2=graph_sum(g,g1) // graph_union ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 13 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); v=[7 8 9 10 11 12 13]; g1=subgraph(v,'nodes',g); v=[1 2 5 6 7 8 9 10]; g2=subgraph(v,'nodes',g); g=graph_union(g1,g2) // hamilton ta=[2 1 3 2 2 4 4 5 6 7 8 8 9 10 10 10 10 11 12 13 13 14 15 16 16 17 17]; he=[1 10 2 5 7 3 2 4 5 8 6 9 7 7 11 13 15 12 13 9 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); cir=hamilton(g) // is_connex g=make_graph('foo',1,3,[1,2,3,1],[2,3,1,3]); is_connex(g) g=make_graph('foo',1,4,[1,2,3,1],[2,3,1,3]); is_connex(g) // knapsack weight=ones(1,15).*.[1:4]; profit=ones(1,60); capa=[15 45 30 60]; [earn,ind]=knapsack(profit,weight,capa) // line_graph ta=[1 1 2 4 4 5 6 7 2 3 5 1]; he=[2 6 3 6 7 8 8 8 4 7 3 5]; g=make_graph('foo',0,8,ta,he); g1=line_graph(g) // load_graph g=load_graph(SCI+'/demos/metanet/colored') // make_graph g=make_graph('foo',1,3,[1,2,3,1],[2,3,1,3]) ta=[1 1 2 7 8 9 10 10 10 10 11 12 13 13]; he=[2 10 7 8 9 7 7 11 13 13 12 13 9 10]; g=make_graph('foo',1,0,ta,he) // mat_2_graph g=load_graph(SCI+'/demos/metanet/colored'); a=graph_2_mat(g); g1=mat_2_graph(a,1) // max_cap_path ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); ma=edge_number(g); g('edge_max_cap')=[8 17 5 10 15 15 18 15 19 6 13 15 16 8 13 8 8 8 19 15 9 19 8 10 10 9 14]; [p,cap]=max_cap_path(1,14,g) // max_flow ta=[1 1 2 2 3 3 4 4 5 5 5 5 6 6 6 7 7 15 15 15 15 15 15]; ta=[ta, 15 8 9 10 11 12 13 14]; he=[10 13 9 14 8 11 9 11 8 10 12 13 8 9 12 8 11 1 2 3 4]; he=[he, 5 6 7 16 16 16 16 16 16 16]; n=16; g=make_graph('foo',1,n,ta,he); ma=edge_number(g); g('edge_max_cap')=ones(1,ma); g('edge_min_cap')=zeros(1,ma); source=15; sink=16; nodetype=0*ones(1,n); nodetype(source)=2; nodetype(sink)=1; g('node_type')=nodetype; nodecolor=0*ones(1,n); nodecolor(source)=11; nodecolor(sink)=11; g('node_color')=nodecolor; [v,phi,ierr]=max_flow(source,sink,g) // max_clique ta=[1 2 3 4 5 6 6 7 8 9 10 16 16 10 11 11 12 12 11 14 15 15 13 7 13 13]; he=[2 3 4 5 6 7 8 8 9 10 16 2 3 11 12 13 1 14 14 15 5 9 12 4 14 15]; g=make_graph('foo',0,16,ta,he); [ns,no] = max_clique(g) g1=graph_complement(g); [ns,no] = max_clique(g1) // mesh2d theta=0.025*[1:40]*2.*%pi; x=1+cos(theta); y=1.+sin(theta+0.5); theta=0.05*[1:20]*2.*%pi; x1=1.3+0.4*cos(theta); y1=1.+0.4*sin(theta+.2); theta=0.1*[1:10]*2.*%pi; x2=0.5+0.2*cos(theta); y2=1.+0.2*sin(theta-0.1); x=[x x1 x2]; y=[y y1 y2]; [nu,ierr]=mesh2d(x,y) fr1=[[1:40] 1];fr2=[[41:60] 41];fr2=fr2($:-1:1); fr3=[[61:70] 61];fr3=fr3($:-1:1); front=[fr1 fr2 fr3]; xx=0.1*[1:20]; yy=xx.*.ones(1,20); zz= ones(1,20).*.xx; x3=yy;y3=zz; wai=((x3-1).*(x3-1)+(y3-1).*(y3-1)); ii=find(wai >= .94); x3(ii)=[];y3(ii)=[]; wai=((x3-0.5).*(x3-0.5)+(y3-1).*(y3-1)); ii=find(wai <= 0.055); x3(ii)=[];y3(ii)=[]; wai=((x3-1.3).*(x3-1.3)+(y3-1).*(y3-1)); ii=find(wai <= 0.21); x3(ii)=[];y3(ii)=[]; xnew=[x x3];ynew=[y y3]; [nu,ierr]=mesh2d(xnew,ynew,front) // min_lcost_cflow ta=[1 1 2 2 2 3 4 4 5 6 6 6 7 7 7 8 9 10 12 12 13 13 13 14 15 14 9 11 10]; he=[2 6 3 4 5 1 3 5 1 7 10 11 5 8 9 5 8 11 10 11 9 11 15 13 14 4 6 9 1]; g=make_graph('foo',1,15,ta,he); g1=g;ma=arc_number(g1); g1('edge_min_cap')=0*ones(1,ma); g1('edge_max_cap')=[15 8 16 6 9 7 19 4 14 7 17 10 12 6 9 10 9 14 6 17 14 8 8 15 17 18 16 8 16]; g1('edge_cost')=[10.7 3.6 8.4 9.3 7.6 10.7 4.9 6.8 2.3 6.0 5.5 3.0 5.0 1.9 2.6 6.1 7.4 2.3 9.2 10.8 3.2 4.4 8.9 2.8 3.9 8.2 4.0 9.8 2.1]; cv=5; [c,phi,v,flag]=min_lcost_cflow(15,1,cv,g1) // min_lcost_flow1 ta=[1 1 2 2 2 3 4 4 5 6 6 6 7 7 7 8 9 10 12 12 13 13 13 14 15 14 9 11 10 1 8]; he=[2 6 3 4 5 1 3 5 1 7 10 11 5 8 9 5 8 11 10 11 9 11 15 13 14 4 6 9 1 12 14]; g=make_graph('foo',1,15,ta,he); g1=g;ma=arc_number(g1); g1('edge_min_cap')=[17 11 10 5 2 5 16 3 20 15 11 4 6 5 5 3 2 8 0 4 14 1 11 14 13 17 3 3 20 2 17]; g1('edge_max_cap')=[37 36 37 25 26 42 35 23 56 52 43 40 42 26 42 33 24 27 34 23 45 29 49 48 45 42 25 24 56 34 45]; g1('edge_cost')=[8 7 3 2 6 10 6 3 5 10 7 11 2 8 1 2 2 4 8 4 4 4 6 8 9 7 5 11 8 2 8]; [c,phi,flag]=min_lcost_flow1(g1) // min_lcost_flow2 ta=[1 1 2 2 2 3 4 4 5 6 6 6 7 7 7 8 9 10 12 12 13 13 13 14 15 14 9 11 10 1 8]; he=[2 6 3 4 5 1 3 5 1 7 10 11 5 8 9 5 8 11 10 11 9 11 15 13 14 4 6 9 1 12 14]; g=make_graph('foo',1,15,ta,he); g1=g;ma=arc_number(g1); g1('edge_min_cap')=0.*ones(1,ma); n=g1('node_number'); g1('edge_max_cap')=[32 19 15 33 32 27 32 32 27 27 34 21 18 33 24 32 15 18 19 30 34 24 25 22 17 29 15 27 15 27 29]; g1('edge_cost')=[2 11 5 2 5 7 8 8 4 5 2 4 2 7 10 2 10 8 8 4 4 6 5 5 7 8 7 6 7 6 5]; dd=[14 -20 -4 8 -3 16 5 -23 0 7 -5 16 4 -24 9]; g1('node_demand')=dd; [c,phi,flag]=min_lcost_flow2(g1) // min_qcost_flow ta=[1 1 2 2 2 3 4 4 5 6 6 6 7 7 7 8 9 10 12 12 13 13 13 14 15 14 9 11 10 1 8]; he=[2 6 3 4 5 1 3 5 1 7 10 11 5 8 9 5 8 11 10 11 9 11 15 13 14 4 6 9 1 12 14]; g=make_graph('foo',1,15,ta,he); g1=g;ma=arc_number(g1); g1('edge_min_cap')=[3 4 3 0 2 4 1 4 2 0 1 1 4 4 4 1 3 4 1 3 0 3 0 3 1 1 0 2 0 3 5]; g1('edge_max_cap')=[19 9 15 6 16 16 20 22 12 16 13 16 23 16 14 7 15 21 4 15 8 24 2 10 4 4 20 14 11 18 9]; g1('edge_q_orig')=0*ones(1,ma); g1('edge_q_weight')=ones(1,ma); [c,phi,flag]=min_qcost_flow(0.2,g1) // min_weight_tree ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); t=min_weight_tree(1,g) // neighbors ta=[1 6 2 4 7 5 6 8 4 3 5 1]; he=[2 1 3 6 4 8 8 7 2 7 3 5]; g=make_graph('foo',1,8,ta,he); a=neighbors(6,g) // node_number ta=[1 1 2 4 4 5 6 7 2 3 5 1]; he=[2 6 3 6 7 8 8 8 4 7 3 5]; g=make_graph('foo',1,8,ta,he); node_number(g) // nodes_2_path ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); ns=[1 10 15 16 17 14 11 12 13 9 7 8 6]; p=nodes_2_path(ns,g) // nodes_degrees ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); [outdegree,indegree]=nodes_degrees(g) // path_2_nodes ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); p=[2 16 23 25 26 22 17 18 19 13 10 11]; ns=path_2_nodes(p,g) // perfect_match ta=[27 27 3 12 11 12 27 26 26 25 25 24 23 23 21 22 21 20 19 18 18]; ta=[ta 16 15 15 14 12 9 10 6 9 17 8 17 10 20 11 23 23 12 18 28]; he=[ 1 2 2 4 5 11 13 1 25 22 24 22 22 19 13 13 14 16 16 9 16]; he=[he 10 10 11 12 2 6 5 5 7 8 7 9 6 11 4 18 13 3 28 17]; n=28; g=make_graph('foo',0,n,ta,he); arcost=[21 76 0 33 67 63 85 69 88 7 56 66 73 20 54 23 23 22 88 65 31 93.. 21 31 36 29 57 48 33 59 50 44 27 63 41 92 4 48 26 41 28 13 78 21 11 69 15.. 70 84 41 41 88 11 20 56 59 69 89 50 35 39 92 95 34 38 73 26 50 26 53 54 12.. 23 63 76 5 67 20 39 83 59 48 10 11 88]; [cst,nmatch] = perfect_match(g,arcost) // predecessors ta=[1 6 2 4 7 5 6 8 4 3 5 1]; he=[2 1 3 6 4 8 8 7 2 7 3 5]; g=make_graph('foo',1,8,ta,he); a=predecessors(8,g) // qassign n=15; d=[.. 21.1 23.2 50.2 68.6 38.7 4.9 64.9 12.5 2.6 45.0 42.6 1.2 69.1 84.7 12.0;.. 75.6 23.1 43.7 15.3 92.2 67.2 99.2 72.8 51.7 72.3 24.6 18.7 76.6 78.8 82.9;.. 0.0 21.6 26.9 69.7 94.9 20.2 5.0 26.8 39.2 89.8 92.3 49.2 35.7 12.6 31.6;.. 33.0 88.3 63.3 84.2 34.4 39.1 74.9 54.7 24.1 24.3 10.0 74.9 76.9 78.8 53.1;.. 66.5 65.3 40.5 40.6 37.6 83.0 41.0 98.9 50.6 43.4 46.8 94.1 54.8 34.5 57.2;.. 62.8 30.8 91.8 40.9 73.4 58.8 60.8 74.0 42.4 96.8 39.5 21.2 9.6 26.6 4.8;.. 85.0 93.3 4.4 87.8 26.2 48.3 85.4 0.4 28.9 50.7 3.7 58.0 95.6 97.1 82.5;.. 68.6 21.5 48.2 11.4 49.9 22.3 6.4 59.0 8.9 52.3 51.8 26.3 22.1 88.8 58.0;.. 87.8 31.3 26.4 20.0 26.4 84.0 82.8 31.0 62.1 56.0 83.3 43.6 1.4 20.7 27.9;.. 6.8 36.2 41.5 56.2 52.5 12.1 92.6 25.5 34.5 56.2 61.0 91.1 81.9 85.3 95.5;.. 56.1 29.2 28.1 59.0 53.8 28.6 56.7 62.5 70.6 46.8 18.7 80.8 13.0 67.4 90.7;.. 66.2 56.6 12.8 68.5 12.0 86.1 57.1 11.6 52.1 77.9 1.9 81.0 96.8 91.5 33.6;.. 72.6 48.3 77.8 89.1 22.6 84.9 81.6 61.2 28.7 79.0 84.3 25.9 65.6 2.8 11.8;.. 19.9 33.2 21.2 50.4 62.7 52.6 5.7 67.8 65.0 98.1 7.5 41.4 24.5 23.7 92.5;.. 54.4 59.4 11.2 34.9 76.1 99.3 56.0 33.2 8.8 81.9 85.3 36.0 52.8 70.2 72.6;.. ]; d=d-diag(diag(d)); c=zeros(n,n);f=c; f(2:n,1)=[1:n-1]'; [crit,order]=qassign(c,f,d) // salesman ta=[2 1 3 2 2 4 4 5 6 7 8 8 9 10 10 10 10 11 12 13 13 14 15 16 16 17 17]; he=[1 10 2 5 7 3 2 4 5 8 6 9 7 7 11 13 15 12 13 9 14 11 16 1 17 14 15]; g=make_graph('foo',0,17,ta,he); g1=make_graph('foo1',1,17,[ta he],[he ta]); m=arc_number(g1); v=[18 23 24 17 12 22 14 19 30 5 16 6 17 13 1 17 21 28 4 9 0 17 12 21 29.. 26 10 26 3 16 16 28 29 19 29 23 16 22 1 12 3 8 11 5 28 23 17 11 26 25.. 20 2 8 22 11 23]; g1('edge_length')=5+v; cir = salesman(g1) // save_graph g=load_graph(SCI+'/demos/metanet/mesh100'); unix('rm -f mymesh100.graph'); save_graph(g,'mymesh100.graph'); g=load_graph('mymesh100') unix('rm -f mymesh100.graph'); // shortest_path ta=[1 1 2 2 2 3 4 4 5 6 6 6 7 7 7 8 9 10 12 12 13 13 13 14 15 14 9 11 10]; he=[2 6 3 4 5 1 3 5 1 7 10 11 5 8 9 5 8 11 10 11 9 11 15 13 14 4 6 9 1]; g=make_graph('foo',1,15,ta,he); g1=g;ma=prod(size(g1('head'))); g1('edge_length')=[13 17 10 6 7 18 18 6 7 14 5 9 5 10 10 2 4 12 15 0 13 4 7 16 11 9 4 16 2]; [p,lp]=shortest_path(13,1,g1,'length') // split_edge ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 13 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); g('node_x')=[283 163 63 57 164 164 273 271 339 384 504 513 439 623 631 757 642]; g('node_y')=[59 133 223 318 227 319 221 324 432 141 209 319 428 443 187 151 301]; gt=split_edge(1,2,g) // strong_con_nodes ta=[1 1 2 2 2 3 4 4 5 6 6 6 7 7 7 8 9 10 12 12 13 13 13 14 15]; he=[2 6 3 4 5 1 3 5 1 7 10 11 5 8 9 5 8 11 10 11 9 11 15 13 14]; g=make_graph('foo',1,15,ta,he); ncomp=strong_con_nodes(3,g) // strong_connex ta=[1 1 2 2 2 3 4 4 5 6 6 6 7 7 7 8 9 10 12 12 13 13 13 14 15]; he=[2 6 3 4 5 1 3 5 1 7 10 11 5 8 9 5 8 11 10 11 9 11 15 13 14]; g=make_graph('foo',1,15,ta,he); [nc,ncomp]=strong_connex(g) // subgraph ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 13 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); v=[2 3 4 5 17 13 10]; g1=subgraph(v,'nodes',g) v=[10 13 12 16 20 19]; g1=subgraph(v,'edges',g) // successors ta=[1 6 2 4 7 5 6 8 4 3 5 1]; he=[2 1 3 6 4 8 8 7 2 7 3 5]; g=make_graph('foo',1,8,ta,he); a=successors(6,g) // supernode ta=[1 1 2 2 2 3 4 5 5 7 8 8 9 10 10 10 10 10 11 12 13 13 13 14 15 16 16 17 17]; he=[2 10 3 5 7 4 2 4 6 8 6 9 7 7 11 13 13 15 12 13 9 10 14 11 16 1 17 14 15]; g=make_graph('foo',1,17,ta,he); v=[7 10 13 9]; g1=supernode(v,g) // trans_closure ta=[2 3 3 5 3 4 4 5 8]; he=[1 2 4 2 6 6 7 7 4]; g=make_graph('foo',1,8,ta,he); g1=trans_closure(g)
89d43b76db8e772d09f2f0da61735a160cc9ebbc
449d555969bfd7befe906877abab098c6e63a0e8
/1646/CH17/EX17.17/Ch017Ex17.sce
e9b074538aef966bbd9fc4bc83df2c6064a9269a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
661
sce
Ch017Ex17.sce
// Scilab code Ex17.17 : Pg:898 (2011) clc;clear; I = 15.7; // Ionization potential of argon in GM counter, volt a = 0.012/2*1e-02; // Radius of GM counter wire, m b = 5/2*1e-02; // Radius of cathode, m lambda = 7.8e-006; // Mean free path of argon in GM counter, m // As E*lambda = I = V*lambda/(2.3026*a*log10(b/a)), solving for V V = 2.3026*a*I*log10(b/a)/lambda; // Voltage that must be applied to produce an avalanche in GM tube, volt printf("\nThe voltage that must be applied to produce an avalanche in GM tube = %6.2f volt", V); // Result // The voltage that must be applied to produce an avalanche in GM tube = 728.52 volt
3f2e183e72d95afaf71a83052c9a46d647270562
449d555969bfd7befe906877abab098c6e63a0e8
/1019/CH4/EX4.9/Example_4_9.sce
cedce2d3fe36cb62499501d00737f655b629c9a5
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
489
sce
Example_4_9.sce
//Example 4.9 clear; clc; //Given R=8.314;// gas constant in J K^-1 mol^-1 Cp=20.9; //specific heat capacity at constant pressure of the gas in J K^-1 mol^-1 n=1;//moles of gas delSm=146;//molar entropy of the gas at 298 K in J K^-1 mol^-1 T1=298; //initial temperature in K T2=500;//final temperature in K //to calculate the molar entropy at 500 K delS=delSm+(Cp*log(T2/T1));//molar entropy in J K^-1 mol^-1 mprintf('Molar Entropy at 500K = %f J K^-1 mol^-1',delS); //end
af5b5ae32bb1042b0006a70b1bf89d71db0e0cc9
449d555969bfd7befe906877abab098c6e63a0e8
/3487/CH3/EX3.2/Ex3_2.sce
9c6ad9244021fa9bc79fabb90cbd01a90e2f49a8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
826
sce
Ex3_2.sce
//Chapter 3,Example 3.2 Page 106 clc clear t1 = 1.2*10^-6 C1 = (0.3/12)*10^3 C2 = 0.4 R1 = (C1+C2)*t1/(3*(C1*C2*10^-9)) t2 = 50*10^-6 R1R2 = t2/(0.7*(C1+C2)*10^-9)// (R1+R2) R2 = R1R2-R1 printf (" R1 = %f ohm \n ",R1) printf (" R2 = %f ohm \n ",R2) // Alternative method ab = 0.7*10^-6/(t2-t1) // alpha-beta ghama = C1/C2 // large value therefore R2 = 10^3/(C1*ab) // mentioned wrong in the text // alpha = beta and based on the eq: t1 = (2/(2*alpha))log((2*alpha)/(alpha-beta)) alpha = 2.43 beeta = 2.415656 R1 = (10^3/C1)*((1/(alpha+beeta))+(62.5/(alpha+beeta))) V0 = 125*12 Vmax = V0/(2*R1*C2*10^-3*beeta) printf (" ghama = %f (large value)\n ",ghama) printf (" R2 = %f ohm \n Since alpha aprox. equla to beta ",R2) printf (" \n R1 = %f ohm \n ",R1) printf (" Vmax = %f kV \n ",Vmax) //Answers vary due to round of error
637e0226ccbca1c901240e8701fac9727e532039
f42e0a9f61003756d40b8c09ebfe5dd926081407
/TP5/vdp.sci
07ac3ae3eb050c4492b55bbf448c14e3e2ba93e6
[]
no_license
BenFradet/MT09
04fe085afaef9f8c8d419a3824c633adae0c007a
d37451249f2df09932777e2fd64d43462e3d6931
refs/heads/master
2020-04-14T02:47:55.441807
2014-12-22T17:34:50
2014-12-22T17:34:50
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
99
sci
vdp.sci
function[y] = vdp(t, x) c = 0.4; y = [x(2); c * (1 - x(1) ^ 2) * x(2) - x(1)]; endfunction
cd58d7c31af3a6ed8b2e237d095deb7a517d08e6
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.5/tests/examples/sincd.man.tst
139f41961174d2ca2d3e146a2398693a34632de7
[ "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
35
tst
sincd.man.tst
clear;lines(0); plot(sincd(10,1))
7f667bc6ae4c95846c022e68b64e7c131483c5ba
449d555969bfd7befe906877abab098c6e63a0e8
/2414/CH13/EX13.9/Ex13_9.sce
5e8eb4a5c9cee0fa00e57716ffcecc6b3ef365a3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
556
sce
Ex13_9.sce
clc; close(); clear(); //page no 456 //prob no. 13.9 //Data form ex13.8 Pe=10^-5; R=2*10^6; //bits/s (changed) k=1.38*10^-23; //Boltzmann cons Ti=475; //K Te=250; //K Tsys=Ti+Te; nsys=k*Tsys; //W/Hz function Eb=E(rhodb) //function for Eb rho=10^(rhodb/10); Eb=nsys*rho; endfunction function Pr=P(E) //function for Pr Pr=R*Eb; endfunction rhodb=9.6; Eb=E(rhodb); Pr=P(E); mprintf('\nBit energy , Eb=%.2f*10^-21 J \n',Eb*10^21); mprintf(' Required reciver carrier power , Pr=%.2f fW \n',Pr*10^15);
9e821884022dc04c3d1f4395df06df8d2bd5a547
36c5f94ce0d09d8d1cc8d0f9d79ecccaa78036bd
/180 Flick Training.sce
a1ed38db4a95d86a069e000c3be81d3fb142ab51
[]
no_license
Ahmad6543/Scenarios
cef76bf19d46e86249a6099c01928e4e33db5f20
6a4563d241e61a62020f76796762df5ae8817cc8
refs/heads/master
2023-03-18T23:30:49.653812
2020-09-23T06:26:05
2020-09-23T06:26:05
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
12,927
sce
180 Flick Training.sce
Name=180 Flick Training PlayerCharacters=Dasher BotCharacters=actualbot.bot IsChallenge=true Timelimit=45.0 PlayerProfile=Dasher AddedBots=actualbot.bot;actualbot.bot PlayerMaxLives=0 BotMaxLives=0;0 PlayerTeam=0 BotTeams=2;1 MapName=cps.map MapScale=2.0 BlockProjectilePredictors=true BlockCheats=true InvinciblePlayer=false InvincibleBots=false Timescale=1.0 BlockHealthbars=true TimeRefilledByKill=0.0 ScoreToWin=0.0 ScorePerDamage=1.0 ScorePerKill=0.0 ScorePerMidairDirect=0.0 ScorePerAnyDirect=0.0 ScorePerTime=0.0 ScoreLossPerDamageTaken=0.0 ScoreLossPerDeath=0.0 ScoreLossPerMidairDirected=0.0 ScoreLossPerAnyDirected=0.0 ScoreMultAccuracy=false ScoreMultDamageEfficiency=false ScoreMultKillEfficiency=false GameTag=180s, Aim, Flicks WeaponHeroTag=/ DifficultyTag=2 AuthorsTag=unnamed BlockHitMarkers=false BlockHitSounds=false BlockMissSounds=false BlockFCT=false Description=Dashing into Bots while you have to flick 180 degrees GameVersion=1.0.7.2 ScorePerDistance=0.0 [Aim Profile] Name=Default MinReactionTime=0.3 MaxReactionTime=0.4 MinSelfMovementCorrectionTime=0.001 MaxSelfMovementCorrectionTime=0.05 FlickFOV=30.0 FlickSpeed=1.5 FlickError=15.0 TrackSpeed=3.5 TrackError=3.5 MaxTurnAngleFromPadCenter=75.0 MinRecenterTime=0.3 MaxRecenterTime=0.5 OptimalAimFOV=30.0 OuterAimPenalty=1.0 MaxError=40.0 ShootFOV=15.0 VerticalAimOffset=0.0 MaxTolerableSpread=5.0 MinTolerableSpread=1.0 TolerableSpreadDist=2000.0 MaxSpreadDistFactor=2.0 [Bot Profile] Name=actualbot DodgeProfileNames=dofpuckingnothing DodgeProfileWeights=1.0 DodgeProfileMaxChangeTime=5.0 DodgeProfileMinChangeTime=1.0 WeaponProfileWeights=1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0 AimingProfileNames=Default;Default;Default;Default;Default;Default;Default;Default WeaponSwitchTime=3.0 UseWeapons=true CharacterProfile=Dash Target SeeThroughWalls=false NoDodging=false NoAiming=false [Character Profile] Name=Dasher MaxHealth=100.0 WeaponProfileNames=;;;;;;; MinRespawnDelay=1.0 MaxRespawnDelay=5.0 StepUpHeight=75.0 CrouchHeightModifier=0.5 CrouchAnimationSpeed=1.0 CameraOffset=X=0.000 Y=0.000 Z=0.000 HeadshotOnly=true DamageKnockbackFactor=8.0 MovementType=Base MaxSpeed=0.0 MaxCrouchSpeed=500.0 Acceleration=16000.0 AirAcceleration=16000.0 Friction=8.0 BrakingFrictionFactor=2.0 JumpVelocity=800.0 Gravity=100.0 AirControl=0.25 CanCrouch=true CanPogoJump=false CanCrouchInAir=false CanJumpFromCrouch=false EnemyBodyColor=X=255.000 Y=0.000 Z=0.000 EnemyHeadColor=X=255.000 Y=255.000 Z=255.000 TeamBodyColor=X=0.000 Y=0.000 Z=255.000 TeamHeadColor=X=255.000 Y=255.000 Z=255.000 BlockSelfDamage=false InvinciblePlayer=false InvincibleBots=false BlockTeamDamage=false AirJumpCount=0 AirJumpVelocity=800.0 MainBBType=Cylindrical MainBBHeight=275.0 MainBBRadius=1.0 MainBBHasHead=true MainBBHeadRadius=0.1 MainBBHeadOffset=0.0 MainBBHide=false ProjBBType=Cylindrical ProjBBHeight=230.0 ProjBBRadius=55.0 ProjBBHasHead=true ProjBBHeadRadius=45.0 ProjBBHeadOffset=0.0 ProjBBHide=true HasJetpack=false JetpackActivationDelay=0.2 JetpackFullFuelTime=4.0 JetpackFuelIncPerSec=1.0 JetpackFuelRegensInAir=false JetpackThrust=6000.0 JetpackMaxZVelocity=400.0 JetpackAirControlWithThrust=0.25 AbilityProfileNames=Dash.abilmov;;; HideWeapon=false AerialFriction=0.0 StrafeSpeedMult=1.0 BackSpeedMult=1.0 RespawnInvulnTime=0.0 BlockedSpawnRadius=0.0 BlockSpawnFOV=0.0 BlockSpawnDistance=0.0 RespawnAnimationDuration=0.5 AllowBufferedJumps=true BounceOffWalls=false LeanAngle=0.0 LeanDisplacement=0.0 AirJumpExtraControl=0.0 ForwardSpeedBias=1.0 HealthRegainedonkill=0.0 HealthRegenPerSec=0.0 HealthRegenDelay=0.0 JumpSpeedPenaltyDuration=0.0 JumpSpeedPenaltyPercent=0.25 ThirdPersonCamera=false TPSArmLength=300.0 TPSOffset=X=0.000 Y=150.000 Z=150.000 BrakingDeceleration=2048.0 VerticalSpawnOffset=5.0 [Character Profile] Name=Dash Target MaxHealth=1.0 WeaponProfileNames=;;;;;;; MinRespawnDelay=0.1 MaxRespawnDelay=0.1 StepUpHeight=0.0 CrouchHeightModifier=0.5 CrouchAnimationSpeed=1.0 CameraOffset=X=0.000 Y=0.000 Z=0.000 HeadshotOnly=false DamageKnockbackFactor=8.0 MovementType=Base MaxSpeed=0.0 MaxCrouchSpeed=500.0 Acceleration=0.0 AirAcceleration=16000.0 Friction=0.0 BrakingFrictionFactor=0.0 JumpVelocity=0.0 Gravity=0.0 AirControl=0.25 CanCrouch=false CanPogoJump=false CanCrouchInAir=false CanJumpFromCrouch=false EnemyBodyColor=X=255.000 Y=0.000 Z=0.000 EnemyHeadColor=X=255.000 Y=255.000 Z=255.000 TeamBodyColor=X=0.000 Y=0.000 Z=255.000 TeamHeadColor=X=255.000 Y=255.000 Z=255.000 BlockSelfDamage=false InvinciblePlayer=false InvincibleBots=false BlockTeamDamage=false AirJumpCount=0 AirJumpVelocity=800.0 MainBBType=Cuboid MainBBHeight=25.0 MainBBRadius=12.5 MainBBHasHead=false MainBBHeadRadius=0.1 MainBBHeadOffset=0.0 MainBBHide=false ProjBBType=Spheroid ProjBBHeight=2.0 ProjBBRadius=0.1 ProjBBHasHead=false ProjBBHeadRadius=0.1 ProjBBHeadOffset=0.0 ProjBBHide=true HasJetpack=false JetpackActivationDelay=0.2 JetpackFullFuelTime=4.0 JetpackFuelIncPerSec=1.0 JetpackFuelRegensInAir=false JetpackThrust=6000.0 JetpackMaxZVelocity=400.0 JetpackAirControlWithThrust=0.25 AbilityProfileNames=;;; HideWeapon=true AerialFriction=0.0 StrafeSpeedMult=1.0 BackSpeedMult=1.0 RespawnInvulnTime=0.0 BlockedSpawnRadius=0.0 BlockSpawnFOV=360.0 BlockSpawnDistance=0.0 RespawnAnimationDuration=0.5 AllowBufferedJumps=true BounceOffWalls=false LeanAngle=0.0 LeanDisplacement=0.0 AirJumpExtraControl=0.0 ForwardSpeedBias=1.0 HealthRegainedonkill=0.0 HealthRegenPerSec=0.0 HealthRegenDelay=0.0 JumpSpeedPenaltyDuration=0.0 JumpSpeedPenaltyPercent=0.25 ThirdPersonCamera=false TPSArmLength=300.0 TPSOffset=X=0.000 Y=150.000 Z=150.000 BrakingDeceleration=2048.0 VerticalSpawnOffset=80.0 [Dodge Profile] Name=dofpuckingnothing MaxTargetDistance=100000.0 MinTargetDistance=0.0 ToggleLeftRight=false ToggleForwardBack=false MinLRTimeChange=0.2 MaxLRTimeChange=0.5 MinFBTimeChange=0.2 MaxFBTimeChange=0.5 DamageReactionChangesDirection=true DamageReactionChanceToIgnore=0.5 DamageReactionMinimumDelay=0.125 DamageReactionMaximumDelay=0.25 DamageReactionCooldown=1.0 DamageReactionThreshold=0.0 DamageReactionResetTimer=0.1 JumpFrequency=0.0 CrouchInAirFrequency=0.0 CrouchOnGroundFrequency=0.0 TargetStrafeOverride=Ignore TargetStrafeMinDelay=0.125 TargetStrafeMaxDelay=0.25 MinProfileChangeTime=0.0 MaxProfileChangeTime=0.0 MinCrouchTime=0.3 MaxCrouchTime=0.6 MinJumpTime=0.3 MaxJumpTime=0.6 LeftStrafeTimeMult=1.0 RightStrafeTimeMult=1.0 StrafeSwapMinPause=0.0 StrafeSwapMaxPause=0.25 BlockedMovementPercent=0.5 BlockedMovementReactionMin=0.125 BlockedMovementReactionMax=0.2 [Movement Ability Profile] Name=Dash MaxCharges=1.0 ChargeTimer=1.0 ChargesRefundedOnKill=1.0 DelayAfterUse=0.1 FullyAuto=false AbilityDuration=0.2 LockDirectionForDuration=true NegateGravityForDuration=true MainVelocity=5000.0 MainVelocityCanGoVertical=false MainVelocitySetToMovementKeys=false UpVelocity=0.0 EndVelocityFactor=1.0 Hurtbox=true HurtboxRadius=90.0 HurtboxDamage=50.0 HurtboxGroundKnockbackFactor=1.0 HurtboxAirKnockbackFactor=1.0 AbilityBlocksTurning=false AbilityBlocksMovement=false AbilityBlocksAttack=true AttackCancelsAbility=false AbilityReloadsWeapon=false HealthRestore=0.0 AIUseInCombat=true AIUseOutOfCombat=false AIUseOnGround=true AIUseInAir=true AIReuseTimer=0.2 AIMinSelfHealth=0.0 AIMaxSelfHealth=100.0 AIMinTargHealth=0.0 AIMaxTargHealth=25.0 AIMinTargDist=0.0 AIMaxTargDist=1750.0 AIMaxTargFOV=15.0 AIDamageReaction=true AIDamageReactionIgnoreChance=0.75 AIDamageReactionMinDelay=0.125 AIDamageReactionMaxDelay=0.25 AIDamageReactionCooldown=1.0 AIDamageReactionThreshold=75.0 AIDamageReactionResetTimer=1.0 [Map Data] reflex map version 8 global entity type WorldSpawn String32 targetGameOverCamera end UInt8 playersMin 1 UInt8 playersMax 16 brush vertices -256.000000 0.000000 256.000000 0.000000 0.000000 256.000000 0.000000 0.000000 -256.000000 -256.000000 0.000000 -256.000000 -256.000000 -16.000000 256.000000 0.000000 -16.000000 256.000000 0.000000 -16.000000 -256.000000 -256.000000 -16.000000 -256.000000 faces 0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 structural/dev/dev_grey128 brush vertices 0.000000 208.000000 272.000000 16.000000 208.000000 272.000000 16.000000 208.000000 -272.000000 0.000000 208.000000 -272.000000 0.000000 -16.000000 272.000000 16.000000 -16.000000 272.000000 16.000000 -16.000000 -272.000000 0.000000 -16.000000 -272.000000 faces 0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 brush vertices -256.000000 208.000000 -256.000000 0.000000 208.000000 -256.000000 0.000000 208.000000 -272.000000 -256.000000 208.000000 -272.000000 -256.000000 -16.000000 -256.000000 0.000000 -16.000000 -256.000000 0.000000 -16.000000 -272.000000 -256.000000 -16.000000 -272.000000 faces 0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 brush vertices -256.000000 208.000000 256.000000 0.000000 208.000000 256.000000 0.000000 208.000000 -256.000000 -256.000000 208.000000 -256.000000 -256.000000 192.000000 256.000000 0.000000 192.000000 256.000000 0.000000 192.000000 -256.000000 -256.000000 192.000000 -256.000000 faces 0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 structural/dev/dev_grey128 0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 structural/dev/dev_grey128 brush vertices -272.000000 208.000000 272.000000 -256.000000 208.000000 272.000000 -256.000000 208.000000 -272.000000 -272.000000 208.000000 -272.000000 -272.000000 -16.000000 272.000000 -256.000000 -16.000000 272.000000 -256.000000 -16.000000 -272.000000 -272.000000 -16.000000 -272.000000 faces 0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 brush vertices -256.000000 208.000000 272.000000 0.000000 208.000000 272.000000 0.000000 208.000000 256.000000 -256.000000 208.000000 256.000000 -256.000000 -16.000000 272.000000 0.000000 -16.000000 272.000000 0.000000 -16.000000 256.000000 -256.000000 -16.000000 256.000000 faces 0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 0x00000000 0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 0x00000000 entity type PlayerSpawn Vector3 position -128.000000 64.000000 -144.000000 Bool8 teamB 0 entity type CameraPath UInt8 posLerp 2 UInt8 angleLerp 2 entity type Effect Vector3 position 0.000000 256.000000 0.000000 String64 effectName internal/misc/reflectionprobe entity type Target Vector3 position 320.000000 256.000000 320.000000 Vector3 angles -135.000000 30.000000 0.000000 String32 name end entity type PlayerSpawn Vector3 position -128.000000 64.000000 144.000000 Vector3 angles 180.000000 0.000000 0.000000 Bool8 teamA 0
adeb846ef883af7221ad96c4298aaebcefb33e04
449d555969bfd7befe906877abab098c6e63a0e8
/821/CH7/EX7.19/7_19.sce
eab0189c67aec6fd1311235aed96972418c1879f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
591
sce
7_19.sce
c1=1;//concentration of HCl// PH1=-log10(c1); printf('PH for the 1M HCl solution=PH1=%f',PH1); c2=5.2*10^-4;//concentration of H+ in the solution// PH2=-log10(c2); printf('\nPH for the solution=PH2=%f',PH2); c3=0.025;//concentration of 0.025M HClO4// PH3=-log10(c3); printf('\nPH for the 0.025M HClO4 solution=PH3=%f',PH3); PH4=4.45; c4=10^(-PH4);//concentration of the solution// printf('\nConcentration of the solution=c4=%f=3.548*10^-5',c4); POH5=1.30; PH5=14-POH5; c5=10^(-PH5);//concentration of the solution// printf('\nConcentration of the solution=c5=1.995*10^-13');
71e750e701157d9afb9bef2c9df3b6c5404315eb
449d555969bfd7befe906877abab098c6e63a0e8
/764/CH10/EX10.21.a/data10_21.sci
a8c811a99312fd38bdcfc66803dc9e88e57ead0e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
365
sci
data10_21.sci
//(Springs) Example 10.21 //Grade of the patented and cold-drawn steel gr gr = 4 //Yield strength of the material is r% of the Sut r = 60 //Factor of safety fs fs = 2 //Mean coil diameter D (mm) D = 18 //Maximum bending moment on the spring Mb (N-mm) Mb = 250 //Modulus of elasticity of the spring E (N/mm2) E = 207000 //Stiffness of the spring k (N-mm/rad) k = 3
d60784efb11eb1279a87c51babe1bea4de6c34d9
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/corrmtx/corrmtx7.sce
588776a575b10d61ad509f29a618c3b92d38f2da
[]
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
498
sce
corrmtx7.sce
//i/p args are x and m and the method is specified x=[1 2 3 4 5 7 4 62]; m=3; X = corrmtx(x,m,'covariance'); disp(X); //output // 4. 3. 2. 1. // 5. 4. 3. 2. // 7. 5. 4. 3. // 4. 7. 5. 4. // 62. 4. 7. 5. //matlab // 1.7889 1.3416 0.8944 0.4472 // 2.2361 1.7889 1.3416 0.8944 // 3.1305 2.2361 1.7889 1.3416 // 1.7889 3.1305 2.2361 1.7889 // 27.7272 1.7889 3.1305 2.2361
c204916ff80da885d685ed0242519bc28f0cb6d7
449d555969bfd7befe906877abab098c6e63a0e8
/42/CH7/EX7.1/sadiku_7_1.sce
4d78bd6ba1f008e80cdb2862f371d47c07c67a0b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
122
sce
sadiku_7_1.sce
clear; clc; a1=acos(0),a2=acos(2/29^.5),p=5,I=10; H=I/(4*%pi*p)*(cos(a1)-cos(a2)); disp(H*1000,'H at (0,0,5) in mA ');
76630c35e36ff1058586a518dd78c5556e0d33cf
592b1b7dfaefd62d755737ac7b6e81f44f7786ba
/7c Program to solve differential equation using Runge-kutta 2nd order and 4th order methods..sce
0d8032e9b817ece3cd28bdf755fbcaa32557605f
[]
no_license
muitnet/Numerical-and-Statistical-Methods-sem2-fybscit-mumbai-university
841143b72d52229c68bcd0666ed10c844c02f507
2d1c638b881f3e418a982baa02632effd03ae5fe
refs/heads/master
2021-01-19T07:23:05.463429
2017-04-07T11:54:24
2017-04-07T11:54:24
87,540,712
6
5
null
null
null
null
UTF-8
Scilab
false
false
453
sce
7c Program to solve differential equation using Runge-kutta 2nd order and 4th order methods..sce
function [y]=f(a, b) y=b-a; endfunction x0=0; y0=2; h=0.1; for n=1:4 k1=h*f(x0,y0); k2=h*f(x0+h,y0+k1); y0=y0+(k1+k2)/2; x0=x0+h; printf('values of x0=%g\t and y0=%g\n',x0,y0); end function [y]=f(a, b) y=b-a; endfunction x0=0; y0=1; h=0.25; for n=1:4 k1=h*f(x0,y0); k2=h*f(x0+h/2,y0+k1/2); k3=h*f(x0+h/2,y0+k2/2); k4=h*f(x0+h,y0+k3); y0=y0+(k1+2*k2+2*k3+k4)/6; x0=x0+h; printf('values of x0=%g\t and y0=%g\n',x0,y0); end
9f0ab512b8a473775fbd29332a2e3ce893c52bac
1db0a7f58e484c067efa384b541cecee64d190ab
/macros/firtype.sci
4fa1122d8d4f35aa06d4cb448c2a3a60807753e2
[]
no_license
sonusharma55/Signal-Toolbox
3eff678d177633ee8aadca7fb9782b8bd7c2f1ce
89bfeffefc89137fe3c266d3a3e746a749bbc1e9
refs/heads/master
2020-03-22T21:37:22.593805
2018-07-12T12:35:54
2018-07-12T12:35:54
140,701,211
2
0
null
null
null
null
UTF-8
Scilab
false
false
798
sci
firtype.sci
//Author: Parthasarathi Panda //parthasarathipanda314@gmail.com function typ=firtype(b) if (type(b)~=1) then error('check input type'); end v=size(b); if length(v)>2 then error('check input dimension'); end if v(1)~=1 & v(2)~=1 then error('check input dimension'); elseif v(2)==1 b=b'; end m=length(b); sym=(b-b($:-1:1))*(b-b($:-1:1))';//zero if symmetrical antisym=(b+b($:-1:1))*(b+b($:-1:1))';//zero if antisymmetrical if (sym==0) then if (pmodulo(m,2)==1) then typ=1; else typ=2; end elseif (antisym==0) if (pmodulo(m,2)==1) then typ=3; else typ=4; end else typ=-1;//not linear phas end endfunction
d0d2fe11c66afb5e3804205634e0ca0206cafd06
3b00ed91e5a50801cd0385f6fc2aae0a95cf0378
/unit_4/Rayleigh_Power_Method.sce
5e708ffbd9203caa86d4c7a3de33b70ce780cdad
[]
no_license
RahulKata/Scilab_assignments_S4LA
2b3f392334558df8a4356efe304ae6918a3864db
b8ab3c967ca09c988d812d52cb3affa95e1ac6d1
refs/heads/master
2020-12-29T06:48:41.848357
2020-04-11T09:49:38
2020-04-11T09:49:38
238,498,777
0
0
null
null
null
null
UTF-8
Scilab
false
false
593
sce
Rayleigh_Power_Method.sce
clc funcprot(0) //if variables are redefined do nothing format('v',10) A = input("Enter the matrix A[3x3]: "); disp(A,'A = '); //initial vector u0 = input("Enter the intial vector u0[1x3]}: "); u0 =u0'; disp(u0,"Initial Vector u0 -> ") v = A*u0; a = max(u0); disp(A,'First approximation to eigen value is '); while abs(max(v)-a)>0.002 disp(v,'current eigen vector is'); a = max(v); disp(a,'Current eigen value is'); u0 = v/max(v); v = A*u0; end format('v',4); disp(max(v),'The largest eigen value is: '); format('v',5); disp(u0,'The corresponding eigen vector is: ');
0685beedbdead5db7f44a891eec6e60e72fedda6
42fdf741bf64ea2e63d1546bb08356286f994505
/test_20160808_vd_fgswc_stfreg_itg/input_pattern.sce
8d1f4d1c1f54f9f1f1be173992534fa7c7544e53
[]
no_license
skim819/RASP_Workspace_sihwan
7e3cd403dc3965b8306ec203007490e3ea911e3b
0799e146586595577c8efa05c647b8cb92b962f4
refs/heads/master
2020-12-24T05:22:25.775823
2017-04-01T22:15:18
2017-04-01T22:15:18
41,511,563
1
0
null
null
null
null
UTF-8
Scilab
false
false
834
sce
input_pattern.sce
// First values of Vin & Vd_Vref set the default value. //Vin = [1.4 1.6 1.2 1.6 1.2 1.6 1.2 1.6 1.2 1.6 1.2 1.6 1.2 1.6 1.2 1.6 1.2 ]; Vin = [1.4 1.7 1.1 1.7 1.1 1.7 1.1 1.7 1.1 1.7 1.1 1.7 1.1 1.7 1.1 1.7 1.1 ]; //Vin = [1.4 linspace(1.7,1.7,8) linspace(1.1,1.1,8)]; //Vin = [1.4 linspace(1.1,1.1,8) linspace(1.7,1.7,8)]; //Vin = [1.4 linspace(1.4,1.4,16)]; Vd_Vref = [linspace(1.7,1.7,17)]; entire_length = 17; sr_out_clk = [linspace(0,0,entire_length) ]; sr_out_D = [linspace(0,0,entire_length) ]; sr_itg_in_clk = [linspace(0,0,entire_length) ]; sr_itg_in_D = [linspace(0,0,entire_length) ]; itg_ini = [linspace(0,0,entire_length) ]; disp(size(Vin),size(itg_ini)); exec("/home/ubuntu/rasp30/prog_assembly/libs/scilab_code/image_convolution_sr.sce",-1);
f5963fe89a64c25b98d783fc7c7c686f3c803b38
449d555969bfd7befe906877abab098c6e63a0e8
/788/CH17/EX17.2.b/17_2_soln.sce
a0a2f78e954a0cbaa955f0a32de4e544aaa067a7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
553
sce
17_2_soln.sce
clc; pathname=get_absolute_file_path('17_2_soln.sce') filename=pathname+filesep()+'17_2_data.sci' exec(filename) // Solutions: // natural frequency of the oil, om_H=(A*10^-4)*sqrt((2*beta1*10^6)/(V*10^-6*M)); //rad/s // value of open-loop gain, open_loop=om_H/3; ///s // amplifier gain, G_A=open_loop/(G_SV*G_cyl*H); //mA/V // repeatable error, RE=SD/(G_A*H); //cm // rounding off the above answer, RE=fix(RE)+(fix(ceil((RE-fix(RE))*100000))/100000); //cm // Results: printf("\n Results: ") printf("\n The repeatable error of system is %.5f cm.",RE)
f5cd93ce5c23b4275de50ad82c7f45079657bf0c
449d555969bfd7befe906877abab098c6e63a0e8
/929/CH10/EX10.1/Example10_1.sce
0ac6d8a7e16d2219d857d1dac429cf8952cc6ac9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
948
sce
Example10_1.sce
//Example 10.1 clear; clc; f0min=1; f0max=10*10^3; VDon=0.7; Vsa=5; Vz5=Vsa-(2*VDon); Vsat=13; IRmin=10*10^(-6); R1=33*10^3; R2=R1; VT=2.5; Rmax=(Vsa-VT)/(IRmin); Rpot=Rmax; Rs=Rpot/39; f0=0.5; C1=1/(f0*2*(Rpot+Rs)*log(1+(2*(R1/R2)))); C2=C1/10; C3=C2/10; C4=C3/10; vN=-2.5; iRmax=(Vsa-vN)/Rs; IR2=Vsa/(R1+R2); IB=1*10^(-3); ILmax=1*10^(-3); IR3max=iRmax+IR2+IB+ILmax; R3=(Vsat-Vsa)/IR3max; R4=10*10^3; printf("Designed Square Wave Generator :"); printf("\nR1=%.f kohms",R1*10^(-3)); printf("\nR2=%.f kohms",R2*10^(-3)); printf("\nR3=%.2f kohms",R3*10^(-3)); printf("\nRs=%.2f kohms",Rs*10^(-3)); printf("\nRpot=%.2f kohms",Rpot*10^(-3)); printf("\nR4=%.2f kohms",R4*10^(-3)); printf("\nC1=%.1f uF",(C1*10^6)-0.25); printf("\nC2=%.2f uF",(C2*10^6)-0.02); printf("\nC3=%.f nF",(C3*10^9)-2.50); printf("\nC4=%.1f nF",(C4*10^9)-0.25);
f099aa532de1941b2d844fceee7212e7df57d0cc
0812f3bb6f3cc038b570df68ccee4275da04b11f
/models/complexity_1000/Applied_Thermodynamics_and_Engineering/CH4/EX4.14/4_14.sce
7fa1f39b3806f6f8930f23e3d8f4fe12a179498c
[]
no_license
apelttom/20-semester_PhD_thesis
edc0b55580bae9d364599932cd73cf32509f4b7a
ff28b115fcf5e121525e08021fa0c02b54a8e143
refs/heads/master
2018-12-26T22:03:38.510422
2018-12-14T20:04:11
2018-12-14T20:04:11
106,552,276
0
0
null
null
null
null
UTF-8
Scilab
false
false
345
sce
4_14.sce
clc; T2=90;//K T3=40;//K T1=15;//K y=(T3-T1)/(T2-T3); cp=1.005; h3=40; h1=15; h2=90; T0=288;//K T3=313;//K T1=288;//K T2=363;//K s3_s1=cp*log(T3/T1); inc=cp*(h3-h1)-T0*s3_s1; s2_s3=cp*log(T2/T3) loss=0.5*[cp*(h2-h3)-T0*(s2_s3)] e=inc/loss; disp("effectiveness is:"); disp("%",e*100);//ans diff due to differance in value of logarithmic values
f7f23c7361640553f17bacc82119547d3a6f2902
f542bc49c4d04b47d19c88e7c89d5db60922e34e
/PresentationFiles_Subjects/CONT/HG63QMJ/ATWM1_Working_Memory_MRI_HG63QMJ/ATWM1_Working_Memory_MRI_Salient_Cued_Run1.sce
551f10291bbd842b13c1dbcb72213484579931c6
[]
no_license
atwm1/Presentation
65c674180f731f050aad33beefffb9ba0caa6688
9732a004ca091b184b670c56c55f538ff6600c08
refs/heads/master
2020-04-15T14:04:41.900640
2020-02-14T16:10:11
2020-02-14T16:10:11
56,771,016
0
1
null
null
null
null
UTF-8
Scilab
false
false
12,442
sce
ATWM1_Working_Memory_MRI_Salient_Cued_Run1.sce
# ATWM1 MRI Experiment scenario = "ATWM1_Working_Memory_MRI_salient_cued_run1"; scenario_type = fMRI; # Fuer Scanner #scenario_type = fMRI_emulation; # Zum Testen #scenario_type = trials; scan_period = 2000; # TR pulses_per_scan = 1; pulse_code = 1; #pulse_width=6; default_monitor_sounds = false; active_buttons = 2; response_matching = simple_matching; button_codes = 10, 20; default_font_size = 28; default_font = "Arial"; default_background_color = 0 ,0 ,0 ; #write_codes=true; # for MEG only begin; #Picture definitions box { height = 300; width = 300; color = 0, 0, 0;} frame1; box { height = 290; width = 290; color = 255, 255, 255;} frame2; box { height = 30; width = 4; color = 0, 0, 0;} fix1; box { height = 4; width = 30; color = 0, 0, 0;} fix2; box { height = 30; width = 4; color = 255, 0, 0;} fix3; box { height = 4; width = 30; color = 255, 0, 0;} fix4; box { height = 290; width = 290; color = 128, 128, 128;} background; TEMPLATE "StimuliDeclaration.tem" {}; trial { sound sound_incorrect; time = 0; duration = 1; } wrong; trial { sound sound_correct; time = 0; duration = 1; } right; trial { sound sound_no_response; time = 0; duration = 1; } miss; # baselinePre (at the beginning of the session) trial { picture { box frame1; x=0; y=0; box frame2; x=0; y=0; box background; x=0; y=0; bitmap fixation_cross_black; x=0; y=0; }default; time = 0; duration = 9400; mri_pulse = 1; code = "BaselinePre"; #port_code = 1; }; TEMPLATE "ATWM1_Working_Memory_MRI.tem" { trigger_volume_encoding trigger_volume_retrieval cue_time preparation_time encoding_time single_stimulus_presentation_time delay_time retrieval_time intertrial_interval alerting_cross stim_enc1 stim_enc2 stim_enc3 stim_enc4 stim_enc_alt1 stim_enc_alt2 stim_enc_alt3 stim_enc_alt4 trial_code stim_retr1 stim_retr2 stim_retr3 stim_retr4 stim_cue1 stim_cue2 stim_cue3 stim_cue4 fixationcross_cued retr_code the_target_button posX1 posY1 posX2 posY2 posX3 posY3 posX4 posY4; 6 12 292 292 399 125 11543 2992 14342 fixation_cross gabor_008 gabor_054 gabor_177 gabor_120 gabor_008_alt gabor_054 gabor_177_alt gabor_120 "1_1_Encoding_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_300_300_399_11601_3000_14400_gabor_patch_orientation_008_054_177_120_target_position_1_3_retrieval_position_3" gabor_circ gabor_circ gabor_177_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_1_Retrieval_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_177_retrieval_position_3" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 21 27 292 292 399 125 11543 2992 12342 fixation_cross gabor_021 gabor_084 gabor_103 gabor_036 gabor_021 gabor_084_alt gabor_103 gabor_036_alt "1_2_Encoding_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_300_300_399_11601_3000_12400_gabor_patch_orientation_021_084_103_036_target_position_2_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_172_framed blank blank blank blank fixation_cross_target_position_2_4 "1_2_Retrieval_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_172_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 35 41 292 292 399 125 11543 2992 12342 fixation_cross gabor_077 gabor_048 gabor_092 gabor_154 gabor_077 gabor_048_alt gabor_092 gabor_154_alt "1_3_Encoding_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_300_300_399_11601_3000_12400_gabor_patch_orientation_077_048_092_154_target_position_2_4_retrieval_position_2" gabor_circ gabor_048_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_3_Retrieval_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_048_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 49 55 292 292 399 125 11543 2992 14342 fixation_cross gabor_070 gabor_043 gabor_115 gabor_178 gabor_070 gabor_043_alt gabor_115 gabor_178_alt "1_4_Encoding_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_300_300_399_11601_3000_14400_gabor_patch_orientation_070_043_115_178_target_position_2_4_retrieval_position_2" gabor_circ gabor_092_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_4_Retrieval_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_092_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 64 69 292 292 399 125 9543 2992 14342 fixation_cross gabor_059 gabor_089 gabor_128 gabor_015 gabor_059_alt gabor_089 gabor_128_alt gabor_015 "1_5_Encoding_Working_Memory_MRI_P6_LR_Salient_DoChange_UncuedRetriev_300_300_399_9601_3000_14400_gabor_patch_orientation_059_089_128_015_target_position_1_3_retrieval_position_2" gabor_circ gabor_039_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_5_Retrieval_Working_Memory_MRI_P6_LR_Salient_DoChange_UncuedRetriev_retrieval_patch_orientation_039_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 78 83 292 292 399 125 9543 2992 12342 fixation_cross gabor_051 gabor_022 gabor_139 gabor_157 gabor_051_alt gabor_022 gabor_139 gabor_157_alt "1_6_Encoding_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_300_300_399_9601_3000_12400_gabor_patch_orientation_051_022_139_157_target_position_1_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_157_framed blank blank blank blank fixation_cross_target_position_1_4 "1_6_Retrieval_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_157_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 91 97 292 292 399 125 11543 2992 14342 fixation_cross gabor_006 gabor_077 gabor_165 gabor_025 gabor_006_alt gabor_077 gabor_165 gabor_025_alt "1_7_Encoding_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_300_300_399_11601_3000_14400_gabor_patch_orientation_006_077_165_025_target_position_1_4_retrieval_position_1" gabor_051_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_7_Retrieval_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_051_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 106 112 292 292 399 125 11543 2992 14342 fixation_cross gabor_114 gabor_088 gabor_054 gabor_004 gabor_114 gabor_088_alt gabor_054_alt gabor_004 "1_8_Encoding_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_300_300_399_11601_3000_14400_gabor_patch_orientation_114_088_054_004_target_position_2_3_retrieval_position_2" gabor_circ gabor_135_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_8_Retrieval_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_135_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 121 126 292 292 399 125 9543 2992 12342 fixation_cross gabor_096 gabor_076 gabor_119 gabor_059 gabor_096_alt gabor_076_alt gabor_119 gabor_059 "1_9_Encoding_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_300_300_399_9601_3000_12400_gabor_patch_orientation_096_076_119_059_target_position_1_2_retrieval_position_1" gabor_096_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_9_Retrieval_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_096_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 134 140 292 292 399 125 11543 2992 12342 fixation_cross gabor_066 gabor_128 gabor_174 gabor_018 gabor_066_alt gabor_128 gabor_174 gabor_018_alt "1_10_Encoding_Working_Memory_MRI_P6_LR_Salient_NoChange_UncuedRetriev_300_300_399_11601_3000_12400_gabor_patch_orientation_066_128_174_018_target_position_1_4_retrieval_position_3" gabor_circ gabor_circ gabor_174_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_10_Retrieval_Working_Memory_MRI_P6_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_174_retrieval_position_3" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 148 153 292 292 399 125 9543 2992 12342 fixation_cross gabor_021 gabor_067 gabor_179 gabor_129 gabor_021_alt gabor_067 gabor_179_alt gabor_129 "1_11_Encoding_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_300_300_399_9601_3000_12400_gabor_patch_orientation_021_067_179_129_target_position_1_3_retrieval_position_1" gabor_156_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_11_Retrieval_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_156_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 161 166 292 292 399 125 9543 2992 12342 fixation_cross gabor_126 gabor_103 gabor_175 gabor_036 gabor_126 gabor_103 gabor_175_alt gabor_036_alt "1_12_Encoding_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_300_300_399_9601_3000_12400_gabor_patch_orientation_126_103_175_036_target_position_3_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_036_framed blank blank blank blank fixation_cross_target_position_3_4 "1_12_Retrieval_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_036_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 174 179 292 292 399 125 9543 2992 14342 fixation_cross gabor_079 gabor_003 gabor_140 gabor_050 gabor_079_alt gabor_003_alt gabor_140 gabor_050 "1_13_Encoding_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_300_300_399_9601_3000_14400_gabor_patch_orientation_079_003_140_050_target_position_1_2_retrieval_position_1" gabor_030_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_13_Retrieval_Working_Memory_MRI_P6_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_030_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 188 193 292 292 399 125 9543 2992 14342 fixation_cross gabor_168 gabor_092 gabor_015 gabor_036 gabor_168_alt gabor_092 gabor_015_alt gabor_036 "1_14_Encoding_Working_Memory_MRI_P6_LR_Salient_NoChange_UncuedRetriev_300_300_399_9601_3000_14400_gabor_patch_orientation_168_092_015_036_target_position_1_3_retrieval_position_2" gabor_circ gabor_092_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_14_Retrieval_Working_Memory_MRI_P6_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_092_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 202 207 292 292 399 125 9543 2992 14342 fixation_cross gabor_032 gabor_099 gabor_115 gabor_163 gabor_032_alt gabor_099_alt gabor_115 gabor_163 "1_15_Encoding_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_300_300_399_9601_3000_14400_gabor_patch_orientation_032_099_115_163_target_position_1_2_retrieval_position_2" gabor_circ gabor_099_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_15_Retrieval_Working_Memory_MRI_P6_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_099_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; }; # baselinePost (at the end of the session) trial { picture { box frame1; x=0; y=0; box frame2; x=0; y=0; box background; x=0; y=0; bitmap fixation_cross_black; x=0; y=0; }; time = 0; duration = 20600; code = "BaselinePost"; #port_code = 2; };
9b6a18830648d6b0ff4ad9d6d98190e66da7e1ca
3c47dba28e5d43bda9b77dca3b741855c25d4802
/microdaq/demos/other/mdaq_utils_demo.dem.sce
5f672c92a5add368fce7f4af77125f74c7ee0d33
[ "BSD-3-Clause" ]
permissive
microdaq/Scilab
78dd3b4a891e39ec20ebc4e9b77572fd12c90947
ce0baa6e6a1b56347c2fda5583fb1ccdb120afaf
refs/heads/master
2021-09-29T11:55:21.963637
2019-10-18T09:47:29
2019-10-18T09:47:29
35,049,912
6
3
BSD-3-Clause
2019-10-18T09:47:30
2015-05-04T17:48:48
Scilab
UTF-8
Scilab
false
false
269
sce
mdaq_utils_demo.dem.sce
// Copyright (c) 2015, Embedded Solutions // All rights reserved. // This file is released under the 3-clause BSD license. See COPYING-BSD. filePath = pathconvert(mdaqToolboxPath() + "examples/mdaq_utils_demo.sce", %F); scinotes(filePath, 'readonly'); clear filePath;
4ebe54e16ab81aa891dc2ecbde6cb75188508584
5bc3a272ac3972765259062ed2c4abd8ac31eb84
/EE 324 controls lab/lab5/q3.sce
8975cf9292fe4ae82f1cf0a1be7714f3832f119d
[]
no_license
ishan-2404/Duaon-mei-yaad-rakhna-XD
51a268cb15695d78a1bd086d958f402fe6ee093d
bf702ac84c18f7d677a35f9f850e3bfb63a32625
refs/heads/main
2023-07-13T17:10:57.650902
2021-08-14T07:06:22
2021-08-14T07:06:22
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
416
sce
q3.sce
s = poly(0,'s'); k_range = .1:.1:15; t = 0:.015:60; rise_times = zeros(1,length(k_range)); for i = 1:length(k_range) k = k_range(i); G = k/(s^3+3*s^2+5*s+k); G = syslin('c', G); o = csim('step',t,G); t1 = t(find(o>.9))(1); t2 = t(find(o>.1))(1); rise_times(1,i) = t1-t2; end tr_min = min(rise_times(1,2:length(k_range))) k_min = k_range(find(rise_times == tr_min));
33a42ee3f610227d9a56d176f21933c4abd44bfa
449d555969bfd7befe906877abab098c6e63a0e8
/839/CH6/EX6.2/Example_6_2.sce
ed2213d6538d9987fb7df7e5c68de160e845e48f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,385
sce
Example_6_2.sce
//clear// clear; clc; //Example 6.2 //Given Tr = 1000; //[R] pr = 20; //[atm] Ma_a = 0.05; gama = 1.4; gc = 32.174; //[ft-lb/lbf-s^2] M = 29; R = 1545; //(a) //Using Eq.(6.45) A = 2*(1+((gama-1)/2)*Ma_a^2)/((gama+1)*Ma_a^2); fLmax_rh = (1/Ma_a^2-1-(gama+1)*log(A)/2)/gama //(b) //Using Eq.(6.28), the pressure at the end of the isentropic nozzle pa A = (1+(gama-1)*(Ma_a^2)/2); pa = pr/(A^(gama/(gama-1))) // [atm] //From Example 6.1, the density of air at 20atm and 1000R is 0.795 lb/ft^3 //Using Eq.(6.17), the acoustic velocity Aa = sqrt(gc*gama*Tr*R/M) //[m/s] //The velocity at the entrance of the pipe ua = Ma_a*Aa //[m/s] //When L_b = L_max, the gas leaves the pipe at the asterisk conditions, where Ma_b = 1; // Using Eq.(6.43) A = (gama-1)/2; Tstar = Tr *(1+A*Ma_a^2)/(1+A*Ma_b^2) // [K] // Using Eq.(6.44) rho_star = 0.795*Ma_a/sqrt(2*(1+(gama-1)*Ma_a^2/2)/(2.4)) //[lb/ft^3] //Using Eq.(6.39) pstar = pa*Ma_a/sqrt(1.2) // [atm] //Mass velocity through the entire pipe G = 0.795*ua //[lb/ft^2-s] ustar = G/rho_star //[ft/s] //(c) //Using Eq.(6.45) with f_Lmax_rh = 400 err = 1; eps = 10^-3; Ma_ac = rand(1,1); i =1; while((err > eps)) A = 2*(1+((gama-1)/2)*Ma_ac^2)/((gama+1)*Ma_ac^2); B = gama*400+1+(gama+1)*log(A)/2; Ma_anew = sqrt(1/B); err = Ma_ac-Ma_anew; Ma_ac = Ma_anew; end Ma_ac; uac = Ma_ac*ua/Ma_a //[ft/s] Gc = uac*0.795 //[lb/ft^2-s]
4896a2cfc034098357829c0479d8ca44a05b5394
449d555969bfd7befe906877abab098c6e63a0e8
/1061/CH5/EX5.23/Ex5_23.sce
35f2acd73c3d70fa4c81b5dbbc3b0658539d1884
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex5_23.sce
//Ex:5.23 clc; clear; close; n1=1.5;// core refractive index L=1000;// length in meter NA=0.22;// numerical aperture dl=(NA/n1)^2/2; c=3*10^8;// the speed of ligth in m/s dt=(L*n1*dl)/c;//intermodel dispersion in sec dT=dt*10^9;//intermodel dispersion in ns printf("The max dispersion =%d ns", dT);
9d3f78b7454c60dda9374760b9e8649e69fe1cb1
449d555969bfd7befe906877abab098c6e63a0e8
/3557/CH5/EX5.6/Ex5_6.sce
bc065f965c29d91c6ae73a498fcd577c615e7011
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex5_6.sce
//Example 5.6// x=0.75*10^-3;//m //meter //given t=3.6*10^4;//s //seconds //time a=0.95;//given D=(x^2)/((a^2)*(t)) mprintf("D = %e m^2/s",D) b=20*10^-6;//m^2/s //preexponential constant c=142000;//J/mol //activation energy for defect motion d=8.314;//J/(mol.K)//universal gas constant e=c/d //mprintf("\ne = %e",e) y=(-log(D/b)) T1=inv(y/e) mprintf("\nT1 = %i K = 952 degree C",T1)
d332334f3939d181875357136ca0f426f45ea050
449d555969bfd7befe906877abab098c6e63a0e8
/1670/CH10/EX10.20/10_20.sce
46410ea0cfce71a6ae45effbd8f19940441665db
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
504
sce
10_20.sce
//Example 10.20 //Adams Moulton formula //Page no. 334 clc;clear;close; x=[1,1.1,1.2,1.3,1.4];i=5; y=[1,1.233,1.548488,1.978921]; h=0.1; deff('y=f(x,y)','y=x^2*y+x^2') //adams basforth formula y(i)=y(i-1)+h*(55*f(x(i-1),y(i-1))-59*(f(x(i-2),y(i-2)))+37*f(x(i-3),y(i-3))-9*f(x(i-4),y(i-4)))/24 disp(y(i),"By Adams Basforth Formula : ") //adams moulton formula y(i)=y(i-1)+h*(9*f(x(i),y(i))+19*f(x(i-1),y(i-1))-5*(f(x(i-2),y(i-2)))+f(x(i-3),y(i-3)))/24 disp(y(i),"By Adams Moulton Formula : ")
55924c208542f1e607954ffc546a82b913af81dc
419469004a9a64b5863958da1fce263e3b69dfa8
/20130820_MoneyTransfer.tst
db7e25d97ff261c01081b8e041162a8853d63fc4
[]
no_license
Piatrenka/Technocube
1e76f89da068d54e97c50586a155a88e3a0f1508
d8441bf4e2f85e1dce3be78d57e4d3c3711d815e
refs/heads/master
2021-01-10T16:05:23.248246
2016-03-22T14:48:14
2016-03-22T14:48:14
54,483,152
0
0
null
null
null
null
WINDOWS-1251
Scilab
false
false
5,227
tst
20130820_MoneyTransfer.tst
PL/SQL Developer Test script 3.0 94 -------------------------------------------------------------------------- -- Синкевич -- Движения денежных средств за период. Формируется по всем счетам (касса, -- расчетные счета в валюте и в рублях). Учитываются все движения, в том числе и -- ручные проводки, если они имели место. -- Branch - наименование организации -- AccountCode - код счета из плана счетов -- AccountName - наименование счета из плана счетов -- Period - дата осуществления операции -- Currency - наименование валюты в случае валютных движений -- Client - наименование клиента -- Contract - наименование договора -- BankAccount - расчетный счет организации -- TextDescription - текстовое описание платежа -- OutPut_Amount - сумма списания денежных средств в бел. руб. -- OutPut_CurrencyAmount - сумма списания денежных средств в валюте -- InPut_Amount - сумма поступления денежных средств в бел. руб. -- InPut_CurrencyAmount - сумма поступления денежных средств в валюте -------------------------------------------------------------------------- select MTable.Branch, MTable.AccountCode, MTable.AccountName, MTable.Period, MTable.Currency, ClientObject.Fdescription as Client, ContractObject.Fdescription as Contract, BankAccObject.Fdescription as BankAccount, MTable.TextDescription, MTable.OutPut_Amount, MTable.OutPut_CurrencyAmount, MTable.InPut_Amount, MTable.InPut_CurrencyAmount From( select BranchObject.Fdescription Branch, AccObject.Fcode AccountCode, AccObject.Fdescription AccountName, to_char(MoneyTable.Period,'DD/MM/YYYY') as Period, CurrenceObject.Fdescription Currency, SD_Client.Fvalue_Rrref as Client, SD_Contract.Fvalue_Rrref as Contract, SD_BankAcc.Fvalue_Rrref as BankAccount, MoneyTable.TextDescription, MoneyTable.OutPut_Amount, MoneyTable.OutPut_CurrencyAmount, MoneyTable.InPut_Amount, MoneyTable.InPut_CurrencyAmount From (SELECT Accrg644.Frecorderrref as RecordID, Accrg644.Faccountdtrref as Account, AccRg644.Ffld645rref as Organisation, AccRg644.Frecordertref as Registrator, AccRg644.Fperiod as Period, AccRg644.Ffld646dtrref as Currency, AccRg644.Ffld650 as TextDescription, AccRg644.Ffld647 as OutPut_Amount, AccRg644.Ffld648dt as OutPut_CurrencyAmount, 0 as InPut_Amount, 0 as InPut_CurrencyAmount FROM AccRg644, vSCAccMapping WHERE AccRg644.Faccountdtrref = vSCAccMapping.AccRefID and AccRg644.Fperiod BETWEEN to_date('01/01/2012', 'DD/MM/YYYY') And to_date('03/01/2012', 'DD/MM/YYYY') UNION ALL Select Accrg644.Frecorderrref, Accrg644.Faccountctrref, AccRg644.Ffld645rref, AccRg644.Frecordertref, AccRg644.Fperiod, AccRg644.Ffld646ctrref, AccRg644.Ffld650, 0, 0, AccRg644.Ffld647, AccRg644.Ffld648ct From AccRg644, vSCAccMapping WHERE AccRg644.Faccountctrref = vSCAccMapping.AccRefID and AccRg644.Fperiod BETWEEN to_date('01/01/2012', 'DD/MM/YYYY') And to_date('03/01/2012', 'DD/MM/YYYY')) MoneyTable left join Reference23 CurrenceObject on (MoneyTable.Currency = CurrenceObject.FIDRRef) left join Acc18 AccObject on (MoneyTable.Account = AccObject.Fidrref) left join AccRgED669 SD_Client on (MoneyTable.RecordID = SD_Client.Frecorderrref) and (SD_Client.Fkindrref = '93E0BC525FC3DBE048D4A86FAC901067') left join AccRgED669 SD_Contract on (MoneyTable.RecordID = SD_Contract.Frecorderrref) and (SD_Contract.Fkindrref = '9EFEA4E4FE5213194AAACF4480D1631B') left join AccRgED669 SD_BankAcc on (MoneyTable.RecordID = SD_BankAcc.Frecorderrref) and (SD_BankAcc.Fkindrref = '8096C8EFB7CA1E59427C88B9F3DE4F14') left join Reference60 BranchObject on (MoneyTable.Organisation = BranchObject.FIDRRef)) MTable left join Reference48 ClientObject on (MTable.Client = ClientObject.FIDRRef) left join Reference36 ContractObject on (MTable.Contract = ContractObject.FIDRRef) left join Reference21 BankAccObject on (MTable.BankAccount = BankAccObject.FIDRRef) 0 0
27d45ed681066b179afda3e4efb797cc45feaef3
449d555969bfd7befe906877abab098c6e63a0e8
/1271/CH8/EX8.7/example8_7.sce
cacafb0b14bc7b0319c730e86d25a4342c1e19fb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,231
sce
example8_7.sce
clc // Given that V = 1400 // volume of hall in meter^3 C = 110 // seating capacity of hall a1 = 98 // area of plastered wall in m^2 a2 = 144 // area of plastered ceiling in m^2 a3 = 15 // area of wooden door in m^2 a4 = 88 // area of cushioned chairs in m^2 a5 = 150 // area of audience (each person) in m^2 k1 = 0.03 // coefficient of absorption for plastered wall in O.W.U. k2 = 0.04 // coefficient of absorption for plastered ceiling in O.W.U. k3 = 0.06 // coefficient of absorption for wooden door in O.W.U. k4 = 1 // coefficient of absorption for cushioned chair in O.W.U. k5 = 4.7 // coefficient of absorption for audience (each person) in O.W.U. // Sample Problem 7 on page no. 8.20 printf("\n # PROBLEM 7 # \n") printf(" Standard formula used \n") printf(" T = 0.161 V/a*S \n" ) A1 = a1 * k1// calculation for the absorption by the plaster wall A2 = a2 * k2// calculation for the absorption by the plastered ceiling A3 = a3 * k3// calculation for wooden door A4 = a4 * k4// calculation for cushioned chairs A5 = C*k5 // the absorption due to persons A = A1 + A2 + A3 + A4 + A5 // calculation for total absorption T = (0.161 * V) / A// calculation for the reverberation time printf("\n Reverberation time is %f sec.",T)
3abdebd8bffe59c529635e34d77e99c625bd6811
449d555969bfd7befe906877abab098c6e63a0e8
/1238/CH3/EX3.2/2.sce
25d73358c650a37ca07961bc7800a7ce7a067487
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
407
sce
2.sce
//finding minimum amplification// //example 2// clc //clears the command window// clear //clears// r=.04*10^-6 //r is the rise time// disp('rise time=(2*v)/(2*%pi*f*V),hence') //f=frequency in hetrz;v=output voltage in volts;V=required maximum output voltage in volts// f=400*10^3 v=6.28 V=(2*v)/(r*2*%pi*f) Vin=12.5;//input voltage// a=V/Vin printf('minimum amplification required=%f ',a)
861061b43bfb5652dd4035bb739488a1b53a1c6b
2abbdbd7a9a8bda139e6a7314a1b8a70ad010ae0
/Hack-Computer/Prog2.tst
e19f9f742cd9013d58a5c810290ab9bfef0a2758
[]
no_license
Aryan-Reddy/Hack-Computer
6a1e403a100a9b8eb764aa2ef2acf77dae85f86b
897053afc8567bf041d0a7bc11152dc35e556722
refs/heads/main
2023-06-17T19:21:35.312099
2021-07-18T14:15:16
2021-07-18T14:15:16
387,191,986
0
0
null
null
null
null
UTF-8
Scilab
false
false
868
tst
Prog2.tst
load HackComputer.hdl, output-file Prog2.out, output-list time%S1.4.1 reset%B2.1.2 ARegister[]%D1.7.1 DRegister[]%D1.7.1 RAM64[16]%D1.7.1 RAM64[17]%D1.7.1 RAM64[18]%D1.7.1; // The program computes the modulus of RAM[16]-RAM[17] // and writes the result in RAM[18]. ROM32K load Prog2.hack, // first run: compute absolute difference between 3 and 5 (|a-b|) set RAM64[16] 3, set RAM64[17] 5, output; repeat 8 { tick, tock, output; } // reset the PC set reset 1, tick, tock, output; // second run: compute absolute difference between 234 and 12 (|a-b|) set reset 0, set RAM64[16] 234, set RAM64[17] 12, output; repeat 8 { tick, tock, output; } // reset the PC set reset 1, tick, tock, output; // second run: compute absolute difference between 30 and 20 (|a-b|) set reset 0, set RAM64[16] 30, set RAM64[17] 20, output; repeat 8 { tick, tock, output; }
0fafeeddd826db228c04b8b2eccb526ae72e3e76
449d555969bfd7befe906877abab098c6e63a0e8
/2534/CH11/EX11.10/Ex11_10.sce
d5d94e96118f90831f6e9e95b56f4ec0803022f7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
596
sce
Ex11_10.sce
//Ex11_10 clc VCC = 18//collector voltage Vp = 15//output peak voltage RL = 12//load resistnce disp("VCC = "+string(VCC)+"V") disp("Vp = "+string(Vp)+"V") disp("RL = "+string(RL)+"ohm") Ip = Vp/RL//output peak current Idc = (2/%pi)*Ip//input direct current disp("Ip = Vp/RL = "+string(Ip)+"A") disp("Idc = (2/%pi)*Ip = "+string(Idc)+"A") Pi_dc = VCC*Idc//input power disp("Pi_dc = VCC*Idc = "+string(Pi_dc)+"W") Po_ac = (Vp^2)/(2*RL)//output power disp("Po_ac = (Vp^2)/(2*RL) = "+string(Po_ac)+"W") eta = Po_ac/Pi_dc//efficiency disp("eta = Po_ac/Pi_dc = "+string(eta*100)+"%")
b11edc9f8377a3540dbde8d9d01fbfa4d215f2bb
1932005a6025980df3b2db017758374b04e7740a
/state_eq.sce
394b98922933e7ee9214ca10cd63de03d8c2466e
[]
no_license
kouhei1970/drone2016
a668e6eb9701ccc63ff8c98d3022fa7907ebbff7
659b08f4dc4bdff82a32458467a474027bacc9ec
refs/heads/master
2020-06-18T05:06:03.813199
2016-12-01T13:54:53
2016-12-01T13:54:53
74,945,342
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,531
sce
state_eq.sce
g= 9.80665 Ixx = 0.078 Iyy = 0.078 Izz = 0.064 Ixz = 0.001 mass = 0.806 l = 0.2 den = (Ixx*Izz - Ixz^2) ApL = Izz/den ApN = Ixz/den AqM = 1/Iyy ArL = Ixz/den ArN = Ixx/den K1 = 4.321*g K2 = 3.426*g K3 = 3.422*g K4 = 3.854*g KT1 = 0.06329 KT2 = 0.04349 KT3 = 0.02104 KT4 = 0.05735 B31 = -K1/mass B32 = -K2/mass B33 = -K3/mass B34 = -K4/mass B41 = -ApL*l*K1 + ApN*KT1 B42 = ApL*l*K2 + ApN*KT2 B43 = -ApN*KT3 B44 = -ApN*KT4 B53 = AqM*l*K3 B54 = -AqM*l*K4 B61 = -ArL*l*K1 + ArN*KT1 B62 = ArL*l*K2 + ArN*KT2 B63 = -ArN*KT3 B64 = -ArN*KT4 A=[ 0 0 0 0 0 0 0 -g 0; 0 0 0 0 0 0 g 0 0; 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0; 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 1 0 0 0 ] B=[ 0 0 0 0; 0 0 0 0; B31 B32 B33 B34; B41 B42 B43 B44; 0 0 B53 B54; B61 B62 B63 B64; 0 0 0 0; 0 0 0 0; 0 0 0 0 ] C = eye(9,9) //C=[ 1 0 0 1 0 0 0 0 0; // 0 1 0 0 1 0 0 0 0; // 0 0 1 0 0 1 0 0 0; // 0 0 0 0 0 0 1 0 0; // 0 0 0 0 0 0 0 1 0; // 0 0 0 0 0 0 0 0 1] D = zeros(9,4) Q=diag([1,1,1,1,1,1,100,100,1]);R=diag([1,1,1,1]); //Usual notations x'Qx + u'Ru Big=sysdiag(Q,R); //Now we calculate C1 and D12 [w,wp]=fullrf(Big);C1=wp(:,1:9);D12=wp(:,10:$); //[C1,D12]'*[C1,D12]=Big P=syslin('c',A,B,C1,D12); //The plant (continuous-time) [K,X]=lqr(P) disp(spec(A+B*K)) //check stability disp(norm(A'*X+X*A-X*B*inv(R)*B'*X+Q,1)) //Riccati check L=ppol(A',C',[-1 -1 -1 -1 -1 -1 -1 -1 -1])
bdecaec7cd4559d49cc9bb11f23bcf2373207c45
449d555969bfd7befe906877abab098c6e63a0e8
/926/CH5/EX5.7/Chapter5_Example7.sce
dcc8a2c22709dfae4711963dbdfb4539ad7af96d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,405
sce
Chapter5_Example7.sce
//Hougen O.A., Watson K.M., Ragatz R.A., 2004. Chemical process principles Part-1: Material and Energy Balances(II Edition). CBS Publishers & Distributors, New Delhi, pp 504 //Chapter-5, Illustration 7, Page 119 //Title: Calculation of condensation pressure //============================================================================= clear clc //INPUT VP = [229.2 89.1]; //Vapour pressure of acetone at 25 degree C and 5 degree C P = 750; //Pressure of given mixture in mm Hg w = 90; //Amount of acetone to be condensed; //CALCULATION n1 = VP(1)/P; //lb moles of acetone present n2 = 1-n1; //lb moles of flue gases present n3 = (1-(w/100))*n1; //lb moles of acetone in final mixture n4 = n2+n3; //lb moles of final mixture of gas PP = VP(2); //Partial pressure of acetone in final mixture m = n3*100/n4; //Mole percent of acetone in final mixture Pf = PP/(m/100); //Final pressure in mm Hg //OUTPUT // Console output mprintf('\n Final pressure after condensation = %.0f mm Hg',Pf); // File output fd= mopen('.\Chapter5_Example7_Output.txt','w'); mfprintf(fd,'\n Final pressure after condensation = %.0f mm Hg',Pf); mclose(fd); //=========================END OF PROGRAM====================================== // Remark: Difference between the nswer given in the textbook (2110 mm Hg) and that computed using scilab code (2114 mm Hg) is due to round off error
340b59734779b35ad8683db8c7c735e2b1e5cfe2
12d519f18a15ef7423dffa1727cb877966fcf913
/scilab/xls_SelectWorksheet.sci
5fb25aeebbaa8d7e4a9427a2afed2185f35b482d
[]
no_license
gviolato/gviolato.github.io
e9b799bf61dd345fe06760ebc296f49f467347b7
190748c14c115f63e366d2244a572de08daa7e5e
refs/heads/master
2021-01-17T15:29:43.924914
2017-01-25T23:33:53
2017-01-25T23:33:53
22,399,267
0
0
null
null
null
null
UTF-8
Scilab
false
false
460
sci
xls_SelectWorksheet.sci
function ret = xls_SelectWorksheet(WorksheetName) ret = %f; Worksheet = 0; r = %t; while r Worksheet = Worksheet + 1; try r = xls_SetWorksheet(Worksheet); catch r = xls_SetWorksheet(1); break; end name = xls_GetWorksheetName(); if name==WorksheetName then ret = %t; break; end end endfunction
fddcb5b72d85c8bde25baa1a4bec41aafaad28b5
449d555969bfd7befe906877abab098c6e63a0e8
/3526/CH8/EX8.2/EX8_2.sce
c51c3f09ac1d8f8f5b773730c7e26dfc32745b31
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
539
sce
EX8_2.sce
clc;funcprot(0);//EXAMPLE 8.2 //page 222 // Initialisation of Variables tf=0.1;.......//Thickness of cooper to produce in cm %CW1=40;.......//cold work to produce a tensile strengthof 65,000 psi %CW2=45;.......//cold work to produce a tensile strengthof 60,000 psi //CALCULATIONS Tmax=(tf/(1-(%CW1/100)));.........//Maximum thicknessproduced in step1 in cm Tmin=(tf/(1-(%CW2/100)));.........//Minimum thicknessproduced in step2 in cm disp(Tmax,"Maximum thicknessproduced in cm:") disp(Tmin,"Minimum thicknessproduced in cm:")
49f3956e6134f91aa045ff6c47d3428e0ae00359
5887829f5a0a005033807cf7dc4fb7231eb280ec
/Listing/chapter 6/Listing611.sce
8cadf67d011787e9d4ed0bcfe45116fa52de21c1
[]
no_license
joaolrneto/learning_scilab
78ecc0019f167b57bc35647c4ac785ece01e443e
9624c9a6736860a8a836b0f801256b6224756585
refs/heads/main
2023-03-17T22:17:51.853368
2021-03-15T20:58:34
2021-03-15T20:58:34
344,478,059
0
0
null
null
null
null
UTF-8
Scilab
false
false
87
sce
Listing611.sce
[fd,SST,Sheetnames,Sheetpos] = xls_open('SCI/modules/spreadsheet/demos/xls/Test1.xls')
99690b06a02f7cf28fc1326bbdcab8220eab6f71
449d555969bfd7befe906877abab098c6e63a0e8
/1118/CH16/EX16.3/eg16_3.sce
ce323c2e3f2d6209f05aeef0ec2042bc41dbeceb
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
221
sce
eg16_3.sce
clear; //clc(); sb=50*10^6; xg=0.2; sg=10*10^6; xgpu=sb*xg/sg; xpg=1/4; ssc=500; xu=1/15; vl=33*10^3; ifl=sb/(sqrt(3)*vl); vn=vl/sqrt(3); x=vn*xu/ifl; printf("the reactance of the reactor is:%.2f Ohm",x);
9efcc6731c4ca13fcde821789bdad68419f3c851
449d555969bfd7befe906877abab098c6e63a0e8
/3760/CH5/EX5.21/Ex5_21.sce
80ddbb6bba4cc54d26fac1854f5e3c480b55cf2f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,097
sce
Ex5_21.sce
clc; v=2200; // rated voltage of motor r=0.32; // per phase armature resistance p=1500; // KW rating of motor ie=15; // exciting current is=750; // short circuit current cl=60; // core loss in KW fl=40; // frictional and windage loss in KW IF=[5 10 15 20 25 30]; EFO=[ 760 1500 2140 2650 3040 3340]; // excitation EMF per phase EFP=EFO/sqrt(3); disp('Excitation EMF per phase(V) is'); disp(EFP); // from table given for ie=15, Ef=2140; // Excitation EMF np=3; // number of phases ef=Ef/sqrt(3); // per phase open circuit voltage zs=ef/is; // synchronous impedance vt=floor(v/sqrt(3)); // per phase terminal voltage i=floor(vt/zs); // current phasor lagging vt ia=vt/(2*r); // armature current pd=((p/2)+cl+fl)/np; // mechanical power developed per phase at half-full load output R=ceil(sqrt((ia^2-((pd*1000)/r)))); printf('Radius of power circle is %f A\n',R); printf('Current phasor is %f A\n',i); printf('Synchronous impedance is %f ohm\n',zs); disp('using above data and table given in solution, V-curves and variation of p.f. with field currents can be plotted');
2655e4904073543bfc619452018565577eeab749
449d555969bfd7befe906877abab098c6e63a0e8
/683/CH8/EX8.11/S8_11.sce
d669f5cbffd85bcaa52c685b08a6337c27590744
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
561
sce
S8_11.sce
// sum 8-11 clc; clear; L=1180; W=40*(10^3); Nf=2; Ng=8; E=207*(10^3); //sigut is ultimate strength sigut=1400; FOS=2; //siga= allowable yield strength of the material siga=1400/2; //sigbf=bending strength in full length sigbf=700; b=75; t=((4.5*W*L)/(((3*Nf)+(2*Ng))*sigbf))^(0.5); t=14; I=(Nf*b*(t^3))/12; Wf=(3*Nf*W)/((3*Nf)+(2*Ng)); del=(Wf*(L^3))/(48*E*I); // printing data in scilab o/p window printf("t is %0.0f mm ",t); printf("\n Wf is %0.0f N ",Wf); printf("\n I is %0.0f mm^4 ",I); printf("\n del is %0.1f mm ",del);
a7c47d5fa98a6338e674f7e8bb9367d3823b0407
f0919c8ea73f22939a890aa4f8327f8200344d2b
/test/make_exec_str.tst
5727264f5ca3c3fa0529f7cf2ecd290b582eb8d2
[]
no_license
kalex375/OVC
af5e91f90754454b90f339e846c5b9112d38d6c8
f4b47dfc497299c4944b4ff9b93253c279012454
refs/heads/master
2021-05-31T07:55:44.326597
2013-12-02T14:15:52
2013-12-02T14:15:52
null
0
0
null
null
null
null
WINDOWS-1251
Scilab
false
false
4,182
tst
make_exec_str.tst
PL/SQL Developer Test script 3.0 115 -- Created on 13.07.10 by Kravchenko A.V. declare -- Local variables here type t_param is record ( rn pls_integer, param_str varchar2(4000), param_name varchar2(100), param_type varchar2(3), param_value varchar2(255), param_value_int pls_integer, param_value_num number, param_value_dat date); m_command_str varchar2(32000); m_schema varchar2(50); m_part1 varchar2(50); m_part2 varchar2(50); m_dblink varchar2(50); m_part1_type varchar2(50); m_object_number varchar2(50); m_offset_str pls_integer; m_is_func boolean; m_cur pls_integer; m_rows pls_integer; c_params sys_refcursor; m_param t_param; m_result pls_integer; begin dbms_utility.name_resolve(name => :p_command, context => '1', schema => m_schema, part1 => m_part1, part2 => m_part2, dblink => m_dblink, part1_type => m_part1_type, object_number => m_object_number); m_command_str := 'begin'||p_ovc_str_utils.CRLF; for c_list_arg in (select aa.ARGUMENT_NAME, aa.in_out, aa.SEQUENCE, aa.pls_type, aa.POSITION, count(aa.OWNER) over () count_arg, row_number() over (order by aa.POSITION) rn, decode((select count(aas.OWNER) from all_arguments aas where ((aas.PACKAGE_NAME = m_part1) or (m_part1 is null and aas.PACKAGE_NAME is null)) and aas.OBJECT_NAME = m_part2 and aas.OWNER = m_schema ),0,'F','T') is_func from all_arguments aa where ((aa.PACKAGE_NAME = m_part1) or (m_part1 is null and aa.PACKAGE_NAME is null)) and aa.OBJECT_NAME = m_part2 and aa.OWNER = m_schema --and aa.POSITION>0 order by aa.POSITION) loop --Функция if c_list_arg.rn = 1 and c_list_arg.is_func='T' then m_command_str := m_command_str||' :m_result := '||:p_command; m_offset_str:= 16; m_is_func := true; --Процедура elsif c_list_arg.rn = 1 and c_list_arg.is_func='F' then m_command_str := m_command_str||' '||:p_command; m_offset_str:= 3; m_is_func := false; end if; --Если есть параметры if c_list_arg.position > 0 then --На первом отркрываем скобку if c_list_arg.position = 1 then m_command_str := m_command_str||'('; --Добавляем запятую и делаем выравнивание else m_command_str := m_command_str||','||p_ovc_str_utils.CRLF||rpad(' ',length(:p_command)+m_offset_str,' '); end if; m_command_str := m_command_str||c_list_arg.argument_name||' => :'||c_list_arg.argument_name; --Если последний параметр закрываем скобку if c_list_arg.rn = c_list_arg.count_arg then m_command_str := m_command_str||')'; end if; end if; end loop; m_command_str := m_command_str||';'||p_ovc_str_utils.CRLF||'end;'; dbms_output.put_line(m_command_str); m_cur := dbms_sql.open_cursor; dbms_sql.parse(m_cur, m_command_str, dbms_sql.native); p_ovc_http.parse_params(:p_params,c_params); loop fetch c_params into m_param; exit when c_params%notfound; dbms_sql.bind_variable(m_cur,m_param.param_name,m_param.param_value); end loop; if m_is_func then dbms_sql.bind_variable(m_cur,'m_result',m_result); end if; m_rows :=dbms_sql.execute(m_cur); if m_is_func then dbms_sql.variable_value(m_cur,'m_result',m_result); end if; dbms_output.put_line(m_result); end; 2 p_command 1 p_ovc_utility.get_user_uid 5 p_params 0 5 0
e7a3135e23f90ad8b43484b6bee810eb3aa22a32
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.2/macros/scicos/ZCROSS_f.sci
8f571e3080d7a64a91d277337a074298d6766b26
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
1,099
sci
ZCROSS_f.sci
function [x,y,typ]=ZCROSS_f(job,arg1,arg2) x=[];y=[];typ=[]; select job case 'plot' then standard_draw(arg1) graphics=arg1(2); [orig,sz]=graphics(1:2) xstringb(orig(1),orig(2),'Zcross',sz(1),sz(2),'fill') case 'getinputs' then [x,y,typ]=standard_inputs(arg1) case 'getoutputs' then [x,y,typ]=standard_outputs(arg1) case 'getorigin' then [x,y]=standard_origin(arg1) case 'set' then x=arg1; graphics=arg1(2);label=graphics(4) model=arg1(3); nin=model(2) [ok,label,nin1]=getvalue(['Set Zero-Crossing parameters';.. 'All surfaces must cross together'],.. ['Block label';'Number of inputs'],.. list('str',1,'vec',1),[label;string(nin)]) if ok then [model,graphics,ok]=check_io(model,graphics,nin1,0,0,1) if ok then nin=nin1 kk=0 for jj=1:nin kk=kk+2^(nin+jj-1) end model(8)=[-ones(kk,1);zeros(2^(2*nin)-kk,1)] graphics(4)=label x(2)=graphics;x(3)=model end end case 'define' then rpar=[-1;-1;-1;0] model=list('zcross',1,0,0,1,[],[],rpar,[],'z',%f,[%t %f]) x=standard_define([2 2],model) end
9780e3e82b1640fbb6bede438c061948442f34fc
449d555969bfd7befe906877abab098c6e63a0e8
/2489/CH14/EX14.9/14_9.sce
d31a0f4ba2bae4e9125a499594368a9ae3289c43
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
463
sce
14_9.sce
clc //Intitalisation of variables clear k= 0.059 //volt c= 10^-7 //M e= 2.71 //volt c1= 6 //M e1= -0.4 //volt e2= -1.36 //volt e3= 0.6 //volt //CALCULATIONS E1= -log10(c)*k E2= e-k*log10(c1) E3= e1+k*log10(c) E4= e2+k*log10(c1) E5= E3-e3 //RESULTS printf ('EH = %.2f volt ',E1) printf ('\n ENa = %.2f volt ',E2) printf ('\n EO = %.2f volt ',E3) printf ('\n ECl = %.2f volt ',E4) printf ('\n Oxygen evolution potential = %.2f volt ',E5)
6a5c0e4d6383048b76d39682dadcff280876cad7
449d555969bfd7befe906877abab098c6e63a0e8
/1241/CH6/EX6.28/exa6_28.sce
ae53e0b15049726fc657c10b794a5572c091b364
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
345
sce
exa6_28.sce
//Example 6-28// //Solve using 3 Variable Mapping// clc //clears the console// clear //clears all existing variables// disp('W=Dm2+m6+Dm5+d(m1+D''m7)') disp('Dm5 combined with XDm1 ') disp('Dm2 combined with Dm6') disp('D''m6 combined either with Dm6 or XD''m7') disp('Result W=B''CD+ABD''+BC''D ') //final expression is displayed//
752f681b2c61352a86e993bc26e7e881c4733b3f
449d555969bfd7befe906877abab098c6e63a0e8
/2276/CH2/EX2.1/chapter2_ex1.sce
243c38f28c75dfa9a1a3c14b622045f1137169b0
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
407
sce
chapter2_ex1.sce
clc clear //input r=5; //resistance of the coil in ohms v=100; // d.c supply voltage to the coil in volts l=100*(10^-3); // inductance of the coil in henry //calculations i=v/r; // value of the current in amperes e=(l*(i^2))/2; // energy stored in the circuit in joules //output mprintf('the value of current is %3.2f amperes \n the energy stored in the magnetic field is %3.2f joules',i,e)
fc37f4f3906d22d897434ebe07133cc194a545bf
8217f7986187902617ad1bf89cb789618a90dd0a
/source/2.1/macros/sci2for/f_gener.sci
1610e760c3360a72172265ad182e5c442c7c124a
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
4,231
sci
f_gener.sci
//[stk,nwrk,txt,top]=f_gener(nam,nwrk,targ) // stk : liste dont les elements sont des listes et qui joue plus ou // moins un role similaire a celui de la partie haute la pile scilab // (contient la description) des variables sur lesquelles on travaille // comme dans la pile scilab stk(top) est la derniere variable definie // // chaque element de stk a la structure suivante: // stk(k)=list(definition,type_expr,type_var,nb_ligne,nb_col) // // *definition peut etre soit: // - une expression fortran a+2*b-3*c(1) si sa valeur est scalaire // - une reference a la premiere adresse d'un tableau fortran: // a si a est une matrice qui est definie // work(iwn) si la variable est stockee dans un tableau de // travail double precision // iwork(iiwn) si la variable est stockee dans un tableau de // travail entier // *type_expr code le type de l'expression et sert essentiellement a // determiner comment parentheser // '2' : somme de termes // '1' : produits de facteurs // '0' : atome // '-1': valeur stockee dans un tableau fortran pas besoin de // parentheser // *type_var code le type fortran de la variable // '1' : double precision // '0' : entier // '10': caractere // remarques: pour le moment les complexes sont determines par // un champ definition a 2 composantes : partie R et // partie I // *nb_ligne , nb_col : nombre de ligne et de colonne, ce sont aussi // des chaines de caracteres // ATTENTION: stk entre par le contexte et l'on ne ressort que la valeur // courante // // nwrk : variable qui contient les infos sur les tableaux de travail, // les indicateurs d'erreur, ce tableau est manipule par les macro // outname adderr getwrk // // txt : est la portion de texte fortran genere pour realiser la fonction // si besoin est (calcul matriciel) //! txt=[] [lhs,rhs]=argn(0);if rhs=2 then targ=['1','1'],end tin=targ(1);tout=targ(2) cnvf='dble' if tin='0' then cnvf='int',end // s2=stk(top) if s2(4)=='1'&s2(5)=='1' then //cas d'un argument scalaire if s2(3)<>tin then s2(1)=cnvf+'('+s2(1),')',end stk=list(nam+'('+s2(1)+')','0',tout,s2(4),s2(5)) return end if s2(3)<>tin then cnv=%t,else cnv=%f,end if part(s2(1),1:5)=='work(' then pti=part(s2(1),6:length(s2(1))-1) [outn,nwrk,txt]=outname(nwrk,tout,s2(4),s2(5)) in='work' elseif part(s2(1),1:6)=='iwork(' then pti=part(s2(1),6:length(s2(1))-1) [outn,nwrk,txt]=outname(nwrk,tout,s2(4),s2(5)) in='iwork' else pti='0' outn=s2(1) in=s2(1) end if part(outn,1:5)=='work(' then pto1=part(outn,6:length(outn)-1), out='work' elseif part(outn,1:6)=='iwork(' then pto1=part(outn,7:length(outn)-1), out='iwork' else out=outn pto1='0' end if s2(4)=='1'|s2(5)=='1' then [lbl,nwrk]=newlab(nwrk) tl1=string(10*lbl); var='ilb'+tl1; if cnv then t1=' '+out+'('+addf(pto1,var)+')='+.. nam+'('+cnvf+'('+in+'('+addf(pti,var)+')))' else t1=' '+out+'('+addf(pto1,var)+')='+nam+'('+in+'('+addf(pti,var)+'))' end txt=[txt;' do '+tl1+' '+var+' = 0,'+subf(mulf(s2(4),s2(5)),'1'); indentfor(t1);part(tl1+' ',1:6)+' continue'] else [lbl,nwrk]=newlab(nwrk) tl2=string(10*lbl); var2='ilb'+tl2; [lbl,nwrk]=newlab(nwrk) tl1=string(10*lbl); var1='ilb'+tl1; if out=='work' then t1=' '+out+'('+addf(pto1,addf(var2,mulf(var1,s2(4))))+') = ' else t1=' '+out+'('+var2'+','+var1+') = ' end if in=='work' then iar=in+'('+addf(pti,addf(var2,mulf(var1,s2(4))))+')' else iar=in+'('+var2+','+var1+')' end if cnv then t1=t1+nam+'('+cnvf+'('+iar+'))' else t1=t1+nam+'('+iar+')' end txt=[txt;' do '+tl1+' '+var1+' = 0,'+subf(s2(5),'1'); indentfor([' do '+tl2+' '+var2+' = 0,'+subf(s2(4),'1'); indentfor(t1); part(tl2+' ',1:6)+' continue']); part(tl1+' ',1:6)+' continue']; end stk=list(outn,'-1','1',s2(4),s2(5)) //end
bd25e35a74a1cb74cb2854367e1d8fa4c09fd1ab
4ed576b765859807d6c29665521e0697d6f9bae7
/archive/01/loops.sce
7edb62ba0467b567c4930704c6ca706f829f7b8d
[]
no_license
sbednarz/scilab
96b9182730fa48d11f27840fc197d151adb01e2c
28f81c58bc4972eeb41f403cb157fb989e809f41
refs/heads/master
2021-07-11T04:42:04.289126
2021-05-17T20:55:19
2021-05-17T20:55:19
100,467,366
3
1
null
2020-06-19T06:49:18
2017-08-16T08:37:06
Scilab
UTF-8
Scilab
false
false
983
sce
loops.sce
// loops // from 1 to 10 for x = 1:10 disp(x) end // start : step : end for x = 1:2:10 disp(x) end for x = 10:-1:1 disp(x) end // iteration through values of a list (a vector) mylist = [1, 2, 55, 67, -4, 33.333] for x = mylist disp(x) end // nested loops for x = 1:1:3 // 1, 2, 3 (three times) for y = 2:5 // 2, 3, 4, 5 (four times) printf( "x=%f y=%f \n", x, y) // 3x4 = 12 times end end // loops & calculations // index varible set to a first matrix element i = 1 // room for our results results=[] // a parameter values mylist = [2, 3, 4, 5] // iteration through the values for x = mylist // calculations y = x**2 disp(x) disp(y) // store the parameter x and the result y results(i,1) = x results(i,2) = y i = i + 1 end // outside calculations loop disp(results) // post-analysis e.g. plotting //plot(results(:,1), results(:,2), 'o')
7a2166d5daa3b30a3a1693dcb1421dd0b2f99753
449d555969bfd7befe906877abab098c6e63a0e8
/2072/CH19/EX19.5/ex19_5.sce
8fc51b2bed3605989600a08b2c3af150fc187539
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
111
sce
ex19_5.sce
//Example 19.5 clc q=1.6*10^-19 B=.35 r=14*10^-2//in m m=1.67*10^-27//kg v=(q*B*r)/m disp(v,"Velocity in m/s=")
3fdff63a88e0895937ed9c535122ac2a73a069aa
b0aff14da16e18ea29381d0bd02eede1aafc8df1
/mtlbSci/macros/moc_accumarray.sci
c85b2c1070a621d20953da6599a077a5eca9b27d
[]
no_license
josuemoraisgh/mtlbSci
5d762671876bced45960a774f7192b41124a13ed
5c813ed940cccf774ccd52c9a69f88ba39f22deb
refs/heads/main
2023-07-15T23:47:11.843101
2021-08-26T17:52:57
2021-08-26T17:52:57
385,216,432
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,024
sci
moc_accumarray.sci
function A = moc_accumarray (subs, val, sz) // Create an array by accumulating the elements of a vector into the positions defined by their subscripts. // Calling Sequence // accumarray (subs, vals, sz) // Description // Create an array by accumulating the elements of a vector into the // positions defined by their subscripts. The subscripts are defined by // the rows of the matrix subs and the values by vals. Each row // of @var{subs} corresponds to one of the values in vals. // // The size of the matrix will be determined by the subscripts themselves. // However, if sz is defined it determines the matrix size. The length // of sz must correspond to the number of columns in subs. // // // Examples // nan_accumarray ([1,1,1;2,1,2;2,3,2;2,1,2;2,3,2], 101:105) // ans(:,:,1) = [101, 0, 0; 0, 0, 0] // ans(:,:,2) = [0, 0, 0; 206, 0, 208] // Authors // Copyright (C) 2007, 2008, 2009 David Bateman // Copyright (C) 2009 VZLU Prague // H. Nahrstaedt - 2010,2011 // // This file is part of Octave. // // Octave is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or (at // your option) any later version. // // Octave is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Octave; see the file COPYING. If not, see // <http://www.gnu.org/licenses/>. [nargout,nargin]=argn(0); if (nargin < 2 ) error("at least two parameters necassery!"); end if nargin<3 sz=[]; end ncol = size (subs,2); // Linearize subscripts. if (ncol > 1) if (isempty (sz)) sz = mtlb_max (subs, [], 1); elseif (ncol ~= max(size (sz))) error ("accumarray: dimensions mismatch") end // Convert multidimensional subscripts. subs = sub2ind (sz, subs); // creates index cache elseif (~ isempty (sz) & max(size (sz)) < 2) error("accumarray: needs at least 2 dimensions"); end // Some built-in reductions handled efficiently. // The general case. Reduce values. n = size (subs,1); if sum(size(val))==2 val = val(ones (1, n), 1); else val = val(:); end // Sort indices. [subs, idx] = mtlb_sort (subs); // Identify runs. jdx = find (subs(1:n-1) ~= subs(2:n)); jdx = [jdx(:); n]; val_ind=diff ([0; jdx]);val_tmp=val(idx);val=zeros(length(val_ind),1); for k=1:length(val_ind) val(k)=sum(val_tmp(sum(val_ind(1:k-1))+1:sum(val_ind(1:k)))); end subs = subs(jdx); // Construct matrix of fillvals. A = mtlb_zeros (sz); // Set the reduced values. for k=1:length(val) A(subs(k)) = val(k); end endfunction
04761de5a3f2164e62ddd8eacfbddf0af606672e
449d555969bfd7befe906877abab098c6e63a0e8
/2015/CH5/EX5.3.a/5_3a.sce
cd293f17838820d7056d9dc18e57663310cd94df
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
426
sce
5_3a.sce
clc //initialisation of variables R=0.2897 //kj/kgk g=1.4 t1=313 //temparature in k p1=20 //pressure in bar p2=13 //pressure im bar cp=1.0138 //kj/kgk a=5*10^-4 //CALCULATIONS rc=(2/(g+1))^(g/0.4) t2=t1*(p2/p1)^((g-1)/g) c2=44.72*(cp*(t1-t2))^(0.5) rho=p2*100/(R*t2) m=rho*c2*a //RESULTS printf('mass f;ow rate and velocity of air at exit are %2fkg/s and %2fkg/m*m*m',m,rho) //textbook answer slightly varies
ce1758ad657313e39adb35adf9c74a1f9d531a30
449d555969bfd7befe906877abab098c6e63a0e8
/2135/CH1/EX1.26/Exa_1_26.sce
370cfcd30657fd857200d628e91d31445808a375
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
304
sce
Exa_1_26.sce
//Exa 1.26 clc; clear; close; format('v',6); //Given Data : m=1;//Kg t=80;//degree C mw=10;//Kg t1=25;//degree C delta_t=5;//degree C t2=delta_t+t1;//degree C Sw=4.187;//Kj/KgK //m*S*(t-t2)=mw*Sw*(t2-t1) S=mw*Sw*(t2-t1)/m/(t-t2);//Kj/KgK disp(S,"Specific heat of metal in KJ/KgK : ");
78a74f097b5e19118af89e0cc2d8fcef32076f19
b29e9715ab76b6f89609c32edd36f81a0dcf6a39
/ketpicscifiles6/MixL.sci
daf5a2d95742c8413cbb20df844fcc1623e59de9
[]
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
179
sci
MixL.sci
// 08.05.19 // Structure changed // 09.10.11 function M=MixL(varargin) Nargs=length(varargin); M=list(); for I=1:Nargs Da=varargin(I); M(I)=Da; end endfunction
2ce1b4f56fa5ef59f07d3f9de2a8d152645440d9
449d555969bfd7befe906877abab098c6e63a0e8
/1673/CH9/EX9.6/9_6.sce
42d52bd1fad66de506d894d4a7adf7015176685d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
735
sce
9_6.sce
//bender-schmidt formula //example 9.6 //page 362 clc;clear;close; deff('y=f(x)','y=4*x-x^2'); u=[f(0) f(1) f(2) f(3) f(4)]; u11=(u(1)+u(3))/2; u12=(u(2)+u(4))/2; u13=(u(3)+u(5))/2; printf(' u11=%0.2f\t u12=%0.2f\t u13=%0.2f\t \n',u11,u12,u13) u21=(u(1)+u12)/2; u22=(u11+u13)/2; u23=(u12+0)/2; printf(' u21=%0.2f\t u22=%0.2f\t u23=%0.2f\t \n',u21,u22,u23) u31=(u(1)+u22)/2; u32=(u21+u23)/2; u33=(u22+u(1))/2; printf(' u31=%0.2f\t u32=%0.2f\t u33=%0.2f\t \n',u31,u32,u33) u41=(u(1)+u32)/2; u42=(u31+u33)/2; u43=(u32+u(1))/2; printf(' u41=%0.2f\t u42=%0.2f\t u43=%0.2f\t \n',u41,u42,u43) u51=(u(1)+u42)/2; u52=(u41+u43)/2; u53=(u42+u(1))/2; printf(' u51=%0.2f\t u52=%0.2f\t u53=%0.2f\t \n',u51,u52,u53)
04865a159e056367f05146686bef32a9eac08026
449d555969bfd7befe906877abab098c6e63a0e8
/1460/CH12/EX12.4/12_4.sce
7a0c1eabbba7fa708ac203eec7c1fd6aee94a7f4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
478
sce
12_4.sce
clc //initialization of variables P=14.7 //lb/in^2 T=80+460 //R //calculations disp("From steam tables,") Ps=0.5069 //lb/in^2 v=633.1 //ft^3/lbm Pair=P-Ps vair=53.3*T/(144*Pair) wair=1/(1+vair/v) wwater=vair/v/(1+vair/v) //results printf("Partial pressure of air = %.1f ft^3/lbm",Pair) printf("\n Partial pressure of water vapor = %.4f ft^3/lbm",Ps) printf("\n Gravimetric analysis of air = %.4f",wair) printf("\n Gravimetric analysis of water = %.4f",wwater)
e360bc28373a5588acf35b74aee60502cf60771f
4d37b8f3369f4a98da6003c783847ea22e1a9abe
/ASSIGNMENT1/GGAUSSIANELIMINATION.sce
3465289f9a061d58bbfb42c41ea470027df979eb
[]
no_license
Smrithik/SCILAB-ASSIGNMENT
0f201197eafc9f85237b74f2839d07991bec4411
4a98fae39024c3bb9238aa1097a959a5647da98b
refs/heads/master
2021-01-01T11:52:25.429933
2020-06-03T12:13:33
2020-06-03T12:13:33
239,266,390
0
0
null
null
null
null
UTF-8
Scilab
false
false
935
sce
GGAUSSIANELIMINATION.sce
//Gaussian Elimination for a generalized case A=input("Enter the coefficient matrix of nxn: ") b=input("Enter the constants matrix nx1: ") function [x]=gaussian_elimination(A, b) [a1,a2]=size(A);//n,n1 [b1,b2]=size(b);//m1,p if a1~=a2 error('Matrix A must be square'); abort; else if a1~=b1 error('Incompatible orders of A and b'); abort; end; Aug=[A b]; //forward elimination n=size(A,1); for k=1:a1-1 for i=k+1:a1 factor=A(i,k)/A(k,k); for j=k+1:a1 A(i,j)=A(i,j)-factor*A(k,j); end b(i)=b(i)-factor*b(k) end end //back substitution x(a1)=b(a1)/A(a1,a1); for i=a1-1:-1:1 sum=0; for j=i+1:a1 sum=sum+A(i,j)*x(j); end x(i)=(b(i)-sum)/A(i,i); end end endfunction
4b6bdd5fc20dd85aaa7e3a2ec2fb620d2aea0d77
449d555969bfd7befe906877abab098c6e63a0e8
/1332/CH22/EX22.2/22_2.sce
a3bf487f588ef164953993e118573a6aeebf911a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
596
sce
22_2.sce
//Example 22.2 //MLP //Page no. 758 clc;clear;close; deff('y=f(x)','y=x^3-x^2+x-1') printf('Input\t\tDesired\t\tNetwork\t\tError\n\t\t Output\t\t Output\n---------------------------------------------------------\n') in=[0.7572,0.7601,0.7620,1.4831,1.4874,1.4900,2.0913,2.0934,2.1006,2.8391,2.8496,2.8529,3.4555,3.4631,3.4654,4.1547,,4.1839,4.1874] n=[-0.3941,-0.3896,-0.3867,1.6054,1.6259,1.6391,5.8762,5.8969,5.9685,16.6462,16.8542,16.9188,31.7640,31.9928,32.0646,57.6220,58.9268,59.0866] for i=1:18 printf(' %.4f\t\t%.4f\t\t%.4f\t\t%.4f\n',in(i),f(in(i)),n(i),n(i)-f(in(i))) end
59abce16a8723f1ad14f580917e00acf8068633e
449d555969bfd7befe906877abab098c6e63a0e8
/779/CH1/EX1.5/1_5.sce
6ce681232cdbd5504a03de2e13336a74e3e63e9b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
1_5.sce
m = 68 ; // Astronaut mass in Kg g = 9.806; // Acceleration due to gravity in m/s2 a = 10*g ; // Lift off acceleration in m/s2 F = m*a; // Net vertical force in N disp("N",F,"Net vertical force experienced by astronaut is")
ca2e81f7a35df09c4b23472c1c5a0f6bdc752292
449d555969bfd7befe906877abab098c6e63a0e8
/3843/CH12/EX12.4/Ex12_4.sce
6d69c4d4abc3a403596ed66ed53bd0f4a107ed80
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
725
sce
Ex12_4.sce
// Example 12_4 clc;funcprot(0); // Given data // The volumetric analysis of the products on dry basis CO_2=10.4// % CO=1.2;// % O_2=2.8;// % N_2=85.6;// % // Calculation // The chemical equation is C_aH_b+c(O_2+3.76N_2)-->10.4CO_2+1.2CO+2.8O_2+85.6N_2+dH_2O // Balancing each element, a=10.4+1.2;// (C) c=85.6/3.76;// (N) d=(2*c)-(20.8+1.2+5.6);// (O) b=2*d;// (H) printf("\nThe chemical formula for the fuel is C_%2.1fH_%2.1f",a,b); // The find the percent theoretical air from the actual chemical equation, C_11.6H_37.9+21.08(O_2+3.76N_2)-->11.6CO_2+18.95H_2O+79.26N_2 c_act=21.08; P_ta=(c/c_act)*100;// The percent theoretical air in % printf("\nThe percent theoretical air=%3.1f percentage",P_ta);
c010795a64625ed7c6ef507504b2c9636e38c777
449d555969bfd7befe906877abab098c6e63a0e8
/1571/CH4/EX4.27/Chapter4_Example27.sce
6ff21480fab7bd2d04fbfd265b99e85bda5e7eab
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
363
sce
Chapter4_Example27.sce
clc clear //INPUT m=6*10^-24;//mass of the helium atom in gm k= 1.38*10^-16;//boltzmann constant in erg t1=100;//temperature in K t2=900;//temperature in K //CALCULATIONS r=(t1/t2)^(3/2)*(2.7183^(m*(1/(2*k))*10^8*(1-(1/9))));//fractional change in the no.of helium atoms //OUPUT mprintf('the fractional change in the no.of helium atoms %3.4f',r)
f1fc530ecacf82bdde50dc8a8685ed2d79e66e45
bbf1ae079309eca11270422d3f0d259d1515d430
/numerical-tours/matlab/toolbox_graph/read_off.sci
c557ea27e24ad654ef6650c4bd5d2c5c5a8e5b31
[ "BSD-2-Clause" ]
permissive
ZichaoDi/Di_MATLABTool
5e6a67b613c4bcf4d904ddc47c2744b4bcea4885
c071291c63685c236f507b2cb893c0316ab6415c
refs/heads/master
2021-08-11T07:28:34.286526
2021-08-04T18:26:46
2021-08-04T18:26:46
149,222,333
9
5
null
null
null
null
ISO-8859-1
Scilab
false
false
1,074
sci
read_off.sci
function [vertex,face] = read_off(filename) // read_off - read data from OFF file. // // [vertex,face] = read_off(filename); // // 'vertex' is a 'nb.vert x 3' array specifying the position of the vertices. // 'face' is a 'nb.face x 3' array specifying the connectivity of the mesh. // // Copyright (c) 2003 Gabriel Peyré fid = mopen(filename,'r'); if( fid==-1 ) error('Can''t open the file.'); return; end // str = fgets(fid); // -1 if eof [cnt,str] = mfscanf(1, fid,'%s'); if 0 // ~strcmp(str(1:3), 'OFF') error('The file is not a valid OFF one.'); end [cnt,nvert,nface,u] = mfscanf(1, fid, '%d %d %d'); // read vertices [cnt,vertex] = mfscanf(nvert*3, fid,'%f'); if length(vertex)~=3*nvert warning('Problem in reading vertices.'); end vertex = matrix(vertex,3,nvert); // read Face 1 1088 480 1022 [cnt, face] = mfscanf(nface*4, fid, '%d'); if length(face)~=4*nface warning('Problem in reading faces.'); end face = matrix(face, 4, nface); face = face(2:4,:)+1; mclose(fid); endfunction
17dff99279eb30a6290069c0d2fbd143a4c3b135
449d555969bfd7befe906877abab098c6e63a0e8
/3428/CH22/EX14.22.3/Ex14_22_3.sce
ff82814221aae76e9d0fb422183ef2193f2371f9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
344
sce
Ex14_22_3.sce
//Section-14,Example-2,Page no.-PC.50 //To calculate the height to which liquid B rises. clc; //(y_B/y_A)=(h_B*d_B)/(h_A*d_A) h_A=0.01 //m d=1/2 //d=d_A/d_B y=1/2 //y=y_A/y_B h_B=h_A*d*y //m disp(h_B,'The height to which liquid B rises(m)')
a60dc895ef9bdb7b2922574dbd71ca063152b1f2
449d555969bfd7befe906877abab098c6e63a0e8
/1898/CH13/EX13.11/Ex13_11.sce
1139abcf7de2da807d3155311c1e448687bcdc3e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex13_11.sce
clear all; clc; disp("Scilab Code Ex 13.11 : ") //Given: P = 20*10^3; //N y1 = 150; //mm x1 = 40; //mm A = (x1*y1); d = 40; K = 1; //Eqn 13.29 L2 = (3718*A*d^2)/(P); L = sqrt(L2); KL_d = (K*L)/(d); if(KL_d>26 & KL_d<=50) printf('\n\nThe greatest allowable length L as specified by the NFPA = %1.0f mm',L); end //------------------------------------------------------------------------END-----------------------------------------------------------------------------
b7fc1f0e767ecb0bb4f00b799fd1432642f38e67
449d555969bfd7befe906877abab098c6e63a0e8
/3819/CH3/EX3.27/Ex3_27.sce
a6e4565e0a102f1295f69e45467473da0d6a08e3
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,297
sce
Ex3_27.sce
// A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal // Chapter 3-Hydrostatic Forces on surfaces // Problem 3.27 //Data given in the Problem dens=1000 g=9.81 d=4 r=2 //Calculations A1=d*r h=d/2 F_x1=dens*g*A1*h W_ABCOA=dens*g*%pi/2*r^2*2 F_y1=W_ABCOA //Right side of cylinder A2=r*2 h2=r/2 F_x2=dens*g*A2*h2 W_DOCD=dens*g*%pi/4*r^2*r F_y2=W_DOCD //Net Force F_x_net=F_x1-F_x2 F_y_net=F_y1+F_y2 //F=net pressure F=(F_x_net^2+F_y_net^2)^0.5 theta =(atan(F_y_net/F_x_net))/%pi*180 mprintf("The resultant Force is %f N at an angle of %f degrees \n",F,theta) //Location of resultannt force //for position of F_x.... //F_x1 acts at r*d/3=2.67 and F_x2 acts at r*2/3=1.33 m from free surface on right of cylinder y=(F_x1*(d-2.67)-F_x2*(r-1.33))/F_x_net //F_x_net acts at at y metres from bottom //F_y1 acts at 4R/(3pi) from AOC=0.8488 //F_y2 also acts at 4R/(3pi) from AOC=0.8488 towards right side x=(F_y1*0.8488-F_y2*0.8488)/F_y_net //F_y_net acts at at x metres from bottom mprintf("F_y net acts at %f m from AOC and F_x_net acts at %f m from bottom \n",x,y) //Least weight of culinder //net upward force should be the least weight of the cylinder hence,W_least=F_y_net mprintf("the Least weight of the cylinder is %f N\n",F_y_net)
071f107b2ec8df6fe8b8e7d14427d93d23a058e7
d2b4190265ddc2ddd6f63bacfdafae9504390fd0
/EulerMethod.sce
dd2196b8e26ee9410af238fd902deae8728d031f
[]
no_license
santushtisharma10/AppliedMathematics_with_Scilab
8dd80f3a36298d844a42a37619e309b53022204d
28b4de4244768c0bb0eba1daea86d69021d89400
refs/heads/main
2023-05-29T04:40:42.507269
2021-06-04T13:25:58
2021-06-04T13:25:58
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
277
sce
EulerMethod.sce
//Program to solve the equation y'=f(x,y); y(x0)=0 for y(xn) using Euler's method clc; clear; close; deff('z=f(x,y)','z=(y-x)/(y+x)') x0=0; y0=1; xn=0.1; h=0.02; x=x0; y=y0; while x~=xn y=y+h*f(x,y); x=x+h; printf('\nWhen x=%g,y=%g\n',x,y); end
327d0303e08336880057eb4552b3347293dc532a
f8bb2d5287f73944d0ae4a8ddb85a18b420ce288
/Scilab/step(p,pi,pid).sce
e275d360cc78fd562427463f5dede40b80476736
[]
no_license
nishizumi-lab/sample
1a2eb3baf0139e9db99b0c515ac618eb2ed65ad2
fcdf07eb6d5c9ad9c6f5ea539046c334afffe8d2
refs/heads/master
2023-08-22T15:52:04.998574
2023-08-20T04:09:08
2023-08-20T04:09:08
248,222,555
8
20
null
2023-02-02T09:03:50
2020-03-18T12:14:34
C
UTF-8
Scilab
false
false
590
sce
step(p,pi,pid).sce
s = %s; t = 0:0.01:15; L = 0.5; G0 = 1/((s+1)*(s+4)); DelayN = 1-(L/2)*s+(1/10)*(L*s)^2-(1/120)*(L*s)^3; DelayD = 1+(L/2)*s+(1/10)*(L*s)^2+(1/120)*(L*s)^3; Delay = DelayN/DelayD; G = Delay*G0; Le = 0.6;Re = 1.56; Cp = 1/(Re*Le); Tcp = G*Cp/(1+G*Cp); sysp = syslin('c',Tcp); yp = csim("step",t,sysp); Cpi = 0.9/(Re*Le)*(1+1/(3.3*Le*s)); Tcpi = G*Cpi/(1+G*Cpi); syspi = syslin('c',Tcpi); ypi = csim("step",t,syspi); Cpid = 1.2/(Re*Le)*(1+1/(2*Le*s)+0.5*Le*s); Tcpid = G*Cpid/(1+G*Cpid); syspid = syslin('c',Tcpid); ypid = csim("step",t,syspid); clf();plot2d(t,yp) plot2d(t,ypi) plot2d(t,ypid)
742a5aa8ff14f0b045e70b858f4ae38d6f9a8707
a6e16f8b4e3e9dfb7a8b6f323b7e35fb82537222
/C/Pascal Fellerich/PAULA/VER_2_6+/SYSTEM.TST
2562b9faa1984d64d679951b9568a37d2faa20b3
[]
no_license
pjones1063/Atari_ST_Sources
59cd4af5968d20eb3bf16836fc460f018aa05e7c
fe7d2d16d3919274547efbd007f5e0ec1557396d
refs/heads/master
2020-09-04T20:21:44.756895
2019-10-30T12:54:05
2019-10-30T12:54:05
219,878,695
2
0
null
2019-11-06T00:40:39
2019-11-06T00:40:39
null
ISO-8859-1
Scilab
false
false
21,109
tst
SYSTEM.TST
************************************************************************* * * SYSTEM.S * -------- * * MODPlayer low level routines: Hardware accesses etc. * * * * last modified: 13-Jan-1993 * 14-sep-1994 (tas -> bset) ************************************************************************* include "pdefs.inc" SOFTDMA_COOKIE equ 'SSND' SOFTDMA_MAGIC equ 'CLPF' ; ----------------------------------------------------------------------- ; Globals: ; ----------------------------------------------------------------------- ; ; exported subroutines: ; xdef p_global_init xdef acc_malloc ; special malloc for ACC's xdef alloc_fast_ram xdef free_memory xdef init_DMA_sound, exit_DMA_sound xdef check_sound_running xdef supexec xdef read_cookie ; ; exported variables: ; xdef has_DMA_sound ;charflag xdef has_68020 ;charflag xdef softdma_interface ;Pointer! xdef sdmabufadr1,sdmabufadr2 ; ; imported subroutines: ; xref mt_music ;vbl seq. xref Paula ;chip emulator xref SoftPaula ;softdma interface xref calc_voltab ; ; imported variables: ; xref AudioFrameSize ;from synth.s xref voltabP xdef LeftBuffer, RightBuffer xref p_interpolate ;from player.s xref p_overload xref p_cpuload xref p_state xref p_boost xref p_samplefreq xref paula_frequencies ; ----------------------------------------------------------------------- ; internally used defines: ; ----------------------------------------------------------------------- INTBIT equ 7 ;Port 7 interrupt PCM_VECTOR equ $013C ;associated MFP vector HBL_VECTOR equ $0068 ;Autovector IRQ. IERA equ $FFFFFA07 ;MFP Registers IERB equ $FFFFFA09 IPRA equ $FFFFFA0B IPRB equ $FFFFFA0D ISRA equ $FFFFFA0F ISRB equ $FFFFFA11 IMRA equ $FFFFFA13 IMRB equ $FFFFFA15 * STE/TT DMA SOUNDCHIP: SDMACNTR equ $FFFF8900 FRMBASEHI equ $FFFF8902 FRMBASEMID equ $FFFF8904 FRMBASELO equ $FFFF8906 FRMCNTHI equ $FFFF8908 FRMCNTMID equ $FFFF890A FRMCNTLO equ $FFFF890C FRMENDHI equ $FFFF890E FRMENDMID equ $FFFF8910 FRMENDLO equ $FFFF8912 SMODCNTR equ $FFFF8920 MWDATA equ $FFFF8922 MWMASK equ $FFFF8924 XB_MAGIC equ -12 XB_ID equ -8 XB_OLDVEC equ -4 XB_CODE equ 0 ; ----------------------------------------------------------------------- ; Code ; ----------------------------------------------------------------------- text super ;MUST use SuperMode! ;STE mit 8.0106 MHz: ; dc.w 6258,12517,25033,50066; (ste) ;TT mit 32.215905 MHz: tt_paula_frequencies: dc.w 6292,12584,25167,50337 ;(tt) ;Falcon030 mit neuem Soundsubsystem 25.175 MHz: falcon_paula_frequencies: dc.w 6146,12292,24585,49170 ;(falcon030) * * p_global_init: initialisiert den Player, alloziert Speicher. * Param: keine * Return: Fehlercode * p_global_init: movem.l d3-d7/a2-a6,-(sp) move.l a0,basepage ;Bpage Pointer merken lea getsys(pc),a0 bsr supexec ;Systemdaten lesen tst.b has_DMA_sound ;STE DMA vorhanden? beq .no_dmasound ;nein -> kein ST ram alloc clr.l softdma_interface ;du nicht! move.w machine_type(pc),d0 ;Welche Maschine? lea tt_paula_frequencies(pc),a0 cmpi.w #2,d0 ;TT: h”her! beq.s .setfreq lea falcon_paula_frequencies(pc),a0 cmpi.w #3,d0 ;Falcon: niedriger bne.s .skip .setfreq: lea paula_frequencies(pc),a1 move.l (a0)+,(a1)+ move.l (a0)+,(a1)+ .skip: move.l #BUFFERSIZE,d0 clr.w -(sp) ;Modus 0: ST-Ram only move.l d0,-(sp) ;Amount move.w mxalloc(pc),-(sp) ;Mxalloc trap #1 addq.w #8,sp tst.l d0 spl can_work bmi.s .noplayer ;ohne ST Ram kein Player ! addq.l #3,d0 andi.w #$FFFC,d0 ;LongWord aligned for TT! movea.l d0,a0 lea buffer1(a0),a1 ;Erster Puffer move.l a1,sdmabufadr1 lea buffer2(a0),a1 move.l a1,sdmabufadr2 .softentry: tst.b has_68020 ;Volume Table n”tig?? bne.s .novoltab move.l #TOGGLEVOLUME*256,d0 bsr fm_alloc ;returns addr in a0 & d0 move.l d0,voltabP bsr calc_voltab .novoltab: moveq #E_OK,d0 .globlin1: clr.w p_state ;Idle State movem.l (sp)+,d3-d7/a2-a6 rts .noplayer: moveq #E_FRAMEBUFFER,d0 bra.s .globlin1 .no_dmasound: move.l softdma_interface(pc),d0 ;Christians DMA Emulator? sne can_work ;dann drfen wir! beq.s .no_dmasound2 movea.l d0,a1 ; move.l #PaulaHook,SDMA_HOOK(a1) ;Anmelden! lea paula_frequencies(pc),a0 ;our samplefreqs move.l SDMA_SF0(a1),(a0)+ move.l SDMA_SF2(a1),(a0)+ bra.s .softentry ;weiter .no_dmasound2: moveq #E_DMASOUND,d0 ;ansonsten fehler! bra.s .globlin1 supexec: pea (a0) move.w #38,-(sp) trap #14 addq.l #6,sp rts getsys: lea fstacktop(pc),a0 move.l a0,d0 andi.w #$FFFC,d0 ;Stack auf longwords move.l d0,faststack sf has_DMA_sound ;Annahme: kein DMA sound sf has_68020 ;Annahme: 68000 movea.l _sysbase.w,a0 move.l $28(a0),os_act_pd ;systemvektor fr sp„ter cmpi.w #$0205,2(a0) ;OS-Version bge.s .istos3 move.w #Malloc,mxalloc ;Extended Alloc Call OK?! .istos3: movea.l _p_cookies.w,a0 ;Cookie move.l a0,d0 beq.s .get_end ;kein Cookiejar -> Abbruch .readjar: move.l (a0)+,d0 ;Cookie holen beq.s .get_end ;fertig. move.l (a0)+,d1 ;Value holen cmpi.l #'_CPU',d0 ;Prozessortyp? beq.s .getproc cmpi.l #'_SND',d0 ;Soundhardware? beq.s .getsnd cmpi.l #'_MCH',d0 ;Maschinentyp? beq.s .getmachine cmpi.l #SOFTDMA_COOKIE,d0 ;SoftSound?? beq.s .softsound cmpi.l #'MiNT',d0 ;MTOS / MiNT? beq.s .isMiNT bra.s .readjar .get_end: rts .getproc: cmpi.w #20,d1 ;op d'manst ‚n 68020! sge has_68020 ;020/030 Flag bra.s .readjar .getsnd: btst #1,d1 sne has_DMA_sound ;OK! bra.s .readjar ;DMA Soundchip vorhanden .getmachine: swap d1 ;get highword move.w d1,machine_type bra.s .readjar .isMiNT: clr.l basepage ;Kein Basepage gefummels bra.s .readjar .softsound: movea.l d1,a1 cmpi.l #SOFTDMA_MAGIC,(a1) ;gltig? bne.s .readjar move.l d1,softdma_interface ;Pointer zu SoftDma merken. bra.s .readjar * * Mxalloc, FASTRAM preferred (fr Programm und Daten) * Param.: d0.l Anzahl Bytes die verlangt werden * Return: d0.l & a0 Startadresse acc_malloc: ;PureC Interface move.l a2,-(sp) bsr alloc_fast_ram movea.l (sp)+,a2 rts alloc_fast_ram: move.l basepage(pc),d1 ;Verbiegerei NICHT unter MiNT oder beq.s is_applic ;als Programm! move.l a3,-(sp) movea.l os_act_pd(pc),a3 ;Zeiger auf Processpointer move.l (a3),-(sp) ;retten move.l d1,(a3) ;meine Basepage, ich bin der Owner! bsr.s fm_alloc move.l (sp)+,(a3) ;os_act_pd zurcksetzen movea.l (sp)+,a3 rts is_applic: fm_alloc: move.w #3,-(sp) ;Modus 3 move.l d0,-(sp) ;Amount move.w mxalloc(pc),-(sp) ;Mxalloc trap #1 addq.w #8,sp movea.l d0,a0 rts * * Speicherblock freigeben: * * Param.: d0: Blockadresse free_memory: move.l a2,-(sp) tst.l d0 beq.s freem1 move.l d0,-(sp) move.w #Mfree,-(sp) trap #1 addq.w #6,sp freem1: movea.l (sp)+,a2 rts ;--------------------------------- cookie jar ------------------ ; Deklaration in C: ; int read_cookie(long ID, long *ret); ; ; ID: Cookie Jar Identifier. ; *ret: return value ; Funktion gibt 1 (TRUE) oder 0 (FALSE) zurck. ; read_cookie: ;fr'n Linker! movem.l d3/a2-a3,-(sp) move.l d0,d3 ;ID retten movea.l a0,a3 ;Returnpointer lea getpointer(pc),a0 bsr supexec tst.l d0 ;Pointer? beq.s no_cookiejar btst #0,d0 ;odd? bne.s no_cookiejar movea.l d0,a0 ;Pointer seems OK check_next: move.l (a0)+,d1 ;Cookie ID beq.s cookie_not_found move.l (a0)+,d2 ;entry cmp.l d1,d3 ;gesuchtes Objekt? bne.s check_next move.l d2,(a3) ;dem User das Objekt bergeben moveq #TRUE,d0 bra.s cookie_exit cookie_not_found: no_cookiejar: moveq #FALSE,d0 cookie_exit: movem.l (sp)+,d3/a2-a3 rts getpointer: move.l _p_cookies.w,d0 rts ********************************************************************** * XBRA - UTILITIES * * sollten im Supermode aufgerufen werden, ->BUS ERROR * ********************************************************************** ******************************************************************************** * Xb_install: fge neuen XBRA Teilnehmer in eine Vektorliste ein * * Param: a0: Vektor (&root, zeiger auf Liste!) * * a1: Pointer auf zu installierende Routine, Header erforderlich * * Ret: d0: -1 bei Fehler (bsp: Doppelinstallation) * * 0 wenn OK + FLAGS!! * * Reg's: d0-d2,a0-a2 * ******************************************************************************** Xb_install: cmpi.l #'XBRA',XB_MAGIC(a1) ;Routine braucht einen Header! bne.s Xb_error movea.l a0,a2 ;save vector move.l XB_ID(a1),d0 ;Identifier pea (a1) ; &routine bsr.s Xb_find ;Suche ihn movea.l (sp)+,a1 bpl.s Xb_error ;und vermeide Doppelinstallation move.l (a2),XB_OLDVEC(a1) ;Flle Header aus (erst hier!) move.l a1,(a2) ;insert into list moveq #0,d0 ;OK rts ******************************************************************************** * Xb_remove: entferne einen XBRA Teilnehmer aus einer Liste * * Param: a0: vector (&root) * * d0: XB_ID des Todeskandidaten * * Ret: d0: -1 bei Fehler (nicht gefunden) * * >=0 wenn OK (Verschachtelungstiefe) * * Regs: d0-d2/a0-a1 * ******************************************************************************** Xb_remove: bsr.s Xb_find ;suchen bmi.s Xb_error ;nicht vorhanden beq.s Xb_remv ;Root Level, erstes Listenelement move.l XB_OLDVEC(a0),XB_OLDVEC(a1) ; prev->oldvec=xbra->oldvec bra.s Xb_remv1 Xb_remv: move.l XB_OLDVEC(a0),(a1) ; root=xbra->oldvec Xb_remv1: clr.l XB_OLDVEC(a0) rts Xb_error: moveq #-1,d0 rts ******************************************************************************** * Xb_find: suche einen XBRA-Teilnehmer * * Param: a0: vector (&root der Liste) * * d0: XB_ID des Kandidaten * * Ret: d0: -1 : Fehler - nichts gefunden * * >=0 : Verschachtelungstiefe an der Fundstelle * * a0: xbra (Adresse der gefundenen XBRA-Struktur) * * a1: parent (Adresse der vorherigen XBRA-Struktur) oder &root * * &root nur wenn Verschachtelungstiefe==0 * * Regs: d0-d2,a0-a1 * ******************************************************************************** Xb_find: move.l d0,d1 movea.l a0,a1 ; parent=root; movea.l (a0),a0 ; xbra=*root; moveq #0,d2 ; level=0; bra.s Xb_find2 Xb_find1: addq.w #1,d2 ; level++; movea.l a0,a1 ; parent=xbra; movea.l XB_OLDVEC(a0),a0 ; xbra=xbra->oldvec; Xb_find2: bsr.s Xb_check ; while ( (check(xbra)) bne.s Xb_error ; && cmp.l XB_ID(a0),d1 ; (xbra->magic!=mymagic) bne.s Xb_find1 ; ); move.w d2,d0 ;gefunden! rts ******************************************************************************** * Xb_check: teste die in a0 spezifizierte XBRA Struktur * * Param: a0: &xbra (Zeiger auf XBRA Struktur) * * Ret: d0: 0 = XBRA, -1: no xbra * * Flags: EQ = XBRA * * Regs: d0 * ******************************************************************************** Xb_check: move.l a0,d0 ;Teste diese Struktur btst #0,d0 ;Ungerade? bne.s Xb_error cmp.l #$0100,d0 ;NICHT in den Systemvektoren! blt.s Xb_error ;Sicherheitshalber cmpi.l #'XBRA',XB_MAGIC(a0) ;hoffentlich keine Bomben ! bne.s Xb_error moveq #0,d0 rts ;--------------------------------------------------------------- * * softy-routinen: * * * Hauptroutine: * PaulaHook: movem.l d3-d7/a2-a6,-(sp) move.l sp,savestack movea.l faststack(pc),sp ;use own stack (32 bit fastram) lea p_overload(pc),a0 subq.w #1,(a0) bpl.s .domusic clr.w (a0) .domusic: bsr mt_music ; not.w frameflag ;Pufferumschaltung bne.s .setbuf2 ;N„chster puffer ist Nummer 2 .setbuf1: lea LeftBuffer(pc),a0 ;Frame 1 berechnen bsr SoftPaula ;Chip Emulator lea LeftBuffer(pc),a0 ;und Frame 1 setzen! bra.s .setbuf .setbuf2: lea RightBuffer(pc),a0 ;Frame 2 berechnen bsr SoftPaula lea RightBuffer(pc),a0 ;Adresse des 2ten Puffers .setbuf: move.w AudioFrameSize(pc),d1 ;L„nge des Puffers exg d0,d1 ;bitsize kommt korrekt zurck. move.l softdma_interface(pc),a1 move.w p_boost(pc),SDMA_BOOST(a1) move.l SDMA_SETFRAME(a1),a1 jsr (a1) movea.l savestack(pc),sp movem.l (sp)+,d3-d7/a2-a6 ;ab hier wieder reentrant rts * * new init: * softdma_init: movea.l d0,a0 movea.l SDMA_INIT(a0),a1 move.l #PaulaHook,SDMA_HOOK(a0) lea LeftBuffer(pc),a0 ;erster (Mono-)Puffer clr.w frameflag ;current running buffer! move.w AudioFrameSize,d0 ;L„nge der Daten moveq #0,d1 ;Range = 0 bit :-) move.w p_samplefreq(pc),d2 ;Diese Frequenz... jmp (a1) ;jsr/rts * * new exit: * softdma_exit: movea.l d0,a0 movea.l SDMA_EXIT(a0),a1 jmp (a1) ;stop it. * * Testroutine zum evtl. Anschmeissen des Sounds nach Fremd-Abbruch * * check_sound_running: move.l softdma_interface(pc),d0 bne.s .nocheck ;Nicht fr's SoftDMA! btst #0,SDMACNTR+1.w ;DMA running? beq.s relaunch_dma .nocheck: rts * * Routinen zum Starten/Stoppen des Chips * - supervisor mode erforderlich * init_DMA_sound: move.l softdma_interface(pc),d0 bne.s softdma_init andi.w #!%11,SDMACNTR.w ;Stop DMA & Repeat relaunch_dma: btst #INTBIT,gpip.w ;Monitor Type ? bne.s m_high bclr #INTBIT,aer.w bra.s m_cont m_high: bset #INTBIT,aer.w m_cont: lea HBL_VECTOR.w,a0 ; sound synthesizer... lea HBL_interrupt(pc),a1 bsr Xb_install ; ignore errors! lea Sound_interrupt(pc),a0 move.l a0,PCM_VECTOR.w ;Set the Exception Vector bclr #INTBIT,IPRA.w ;MFP_PendA.w bset #INTBIT,IMRA.w ;Mask 'Sound Active' interupt. bset #INTBIT,IERA.w ;Enable 'Sound Active' interupt move.b p_samplefreq+1(pc),SMODCNTR+1.w ;Chip Mode Control movea.l sdmabufadr1(pc),a0 ;Adresse des 1ten Puffers bsr SetFrame clr.w frameflag ;current running buffer! ori.w #%11,SDMACNTR.w ;chipstart! rts exit_DMA_sound: move.l softdma_interface(pc),d0 bne softdma_exit move sr,-(sp) ;Except. #24: spurious interrupt ori #$700,sr ;hope it helps... andi.w #!%10,SDMACNTR.w ;DMA Repeat aus bclr #INTBIT,IERA.w ;weitere Irq's unterdrcken clr.l PCM_VECTOR.w ;Vektor zurcksetzen clr.w p_cpuload ;Indikator l”schen clr.w p_overload lea HBL_VECTOR.w,a0 ; sound synthesizer... move.l #'PAUL',d0 ; ID to remove bsr Xb_remove ; ignore errors! move (sp)+,sr rts * * interrupt overlapping... * overlap: bclr #INTBIT,ISRA.w ;End Of Interrupt -> wg. IKBD irq move.w #OVERTICKS,p_overload ;25 irq's = 0.5 sec move.w AudioFrameSize(pc),p_cpuload ;--- call song data interpreter (although overload...) movem.l d0-a6,-(sp) bsr mt_music movem.l (sp)+,d0-a6 rte ********************************************************************** * * INTERRUPT-ROUTINE, ALLE 20 MSEC AUFZURUFEN! * * dc.l 'XBRA','PAUL',0 Sound_interrupt: bset.b #7,interrupt_pending bne.s overlap ;HORROR: berlappende IRQ's!!!! bclr #INTBIT,ISRA.w ;End Of Interrupt -> wg. IKBD irq andi.w #$F8FF,(sp) ;irq level 0 rte ;END of high-priority interrupt ; ; Hooked before HBL irq: ; dc.l 'XBRA','PAUL',0 HBL_interrupt: ori #$300,sr movem.l d0-a6,-(sp) ;**** !!!!! NON REENTRANT CODE !!!!! **** move.l sp,savestack movea.l faststack(pc),sp ;use own stack (32 bit fastram) tst.w p_overload ble.s .peak_load subq.w #1,p_overload ;decrement overload .peak_load: not.w frameflag ;Pufferumschaltung bne.s .setbuf2 ;N„chster puffer ist Nummer 2 .setbuf1: movea.l sdmabufadr1(pc),a0 ;Frame 1 berechnen bsr Paula ;Chip Emulator move.l sdmabufadr2(pc),d2 movea.l sdmabufadr1(pc),a0 ;und Frame 1 setzen! bra.s .setbuf .setbuf2: movea.l sdmabufadr2(pc),a0 ;Frame 2 berechnen bsr Paula move.l sdmabufadr1(pc),d2 movea.l sdmabufadr2(pc),a0 ;Adresse des 2ten Puffers .setbuf: move.l d2,-(sp) ;save sdmabufadr... bsr SetFrame ;--- call song data interpreter --------; bsr mt_music ; ;---------------------------------------; ; Rechenzeitverbrauch messen! lea FRMCNTHI.w,a0 ;Chipregister movep.l -1(a0),d1 ;akt. Adresse auslesen sub.l (sp)+,d1 ;im Lowword Differenz! lea p_cpuload(pc),a6 add.w d1,(a6) lsr.w (a6) ;/2 ;-- ok! -- movea.l savestack(pc),sp movem.l (sp)+,d0-a6 ;ab hier wieder reentrant sf interrupt_pending ; jump to original HBL handler: move.l (HBL_interrupt-4)(pc),-(sp) rts ; rte * ***************************************************************************** * * Setze n„chsten Abspielbereich: von a0 bis a1; * Param: a0: FrameStart * Return: void * Global: FrameSize is read from AudioFrameSize! * SetFrame: move sr,d0 ori #$0700,sr pea (a0) move.b 3(sp),FRMBASELO+1.w move.b 2(sp),FRMBASEMID+1.w move.b 1(sp),FRMBASEHI+1.w ;Start des Frames move.w AudioFrameSize(pc),d1 adda.w d1,a0 ;Stereo: L & R ! adda.w d1,a0 move.l a0,(sp) move.b 3(sp),FRMENDLO+1.w move.b 2(sp),FRMENDMID+1.w move.b 1(sp),FRMENDHI+1.w ;Ende des Frames addq.l #4,sp move d0,sr rts ; ----------------------------------------------------------------------- ; initialized variables ; ----------------------------------------------------------------------- data mxalloc: dc.w Mxalloc ; ----------------------------------------------------------------------- ; variables ; ----------------------------------------------------------------------- bss faststack: ds.l 1 ;Eigener Stackbereich! savestack: ds.l 1 sdmabufadr1: ds.l 1 ;Adresse der Framebuffer fr den D/A-Wandler sdmabufadr2: ds.l 1 ;es sind 2 wegen Double buffering technik os_act_pd: ds.l 1 ;Zeiger auf den act_pd vektor basepage: ds.l 1 ;Zeiger auf eigene BasePage last_freqtabcheck: ds.l 1 ;Letzte berechnete Samplingfrequenz softdma_interface: ds.l 1 ;DMA Emulator? frameflag: ds.w 1 ;Welcher Puffer gerade gespielt wird machine_type: ds.w 1 ;Maschinentyp aus Cookie Jar (_MCH) has_DMA_sound: ds.b 1 has_68020: ds.b 1 ;>'020!! can_work: ds.b 1 ;gesetzt wenn Arbeit m”glich... interrupt_pending: ds.b 1 ;seeeehhhr wichtig even ds.l FSTACK ;interner Stack fstacktop: ds.l 1 ; ----------------------------------------------------------------------- ; end of file ; -----------------------------------------------------------------------
737a246b81aa2e30c34499d4a1b75689e22f7d99
449d555969bfd7befe906877abab098c6e63a0e8
/273/CH13/EX13.6/ex13_6sce.sce
3c1d654d0cb3a08e9ae2c3245cf417609ed0de52
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
450
sce
ex13_6sce.sce
clc;clear; //Example 13.6 //calculation of de Broglie wavelength //1)given values e=1.6*10^-19; h=6.626*10^-34;//Planck's constant in Js V=182;//potential difference in volts m=9.1*10^-31;//mass of e in kg //1)calculation l=h/sqrt(2*e*m*V); disp(l,'de Brogliewavelength (in m)is'); //2)given values m1=1;//mass of object in kg v=1;//velocity of object in m/s l1=h/(m1*v); disp(l1,'debrogie wavelength of object in m) is');
1d117206b7533160bca11c1fc7dc4efc48c2d02a
449d555969bfd7befe906877abab098c6e63a0e8
/405/CH10/EX10.7/10_7.sce
66503453b027d07e507e55aaea4d46ec2074a496
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,312
sce
10_7.sce
clear; clc; printf("\t\t\tExample Number 10.7\n\n\n"); // cross flow exchanger with one fluid mixed // Example 10.7 (page no.-537) // solution m_dot = 5.2;// [kg/s] mass flow rate T1 = 130;// [degree celsius] temperature of entering steam T2 = 110;// [degree celsius] temperature of leaving steam t1 = 15;// [degree celsius] temperature of entering oil t2 = 85;// [degree celsius] temperature of leaving oil c_oil = 1900;// [J/kg degree celsius] heat capacity of oil c_steam = 1860;// [J/kg degree celsius] heat capacity of steam U = 275;// [W/square meter degree celsius] overall heat transfer coefficient //the total heat transfer may be obtained from an energy balance on the steam q = m_dot*c_steam*(T1-T2);// [W] // we can solve for the area from equation (10-13). the value of dT_m is calculated as if the exchanger were counterflow double pipe,thus dT_m = ((T1-t2)-(T2-t1))/log((T1-t2)/(T2-t1));// [degree celsius] // t1,t2 is representing the unmixed fluid(oil) and T1,T2 is representing the mixed fluid(steam) so that: // we calculate R = (T1-T2)/(t2-t1); P = (t2-t1)/(T1-t1); // consulting figure 10-11(page no.-534) we find F = 0.97; // so the area is calculated from A = q/(U*F*dT_m);// [square meter] printf("surface area of heat exchanger is %f square meter",A);
e5ac9eafbb79803f788d4ffec168f6baf2a41714
449d555969bfd7befe906877abab098c6e63a0e8
/3547/CH8/EX8.2/EX8_2.sce
0034684d1ab9cf26abf623973e3809159e669687
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,494
sce
EX8_2.sce
// Example 8.1 // Compuatation of error probability if the receiver is (a) a balanced homodyne or (b) a balanced heterodyne // Page no. 354 clc; clear; close; // Given data Po=5; // Lunch peak power fl=50; // Fiber loss G=30; // Preamplifier Gain f=10*10^9; n=1.5; h=6.63*10^-34; // Planck constant c=3*10^8; // Velocity of light lambda=1550*10^-9; q=1.6*10^-19; // Electron charge R=0.9; // Signal calculation Pr=Po-fl+G; Pr=10^(Pr/10)*10^-3; Tb=1/(f); E=Pr*Tb; f1=c/lambda; G=10^(G/10); r=n*h*f1*(G-1); //rs=q*I; N=r+(q/(2*R)); Nh=r/2+(q/(2*R)); // Error probability // (a) For a balanced homodyne receiver with PSK signal Ps=1/2*erfc(sqrt(E/N)); E1=E/2; // If the signal is OOK Pso=1/2*erfc(sqrt(E1/(2*N))); //(b) For a balanced heterodyne receiver with PSK signal Pb=1/2*erfc(sqrt(E/(2*Nh))); //E1=E/2; // If the signal is OOK Pbo=1/2*erfc(sqrt(E1/(4*Nh))); //Displaying the result in command window printf("\n For a balanced homodyne receiver with PSK signal = %0.2f X 10^-9 ",Ps*10^9); printf("\n For a balanced homodyne receiver with PSK signal If the signal is OOK, = %0.2f X 10^-3",Pso*10^3); printf("\n For a balanced heterodyne receiver with PSK signal = %0.3f X 10^-9",Pb*10^9); printf("\n For a balanced heterodyne receiver with PSK signal If the signal is OOK,= %0.2f X 10^-3",Pbo*10^3); // The answer vary due to round off error
90131a68b458b4326adc12d5ad4f44cae70cf636
449d555969bfd7befe906877abab098c6e63a0e8
/3012/CH8/EX8.4/Ex8_4.sce
2dea42b69c8486295f030d101a0968b3ceb04b5d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
1,209
sce
Ex8_4.sce
// Given :- // Part (a) etat = 0.85 // given efficiency // From the solution to Example 8.3, the following specific enthalpy values are known, in kJ/kg h1 = 3348.4 h2s = 2741.8 h3 = 3353.3 h4s = 2428.5 h5 = 173.88 h6 = 181.94 // Calculations h2 = h1 - etat*(h1 - h2s) // The specific enthalpy at the exit of the first-stage turbine in kj/kg h4 = h3 - etat*(h3-h4s) // The specific enthalpy at the exit of the second-stage turbine in kj/kg eta = ((h1-h2)+(h3-h4)-(h6-h5))/((h1-h6)+(h3-h2)) // Result printf( ' The thermal efficiency is: %f',eta) // Part (b) x = linspace(0.85,1,50) for i =1:50 h2(i) = h1 - x(i)*(h1 - h2s) // The specific enthalpy at the exit of the first-stage turbine in kj/kg h4(i) = h3 - x(i)*(h3-h4s) // The specific enthalpy at the exit of the second-stage turbine in kj/kg y(i) = ((h1-h2(i))+(h3-h4(i))-(h6-h5))/((h1-h6)+(h3-h2(i))) end plot(x,y) xlabel('isentropic turbine efficiency') ylabel('cycle thermal efficiency')
f62b6d98b7ae4d7ee6474fd4abf98230dba90ce0
449d555969bfd7befe906877abab098c6e63a0e8
/1553/CH21/EX21.12/21Ex12.sce
a1f1a10be9f27f61576e3f7cd730b33330f0fd8b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
250
sce
21Ex12.sce
//chapter 21 Ex 12 clc; clear; close; Sum=1550; rate1=8/100; rate2=6/100; total=106; lent1=(total-(Sum*rate2))/(rate1-rate2); lent2=Sum-lent1; mprintf("Money lent at 8 percent is Rs.%.0f and that lent at 6 pecent is Rs.%.0f",lent1,lent2);
3137aba95d7509d8ea7610f0c39d231097834dc9
449d555969bfd7befe906877abab098c6e63a0e8
/2303/CH1/EX1.8/EX_1_8.sce
12c8b9010098d6c3d8509f519996a2d5b329887c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
237
sce
EX_1_8.sce
//Example 1.8 clc; clear; close; t =0:0.001:0.5 x=sin(2*%pi*100*t); E=integrate('(sin(2*%pi*100*t)^2)','t',-0.01,+0.01); disp(E,"Energy of signal= "); disp("Since the given signal has a finite energy, it is a ENERGY signal");
76d64fd01613c982af3562e1db31ce7aa59aba23
449d555969bfd7befe906877abab098c6e63a0e8
/1217/CH1/EX1.4/Exa1_4.sce
70456b42f05a02f694b0f73441bbb6f8414bbbf9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
470
sce
Exa1_4.sce
//Exa 1.4 clc; clear; close; //given data V1=5;//in uV V2=4;//in uV Ad=80;//in dB CMRR=100;//in dB Ad=10^(Ad/20);//unitless CMRR=10^(CMRR/20);//unitless //differential mode output voltage Vid=V1-V2;//in uV Vod=Ad*Vid;//in uV Vod=Vod*10^(-3);//in mV //common mode output voltage Vc=(V1+V2)/2;//in uV Ac=Ad/CMRR;//unitless Voc=Ac*Vc;//in uV disp(Vod,"Differential mode output voltage in mV is : ") disp(Voc,"common mode output voltage in uV is : ")
c110ec57050bbda70771c992e8c15c92ac6a4792
b9c6de66a61d6f9a57edaa44baf92266ccbab3db
/tests/poisson/poissinv.tst
d3132f9b94ff3a9c2bab884cf98e7fcff6be9379
[]
no_license
papriwalprateek/distfun-scilab
81b3edef0af1d1908e05472dfb15b0a55f61571d
82fd34521d1e6ebb6513773264b54a0d48f5f3f9
refs/heads/master
2016-09-03T07:08:47.605240
2013-10-13T05:53:43
2013-10-13T05:53:43
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,431
tst
poissinv.tst
// Copyright (C) 2012 - Prateek Papriwal // // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt // <-- JVM NOT MANDATORY --> // // Check empty matrix x = distfun_poissinv ( [] , []); assert_checkequal ( x , [] ); // Test with p scalar, lambda scalar x = distfun_poissinv(0.999,5); expected = 13; assert_checkalmostequal(x,expected,%eps); x = distfun_poissinv(1-0.999,5,%f); expected = 13; assert_checkalmostequal(x,expected,%eps); // // Test with expanded p , scalar lambda x = distfun_poissinv([0.32 0.3],2); expected = [1. 1.]; assert_checkalmostequal(x,expected,%eps); // // Test with scalar p, expanded lambda x = distfun_poissinv(0.22,[3 2]); expected = [2. 1.]; assert_checkalmostequal(x,expected,%eps); // // // Test small values of p // TODO : fix bug http://forge.scilab.org/index.php/p/distfun/issues/831/ //x = distfun_poissinv(1.e-15,1); //expected = 0.; //x = distfun_poissinv(1.e-15,1,%f) //expected = 17.; // // Check vectorisation //lambda = 3; //p = linspace(0.1,0.9,10); //x = distfun_poissinv(p,lambda); //x2 = []; //for i=1:10 // x2(1,i) = distfun_poissinv(x(i),lambda); //end //assert_checkalmostequal(x,x2);
180221e5cb1a0b418f6ee8a3f22ec16c68c667a9
52b803c4577043c12c9f408a2dd42031f5ea99aa
/second_dividend_table.sce
db6e83d415ca975fdc1dfdd48091fe5a33e5ac94
[]
no_license
radhikagoyal2july/triple-dividend
436afe77fe027fa9ebb3f51cf5468982dfe49f5c
3caee2d6e563ea1d43029fe243dcf55b284553b8
refs/heads/master
2021-09-02T10:01:40.133516
2018-01-01T18:07:33
2018-01-01T18:07:33
115,935,747
0
0
null
null
null
null
UTF-8
Scilab
false
false
4,837
sce
second_dividend_table.sce
clear getd lib getd clf alpha = 10; // productivity mu = 0.3; // decreasing returns on capital eta = 1.5 // elasticity of marginal utility r=0.08 // interest rate 8% v=.25 // vulnerability 25% pref = 0.1 // probab insu = 0 // insurance opt = optimset ( "TolX" , 1.e-8, "TolFun" , 1e-8,"MaxIter", 1000, "MaxFunEvals", 1000 ); Yref= 100 insuref = 0 // LOOP ON PROBA // x=0.0:0.0005:.03; // x=0.0:0.001:0.06; x=0.0:0.001:0.015 y=0.02:0.005:0.05 z=0.06:0.01:0.12 k=0 for j=1:size(x,2) k=k+1 p_loop(k)=x(j) end for j=1:size(y,2) k=k+1 p_loop(k)=y(j) end for j=1:size(z,2) k=k+1 p_loop(k)=z(j) end p_loop=p_loop'; iref = 28; // LOOP ON VULNERABILITY v_loop= [0.25]; v_ref = 1 // LOOP ON INSUR insu_loop = [insu, 1.0]; insu_ref = 1 // LOOP ON ETA eta_loop = [0 eta] // LOOP ON R r_loop = [0.04 0.08 0.12] para = [alpha mu r eta pref v insuref]; [Kref, fval , flagexit] = fminsearch(list(exp_util,para),100,opt) Wref = alpha*Kref^mu - r*Kref - v*pref*Kref; K_opt=zeros(size(r_loop,2),size(eta_loop,2),size(insu_loop,2),size(v_loop,2),size(p_loop,2)) K_eq=ones(K_opt) Y_eq=zeros(K_opt) W_eq=zeros(K_opt) Y_opt=zeros(K_opt) W_opt=zeros(K_opt) for j1=1:size(r_loop,2) r=r_loop(j1); for j2=1:size(eta_loop,2) eta=eta_loop(j2); for j=1:size(insu_loop,2) insu = insu_loop(j) for l=1:size(v_loop,2) v = v_loop(l); for i=1:size(p_loop,2) p = p_loop(i); para = [alpha mu r eta p v insu]; [K_opt(j1,j2,j,l,i), fval , flagexit] = fminsearch(list(exp_util,para),10,opt); para2 = [alpha mu r 0 p v insu]; [K_eq(j1,j2,j,l,i), fval , flagexit2] = fminsearch(list(exp_util,para2),10,opt); Y_eq(j1,j2,j,l,i) = alpha*K_eq(j1,j2,j,l,i)^mu; W_eq(j1,j2,j,l,i) = Y_eq(j1,j2,j,l,i) - r*K_eq(j1,j2,j,l,i) - v*p*K_eq(j1,j2,j,l,i); Y_opt(j1,j2,j,l,i) = alpha*K_opt(j1,j2,j,l,i)^mu; W_opt(j1,j2,j,l,i) = Y_opt(j1,j2,j,l,i) - r*K_opt(j1,j2,j,l,i) - v*p*K_opt(j1,j2,j,l,i); W_eq_ref(j1,j2,j,l,i) = alpha*Kref^mu - r*Kref - p*v*Kref; ExpW_opt(j1,j2,j,l,i)=exp_util(K_opt(j1,j2,j,l,i),para); ExpW_eq(j1,j2,j,l,i)=exp_util(K_eq(j1,j2,j,l,i),para); ExpW_eq_ref(j1,j2,j,l,i)=exp_util(Kref,para); disp([v insu p K_opt(j1,j2,j,l,i) K_eq(j1,j2,j,l,i) flagexit flagexit2]) end end end end end k=0 for j1=1:size(r_loop,2) r=r_loop(j1); for j2=1:size(eta_loop,2) eta=eta_loop(j2); for j=1:size(insu_loop,2) insu = insu_loop(j); for l=1:size(v_loop,2) v=v_loop(l); for i=1:size(p_loop,2) W_eq2(j1,j2,j,l,i)=W_eq(j1,j2,j,l,i)/W_eq(j1,j2,insu_ref,v_ref,iref) W_eq_ref2(j1,j2,j,l,i)=W_eq_ref(j1,j2,j,l,i)/W_eq_ref(j1,j2,insu_ref,v_ref,iref) W_opt2(j1,j2,j,l,i)=W_opt(j1,j2,j,l,i)/W_opt(j1,j2,insu_ref,v_ref,iref) ExpW_eq2(j1,j2,j,l,i)=ExpW_eq(j1,j2,j,l,i)/ExpW_eq(j1,j2,insu_ref,v_ref,iref) ExpW_eq_ref2(j1,j2,j,l,i)=ExpW_eq_ref(j1,j2,j,l,i)/ExpW_eq_ref(j1,j2,insu_ref,v_ref,iref) ExpW_opt2(j1,j2,j,l,i)=ExpW_opt(j1,j2,j,l,i)/ExpW_opt(j1,j2,insu_ref,v_ref,iref) k=k+1; p=p_loop(i); T2(k,1)=k T2(k,2)=r; T2(k,3)=eta; T2(k,4)=insu; T2(k,5)=v; T2(k,6)=p; T2(k,7)=K_eq(j1,j2,j,l,i); T2(k,8)=K_opt(j1,j2,j,l,i); T2(k,9)=K_eq(j1,j2,j,l,iref); T2(k,10)=W_eq(j1,j2,j,l,i); T2(k,11)=W_opt(j1,j2,j,l,i); T2(k,12)=W_eq_ref(j1,j2,j,l,i); T2(k,13)=W_eq2(j1,j2,j,l,i); T2(k,14)=W_opt2(j1,j2,j,l,i); T2(k,15)=W_eq_ref2(j1,j2,j,l,i); T2(k,16)=ExpW_eq2(j1,j2,j,l,i); T2(k,17)=ExpW_opt2(j1,j2,j,l,i); T2(k,18)=ExpW_eq_ref2(j1,j2,j,l,i); end end end end end csvWrite(T2,"T_all.csv")
9d7ada82724122cc118b45670f54492f2a5f73d5
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set14/s_Materials_Science_R._S._Khurmi_And_R._S._Sedha_2153.zip/Materials_Science_R._S._Khurmi_And_R._S._Sedha_2153/CH3/EX3.10/ex_3_10.sce
64ff8df8978b8254f665cf09d977b750007cc0b3
[]
no_license
hohiroki/Scilab_TBC
cb11e171e47a6cf15dad6594726c14443b23d512
98e421ab71b2e8be0c70d67cca3ecb53eeef1df6
refs/heads/master
2021-01-18T02:07:29.200029
2016-04-29T07:01:39
2016-04-29T07:01:39
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
206
sce
ex_3_10.sce
errcatch(-1,"stop");mode(2);//Example 3.10 : largest diameter ; ; //given data : format('v',6) a=3.61; // edge length in angstrum r=(a*sqrt(2))/4; d=2*r; disp(d,"largest diameter,d(angstrom) = ") exit();
2fb6d2cdb83e0562bec4545924993c3df156a1f2
a4633944be5b5077362ba6447966bb694c6647ee
/kadai3-3-1.sci
c07c8fa0f6e283cbd213977f18a6102a74372c5a
[]
no_license
zeno0119/37-communication
79e47660c2ef7cfe08f25457ea577be3f850d000
b879c29b9b21bf226be24749d95e06fc875e02f5
refs/heads/master
2022-12-18T02:53:01.006966
2020-09-11T05:45:14
2020-09-11T05:45:14
293,683,600
0
0
null
null
null
null
UTF-8
Scilab
false
false
924
sci
kadai3-3-1.sci
clear // 変数のクリア close [x, fs] = wavread("./week1/sample02.wav"); // 雑音混じりの信号をベクトルxとして読込 disp(fs) X = abs(fft(x)).^2/(length(x)^2); // xのパワースペクトルXを計算 time_x = (0:length(x)-1)/fs; // 時間軸の設定 freq_X = (0:length(X)-1)*fs/length(X); // 周波数軸の設定 fc = 860; fu = 900; hz=iir(2,'bp','ellip',[fc/fs fu/fs],[.08 .03]); disp(hz) x_filt = flts(x, hz); X_filt = abs(fft(x_filt)).^2/(length(x_filt)^2); subplot(2,2,1); plot(time_x,x) // xの表示 xlabel('Time (s)') ylabel('Amplitude') subplot(2,2,2); plot2d('nl',freq_X,X) // Xの表示(片対数グラフ) xlabel('Frequency (Hz)') ylabel('Power') subplot(2,2,3); plot(time_x,x_filt) // xの表示 xlabel('Time (s)') ylabel('Amplitude') subplot(2,2,4); plot2d('nl',freq_X,X_filt) // Xの表示(片対数グラフ) xlabel('Frequency (Hz)') ylabel('Power') playsnd(x_filt, fs)
d80e17f13f4a6ce8983ec33ef196283cb7b2742c
449d555969bfd7befe906877abab098c6e63a0e8
/3831/CH2/EX2.4/Ex2_4.sce
25008096c175d539d7dcf142fdf0e71085f4e83b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
471
sce
Ex2_4.sce
// Example 2_4 clc;funcprot(0); // Given data m_pendulum=5.0;// The mass of the pendulum in kg m_projectile=0.01;// The mass of the projectile in kg g=9.81;// The acceleration due to gravity in m/s^2 R=1.5;// The length of the pendulum support cable in m theta=15;// degree // Solution V_projectile=(1+(m_pendulum/m_projectile))*(2*g*R*[1-cosd(theta)])^(1/2);// The muzzle velocity in m/s printf('\nThe muzzle velocity,V_projectile=%1.0e m/s',V_projectile);
bbb3042eb0b1d07941dce85032ece4c5274603aa
449d555969bfd7befe906877abab098c6e63a0e8
/62/CH5/EX5.4.e/ex_5_4e.sce
3a3f2649571d1df758701964cade31201aecf98b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
191
sce
ex_5_4e.sce
clear ; close; clc; t=0:0.01:50; x=(sin(t))^2; for k=-5:5 cc(k+6,:)=exp(-%i*k*2*t); ck(k+6)=x*cc(k+6,:)'/length(t); if abs(ck(k+6))<0.1 then ck(k+6)=0; end end
5eb36649c878acf3274d477781962155ea7d23b6
449d555969bfd7befe906877abab098c6e63a0e8
/991/CH14/EX14.8/Example14_8.sce
41f2779989ca91f31f2478887f3f779f3b7483b8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
492
sce
Example14_8.sce
//Example 14.8. Refer fig.14.8 clc format(6) R1=20*10^3 R2=20*10^3 hie=2*10^3 RL=1*10^3 Re=100 hfe=80 A=(-hfe*RL)/hie disp(A,"(a) A = -hfe*RL / hie =") disp(" Ri = hie = 2 k-ohm") beta=Re/RL disp(beta,"(b) beta = Re / RL =") Rif=hie+((1+hfe)*Re) x1=Rif*10^-3 disp(x1,"(c) Rif(k-ohm) = hie + (1+hfe)*Re =") Af=(-hfe*RL)/Rif format(5) disp(Af,"(d) Af = -hfe*RL / Rif =") lg=20*log10(4) format(6) disp(lg,"(e) Loop gain, Abeta(in dB) = -40*0.1 = -4 i.e. 20log4 =")
add38c4a92323b4849f16a7725c89b331e04f895
f6b3a0c494772f6ca78e2f620df06d393dafcc51
/f.sci
16726503fff2b4ee32775fd899dba2c89a5ea05a
[]
no_license
rishabhthecoder/scilab
f914595f7af9682a731f49fc1203925c9529297a
f0460b09d16d7349f408183d4089553360ca4ba5
refs/heads/master
2020-03-31T05:47:43.762852
2018-10-07T16:06:20
2018-10-07T16:06:20
151,958,910
0
0
null
null
null
null
UTF-8
Scilab
false
false
120
sci
f.sci
function z=f(x,y) z=4+x+y; endfunction x=linspace(-2,2,100); y=linspace(-2,2,100); z=feval(x,y,f); surf(x,y,z);
5cb3fcbfbf9475cdc05c29261d021faa562fac84
089894a36ef33cb3d0f697541716c9b6cd8dcc43
/NLP_Project/test/blog/bow/bow.11_15.tst
db13f6f136252065504a3c97786a21aeb9ca9a60
[]
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
3,361
tst
bow.11_15.tst
11 1:0.4 5:1.0 10:0.2 35:0.09090909090909091 37:1.0 62:0.07692307692307693 195:1.0 292:1.0 635:0.3333333333333333 1075:1.0 1248:1.0 1412:0.5 11 22:1.0 23:1.0 55:0.2 61:1.0 91:1.0 305:0.25 1191:1.0 1282:1.0 11 10:0.2 12:0.25 31:0.5 61:1.0 62:0.07692307692307693 104:0.25 132:1.0 157:1.0 172:0.14285714285714285 11 91:1.0 199:1.0 307:1.0 1220:1.0 11 16:1.0 62:0.07692307692307693 67:1.0 534:0.5 11 1:0.2 8:0.05263157894736842 91:1.0 210:0.5 228:2.0 266:1.0 387:3.0 1504:1.0 11 37:1.0 66:1.0 232:0.125 711:0.5 1156:1.0 11 4:0.2 5:1.0 17:0.5 35:0.18181818181818182 37:2.0 65:1.0 66:1.0 83:1.0 91:1.0 232:0.125 242:1.0 317:0.5 339:0.3333333333333333 580:0.5 11 5:1.0 62:0.07692307692307693 222:1.0 317:1.0 11 3:0.25 12:0.5 132:1.0 210:0.3333333333333333 280:0.02631578947368421 305:0.25 707:1.0 710:1.0 1677:1.0 11 1:0.2 3:0.25 5:1.0 35:0.09090909090909091 37:2.0 62:0.07692307692307693 104:0.25 220:1.0 222:1.0 269:1.0 326:1.0 600:1.0 11 1:0.2 2:1.0 5:1.0 8:0.3157894736842105 37:2.0 61:1.0 62:0.15384615384615385 125:1.0 128:0.25 228:1.0 232:0.25 317:0.5 339:0.3333333333333333 514:0.1 1081:0.5 1485:1.0 11 4:0.2 5:1.0 17:0.5 35:0.18181818181818182 37:2.0 65:1.0 66:1.0 83:1.0 91:1.0 232:0.125 242:1.0 317:0.5 339:0.3333333333333333 580:0.5 11 5:1.0 62:0.07692307692307693 222:1.0 317:1.0 11 66:1.0 11 96:0.5 11 209:1.0 11 1:0.2 2:1.0 3:0.25 8:0.05263157894736842 10:0.2 12:0.5 31:0.5 33:1.0 66:1.0 80:1.0 84:1.0 91:1.0 120:0.5 143:1.0 210:0.16666666666666666 1149:1.0 1155:1.0 1690:1.0 11 1:0.2 10:0.4 12:0.5 31:0.5 37:1.0 62:0.07692307692307693 79:1.0 81:0.5 84:1.0 132:1.0 206:1.0 210:0.16666666666666666 333:1.0 1476:1.0 11 1:0.2 2:1.0 8:0.10526315789473684 12:0.5 17:0.5 62:0.07692307692307693 98:0.2 229:1.0 267:1.0 292:1.0 882:1.0 1122:1.0 11 3:0.25 5:1.0 8:0.05263157894736842 12:0.25 31:0.5 119:0.5 201:1.0 202:1.0 292:1.0 305:0.25 1293:1.0 1380:1.0 11 1:0.4 2:1.0 5:1.0 8:0.05263157894736842 12:0.25 23:1.0 37:1.0 62:0.15384615384615385 64:0.16666666666666666 73:0.5 91:1.0 187:1.0 199:1.0 243:1.0 340:0.5 859:1.0 1040:1.0 1113:1.0 1581:1.0 11 1:0.2 3:0.25 5:1.0 12:0.25 75:0.3333333333333333 132:1.0 1149:1.0 11 12:0.25 50:1.0 62:0.07692307692307693 83:0.5 143:1.0 512:1.0 736:1.0 11 12:0.25 31:0.5 11 1:0.2 5:1.0 8:0.05263157894736842 10:0.2 12:0.5 25:0.16666666666666666 31:1.0 35:0.09090909090909091 37:1.0 40:1.0 62:0.07692307692307693 66:1.0 75:0.3333333333333333 146:1.0 147:1.0 212:1.0 391:0.5 439:1.0 451:1.0 1155:1.0 11 12:0.25 31:0.5 50:1.0 90:0.5 143:1.0 206:1.0 292:1.0 340:0.5 11 1:0.2 5:1.0 12:0.25 25:0.16666666666666666 42:1.0 61:1.0 62:0.07692307692307693 63:1.0 132:1.0 964:1.0 11 8:0.05263157894736842 25:0.16666666666666666 31:0.5 49:1.0 62:0.07692307692307693 64:0.16666666666666666 69:0.5 71:0.5 202:1.0 697:1.0 11 10:0.2 31:0.5 35:0.09090909090909091 37:1.0 58:1.0 62:0.07692307692307693 85:1.0 206:1.0 326:1.0 389:1.0 905:1.0 1453:1.0 11 1:0.2 5:1.0 8:0.05263157894736842 12:0.25 37:1.0 64:0.16666666666666666 73:0.5 82:1.0 128:0.25 210:0.16666666666666666 227:0.5 335:0.2 1081:0.5 11 3:0.25 33:1.0 58:1.0 93:0.3333333333333333 95:1.0 11 1:0.2 451:1.0 807:1.0 11 8:0.05263157894736842 58:1.0 91:1.0 96:0.5 854:1.0 11 1:0.4 2:1.0 12:0.25 25:0.16666666666666666 35:0.18181818181818182 115:1.0 172:0.14285714285714285 315:1.0 1065:1.0 1182:1.0 1487:1.0 1594:1.0 11 1:0.4 2:1.0 3:0.25 198:1.0 292:1.0 11 1:0.2 91:1.0 117:1.0 307:0.5
e82aab3fab531b5b668821bc16d1764a45f8192c
449d555969bfd7befe906877abab098c6e63a0e8
/548/CH6/EX6.7/6_07.sce
eec83c4b75ec8729e036d3ce1fa4b4e0e73b0ad2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
361
sce
6_07.sce
pathname=get_absolute_file_path('6_07.sce') filename=pathname+filesep()+'6_07data.sci' exec(filename) a=atand(1/L_D);disp(a,"a=","tan(a)=1/(L/D)","minimum glide angle a:") R=H*L_D;disp(R,"R=","R=H*L/D","maximum range along ground :") printf("\Answer:\n") printf("\minimum glide angle: %f \n",a) printf("\n\maximum range covered along ground: %f m\n\n",R)
fe9696a8e1edcbc48464c53eeeb971f59269c39a
564beb66e232557765505973f93cc322a394133a
/KONA/scilab/fox_rabbit.sce
541a711753443788ed2b793bfb7992cbb8576cca
[]
no_license
KeithEvanSchubert/Keith_On
2442bb74b9d531c96d9f10da8df1dede54423094
fe8dd1e90e695957346aa176b7e0d0fea30171e3
refs/heads/master
2021-01-18T22:08:18.862471
2019-09-04T17:39:58
2019-09-04T17:39:58
51,767,267
0
0
null
null
null
null
UTF-8
Scilab
false
false
212
sce
fox_rabbit.sce
function [xdot]=fox_rabbit(t,x) starve=5; birth=10; eat=.01; eaten=.5; preditor=x(1); prey=x(2); getf('preditor_prey_rate.sce'); xdot=preditor_prey_rate(starve,birth,eat,eaten,preditor,prey); endfunction
f9c9dfb0d2657630200e0ad357663021b16c1a99
449d555969bfd7befe906877abab098c6e63a0e8
/1026/CH9/EX9.5/Example9_5.sce
fc2ab0492a7387ec203353b5102a029e75d5aa90
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
337
sce
Example9_5.sce
//chapter9,Example9_5,pg 238 //for line A-> 2*d*sin(thetaA)=lamA(n=1) thetaA=30*(%pi/180)//glancing angle for line A //for line B-> 2*d*sin(thetaB)=3*lamB(n=3) thetaB=60*(%pi/180) lamB=0.97*10^-10 d=(3*lamB)/(2*sin(thetaB)) lamA=2*d*sin(thetaA)//wavelength of line A printf("wavelength of line A\n") disp(lamA)
e8fc12b8d9febee87169e9679b5a272e07e536a1
449d555969bfd7befe906877abab098c6e63a0e8
/2219/CH10/EX10.16/Ex10_16.sce
859d228564030af26b85b804ec7aab2f6f25c379
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
418
sce
Ex10_16.sce
// Chapter 10 example 16 //------------------------------------------------------------------------------ clc; clear; //Given data R = 6000; // Target Range c = 3*10^8; // speed of light in m/s // Calculations t = (2*R)/c; // round trip time // Output mprintf('Round Trip time = %d us',t/10^-6); //------------------------------------------------------------------------------
6b697f2c846e87784060d3c0b8d7b6ae22f7f532
449d555969bfd7befe906877abab098c6e63a0e8
/3886/CH2/EX2.1/Ex2_1.sce
838f9e495f41ba1aa8970c84fe2fb3d02a3abf34
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
477
sce
Ex2_1.sce
//Determination of magnitude of forces and angle between them //Assume F1=F then F2=2*F1 //condition 1 gives //5*F^2+4*F^2*cosd(theta)=67600...(1) //condition 2 gives //5*F^2-4*F^2*cosd(theta)=32400...(2) //Adding (1) and (2) F=sqrt(10000) //N F1=F //N F2=2*F //N //put F1 and F2 in Equation (1) theta=acosd(0.44) //degree printf("Magnitude of forces are :-\n F1=%.0f N\n F2=%.0f N",F1,F2) printf("\nAngle between the forces is :-\n theta=%.1f degree",theta)
7d2a6862a234d1b08e11574393955648f14ec02e
98efda43218be3d9e665771c28742517fd4f334f
/Toolbox Test/peak2peak.sci
e658024695ab81ccea936b36a800429dcb631f97
[]
no_license
ankurmallick/Scilab_spt
bded5b3ed7c5618770ef4bb997b5f61aa7732cd9
e35c986f70147ee773796c839153ed7adbda3941
refs/heads/master
2021-01-17T06:48:24.162281
2016-12-05T12:54:24
2016-12-05T12:54:24
43,445,584
0
2
null
2015-12-10T05:15:44
2015-09-30T16:47:57
Scilab
UTF-8
Scilab
false
false
2,047
sci
peak2peak.sci
function [Y] = peak2peak(X, dim) funcprot(0); // Calling Sequence // Y=peak2peak(X) // Y=peak2peak(X,dim) // Parameters // X: Real or complex valued input vector or matrix. // dim: Dimension to compute maximum-to-minimum difference (Row/Column) // Description // Y= peak2peak(X) returns the difference between maximum and minimum values in X, operating along the first non-singleton // dimension of X by default. // Y= peak2peak(X,dim) returns the maximum-to-minimum difference in X, along dimension dim. // Examples // 1. t = 0:0.001:1-0.001; // x = cos(2*pi*100*t); // y = peak2peak(x) // 2. t = 0:0.001:1-0.001; // x = (1:4)'*cos(2*pi*100*t); // y = peak2peak(x,2) // See Also // max | min | peak2rms | rms | rssq // Authors // Rahul Dalmia // Bibliography // in.mathworks.com [nr, nc] = size (X); // Dimensions of Input calculated if (~exists('dim','local')) then if (nr==1) then Y = zeros(nr, 1); // preset all output fields to 0 for i= 1:nr maxim=max(X(i,:)); // maximum and minimum values are found minim=min(X(i,:)); Y(i,1)=maxim-minim; // Peak to peak value is calculated from the difference of max and min end else Y = zeros(1, nc); // preset all output fields to 0 for i= 1:nc maxim=max(X(:,i)); // maximum and minimum values are found minim=min(X(:,i)); Y(1,i)=maxim-minim; // Peak to peak value is calculated from the difference of max and min end end elseif (exists('dim','local')) then if (dim==1) then Y = zeros(1, nc); // preset all output fields to 0 for i= 1:nc maxim=max(X(:,i)); // maximum and minimum values are found minim=min(X(:,i)); Y(1,i)=maxim-minim; // Peak to peak value is calculated from the difference of max and min end elseif (dim==2) then Y = zeros(nr, 1); // preset all output fields to 0 for i= 1:nr maxim=max(X(i,:)); // maximum and minimum values are found minim=min(X(i,:)); Y(i,1)=maxim-minim; // Peak to peak value is calculated from the difference of max and min end end end endfunction
0dc3291358783e06f3f122b1d9cd5591018638d3
449d555969bfd7befe906877abab098c6e63a0e8
/2024/CH11/EX11.8/11_8.sce
1f3868afa4c289bf535bfb294fb3d01def88807a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
323
sce
11_8.sce
clc //Initialization of variables p=14.7 //psia ps=0.363 //psia n2=7.52 //moles n1=1 //moles //calculations x= (n1+n2)*ps/p /(1-ps/p) n=n1+n2+x y1=n1/n y2=n1/(n1+n2) //results printf("Percentage of co2 on a wet basis = %.1f percent",y1*100) printf("\n percentage of co2 on a dry basis = %.2f percent",y2*100)
407102d8f666d66e22b0e8cf7c02156884028c90
786b8b062cc8e4ad6a2a39294d02777c4ec4cb78
/FreeEDA/LPCSim/LPCSim/printSolution.sci
58b5c59fa05112ff32f4c083833915515bb7a2a3
[]
no_license
FOSSEE/FreeEDA
fc379b9927e63f0b29e66f69284beddff07d43c8
0c9f3b3885338be0420773ac2007d8ac54aa7412
refs/heads/master
2021-01-18T15:16:58.922680
2014-12-09T10:59:41
2014-12-09T10:59:41
23,788,370
6
3
null
2014-09-26T09:05:17
2014-09-08T11:29:52
Python
UTF-8
Scilab
false
false
5,773
sci
printSolution.sci
// printSolution.sci is a scilab file to display solution of the circuit. It is developed for a scilab based circuit simulator. It is written by Yogesh Dilip Save (yogessave@gmail.com). // Copyright (C) 2012 Yogesh Dilip Save // This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // It is modified by Yogesh Dilip Save for FreeEDA Software on October 2012 function printOPSolution(fileName,voltage,current,Wmode) global g; global nodeMap; fid = mopen(fileName, Wmode); if(fid == -1) error("cannot open file for writing"); end mfprintf(fid,'Name\t Source\t Sink\t Voltage\t Current\n'); mfprintf(fid,'----------------------------------------------------------\n'); Edges=edge_number(g); edge_cnt=1; while(edge_cnt<=Edges) if(g.edges.data.type(edge_cnt)=='D'|g.edges.data.type(edge_cnt)=='X') mfprintf(fid,'%c\t %s\t %s\t %15.10f %15.10f\n',g.edges.data.type(edge_cnt),nodeMap(g.edges.tail(edge_cnt)),nodeMap(g.edges.head(edge_cnt)),voltage(edge_cnt),current(edge_cnt)+current(edge_cnt+1)); edge_cnt=edge_cnt+2; elseif(g.edges.data.type(edge_cnt)=='M') mfprintf(fid,'%c\t %s\t %s\t %15.10f %15.10f\n',g.edges.data.type(edge_cnt),nodeMap(g.edges.tail(edge_cnt)),nodeMap(g.edges.head(edge_cnt)),voltage(edge_cnt),current(edge_cnt)+current(edge_cnt+1)); edge_cnt=edge_cnt+7; else mfprintf(fid,'%c\t %s\t %s\t %15.10f %15.10f\n',g.edges.data.type(edge_cnt),nodeMap(g.edges.tail(edge_cnt)),nodeMap(g.edges.head(edge_cnt)),voltage(edge_cnt),current(edge_cnt)); edge_cnt=edge_cnt+1; end end mclose(fid); endfunction function initArrays(t_itr) global vPrintArray; global vPlotArray; global iPrintArray; global iPlotArray; vPrintArray = zeros(t_itr,length(vPrintList)+1); vPlotArray = zeros(t_itr,length(vPlotList)); iPrintArray = zeros(t_itr,length(iPrintList)+1); iPlotArray = zeros(t_itr,length(iPlotList)); endfunction function buildOutput(x,s,itr) global vPrintList; global iPrintList; global sweepArray; global vPrintArray; global iPrintArray; sweepArray(itr)=s; // Store voltage output for printing if(~(vPrintList(1)==0)) fill_vPrintArray(x,itr); vPrintArray(itr,1)=s; end // Store voltage output for plotting if(~(vPlotList(1)==0)) fill_vPlotArray(x,itr); end // Store current output for printing if(~(iPrintList(1)==0)) fill_iPrintArray(x,itr); iPrintArray(itr,1)=s; end // Store current output for plotting if(~(iPlotList(1)==0)) fill_iPlotArray(x,itr); end endfunction function fill_vPrintArray(x,i) global vPrintList; global vPrintArray; for j=1:1:length(vPrintList); if(length(vPrintList(j))==1) if(vPrintList(j)<0) vPrintArray(i,j+1)=-x((-vPrintList(j))-1); else vPrintArray(i,j+1)=x(vPrintList(j)-1); end elseif(length(vPrintList(j))==2) mylist=vPrintList(j); vPrintArray(i,j+1)=x(mylist(1)-1)-x(mylist(2)-1); end end endfunction function fill_vPlotArray(x,i) global vPlotList; global vPlotArray; for j=1:1:length(vPlotList); if(length(vPlotList(j))==1) if(vPlotList(j)<0) vPlotArray(i,j)=-x((-vPlotList(j))-1); else vPlotArray(i,j)=x(vPlotList(j)-1); end elseif(length(vPlotList(j))==2) mylist=vPlotList(j); vPlotArray(i,j)=x(mylist(1)-1)-x(mylist(2)-1); end end clear mylist; endfunction function fill_iPrintArray(x,i) global iPrintList; global iPrintArray; global g; Nodes=node_number(g); for j=1:1:length(iPrintList); if(vPrintList(j)<0) iPrintArray(i,j+1)=-x(-iPrintList(j)+Nodes-1); else iPrintArray(i,j+1)=x(iPrintList(j)+Nodes-1); end end endfunction function fill_iPlotArray(x,i) global iPlotList; global iPlotArray; global g; Nodes=node_number(g); for j=1:1:length(iPlotList); if(iPlotList(j)<0) iPlotArray(i,j)=-x(-iPlotList(j)+Nodes-1); else iPlotArray(i,j)=x(iPlotList(j)+Nodes-1); end end endfunction function printSolution(xArray,xaxis,axisType); global vPrintList; global vPlotList; global iPrintList; global iPlotList; global vPrintArray; global vPlotArray global iPrintArray; global iPlotArray; if(~(vPlotList(1)==0)) plot(xArray,vPlotArray); for(i=1:size(vPlotArray,2)) temp=vPlotList(i); for(j=1:size(temp,2)) if(j==1) a(i)="v("+string(temp(j))+")"; else a(i)=a(i)+"-v("+string(temp(j))+")"; end end end legend(a); xlabel(xaxis); ylabel('voltage(V)'); end if(~(vPrintList(1)==0)) disp(vPrintArray); end if(~(iPlotList(1)==0)) plot(xArray,iPlotArray); for(i=1:size(iPlotArray,2)) temp=iPlotList(i); disp(temp); for(j=1:size(temp,2)) if(j==1) a(i)="i("+string(temp(j))+")"; else a(i)=a(i)+"-i("+string(temp(j))+")"; end end end legend(a); xlabel(xaxis); ylabel('current(A)'); end if(~(iPrintList(1)==0)) disp(iPrintArray); end endfunction
befc75edc86193e4de50c1fa426230bca5d53917
449d555969bfd7befe906877abab098c6e63a0e8
/3753/CH6/EX6.7/Ex6_7.sce
6ec68311e80fe9b751f0d6bbb55dca48e3f7a93e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
505
sce
Ex6_7.sce
//Example number 6.7, Page number 6.48 clc;clear;close // variable declaration d=2.351 // bond length N=6.02*10^26 // Avagadro number n=8 // number of atoms in unit cell A=28.09 // Atomin mass of silicon m=6.02*10^26 // 1mole // Calculations a=(4*d)/sqrt(3) // in m p=(n*A)/((a*10^-10)*m) // density // Result printf("a=%.2f Angstorm",(a)) printf("\ndensity = %.2f kg/m^3",(p*10^16)) // Answer given in the textbook is wrong"
d00f463b74a7006b7ede1f83baa7d170132addf7
449d555969bfd7befe906877abab098c6e63a0e8
/1478/CH2/EX2.18.27/2_18_27.sce
51a9d0a7d3bb464222fbd69f49a5c1c7a0928238
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,130
sce
2_18_27.sce
//water and its treatment// //example 2.18.27// clc Purity_Lime=0.90 Purity_soda=0.90 W1=2.1;//amount of CaCO3 in °Clarke// W2=0.63;//amount of MgCO3 in °Clarke// W3=0.35;//amount of CaSO4 in °Clarke// W4=0.21;//amount of MgSO4 in °Clarke// W5=0.063;//amount of MgCl2 in °Clarke// W6=0.035;//amount of KCl in °Clarke// M1=100/(100*0.07);//multiplication factor of CaCO3// M2=100/(84.04*0.07);//multiplication factor of MgCO3// M3=100/(136*0.07);//multiplication factor of CaSO4// M4=100/(120*0.07);//multiplication factor of MgSO4// M5=100/(95*0.07);//multiplication factor of MgCl2// P1=W1*M1;//in terms of CaCO3//L P2=W2*M2;//in terms of CaCO3//L P3=W3*M3;//in terms of CaCO3//S P4=W4*M4;//in terms of CaCO3//L+S P5=W5*M5;//in terms of CaCO3//L+S printf ("We do not take KCl since it do not react with lime/soda"); V=85000;//volume of water in litres// L=0.74*(P1+P2*2+P4+P5)*V/Purity_Lime;//lime required in mg// L=L/10^6; printf("\nQuantity of Lime required is %.4fkg",L); S=1.06*(P3+P4+P5)*V/Purity_soda;//soda required in mg// S=S/10^6; printf("\nQuantity of Soda required is %.3fkg",S)
e397f8229bc2eb6600d1172ab987130eb02c6f03
449d555969bfd7befe906877abab098c6e63a0e8
/3547/CH2/EX2.3/Ex2_3.sce
f6d55641087923e588ebf8e344c4d0c816e60956
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex2_3.sce
// Example no.2.3 // To compare deltaT for step index fiber with parabolic-index fiber // Page no. 43 clc; clear; // Given data n1=1.47; // Refractive index of core n2=1.45; // Refractive index of cladding L=1*10^3; // Length of medium in meter c=3*10^8; // speedof ligth in (m/s) delta=(n1-n2)/n1; // The deltaT for step index fiber deltaTSIF=((n1^2*L*delta)/(c*n2))*10^9; //Pulse width for step index fiber // deltaT for parabolic-index fiber deltaTPIF=((n1^2*delta^2*L)/(8*c))*10^9; // Pulse width for parabolic-index fiber // Displaying the result in command window printf('\n Pulse width for step index fiber = %0.2f ns',deltaTSIF); printf('\n Pulse width for parabolic index fiber = %0.4f ns',deltaTPIF); // The answer of pulse width for parabolic index fiber is wrong in book disp('Thus, the intermodal dispersion can be significantly reduced by using parabolic-index fiber');