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
836bfa44d211a7acbbf6328897517362ed403279
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/peig/peig2.sce
9a10d2e30732c363684d67f84bb2fa09dbe5b0e9
[]
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
1,620
sce
peig2.sce
//check o/p when i/p is a vector x=[1 2 3 4 5 6 2 3 7]; p=3; [S,w] = peig(x,p); S_matlab=[9.9719 9.9607 9.9267 9.8678 9.7811 9.6627 9.5086 9.3151 9.0792 8.7996 8.4768 8.1137 7.7158 7.2901 6.8454 6.3909 5.9360 5.4889 5.0568 4.6453 4.2582 3.8980 3.5658 3.2616 2.9847 2.7337 2.5071 2.3031 2.1196 1.9548 1.8070 1.6743 1.5552 1.4482 1.3522 1.2658 1.1880 1.1180 1.0548 0.9978 0.9463 0.8997 0.8576 0.8194 0.7848 0.7535 0.7250 0.6992 0.6759 0.6547 0.6355 0.6181 0.6024 0.5883 0.5756 0.5641 0.5539 0.5448 0.5367 0.5296 0.5234 0.5180 0.5134 0.5095 0.5064 0.5038 0.5019 0.5005 0.4997 0.4993 0.4994 0.5000 0.5010 0.5023 0.5040 0.5061 0.5084 0.5111 0.5140 0.5171 0.5205 0.5242 0.5280 0.5321 0.5363 0.5407 0.5452 0.5500 0.5549 0.5599 0.5652 0.5705 0.5761 0.5818 0.5877 0.5937 0.5999 0.6063 0.6129 0.6197 0.6267 0.6339 0.6413 0.6488 0.6566 0.6645 0.6726 0.6808 0.6892 0.6976 0.7061 0.7147 0.7232 0.7317 0.7400 0.7482 0.7561 0.7638 0.7711 0.7779 0.7843 0.7901 0.7953 0.7998 0.8035 0.8065 0.8087 0.8100 0.8104]; fs=assert_checkalmostequal(S,S_matlab); //fw=assert_checkalmostequal(w,w_matlab); //disp(fw); disp(fs);
5fdb6dee946de033b202d016a01c2ec914e08e60
449d555969bfd7befe906877abab098c6e63a0e8
/2699/CH14/EX14.7/Ex14_7.sce
1da416b19e8ccccb0a09a688eae251ad4fb39b65
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
293
sce
Ex14_7.sce
//example 14.7 PG-14.38 clc clear printf(" Given=> A(A+B) = AA+AB .......Distributive property\n\n") printf(" A(A+B) = A+AB ........Since A.A=A\n\n") printf(" A(A+B) = A(1+B) .......Distributive property\n\n") printf(" A(A+B) = A ........... Since A+1=1\n\n")
61a1bd81327f493cde56ec9791f5dc2333ccf654
6cbc9ef86318b4cfcbe32fc27dc997eea5d0ae94
/nana/perf/nop.tst
29d5e901794e18b03df797ceafd3785fa9091e6a
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
sasagawa888/eisl
c60c8307cf4ba1be20be15a4d59005f04b2b348e
450e09dbb59139621981f1104eefcad19957de2a
refs/heads/master
2023-09-03T17:48:38.297684
2023-09-02T05:42:40
2023-09-02T05:42:40
168,798,493
200
25
NOASSERTION
2023-06-17T21:16:28
2019-02-02T05:35:38
Common Lisp
UTF-8
Scilab
false
false
113
tst
nop.tst
asm(""); asm("nop"); asm("nop;nop;"); asm("nop;nop;nop;"); asm("nop;nop;nop;nop;"); asm("nop;nop;nop;nop;nop;");
c4062d16e7cdaed35fb92faf6afb26c177bf13ef
449d555969bfd7befe906877abab098c6e63a0e8
/1802/CH3/EX3.3/Exa3_3.sce
a0c6e160962fb7e5320beb5e136085c03b39bbae
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
431
sce
Exa3_3.sce
//Exa 3.3 clc; clear; close; //Given Data : format('v',5); L=150;//in meter A=2;//in cm^2(cross sectional area) US=5000;//in Kg/cm^2(ultimate strength) g=8.9;//specific gravity Ww=1.5;//in Kg/m(wind pressure) SafetyFactor=5;//unitless B_strength=2*US;//in Kg T=B_strength/SafetyFactor;//in Kg Volume=A*100;//in cm^2 Wc=1.78;//in Kg/m Wr=sqrt(Wc^2+Ww^2);//in Kg Sag=Wr*L^2/(8*T);//in meter disp(Sag,"Sag(in m) :");
dfa79c556cc8ae6c16facbef0cbf96b1531c6547
b9c6de66a61d6f9a57edaa44baf92266ccbab3db
/tests/chi-square/chi2pdf.tst
fe5ef9a11d4cda64bdabb810be533836ebcaa0ba
[]
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
2,170
tst
chi2pdf.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 --> // // Test distfun_chi2pdf // // Check empty matrix p = distfun_chi2pdf([],[]); assert_checkequal(p,[]); // Test with x scalar, k scalar computed = distfun_chi2pdf(4,5); expected = 0.1439759; assert_checkalmostequal(computed,expected,1.e-7); // Test with expanded x, k scalar computed = distfun_chi2pdf([2 6],5); expected = [0.1383692 0.0973043]; assert_checkalmostequal(computed,expected,1.e-6); // // Test with x scalar, k expanded computed = distfun_chi2pdf(4,[4 7]); expected = [0.1353353 0.1151807]; assert_checkalmostequal(computed,expected,1.e-6); // // Test with both x,k expanded computed = distfun_chi2pdf([2 6],[3 4]); expected = [0.2075537 0.0746806]; assert_checkalmostequal(computed,expected,1.e-6); // Check vectorisation k = 3; x = linspace(1,100,100); p = distfun_chi2pdf(x,k); p2 = []; for i = 1:100 p2(1,i) = distfun_chi2pdf(x(i),k); end // Accuracy test using data in chi2pdf.R.dataset.csv file precision = 1.e-13; path=distfun_getpath(); dataset = fullfile(path,"tests","unit_tests","chi-square","chi2pdf.R.dataset.csv"); table = assert_csvread ( dataset , "," , [] , "/#(.*)/" ); table = evstr(table); ntests = size(table,"r"); for i = 1 : ntests x = table(i,1); k = table(i,2); expected = table(i,3); computed = distfun_chi2pdf(x,k); assert_checkalmostequal ( computed , expected , precision ); // Compute number of significant digits if ( %f ) then d = assert_computedigits ( computed , expected ); mprintf("Test #%d/%d: Digits = %.1f\n",i,ntests,d); end end // Check consistency CDF/PDF n = 100; k = 5; p = linspace(0.01,0.99,n)'; x = distfun_chi2inv(p,k); p1 = distfun_chi2pdf(x,k); p2 = []; for i = 1 : n p2(i) = derivative(list(distfun_chi2cdf,k),x(i)); end assert_checkalmostequal ( p1 , p2 , 1.e-5 , [] , "element");
0677e7b3d726e6185117a6a24c9f607afef7ee84
cac765899ef2f4a3fea7b30feb7d3cc9e32a4eb4
/main/vsCatenary/testICRA2017_severalSolutionsAllAngle.sce
0c6035aee7276d4a9824049e95a06bc519bfcab3
[]
no_license
clairedune/AsserVisu
136d9cb090f709a410f23d3138ab115b722066d2
f351f693bffd50b5ae19656a7fcb7b52e01d6943
refs/heads/master
2020-04-11T09:56:32.106000
2017-01-12T14:01:12
2017-01-12T14:01:12
1,187,919
0
0
null
null
null
null
UTF-8
Scilab
false
false
6,959
sce
testICRA2017_severalSolutionsAllAngle.sce
// test catenary projection in an image // when the attached points are mobile clear; //close; exec('../../Load.sce'); ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// // USER PARAMETERS ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// //--------- TURTLE DIMENSIONS -------------------------// turtleD = 0.6; //diameter turtleH = 0.8; //height //-------- CATENARY PARAMETERS------------// R = 0.6; // rope semi lenght Hmax = R ;// max rope sag == fixation point heigh //--------- INITIAL EXPE SETUP-------------------------// // LEADER INIT POSITION AND VELOCITY angle1 = 0*%pi/180; // angle around vertical axis pose_w_M_r1 = [2,0,turtleH/2,0,0,angle1]; // pose in general frame v_r1 = [0,0,0,0,0,0]'; // arbitrary velocity //FOLLOWER DESIRED POSITION angled = 0*%pi/180; // angle around vertical axis pose_w_M_r2d = [0.5,0.4,turtleH/2,0,0,angled]; // pose in general frame // -------- VISUAL SERVOING GAIN --------------------// lambda = 1; // --------- OPTION FOR GRAPHICAL DISPLAY ----------// OPT_3D = 1; // set to 1 to display 3D view // ------- Camera parameters -----------// im_px = 600*10^(-6); im_py = 600*10^(-6); im_width = 800; im_height = 600; im_u0 = im_width/2; im_v0 = im_height/2; // pose of the camera in the follower robot frame r2Tc_x = -turtleD/2; // turtle semi diameter r2Tc_y = 0; r2Tc_z = 0; pose_r2_M_c = [r2Tc_x,r2Tc_y,r2Tc_z,-%pi/2,%pi/2,0]; ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// //GRAPHICAL INTERFACE ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// figure(1); a = gca(); a.isoview = "on"; a.data_bounds = [0;4;-2;2]; //a.grid=[1,1]; ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// // define 3D points to draw camera FOV c_FoV = FoV (im_u0,im_v0,im_px,im_py); //--------- Defining the system frames -------------- // // pose of the attached point frame in the leader robot frame r1 r1Tx = -turtleD/2; //turtle semi diameter r1Ty = 0; r1Tz = turtleH/2; pose_r1_M_sigma3 = [r1Tx,r1Ty,r1Tz,0,0,0]; r1_M_sigma3 = homogeneousMatrixFromPos(pose_r1_M_sigma3); sigma3_M_r1 = inv(r1_M_sigma3); // pose of the attached point frame in the follower robot frame r2 r2Tx = turtleD/2; // turtle semi diameter r2Ty = 0; r2Tz = turtleH/2; pose_r2_M_sigma2 = [r2Tx,r2Ty,r2Tz,0,0,0]; r2_M_sigma2 = homogeneousMatrixFromPos(pose_r2_M_sigma2); sigma2_M_r2 = inv(r2_M_sigma2); //// pose of the camera in the follower robot frame r2_M_c = homogeneousMatrixFromPos(pose_r2_M_c); c_M_r2 = inv(r2_M_c); //--------------ROBOT FRAMES DEFINITION -----------------------------// // pose of the leader robot in the world frame w_M_r1 = homogeneousMatrixFromPos(pose_w_M_r1); // desired position of the follower frame w_M_r2d = homogeneousMatrixFromPos(pose_w_M_r2d); //----------------- COMPUTE THE DESIRED PARAMETERS ----------------------------// //compute the desired parameters [paramd,Dd,w_Pd,xAd,yAd,zAd,w_M_sigma1d] = thetheredRobotCatenary(w_M_r1,w_M_r2d,r1_M_sigma3,r2_M_sigma2,R,Hmax); //desired camera position w_M_cd = w_M_r2d * r2_M_c; //desired rope frame wrt desired camera cd_M_sigma1d = inv(w_M_cd) * w_M_sigma1d ; //image projection and desired 2D points definition [cd_P,cd_pm,cd_pp,nbpoints] = imageProjection(inv(w_M_cd),w_Pd,im_u0,im_v0,im_px,im_py); // display the desired parameters disp("Parameters to reach") disp(paramd); //---------------- FOR N FOLLOWER ROBOTS ON A CIRCLE AROUND THE ATTACHED POINT -----------// for alpha = %pi/2+45*%pi/180:45*%pi/180:3*%pi/2-45*%pi/180 // initial pose of the follower robot in the world frame angle2 = 0*%pi/180; // angle around vertical axis pose_sigma3_M_sigma2 = [2*Dd*cos(alpha),2*Dd*sin(alpha),0,0,0,angle2]; // pose in general frame sigma3_M_sigma2 = homogeneousMatrixFromPos(pose_sigma3_M_sigma2); w_M_r2 = w_M_r1*r1_M_sigma3 * sigma3_M_sigma2 * inv(r2_M_sigma2); [param,D,w_P,xA,yA,zA,w_M_sigma1] = thetheredRobotCatenary(w_M_r1,w_M_r2,r1_M_sigma3,r2_M_sigma2,R,Hmax); // find the final follower robot position so that the desired features theta and H/Hmax are reached [w_M_r1,w_M_r2,w_P,param] = vsCatenaryHth(w_M_r1,v_r1,w_M_r2,r1_M_sigma3,r2_M_sigma2,r2_M_c,R,Hmax, 0.01,0.1); disp("alpha") disp(alpha) disp("Parameters reached") disp(param); if(length(w_M_r2)>0) scf(1) //------------------- TOP VIEW --------------------------------------// pose_w_M_r1 = pFromHomogeneousMatrix(w_M_r1); pose_w_M_r2 = pFromHomogeneousMatrix(w_M_r2); pose_w_M_sigma2 = pFromHomogeneousMatrix(w_M_r2*r2_M_sigma2); pose_w_M_sigma3 = pFromHomogeneousMatrix(w_M_r1*r1_M_sigma3); pose_w_M_sigma4 = pFromHomogeneousMatrix(w_M_r1*r2_M_sigma2); // drawTurtleTop(pose_w_M_r1(1),pose_w_M_r1(2),turtleD);// leader // drawTurtleTop(pose_w_M_r2(1),pose_w_M_r2(2),turtleD);//Follower // drawFoVTop(c_FoV,w_M_c) ; // FoV drawWheeledTurtleTop(w_M_r1,turtleD); drawWheeledTurtleTop(w_M_r2,turtleD); xarc(pose_w_M_sigma3(1)-2*Dd,pose_w_M_sigma3(2)+2*Dd,4*Dd,4*Dd,0,360*64); plot(w_P(1,:),w_P(2,:),'r'); drawnow(); scf(2) //a = gca(); // delete(a.children); drawlater() Camera3DDrawColor(0.1,w_M_r2,5); Camera3DDrawColor(0.1,w_M_r2*r2_M_sigma2,5); Camera3DDrawColor(0.1,w_M_r1,3); Camera3DDrawColor(0.1,w_M_r1*r1_M_sigma3,3); // Camera3DDrawColor(0.1,w_M_c,5); param3d(w_P(1,:),w_P(2,:),w_P(3,:),'r'); drawnow(); end end disp('Pausing .... write resume to exit the application') pause //savematfile('data/data2_'+string(index)+'.mat','points','pixels','-v7'); //pause //end
cde64953c9d8aac92773b729dda09b77af647071
48d313982e11468e3406524c01f1cba2700a2db5
/Calcul numeric/ResurseTemaCalculNumeric/New folder/ExFct/chebpoints.sci
cc38d47a03dcabd7ed21ea5fa3ba538718c5f828
[]
no_license
albanionut/University
b8e918a192c131647099c57e1b2caa231de98d6d
b3d3dfe3cf64d0cddfaeb570151adf7d4c9ad0b7
refs/heads/master
2021-07-13T11:31:29.880681
2020-10-10T15:07:00
2020-10-10T15:07:00
214,223,943
0
0
null
null
null
null
UTF-8
Scilab
false
false
315
sci
chebpoints.sci
function x=chebpoints(n,varargin) l=-1 r=1 if length(varargin)>0 then if length(varargin)==2 then l=varargin(1) r=varargin(2) else error('Wrong number of input parameters') end end k=0:n x=l+0.5*(r-l)*(cos(k*%pi/n)+1) endfunction
c2fe163550ff5363d5caff604a7a4012b74492bf
449d555969bfd7befe906877abab098c6e63a0e8
/62/CH4/EX4.28/ex_4_28.sce
a0636c8962cdd5d5f355f828e3f058f8a2701fb2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
245
sce
ex_4_28.sce
clc; syms n z a; X=symsum(1*z^-n,n,0,%inf) disp(X,"u[n] <-->") y=a^n; Y=symsum(y*z^-n,n,0,%inf) disp(Y,"a^n*u[n] <-->") H=Y/X; disp(H,"H(z)="); H=(z-1)/(z-a); F1=H*z^(n-1)*(z-a); h=limit(F1,z,a); disp(h*'u(n)'+'1/a*delta(n)',"h[n]=")
c97657c55d49fbcb125f01dd38c124997f99dfd1
449d555969bfd7befe906877abab098c6e63a0e8
/1694/CH3/EX3.5/EX3_5.sce
6766bea209ea4701d4ba2dd2bf7e9f090d4cc7e8
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
617
sce
EX3_5.sce
clear; clc; printf("\nEx3.5\n"); //page no.-122 //given h=6.63*10^-34;........//planck's constant in Js m=9.11*10^-31;........//mass of electron in kg l=2.5*10^-10;............//width of box in m n1=2;...................//quantum no. for second lowest state n2=3;...................//quantum no. for third lowest state e=1.6*10^19;...........//charge E1=(h^2)/(8*m*l^2*e)..........//first lowest quantum energy E2=(n1^2)*E1.............//second lowest quantum energy E3=(n2^2)*E1............//third lowest quantum energy printf("\nlowest permissible quantum energies are 6 eV,24 eV, 54 eV\n");
35643ebe1d7eca3bcef2fc7f4109a89d81ff611a
449d555969bfd7befe906877abab098c6e63a0e8
/1739/CH8/EX8.13/Exa8_13.sce
35a9261390752694168f10ccf41be5c8329255a1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
222
sce
Exa8_13.sce
//Exa 8.13 clc; clear; close; //Given data : C=6;//in pF C=C*10^-12;//in F FH=8;//in MHz FH=FH*10^6;//in Hz //Formula : FH=1/(2*%pi*R*C) R=1/(2*%pi*FH*C);//in Ohm disp(R*10^-3,"Maximum load resistance in Kohm");
c016e599a1835d27ac89d8e3fa0b762f8493cffa
449d555969bfd7befe906877abab098c6e63a0e8
/728/CH3/EX3.9/Ex3_9.sce
8bf0a54291605cd8b44a95379a127ffb7fe6bc68
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex3_9.sce
//Caption:Determine in dB: (a)-reflection loss, (b)-transmission line (c)-return loss. //Exa: 3.9 clc; clear; close; Z_o=600;//in ohm Z_s=50;//in ohm l=200;//in meter Z_l=500;//in ohm p=(Z_l-Z_o)/(Z_l+Z_o); ref_los=10*(log(1/(1-(abs(p))^2)))/(log(10));//in dB disp(ref_los,"Reflection loss (in dB) ="); //attenuation loss= 0 dB //Transmisson loss = (attenuation loss)+(reflection loss) = (reflection loss) tran_los=ref_los; disp(tran_los,"Transmisson loss (in dB) ="); ret_los=10*((log(abs(p)))/(log(10))); disp(ret_los,"Return loss(in dB) =");
6015acc10c61baf59e6f3db8691f3b5c6a5d8f0e
449d555969bfd7befe906877abab098c6e63a0e8
/1457/CH8/EX8.9/8_9.sce
0c59411d02a2e6e1630a08a9d3f7eef9e6ffc9c9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
555
sce
8_9.sce
clc //Initialization of variables d1=6/12 //ft d2=4/12 //ft d3=8/12 //ft l1=2000 //ft l2=1600 //ft l3=4000 //ft f1=0.020 f2=0.032 f3=0.024 El1=200 El2=50 El3=120 g=32.2 //calculations Vc=sqrt(2*g*(El1-El2)/288.9) Qc=%pi/4 *d3^2 *Vc Va=1.346*Vc Qa=%pi/4 *d1^2 *Va Vb=(d3^2 *Vc - d1^2 *Va)/d2^2 Qb=%pi/4 *d2^2 *Vb P=62.4/144 *(El1 - El3 - f1*l1/d1 *Va^2 /(2*g)) //results printf("Flowrate at A = %.3f cfs",Qa) printf("\nFlowrate at B = %.3f cfs",Qb) printf("\nFlowrate at C = %.3f cfs",Qc) printf("\nPressure at P = %.2f psi",P)
5c1bf6a63ba1e0b1ff66b8e17cb7dad7551e15b3
449d555969bfd7befe906877abab098c6e63a0e8
/2863/CH2/EX2.44/ex2_44.sce
a2240d3280435566df0a60f78e715cca4ac0f2c4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
132
sce
ex2_44.sce
//chapter 2 //nov-dec 2012 printf("\n"); Rrad=65; Rloss=10; n=Rrad/(Rrad+Rloss); printf("the radiation efficiency is %g",n);
cb8f6ceae7128bf6a5e1b6c41abc2670a085b5e4
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set5/s_Digital_Principals_And_Applications_D._P._Leach_And_A._P._Malvino_45.zip/Digital_Principals_And_Applications_D._P._Leach_And_A._P._Malvino_45/CH12/EX12.3/example_12_3.sce
ac774efcd1936d93ffced12e5ccbcff7ca4a1c3b
[]
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
244
sce
example_12_3.sce
errcatch(-1,"stop");mode(2);//Example 12.3 ; ; for i=1:5 op_v(1,i)= 10/2^i; // calculating otput voltages corresponding to each bit end disp("output voltages corresponding to each bit are ") //displaying result disp(op_v); exit();
b02ed0d25082b511c80409b1e8d704ea8a259c65
79bcfe1ef0cd82bca98b367d574d5ff6bfc7c27f
/Manu/TP Numerico/TP.sce
19022f3232039d24e82b71b654ce9f5154d3d150
[]
no_license
luciamr/tesina
a962819087f56462d92849c97297a16e9cbefe11
d927c2f7d79131c7d9cc922338d41761a2c03993
refs/heads/master
2021-03-27T13:38:12.964831
2016-10-06T16:06:06
2016-10-06T16:06:06
27,589,970
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,270
sce
TP.sce
//Parte B //Ejercicio 1 m = 1.83; k = 220; c = 16.05; dMax = 3/100; v = 70*1000/3600; cantTramos = 8; longTramos = 12; function r = d2Ug(t, v) extra = %pi/6 * v; r = dMax/2 * extra^2 * cos(t * extra); endfunction; function dX = f(t, X, v) dX(1) = X(2); if v*t <= cantTramos * longTramos then dX(2) = -(m * d2Ug(t, v) + c * X(2) + k * X(1))/m; else dX(2) = -(c * X(2) + k * X(1))/m; end; endfunction; X0 = [0; 0]; ti = 0; tf = 20; paso = .001; t = ti:paso:tf; Y = ode("rk", X0, ti, t, list(f, v)); //Parte 1.a scf(0); plot(t, Y(1, :), "c"); //desplazamiento vertical xlabel("Tiempo (s)", 'fontsize', 2); ylabel("Desplazamiento (m)", 'fontsize', 2); title("Historia del Desplazamiento", 'fontsize', 4); //Parte 1.b maxDesp = max(abs(Y(1, :))); disp(maxDesp); //Ejercicio 2 vi = 20*1000/3600; vf = 120*1000/3600; pasoVelos = 5*1000/3600; velos = vi:pasoVelos:vf; //velocidades velMax = []; for i = 1:length(velos) Yi = ode("rk", X0, ti, t, list(f, velos(i))); maxDesp = max(abs(Yi(1, :))); velMax(i) = maxDesp; end; scf(1); plot(velos*3600/1000, velMax, '--b.'); xlabel("Velocidad (km/h)", 'fontsize', 2); ylabel("Máximo Desplazamiento (m)", 'fontsize', 2); title("Valor Máximo del Desplazamiento", 'fontsize', 4);
fee9b2509e29892495ce47b5398eb4e0b226e37b
449d555969bfd7befe906877abab098c6e63a0e8
/2642/CH4/EX4.7/Ex4_7.sce
c63d5b623a833f36651f5e8f8700ac6023a5416b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
1,296
sce
Ex4_7.sce
// FUNDAMENTALS OF ELECTICAL MACHINES // M.A.SALAM // NAROSA PUBLISHING HOUSE // SECOND EDITION // Chapter 4 : DIRECT CURRENT GENERATORS // Example : 4.7 clc;clear; // clears the console and command history // Given data E = 25 // power of compound generator in kW V_t = 220 // terminal voltage in V R_se = 0.05 // series resistance in ohm R_sh = 55 // shunt field resistance in ohm R_a = 0.07 // armature resistance in ohm brush_drop = 1 // voltage drop per brush in V // caclulations I_L = E*10^3/V_t // load current in A I_sh1 = V_t/R_sh // shunt field current in A I_a1 = I_sh1+I_L // armature current in A E_g1 = V_t+I_a1*(R_a+R_se)+2*brush_drop // generator voltage in V V_ab = V_t+I_L*R_se // voltage across the shunt field in V for short shunt generator I_sh2 = V_ab/R_sh // current in the shunt field in A for short shunt generator I_a2 = I_sh2+I_L // armature current in A for short shunt generator E_g2 = V_ab+I_a2*R_a+2*brush_drop // generator voltage in V for short shunt generator // display the result disp("Example 4.7 solution"); printf(" \n Generated emf when generatar is connected in long shunt \n E_g1 = %.f V \n", E_g1); printf(" \n Generated emf when generatar is connected in short shunt \n E_g2 = %.1f V \n", E_g2);
04a2b637dd87d45d38590621b36ee9749dc1f5a0
449d555969bfd7befe906877abab098c6e63a0e8
/32/CH15/EX15.06/15_06.sce
902e83603aa81c9e5a5e89dd47692ebfbbbab6f7
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,096
sce
15_06.sce
//pathname=get_absolute_file_path('15.06.sce') //filename=pathname+filesep()+'15.06-data.sci' //exec(filename) //Height in mercury column in condenser(in cm): h=70 //Inlet temperature(in K): T=30+273 //Dryness fraction: x=0.85 //Rate at which steam enters(in kg/min): m=300 //Velocity of water flow: v=50 //Pressure head(in m): ph=5 //Density of mercury(in kg/cm^3): d=0.0135951 //Acceleration due to gravity(in m/s^2): g=9.81 //Gas constant(in kJ/kg.K): R=0.287 //Specific heat of water(in kJ/kg.K): Cpw=4.18 //From steam tables: ps=4.246 //kPa mw=7415 //kg/min //Absolute pressure in condenser(in kPa): pt=(76-h)*d*10^4*g //Partial pressure of air(in kPa): pa=pt-ps //Volume flow of water(in m^3/min): V=mw/1000 //Flow surface area required(in m^2): a=V/v printf("\nRESULT\n") printf("\nFlow surface area required = %f m^2",a) //Cooling surface area required(in m^2): A=24.79 printf("\nCooling surface area required = %f m^2",A) //Velocity head present(in m): vh=1/2*(v/60)^2/g //Total head required(in m): th=ph+vh printf("\nHead required = %f m",th)
cc22c6e84816947614f6e8d40e589a6fb154c386
f891f5aed2e66371488173c2b9c4e8f977a9f64a
/Sandia Inverter Test Protocol/Tests/FW/FW21_1.tst
514260a0f138635f85ff0cb83e400d2d0a42fa0e
[]
no_license
jakedm/svp_directories
d9b85c41b45a3ded7572f9f730e8d1efc8515099
19272f8784baabf83e197778768933aef015432c
refs/heads/master
2021-01-18T18:08:29.224016
2017-01-16T20:09:35
2017-01-16T20:09:35
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,300
tst
FW21_1.tst
<scriptConfig name="FW21_1" script="FW"> <params> <param name="invt.posttest_delay" type="int">0</param> <param name="fw.settings.HzStopWGra" type="float">0.0</param> <param name="fw.settings.HzStr" type="float">0.33</param> <param name="pvsim.terrasas.channel" type="int">3</param> <param name="invt.pretest_delay" type="int">3</param> <param name="invt.power_range" type="int">5</param> <param name="invt.verification_delay" type="int">5</param> <param name="fw.settings.WGra" type="float">10.0</param> <param name="fw.settings.freq_ref" type="float">60.0</param> <param name="gridsim.ametek.i_max" type="float">100.0</param> <param name="comm.slave_id" type="int">126</param> <param name="gridsim.ametek.v_nom" type="float">277.2</param> <param name="invt.setpoint_failure_count" type="int">300</param> <param name="gridsim.ametek.v_max" type="float">300.0</param> <param name="invt.setpoint_period" type="int">300</param> <param name="pvsim.terrasas.vmp" type="float">460.0</param> <param name="comm.ipport" type="int">502</param> <param name="pvsim_profile.irr_start" type="float">1000.0</param> <param name="pvsim.terrasas.pmp" type="float">3000.0</param> <param name="datatrig.das_comp" type="string">10 Node</param> <param name="pvsim.terrasas.ipaddr" type="string">192.168.0.167</param> <param name="comm.ipaddr" type="string">192.168.0.173</param> <param name="datatrig.node" type="string">3</param> <param name="gridsim.mode" type="string">Ametek</param> <param name="datatrig.trigger_method" type="string">Disabled - Data from EUT</param> <param name="fw.settings.fw_mode" type="string">FW21 (FW parameters)</param> <param name="fw.settings.HysEna" type="string">No</param> <param name="invt.disable" type="string">No</param> <param name="pvsim_profile.profile_name" type="string">None</param> <param name="datatrig.dsm_method" type="string">Sandia LabView DSM</param> <param name="gridsim.ametek.profile_name" type="string">FW Profile</param> <param name="comm.ifc_type" type="string">TCP</param> <param name="pvsim.mode" type="string">TerraSAS</param> <param name="gridsim.ametek.serial_port" type="string">com1</param> </params> </scriptConfig>
aebd85ce6fefa24de88e815f9e87732710e642a8
3cbee2296fd6b54f80587eead83813d4c878e06a
/sci2blif/sci2blif_added_blocks/nfet.sce
8df2f850cd94bdd69aeeb4716f6de94c921b984c
[]
no_license
nikhil-soraba/rasp30
872afa4ad0820b8ca3ea4f232c4168193acbd854
936c6438de595f9ac30d5619a887419c5bae2b0f
refs/heads/master
2021-01-12T15:19:09.899590
2016-10-31T03:23:48
2016-10-31T03:23:48
71,756,442
0
0
null
2016-10-24T05:58:57
2016-10-24T05:58:56
null
UTF-8
Scilab
false
false
449
sce
nfet.sce
//****************************** NFET ********************************** if (blk_name.entries(bl) =='nfet') then mputl("#NFET "+string(bl),fd_w); for ss=1:scs_m.objs(bl).model.ipar(1) mputl(".subckt nfet in[0]=net"+string(blk(blk_objs(bl),2))+'_'+ string(ss)+ " in[1]=net" + string(blk(blk_objs(bl),3)) +'_'+ string(ss)+ " out[0]=net"+ string(blk(blk_objs(bl),2+numofip))+'_'+ string(ss),fd_w); mputl(" ",fd_w); end end
3e56294329f0bf65c7c6ad2b302e1e0ada82d5ce
449d555969bfd7befe906877abab098c6e63a0e8
/773/CH8/EX8.14/8_14.sci
c586f88d67f9e70dc386beb6eb8c1dc2ff53f06a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
258
sci
8_14.sci
//coefficient// syms s,t,k; s=%s; y=k/(s*(s+2)*(1+0.5*s)) //G(s)H(s) disp(y,"G(s)H(s)") //R=laplace('3*t',t,s) R=laplace('3*t',t,s) e=limit(s*R/(1+y),s,0); disp(e," steady state error") k=4;//given y=e; disp(y,"state state error when k=4")
2d642322254767a72d89872cf17879ab717798e0
449d555969bfd7befe906877abab098c6e63a0e8
/1301/CH18/EX18.4/ex18_4.sce
b7162feb7f210963ced52b53306921ca830bb9bd
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
328
sce
ex18_4.sce
clc; e=1.6*10^-19; //charge ke=200; //kinetic energy in eV KE=ke*e; //calculating kinetic energy m=1.67*10^-27; //mass in kg disp(KE,"Kinetic Energy in Joule = "); //displaying result v=sqrt((2*KE)/m); //calculating velocity disp(v,"Velocity in m/sec = "); //displaying result
9546d85501c56b80c7ed42c2ba8b245b98b6c87b
52b803c4577043c12c9f408a2dd42031f5ea99aa
/consolosses.sce
2cc6f08c5231cd8a97d393d42d82dc8ded8abef5
[]
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
575
sce
consolosses.sce
getd lib clf s = 0.3; mu = 0.25; rho = 0.1; x=0.1:.1:12; for i=1:size(x,2) y(i) = 1/(1-s)*(1+1/(mu*x(i)))/(rho+1/x(i)); y2(i) = (mu+1/(x(i)))/(rho+1/x(i)); end plot(x,y) myfontSize=3 cthick(2) ccolor("dark blue") //plot(x,y2) pensize = 2 ylabs("Scaling factor (DC/C)/(DK/K)") //ylabs("Scaling factor (DC/DK)") xlabs("Characteristic time of the reconstruction period (years)") a=gca(); //a.sub_ticks(2)=0; //a.sub_ticks(1)=0; //size a.box = "off"; f=gcf(); f.axes_size=[600,450]; xs2png(0,"trap.png") xs2pdf(0,"trap.pdf")
a2f592a6c7e8a66ca5d10dea8fe72e8543147d5e
5f48beee3dc825617c83ba20a7c82c544061af65
/tests/s/12.tst
2aa410c2864a7237798a8a18115ecc65f309d92a
[]
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
111
tst
12.tst
typedef int arr_int[5]; int main(int argc, char* argv[]) { arr_int (*x)(char), (*y)(void), (**z)(int* p); }
a9fef5a7789514e514fb6e0557ee3bd73481d663
449d555969bfd7befe906877abab098c6e63a0e8
/3131/CH5/EX5.10/5_10.sce
f64841a375ee9ed22094458a662c9e462bceb59f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
592
sce
5_10.sce
clear all; clc; disp("Ex 5_10") disp("Free body diagram is as shown in fig 5-18b") disp("Summing forces in X-direction:") disp("C_y*sin30+B_y*sin30-A_x=0 ...... (1)") disp("Summing forces in Y-direction:") disp("-300+C_y*cos30+B_y*cos30=0 ...... (2)") disp("Summing moments about A:") disp("-B_y*2+4000-C_y*6+300*cos30*(8)=0 ...... (3)") disp("Solving (2) and (3) simulatneously") disp("B_y = -1000.0 N = -1 kN") disp("C_y = 1346.4 N = 1.35 kN") disp("Putting these values of B_y and C_y in (1):") a=-1000 b=1346.4 p1=30 p=p1*%pi/180 c=b*sin(p)+a*sin(p) printf('\n\n A_x = %0.0f N', c)
2e76f443a6c2d2e14f4b82cf8556342d27c3a966
0e1b45c07f0938ba9c8a003d6ae1cf2d8315efdb
/google-code-jam/2011/qualification/B/test-01.tst
8a29d84728be0e750229ca683898540fb887831a
[]
no_license
Kot-Angens/acm
c85d8582c3e84f218415321743864b9680e01f2e
05472eaa0fff7abb6679826085da5e0c990df4cb
refs/heads/master
2021-01-24T22:36:05.159612
2012-10-02T13:51:56
2012-10-02T13:51:56
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
207
tst
test-01.tst
5 0 0 2 EA 1 QRI 0 4 RRQR 1 QFT 1 QF 7 FAQFDFQ 1 EEZ 1 QE 7 QEEEERA 0 1 QW 2 QW ~~~~~~~~~~~~~~~~~~~~~~~~~~ Case #1: [E, A] Case #2: [R, I, R] Case #3: [F, D, T] Case #4: [Z, E, R, A] Case #5: []
1bbae7cd8623199b7a4004149aa5a1680c6f002c
449d555969bfd7befe906877abab098c6e63a0e8
/1862/CH3/EX3.3/C3P3.sce
d089c613793e49894025a5769c38b0b74ed43fe2
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
711
sce
C3P3.sce
clc //To find force acting on crate //Given : //refer to figure 3-8(a) and3-8(b) from page no. 49 // mass m =360 //kg // initial velocity of crate vx1 =62//km/ph // final velocity of crate v0x1 = 105 //km/ph // time elapsed t =17 //seconds //solution: //calculating initial velocity in m/s vx =(62*5)/18 //in m/s // calculating final velocity in m/s v0x =(105*5)/18 //in m/s //calculating acceleration ax =(vx-v0x)/t //in m/s^2 //calculating force //applying newton's secong law Fct =m*ax //in seconds ax = nearfloat("succ",-0.70) Fct = nearfloat("pred",-250) printf ("\n\n Acceleration a = \n\n %.2fm/s^2" ,ax) printf ("\n\n Force acting on crate Fct =\n\n %.3iN" ,Fct);
5eb16cbcb752d4abdf164f89a227e8cb43fb8cb8
449d555969bfd7befe906877abab098c6e63a0e8
/2498/CH6/EX6.4/ex6_4.sce
b553fb763fc4968d7e131bbf3e717816aca0dd9b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
314
sce
ex6_4.sce
// Exa 6.4 clc; clear; close; format('v',6) // Given data R1 = 1;// in k ohm R_F = 4.7;// in k ohm //The closed loop voltage gain, Ao = Vo/Vin = -R_F/R1; Ao = -R_F/R1; disp(Ao,"The closed loop voltage gain is"); // The input impedance Ri = R1;// in k ohm disp(Ri,"The input impedance in k ohm is");
5ba3e964e54683cc287ed4478cb295f1bcf28b65
80759a2d10af07813a07685cf1b41dc4ca8c45b5
/Scilab_codes_table1/FiLeMa5.sce
15eb1b3b23ade1b98936a2d3fe350479cbe0389b
[]
no_license
rafipra/Cummulative-Damage-JMVA
14c84d0c224629bec7b2db27f67892af03105045
42ea721fcef1a737c3eb1188211d8b59c661c8a1
refs/heads/master
2020-03-16T23:51:31.083536
2018-05-11T22:25:37
2018-05-11T22:25:37
133,093,870
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,169
sce
FiLeMa5.sce
n=4; p=5; p1=1/8; p2=1/8; p3=1/8; p4=1/8; p5=1/8; Pr=[p1;p2;p3;p4;p5]; M=20*n; T=zeros(p,1); S=zeros(p,M); omega=[1/8;1/8;1/8;1/8;1/8]*3; theta=omega./Pr; C=n*omega; N=1000; T1=0; T2=0; T3=0; T4=0; T5=0; T6=0; T7=0; T8=0; T9=0; T10=0; h1=1.610308; h2=2.342534; h3=2.999908; h4=3.655500; h5=4.351460; h6=5.131867; h7=6.064430; h8=7.289276; h9=9.236357; for k=1:N Y = grand(M, "mul", 1, Pr); k1=0; for j=1:M S(1,j)=sum(Y(1:1,1:j)); if S(1,j)<= C(1) then k1=k1+1; end end k2=0; for j=1:M S(2,j)=sum(Y(2:2,1:j)); if S(2,j)<= C(2) then k2=k2+1; end end k3=0; for j=1:M S(3,j)=sum(Y(3:3,1:j)); if S(3,j)<= C(3) then k3=k3+1; end end k4=0; for j=1:M S(4,j)=sum(Y(4:4,1:j)); if S(4,j)<= C(4) then k4=k4+1; end end k5=0; for j=1:M S(5,j)=sum(Y(5:5,1:j)); if S(5,j)<= C(5) then k5=k5+1; end end T=[k1+1;k2+1;k3+1;k4+1;k5+1]/n; PsiT=[(1/p1-1)*T(1),-min([T(1);T(2)]),-min([T(1);T(3)]),-min([T(1);T(4)]),-min([T(1);T(5)]); -min([T(1);T(2)]),(1/p2-1)*T(2),-min([T(3);T(2)]),-min([T(4);T(2)]),-min([T(5);T(2)]); -min([T(1);T(3)]),-min([T(2);T(3)]),(1/p3-1)*T(3),-min([T(4);T(3)]),-min([T(5);T(3)]); -min([T(1);T(4)]),-min([T(2);T(4)]),-min([T(3);T(4)]),(1/p4-1)*T(4),-min([T(5);T(4)]); -min([T(1);T(5)]),-min([T(2);T(5)]),-min([T(3);T(5)]),-min([T(4);T(5)]),(1/p5-1)*T(5)]; InvPsiT=inv(PsiT); CT=(T-theta)'*InvPsiT*(T-theta); ChiSquare=n*CT; if ChiSquare<h1 then T1=T1+1; end if h1<=ChiSquare & ChiSquare<=h2 then T2=T2+1; end if h2<=ChiSquare & ChiSquare<=h3 then T3=T3+1; end if h3<=ChiSquare & ChiSquare<=h4 then T4=T4+1; end if h4<=ChiSquare & ChiSquare<=h5 then T5=T5+1; end if h5<=ChiSquare & ChiSquare<=h6 then T6=T6+1; end if h6<=ChiSquare & ChiSquare<=h7 then T7=T7+1; end if h7<=ChiSquare & ChiSquare<=h8 then T8=T8+1; end if h8<=ChiSquare & ChiSquare<=h9 then T9=T9+1; end if h9<=ChiSquare then T10=T10+1; end end D=[T1,T2,T3,T4,T5,T6,T7,T8,T9,T10]; Percentage=(100/N)*D; U=(Percentage-10).^2/10; theta T Percentage D sum(U)
8e8c00a76df48e263f276510cffc79feac10d6df
d963a50c09b7380dd7b1b97cd9997e9bd17ea8f3
/r37/packages/invbase/invbase.tst
2426b92f7d0bf7377b5c2aa1319d9056c4839e7a
[ "BSD-3-Clause" ]
permissive
reduce-algebra/reduce-historical
8220e211b116e0e01ff1a38f51917cac9db6069f
e014152729c4d62bb1ce4f5c311a027042a5495a
refs/heads/master
2023-04-10T22:54:00.796596
2021-04-16T08:52:19
2021-04-16T08:52:19
343,245,204
7
1
NOASSERTION
2021-04-16T08:53:31
2021-03-01T00:15:22
TeX
UTF-8
Scilab
false
false
571
tst
invbase.tst
% ***** Example 1 ***** g:=invbase{4*x^2 + x*y^2 - z +1/4, 2*x + y^2*z + 1/2, x^2*z - 1/2*x - y^2}; h:=invlex g; % ***** Example 2 ***** on trinvbase$ invtorder revgradlex,{x,y,z}$ g:=invbase{x^3 + y^2 + z - 3, y^3 + z^2 + x - 3, z^3 + x^2 + y - 3}; h:=invlex g; % ***** Example 3 (limited by the degree bound) ***** invtorder revgradlex,{x,z,y,t}$ k:=5$ on errcont$ invbase{x^(k+1)-y^(k-1)*z*t, x*z^(k-1)-y**k, x^k*y-z^k*t}; invtempbasis; end$
a049a415b0c36578eeba19291afb664b0baf1e7b
449d555969bfd7befe906877abab098c6e63a0e8
/1397/CH1/EX1.7/1_7.sce
264bb84a1b48f83376f42768955225945b534479
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
346
sce
1_7.sce
//clc(); clear; // To calculate the wavelength of monochromatic light beeta=0.04; // fringe width in centimetres d=0.1; // seperation between slits in centimetres D=80; //distance between slits and screen in centimetres lambda=(d*beeta*10^8)/D; printf("the wavelength of monochromatic light is %f Armstrong",lambda);
ccdd757c8313eced3d4d2cd0f236f84174471c98
4d867edb7174c0010079141c803470bb315fb98c
/Scilab/2.4.sci
93e77354b31d5c21e44e3b1777a85769b85af6d6
[]
no_license
NirnaethArniedi/RapportScilab
73868dce23273fa00421c0580c32b22e4da5fda0
05dbf45db77061ea5f214d90fda5e5b155343a5c
refs/heads/master
2021-01-20T10:36:59.100534
2015-07-04T18:38:34
2015-07-04T18:38:34
21,175,471
0
0
null
2014-06-28T13:41:08
2014-06-24T18:08:27
TeX
UTF-8
Scilab
false
false
348
sci
2.4.sci
clf; n=20; N=2; p=0.7; nbSimulations = 30; a=-5; b=5; ecartType = sqrt(p*(1-p)); for j = 1:nbSimulations A = [0]; D = []; for i = 1:n B=rand(1,N^i); C=(B>=p)+[A,A]; A=C; E=(A>=(p*i+ecartType*a*sqrt(i))); D(i)=sum(E.*(A<=(p*i+ecartType*b*sqrt(i)))); end plot2d(D, style=rand()*10); end
97b92b95a4c68d532e792ce78691cd9f76bc787b
726961a3412b6d2fda7c781172773be5e27ac97a
/jflap-grades/tests/q02b.tst
68b0753fcb5471fdc6bdc2321e3d000aea0bbde0
[]
no_license
ailton07/jflap-grades-19-2
0546deb482e7f8e003591351191fa649d62fd405
ff58118d31aa30a0f56cae8e5f0186d44c1b72a8
refs/heads/master
2020-09-16T12:49:31.560841
2019-11-25T01:03:19
2019-11-25T01:03:19
223,774,968
0
0
null
null
null
null
UTF-8
Scilab
false
false
79
tst
q02b.tst
0 0.20 abbbaa 1 ababa 1 aaabbbb 1 bbbbbaaa 1 bbaa 0 ababababab 0 aaab 0 bbbb 0
2e2357457b4933f113841efc316fec008a44254c
449d555969bfd7befe906877abab098c6e63a0e8
/494/CH5/EX5.1/5_1.sce
ee17972a6058aeff92e87c17a7cbd2335a829135
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
699
sce
5_1.sce
//All the quantities are expressed in SI units AR = 8; //Aspect ratio of the wing alpha = 5*%pi/180; //Angle of attack experienced by the wing a0 = 2*%pi //airfoil lift curve slope alpha_L0 = 0; //zero lift angle of attack is zero since airfoil is symmetric //from fig. 5.20, for AR = 8 and taper ratio of 0.8 delta = 0.055; tow = delta; //given assumption //thus the lift curve slope for wing is given by a = a0/(1+(a0/%pi/AR/(1+tow))); //thus C_l can be calculated as C_l = a*alpha; //from eq.(5.61) C_Di = C_l^2/%pi/AR*(1+delta); printf("\nRESULTS\n--------\n Cl = %1.4f\n\n CD,i = %1.5f",C_l,C_Di)
d338207a88b0b086a2e7544cd33498738b308ce5
449d555969bfd7befe906877abab098c6e63a0e8
/3415/CH2/EX2.5/Ex2_5.sce
9d32c99ae532da2ba6be9cfa0d4c3498986ce759
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
555
sce
Ex2_5.sce
//fiber optic communications by joseph c. palais //example 2.5 //OS=Windows XP sp3 //Scilab version 5.4.1 clc clear all //given n1=1//refractive index of air d=1e-2//daimeter of circular photodetector in m f=10e-2//lense focal length in m //to find theta=asind(d/(2*f))//acceptance angle in degrees mprintf("Acceptance angle=%fdegree",theta) NA=n1*(sind(theta))//numerical aperture mprintf("\nNumerical Aperture=%f",NA) FCA=2*theta//full cone angle mprintf("\nFull cone angle=%fdegree",FCA)
03455ea72cce55cab985251d1b2e1e81e4ef0a5f
449d555969bfd7befe906877abab098c6e63a0e8
/83/CH7/EX7.2/example_7_2.sce
50258fe64485d9ba8b0496898467fe464eca00af
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
695
sce
example_7_2.sce
//Chapter 7 //Example 7.2 //page 248 //To find the saving in fuel cost by optimal scheduling clear;clc; //Example reveals that for optimal load sharing units 1&2 has to take up 50MW and 80MW respectively //If each unit supplies 65MW,increase in cost for units 1&2 are Increase1=integrate('0.2*Pg1+40','Pg1',50,65); Increase2=integrate('0.25*Pg2+30','Pg2',80,65); printf('\nIncrease in cost for unit 1 is = %0.1f Rs/hr',Increase1); printf('\n\nIncrease in cost for unit 2 is = %0.3f Rs/hr',Increase2); printf('\n\nNet saving caused by optimum scheduling is = %0.3f Rs/hr',Increase1+Increase2); printf('\n\nTotal yearly saving assuming continuous operation= Rs %d',(Increase1+Increase2)*24*365);
ca89c7c01d1251ed2122a2adc27487d724d340e8
449d555969bfd7befe906877abab098c6e63a0e8
/1535/CH13/EX13.4/Ch13Ex4.sci
ce398350c754c0d62c4abfb0bb6d84bb6eca823d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
569
sci
Ch13Ex4.sci
// Scilab Code Ex13.4: Relative dielectric constant : Page-288 (2010) epsilon_0 = 8.854e-012; // Absolute electrical permittivity of free space, farad per metre N = 3.0e+028; // Number density of solid elemental dielectric, atoms per metre cube alpha_e = 1e-040; // Electronic polarizability, farad metre square epsilon_r = 1 + N*alpha_e/epsilon_0; // Relative dielectric constant of the material printf("\nThe Relative dielectric constant of the material = %5.3f", epsilon_r); // Result // The Relative dielectric constant of the material = 1.339
d83db8db09efe7a4d3ae2232fad51ac1ae79c8d6
449d555969bfd7befe906877abab098c6e63a0e8
/3863/CH1/EX1.3/Ex1_3.sce
5d869ed894d66f974a3dc3cf5b9bf5390893cd30
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
442
sce
Ex1_3.sce
clear // //Given //Variable declaration D=25 //Diameter of brass rod in mm P=50*10**3 //Tensile load in N L=250 //Length of rod in mm dL=0.3 //Extension of rod in mm //Calculation A=(%pi/4)*(D**2) //Area of rod in sq.mm sigma=(P/A) //Stress in N/sq.mm e=dL/L //Strain E=(sigma/e) //Youngs Modulus in N/sq.m //Result printf("\n Youngs Modulus of a rod,E = %0.3f GN/m^2",E*(10**-3))
a2fbe6880c250d136f5e4c80f8e6e95be45a6d29
449d555969bfd7befe906877abab098c6e63a0e8
/1538/CH10/EX10.9/Ex10_9.sce
bf73108df57ee592bcbaacb2623740ef34749eec
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
922
sce
Ex10_9.sce
//example-10.9 //page no-330 //given //ASTM number of grain n=5 //as we know that N=2^(n-1) //grains/inche^2 at magnification 100* // as lineal and areal magnifications are related as *100=10,000 areal N1=N/0.01/0.01 //grains/inch^2 at 1* //average area of one grain A=2.54*2.54/N1 //cm^2 //now N1 grains/ inch^2 of surface is = sqrt(160,000)=400 grain/inch of length and this is equal to =(400)^3=6.4*10^7 grains/m^3 of volume //surface area of eaxh cubic surface S=(1/400)^2 //inch^2 //there are 6 surfaces in a cubic grain //so total surface area of each grain TS=6*S //inch^2 //each boundary is composed of two grain surfaces, therefore , total boundary in the volume is TotS=1/2*TS*(400)^3 //inch^2 boundary per cubic of steel //total suface area in cm^2 TotalS=TotS/(2.54) //cm^2 boundary per cubic cm of steel printf ("total boundary in the volume is %f cm^2 per cm^3 of steel",TotalS)
5fe21c200082321a10f00c8f04212291f5df35bd
449d555969bfd7befe906877abab098c6e63a0e8
/3269/CH2/EX2.3/Ex2_3.sce
27a1fb85f53f7f276b7f1e6162370a3d0b5af387
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
685
sce
Ex2_3.sce
// Example 2.3 clear all; clc; // Given data me = 9.1095*10^(-28); // Mass of electron in grams c = 2.9979*10^10; // Speed of light in vacuum in cm/sec // Calculation rest_mass = me*c^2; // Result printf('\n Rest mass energy of electron = %5.4E ergs\n',rest_mass); disp('Expressing the result in joules') // 1 Joule = 10^(-7)ergs rest_mass_j = rest_mass*10^(-7); printf('\n Rest mass energy of electron = %5.4E joules\n',rest_mass_j); disp('Expressing the result in MeV') // 1 MeV = 1.6022*10^(-13)joules rest_mass_mev = rest_mass_j/(1.6022*10^(-13)); printf('\n Rest mass energy of electron = %5.4f MeV\n',rest_mass_mev);
e39a227128dc41620335da9223ea2418cca26db4
449d555969bfd7befe906877abab098c6e63a0e8
/28/CH6/EX6.1/ex6_1.sce
6bb3482a82fc6e68201a83bedad088ec29df6574
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
367
sce
ex6_1.sce
s=%s; p=s^4+8*s^3+18*s^2+16*s+5 r=coeff(p) D1=r(4) d2=[r(4) r(5);r(2) r(3)] D2=det(d2); d3=[r(4) r(5) 0;r(2) r(3) r(4);0 r(1) r(2)] D3=det(d3); d4=[r(4) r(5) 0 0;r(2) r(3) r(4) r(5);0 r(1) r(2) r(3);0 0 0 r(1)] D4=det(d4); disp(D1,"D1=") disp(D2,"D2=") disp(D3,"D3=") disp(D4,"D4=") printf("Since all the determinants are positive the system is stable")
f4b916163bd492a31d1ab606dbb6e0f530c0f1e1
449d555969bfd7befe906877abab098c6e63a0e8
/2204/CH5/EX5.7/ex5_7.sce
48698eb57d8919c68a4dc38678b4f0c36cdd9934
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
ex5_7.sce
// Exa 5.7 clc; clear; close; // Given data f_c = 1;// in kHz f_c = f_c * 10^3;// in Hz C2 = 0.0047;// in µF C2 = C2 * 10^-6;// in F C3 = C2;// in F C = C2;// in F R2 = 1/(2*%pi*f_c*C);// in ohm R2 = R2 * 10^-3;// in k ohm R3= R2;// in kohm // Let R1=30;// in kohm R_F= R1*0.586;// in kohm disp(floor(R2),"The value of R2 and R3 in kΩ is : ") disp(R1,"The value of R1 in kΩ is : ") disp(R_F,"The value of R_F in kΩ is : ") disp("The standard value of R_F is 20 kΩ")
75dd45b4cd07f7d54524d32bc9c4a23e40e68653
449d555969bfd7befe906877abab098c6e63a0e8
/1523/CH3/EX3.45/3_45.sce
3a545932d20ca000eac3427bc025d4c326c359be
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
724
sce
3_45.sce
//Network Theorem 1 //page no-3.51 //example3.45 //calculation of Vth disp("Removing the variable resistor RL from the network:"); disp("I1=3 A");....//equation 1 disp("Applying KVL to the mesh 2:"); disp("-25*I1+41*I2=0");....//equation 2 A=[1 0;-25 41]; B=[3 0]' X=inv(A)*B; disp(X); disp("I2 = 1.83 A"); disp("Writing Vth equation,"); a=1.83; v=-20+(10*a)+(6*a); printf("\nVth = %.2f V",v); //calculation of Rth disp("replacing the current source of 50 A by an open circuit "); x=25; y=16; m=((x*y)/(x+y)); printf("\nRth = %.2f Ohm",m); //calculation of RL disp("For maximum power transfer"); printf("\nRth = RL =%.2f Ohm",m); //calculation of Pmax n=(v^2)/(4*m); printf("\nPmax = %.2f W",n);
b87279b2ccafcb327306da0ccfb6791aee8bca15
449d555969bfd7befe906877abab098c6e63a0e8
/1928/CH3/EX3.17.7/ex_3_17_7.sce
f2219053f7b5fb79b288d221fae383b3fb8ca62a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
ex_3_17_7.sce
//Chapter-3,Example3_17_7,pg 3-37 T=300 //temperature of paramagnetic material X=3.7*10^-3 //susceptibility of material C=X*T //using Curie's law T1=250 //temperature T2=600 //temperature u1=C/T1 //relative permeability of material at 250k u2=C/T2 //relative permeability of material at 350k printf("relative permeability at temp 250K=") disp(u1) printf("relative permeability at temp 600K =") disp(u2)
c00017d4317dded9f57a0e795c8b9b5b9b3c2b5a
449d555969bfd7befe906877abab098c6e63a0e8
/3718/CH13/EX13.9/Ex13_9.sce
370840394d8523f3c8bf152a1c5ee925afefdced
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
704
sce
Ex13_9.sce
//Chapter 13: Fuel and Combustions //Problem: 9 clc; //Declaration of Variables wt_C = 3 // kg // Solution wt_a = wt_C * 32 * 100 / 12.0 / 23.0 vol_a = wt_a * 1000 * 22.4 / 28.94 mprintf("H2(g) + 1/2 O2(g) --> H20(l)\n") mprintf(" 1 0.5 1\t\t(By Vol.)\n") mprintf(" CO(g) + 1/2 O2(g) --> CO2(g)\n") mprintf(" 1 0.5 1\t\t(By Vol.)\n") mprintf(" CH4(g) + 2 O2(g) --> CO2(g) + 2H2O(l)\n") mprintf(" 1 2 1\t\t(By Vol.)\n") mprintf(" Weight of air for the combustion of 3kg carbon %.3f kg\n",wt_a) mprintf(" Vol. of air required for combustion of 3kg carbon %.3e L (or) %.2f metre cube",vol_a,vol_a / 1000)
1f66ee7d99c524e03edd6902496297b43297524b
449d555969bfd7befe906877abab098c6e63a0e8
/2234/CH5/EX5.17/ex5_17.sce
4feb1acd3f5472304fe30f16054c9e4350ef7f8e
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
634
sce
ex5_17.sce
clc; disp("3I1-I2-1=0 (1)"); //KVL equation disp("3I1-I2+2I=2 (2)"); //KVL equation disp("3I1-I1+2I=2 (3)"); //KVL equation I1=0.2352; //from (1)(2)(3)through AB I2=-0.11764; //from (1)(2)(3)through BD I=0.58823; //from (1)(2)(3)through main circuit Ig=-0.117647; //current in Ampere Ibc=I1-I2; //calculating current in BC Iad=I-I1; //calculating current in AD Idc=I-I1-Ig; //calculating current in DC disp(Ibc,"Current in branch BC in Ampere = "); //displaying result disp(Iad,"Current in branch AD in Ampere = "); //displaying result disp(Idc,"Current in branch DC in Ampere = "); //displaying result
b448615ce9879ae8e32272bb943952e5b9043b8c
449d555969bfd7befe906877abab098c6e63a0e8
/581/CH5/EX5.13/Example5_13.sce
fcb4465a9c5fee24bacc8e0f95b983180f45027d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
320
sce
Example5_13.sce
clear; clc; printf("\t Example 5.13\n"); T1=373; // temperature of iron rod,K T2=293; // temperature of coolant,K //Biot no., Bi1=Bi2=0.2105,Fo1=Fo2=0.565 a1=0.10; a2=0.10; a=a1+a2*(1-a1); T=(T1-T2)*(1-a)+T2; //mean temperature,K Ta=T-273; printf("\t mean temperature is : %.1f C\n",Ta); //end
a08e01279f1da10eac7d75bd3e74a9b54420f83e
449d555969bfd7befe906877abab098c6e63a0e8
/2705/CH7/EX7.5/Ex7_5.sce
53cec3d7a3b727e7a68172537aabc905d0fb1b29
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,305
sce
Ex7_5.sce
clear; clc; disp('Example 7.5'); // aim : To determine // the final condition of steam... // the change in specific entropy during hyperbolic process // Given values P1 = 2;// pressure, [MN/m^2] t = 250;// temperature, [C] P2 = .36;// pressure, [MN/m^2] P3 = .06;// pressure, [MN/m^2] // solution // (a) // from steam table s1 = 6.545;// [kJ/kg K] // at .36 MN/m^2 sg = 6.930;// [kJ/kg*K] sf2 = 1.738;// [kJ/kg K] sfg2 = 5.192;// [kJ/kg K] vg2 = .510;// [m^3] // so after isentropic expansion, steam is wet // hence, s2=sf2+x2*sfg2, where x2 is dryness fraction // also s2 = s1; // so x2 = (s2-sf2)/sfg2; // and v2 = x2*vg2;// [m^3] // for hyperbolic process // P2*v2=P3*v3 // hence v3 = P2*v2/P3;// [m^3] mprintf('\n (a) From steam table at .06 MN/m^2 steam is superheated and has temperature of 100 C with specific volume is = %f m^3/kg\n',v3); // (b) // at this condition s3 = 7.609;// [kJ/kg*K] // hence change_s23 = s3-sg;// change in specific entropy during the hyperblic process[kJ/kg*K] mprintf('\n (b) The change in specific entropy during the hyperbolic process is = %f kJ/kg K\n',change_s23); // In the book they have taken sg instead of s2 for part (b), so answer is not matching // End
ecd4c53c690d6a2a3fb436414e7454a04e51ac2e
a159f59d19e2b03b234e9c2977ba4a932180e648
/Software/GreenScilabV0.9/macros/gl_qorg.sci
524aa222099a2ecd331675d8d76578367446d170
[]
no_license
OpenAgricultureFoundation/openag_sim
e052bbcc31b1d7f9b84add066327b479785f8723
425e678b55e24b5848d17181d25770175b8c2c3f
refs/heads/master
2021-07-01T06:25:08.753260
2017-09-20T21:44:18
2017-09-20T21:44:18
80,540,145
0
1
null
null
null
null
UTF-8
Scilab
false
false
6,468
sci
gl_qorg.sci
function [q_O,q_L,QO] = gl_qorg(J,maxp,Q,QO,q_O,q_L,DL,coff_L,Nb_BI,MAT_EX,Nb_O,RingOption,I_H) //%calculate biomass partition to each kind of organ //q_O(id, p,i,j):biomass to orang id with p phy age locates at position i in plant with chr age j // j is the age of plant, i is position of organ from top, also age of the organ // one is to get the size of organ--Q_O; the other is to know total biomass distribution //biomass for single organ q_O(id, p,i, J)= q_O(id, p,i, J-1)+MAT_EX(id,p,J,i) * Q(J ,1) //biomass repartition QO(id,p,J)=sum(MAT_EX(id,p,J,1:J).*Nb_O(id,p,1:J) * Q(J ,1)) //accumulated biomass distribution QO_T(id,J) OrganType=size(Nb_O,1); // steps: 1 get new biomass for organs. 2 accumulate for p = 1:maxp ; for id = 1:OrganType; for i = 1:J; //i is chr_age of organs select id case 1 then //blade if Nb_O(id,1,i,J,J,p)>0 then // organ must exist q_O(id, p,i, J) =MAT_EX(id,p,i,J) * Q(J,1 ); //new biomass for organ(id, p,i,) in cycle J--new organ or organ expansion end; if i>1 then //accumulate, add new biomass to that of previous cycle q_O(id,p,i,J) =q_O(id, p,i-1, J-1)+MAT_EX(id,p,i,J) * Q(J,1); end; case 2 then // petiole if Nb_O(id,1,i,J,J,p)>0 then // organ must exist q_O(id, p,i, J) =MAT_EX(id,p,i,J) * Q(J,1 ); //new biomass for organ(id, p,i,) in cycle J--new organ or organ expansion end; if i>1 then //accumulate, add new biomass to that of previous cycle q_O(id,p,i,J) =q_O(id, p,i-1, J-1)+MAT_EX(id,p,i,J) * Q(J,1); end; case 3 then //internode if Nb_O(id,1,i,J,J,p)>0 then // organ must exist q_O(id, p,i, J) =MAT_EX(id,p,i,J) * Q(J,1 ); //new biomass for organ(id, p,i,) in cycle J--new organ or organ expansion end; if i>1 then //accumulate, add new biomass to that of previous cycle q_O(id,p,i,J) =q_O(id, p,i-1, J-1)+MAT_EX(id,p,i,J) * Q(J,1); end; case 4 then //female flower, male flower, if i>1 then if Nb_O(id,1,i-1,J-1,J-1,p)>0 then // organ must exist q_O(id,p,i,J) =MAT_EX(id,p,i-1,J-1) * Q(J,1 ); //new biomass in cycle J end; if i>2 then //accumulate q_O(id,p,i,J) = q_O(id, p,i-1, J-1)+MAT_EX(id,p,i-1,J-1) * Q(J,1 ); end; end; case 5 then //female flower, male flower, if i>1 then if Nb_O(id,1,i-1,J-1,J-1,p)>0 then // organ must exist in last cycle. They compete the biomass with other organs in current cycle q_O(id,p,i,J) =MAT_EX(id,p,i-1,J-1) * Q(J,1 ); //new biomass in cycle J end; if i>2 then //accumulate q_O(id,p,i,J) = q_O(id, p,i-1, J-1)+MAT_EX(id,p,i-1,J-1) * Q(J,1 ); end; end; case 6 then //layer,root if i>1 then q_O(id,p,i,J) = MAT_EX(id,p,i,J) * Q(J,1 ); //new biomass in cycle J if i>2 then //accumulate q_O(id,p,i,J) = q_O(id, p,i-1, J-1)+MAT_EX(id,p,i,J) * Q(J,1 ); end; end; case 7 then //layer,root if i>1 then q_O(id,p,i,J) = MAT_EX(id,p,i,J) * Q(J,1 ); //new biomass in cycle J if i>2 then //accumulate q_O(id,p,i,J) = q_O(id, p,i-1, J-1)+MAT_EX(id,p,i,J) * Q(J,1 ); end; end; end; end; select id case 1 then //blade, petiel, internode tt1=matrix(MAT_EX(id,p,1:J,J),1,J) tt2=matrix(Nb_O(id,1,1:J,J,J,p),1,J); QO(id,p,J)=sum(tt1.*tt2) * Q(J,1); case 2 then //blade, petiel, internode tt1=matrix(MAT_EX(id,p,1:J,J),1,J) tt2=matrix(Nb_O(id,1,1:J,J,J,p),1,J); QO(id,p,J)=sum(tt1.*tt2) * Q(J,1); case 3 then //blade, petiel, internode tt1=matrix(MAT_EX(id,p,1:J,J),1,J) tt2=matrix(Nb_O(id,1,1:J,J,J,p),1,J); QO(id,p,J)=sum(tt1.*tt2) * Q(J,1); case 4 then //female flower, male flower, if J>1 then tt1=matrix(MAT_EX(id,p,1:J-1,J-1),1,J-1); tt2=matrix(Nb_O(id,1,1:J-1,J-1,J-1,p),1,J-1); QO(id,p,J)=sum(tt1.*tt2) * Q(J,1); end; case 5 then //female flower, male flower, if J>1 then tt1=matrix(MAT_EX(id,p,1:J-1,J-1),1,J-1); tt2=matrix(Nb_O(id,1,1:J-1,J-1,J-1,p),1,J-1); QO(id,p,J)=sum(tt1.*tt2) * Q(J,1); end; case 6 then //layer,root if J>1 then tt1=matrix(MAT_EX(id,p,1:J-1,J-1),1,J-1); tt2=matrix(Nb_O(id,1,1:J-1,J-1,J-1,p),1,J-1); QO(id,p,J)=sum(tt1.*tt2) * Q(J,1); end; case 7 then //layer,root if J>1 then tt1=matrix(MAT_EX(id,p,1:J-1,J-1),1,J-1); tt2=matrix(Nb_O(id,1,1:J-1,J-1,J-1,p),1,J-1); QO(id,p,J)=sum(tt1.*tt2) * Q(J,1); end; end; end; //id end;//p clear("tt1"); clear("tt2"); if J>1 then //only plant older than 1 can layer exist QL = sum(QO(6,:,J)); //total biomass for layer of GUs in last cycle for p =1:maxp for i = 1:J; // i is the age when the organ is produced, or CA of substructure if DL(1,J-1,J-1)>0 then for j = 1:i; //for each GU of CA j if j>1 then if sum(Nb_O(3,1,1:j-1,i-1,J-1,:,:))>0 then q_L(p,j,i,J) = coff_L*Nb_BI(p,j-1,i-1,i-1)/DL(1,J-1,J-1)*QL+ (1-coff_L)* QL/sum(Nb_O(3,1,1:j-1,i-1,J-1,:,:)); //biomass for layer of last cycle else q_L(p,j,i,J) = coff_L*Nb_BI(p,j-1,i-1,i-1)/DL(1,J-1,J-1)*QL; end end; end; end; end; end; end endfunction
5646762f94ba22710a20922be356392e20e81d91
449d555969bfd7befe906877abab098c6e63a0e8
/1538/CH20/EX20.4/Ex20_4.sce
c7731b31038f7ef30316c6c0d6e2e68f14396acf
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
Ex20_4.sce
//example-20.4 //page no-596 //given //charge Q=10*10^-6 //C //voltage V=10*10^3 //V //seperation betweemn the plates d=5*10^-4 //m //dielectric eonstant Er=10 E0=8.854*10^-12 //we know that //Q=C*V //so C=Q/V //F //also we know that //C=Er*E0*A/d //so A=C*d/Er/E0 //m^2 printf ("area between the plates is %f m^2",A)
bfd2ead84edcb387605f32214d602a3cdd401ca9
afcf746e249b9463101019f07a47845355c6acc2
/starter_files/hw2/Expander16.tst
81df1c7d37d9158b4ec386fb7a6b0bde5feb0956
[]
no_license
jyuan2pace/CS506
afca44ee8df14436d72de97e658a61841091e651
fa80d2786f006c226c6e6413ee23fe306d6c57d0
refs/heads/master
2020-07-28T13:04:37.077116
2019-11-24T20:15:20
2019-11-24T20:15:20
209,419,478
8
11
null
null
null
null
UTF-8
Scilab
false
false
173
tst
Expander16.tst
load Expander16.hdl, output-file Expander16.out, compare-to Expander16.cmp, output-list in%B3.1.3 out%B3.16.3; set in 0, eval, output; set in 1, eval, output;
755dd0cd16eddca5db4ea3bdee73adebf404d9db
449d555969bfd7befe906877abab098c6e63a0e8
/2273/CH7/EX7.6/ex7_6.sce
14d78b7cfca3a8b702f553b8e1b9f03c375b3306
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
516
sce
ex7_6.sce
//Determine critical discruptive voltage for line and corona loss clear; clc; //soltion //given Vph1=106/sqrt(3);//kV Pc1=54;//kW//loss at Vph1 Vph2=110/sqrt(3);//kV Pc2=95;//kW//loss at Vph2 Vphu=115/sqrt(3);//kV printf("Pc α (Vph-Vdo)^2\n"); Vdo=poly(0,"Vdo"); A=roots((Vph1-Vdo)^2*Pc2-(Vph2-Vdo)^2*Pc1); Vdo=54.123123;//after the solution of roots Pcu=Pc1*((Vphu-Vdo)^2)/((Vph1-Vdo)^2) printf("Corona loss at 115 kV= %.2f kW\n",Pcu); printf("Critical discruptive voltage= %.2f kV",sqrt(3)*Vdo);
ca9dbad2b5384c777b8038b38f9c911bdfbcaec0
449d555969bfd7befe906877abab098c6e63a0e8
/2708/CH16/EX16.6/ex_16_6.sce
200b88673f9dbace6b018086bdd1f2421758a19f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
334
sce
ex_16_6.sce
//Example 16.6 //energy of photoelectrons emitted clc; clear; //given data : h=6.62D-34;// plank's constant in joules-sec c=3D8;//speed of ight lamda=6D-7;// Threshlod wavelength in m v=6D14;// frequency in Hz E=h*(v-c/lamda);// energy in joules E=E/1.6D-19;// to convert in eV disp(E,"energy of electrons emitted in eV")
96fef468f430508265d23faf697c147aebd7a1cf
449d555969bfd7befe906877abab098c6e63a0e8
/1286/CH3/EX3.5/3_5.sce
e0b34b1beb6d17768f5e16d7ebbd82f5bee5f789
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
317
sce
3_5.sce
clc //initialisation of variables mc=0.1//kg vl1=150//cc vl2=150//cc hl1=600 gl1=1200 hl2=400 gl2=900 t1=50//c t2=40//c sc=100 r1=2 //CALCULATIIONS m1=vl1*gl1/(10^6) rc1=(m1*hl1+mc*sc)*r1 k= -rc1/t1 m2=vl2*gl2/(10^6) b=(m2*hl2+mc*sc) j=-k*t2 //results printf(' rate of cooling= % 1f cal/min',j)
ee401df9ac32d137817358dac44c37923b88aec4
449d555969bfd7befe906877abab098c6e63a0e8
/3281/CH2/EX2.27/ex2_27.sce
96792321dd347c151b9dab2fc1db712e775c4d75
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,071
sce
ex2_27.sce
//Page Number: 110 //Example 2.27 clc; //Given c=3D+8; //m/s a=0.5; //cm a1=a/100; //m f=14D+9; //Hz er=2.08; p11=1.841; p01=2.405; tandel=4D-4; w=2*%pi*f; u=%pi*4D-7; sig=4.1D+7; et=377; //(i) Cut off frequencies fcte11=p11*c/(2*%pi*a1*sqrt(er)); fctm01=p01*c/(2*%pi*a1*sqrt(er)); disp('Ghz',fcte11/10^9,'Cut off frequencies for TE11 mode:'); disp('Ghz',fctm01/10^9,'Cut off frequencies for TM01 mode:'); //(ii) Overall noise //Dielectric attenuation ad=(%pi*sqrt(er)*tandel*f)/(c*sqrt(1-((fcte11/f)^2))); disp('dB/m',ad*8.686,'Dielectric attenuation:'); //Conductor attenuation k=(2*%pi*f*sqrt(er))/c; bet=sqrt((k*k)-((p11/a1)^2)); //Surface resistance rs=sqrt((w*u)/(2*sig)); kc2=(p11/a1)^2; ac=(rs*(kc2-((k^2)/((p11^2)-1))))/(a1*k*et*bet); disp('dB/m',ac*8.686,'Conductor attenuation:'); //Total attenuation a=(ac+ad)*8.686; disp('dB/m',a,'Total attenuation:'); ta=a*0.3; disp('dB',ta,'Total attenuation in 30 cm line:'); //Answer for condcutor attenuation is wrong in book, hence answer for total loss is different
6832e521eadec095b9104505aa4cf2c25c208f35
449d555969bfd7befe906877abab098c6e63a0e8
/172/CH3/EX3.4/ex4.sce
3ecbb5a5c0023702be1891fb67280c00a7565d18
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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
ex4.sce
//example 4 //percentage of vapor clear clc vliq=0.1 //volume of saturated liquid in m^3 vf=0.000843 //in m^3/kg vvap=0.9 //volume of saturated vapor R-134a in equilbrium vg=0.02671 //in m^3/kg mliq=vliq/vf //mass of liquid in kg mvap=vvap/vg //mass of vapor in kg m=mliq+mvap //total mass in kg x=mvap/m //percentage of vapor on mass basis disp('hence,% vapor on mass basis is 22.1')
473b50cd2738b3c0ac817d0aa32cef4fc7e9ed1e
449d555969bfd7befe906877abab098c6e63a0e8
/2840/CH11/EX11.1/ex11_1.sce
fdc207a38732a7d49216cfe82f0ebc2046903ce1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
305
sce
ex11_1.sce
clc; clear all; Pi=0.47;//given resistivity of intrinsic germanium sigmai=1/Pi;//conductance e=1.6*1e-19;//charge of electron ue=0.38;//electron mobility up=0.18;//hole mobility ni=sigmai/(e*(ue+up));//intrinsic carrier density at 300K disp('m^-3',ni,'intrinsic carrier density at 300K temp=');
3bbcbbc9ebb007bb7459cd675f239fa6eba0bc59
449d555969bfd7befe906877abab098c6e63a0e8
/3411/CH5/EX5.12/Ex5_12.sce
04af73bb15635e1383318cc8f7b1cbf84b156712
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
386
sce
Ex5_12.sce
//Example 5_12 clc(); clear; //To determine the lattice constant lamda=0.154 //units in nm h=1 k=1 l=0 theta=20 //units in degrees a=(lamda/2)*(sqrt(sqrt(h^2+k^2+l^2)/sin(theta*(%pi/180))^2)) //units in nm printf("Lattice constant a=%.3fnm \n And the element is tungsten Since Tungsten has lattice constant of %.3fnm and crystallizes in bcc structure",a,a)
1b457cccefb3a62f8043135b3a988369f0b88f01
449d555969bfd7befe906877abab098c6e63a0e8
/48/CH4/EX4.4/eg_4_4.sce
72151f2aabb63fdeb7e5b7fd65545dc2da0efe7d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,093
sce
eg_4_4.sce
clc; n=10; //coverting decimal numbers into excess 3 values for i=0:n-1 c(i+1,1)=dec21bin(i+3); end a=c; b=zeros(10,4); //placing excess 3 outputs in matrix for convenience for i=1:n j=4; while(a(i,1)>=1) b(i,j)=round(modulo(a(i,1),10)); a(i,1)=a(i,1)/10; j=j-1; end end //dont care is represented by a 2 since scilab doesnt allow a matrix to contain string and a number. for i=n+1:16 b(i,:)=[2 2 2 2]; end //map of each output variable z=[b(1,1) b(5,1) b(13,1) b(9,1);b(2,1) b(6,1) b(14,1) b(10,1); b(3,1) b(7,1) b(15,1) b(11,1);b(4,1) b(8,1) b(16,1) b(12,1)]; y=[b(1,2) b(5,2) b(13,2) b(9,2);b(2,2) b(6,2) b(14,2) b(10,2); b(3,2) b(7,2) b(15,2) b(11,2);b(4,2) b(8,2) b(16,2) b(12,2)]; w=[b(1,3) b(5,3) b(13,3) b(9,3);b(2,3) b(6,3) b(14,3) b(10,3); b(3,3) b(7,3) b(15,3) b(11,3);b(4,3) b(8,3) b(16,3) b(12,3)]; x=[b(1,4) b(5,4) b(13,4) b(9,4);b(2,4) b(6,4) b(14,4) b(10,4); b(3,4) b(7,4) b(15,4) b(11,4);b(4,4) b(8,4) b(16,4) b(12,4)]; donkmap(w,1); donkmap(x,2); donkmap(y,3); donkmap(z,4);
7a806483cf046998cba912952118feceea4044cd
8781912fe931b72e88f06cb03f2a6e1e617f37fe
/scilab/gr_harm_easa/in/method_parts.sce
9d3e4659be5aae3139d059317332e04094521357
[]
no_license
mikeg2105/matlab-old
fe216267968984e9fb0a0bdc4b9ab5a7dd6e306e
eac168097f9060b4787ee17e3a97f2099f8182c1
refs/heads/master
2021-05-01T07:58:19.274277
2018-02-11T22:09:18
2018-02-11T22:09:18
121,167,118
1
0
null
null
null
null
UTF-8
Scilab
false
false
24,241
sce
method_parts.sce
function [alp,cux,cuy,cuz,uxx,uxy,uxz,uyy,uyz,uzz,qxx,qxy,qxz,qyy,qyz,qzz,dxuxx,dxuxy,dxuxz,dxuyy,dxuyz,dxuzz,... dyuxx,dyuxy,dyuxz,dyuyy,dyuyz,dyuzz,... dzuxx,dzuxy,dzuxz,dzuyy,dzuyz,dzuzz]=method_parts(... nx,ny,nz,... dt,dx,dy,dz,... x,y,z,r,... txx, txy, txz, tyy, tyz, tzz,... psi,alp,cux,cuy,cuz,rg,... uxx,uxy,uxz,uyy,uyz,uzz,... gxx,gxy,gxz,gyy,gyz,gzz,... qxx,qxy,qxz,qyy,qyz,qzz,... dxuxx,dxuxy,dxuxz,dxuyy,dxuyz,dxuzz,... dyuxx,dyuxy,dyuxz,dyuyy,dyuyz,dyuzz,... dzuxx,dzuxy,dzuxz,dzuyy,dzuyz,dzuzz... ) //UNTITLED1 Summary of this function goes here // Detailed explanation goes here //============================================================================== // // [ROUTINE NAME] method // [AUTHOR] Joan Masso, NCSA & UIB // // [PURPOSE] Evolve the metric quantities one time step // using a simple finite differencing CFD-like method: Macormack. // The finite differences are implemented using triplet notation // and assuming a regularly spaced grid of dx,dy,dz. // // Our system of equations is of the form: // $\partial_t U - \partial_d F^d (U) = S(U)$ // with the vector $U$ being all the 34 metric quantities evolved // and the flux vector running over the coords $F = (Fx,Fy,Fz)$. // // U = ( alp,cux,cuy,cuz, // uxx,uxy,uxz,uyy,uyz,uzz, // qxx,qxy,qxz,qyy,qyz,qzz, // dxuxx,dxuxy,dxuxz,dxuyy,dxuyz,dxuzz, // dyuxx,dyuxy,dyuxz,dyuyy,dyuyz,dyuzz, // dzuxx,dzuxy,dzuxz,dzuyy,dzuyz,dzuzz ) // // Some of these variables do not have sources and others do not // have fluxes. See the Sources and Fluxes routines. // // The Macormack method evolves $U$ with the following algorithm: // // First, take a predictor step with backward finite differences: // U^p_{ijk} = U^n_{i,j,k} + dt S(U^n_{i,j,k}) // + dt./dx (Fx^n_{i,j,k} - Fx^n_{i-1,j,k}) // + dt./dy (Fy^n_{i,j,k} - Fy^n_{i,j-1,k}) // + dt./dz (Fz^n_{i,j,k} - Fz^n_{i,j,k-1}) // where $U^n_{ijk}$ is U at time step n and grid point i,j,k. // and the $U^p$ denotes a predicted value. // NOTE that given our cube, this predicted step can be done, in a // given direction (say x), from grid points 2 to nx, as it needs i-1. // // Then, take a corrector step with forward finite differencing using // the predicted values : // U^c_{ijk} = U^p_{i,j,k} + dt S(U^p_{i,j,k}) // + dt./dx (Fx^p_{i+1,j,k} - Fx^p_{i,j,k}) // + dt./dy (Fy^p_{i,j+1,k} - Fy^p_{i,j,k}) // + dt./dz (Fz^p_{i,j,k+1} - Fz^p_{i,j,k}) // NOTE that now we can correct only from 2 to nx-1, as we have a // prediction for nx that is necessary for the i+1 but we do not have // a predicted value for point 1. // // Finally, the evolved value at the next time step n+1 is the average of // the value at time step n and the correction: // // U^{n+1}_{ijk} = (U^{n}_{ijk} + U^{c}_{ijk})./2 // // For more details, see my thesis: // "Numerical Relativity: The Quest for a 3-D Code", // University of the Balearic Islands, 1992. // // [ARGUMENTS] // [INPUT] // nx,ny,nz : grid sizes of the 3d cube. // dt : Time Step to evolve. // dx,dy,dz : grid spacings that will be used for the finite diff. // Full list of grid and metric arrays. The grid arrays are NOT used // but passed to be able to use the metric.h file. // [OUTPUT] // Full list of metric arrays evolved. // // [INCLUDES] metric.h declares all the passed grid and metric arrays. // // [CALLED BY] h3.m // [CALLS TO] sources.m // fluxes.m // invert.m // // [WARNING] // The boundaries, despite being changed in the predictor step, // have not been corrected and, therefore. boundary conditions // need to be applied after this evolution. // // NOTE that gxx,gxy,... and rg are auxiliar quantities that // do not form part of the evolved metric. // // Also note that they are not recomputed after the corrector // step as they will be recomputed at the Boundaries routine. // But note that invert IS called after the predictor step // so we have a predicted value for the "down" metric that // is necessary for the equations. // //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // .*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* // Macormack with sources // .*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* // declare metric vars ............................................... //#include "metric.h" // declare old vars................................................... // That is, the whole vector U at the time step n. // real old_alp(nx,ny,nz) // real old_cux(nx,ny,nz),old_cuy(nx,ny,nz),old_cuz(nx,ny,nz) // real old_uxx(nx,ny,nz),old_uxy(nx,ny,nz),old_uxz(nx,ny,nz) // & ,old_uyy(nx,ny,nz),old_uyz(nx,ny,nz),old_uzz(nx,ny,nz) // real old_qxx(nx,ny,nz),old_qxy(nx,ny,nz),old_qxz(nx,ny,nz) // & ,old_qyy(nx,ny,nz),old_qyz(nx,ny,nz),old_qzz(nx,ny,nz) // real old_dxuxx(nx,ny,nz),old_dxuxy(nx,ny,nz),old_dxuxz(nx,ny,nz) // & ,old_dxuyy(nx,ny,nz),old_dxuyz(nx,ny,nz),old_dxuzz(nx,ny,nz) // real old_dyuxx(nx,ny,nz),old_dyuxy(nx,ny,nz),old_dyuxz(nx,ny,nz) // & ,old_dyuyy(nx,ny,nz),old_dyuyz(nx,ny,nz),old_dyuzz(nx,ny,nz) // real old_dzuxx(nx,ny,nz),old_dzuxy(nx,ny,nz),old_dzuxz(nx,ny,nz) // & ,old_dzuyy(nx,ny,nz),old_dzuyz(nx,ny,nz),old_dzuzz(nx,ny,nz) // declare sources ................................................... // Only for the quantities that do have sources. // real s_alp(nx,ny,nz) // real s_cux(nx,ny,nz),s_cuy(nx,ny,nz),s_cuz(nx,ny,nz) // real s_uxx(nx,ny,nz),s_uxy(nx,ny,nz),s_uxz(nx,ny,nz) // & ,s_uyy(nx,ny,nz),s_uyz(nx,ny,nz),s_uzz(nx,ny,nz) // real s_qxx(nx,ny,nz),s_qxy(nx,ny,nz),s_qxz(nx,ny,nz) // & ,s_qyy(nx,ny,nz),s_qyz(nx,ny,nz),s_qzz(nx,ny,nz) // declare fluxes .................................................... // Only for the qxx,qxy,... as they are the only quantities with // nontrivial fluxes. The derivatives dxuxx, ... do have fluxes // that turn out to be (but not by miracle) exactly the sources // of the uxx,uxy,... // real fxxx(nx,ny,nz),fxxy(nx,ny,nz),fxxz(nx,ny,nz) // & ,fxyy(nx,ny,nz),fxyz(nx,ny,nz),fxzz(nx,ny,nz) // real fyxx(nx,ny,nz),fyxy(nx,ny,nz),fyxz(nx,ny,nz) // & ,fyyy(nx,ny,nz),fyyz(nx,ny,nz),fyzz(nx,ny,nz) // real fzxx(nx,ny,nz),fzxy(nx,ny,nz),fzxz(nx,ny,nz) // & ,fzyy(nx,ny,nz),fzyz(nx,ny,nz),fzzz(nx,ny,nz) // ....................................................................... // store current level n in old values. old_alp = alp; old_cux = cux; old_cuy = cuy; old_cuz = cuz; old_uxx = uxx; old_uxy = uxy; old_uxz = uxz; old_uyy = uyy; old_uyz = uyz; old_uzz = uzz; old_qxx = qxx; old_qxy = qxy; old_qxz = qxz; old_qyy = qyy; old_qyz = qyz; old_qzz = qzz; old_dxuxx = dxuxx; old_dxuxy = dxuxy; old_dxuxz = dxuxz; old_dxuyy = dxuyy; old_dxuyz = dxuyz; old_dxuzz = dxuzz; old_dyuxx = dyuxx; old_dyuxy = dyuxy; old_dyuxz = dyuxz; old_dyuyy = dyuyy; old_dyuyz = dyuyz; old_dyuzz = dyuzz; old_dzuxx = dzuxx; old_dzuxy = dzuxy; old_dzuxz = dzuxz; old_dzuyy = dzuyy; old_dzuyz = dzuyz; old_dzuzz = dzuzz; //c ....................................................................... //c Compute sources and fluxes of current level n [s_alp,s_cux,s_cuy,s_cuz,... s_uxx,s_uxy,s_uxz,s_uyy,s_uyz,s_uzz,... s_qxx,s_qxy,s_qxz,s_qyy,s_qyz,s_qzz... ]=sources_parts(... nx,ny,nz,... x,y,z,r,psi,... alp,cux,cuy,cuz,rg,... uxx,uxy,uxz,uyy,uyz,uzz,... gxx,gxy,gxz,gyy,gyz,gzz,... qxx,qxy,qxz,qyy,qyz,qzz,... txx, txy, txz, tyy, tyz, tzz,... dxuxx,dxuxy,dxuxz,dxuyy,dxuyz,dxuzz,... dyuxx,dyuxy,dyuxz,dyuyy,dyuyz,dyuzz,... dzuxx,dzuxy,dzuxz,dzuyy,dzuyz,dzuzz ... ); [fxxx,fxxy,fxxz,fxyy,fxyz,fxzz,... fyxx,fyxy,fyxz,fyyy,fyyz,fyzz,... fzxx,fzxy,fzxz,fzyy,fzyz,fzzz... ]=fluxes(... nx,ny,nz,... x,y,z,r,psi,... alp,cux,cuy,cuz,rg,... uxx,uxy,uxz,uyy,uyz,uzz,... gxx,gxy,gxz,gyy,gyz,gzz,... qxx,qxy,qxz,qyy,qyz,qzz,... dxuxx,dxuxy,dxuxz,dxuyy,dxuyz,dxuzz,... dyuxx,dyuxy,dyuxz,dyuyy,dyuyz,dyuzz,... dzuxx,dzuxy,dzuxz,dzuyy,dzuyz,dzuzz... ); //c ....................................................................... //c Predictor step: backwards //c Note that we store the predicted value in the same variables, //c as we have already saved the old value. //c ....................................................................... //c First quantities without fluxes alp(2:nx,2:ny,2:nz) = alp(2:nx,2:ny,2:nz) + dt.*s_alp(2:nx,2:ny,2:nz); cux(2:nx,2:ny,2:nz) = cux(2:nx,2:ny,2:nz) + dt.*s_cux(2:nx,2:ny,2:nz); cuy(2:nx,2:ny,2:nz) = cuy(2:nx,2:ny,2:nz) + dt.*s_cuy(2:nx,2:ny,2:nz); cuz(2:nx,2:ny,2:nz) = cuz(2:nx,2:ny,2:nz) + dt.*s_cuz(2:nx,2:ny,2:nz); uxx(2:nx,2:ny,2:nz) = uxx(2:nx,2:ny,2:nz) + dt.*s_uxx(2:nx,2:ny,2:nz); uxy(2:nx,2:ny,2:nz) = uxy(2:nx,2:ny,2:nz) + dt.*s_uxy(2:nx,2:ny,2:nz); uxz(2:nx,2:ny,2:nz) = uxz(2:nx,2:ny,2:nz) + dt.*s_uxz(2:nx,2:ny,2:nz); uyy(2:nx,2:ny,2:nz) = uyy(2:nx,2:ny,2:nz) + dt.*s_uyy(2:nx,2:ny,2:nz); uyz(2:nx,2:ny,2:nz) = uyz(2:nx,2:ny,2:nz) + dt.*s_uyz(2:nx,2:ny,2:nz); uzz(2:nx,2:ny,2:nz) = uzz(2:nx,2:ny,2:nz) + dt.*s_uzz(2:nx,2:ny,2:nz); // the metric derivatives have a trivial flux and no source // x direction dxuxx(2:nx,2:ny,2:nz) = dxuxx(2:nx,2:ny,2:nz)+ dt./dx.*( s_uxx(2:nx,2:ny,2:nz) - s_uxx(1:nx-1,2:ny,2:nz) ); dxuxy(2:nx,2:ny,2:nz) = dxuxy(2:nx,2:ny,2:nz)+ dt./dx.*( s_uxy(2:nx,2:ny,2:nz) - s_uxy(1:nx-1,2:ny,2:nz) ); dxuxz(2:nx,2:ny,2:nz) = dxuxz(2:nx,2:ny,2:nz)+ dt./dx.*( s_uxz(2:nx,2:ny,2:nz) - s_uxz(1:nx-1,2:ny,2:nz) ); dxuyy(2:nx,2:ny,2:nz) = dxuyy(2:nx,2:ny,2:nz)+ dt./dx.*( s_uyy(2:nx,2:ny,2:nz) - s_uyy(1:nx-1,2:ny,2:nz) ); dxuyz(2:nx,2:ny,2:nz) = dxuyz(2:nx,2:ny,2:nz)+ dt./dx.*( s_uyz(2:nx,2:ny,2:nz) - s_uyz(1:nx-1,2:ny,2:nz) ); dxuzz(2:nx,2:ny,2:nz) = dxuzz(2:nx,2:ny,2:nz)+ dt./dx.*( s_uzz(2:nx,2:ny,2:nz) - s_uzz(1:nx-1,2:ny,2:nz) ); //c y direction dyuxx(2:nx,2:ny,2:nz) = dyuxx(2:nx,2:ny,2:nz)+ dt./dy.*( s_uxx(2:nx,2:ny,2:nz) - s_uxx(2:nx,1:ny-1,2:nz) ); dyuxy(2:nx,2:ny,2:nz) = dyuxy(2:nx,2:ny,2:nz)+ dt./dy.*( s_uxy(2:nx,2:ny,2:nz) - s_uxy(2:nx,1:ny-1,2:nz) ); dyuxz(2:nx,2:ny,2:nz) = dyuxz(2:nx,2:ny,2:nz)+ dt./dy.*( s_uxz(2:nx,2:ny,2:nz) - s_uxz(2:nx,1:ny-1,2:nz) ); dyuyy(2:nx,2:ny,2:nz) = dyuyy(2:nx,2:ny,2:nz)+ dt./dy.*( s_uyy(2:nx,2:ny,2:nz) - s_uyy(2:nx,1:ny-1,2:nz) ); dyuyz(2:nx,2:ny,2:nz) = dyuyz(2:nx,2:ny,2:nz)+ dt./dy.*( s_uyz(2:nx,2:ny,2:nz) - s_uyz(2:nx,1:ny-1,2:nz) ); dyuzz(2:nx,2:ny,2:nz) = dyuzz(2:nx,2:ny,2:nz)+ dt./dy.*( s_uzz(2:nx,2:ny,2:nz) - s_uzz(2:nx,1:ny-1,2:nz) ); //c z direction dzuxx(2:nx,2:ny,2:nz) = dzuxx(2:nx,2:ny,2:nz)+ dt./dz.*( s_uxx(2:nx,2:ny,2:nz) - s_uxx(2:nz,2:ny,1:nz-1) ); dzuxy(2:nx,2:ny,2:nz) = dzuxy(2:nx,2:ny,2:nz)+ dt./dz.*( s_uxy(2:nx,2:ny,2:nz) - s_uxy(2:nz,2:ny,1:nz-1) ); dzuxz(2:nx,2:ny,2:nz) = dzuxz(2:nx,2:ny,2:nz)+ dt./dz.*( s_uxz(2:nx,2:ny,2:nz) - s_uxz(2:nz,2:ny,1:nz-1) ); dzuyy(2:nx,2:ny,2:nz) = dzuyy(2:nx,2:ny,2:nz)+ dt./dz.*( s_uyy(2:nx,2:ny,2:nz) - s_uyy(2:nz,2:ny,1:nz-1) ); dzuyz(2:nx,2:ny,2:nz) = dzuyz(2:nx,2:ny,2:nz)+ dt./dz.*( s_uyz(2:nx,2:ny,2:nz) - s_uyz(2:nz,2:ny,1:nz-1) ); dzuzz(2:nx,2:ny,2:nz) = dzuzz(2:nx,2:ny,2:nz)+ dt./dz.*( s_uzz(2:nx,2:ny,2:nz) - s_uzz(2:nz,2:ny,1:nz-1) ); // Now the only "interesting" quantities with full 3d flux and source qxx(2:nx,2:ny,2:nz) = qxx(2:nx,2:ny,2:nz) + dt.*s_qxx(2:nx,2:ny,2:nz) +... dt./dx.*( fxxx(2:nx,2:ny,2:nz) - fxxx(1:nx-1,2:ny,2:nz) ) +... dt./dy.*( fyxx(2:nx,2:ny,2:nz) - fyxx(2:nx,1:ny-1,2:nz) ) +... dt./dz.*( fzxx(2:nx,2:ny,2:nz) - fzxx(2:nz,2:ny,1:nz-1) ); qxy(2:nx,2:ny,2:nz) = qxy(2:nx,2:ny,2:nz) + dt.*s_qxy(2:nx,2:ny,2:nz) +... dt./dx.*( fxxy(2:nx,2:ny,2:nz) - fxxy(1:nx-1,2:ny,2:nz) ) +... dt./dy.*( fyxy(2:nx,2:ny,2:nz) - fyxy(2:nx,1:ny-1,2:nz) ) +... dt./dz.*( fzxy(2:nx,2:ny,2:nz) - fzxy(2:nz,2:ny,1:nz-1) ); qxz(2:nx,2:ny,2:nz) = qxz(2:nx,2:ny,2:nz) + dt.*s_qxz(2:nx,2:ny,2:nz) +... dt./dx.*( fxxz(2:nx,2:ny,2:nz) - fxxz(1:nx-1,2:ny,2:nz) ) +... dt./dy.*( fyxz(2:nx,2:ny,2:nz) - fyxz(2:nx,1:ny-1,2:nz) ) +... dt./dz.*( fzxz(2:nx,2:ny,2:nz) - fzxz(2:nz,2:ny,1:nz-1) ); qyy(2:nx,2:ny,2:nz) = qyy(2:nx,2:ny,2:nz) + dt.*s_qyy(2:nx,2:ny,2:nz) +... dt./dx.*( fxyy(2:nx,2:ny,2:nz) - fxyy(1:nx-1,2:ny,2:nz) ) +... dt./dy.*( fyyy(2:nx,2:ny,2:nz) - fyyy(2:nx,1:ny-1,2:nz) ) +... dt./dz.*( fzyy(2:nx,2:ny,2:nz) - fzyy(2:nz,2:ny,1:nz-1) ); qyz(2:nx,2:ny,2:nz) = qyz(2:nx,2:ny,2:nz) + dt.*s_qyz(2:nx,2:ny,2:nz) +... dt./dx.*( fxyz(2:nx,2:ny,2:nz) - fxyz(1:nx-1,2:ny,2:nz) ) +... dt./dy.*( fyyz(2:nx,2:ny,2:nz) - fyyz(2:nx,1:ny-1,2:nz) ) +... dt./dz.*( fzyz(2:nx,2:ny,2:nz) - fzyz(2:nz,2:ny,1:nz-1) ); qzz(2:nx,2:ny,2:nz) = qzz(2:nx,2:ny,2:nz) + dt.*s_qzz(2:nx,2:ny,2:nz) +... dt./dx.*( fxzz(2:nx,2:ny,2:nz) - fxzz(1:nx-1,2:ny,2:nz) ) +... dt./dy.*( fyzz(2:nx,2:ny,2:nz) - fyzz(2:nx,1:ny-1,2:nz) ) +... dt./dz.*( fzzz(2:nx,2:ny,2:nz) - fzzz(2:nz,2:ny,1:nz-1) ); //c ....................................................................... //c Now that we have predicted variables, we need the predicted //c sources and fluxes. But first, we need to get the "down" metric [gxx,gxy,gxz,gyy,gyz,gzz,rg]=invert(nx,ny,nz,1,... uxx,uxy,uxz,uyy,uyz,uzz... ); [s_alp,s_cux,s_cuy,s_cuz,... s_uxx,s_uxy,s_uxz,s_uyy,s_uyz,s_uzz,... s_qxx,s_qxy,s_qxz,s_qyy,s_qyz,s_qzz... ]=sources_parts(... nx,ny,nz,... x,y,z,r,psi,... alp,cux,cuy,cuz,rg,... uxx,uxy,uxz,uyy,uyz,uzz,... gxx,gxy,gxz,gyy,gyz,gzz,... qxx,qxy,qxz,qyy,qyz,qzz,... txx, txy, txz, tyy, tyz, tzz,... dxuxx,dxuxy,dxuxz,dxuyy,dxuyz,dxuzz,... dyuxx,dyuxy,dyuxz,dyuyy,dyuyz,dyuzz,... dzuxx,dzuxy,dzuxz,dzuyy,dzuyz,dzuzz ... ); [fxxx,fxxy,fxxz,fxyy,fxyz,fxzz,... fyxx,fyxy,fyxz,fyyy,fyyz,fyzz,... fzxx,fzxy,fzxz,fzyy,fzyz,fzzz... ]=fluxes(... nx,ny,nz,... x,y,z,r,psi,... alp,cux,cuy,cuz,rg,... uxx,uxy,uxz,uyy,uyz,uzz,... gxx,gxy,gxz,gyy,gyz,gzz,... qxx,qxy,qxz,qyy,qyz,qzz,... dxuxx,dxuxy,dxuxz,dxuyy,dxuyz,dxuzz,... dyuxx,dyuxy,dyuxz,dyuyy,dyuyz,dyuzz,... dzuxx,dzuxy,dzuxz,dzuyy,dzuyz,dzuzz... ); //c ....................................................................... //c Corrector step: forward //c Note that we store the corrected value in the same variables //c as we do not longer need the predicted values. //c ....................................................................... //c First quantities without fluxes alp(2:nx-1,2:ny-1,2:nz-1) = alp(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_alp(2:nx-1,2:ny-1,2:nz-1); cux(2:nx-1,2:ny-1,2:nz-1) = cux(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_cux(2:nx-1,2:ny-1,2:nz-1); cuy(2:nx-1,2:ny-1,2:nz-1) = cuy(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_cuy(2:nx-1,2:ny-1,2:nz-1); cuz(2:nx-1,2:ny-1,2:nz-1) = cuz(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_cuz(2:nx-1,2:ny-1,2:nz-1); uxx(2:nx-1,2:ny-1,2:nz-1) = uxx(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_uxx(2:nx-1,2:ny-1,2:nz-1); uxy(2:nx-1,2:ny-1,2:nz-1) = uxy(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_uxy(2:nx-1,2:ny-1,2:nz-1); uxz(2:nx-1,2:ny-1,2:nz-1) = uxz(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_uxz(2:nx-1,2:ny-1,2:nz-1); uyy(2:nx-1,2:ny-1,2:nz-1) = uyy(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_uyy(2:nx-1,2:ny-1,2:nz-1); uyz(2:nx-1,2:ny-1,2:nz-1) = uyz(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_uyz(2:nx-1,2:ny-1,2:nz-1); uzz(2:nx-1,2:ny-1,2:nz-1) = uzz(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_uzz(2:nx-1,2:ny-1,2:nz-1); // derivatives with no source and trivial flux // x direction dxuxx(2:nx-1,2:ny-1,2:nz-1) = dxuxx(2:nx-1,2:ny-1,2:nz-1)... + dt./dx.*( s_uxx(3:nx,2:ny-1,2:nz-1) - s_uxx(2:nx-1,2:ny-1,2:nz-1) ); dxuxy(2:nx-1,2:ny-1,2:nz-1) = dxuxy(2:nx-1,2:ny-1,2:nz-1)... + dt./dx.*( s_uxy(3:nx,2:ny-1,2:nz-1) - s_uxy(2:nx-1,2:ny-1,2:nz-1) ); dxuxz(2:nx-1,2:ny-1,2:nz-1) = dxuxz(2:nx-1,2:ny-1,2:nz-1)... + dt./dx.*( s_uxz(3:nx,2:ny-1,2:nz-1) - s_uxz(2:nx-1,2:ny-1,2:nz-1) ); dxuyy(2:nx-1,2:ny-1,2:nz-1) = dxuyy(2:nx-1,2:ny-1,2:nz-1)... + dt./dx.*( s_uyy(3:nx,2:ny-1,2:nz-1) - s_uyy(2:nx-1,2:ny-1,2:nz-1) ); dxuyz(2:nx-1,2:ny-1,2:nz-1) = dxuyz(2:nx-1,2:ny-1,2:nz-1)... + dt./dx.*( s_uyz(3:nx,2:ny-1,2:nz-1) - s_uyz(2:nx-1,2:ny-1,2:nz-1) ); dxuzz(2:nx-1,2:ny-1,2:nz-1) = dxuzz(2:nx-1,2:ny-1,2:nz-1)... + dt./dx.*( s_uzz(3:nx,2:ny-1,2:nz-1) - s_uzz(2:nx-1,2:ny-1,2:nz-1) ); // y direction dyuxx(2:nx-1,2:ny-1,2:nz-1) = dyuxx(2:nx-1,2:ny-1,2:nz-1)... + dt./dy.*( s_uxx(2:nx-1,3:ny,2:nz-1) - s_uxx(2:nx-1,2:ny-1,2:nz-1) ); dyuxy(2:nx-1,2:ny-1,2:nz-1) = dyuxy(2:nx-1,2:ny-1,2:nz-1)... + dt./dy.*( s_uxy(2:nx-1,3:ny,2:nz-1) - s_uxy(2:nx-1,2:ny-1,2:nz-1) ); dyuxz(2:nx-1,2:ny-1,2:nz-1) = dyuxz(2:nx-1,2:ny-1,2:nz-1)... + dt./dy.*( s_uxz(2:nx-1,3:ny,2:nz-1) - s_uxz(2:nx-1,2:ny-1,2:nz-1) ); dyuyy(2:nx-1,2:ny-1,2:nz-1) = dyuyy(2:nx-1,2:ny-1,2:nz-1)... + dt./dy.*( s_uyy(2:nx-1,3:ny,2:nz-1) - s_uyy(2:nx-1,2:ny-1,2:nz-1) ); dyuyz(2:nx-1,2:ny-1,2:nz-1) = dyuyz(2:nx-1,2:ny-1,2:nz-1)... + dt./dy.*( s_uyz(2:nx-1,3:ny,2:nz-1) - s_uyz(2:nx-1,2:ny-1,2:nz-1) ); dyuzz(2:nx-1,2:ny-1,2:nz-1) = dyuzz(2:nx-1,2:ny-1,2:nz-1)... + dt./dy.*( s_uzz(2:nx-1,3:ny,2:nz-1) - s_uzz(2:nx-1,2:ny-1,2:nz-1) ); // z direction dzuxx(2:nx-1,2:ny-1,2:nz-1) = dzuxx(2:nx-1,2:ny-1,2:nz-1)... + dt./dz.*( s_uxx(2:nx-1,2:ny-1,3:nz) - s_uxx(2:nx-1,2:ny-1,2:nz-1) ); dzuxy(2:nx-1,2:ny-1,2:nz-1) = dzuxy(2:nx-1,2:ny-1,2:nz-1)... + dt./dz.*( s_uxy(2:nx-1,2:ny-1,3:nz) - s_uxy(2:nx-1,2:ny-1,2:nz-1) ); dzuxz(2:nx-1,2:ny-1,2:nz-1) = dzuxz(2:nx-1,2:ny-1,2:nz-1)... + dt./dz.*( s_uxz(2:nx-1,2:ny-1,3:nz) - s_uxz(2:nx-1,2:ny-1,2:nz-1) ); dzuyy(2:nx-1,2:ny-1,2:nz-1) = dzuyy(2:nx-1,2:ny-1,2:nz-1)... + dt./dz.*( s_uyy(2:nx-1,2:ny-1,3:nz) - s_uyy(2:nx-1,2:ny-1,2:nz-1) ); dzuyz(2:nx-1,2:ny-1,2:nz-1) = dzuyz(2:nx-1,2:ny-1,2:nz-1)... + dt./dz.*( s_uyz(2:nx-1,2:ny-1,3:nz) - s_uyz(2:nx-1,2:ny-1,2:nz-1) ); dzuzz(2:nx-1,2:ny-1,2:nz-1) = dzuzz(2:nx-1,2:ny-1,2:nz-1)... + dt./dz.*( s_uzz(2:nx-1,2:ny-1,3:nz) - s_uzz(2:nx-1,2:ny-1,2:nz-1) ); // full thing qxx(2:nx-1,2:ny-1,2:nz-1) = qxx(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_qxx(2:nx-1,2:ny-1,2:nz-1) +... dt./dx.*( fxxx(3:nx,2:ny-1,2:nz-1) - fxxx(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dy.*( fyxx(2:nx-1,3:ny,2:nz-1) - fyxx(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dz.*( fzxx(2:nx-1,2:ny-1,3:nz) - fzxx(2:nx-1,2:ny-1,2:nz-1) ); qxy(2:nx-1,2:ny-1,2:nz-1) = qxy(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_qxy(2:nx-1,2:ny-1,2:nz-1) +... dt./dx.*( fxxy(3:nx,2:ny-1,2:nz-1) - fxxy(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dy.*( fyxy(2:nx-1,3:ny,2:nz-1) - fyxy(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dz.*( fzxy(2:nx-1,2:ny-1,3:nz) - fzxy(2:nx-1,2:ny-1,2:nz-1) ); qxz(2:nx-1,2:ny-1,2:nz-1) = qxz(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_qxz(2:nx-1,2:ny-1,2:nz-1) +... dt./dx.*( fxxz(3:nx,2:ny-1,2:nz-1) - fxxz(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dy.*( fyxz(2:nx-1,3:ny,2:nz-1) - fyxz(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dz.*( fzxz(2:nx-1,2:ny-1,3:nz) - fzxz(2:nx-1,2:ny-1,2:nz-1) ); qyy(2:nx-1,2:ny-1,2:nz-1) = qyy(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_qyy(2:nx-1,2:ny-1,2:nz-1) +... dt./dx.*( fxyy(3:nx,2:ny-1,2:nz-1) - fxyy(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dy.*( fyyy(2:nx-1,3:ny,2:nz-1) - fyyy(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dz.*( fzyy(2:nx-1,2:ny-1,3:nz) - fzyy(2:nx-1,2:ny-1,2:nz-1) ); qyz(2:nx-1,2:ny-1,2:nz-1) = qyz(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_qyz(2:nx-1,2:ny-1,2:nz-1) +... dt./dx.*( fxyz(3:nx,2:ny-1,2:nz-1) - fxyz(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dy.*( fyyz(2:nx-1,3:ny,2:nz-1) - fyyz(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dz.*( fzyz(2:nx-1,2:ny-1,3:nz) - fzyz(2:nx-1,2:ny-1,2:nz-1) ); qzz(2:nx-1,2:ny-1,2:nz-1) = qzz(2:nx-1,2:ny-1,2:nz-1)... + dt.*s_qzz(2:nx-1,2:ny-1,2:nz-1) +... dt./dx.*( fxzz(3:nx,2:ny-1,2:nz-1) - fxzz(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dy.*( fyzz(2:nx-1,3:ny,2:nz-1) - fyzz(2:nx-1,2:ny-1,2:nz-1) ) +... dt./dz.*( fzzz(2:nx-1,2:ny-1,3:nz) - fzzz(2:nx-1,2:ny-1,2:nz-1) ); // ....................................................................... // Now we compute the final evolved value. Again, we store it // in the same variables, so the evolved values have replaced the // original ones. alp = (old_alp + alp) ./2.; cux = (old_cux + cux) ./2.; cuy = (old_cuy + cuy) ./2.; cuz = (old_cuz + cuz) ./2.; uxx = (old_uxx + uxx) ./2.; uxy = (old_uxy + uxy) ./2.; uxz = (old_uxz + uxz) ./2.; uyy = (old_uyy + uyy) ./2.; uyz = (old_uyz + uyz) ./2.; uzz = (old_uzz + uzz) ./2.; qxx = (old_qxx + qxx) ./2.; qxy = (old_qxy + qxy) ./2.; qxz = (old_qxz + qxz) ./2.; qyy = (old_qyy + qyy) ./2.; qyz = (old_qyz + qyz) ./2.; qzz = (old_qzz + qzz) ./2.; dxuxx = (old_dxuxx + dxuxx) ./2.; dxuxy = (old_dxuxy + dxuxy) ./2.; dxuxz = (old_dxuxz + dxuxz) ./2.; dxuyy = (old_dxuyy + dxuyy) ./2.; dxuyz = (old_dxuyz + dxuyz) ./2.; dxuzz = (old_dxuzz + dxuzz) ./2.; dyuxx = (old_dyuxx + dyuxx) ./2.; dyuxy = (old_dyuxy + dyuxy) ./2.; dyuxz = (old_dyuxz + dyuxz) ./2.; dyuyy = (old_dyuyy + dyuyy) ./2.; dyuyz = (old_dyuyz + dyuyz) ./2.; dyuzz = (old_dyuzz + dyuzz) ./2.; dzuxx = (old_dzuxx + dzuxx) ./2.; dzuxy = (old_dzuxy + dzuxy) ./2.; dzuxz = (old_dzuxz + dzuxz) ./2.; dzuyy = (old_dzuyy + dzuyy) ./2.; dzuyz = (old_dzuyz + dzuyz) ./2.; dzuzz = (old_dzuzz + dzuzz) ./2.; //c Now we should call invert to compute the "down" metric but //c we leave that to the Boundaries routine. //c Note that if on wanted static boundary conditions, we still //c have the old values, so here would be the place to restore the //c boundary planes that have been modified in the prediction: //c alp(nx,:,:) = old_alp(nx,:,:) //c //etc... endfunction
193c15cbdb5e47ef9fcd88e9a2a9d24f7b18b686
fdc5047b7bf8122bad1e621df236b0481226c36e
/exemplos/xls-link-0.5.0-src/macros/xls_Open.sci
075b95df6554fbc7d6c8ecfe0a4f68f942e3f45c
[]
no_license
jpbevila/virtualHartSci
aea3c6ba23d054670eb193f441ea7de982b531cc
a3f5be6041d230bd9f0fd67e5d7efa71f41cfca5
refs/heads/main
2023-07-26T23:05:28.044194
2021-09-09T11:50:59
2021-09-09T11:50:59
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,004
sci
xls_Open.sci
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab // Copyright (C) 2013 - Scilab Enterprises - Antoine ELIAS // // 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 function ret = xls_Open(filename, password) // Password not given ? if ~isdef("password") then // If so provide a fake one, to avoid password prompt on protected Excel files // It does not prevent from opening unprotected Excel files password = ""; end ret = xls_callMethod("Workbooks", "Open", list(filename, password, password), [0, 4, 5]); if ret == %f then error(999, msprintf(_("%s: Unable to open ''%s''"), "xls_Open", filename)); end endfunction // =============================================================================
84914af262c796d1f46c06a67ff6da6baa02be94
449d555969bfd7befe906877abab098c6e63a0e8
/226/CH13/EX13.15/example15_sce.sce
e45c84d05fb84e7dcec1ae685f82691e9e0dadb9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
240
sce
example15_sce.sce
//chapter 13 //example 13.15 //page 585 printf("\n") printf("given") Av=60000;Acl=300;f1=15*10^3;B=1/300; f2=(Av*f1)/Acl disp("% distortion with NFB") NFB=(.1/(1+Av*B))*100; printf(" percenatge distortion with NFB is %3.3f\n",NFB)
65e27f00fac7f8b98491ea7ea952bac59deb35eb
449d555969bfd7befe906877abab098c6e63a0e8
/1241/CH6/EX6.6/exa6_6.sce
78bab49bd39282a64725c7efc3d43619598b3d95
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
624
sce
exa6_6.sce
//Example 6-6// //map C=A''B''+AB''// clc //clears the console// clear //clears all existing variables// //Mapping the expression// disp(' B'' B ') disp('A'' 1 0 ') disp('A 1 0 ') disp(' From the map, high outputs for 0 and 2 ') a=[0 0 ; 1 0] disp(a) for i=1: 2 if a(i,1)==1 then b(i,1)='A' else b(i,1)='A''' end if a(i,2)==1 then b(i,2)='B' else b(i,2)='B''' end end m=strcat([b(1,1),b(1,2)]) n=strcat([b(2,1),b(2,2)]) disp(' evaluating expression from truth table and map ') x=strcat([m"+",n]); disp(x) //Expression is displayed//
260495365de142768bb985f38e88938f1e68d923
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set8/s_Elementary_Heat_Power_H._L._Solberg_2420.zip/Elementary_Heat_Power_H._L._Solberg_2420/CH2/EX2.11.a/2_11a.sce
ed9eb0ec32d71bd3b714d91c3b60aad50c3664fa
[]
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
209
sce
2_11a.sce
errcatch(-1,"stop");mode(2); //Initialization of variables Gf=11.57 //lb per lb of fuel tg=500 //F ta=70 //F //calculations Q1=0.24*Gf*(tg-ta) //results printf("Heat loss = %d Btu per lb of fuel",Q1) exit();
3be37de6ac17641934700ff6a814425c11352ba6
e59f7b8d4c0c495a34f4dfd66df058aa9c228b7b
/RESULTS/CompareResults.sci
92b850098fcf202f22cd101bd4ba12abcd976d01
[]
no_license
maxxonair/BlueBook-Descent-and-Landing-Analysis-Toolkit-DaLAT
d1b2071adc584cbe1551090834cd01142beb0725
6c71c971c2aa62e9f81f3c00c211d80caf8680eb
refs/heads/master
2021-07-13T07:26:26.655134
2020-05-30T11:28:41
2020-05-30T11:28:41
169,849,595
3
0
null
2020-05-30T11:28:43
2019-02-09T09:09:13
Java
UTF-8
Scilab
false
false
2,062
sci
CompareResults.sci
clear RootFolder='C:\Users\Max Braun\Documents\Max_Braun_2017\05_Tools\LandingSim\BlueBook-DaLAT-3DoF\RESULTS\'; filename = fullfile(RootFolder, 'Ascent_36kN_FULLControl_mk1.res'); filename2 = fullfile(RootFolder, 'Ascent_36kN_mk1.res'); BB_ascent_5_6 = csvRead(filename, " "); BB_ascent_6_6 = csvRead(filename2, " "); //------------------------------------------------------------------------------ // Variable columns - BB //------------------------------------------------------------------------------ t=1; fpa_BB = 8; vel_BB = 7; m0_BB = 30; thrust_BB= 28; alt_BB = 5; deltav_BB=39; //------------------------------------------------------------------------------ // Plot //------------------------------------------------------------------------------ f = scf() subplot(221) plot(BB_ascent_6_6(:,t),(BB_ascent_6_6(:,fpa_BB).*180/%pi-90)-(BB_ascent_5_6(:,fpa_BB).*180/%pi-90),'b'); //plot(BB_ascent_5_6(:,t),BB_ascent_5_6(:,fpa_BB).*180/%pi-90,'r'); xlabel("Time [s]]"); ylabel("flight path angle [deg]"); //hl = legend("BB mk4 Engines 6 out of 6", "BB mk4 Engines 6 out of 6"); subplot(222) plot(BB_ascent_6_6(:,t),BB_ascent_6_6(:,alt_BB)/1000,'b'); plot(BB_ascent_5_6(:,t),BB_ascent_5_6(:,alt_BB)/1000,'r'); xlabel("Time [s]]"); ylabel("Altitude [km]"); //hl = legend("BB mk4 Engines 6 out of 6", "BB mk4 Engines 6 out of 6"); subplot(223) plot(BB_ascent_6_6(:,vel_BB),BB_ascent_6_6(:,alt_BB)/1000,'b'); plot(BB_ascent_5_6(:,vel_BB),BB_ascent_5_6(:,alt_BB)/1000,'r'); xlabel("Velocity [m/s]]"); ylabel("Altitude [km]"); //hl = legend("BB mk4 Engines 6 out of 6", "BB mk4 Engines 6 out of 6"); subplot(224) plot(BB_ascent_6_6(:,t),BB_ascent_6_6(:,thrust_BB)/1000,'b'); plot(BB_ascent_5_6(:,t),BB_ascent_5_6(:,thrust_BB)/1000,'r'); xlabel("Time [s]]"); ylabel("Thrust [kN]"); hl = legend("BB mk1 Engines 6 out of 6 - 36kN ", "BB mk1 Engines 5 out of 6 - 30kN"); disp("Total delta-v case 1: ",BB_ascent_6_6($,deltav_BB)," [m/s]"); disp("Total delta-v case 2: ",BB_ascent_5_6($,deltav_BB)," [m/s]");
3bd4507b603fe2419bd88203a0b15e472108cf30
b29e9715ab76b6f89609c32edd36f81a0dcf6a39
/ketpic2escifiles6/Dottedlineold.sci
c4d9b86ae4420a84932e4724a20a4340061f8164
[]
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
2,728
sci
Dottedlineold.sci
// 08.05.21 // 08.11.26 function Dottedline(varargin) global Wfile FID MilliIn; Nall=length(varargin); Nagasa=0.1; Ookisa=0.02*0.5; I=Nall; Tmp=varargin(I); while type(Tmp)==1 & length(Tmp)==1 I=I-1; Tmp=varargin(I); end if I==Nall-1 Nagasa=Nagasa*varargin(Nall); Nall=Nall-1; end if I==Nall-2 Nagasa=Nagasa*varargin(Nall-1); Ookisa=Ookisa*varargin(Nall); Nall=Nall-2; end Nagasa=1000/2.54/MilliIn*Nagasa; Ookisa=1000/2.54/MilliIn*Ookisa; CL=[]; Nk=4; Tmp=Framedata([0,0],Ookisa/2); CL=Tmp; for N=1:Nall Pdata=varargin(N); if Mixtype(Pdata)==1 Pdata=MixS(Pdata); end for II=1:Mixlength(Pdata) Clist=MakeCurves(Op(II,Pdata)); DinM=Dataindex(Clist); for n=1:size(DinM,1) Tmp=DinM(n,:); Data=Clist(Tmp(1):Tmp(2),:); Len=0; Lenlist=[0]; for I=2:size(Data,1) Len=Len+Vecnagasa(Data(I,:)-Data(I-1,:)); Lenlist=[Lenlist,Len]; end Lenall=Lenlist(length(Lenlist)); if Lenall==0 continue end Naga=Nagasa; Nten=round(Lenall/Naga)+1; if Nten>1 Seg=Lenall/(Nten-1); else Seg=Lenall; end Eps=10^(-6)*Seg; Hajime=1; for I=0:Nten-1 Len=Seg*I; if I>0 J=Hajime; while Len>=Lenlist(J)+Eps J=J+1; end Hajime=J-1; end T=(Len-Lenlist(Hajime))... /(Lenlist(Hajime+1)-Lenlist(Hajime)); P=Data(Hajime,:)+T*(Data(Hajime+1,:)... -Data(Hajime,:)); if I==Nten-1 if Vecnagasa(P-Data(1,:))<Eps continue end end PL=[]; for J=1:size(CL,1) PL=[PL;P+CL(J,:)]; end Mojisu=0; for J=1:size(PL,1) Q=PL(J,:); X=round(MilliIn*Q(1)); X=string(X); Y=-round(MilliIn*Q(2)); Y=string(Y); Str='\special{pa '+X+" "+Y+'}'; if Wfile=='default' mprintf('%s',Str); else mfprintf(FID,'%s',Str); end Mojisu=Mojisu+length(Str); if Mojisu>80 if Wfile=='default' mprintf('%c\n','%'); else mfprintf(FID,'%c\n','%'); end Mojisu=0; end end Str='\special{sh 1}'+'\special{fp}%' if Wfile=='default' mprintf('%s\n',Str); else mfprintf(FID,'%s\n',Str); end end end end end endfunction
04fff98fb6f2753f31f906c875fcdf16768ff63f
449d555969bfd7befe906877abab098c6e63a0e8
/260/CH5/EX5.6/5_6.sce
8d2b9167711ffbf63e6d5db4abc057ccae2fed20
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
393
sce
5_6.sce
//Eg-5.6 //pg-225 clear clc A=[1 2 4;3 1 2;4 2 5]; z=[1;1;1]; for i=1:7 printf('iteration number=%f\n',i); a=A*z; b=(sum(a.^2))^.5; printf('dominant eigen value=%f\n',b); z=a/b; printf('z=%f\n',z); end disp("from iterations dominant eigen value converged to ") disp(b) disp("after 7 iterations") disp("its value is positive from equation 30");
57f289657c662460b0427656d95fc1e0a1b2fb06
449d555969bfd7befe906877abab098c6e63a0e8
/1523/CH12/EX12.2/ex12_2.sce
16cc3fad606132696ef1c4d3d235d4f5f2bffa6c
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
488
sce
ex12_2.sce
// Network Synthesis : example 12.2 : (pg 12.2) s=poly(0,'s'); p1=((s^4)+(5*(s)^2)+4); p2=((s^3)+(3*s)); [r,q]=pdiv(p1,p2); [r1,q1]=pdiv(p2,r); [r2,q2]=pdiv(r,r1); [r3,q3]=pdiv(r1,r2); printf("\nEven part of P(s) = (s^4)+(5s^3)+4"); printf("\nOdd part of P(s) = (s^3)+(3s)"); printf("\nQ(s)= m(s)/n(s)"); // values of quotients in continued fraction expansion disp(q); disp(q1); disp(q2); disp(q3); printf("\nSince all the quotient terms are positive, P(s) is hurwitz");
ae5fd2437e75ab139a086203821bff7bc642ca08
449d555969bfd7befe906877abab098c6e63a0e8
/1163/CH12/EX12.6/example_12_6.sce
51ae63a74c21992fdcaa8f4cc090a8999054130f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
701
sce
example_12_6.sce
clear; clc; disp("--------------Example 12.6---------------") // use the rows of W2 and W4 in the solution W2=[1 1;1 -1]; W4=[1 1 1 1;1 -1 1 -1;1 1 -1 -1;1 -1 -1 1]; //a. Two stations C1= W2(1,:); //select 1st row of W2 C2= W2(2,:); // select 2nd row of W2 // display result disp("a)The chips for a two-station network are "); disp(C1) disp("and") disp(C2) //b. Four stations C1= W4(1,:); // select 1st row of W4 C2= W4(2,:); // select 2nd row of W4 C3= W4(3,:); // select 3rd row of W4 C4= W4(4,:); // select 4th row of W4 // display result disp("b)The chips for a four-station network are "); disp(C1) printf(",") disp(C2) printf(",") disp(C3) printf("and") disp(C4)
a990cfed2eb0cb32fe5da1f66abb54484efab53a
449d555969bfd7befe906877abab098c6e63a0e8
/2498/CH6/EX6.m.22/ex_m_6_22.sce
47da8e7808a650eb8f7405864e1aaacba4c892c1
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
557
sce
ex_m_6_22.sce
// Exa Misc. 6.22 clc; clear; close; format('v',6) // Given data R_S3 = 10;// in k ohm R_S2 = R_S3;// in k ohm R_S1 = R_S3;// in k ohm Rf = 10;// in k ohm Vs1 = 0.2;// in V Vs2 = 0.5;// in V Vs3 = 0.8;// in V // I = I1+6I2+I3; // I = (Vs1/R_S1) + (Vs2/R_S2) + (Vs3/R_S3); // I = - If; // Vo = -If*Rf; Vo = (Rf/R_S1)*(Vs1+Vs2+Vs3);// in V (as R_S1= R_S2=R_S3) disp(Vo,"The value of Vo in volts is : "); disp("But the supply voltage of 10 V is used, so the op-amp will reach in saturation."); disp("Hence, output voltage is -10 volts.")
cd00fb5c7ef1dd5f71d83f0da734fd7d53a4604f
dd62f0e176af8b35f4de2d6b64692105fd90afd6
/dataSlice.sci
408bce9e219a97d39592d4b90fb59c8abec38623
[]
no_license
FOSSEE/FOSSEE-System-Identification-Toolbox
2a631de0f2d6b993b3f19df4a220b274a1d85edb
11ee9c829fe88301c69b731cdf9fe7957d0fa68c
refs/heads/master
2018-10-15T08:25:21.323393
2018-07-31T10:56:53
2018-07-31T10:56:53
108,255,727
0
0
null
null
null
null
UTF-8
Scilab
false
false
3,269
sci
dataSlice.sci
function sys = dataSlice(data,Start,End,Freq) // Select sample data from iddata // // Calling Sequence // h = dataSlice(plantData,Start,End,Ts) // Parameters // data : iddata type // Start : non-negative integer index // End : non-negative integer index, always greater than Start index // Ts : sampling frequency, default value is 1 // Description // Extracts the samples in between Start and End index of the plant time series data,iddata type. For specified sampling frequency, it resamples the extracted data. // // Examples // a = [1 0.5];b = [0 0.2 0.3]; // sys = idpoly(a,b,'Ts',0.1) // u = idinput(1024,'PRBS',[0 1/20],[-1 1]) // y = sim(u,sys)+rand(1024,1) // plantData = iddata(y,u,0.1) // h = dataSlice(plantData,1,20,0.1) // Authors // Ashutosh Kumar Bhargava,Bhushan Manjarekar [lhs,rhs] = argn() // storing the model data modelData = data // storing the statrting point try startData = Start catch startData = 1 end // storing the end point try endData = End catch endData = LastIndex(data) end // Storing the frequency try freqData = Freq catch freqData = 1 end // error message generate if startData > endData then error(msprintf(gettext("%s:Start index can not greater than End index.\n"),"dataSlice")) end if size(startData,'*') ~= 1 then error(msprintf(gettext("%s:Start index must be non negative scalar integer number.\n"),"dataSlice")) end if size(endData,'*') ~= 1 then error(msprintf(gettext("%s:End index must be non negative scalar integer number.\n"),"dataSlice")) end if ~freqData || size(freqData,'*') ~= 1 then error(msprintf(gettext("%s:Frequency must be non negative scalar number.\n"),"dataSlice")) end // -------------------------------------------------------------------------- if typeof(modelData) == 'constant' then Ts = 1 elseif typeof(modelData) == 'iddata' then Ts = modelData.Ts end // -------------------------------------------------------------------------- if freqData> Ts || modulo(Ts,freqData) then warning(msprintf(gettext("%s:inconsistent frequency.\n"),"dataSlice")) freqData = Ts end if typeof(modelData) == 'constant' then temp = modelData(startData:Ts/freqData:endData,:) elseif typeof(modelData) == 'iddata' then tempY = modelData.OutputData;tempU = modelData.InputData if ~size(tempY,'r') then tempY = [] else tempY = tempY(startData:Ts/freqData:endData,:); end if ~size(tempU,'r') then tempU = [] else tempU = tempU(startData:Ts/freqData:endData,:) end temp = iddata(tempY,tempU,Ts/freqData) temp.TimeUnit = modelData.TimeUnit end sys = temp endfunction function varargout = LastIndex(modelData) // finding the sample size if typeof(modelData) == "constant" then varargout(1) = length(modelData(:,1)) elseif typeof(modelData) == "iddata" then temp = max(size(modelData.OutputData,'r'),size(modelData.InputData,'r')) varargout(1) = temp end endfunction
036d2c4e1ceda7b54d737ce555c39bed158ce597
ebd6f68d47e192da7f81c528312358cfe8052c8d
/swig/Examples/test-suite/scilab/scilab_multivalue_runme.sci
581890408fbba29362cc919a210505e085c526f2
[ "LicenseRef-scancode-swig", "GPL-3.0-or-later", "LicenseRef-scancode-unknown-license-reference", "GPL-3.0-only", "Apache-2.0" ]
permissive
inishchith/DeepSpeech
965ad34d69eb4d150ddf996d30d02a1b29c97d25
dcb7c716bc794d7690d96ed40179ed1996968a41
refs/heads/master
2021-01-16T16:16:05.282278
2020-05-19T08:00:33
2020-05-19T08:00:33
243,180,319
1
0
Apache-2.0
2020-02-26T05:54:51
2020-02-26T05:54:50
null
UTF-8
Scilab
false
false
3,271
sci
scilab_multivalue_runme.sci
exec("swigtest.start", -1); // OUTPUT [a, b] = output2(); checkequal(a, 1, "[a, b] = output2(): a"); checkequal(b, 2, "[a, b] = output2(): b"); [ret, a, b] = output2Ret(); checkequal(ret, 3, "[a, b] = output2Ret(): b"); checkequal(a, 1, "[a, b] = output2Ret(): a"); checkequal(b, 2, "[a, b] = output2Ret(): b"); [c, d] = output2Input2(1, 2); checkequal(c, 2, "[c, d] = output2Input2(1, 2): c"); checkequal(d, 4, "[c, d] = output2Input2(1, 2): d"); [ret, c, d] = output2Input2Ret(1, 2); checkequal(ret, 6, "[ret, c, d] = output2Input2Ret(1, 2): ret"); checkequal(c, 2, "[ret, c, d] = output2Input2Ret(1, 2): c"); checkequal(d, 4, "[ret, c, d = output2Input2Ret(1, 2): d"); [ret, a, b, c] = output3Input1Ret(10); checkequal(ret, 10, "[ret, a, b, c] = output3Input1Ret(10): ret"); checkequal(a, 11, "[ret, a, b, c] = output3Input1Ret(10): a"); checkequal(b, 12, "[ret, a, b, c] = output3Input1Ret(10): b"); checkequal(c, 13, "[ret, a, b, c] = output3Input1Ret(10): c"); [ret, a, b, c] = output3Input3Ret(10, 20, 30); checkequal(ret, 66, "[ret, a, b, c] = output3Input1Ret(10, 20, 30): ret"); checkequal(a, 11, "[ret, a, b, c] = output3Input1Ret(10, 20, 30): a"); checkequal(b, 22, "[ret, a, b, c] = output3Input1Ret(10, 20, 30): b"); checkequal(c, 33, "[ret, a, b, c] = output3Input1Ret(10, 20, 30): c"); // INOUT [a, b] = inout2(1, 2); checkequal(a, 2, "[a, b] = output2(1, 2): a"); checkequal(b, 4, "[a, b] = output2(1, 2): b"); [ret, a, b] = inout2Ret(1, 2); checkequal(ret, 6, "[a, b] = inout2Ret(1, 2): b"); checkequal(a, 2, "[a, b] = inout2Ret(1, 2): a"); checkequal(b, 4, "[a, b] = inout2Ret(1, 2): b"); [c, d] = inout2Input2(1, 2, 1, 1); checkequal(c, 2, "[c, d] = inout2Input2(1, 2): c"); checkequal(d, 3, "[c, d] = inout2Input2(1, 2): d"); [ret, c, d] = inout2Input2Ret(1, 2, 1, 1); checkequal(ret, 5, "[c, d] = inout2Input2Ret(1, 2): ret"); checkequal(c, 2, "[c, d] = inout2Input2Ret(1, 2): c"); checkequal(d, 3, "[c, d] = inout2Input2Ret(1, 4): d"); [ret, a, b, c] = inout3Input1Ret(10, 1, 2, 3); checkequal(ret, 10, "[ret, a, b, c] = output3Input1Ret(ret, 1, 2, 3): ret"); checkequal(a, 11, "[ret, a, b, c] = output3Input1Ret(ret, 1, 2, 3): a"); checkequal(b, 12, "[ret, a, b, c] = output3Input1Ret(ret, 1, 2, 3): b"); checkequal(c, 13, "[ret, a, b, c] = output3Input1Ret(ret, 1, 2, 3): c"); [ret, a, b, c] = inout3Input3Ret(10, 1, 20, 2, 30, 3); checkequal(ret, 66, "[ret, a, b, c] = output3Input1Ret(10, 20, 30): ret"); checkequal(a, 11, "[ret, a, b, c] = inout3Input1Ret(10, 1, 20, 2, 30, 3): a"); checkequal(b, 22, "[ret, a, b, c] = inout3Input1Ret(10, 1, 20, 2, 30, 3): b"); checkequal(c, 33, "[ret, a, b, c] = inout3Input1Ret(10, 1, 20, 2, 30, 3): c"); // CLASS a = new_ClassA(); [ret, c, d] = ClassA_output2Input2Ret(a, 1, 2); checkequal(ret, 6, "[ret, c, d] = ClassA_output2Input2Ret(a, 1, 2): ret"); checkequal(c, 2, "[c, d] = ClassA_output2Input2Ret(a, 1, 2): c"); checkequal(d, 4, "[c, d] = ClassA_output2Input2Ret(a, 1, 2): d"); [ret, c, d] = ClassA_inout2Input2Ret(a, 1, 2, 1, 1); checkequal(ret, 5, "[ret, c, d] = ClassA_inout2Input2Ret(a, 1, 2): ret"); checkequal(c, 2, "[c, d] = ClassA_inout2Input2(a, 1, 2): c"); checkequal(d, 3, "[c, d] = ClassA_inout2Input2(a, 1, 2): d"); delete_ClassA(a); exec("swigtest.quit", -1);
513e9d2cf327612d9657420252712a64f08e58f7
84ea66af72ab1c482a1a03fd2d8bdc74e9ad1668
/Tutorial02-Plots/Scilab_code/Tutorial2_multi_plotting.sce
cf89ab5fd2977d7ee5ffb40a2b240c0b8725c36f
[]
no_license
FOSSEE/scilab-tutorials
c4a9464a5b163074566234e42659f99e2012ecc0
301609f6ef1653dee4fa2ed74bca3e6f7abc1308
refs/heads/master
2020-03-26T23:48:04.178016
2018-10-08T00:44:39
2018-10-08T00:44:39
145,567,949
0
0
null
null
null
null
UTF-8
Scilab
false
false
826
sce
Tutorial2_multi_plotting.sce
//This script demonstrates multi-plotting in Scilab clear clc exec change_plot_attribs.sci; //Import data from file Data = csvRead('../Data/Tut2_data1.csv'); //Segregate the data into variables t = Data(:,1); x = [Data(:,2:4)] //Style of plot style_plot = [1,2,4] //Fixing the range of plot //Range is defined by [xmin,ymin,xmax,ymax] range_of_plot = [1,-1e-5,15,8e-05]; //Plotting y versus two data sets //plot2d(t,x,style_plot); plot2d(t,x,style_plot,rect=range_of_plot); //Font size and labels for legends //For legends "ur" for upper right legends(['x1','x2', 'x3'],style_plot,opt="ur",font_size=2); //Call function to change plot attributes change_plot_attribs('Time','Data','Data versus Time',5,5,3) //For thickness of the plots attrib = gcf(); attrib.children(2).children(1).children.thickness = 3;
b0629faa95450045edaeba72dc993fd2c244cc66
449d555969bfd7befe906877abab098c6e63a0e8
/821/CH4/EX4.19/4_19.sce
3e4441505f64a3fd983d1202ba906e5db15b825d
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
719
sce
4_19.sce
tA=280;//time of flow for liquid A in seconds// tB=200;//time of flow for liquid B in seconds// pA=1;//density of liquid A in gram per cm^3// pB=1.1;//density of liquid B in gram per cm^3// h=10;//height of liquid responsible for the flow in cm// g=980;//gravity constant in dyns// V=1;//volume of liquid in ml// L=10;//length of the capillary in cm// r=0.1;//radius of the capillary in cm// PA=h*pA*g;//Pressure of liquid A// PB=h*pB*g;//Pressure of liquid B// nA=(%pi*PA*tA*r^4)/(8*L*V);//Viscosity of Liquid A in centipoise// printf('\nViscosity of Liquid A=nA=%fcentipoise',nA); nB=(%pi*PB*tB*r^4)/(8*L*V);//Viscosity of Liquid B in centipoise// printf('\nViscosity of Liquid B=nB=%fcentipoise',nB);
f6a34f2494d76188325d642d35c9f806e27453a6
0e1b45c07f0938ba9c8a003d6ae1cf2d8315efdb
/russiancodecup.ru/2011/qualification/C/test-05.tst
35355fdead0e5398dbc028b112325d7fc47b7774
[]
no_license
Kot-Angens/acm
c85d8582c3e84f218415321743864b9680e01f2e
05472eaa0fff7abb6679826085da5e0c990df4cb
refs/heads/master
2021-01-24T22:36:05.159612
2012-10-02T13:51:56
2012-10-02T13:51:56
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
40
tst
test-05.tst
1 2 15 a a ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1
2b019222046257deb5c3914042b340805e89e645
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.4.1/Unix-Windows/scilab-2.4.1/macros/m2sci/sci_diary.sci
52fe89afc8c30e49161528d63be41a74a418cdd0
[ "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
419
sci
sci_diary.sci
function [stk,txt,top]=sci_diary() // Copyright INRIA txt=[] if rhs<=0 then stk=list('error(''diary toggle in not implemented'')','0','0','0','0') else if conv(stk(top)(1),'l')=='off' then stk=list('diary(0)','0','0','0','0') elseif conv(stk(top)(1),'l')=='on' then stk=list('error(''diary on in not implemented'')','0','0','0','0') else stk=list('diary('+stk(top)(1)+')','0','0','0','0') end end
a7d8b60ead280a02c73e03c896436e3c8814ecf3
4a1effb7ec08302914dbd9c5e560c61936c1bb99
/Project 2/Experiments/AdaBoost/results/AdaBoost.NC-C.abalone-10-1tra/result0s0.tst
0df82c460206c0a2097a3fb6b2e56094118a9def
[]
no_license
nickgreenquist/Intro_To_Intelligent_Systems
964cad20de7099b8e5808ddee199e3e3343cf7d5
7ad43577b3cbbc0b620740205a14c406d96a2517
refs/heads/master
2021-01-20T13:23:23.931062
2017-05-04T20:08:05
2017-05-04T20:08:05
90,484,366
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,407
tst
result0s0.tst
@relation abalone @attribute Sex{M,F,I} @attribute Length real[0.075,0.815] @attribute Diameter real[0.055,0.65] @attribute Height real[0.0,1.13] @attribute Whole_weight real[0.002,2.8255] @attribute Shucked_weight real[0.001,1.488] @attribute Viscera_weight real[5.0E-4,0.76] @attribute Shell_weight real[0.0015,1.005] @attribute Rings{15,7,9,10,8,20,16,19,14,11,12,18,13,5,4,6,21,17,22,1,3,26,23,29,2,27,25,24} @inputs Sex,Length,Diameter,Height,Whole_weight,Shucked_weight,Viscera_weight,Shell_weight @outputs Rings @data 19 7 9 7 10 7 15 7 7 7 6 7 14 7 15 7 15 7 10 7 9 7 14 7 4 7 13 7 8 7 5 7 14 7 9 7 10 7 9 7 11 7 6 7 9 7 14 7 6 7 6 7 10 7 14 7 8 7 5 7 11 7 5 7 7 7 12 7 14 7 14 7 22 7 20 7 13 7 18 7 17 7 16 7 20 7 11 7 10 7 7 7 16 7 13 7 12 7 21 7 11 7 23 7 10 7 11 7 17 7 13 7 4 7 13 7 9 7 7 7 18 7 19 7 8 7 15 7 5 7 6 7 15 7 11 7 12 7 8 7 10 7 6 7 6 7 7 7 7 7 7 7 8 7 8 7 10 7 9 7 12 7 11 7 10 7 5 7 7 7 6 7 6 7 8 7 8 7 7 7 9 7 8 7 8 7 11 7 9 7 9 7 12 7 3 7 4 7 5 7 7 7 7 7 6 7 8 7 8 7 9 7 8 7 8 7 9 7 8 7 10 7 10 7 11 7 12 7 10 7 7 7 9 7 6 7 9 7 7 7 9 7 9 7 9 7 8 7 10 7 10 7 9 7 10 7 10 7 10 7 12 7 10 7 10 7 7 7 8 7 8 7 9 7 9 7 9 7 10 7 9 7 11 7 11 7 10 7 10 7 6 7 7 7 8 7 7 7 8 7 8 7 7 7 9 7 10 7 11 7 9 7 8 7 8 7 7 7 12 7 12 7 9 7 10 7 10 7 12 7 9 7 14 7 11 7 13 7 10 7 11 7 10 7 12 7 8 7 8 7 11 7 10 7 5 7 7 7 8 7 7 7 8 7 8 7 9 7 8 7 8 7 8 7 9 7 7 7 10 7 13 7 10 7 10 7 11 7 9 7 10 7 9 7 11 7 10 7 11 7 10 7 9 7 10 7 10 7 5 7 6 7 7 7 6 7 8 7 10 7 8 7 7 7 8 7 11 7 9 7 10 7 10 7 7 7 27 7 7 7 10 7 19 7 9 7 6 7 9 7 15 7 13 7 8 7 16 7 13 7 13 7 11 7 13 7 14 7 13 7 8 7 10 7 10 7 12 7 9 7 17 7 12 7 11 7 14 7 15 7 11 7 16 7 12 7 8 7 15 7 7 7 6 7 8 7 9 7 6 7 6 7 6 7 8 7 10 7 9 7 11 7 7 7 8 7 9 7 9 7 9 7 10 7 9 7 10 7 9 7 7 7 8 7 8 7 6 7 7 7 11 7 11 7 8 7 11 7 12 7 10 7 4 7 7 7 8 7 9 7 9 7 8 7 10 7 11 7 9 7 13 7 12 7 9 7 13 7 9 7 9 7 9 7 8 7 11 7 11 7 9 7 11 7 10 7 12 7 9 7 9 7 7 7 6 7 11 7 18 7 17 7 17 7 10 7 12 7 12 7 14 7 15 7 15 7 9 7 12 7 11 7 16 7 16 7 12 7 17 7 10 7 10 7 13 7 13 7 18 7 9 7 13 7 8 7 6 7 9 7 11 7 4 7 9 7 11 7 11 7 7 7 7 7 8 7 8 7 9 7 10 7 11 7 7 7 8 7 8 7 11 7 10 7 11 7 12 7 7 7 10 7 6 7 5 7 6 7 9 7 9 7 9 7 10 7 11 7 11 7 7 7 7 7 10 7 9 7 5 7 8 7 9 7 11 7 11 7 13 7 9 7 12 7 8 7 10 7 12 7 14 7 7 7 8 7 9 7 6 7 9 7 9 7 16 7 12 7 11 7 10 7 13 7 15 7 14 7 13 7 9 7 4 7 6 7 10 7 11 7 5 7 10 7 9 7 8 7 10 7 11 7 12 7 10 7 8 7 11 7 11 7 9 7 11 7 11 7 13 7 7 7 10 7 8 7
0d9921ac879bed4bdc1055526c03ae37534df18c
449d555969bfd7befe906877abab098c6e63a0e8
/3825/CH7/EX7.6/Ex7_6.sce
562d24ca36d2a152e7d0ce38a59dff788017982a
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
273
sce
Ex7_6.sce
clc TA=27+273 //temperature in kelvin TL=0+273//temperature in kelvin T1=150+273//temperature in kelvin mprintf("QL/Q1=%f\n",(TL*(T1-TA))/(T1*(TA-TL)))//ans vary due to roundoff error mprintf("(Q2+QH)/Q1=%f",(TA*(T1-TL))/(T1*(TA-TL)))//ans vary due to roundoff error
31f4280bb1aec9313fd24646cb026814cb6fb5b6
449d555969bfd7befe906877abab098c6e63a0e8
/662/CH6/EX6.8/ex6_8.sce
d265b8d8cbc525a2564dedd1440dd5b7389830dc
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
173
sce
ex6_8.sce
//Example 6.8 //To display consecutive digits with one digit on each line digit = 0; while(digit <= 9) printf("%d\n",digit); digit=digit+1; end
87591b61627488837bac03fe6045b959bbe5ef0d
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.3/Unix-Windows/scilab-2.3/macros/scicos/do_help.sci
18552864516ebe92c62738b3fef02d901466ab61
[ "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain", "MIT" ]
permissive
clg55/Scilab-Workbench
4ebc01d2daea5026ad07fbfc53e16d4b29179502
9f8fd29c7f2a98100fa9aed8b58f6768d24a1875
refs/heads/master
2023-05-31T04:06:22.931111
2022-09-13T14:41:51
2022-09-13T14:41:51
258,270,193
0
1
null
null
null
null
UTF-8
Scilab
false
false
13,168
sci
do_help.sci
function do_help() while %t do [btn,xc,yc,cwin]=xclick(0); pt=[xc,yc] if cwin==curwin then [nm,pt,btn]=getmenu(datam,pt) if nm>0 then name=menus(nm) break, else k=getobj(scs_m,[xc;yc]) if k<>[] then o=scs_m(k) name=o(5) break end end elseif or(windows(find(windows(:,1)<0),2)==cwin) then kwin=find(windows(:,2)==cwin) pal=palettes(-windows(kwin,1)) k=getobj(pal,[xc;yc]) o=pal(k) name=o(5) nm=0 break end end if nm==0 then fhelp(name) // unix_s('$SCI/bin/scilab -help ""'+name+'"" | $SCI/bin/xless &') return end select name case 'Help' then mess=[' To get help on an object or menu buttons,'; ' click first on Help button and then on '; ' the selected object or menu item.'] case 'Edit..' then mess=[' Click on the Edit button to open the Edit menu.'] case 'Simulate..' then mess=[' Click on the Simulate.. button to open the'; ' compilation/execution menu.'] case 'File..' then mess=[' Click on the File.. button to open the file ' ' management menu.'] case 'Block..' then mess=[' Click on the Block.. button to open the block '; ' management menu.'] case 'Pal editor..' then mess=[' Click on the Palette.. button to open the palette ' ' management menu'; ' ' ' In this mode user may create or modify a palette'; ' using blocks coming from other palettes, from a '; ' loaded diagram or newly defined.' ' ' ' At loading time scicos available palettes are defined' ' by the scicos_pal variable (see help on scicos_pal)'] case 'View' then mess=[' To shift the diagram to left, right, up or down,'; ' click first on the View button, then on a point in'; ' the diagram where you want to appear in the middle'; ' of the graphics window. '] case 'Exit' then mess=[' Click on the Exit button to leave Scicos and'; ' return to Scilab session. Save your diagram '; ' or palette before leaving.'] case 'Palettes' then mess=[' Click on the Palettes button to open a new palette.'] case 'Move' then mess=[' To move a block in the active editor Scicos window'; 'or in edited palette,' ' click first on the Move button, ' ' then click on the selected block,' ' drag the mouse to the desired new block position ' ' and click again to fix the position.' ' ' ' The lower left corner of the block is placed'; ' at the selected point.' ' ' ' To move a segment of a link in the active editor ' ' Scicos window,click first on the Move button, ' ' then click on the selected segment, ' ' drag the mouse to the desired new segment position ' ' and click again to fix the position.'] case 'Copy' then mess=['*To copy a block in the active editor Scicos window'; ' Click first on the Copy button, then' ' click (with left button) on the to-be-copied block' ' in Scicos windows or in a palette) , and' ' finally click where you want the copy'; ' to be placed in the active editor Scicos window.'; ' ' ' The lower left corner of the block is placed'; ' at the selected point.'; ' ' '*To copy a region in the active editor Scicos window'; ' Click first on the Copy button, then' ' click (with right button) on a corner of the desired'; ' region (in Scicos windows or in a palette), drag to ' ' define the region, click to fix the region and' ' finally click where you want the copy.' ' to be placed in the active editor Scicos window.'; ' NOTE: If source diagram is big be patient,'; ' region selection may take a while.' ' ' ' The lower left corner of the block is placed'; ' at the selected point.'; ] case 'Align' then mess=[' To obtain nice diagrams, you can align ports of'; ' different blocks, vertically and horizontally.'; ' Click first on the Align button, then on the first'; ' port and finally on the second port.'; ' The block corresponding to the second port is moved.'; ' ' ' A connected block cannot be aligned.'] case 'Link' then mess=[' To connect an output port to an input port,'; ' click first on the Link button, then on the output'; ' port and finally on the input port.'; ' To split a link, click first on the Link button,'; ' then on the link where the split should be placed,'; ' and finally on an input port.' ' '; ' Only one link can go from and to a port.'; ' Link color can be changed directly by clicking'; ' on the link.'] case 'Delete' then mess=['*To delete a block or a link, click first on the Delete' ' button, then on the selected object (with left button).'; ' ' ' If you delete a block all links connected to it'; ' are deleted as well.'; ' ' '*To delete a blocks in a region, click first on the Delete' ' button, then click (with right button) on a corner of the '; ' desired region, drag to define the region, and click to '; ' fix the region. All connected links will be destroyed as'; ' well'] case 'Flip' then mess=[' To reverse the positions of the (regular) inputs' ' and outputs of a block placed on its sides,'; ' click on the Flip button first and then on the'; ' selected block. This does not affect the order,'; ' nor the position of the input and output event'; ' ports which are numbered from left to right.' ' ' ' A connected block cannot be flipped.'] case 'Undo' then mess=[' Click on the Undo button to undo the last edit operation.'] case 'Replot' then mess=[' Click on the Replot button to replot the content of' ' the graphics window. Graphics window stores complete'; ' history of the editing session in memory.'; ' ' ' Replot is usefull for ''cleaning'' this memory.'] case 'Back' then mess=[' Click on the Back button to go back to the main menu.'] case 'Compile' then mess=[' Click on the Compile button to compile the block diagram.'; ' This button need never be used since compilation is'; ' performed automatically, if necessary, before'; ' the beginning of every simulation (Run button).'; ' ' ' Normally, a new compilation is not needed if only'; ' system parameters and internal states are modified.'; ' In some cases however these modifications are not'; ' correctly updated and a manual compilation may be'; ' needed before a Restart or a Continue.'; ' Please report if you encounter such a case.'] case 'Run' then mess=[' Click on the Run button to start the simulation.'; ' If the system has already been simulated, a'; ' dialog box appears where you can choose to Continue,' ' Restart or End the simulation.' ' ' ' You may interrupt the simulation by clicking on the ' ' ""stop"" button, change any of the block parameters' ' and continue the simulation with the new values.'] case 'Purge' then mess=[' Click on the Purge button to get a clean data structure:'; ' If diagram has been hugely modified many deleted blocks'; ' may remain in the data structure. It may be usefull to'; ' suppress then before saving.'] case 'Save' then mess=[' Click on the save button to save the block diagram'; ' in a binary file already selected by a previous'; ' click on the Save As button. If you click on this'; ' button and you have never clicked on the Save As'; ' button, the diagram is saved in the current direcotry'; ' as <window_name>.cos where <window_name> is the name'; ' of the window appearing on top of the window (usually'; ' Untitled or Super Block).'] case 'Save As' then mess=[' Click on the Save As button to save the block diagram'; ' or palette in a binary file. A dialog box allows choosing '; ' the file which must have a .cos extension. The diagram'; ' takes the name of the file (without the extension).'] case 'FSave' then mess=[' Click on the FSave button to save the current diagram'; ' or palette in a formatted ascii file. ' ' A dialog box allows choosing the file which must have a'; ' "".cosf"" extension.'; ' ' ' Formatted save is slower than regular save but'; ' has the advantage that the generated file is'; ' system independent (usefull for exchanging data'; ' on different computers.'] case 'Newblk' then mess=[' Click on the Newblk button to save the Super Block' ' as a new Scicos block. A Scilab function is generated' ' and saved in a file <window_name>.sci in a requested'; ' directory. <window_name> is the name of the'; ' Super Block appearing on top of the window.'; ' A dialog allows choosing the directory.'] case 'Load' then mess=[' Click on the Load button to load an ascii or binary file'; ' containing a saved block diagram or palette.' ' A dialog box allows user choosing the file.'] case 'Window' then mess=[' In the active editor Scicos window, clicking on the '; ' Window button invokes a dialog box that allows you to change '; ' window dimensions']; case 'Setup' then mess=[' In the main Scicos window, clicking on the Setup button'; ' invokes a dialog box that allows you to change '; ' integration parameters: '; ' *final integration time'; ' *absolute and relative error tolerances' ; ' *time tolerance (the smallest time interval for which '; ' the ode solver is used to update continuous states)'; ' *deltat : the maximum time increase realized by a single'; ' call to the ode solver']; case 'New' then mess=[' Clicking on the New button loads an empty diagram in the'; ' active editor Scicos window. If the previous content of the'; ' window is not saved, it will be lost.'] case 'Replace' then mess=[' To replace a block in the active editor Scicos window'; ' Click first on the Replace button, then' ' click on the replacement block (in' ' Scicos window or in a palette) , and' ' finally click on the to-be-replaced block'] case 'Eval' then mess=[' All dialogs user answers may be scilab instructions'; ' they are evaluated immediatly and stored as character strings.' ' Click on this button to have them re-evaluated according to'; ' new values of underlying scilab variables. ' ' ' ' These underlying scilab variables may be user global variables' ' defined before scicos was launch, They may also be defined in' ' by the scicos context (see Context button)'] case 'Resize' then mess=[' To change the size of a block , click first on this button,'; ' click next on the desired block. A dialog appear that allows '; ' you to change the width and/or height of the block shape.']; case 'Icon' then mess=[' To change the icon of a block, click first on this button,'; ' click next on the desired block. A dialog appear that allows '; ' you to enter scilab instructions used to draw the icon'] ; case 'Color' then mess=[' To change the background color of a block, click first on '; ' this button, click next on the desired block. A dialog appear'; ' that allows you to choose the desired color']; case 'Label' then mess=[' To add a label to block, click first on this button, click next'; ' on the desired block. A dialog appear that allows you to enter '; ' the desired label.'; ' labels are used to import data from a block in an other one']; case 'AddNew' then mess=[' To add a newly defined block to the current palette '; ' click first on this button, A dialog box will popup '; ' asking for the name of the GUI function associated ' ' with the block. If this function is not already loaded'; ' it was search in the current directory. The user may then' ' click at the desired position of the block icon in the palette'] case 'Calc' then mess=[' When you click on this button you switch Scilab to '; ' the pause mode (see the help on pause).'; ' In the Scilab main window and you may enter Scilab instructions'; ' to compute whatever you want.'; ' to go back to Scicos you need enter the ""return"" or'; ' ""[...]=return(...)"" Scilab instruction.'; ' ' ' If you use ""[...]=return(...)"" Scilab instruction take care'; ' not to modify Scicos variables such as ""scs_m"",""scs_gc"",'; ' ""menus"",""datam"",...'; ' ' ' If you have modified scicos graphic window you may retore it '; ' using the Scicos ""Replot"" menu.'] case 'Context' then mess=[' When you click on this button you get a dialogue to'; ' enter scilab instructions for defining symbolic scicos parameters'; ' used in block definitions or to do whatever you want'; ' '; ' These instructions will be evaluated each time the diagram '; ' is loaded.' ' '; ' If you change the value of a symbolic scicos parameters in '; ' the contextyou can either click on the block(s) that use this'; ' variable or on the Eval button to update actual block parameter'; ' value.'] end if exists('mess')==0 then mess='No help available on this topic. Sorry.'; end message(mess)
a6ca6bf4274d14aedc2e61530f41582a315c8cec
449d555969bfd7befe906877abab098c6e63a0e8
/1286/CH7/EX7.11/7_11.sce
a39dc77ac4189e37dbe17c42f8702710fc60cf38
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
293
sce
7_11.sce
clc //initialisation a=0.132//nm^4/mole^2 b=3.12*10^-5//m^3/mole^2 p=5*10^5//Nm^-2 v=20*10^-3//m3 R=8.4//j/mole/k v2=2*10^-3//m3 p1=5//pa //CALCULATIONS t=((p+(a/(v*v)))*(v-b))/(5*R) p2=(p1*v)/v2 //results printf(' \n temperature = % 1f k',t) printf(' \n pressure= % 1f pa',p2)
3cf4c22b69e89c2945f2d436290b2e1b6e113e71
42d11b27aa17f58dc219f2ef3dbe47ce246ac7ab
/map411 q5 dx erreur graphes 3.sce
f26f4e495ce52e1d312f226282ec73509be41bbb
[]
no_license
yujia21/MAP411projet
23472dae62a23b1fe7e90d0d12371de0b930bc27
3987e227610b6a755a3caf4b760d4a587ec779cd
refs/heads/master
2021-01-10T01:11:29.632911
2016-01-20T18:03:07
2016-01-20T18:03:07
48,615,265
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,881
sce
map411 q5 dx erreur graphes 3.sce
clf; //dx xx = [0.0142857, 0.0153846, 0.0166667, 0.0181818, 0.02, 0.0222222, 0.025, 0.0285714, 0.0333333, 0.04 ] //dt = 0.000175 y9 = [0.0012206743856715274 0.0012989953087039208 0.0013887835185122377 0.00149323118984801 0.0016112138971896561 0.001756614613127705 0.001924545790758958 0.002129997358773894 0.0023809243073396047 0.002686933082043874 ] y10 = [0.0072213495312066535 0.007407494451004264 0.00760992603609615 0.007830478776942835 0.008070939905070152 0.008332672547185805 0.00861571116433495 0.008916627711157293 0.00922321029665901 0.009500247790684981 ] subplot(2,2,1); plot2d(log(xx),log(y9)); plot2d(log(xx),log(xx)*0.75-3.47,style=2); xtitle( 'Changement dx, Norme L inf, dt = 0.000175', 'log(dx)', 'log(erreur)') ; h1=legend(['log(erreur))', 'log(dx)*0.75-3.47'],4); subplot(2,2,2); plot2d(log(xx),log(y10)); plot2d(log(xx),log(xx)*0.2-4,style=2); xtitle( 'Changement dx, Norme L 2, dt = 0.000175', 'log(dx)', 'log(erreur)') ; h2=legend(['log(erreur))', 'log(dx)*0.2-4'],4); //dt = 0.0002 y11 = [0.0012297642632779215 0.0013081577530864585 0.0013977863971063043 0.0015023585661881889 0.0016204737046137119 0.0017656347026682173 0.001933735235159162 0.002139100280402817 0.0023899733480239327 0.0026958192755204835 ] y12 = [0.0072752392907017745 0.007459381064843597 0.007659729060460224 0.007878107782045124 0.008116290171464922 0.008375619788687795 0.008656108671629525 0.008954293387163106 0.00925790892848225 0.009531657590927702 ] subplot(2,2,3); plot2d(log(xx),log(y11)); plot2d(log(xx),log(xx)*0.75-3.47,style=2); xtitle( 'Changement dx, Norme L inf, dt = 0.0002', 'log(dx)', 'log(erreur)') ; h3=legend(['log(erreur))', 'log(dx)*0.75-3.47'],4); subplot(2,2,4); plot2d(log(xx),log(y12)); plot2d(log(xx),log(xx)*0.2-4,style=2); xtitle( 'Changement dx, Norme L 2, dt = 0.0002', 'log(dx)', 'log(erreur)') ; h4=legend(['log(erreur))', 'log(dx)*0.2-4'],4);
c121fd80177280531c03ba7cac416609ebb857f4
449d555969bfd7befe906877abab098c6e63a0e8
/3574/CH2/EX2.10/EX2_10.sce
bd6a7eb4e1a59159df6b38074f65b6600e250005
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,077
sce
EX2_10.sce
// Example 2.10 // Computation of (a) Transformer regulation (b) Secondary voltage when the // load is disconnected (c) Input primary voltage // Page No. 70 clc; clear; close; // Given data FP=0.75 // Power-factor leading RPU=0.013; // Percent resistance XPU=0.038; // Percent reactance Vrated=600; // Rated voltage of transformer TTR=12; // Transformer turns ratio (7200/600) ELS=621; // Low side voltage // (a) Transformer regulation Theta=acosd(FP); // Transformer regulation RegPU=sqrt( ( (RPU+FP)^2)+ ((XPU-sind(Theta))^2))-1; // Transformer regulation in percentage RegPU_Per=RegPU*100; // (b) Secondary voltage when the load is disconnected Vnl=(RegPU*Vrated)+Vrated; // (c) Input primary voltage EHS=Vnl*TTR; // Display result on command window printf("\n Transformer regulation = %0.4f ",RegPU); printf("\n Secondary voltage when the load is disconnected = %0.1f V", Vnl); printf(" \n Input primary voltage = %0.0f V",EHS);
a08177a8c3f9b24c30a45b4c14f5e41633c07a5c
449d555969bfd7befe906877abab098c6e63a0e8
/1910/CH8/EX8.2/Chapter82.sce
b3cfd89429e144d983ce80a9af1fc3a133ae402f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,525
sce
Chapter82.sce
// Display mode mode(0); // Display warning for floating point exception ieee(1); clear; clc; disp("Introduction to heat transfer by S.K.Som, Chapter 8, Example 2") //The thin plates are kept at temprature(Tw)=60°C while the temprature of water bath(Tinf)=20°C Tw=60; Tinf=20; //The plates have length(L)=90mm or .09m L=.09; //The minimum spacing between the plates will be twice the thickness of the boundary layer at the trailing edge where x=0.09. disp("The minimum spacing between the plates will be twice the thickness of the boundary layer at the trailing edge where x=0.09") x=.09; //At mean film temprature 40°C The physical properties parameters can be taken as // conducivity(k=0.0628W/(m*K)),Prandtl number(Pr=4.34),Density(rho=994.59kg/m^3),kinematic viscosity(nu=0.658*10^-6m^2/s),Volume expansion coefficient(Beta=3*10^-4K^-1) k=0.628; Pr=4.34; rho=994.59; nu=0.658*10^-6; Beta=3*10^-4; //g is acceleration due to gravity =9.81m/s^2 g=9.81; //Grashoff number is given by GrL=(g*beta*(Tw-Tinf)*L^3)/(nu)^2 disp("Grashoff number is") GrL=(g*Beta*(Tw-Tinf)*L^3)/(nu)^2 //Rayleigh number is defined as RaL=GrL*Pr disp("Rayleigh number is") RaL=GrL*Pr disp("Since Ra<10^9,Therefore the flow is laminar") //delta is the thickness of the boundary layer disp("The thickness of the boundary layer in metre is") delta=x*3.93*Pr^(-1/2)*(0.952+Pr)^(1/4)*GrL^(-1/4) //spac is the minimum spacing disp("The minimum spacing in metre is") spac=2*delta
428be0061282795a781aab8cbb7cb96654d5e94b
449d555969bfd7befe906877abab098c6e63a0e8
/1733/CH1/EX1.12/1_12.sce
e27055f4abbbce3d2ad274e3631cea584a045a19
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
233
sce
1_12.sce
//1.12 clc; P_loss_peak=6; Ig=0.763; Vg=1+9*Ig; Rg=(11-9*Ig)/Ig; printf("\nResistance to be connected in series=%.3f ohm", Rg) duty=0.3; P_loss_average=P_loss_peak*duty; printf("\nAverage power loss =%.1f W", P_loss_average)
45e3e87e50396b8d151cbdc37ff42ca44e222175
449d555969bfd7befe906877abab098c6e63a0e8
/1271/CH1/EX1.49/example1_49.sce
a82dd774bc5132121020533d77aaa47bf0e287e4
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
402
sce
example1_49.sce
clc // Given That n = 50 // no. of bands crosses the line of observation lambda = 5.896e-7 // wavelength of light in meter mu = 1.4 // refractive index // Sample Problem 49 on page no. 1.57 printf("\n # PROBLEM 49 # \n") t = n*lambda / (2*(mu-1)) // calculation for thickness of the plate printf("\n Standard formula used \n t = n*lambda /2*(mu-1)\n") printf("\n Thickness of the plate = %e m.",t)
cb632be17af720431243301405e2adddf34fc40e
449d555969bfd7befe906877abab098c6e63a0e8
/1523/CH2/EX2.5/2_5.sce
dd49a36025f3338840f5c14018496634f0f95399
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
372
sce
2_5.sce
//Network Theorem-1 //pg no.-2.9 //example2.5 //converting delta network to star network a=25; b=20; c=35; R1=(b*c)/(a+b+c); R2=(a*b)/(a+b+c); R3=(a*c)/(a+b+c); printf("\nConverting the delta formed by resistors 20 Ohm ,25 Ohm, 35 Ohm into an equivalent star network"); printf("\nR1= %.2f Ohm",R1); printf("\nR2= %.2f Ohm",R2); printf("\nR3= %.2f Ohm",R3);
c280aa452b84aeff4810f5c9cecb0be26376c7ba
6c9a6a1488d24fab72280520aba7d98c82d25c6f
/sigopt-uncertainty/Colonie2.sce
ff8345fd705af49e82872bc8226782dfbac0b175
[]
no_license
IGNF/SIGOPT
1f9b91de43de7aab4ca88b875f3ac1f4aa36b82b
b5f33f5940e15fb46fa3979dd096098508dc66a3
refs/heads/master
2020-04-06T07:12:27.471020
2017-09-07T14:37:45
2017-09-07T14:37:45
59,760,247
1
0
null
null
null
null
UTF-8
Scilab
false
false
11,167
sce
Colonie2.sce
//Initialisation du graphe save=1 c=csvRead("/home/mickael/Téléchargements/donnees_test/test_sofiane/matrice_distance.csv",";") c=c(2:size(c,1),2:size(c,2)) q=csvRead("/home/mickael/Téléchargements/donnees_test/test_sofiane/trash_quant.csv",";") q=q(2:size(q,1),2:size(q,2)) qA=q; //Quantités initiales de déchets a=bool2s(c>0); //Matrice d'adjacence NA=sum(a); //Nombre d'arcs (orientés) D=list(); for i=1:NS D(i)=Dijkstra(a,c,i); end d=zeros(NS,NS); //distances (coûts) for i=1:NS for j=(i+1):NS CH=pcch(a,c,i,D(j),j); for h=1:(length(CH)-1) d(i,j)=d(i,j)+c(CH(h),CH(h+1)); d(j,i)=d(j,i)+c(CH(h),CH(h+1)); end end end PCCH=list(); for i=1:NS PCCH(i)=list(); end for i=1:NS for j=1:NS PCCH(i)(j)=pcch(a,c,i,D(j),j); end end Md=max(d); s=zeros(NS,NS); //Mesure d'économie de déplacement for i=1:NS for j=1:NS s(i,j)=1/(1+100*d(i,j)); end end V=list(); //Voisinages de chaque sommet for k=1:NS V(k)=find(a(k,:)==1); end VA=V; //Voisinages absolus N=3; //Nombre de tournées C=170; //Capacité d'un véhicule CC=0; //Capacité courante utilisée tau=ones(NA,NA); //Phéromones (entre deux arcs servis consécutivement) az=1; T=zeros(NS,NS); for i=1:NS //Indexation des arcs for j=1:NS if a(i,j)==1 then T(i,j)=az; az=az+1; end end end tau1=a; tauA=tau; //Quantité initiale de phéromones rho=0.98; //Coefficient d'évaporation alpha=1; beta=1; //Path-scanning X=list(); //Trajet Y=list(); //Déblayages NC=1; //Noeud courant for k=1:N X(k)=1; Y(k)=[]; end for k=1:N while CC<C/2 if V(NC)==[] then V(NC)=VA(NC); end for h=V(NC) A(h)=d(1,h); end NC=find(A==max(A)); if length(NC)>1 then NC=NC(grand(1,"uin",1,length(NC))); end X(k)=[X(k) NC]; if q(X(k)(length(X(k))-1),NC)<=C-CC & q(X(k)(length(X(k))-1),NC)>0 then Y(k)=[Y(k) 1]; CC=CC+q(X(k)(length(X(k))-1),NC); q(X(k)(length(X(k))-1),NC)=0; q(NC,X(k)(length(X(k))-1))=0; V(NC)=V(NC)(V(NC)<>X(k)(length(X(k))-1)); //Fermeture de l'arc V(X(k)(length(X(k))-1))=V(X(k)(length(X(k))-1))(V(X(k)(length(X(k))-1))<>NC); else Y(k)=[Y(k) 0]; end clear A end while NC<>1 if V(NC)==[] then V(NC)=VA(NC); end for h=1:length(V(NC)) A(h)=d(1,V(NC)(h)); end h=find(A==min(A)); if length(h)>1 then h=h(grand(1,"uin",1,length(h))); end NC=V(NC)(h); X(k)=[X(k) NC]; if q(X(k)(length(X(k))-1),NC)<=C-CC & q(X(k)(length(X(k))-1),NC)>0 then Y(k)=[Y(k) 1]; CC=CC+q(X(k)(length(X(k))-1),NC); q(X(k)(length(X(k))-1),NC)=0; q(NC,X(k)(length(X(k))-1))=0; V(NC)=V(NC)(V(NC)<>X(k)(length(X(k))-1)); //Fermeture de l'arc V(X(k)(length(X(k))-1))=V(X(k)(length(X(k))-1))(V(X(k)(length(X(k))-1))<>NC); else Y(k)=[Y(k) 0]; end clear A end CC=0; //Vidage du camion end L=cout2(X,Y,c,qA); //Amélioration de la solution par colonie de fourmis Gachette=0; q=qA; //Réinitialisation des déchets V=VA; //Réinitialisation des voisins Lseuil=120; //Plafond des bonnes solutions NC=0; //Noeud courant pp=1; //Probabilité de diversification K=3; NbIter=500; MC=%inf; Compteur=0; tau=tauA; tau1=a; L3=ones(1,NbIter); Lminsol=%inf; for n=1:NbIter pp=0.99*pp; X=list(); Y=list(); for k=1:N X(k)=1; Y(k)=[]; end for k=1:N while NC<>1 p=rand(1,'uniform'); if NC==0 then NC=1; end if p<=pp then //Diversification A=zeros(NS,NS); if length(X(k))==1 then for l=2:NS A(1,l)=q(1,l); end else for h=1:NS for l=1:NS if q(h,l)<=C-CC then A(h,l)=q(h,l)*s(NC,h); end end end end if CC<=C/4 then for i=V(1) A(i,1)=A(i,1)/10; end end if CC>=3*C/4 then for i=V(1) A(i,1)=A(i,1)*10; end end if sum(A)==0 then Gachette=1; CH=PCCH(NC)(1); if length(CH)>=2 then e=CH(length(CH)-1); else break end A(e,1)=1; end b=gsort(matrix(A,1,length(A))); b=b(1:K); b=b(b>0); u=rand(1,'uniform'); b2=cumsum(b)/sum(b); for i=1:length(b) if u<=b2(i) then [km,lm]=find(A==b(i)); break end end g=grand(1,"uin",1,length(km)); km=km(g); lm=lm(g); // pause B=PCCH(NC)(km); B=B(B<>NC); B=B'; X(k)=[X(k) B lm]; if Gachette==0 then Y(k)=[Y(k) zeros(1,length(B)) 1]; else Y(k)=[Y(k) zeros(1,length(B)) 0]; end CC=CC+q(km,lm); q(km,lm)=0; q(lm,km)=0; NC=lm; else //Intensification A=zeros(NS,NS); if NC==1 & length(X(k))==1 & k==1 then for l=2:NS if q(1,l)>0 & a(1,l)==1 then A(1,l)=tau1(1,l)^beta; end end elseif NC==1 & length(X(k))==1 then I1=find(Y(k-1)==1); for h=1:NS for l=1:NS if q(h,l)>0 & a(h,l)==1 then if I1<>[] then A(h,l)=tau(T(X(k-1)(I1(length(I1))),X(k-1)(I1(length(I1))+1)),T(h,l))^beta; else A(h,l)=1; end end end end else for h=1:NS for l=1:NS if q(h,l)>0 & q(h,l)<=C-CC & a(h,l)==1 & NC<>1 then A(h,l)=s(NC,h)^alpha*tau(T(X(k)(length(X(k))-1),NC),T(h,l))^beta; end end end end if CC<=C/4 then for i=V(1) A(i,1)=A(i,1)/10; end end if CC>=3*C/4 then for i=V(1) A(i,1)=A(i,1)*10; end end if sum(A)==0 then Gachette=1; CH=PCCH(NC)(1); if length(CH)>=2 then e=CH(length(CH)-1); else break end A(e,1)=1; end b=gsort(matrix(A,1,length(A))); b=b(1:K); b=b(b>0); u=rand(1,'uniform'); b2=cumsum(b)/sum(b); for i=1:length(b) if u<=b2(i) then [km,lm]=find(A==b(i)); break end end g=grand(1,"uin",1,length(km)); km=km(g); lm=lm(g); // pause B=PCCH(NC)(km); B=B(B<>NC); B=B'; X(k)=[X(k) B lm]; if Gachette==0 then Y(k)=[Y(k) zeros(1,length(B)) 1]; else Y(k)=[Y(k) zeros(1,length(B)) 0]; end CC=CC+q(km,lm); q(km,lm)=0; q(lm,km)=0; NC=lm; end Gachette=0; // pause end if NC<>1 then B=PCCH(NC)(1); B=B(B<>NC); B=B'; X(k)=[X(k) B]; Y(k)=[Y(k) zeros(1,length(B))]; end CC=0; NC=0; end q=qA; L(n)=cout2(X,Y,c,qA); Lmin=min(L); L3(n)=coutcarp(X,Y,c,q); if IsSolution(X,Y,qA)==1 & L3(n)<Lminsol then Xminsol=X; Yminsol=Y; Lminsol=L3(n); end if n==1 then Xmin=X; Ymin=Y; Lmin1=L(1); end tau=rho*tau; tau1=rho*tau1; if L(n)<Lmin1 then tau=tauA; tau1=a; Xmin=X; Ymin=Y; Lmin1=Lmin; end if IsSolution(X,Y,qA)==1 then //test Compteur=Compteur+1; for k=1:N I=find(Y(k)==1); for h=1:(length(I)-1) //Traces "intra-tournées" tau(T(X(k)(I(h)),X(k)(I(h)+1)),T(X(k)(I(h+1)),X(k)(I(h+1)+1)))=tau(T(X(k)(I(h)),X(k)(I(h)+1)),T(X(k)(I(h+1)),X(k)(I(h+1)+1)))+exp((Lseuil-L(n)))*(Lseuil-L(n)>=0); end end for k=2:N //Traces "inter-tournées" I1=find(Y(k-1)==1); I2=find(Y(k)==1); if I2==[] | I1==[] then continue end tau(T(X(k-1)(I1(length(I1))),X(k-1)(I1(length(I1))+1)),T(X(k)(I2(1)),X(k)(I2(1)+1)))=tau(T(X(k-1)(I1(length(I1))),X(k-1)(I1(length(I1))+1)),T(X(k)(I2(1)),X(k)(I2(1)+1)))+exp((Lseuil-L(n)))*(Lseuil-L(n)>=0); end tau1(X(1)(1),X(1)(2))=tau1(X(1)(1),X(1)(2))+exp((Lseuil-L(n)))*(Lseuil-L(n)>=0); //Trace sur le tout premier arc end //test Lseuil=Lmin*1.2; end for i=1:NbIter L2(i)=mean(L(i:NbIter)); end if save==1 then for i=1:size(Xmin) if i ==1 then u = Xmin(i) continue end u=[u,Xmin(i)] end for i=1:size(Ymin) if i ==1 then w = Ymin(i) continue end w=[w,Ymin(i)] end csvWrite(u, "/home/mickael/Téléchargements/donnees_test/test_sofiane/path.csv",";") csvWrite(w, "/home/mickael/Téléchargements/donnees_test/test_sofiane/remove.csv",";") end
a9f1f8e23a76a562ee98ddddc6c4bfc13600ae7d
449d555969bfd7befe906877abab098c6e63a0e8
/965/CH7/EX7.66/66.sci
13f948b91bb841d5f34eb7cea8322b9e155dcf0b
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
563
sci
66.sci
clc; clear all; disp("heat loss from four surfaces") U=90*1000/3600;// m/s ta=50;// degree C l=10;//m w=4;//m h=3;//m ts=10;// degree C rho=1.165;// kg/m^3 cp=1005;// J/kg.K k=.02676;// W/m.C v=16*10^(-6);// m^2/s Pr=0.701; Rel=U*l/v; Nu=0.036*Rel^0.8*Pr^0.333; hs=k*Nu/l; A=2*(w+h)*l; Ql=hs*A*(ta-ts);//W Q=Ql/1000;// kQ disp("W",Q,"Heat loss from surfaces =") cc=Q*3600/14000; disp("TR",cc,"Cooling capacity required =") Cf=0.072/(Rel)^0.2; Fd=Cf*0.5*rho*A*U^2; P=Fd*U/1000; disp("kW",P,"Power required to overcome the resistance =")
775f17d67a37463e9a085e4bdc4ff1ea397c7b49
27fecbbeb6c49dcf03b9bddf1b867c31e13a3825
/Simulações/Relatório 03/1ª Tarefa - Copia.sci
be7993579637403d9d695b46aac88960860a7c7d
[]
no_license
LucasHattoriCosta/Poli
42c9fc2d34c31e01336265fbdac3e4921d56e096
b1ac609c3675539b4e921909c35ea196ffc44df3
refs/heads/master
2023-03-15T12:22:03.745943
2020-06-29T17:32:48
2020-06-29T17:32:48
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,704
sci
1ª Tarefa - Copia.sci
//Lista de exercício 3 - 2º Tarefa //Dados pi = %pi l = 0.001; // semi-comprimento da corrente r = 3; // raio da pista circular rho = 0.1; //densidade linear da corrente g = 9.8; //m/s^2 m = rho*2*l // massa em kg //Condições iniciais alpha = l/r theta_inicial = pi/2; w0 = 0; theta0 = [theta_inicial;w0]; //Vetor tempo t0 = 0; tf = 10; //Vamos integrar pelo tempo de 0 a 20 segundos dt = 0.01; //Define o passo, quanto menor mais preciso t = t0:dt:tf; //Espaço de estados function dtheta = f(t,v) //s é o vetor de estado, ou seja, s = [s, ds/dt] dtheta1 = v(2,:); dtheta2 = -(g/r)*(sin(alpha)/alpha)*sin(v(1,:)); dtheta = [dtheta1; dtheta2]; endfunction theta = ode(theta0,t0,t,f); o = theta(1,:) op = theta(2,:) //Energia Cinética function cinética = T(S) cinética = (1/2)*m*(theta(2,:))**2 endfunction //Energia Potencial function potencial = U(S) potencial = m*g*(theta(1,$))*sin(alfa)-(theta(1,:))*sin(alfa)*m*g endfunction //Energia Mecânica function mecanica = E(U,T) mecanica = U+T endfunction //Aceleração a = diff(theta(2,:))/0.01; a($+1) = a($) //Força Normal N = m*g*cos(alfa)*ones(1,size(t)(2)) //Plotar gráficos clf(); scf(0); xtitle('Posição por tempo'); plot(t, o, 'r'); scf(1) xtitle('Velocidade por tempo') plot(t, op, 'b') scf(6) xtitle('Velocidade por posição') plot(S(1,:), S(2,:), 'b') scf(2) xtitle('Aceleração em função do tempo') plot(t, a) scf(3) xtitle('Energia cinética em função do tempo') plot(t, T(S)) scf(4) xtitle('Energia potencial em função do tempo') plot(t, U(S)) scf(5) xtitle('Energia mecânica em função do tempo') plot(t, E(T(S),U(S))) scf(7) xtitle('Força normal por tempo') plot(t, N)
1e59b0b016ac47ef1ec9ccd1a1e101f495b152c3
9cd37a2b01b865c0bc7e2e6c246bf78efa5cd9cd
/examples/main.sce
a3b43b2d23d70940c23c2a8273b1059a6f8d1cd3
[]
no_license
kenreurisontm/latex-examples
d125ab0422f8e4c7fdd3cee8580c34b2c734b2fb
f93c5361a04fd62b432e61f386be4367cc26a082
refs/heads/master
2020-12-30T19:57:40.550479
2016-05-15T13:47:16
2016-05-15T13:47:16
58,808,371
0
0
null
2016-05-14T13:08:36
2016-05-14T13:08:36
null
UTF-8
Scilab
false
false
114
sce
main.sce
clear exec('circulo.sce') exec('savedata.sci') [x1,y1] = circulo(4); [x2, y2] = circulo(2); plot([x1,x2],[y1,y2])
1f7aa89e32314b8b10893640299180d8b0071955
449d555969bfd7befe906877abab098c6e63a0e8
/1430/CH9/EX9.1/exa9_1.sce
5e11a0e9d02f3fcb604c4408c27c03b3eb7d7357
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
629
sce
exa9_1.sce
// Example 9.1 // Zero-Input Response of an RL circuit // From figure 9.5 L=60*10^-3; R_eq=40+10;// Equivalent resistance tau=L/R_eq; // Time constant // Let us denote y(0^-) by y_bef and y(0^+) by y_aft i_bef= 25/10; // t<0 , under steady state conditions // form the continuity equation of inductor current we get i_aft=i_bef; v_bef=25; t=0:0.0001:0.01; i=i_aft*%e^(-t/tau); // t>0 v=-40*i; // t>0 subplot(2,1,1) plot(t,i,'r'); xlabel('t') ylabel('i(t)') title('Current Waveform of inductor') subplot(2,1,2) plot(t,v,'-g') xlabel('t') ylabel('v(t)') title('Voltage Waveform across 40-Ohm resistance')
777efcc42e2fb0d04f91789a7f860972814971ec
449d555969bfd7befe906877abab098c6e63a0e8
/3269/CH9/EX9.10/Ex9_10.sce
8a2b3de9bc4e3428ac0660971f7983f65acbab4f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
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,441
sce
Ex9_10.sce
// Example 9.10 clear all; clc; // Given data M = 20; // Mass of organ in grams // a) // Using the data from Table 9.15 T_12 = 8.04; // Radiological half life of Iodine-131 in days T_12_b = 138; // Biological half life of Iodine-131 in days lambda = 0.693/T_12; // Radiological decay constant of Iodine-131 in days^-1 lambda_b = 0.693/T_12_b; // Biological decay constant of Iodine-131 in days^-1 lambda_e = lambda+lambda_b; // Equivalent decay constant in days^-1 // Using the data from Table 9.15 zeta = 0.23; // Effective energy equivalent in MeV q = 0.23; // The fraction of Iodine-131 that goes by inhalation // Calculation DCF = (51.1*zeta*q)/(M*lambda_e); // Result printf(" \n The dose commitment factor by inhalation = %.2f rem/ucurie \n",DCF); // b) breathing_rate = 2.32*10^(-4); // Normal breathing rate in m^3/sec time = 2*3600; // Time of radiation exposure in seconds I_conc = 2*10^(-9); // Iodine-131 concentration C0 = breathing_rate*time*I_conc; // Total intake of Iodine-131 by inhalation // Calculation H = C0*(DCF*10^6); // Using DCF in micro-curie // Result printf(" \n The dose commitment to thyroid = %.2E rem = %.2f mrem \n",H,H*1000);
2a8c0272f48d214bfc567abd9fef0cc8173dbd31
449d555969bfd7befe906877abab098c6e63a0e8
/830/CH5/EX5.4.1/Zero_Padding.sce
6f572cb5d42afb378bc20170f1546063f63497ee
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
472
sce
Zero_Padding.sce
//Graphical// //Example 5.4.1 //Effect of Zero Padding clear; clc; close; L = 100; // Length of the sequence N = 200; // N -point DFT n = 0:L-1; x = (0.95).^n; //Padding zeros to find N = 200 point DFT x_padd = [x, zeros(1,N-L)]; //Computing DFT X = fft(x,-1); X_padd = fft(x_padd,-1); subplot(2,1,1) plot2d(X) xlabel('K') ylabel('X(k)') title('For L =100 and N =100') subplot(2,1,2) plot2d(X_padd) xlabel('K') ylabel('X(k) zero padded') title('For L =100 and N =200')
121434c3363fb58d4d5a7b835c1008d6eceea0bb
449d555969bfd7befe906877abab098c6e63a0e8
/1862/CH9/EX9.12/C9P12.sce
8728efd0a0411e359e694669127d261b54ef3085
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
852
sce
C9P12.sce
clear clc //to find velocity of center of mass at time t //to find value of t // GIVEN:: //refer to figure 9-33(a) from page no. 192 //radius of solid cylinder R = 12//in cm //mass of solid cylinder M = 3.2//in kg //initial angular velocity of solid cylinder w0 = 15//in rev/s //coefficient of kinetic friction between surface and cylinder mew_k = 0.21 //acceleration due to gravity g = 9.8//in m/s^2 // SOLUTION: //refer to figure 9-33(b) from page no. 192 w_0 = w0*2*%pi//in rad/rev //applying newton's second law in x direction //and applying rotational form of newton's second law //velocity of center of mass vcm = (1/3*w_0*(R*10^-2))//in m/s //value of t t = vcm/(mew_k*g)//in seconds printf ("\n\n Velocity of center of mass vcm = \n\n %.1f m/s",vcm); printf ("\n\n Value of t = \n\n %.1f seconds",t);
1d221ed1109bb9c0188a5abedc080cf034e7af45
449d555969bfd7befe906877abab098c6e63a0e8
/226/CH2/EX2.17/example17_sce.sce
1b129def22c7b3fb547c52cc05e1c80c4ef435aa
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
263
sce
example17_sce.sce
//chapter 2 //example 2.17 //page 64 printf("\n") printf("given") Vz=4.3;Zz=22;Iz=20*10^-3; Iz1=5*10^-3;//change in current Vz1=Iz1*Zz; Vzmax=Vz+Vz1; printf(" maximum voltage is %3.3fV\n",Vzmax) Vzmin=Vz-Vz1; printf("minimum voltage is %3.3fV\n",Vzmin)
c886a373265a6e0da751fd784f64b2be22a04377
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set11/s_Fundamentals_Of_Electronic_Devices_And_Circuits_J._B._Gupta_2444.zip/Fundamentals_Of_Electronic_Devices_And_Circuits_J._B._Gupta_2444/CH4/EX4.10/ex4_10.sce
239d8908d552f9ee8cf4f3b40f64b1ab408e4ab4
[]
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
299
sce
ex4_10.sce
errcatch(-1,"stop");mode(2);// Exa 4.10 ; ; format('v',8) // Given data V1 = 10;// in V V2 = 5;// in V I1 = 5.8;// in mA I2 = 5;// in mA delV_C = V1-V2;// in V delI_C = I1-I2;// in mA r_out = delV_C/delI_C;// in k ohm disp(r_out,"The dynamic output resistance in k ohm is"); exit();
fb36a1c2b46f4b7077e71b7e8bc3fd7818a2d143
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set9/s_Engineering_Physics_K._V._Kumar_3537.zip/Engineering_Physics_K._V._Kumar_3537/CH1/EX1.14/Ex1_14.sce
c41b4efd172e8b2bc082f8ad011a1fab464f9f53
[]
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
254
sce
Ex1_14.sce
errcatch(-1,"stop");mode(2);//Example 1_14 ; ; //To calculate the distance from the fringe n=10 lamda=6000*10^-10 //units in mts alpha=0.01 x=(((2*n)-1)*lamda)/(4*alpha) //units in mts printf("Distance from 10th fringe is %.6f mts",x) exit();
38c643bd29d98d1565bff1b8609e4e87c6c0a7b5
449d555969bfd7befe906877abab098c6e63a0e8
/752/CH2/EX2.13.1/2_13_1.sce
bda139f1f46c524c267f9c8d765f7670c669871f
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
242
sce
2_13_1.sce
clc; //page no 74 //prob no. 2.13.1 //A rectangular pulse with h=3V and width=2ms across 10 ohm resistor V=3;t=2*10^-3;R=10; //Determination of average energy P=(V^2)/R;//Instantaneous power U=P*t; disp('J',U,'The average energy is');
8728c26123cc3b037d39e5eaba536e36a612b7bc
449d555969bfd7befe906877abab098c6e63a0e8
/581/CH4/EX4.10/Example4_10.sce
362d5556576d74b582e991fb2c4646a0b5252ee9
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
710
sce
Example4_10.sce
clear; clc; printf("\t Example 4.10\n"); T1=308; //air temperature, K Q=0.1; // heat transferred,W k=16; //thermal conductivity of wires, W/(m*K) d=0.00062; //diameter of wire,m Heff=23; //convection coefficient, W/(m^2*K) //the wires act actn as very long fins connected to ressistor hence tanh(mL)=1 R1=1/(k*Heff*3.14^2*d^(3)/4)^0.5; Req=(1/R1+1/R1+7.17*(1.33*10^-4)+13*(1.33*10^-4))^-1; //the 2 thermal ressistances are in parallel to the thermal ressistance for natural convection and thermal radiation from the ressistor's surface found in previous eg. Tres=T1+Q*Req; Trs=Tres-273; printf("\t ressistor temperature is : %.2f C or about 10 C lower than before.\n",Trs); //end
e97b736f63af950cbc24e2dc39a4d1eea1822b02
449d555969bfd7befe906877abab098c6e63a0e8
/995/CH12/EX12.3/Ex12_3.sce
8784afae430f8b5d560fa10e777c389137310382
[]
no_license
FOSSEE/Scilab-TBC-Uploads
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
refs/heads/master
2020-04-09T02:43:26.499817
2018-02-03T05:31:52
2018-02-03T05:31:52
37,975,407
3
12
null
null
null
null
UTF-8
Scilab
false
false
104
sce
Ex12_3.sce
//Ex:12.3 clc; clear; close; //R1=R2=R prf=10; C=1*10^-6; R=0.48/(prf*C); printf("R= %d ohm",R);