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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
293a905f1b2c631161b94b5cfc558423419557a8 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.4/macros/robust/bstap.sci | 799d6433078c115d6e0c17ab082b0e5d97fca23b | [
"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 | 856 | sci | bstap.sci | function [Q]=bstap(sl)
// Best approximant Q of Sl
// ||Sl-Q|| = ||Tsl||
// inf
// ||Tsl|| norm of hankel operator
//-- sl is assumed antistable
//-- Q : best stable approximation of Sl
//!
//balancing
//-----------------------------------
// Copyright INRIA
slt=gtild(sl);slt=balreal(slt);sl=gtild(slt),
// D such that DB1'+sC1 = 0 , DD' = s**2I
//-------------------------------------------------
[a,b,c]=sl(2:4),[n,n]=size(a),[m,n]=size(c),
x=-obs_gram(sl),s=x(1,1),
[w,r]=rowcomp(x-s*eye),r=n-r,
b1=b(1:r,:),c1=c(:,1:r),
[u1,s1,v1]=svd(-c1'),[u2,s2,v2]=svd(b1),
v2=v2(:,1:m),dd=s*v1*v2',
//
//--------------------------------
a22=a(r+1:n,r+1:n),
b2=b(r+1:n,:),c2=c(:,r+1:n),
sig=x(r+1:n,r+1:n),
bb=-inv(s**2*eye-sig*sig)*(sig*b2+s*c2'*dd),
aa=-(a22+b2*bb')',cc=c2*sig+dd*b2',
Q=syslin('c',aa,bb,cc,dd),
|
3eb3775c587361c11e441fc037ae1a08f15a923b | 5ed591c39af41bc62a6817d7af846c0f0700912f | /Step_Analysis/Discrete-order1/first_order.sci | 5934299762a19eaa5813af6811e856defafbe641 | [] | no_license | rupakrokade/scilab_analysis_codes | 793b234ce48ebab136eb47ce2f919e546738664d | 28e09df4efdefe468c16979aa3df10913a9a1d07 | refs/heads/master | 2016-09-05T14:09:41.625227 | 2014-12-01T20:26:09 | 2014-12-01T20:26:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 619 | sci | first_order.sci | function y = first_order(u, params)
// Do not change anything here
a1 = params(1);
b1 = params(2);
global delay;
// End
/// You should write your code below this line
N=length(u);
//Defining y vector
//from t=0 up to t=delay-1, y=0, so in scilab y at indices i=1 up to i=delay is 0
y(1:1:delay) = 0;
//First nonzero output is only due to input u at t=0, i.e. in scilab input u at i=1
y(delay+1) = b1*u(1);
//After that y(i) can be defined as follows
for i=delay+2:1:N
y(i)=-a1*y(i-1)+b1*u(i-delay);
end
// y = ?
endfunction
|
349389c8d86d9220810a233e110a7e6639a84504 | bdf572464541387fa0028a1ff861ceb55e81938e | /Numerical Analysis/bisection.sce | 5947baba5f55a81c66a3c404b85f934b2c396069 | [] | no_license | akarshsomani/Scilab-programs | 20c4a52a51e5689d12d491218988aa037f09a21a | 18199a7f424e3711765965e3d3b12e149a5d497a | refs/heads/master | 2020-03-14T10:00:36.585002 | 2018-04-30T04:59:39 | 2018-04-30T04:59:39 | 131,557,212 | 0 | 1 | null | 2018-10-31T14:52:07 | 2018-04-30T04:55:36 | Scilab | UTF-8 | Scilab | false | false | 576 | sce | bisection.sce | // Finding root of equation f(x)=x^3-5x+1
function [r]=root(xl,xu,et)
// xl = Lower limit guess
// xu = Upper limit guess
// et = Error tolerance
xm = (xl+xu)/2
p = poly([1,-5,0,1],'x','c')
while %t
y1 = horner(p,xl)
y2 = horner(p,xm)
if y1*y2 < 0 then
xu = xm
elseif y1*y2 > 0 then
xl = xm
else
break
end
xmo = xm
xm = (xl + xu)/2
e = abs(xm - xmo)/xm * 100
if(e<et) then
break
end
end
r = xm
endfunction
|
a4dd8d895477d065f7cf0e9f80701da91964f6e3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3862/CH3/EX3.11/Ex3_11.sce | 31e1fca85876483c3d2ab5cd4ad788ee6d09a3de | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,733 | sce | Ex3_11.sce | clear
//
//variable declaration
PA=15.0 //vertical loading at point A,KN
PB=30.0 //vertical loading at point B,KN
PC=30.0 //vertical loading at point C,KN
PD=30.0 //vertical loading at point D,KN
PE=15.0 //vertical loading at point E,KN
//Due to symmetry, the reactions are equal
RA=(PA+PB+PC+PD+PE)/2
RB=RA
//Drop perpendicular CH on AF.
//in traingle ACH
angleACH=45.0*%pi/180 //angleACH,°
angleFCV=30.0*%pi/180 // FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m
CH=5.0
angleFCH=60.0*%pi/180
//It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1).
//For left hand side part of the frame
//moment at C
FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)
printf("\n FAE= %0.0f KN (Tension)",FAE)
//Assuming the directions for FFC and FBC
//sum of vertical & sum of horizontal forces is zero
//FFC=FBC*sqrt(2)-RA
FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))
printf("\n FBC= %0.2f KN (Comp.)",FBC)
FFC=FBC*sqrt(2)-RA
printf("\n FFC= %0.2f KN (Tension)",FFC)
//Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.
//Joint B: sum of forces normal to AC = 0, gives
FBF=PC*cos(angleACH)
//sum of forces parallel to AC = 0, gives
FAB=FBC+PC*sin(angleACH)
printf("\n FAB= %0.2f KN (Comp.)",FAB)
//JOINT A
//sum of vertical & sum of horizontal forces is zero
FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)
printf("\n FAF= %0.2f KN (Tension)",FAF)
|
c7c50ea4bf1dcde16f9a5bbfa1471aa7c9f2edc3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2087/CH6/EX6.3/example6_3.sce | d4cb52bf2679fdeb3cb80d9a5c22c0e58e1f396c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,272 | sce | example6_3.sce |
//example 6.3
//calculate storage capacity of reservior
clc;funcprot(0);
//given
V=475; //flow required to be maintained throughout the year
Y=V*365*8.64; //yearly demand
//yearly demand gives the slope of demand curve
t=[0:1:36]; //number of season startin from 1960;each year is diveded into 3 seasons.
q=[0 1050 300 50 3000 250 40 3500 370 90 2000 150 120 1200 350 65 1400 400 100 3600 200 80 3000 200 80 3000 150 120 700 210 50 800 120 80 2400 320 120 3200 280 80]; //average discharge
v=[0 0.9707 0.4717 0.0328 2.7734 0.3981 0.0263 3.2357 0.5818 0.0591 1.8490 0.2356 0.0788 1.1094 0.5504 0.0427 1.2943 0.6290 0.0657 3.3281 0.3145 0.0525 2.7734 0.2359 0.0788 0.6441 0.3302 0.028 0.7396 0.1887 0.0525 2.2188 0.5032 0.0788 2.9583 0.4403 0.0525]; //voloume
cv(1)=v(1);
for i=2:37
cv(i)=cv(i-1)+v(i);
end
//each year is divided into three seasons(monsoon,winter and summer).and readings are taken for 12 years
//mass inflow curve is plotted and tangent are drawn at the apexes and parellel to demand curve slope;
//the respectiv ordinates represent the deficiency during dry period
//maximum of these ordinates gives the desired reservior capacity
mprintf("storage capacity of reservior=1.6 million ha-m.");
|
1ef7f363d489f89397afd0698f5417f8fdaca297 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2165/CH8/EX8.3/8_3.sce | 8e0955f0e66edd1e00b6cd265e22a2bff1557a6f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 321 | sce | 8_3.sce | clc
//initialisation of variables
h=200//r p m
h1=50//i h p
P4=33.4//lb/in^2
W=9000//ft lb
x=33000//ft.lb
p=1728//ft/lb
//CALCULATIONS
w=h1*x/100//ft lb
T=w/W//ft^3
V =13/14*T//ft^3
D=((V*p*8)/(3*%pi))^(1/3)//in
//RESULTS
printf('The diameter of the cylinder of a single acting and swept volume=% f in',D)
|
4193fd44ddb0098f3aed92f173ae503c03f2b417 | 0896434fe17d3300e03ad0250029673ebf70bacc | /sheet_4/Scilab_codes/RH_3.sce | 7625f7a94739ea6c273e5fc51b5d52dd957c5c3b | [] | no_license | TheShiningVampire/EE324_Controls_Lab | 8ff1720b852bf24dca3c172082f5f898f80f69f3 | 9aea73eed3f5a4ac6c19a799f8aebe09f4af0be8 | refs/heads/main | 2023-07-09T17:30:38.041544 | 2021-08-23T12:14:29 | 2021-08-23T12:14:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 105 | sce | RH_3.sce | clear;
close;
clc;
s = poly(0,'s');
G = (s^6 + 2*s^5 + s^4 + 2*s^2 + 4*s+ 1);
disp(G);
disp(routh_t(G))
|
1a8ccc425f2be89d90dc7260d2d4f430c565e35a | 358500bb97c17245f609c658ce3c029bf6f82c70 | /ex1-prac/dwt.sci | 6cfe14008bb39f49930a02e9cdf8725455106e3e | [] | no_license | wilson911013/information-theory-UNAL | 4a3bf7ce1804ec6bfba261bb7e661895e1fe81d4 | 2d22817275f7b58dab0daa660725afde42da939e | refs/heads/master | 2021-08-26T09:45:25.005995 | 2017-11-23T04:24:36 | 2017-11-23T04:24:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,276 | sci | dwt.sci | function [cA,cD]=dwt(x,wname,['mode',extMethod])
// Discrete Fast Wavelet Transform
// Calling Sequence
// [cA,cD]=dwt(x,wname,['mode',extMethod])
// [cA,cD]=dwt(x,Lo_D,Hi_D,['mode',extMethod])
// Parameters
// wname : wavelet name, haar( "haar"), daubechies ("db1" to "db20"), coiflets ("coif1" to "coif5"), symlets ("sym2" to "sym20"), legendre ("leg1" to "leg9"), bathlets("bath4.0" to "bath4.15" and "bath6.0" to "bath6.15"), dmey ("dmey"), beyklin ("beylkin"), vaidyanathan ("vaidyanathan"), biorthogonal B-spline wavelets ("bior1.1" to "bior6.8"), "rbior1.1" to "rbior6.8"
// x : double vector
// Lo_D : lowpass analysis filter
// Hi_D : highpass analysis filter
// extMethod : extension mode, 'zpd' for example
// cA : approximation coefficent
// cD : detail coefficent
// Description
// dwt is for discrete fast wavelet transform with the signal extension method optional argument. Available wavelets include haar, daubechies (db1 to db20), coiflets (coif1 to coif5), symlets (sym2 to sym20), legendre (leg1 to leg9), bathlets, dmey, beyklin, vaidyanathan, biorthogonal B-spline wavelets (bior1.1 to bior6.8).
// Examples
// x=rand(1,100);
// [cA,cD]=dwt(x,'db2','mode','asymh');
//
//
//
// Authors
// Roger Liu and Isaac Zhi
// See Also
// idwt
// dwt2
// idwt2 |
899ab5ecb8c85a73fbf59fc08f380e1e75106a53 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1646/CH17/EX17.10/Ch017Ex10.sce | 6374fc561eff7b5a9cc194e3557b38d74648cbde | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 459 | sce | Ch017Ex10.sce | // Scilab code Ex17.10 : Pg:894 (2011)
clc;clear;
e = 1.6e-019; // Energy equivalent of 1 eV, J/eV
E = 3.2e+07; // Energy released per second by the reactor, J
E_f = 200*1e+06*e; // Energy released per fission, J
N = E/E_f; // Number of fissions per second of U235, per second
printf("\nThe number of U235 atoms undergoing fissions per second = %1.0e", N);
// Result
// The number of U235 atoms undergoing fissions per second = 1e+018
|
3bb837b9de1f81bb3b63fb12ecc177379aa148af | 449d555969bfd7befe906877abab098c6e63a0e8 | /3557/CH7/EX7.2/Ex7_2.sce | 19e6cd9c16a2c9348dceee2956a4ab754b37be9e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 350 | sce | Ex7_2.sce | //Example 7.2//
a=8.8*10^-6;//mm/(mm degree C) //linear coefficient of thermal expansion
L0=0.1;//mm //Given direction
T=1000;//degree Celsius // Temperature
T1=25;//degree Celsius //Temperature
dL=a*L0*(T-T1)
mprintf("dL = %e m ",dL)
b=10^3;// (As 1 milli = 10^-3 milli)
dL1= dL*b
mprintf("\ndL1 = %f mm (As 1 milli = 10^-3 milli)",dL1)
|
69e7ee7f755b6405958ec7ecc4982fe1198cfd1c | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set6/s_Electrical_Power_Systems_C._L._Wadhwa_1055.zip/Electrical_Power_Systems_C._L._Wadhwa_1055/CH6/EX6.4/ch6_4.sce | 683237340c308f7e7ee592b5b3ad45f63180517c | [] | 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 | 192 | sce | ch6_4.sce | errcatch(-1,"stop");mode(2);//To determine the voltage for which corona will commence on the line
;
r=.5;
V=21*r*log(100/.5);
mprintf("critical disruptive voltage=%.1f kV",V);
exit();
|
f4cb3d17b4621305e5e6a1eac8a28fa493b7b5f5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2141/CH14/EX14.5/Ex14_5.sce | a7b823ae4bb9a0b778c1da24765add4acc7eac7f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 247 | sce | Ex14_5.sce |
clc
//initialisation of variables
k=1.4
g=32.17 //lbm-ft/sec^2
R=53.34 //ft-lbf/lbm-R
T=540 //R
t=1460 //f
//CALCULATIONS
c=sqrt(k*g*R*T)//ft/sec
C=sqrt(k*g*R*t)//ft/sec
//RESULTS
printf('The velocity of sound in air =% f ft/sec',C)
|
e57ba1cf719c00a7fcba973438f2bf899663ed3a | e9854f13c702aad5562ed1644c47b99122268448 | /BioChem_Scilab_Old/Reator_CSTR_monitora_SCILAB_jun_20_2017.sce | 92a5ea113ed94ff904b2ef679b603478936297c6 | [] | no_license | ucfilho/Biochemical_Engineering | dd5edfdd2d0a531a9c59d21f44938e0993375824 | 683a02465783ab91c3e7bb06c591b914e7c17350 | refs/heads/master | 2023-05-28T02:50:42.486495 | 2023-05-25T20:53:48 | 2023-05-25T20:53:48 | 228,916,024 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 372 | sce | Reator_CSTR_monitora_SCILAB_jun_20_2017.sce |
function dy=f(x,y)
S=y(1);X=y(2);P=y(3);
M=MI*S/(S+Ks)
dy(1)=D*S0-D*S-M*X/Yxs;
dy(2)=D*X0-D*X+M*X;
dy(3)=D*P0-D*P+M*X*Ypx;
endfunction
S0=100;X0=0;P0=0;// g/l g/l g/l
Ks=2;MI=0.4;Vol=300;F0=60;Yxs=0.5;Ypx=0.6;// g/l g/h h^-1 m3 m3/h
D=F0/Vol;
Xr=10;Sr=50;Pr=10;
y0=[Sr;Xr;Pr];x0=0;
t=1:100;
sol=ode(y0,x0,t,f);
disp(sol,"solucao")
plot(t,sol)
|
508fb7779275909b2b9104dc97bd12d1ec20118c | b24d354cfcd174c92760535d8b71e22ced005d81 | /Signal Processing functions/stepz.sci | 5f4c4c6daf42ae297a586fa3a713f68d6f47f017 | [] | no_license | shreniknambiar/FOSSEE-Signal-Processing-Toolbox | 57ad8e2a71d64f95c4ccfd131e00095cf2b9c6f8 | 143cf61eff31240870dc0c4f61e32818a4482365 | refs/heads/master | 2021-01-01T18:25:34.435606 | 2017-07-25T18:23:47 | 2017-07-25T18:23:47 | 98,334,322 | 0 | 0 | null | 2017-07-25T17:48:00 | 2017-07-25T17:47:59 | null | UTF-8 | Scilab | false | false | 2,323 | sci | stepz.sci | function [h,t] = stepz(b,varargin)
if(argn(2)<1 | argn(2)>4) then
error("Input arguments should lie between 1 and 4");
end
if(argn(1) ~=2) then
error("Outpu argument should be 2");
end
flag= true;
if(size(b)> [1 1]) then
if(size(b,2) ~= 6) then
error(" SOS must be k by 6 matrix");
end
flag = false;
if argn(2)>1 then
n= varargin(1);
else
n=[];
end
if argn(2)>2 then
fs = varargin(2);
else
fs=1;
end
if( type(n) ~=8) then
error("n must be of type double");
end
if(type(fs) ~= 8) then
error("fs must be of type double");
end
if (type(b) ~=8) then
error(" ");
end
end
if flag then
if(argn(2)>1)
a= varargin(1);
if (size(a)> [1 1]) then
error(" a has wrong input size");
end
else
a=1;
end
if(argn(2)>2) then
n= varargin(2);
else
n=[];
end
if(argn(2)>3) then
fs= varargin(3);
else
fs=1;
end
if(type(n) ~=8) then
error(" n must be of type double");
end
if(type(fs) ~=8) then
error(" fs must be of type double");
end
if( type(b) ~=8 & type(a)~= 8) then
error("b and a should be of type double");
end
end
t=0;
N=[];
if (argn(2)<2) then
if flag
n =impzlength(b,a);
else
n= impzlength(b);
end
elseif(length(n)>1)
N= round(n);
n =max(N)+1;
M= min(min(N),0);
end
t1 = (t:(n-1))'/fs;
x = ones(size(t1));
if flag
s= filter(b,a,x);
else
s= sfilter(b,x);
end
if ~isempty(N) then
s= s(N-m+1);
t1= t1(N-m+1);
end
endfunction
|
6c8555aa6c7288b4978902726df37c99e5e9c460 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2858/CH2/EX2.1/Ex2_1.sce | 747c5e89b7d052b28d24bfa34bc9d4bf9e55a73d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 687 | sce | Ex2_1.sce | //example 2.1
clc; funcprot(0);
Distance=[2.5,5,7.5,10,15,20,25,30,35,40,50];
Time=10^-3*[11.2,23.3,33.5,42.4,50.9,57.2,64.4,68.6,71.1,72.1,75.5]
//part1
distance=5.25;
time=23e-3;
v1=distance/time;
disp(v1,"speed in m/s");
//part2
distance=11;
time=13.5e-3;
v2=distance/time;
disp(v2,"speed in m/s");
//part3
distance=14.75;
time=3.5e-3;
v3=distance/time;
disp(v3,"speed in m/s");
plot(Distance,Time);
xtitle("distance vs time","Distance in m","time in s");
//part4
xc=10.4;
Ta=65e-3;
Z1=1/2*sqrt((v2-v1)/(v2+v1))*xc;
disp(Z1,"thickness of layer 1 in m");
Z2=1/2*(Ta-2*Z1*sqrt(v3^2-v1^2)/v3/v1)*v3*v2/sqrt(v3^2-v2^2);
disp(Z2,"thickness of layer 2 in m");
|
ef1e669ce7a8d7e2ffd4d51774be85a5fa97d6d5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1928/CH1/EX1.16.2/ex1_16_2.sce | 7254a2a6820b969528c45b91a2102ae2ad7fc48e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 621 | sce | ex1_16_2.sce | //Chapter-1,Example1_16_2,pg 1-75
Ev=1.95 //average energy required to creaet a vacancy
k=1.38*10^-23 //boltzman constant in J/K
e=1.6*10^-19 //charge on 1 electron
K=k/e //boltzman constant in eV/K
T=500 //temperature
//for a low concentration of vacancies a relation is
//n=Nexp(-Ev/KT)
m=exp(-Ev/(K*T)) //ratio of no of vacancies to no of atoms n/N
printf("ratio of no of vacancies to no of atoms=")
disp(m)
|
6b666dcc54b0cd7b8e0f09f4a2adbe39dba01f5a | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/vco/vco11.sce | a00d2a5c857df2dd5536831526d4f92ec57370eb | [] | 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 | 300 | sce | vco11.sce | //i/p vector contains elements of type char
x=['a' 'b' 'c' 'd'];
y=vco(x,150,500);
disp(y);
//output
// !--error 246
//Function not defined for given argument type(s),
// check arguments or define function %c_abs for overloading.
//at line 48 of function vco called by :
//y=vco(x,150,500);
|
fee20a489ce148c7d2e1e127dac65813c3f07b28 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3472/CH39/EX39.4/Example39_4.sce | 51b88afe70bb5ecf5e878421875288de3c3d36b4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,911 | sce | Example39_4.sce | // A Texbook on POWER SYSTEM ENGINEERING
// A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar
// DHANPAT RAI & Co.
// SECOND EDITION
// PART IV : UTILIZATION AND TRACTION
// CHAPTER 1: INDUSTRIAL APPLICATIONS OF ELECTRIC MOTORS
// EXAMPLE : 1.4 :
// Page number 681-682
clear ; clc ; close ; // Clear the work space and console
// Given data
hp = 30.0 // Power of cage IM(hp)
V = 500.0 // Cage IM voltage(V)
P = 4.0 // Number of poles
f = 50.0 // Frequency(Hz)
I_fl = 33.0 // Full load current(A)
s = 4.0/100 // Slip
Z = 3.5 // Impedance per phase(ohm)
tap = 60.0 // Auto-transformer tap setting(%)
// Calculations
// Case(1)
I_s_1 = 3**0.5*(V/Z) // Starting current taken from line(A)
N_s = 120*f/P // Speed(rpm)
N_fl = N_s-N_s*s // Full load speed of motor(rpm)
T_fl = hp*746*60/(2*%pi*N_fl) // Full load torque(N-m)
T_s_1 = (I_s_1/I_fl)**2*s*T_fl // Starting torque(N-m)
// Case(2)
V_ph = V/3**0.5 // Phase voltage in star(V)
I_s_2 = V_ph/Z // Starting current(A/phase)
T_s_2 = (I_s_2/(I_fl/3**0.5))**2*s*T_fl // Starting torque(N-m)
// Case(3)
V_ph_at = V*tap/(3**0.5*100) // Phase voltage of auto-transformer secondary(V)
V_impressed = V_ph_at*3**0.5 // Volatage impressed on delta-connected stator(V)
I_s_3 = V_impressed/Z // Starting current(A/phase)
I_s_line = 3**0.5*I_s_3 // Motor starting line current from auto-transformer secondary(A)
I_s_line_3 = tap/100*I_s_line // Starting current taken from supply(A)
T_s_3 = (I_s_3/(I_fl/3**0.5))**2*s*T_fl // Starting torque(N-m)
// Case(4)
I_s_4 = 3**0.5*V/Z // Starting current from line(A)
T_s_4 = T_fl*s*(I_s_4/I_fl)**2 // Starting torque(N-m)
// Results
disp("PART IV - EXAMPLE : 1.4 : SOLUTION :-")
printf("\nCase(1): Starting torque for direct switching, T_s = %.f N-m", T_s_1)
printf("\n Starting current taken from supply line for direct switching, I_s = %.f A", I_s_1)
printf("\nCase(2): Starting torque for star-delta starting, T_s = %.f N-m", T_s_2)
printf("\n Starting current taken from supply line for star-delta starting, I_s = %.1f A per phase", I_s_2)
printf("\nCase(3): Starting torque for auto-transformer starting, T_s = %.f N-m", T_s_3)
printf("\n Starting current taken from supply line for auto-transformer starting, I_s = %.f A", I_s_line_3)
printf("\nCase(4): Starting torque for series-parallel switch, T_s = %.f N-m", T_s_4)
printf("\n Starting current taken from supply line for series-parallel switch, I_s = %.f A\n", I_s_4)
printf("\nNOTE: ERROR: Calculation mistakes and more approximation in textbook solution")
|
1439f838debc50229dc5761d7addc064b6f7b5a3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3802/CH3/EX3.8/Ex3_8.sce | ba8d34f2bdf84de904ee6918bce7741c6551ec7b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,250 | sce | Ex3_8.sce | //Book Name:Fundamentals of Electrical Engineering
//Author:Rajendra Prasad
//Publisher: PHI Learning Private Limited
//Edition:Third ,2014
//EX3_8.sce
clc;
clear;
R=2; //Resistance in ohm
L=2; //Inductor value in henry
C=1/12; //capacitor value in farad
omega=3; //Taken from v(t) value
//given v(t)=12 sin(3t+30);
Vm=12;
Vrms=Vm/sqrt(2);
theta=30;
Z=complex(R,(omega*L)-(1/(omega*C)));
V=complex(Vrms*cosd(theta),Vrms*sind(theta));
I=V/Z;
I_mag=sqrt(real(I)^2+imag(I)^2);
I_ang=atand(imag(I)/real(I));
printf("\n Circuit current=%1.0f angle:%d degree \n",I_mag,I_ang)
Vr=I*R;
Vr_mag=sqrt(real(Vr)^2+imag(Vr)^2);
Vr_ang=atand(imag(Vr)/real(Vr));
printf("\n Voltage across the resistance=%1.0f angle:%d degree \n",Vr_mag,Vr_ang)
theta1=90;
Xl=complex(omega*L*cosd(theta1),omega*L*sind(theta1));
Vl=I*Xl;
Vl_mag=sqrt(real(Vl)^2+imag(Vl)^2);
Vl_ang=atand(imag(Vl)/real(Vl));
printf("\n Voltage across the inductance=%1.0f angle:%1.0f degree \n",Vl_mag,Vl_ang)
theta2=-90;
Xc=complex(cosd(theta2)/(omega*C),sind(theta2)/(omega*C));
Vc=I*Xc;
Vc_mag=sqrt(real(Vc)^2+imag(Vc)^2);
Vc_ang=atand(imag(Vc)/real(Vc))-180;
printf("\n Voltage across the capacitance=%1.0f angle:%d degree \n",Vc_mag,Vc_ang)
|
85c3c2503419616d6e02947fc85ceed61c9f8afe | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.3.1/Unix-Windows/scilab-2.3/macros/signal/window.sci | 3adfdb99d3384e5024497a773dbe13646e21a355 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 3,720 | sci | window.sci | function [win_l,cwp]=window(wtype,n,par)
//[win_l,cwp]=window(wtype,n,par)
//macro which calculates symmetric window
// wtype :window type (re,tr,hn,hm,kr,ch)
// n :window length
// par :parameter 2-vector (kaiser window: par(1)=beta>0)
// : (chebyshev window:par=<dp,df>)
// : dp=main lobe width (0<dp<.5)
// : df=side lobe height (df>0)
// win :window
// cwp :unspecified Chebyshev window parameter
//!
//author: C. Bunks date: 8 Sept 1988
[lhs,rhs]=argn(0);
cwp=-1;
//Pre-calculations
no2=(n-1)/2;
xt=(-no2:no2);
un=ones(1:n);
//Select the window type
select wtype
case 're' then //Rectangular window.
win_l=un
case 'tr' then //Triangular window.
win_l=un-2*abs(xt)/(n+1);
case 'hm' then //Hamming window.
win_l=.54*un+.46*cos(2*%pi*xt/(n-1));
case 'hn' then //Hanning window.
win_l=.5*un+.5*cos(2*%pi*xt/(n-1));
case 'kr' then //Kaiser window with parameter beta (n,beta)
beta=par(1);
if beta>0 then
xt=2*xt/(n-1);
xt=beta*sqrt(un-xt.*xt);
y=xt/2;
yb=beta/2;
e=un;
eb=1.;
de=un;
deb=1.;
for i=1:25,
de=de.*y/i;
deb=deb*yb/i;
sde=de.*de;
sdeb=deb*deb;
e=e+sde;
eb=eb+sdeb;
end
win_l=e/eb;
else
error('Parameter beta out of bounds (beta]0) --- program termination');
end
case 'ch' then //Chebyshev window
// calculting element of par which is negative
if par(1)<0 then,
unknown='dp';
df=par(2);
else if par(2)<0 then,
unknown='df';
dp=par(1);
else,
error('Parameter par out of bounds prod(par)[0 --- program termination');
end,
end,
select unknown
case 'dp' then,
arg2=1/cos(%pi*df);
coshin2=log(arg2+sqrt(arg2*arg2-1));
dp=2/(exp((n-1)*coshin2)+exp(-(n-1)*coshin2));
cwp=dp;
case 'df' then
arg1=(1+dp)/dp;
coshin1=log(arg1+sqrt(arg1*arg1-1));
df=.5*(exp(coshin1/(n-1))+exp(-coshin1/(n-1)));
df=1/df;
df=imag(log(df+%i*sqrt(1-df*df)))/%pi;
cwp=df;
end,
//Pre-calculation
np1=int((n+1)/2);
ieo=2*np1-n;
xn=n-1;
fnf=n;
x0=(3-cos(2*%pi*df))/(1+cos(2*%pi*df));
alpha=(x0+1)/2;
beta=(x0-1)/2;
c2=xn/2;
//Obtain the frequency values of the Chebyshev window
f=(0:n-1)/fnf;
xarg=alpha*cos(2*%pi*f)+beta*un;
pm1=dp*cos(c2*imag(log(xarg+%i*sqrt(un-xarg.*xarg))));
arg=c2*log(xarg+sqrt(xarg.*xarg-un));
pp1=dp*.5*(exp(arg)+exp(-arg));
dx=0*un;
for i=1:n,
if abs(xarg(i))<=1 then
dx(i)=1;
end,
end,
pr=dx.*pm1+(un-dx).*pp1;
pi=0*un;
if ieo<>1 then
pr=pr.*cos(%pi*f);
pi=-pr.*sin(%pi*f);
antisym=[1*ones(1:int(n/2)+1),-1*ones(int(n/2)+2:n)];
pr=pr.*antisym;
pi=pi.*antisym;
end,
//Calculate the window coefficients using the inverse DFT
twn=2*%pi/fnf;
xj=(0:n-1);
for i=1:np1;
w(i)=sum(pr.*cos(twn*(i-1)*xj)+pi.*sin(twn*(i-1)*xj));
end,
c1=w(1);
w=w/c1;
if ieo=1 then
win_l(np1:n)=w(1:np1);
win_l(1:np1-1)=w(np1-1:-1:1);
else,
win_l(np1+1:n)=w(1:np1);
win_l(1:np1)=w(np1:-1:1);
end
win_l=real(win_l');
//Error in window type
else
error('Unknown window type --- program termination'),
end
|
cc792f61dc467ee4b769449981ca58f32ab08373 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2252/CH5/EX5.9/Ex5_9.sce | a5825f31561918e415034f97bc107ae37b77b2f1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 254 | sce | Ex5_9.sce |
mu_not=4D-7*%pi
Ns=400//no. of turns on search coil
N=1000//no. of turns of wire on solenoid
M=mu_not*Ns*N*25D-4/80D-2
mprintf("Mutual inductance of arrangement=%f mH\n",M*1000)
//di/dt=200
e=-M*200
mprintf("emf induced in search coil=%f V",e)
|
ff6bf8a5898120dfaf34fbad157e5b48ade5e4ac | 449d555969bfd7befe906877abab098c6e63a0e8 | /2705/CH8/EX8.18/Ex8_18.sce | c0961970ada18cf7ea418e0a930ad3ec6a802851 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,234 | sce | Ex8_18.sce | clear;
clc;
disp('Example 8.18');
// aim : To determine
// the actual mass of air supplied/kg coal
// the velocity of flue gas
// given values
mc = 635;// mass of coal burn/h, [kg]
ea = .25;// excess air required
C = .84;// mass composition of carbon
H2 = .04;// mass composition of hydrogen
O2 = .05;// mass composition of oxygen
ash = 1-(C+H2+O2);// mass composition of ash
P1 = 101.3;// pressure, [kJn/m^2]
T1 = 273;// temperature, [K]
V1 = 22.4;// volume, [m^3]
T2 = 273+344;// gas temperature, [K]
P2 = 100;// gas pressure, [kN/m^2]
A = 1.1;// cross section area, [m^2]
aO2 = .23;// composition of O2 in air
mCO2 = 44;// moleculer mass of carbon
mH2O = 18;// molecular mass of hydrogen
mO2 = 32;// moleculer mas of oxygen
mN2 = 28;// moleculer mass of nitrogen
// solution
mtO2 = 8/3*C+8*H2-O2;// theoretical O2 required/kg coal, [kg]
msa= mtO2/aO2;// stoichiometric mass of air supplied/kg coal, [kg]
mas = msa*(1+ea);// actual mass of air supplied/kg coal, [kg]
m1 = 11/3*C;// mass of CO2/kg coal produced, [kg]
m2 = 9*H2;// mass of H2/kg coal produced, [kg]
m3 = mtO2*ea;// mass of O2/kg coal produced, [kg]
m4 = mas*(1-aO2);// mass of N2/kg coal produced, [kg]
mt = m1+m2+m3+m4;// total mass, [kg]
x1 = m1/mt*100;// %age mass composition of CO2 produced
x2 = m2/mt*100;// %age mass composition of H2O produced
x3 = m3/mt*100;// %age mass composition of O2 produced
x4 = m4/mt*100;// %age mass composition of N2 produced
vt = x1/mCO2+x2/mH2O+x3/mO2+x4/mN2;// total volume
v1 = x1/mCO2/vt*100;// %age volume composition of CO2
v2 = x2/mH2O/vt*100;// %age volume composition of H2O
v3 = x3/mO2/vt*100;// %age volume composition of O2
v4 = x4/mN2/vt*100;// %age volume composition of N2
Mav = (v1*mCO2+v2*mH2O+v3*mO2+v4*mN2)/(v1+v2+v3+v4);// average moleculer mass, [kg/kmol]
// since no of moles is constant so PV/T=constant
V2 = P1*V1*T2/(P2*T1);//volume, [m^3]
mp = mt*mc/3600;// mass of product of combustion/s, [kg]
V = V2*mp/Mav;// volume of flowing gas /s,[m^3]
v = V/A;// velocity of flue gas, [m/s]
mprintf('\n The actual mass of air supplied is = %f kg/kg coal\n',mas);
mprintf('\n The velocity of flue gas is = %f m/s\n',v);
// End
|
d4dac056eb46d80aa8891d9a289e1a80516c2bc8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /542/CH11/EX11.17/Example_11_17.sce | 987ccf05551d32a18af427a23cf1993b60c970d8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 345 | sce | Example_11_17.sce | //Example 11.17 Fenske's Equation
clear;
clc;
printf("\tExample 11.17\n");
//From previous question data
xA_d=0.453;
xB_d=0.013;
xA_s=0.04;
xB_s=0.96;
alpha_av=2.22;
//By Fenske Equation for no. of plates
n=((log(xA_d*xB_s/(xA_s*xB_d)))/log(alpha_av))-1;
printf("\nMinimum no. of plates are %f or %d\n",n,n);
//End |
6e88835a69aadbcd4fa2239d3172c51092855dab | 449d555969bfd7befe906877abab098c6e63a0e8 | /2681/CH8/EX8.19/Ex8_19.sce | 4ff0a6ab5e00bfb3b915ddd60076e24ab11dca14 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 508 | sce | Ex8_19.sce | //power gain and directivity of a horn
//given
clc
f=8d+9//hertz
v=3d+8//m/s
d=0.1//m//aperture dimentions
W=0.05//m//aperture dimentions
lemda=v/f//metre
gp=4.5*W*d/lemda^2
gp_decibles=10*log10(gp)//changing to decibles
D=7.5*W*d/lemda^2//directivity
D_decibles=10*log10(D)
gp_decibles=round(gp_decibles*100)/100///rounding off decimals
D_decibles=round(D_decibles*100)/100///rounding off decimals
disp(D_decibles,gp_decibles,'the beamwidth power gain and directivity in decibles')//decibles
|
1197792647a2dffdd17bc5b5fcf6ad44b7aefe1e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1592/CH3/EX3.16/example_3_16.sce | 71fd614c93b9fc39ae0186c5da90646929060205 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 935 | sce | example_3_16.sce | //Scilab Code for Example 3.16 of Signals and systems by
//P.Ramakrishna Rao
//A=%pi or 3.14
clear;
clc;
//Trignometric Fourier Coefficients
for n=0:5
a(n+1)=integrate('t*cos(2*%pi*n*t)','t',0,1);
end
for n=0:5
b(n+1)=integrate('t*sin(2*%pi*n*t)','t',0,1);
end
disp(%pi*a(1),"an(a0)")
disp("an(a1-->a5)")
for n=1:5
disp(2*a(n+1)*%pi)
end
disp("bn(b1-->b5)")
for n=1:5
disp(2*%pi*b(n+1))
end
//CTFS coefficients of a periodic signal
//x(t) =t
t = 0:0.01:1;
xt =2*%pi*t;
//
for k =0:6
C(k+1,:) = exp(-sqrt(-1)*2*%pi*t*k);
c(k+1) = xt*C(k+1,:)'/length(t);
if(abs(c(k+1))<=0.01)
c(k+1)=0;
end
end
c =c';
c_conj = real(c(:))-sqrt(-1)*imag(c(:));
ck = [c_conj($:-1:1)',c(2:$)];
k = 0:6;
k = [-k($:-1:1),k(2:$)];
c = gca();
c.y_location = "origin";
c.x_location = "origin";
plot2d3('gnn',k,abs(ck))
poly1 = c.children(1).children(1);
poly1.thickness = 3;
title('|ck|')
xlabel('k')
|
8e7eab5facc2396341353a6adad48493b08c60a4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1754/CH8/EX8.7/Exa8_7.sce | 85f082a588e03d0716d7aef7636e522b9f3ee924 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 286 | sce | Exa8_7.sce | //Exa 8.7
clc;
clear;
close;
//Given data :
fmin=20;//in Hz
fmax=20;//in kHz
Cmin=30;//in pF
Cmax=300;//in pF
//Formula : fo=1/(2*%pi*R*C))
disp("Minimum Fequeny correspond to maximum capacitance.")
R=1/(2*%pi*fmin*Cmax*10^-12)
disp(R/10^6,"Required resistance in Mohm : "); |
de66df0759f258e037b829751e6e54f5aa7943f6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /692/CH5/EX5.4/P5_4.sce | 960f1dafd205531eace92aa0809b8d5de0fb6a6f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 693 | sce | P5_4.sce | //EXAMPLE 5.4
//DETERMINE IDFT OF GIVEN SEQUENCE
clc;
clear;
K = input(" value of K ");
disp('input M > K');
M = input(" value of M ");
k1 = 0:K-1;
V1 = k1./K;//DFT
k=0:M-1;
N = length(V1);
V = [V1,zeros(1,M-N)];
v = dft(V,1);//IDFT
clf();
subplot(1,2,1)
a = gca();
plot2d3(k,real(v),2);
plot(k,real(v),'r.');
a.x_location = 'origin';
a.y_location = 'origin';
poly1 = a . children (1) . children (1) ;
poly1.thickness = 2;
xtitle('real part','N','v');
subplot(1,2,2)
a = gca();
plot2d3(k,imag(v),2)
plot(k,imag(v),'r.');
a.x_location = 'origin';
a.y_location = 'origin';
poly1 = a . children (1) . children (1) ;
poly1.thickness = 2;
xtitle('imaginary part','N','v');
v = disp(v);
|
71a85e44942e9847cf9d896e329e362f66b6cb12 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2078/CH7/EX7.1/Example7_1.sce | baef4953e8da1df0a3bdd248889da1701c45a0ec | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 214 | sce | Example7_1.sce | //Exa 7.1
clc;
clear;
close;
//Given data :
r=1;//cm
d=4;//meter
g0=30/sqrt(2);//kV/cm
LineVoltage=sqrt(3)*g0*r*log(d*100/r);//kV
disp(round(LineVoltage),"Line Voltage for comencing of corena(in kV) :");
|
9ad1c4fea0d1bb80cc7ae57842befad846765572 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2384/CH9/EX9.21/ex9_21.sce | 6a133b71bc045b4424df8a4e0aa87afb17eb7c38 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 949 | sce | ex9_21.sce | // Exa 9.21
clc;
clear;
close;
format('v',8)
// Given data
VA = 400*10^3;// in Mean
Eta_fl = 98.77/100;// in %
phi1= acosd(0.8);// in °
phi2= acosd(1);// in °
Eta_hl = 99.13/100;// in %
n = 1/2;
//For full load, Eta_f1 = ((VA*cosd(phi1))/( VA*cosd(phi1) + Pi + Pcu_f1 )) or Pi+Pcu_f1 = VA*cosd(phi1)*(1-Eta_fl)/(Eta_f1) (i)
//For half load, Eta_hl = n*VA*cosd(phi2)/(n*VA*cosd(phi2)+Pi+n^2*Pcu_f1) or Pi+n^2*Pcu_f1 = n*VA*cosd(phi2)*( 1-Eta_hl)/Eta_hl (ii)
// From eq(i) and (ii)
Pcu_fl=(n*VA*cosd(phi2)*( 1-Eta_hl)/Eta_hl-VA*cosd(phi1)*(1-Eta_fl)/(Eta_fl))/(n^2-1);// in W
Pi=VA*cosd(phi1)*(1-Eta_fl)/(Eta_fl)-Pcu_fl;// in W
disp(Pi,"The iron loss on full load and half load remain same in W which are : ")
disp(Pcu_fl,"The copper loss on full load in W is : ")
// The copper loss on half load
C_loss_half_load=n^2*Pcu_fl;// in W
disp(C_loss_half_load,"The copper loss on half load in W is : ")
|
2d503627dc72c61bd4a0d4696f27165aa915fdae | 449d555969bfd7befe906877abab098c6e63a0e8 | /37/CH1/EX1.3.6/Us7.sci | 214888db9f1c0a0d93d40066acc6859e481ad4f7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 740 | sci | Us7.sci | //Exercise 1.3
//Example 1.3.6
//Adding,Subtracting and multiplying Rational Numbers
function[]=rational(x1,x2,x3,x4)
rational1=struct('numerator',x1,'denominator',x2);
disp(rational1);
rational2=struct('numerator',x3,'denominator',x4);
disp(rational2);
//Add
x5=int32([x2 x4]);
x5=lcm(x5);
x6=x1*(x5/x2)+x3*(x5/x4);
rational3=struct('numerator',x6,'denominator',x5);
disp(rational3,"After addition");
//subtract
x6=x1*(x5/x2)-x3*(x5/x4)
rational4=struct('numerator',x6,'denominator',x5);
disp(rational4,"After Subtraction");
//Multiply
x7=x1*x3;
x8=x2*x4;
rational5=struct('numerator',x7,'denominator',x8);
disp(rational5,"After multiplication");
endfunction
x1=43;
x2=32;
x3=233;
x4=33;
rational(x1,x2,x3,x4); |
36208fc7c78597c9429c9273c577e8f622902738 | cfdfb2e25a67e3539be6df1ff44277f340c6bcae | /projects/02/ZeroAndNegate.tst | 80f608a4a13b07c7f87c13535f5b4fff67dfb726 | [] | no_license | esoergel/nand2tetris | 722da06fae3363ebaf859eb1178a22ec47141df4 | f698db9b427b1455f877b7407dbff2ef31e0d82b | refs/heads/master | 2020-03-14T15:07:19.293079 | 2018-05-24T05:05:27 | 2018-05-24T05:05:27 | 131,669,039 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 788 | tst | ZeroAndNegate.tst | // This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/02/Add16.tst
load ZeroAndNegate.hdl,
output-file ZeroAndNegate.out,
compare-to ZeroAndNegate.cmp,
output-list x%B1.16.1 zx%D2.1.1 nx%D2.1.1 out%B1.16.1;
set x %B0000000000000000,
set zx 0,
set nx 0,
eval,
output;
set x %B0000000000000000,
set zx 0,
set nx 1,
eval,
output;
set x %B1111111111111111,
set zx 1,
set nx 0,
eval,
output;
set x %B1010101010101010,
set zx 1,
set nx 0,
eval,
output;
set x %B1010101010101010,
set zx 1,
set nx 1,
eval,
output;
set x %B1010101010101010,
set zx 0,
set nx 1,
eval,
output;
set x %B0011110011000011,
set zx 0,
set nx 1,
eval,
output;
|
20e67e7509ff91a636c71ca71faec317cb7161f2 | 676ffceabdfe022b6381807def2ea401302430ac | /solvers/CompressibleFlowSolver/Tests/Nozzle_AxiSym_NoSwirl.tst | f78273ccbe192e32409d1f641ffa719fffb8cb24 | [
"MIT"
] | permissive | mathLab/ITHACA-SEM | 3adf7a49567040398d758f4ee258276fee80065e | 065a269e3f18f2fc9d9f4abd9d47abba14d0933b | refs/heads/master | 2022-07-06T23:42:51.869689 | 2022-06-21T13:27:18 | 2022-06-21T13:27:18 | 136,485,665 | 10 | 5 | MIT | 2019-05-15T08:31:40 | 2018-06-07T14:01:54 | Makefile | UTF-8 | Scilab | false | false | 1,010 | tst | Nozzle_AxiSym_NoSwirl.tst | <?xml version="1.0" encoding="utf-8"?>
<test>
<description>Euler, axi-symmetric nozzle without swirl</description>
<executable>CompressibleFlowSolver</executable>
<parameters>Nozzle_AxiSym_NoSwirl.xml</parameters>
<files>
<file description="Session File">Nozzle_AxiSym_NoSwirl.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="rho" tolerance="1e-12">3.05647</value>
<value variable="rhou" tolerance="1e-12">2.3371</value>
<value variable="rhov" tolerance="1e-12">102.54</value>
<value variable="E" tolerance="1e-12">616238</value>
</metric>
<metric type="Linf" id="2">
<value variable="rho" tolerance="1e-12">1.26181</value>
<value variable="rhou" tolerance="1e-12">2.82123</value>
<value variable="rhov" tolerance="1e-12">60.5981</value>
<value variable="E" tolerance="1e-12">260653</value>
</metric>
</metrics>
</test>
|
97e30cd43c2ec3322b945827c1a40437b6bb33f9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1808/CH4/EX4.7/Chapter4_Example7.sce | 05967e0af30ab9bfd913a6c1970b096ee7cb6e3f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,336 | sce | Chapter4_Example7.sce | clc
clear
//INPUT DATA
pb=25;//Saturated vapour in bar
pc=0.2;//Saturated liquid in bar
T111=300;//Temperature in degree C
h1=2800.9;//Enthalpy in kJ/kg
hb=962;//Enthalpy in kJ/kg
h5=2609.9;//Enthalpy in kJ/kg
h3=251.5;//Enthalpy in kJ/kg
S5=7.9094;//Entropy in kJ/kg.K
S3=0.8321;//Entropy in kJ/kg.K
Sb=2.5543;//Entropy in kJ/kg.K
S1=6.2536;//Entropy in kJ/kg.K
x1=0.8;////Quality of steam
h111=3008.9;//Enthalpy in kJ/kg
S111=6.644;////Entropy in kJ/kg.K
//CALCULATIONS
h11=(hb+x1*(h1-hb));//Enthalpy in kJ/kg
S11=(Sb+x1*(S1-Sb));//Enthalpy in kJ/kg
x21=((S11-S3)/(S5-S3));//quality of steam
h21=(h3+(x21*(h5-h3)));//Enthalpy in kJ/kg
nRi=(((h11-h21)/(h11-h3))*100);//Rankine cycle efficiency in percentage
x2=((S1-S3)/(S5-S3));//quality of steam
h2=h3+x2*(h5-h3);//Enthalpy in kJ/kg
nRi2=(((h1-h2)/(h1-h3))*100);//Rankine cycle efficiency in percentage
x211=((S111-S3)/(S5-S3));//quality of steam
h211=(h3+(x211*(h5-h3)));//Enthalpy in kJ/kg
nRi1=(((h111-h211)/(h111-h3))*100);//Rankine cycle efficiency in percentage
//OUTPUT
printf('(i) The Rankine cycle efficiency when steam is dry at turbine inlet is %3.2f percent \n(ii) The Rankine cycle efficiency when steam is saturated is %3.2f percentage \n(iii)The Rankine cycle efficiency when steam is superheated is %3.2f percent ',nRi,nRi2,nRi1)
|
bea0588712b5ac95e8779e8e8e09bf24c9bdeccd | 449d555969bfd7befe906877abab098c6e63a0e8 | /1967/CH11/EX11.8/11_8.sce | f7ee4b79100dbd211344d81e3ed5f41ddfd5f742 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 281 | sce | 11_8.sce | clc
//initialisation of variables
clear
p= 23.76 //mm
R= 0.082 //atm-lit deg^-1 mol^-1
T= 25 //C
vl= 18 //ml
p1= 1 //atm
//CALCULATIONS
dP= 0.001*vl*p*p1/(R*(273+T))
p2= p+dP
//RESULTS
printf ('vapour pressure = %.2f mm',p2)
//ANSWER GIVEN IN THE TEXTBOOK IS WRONG
|
14d0bbc6e605b28fadb0792ad3f51c0bf40878f7 | 1a00eb132340e145c8a7d8fd0ef79a02b24605a2 | /src/loader.sce | b247189c682aa79c533c285c55e76db3b7c83cef | [] | no_license | manasdas17/Scilab-Arduino-Toolbox | e848d75dc810cb0700df34b1e5c606802631ada4 | 2a6c9d3f9f2e656e1f201cecccd4adfe737175e7 | refs/heads/master | 2018-12-28T15:51:35.378091 | 2015-08-06T07:22:15 | 2015-08-06T07:22:15 | 37,854,821 | 3 | 2 | null | null | null | null | UTF-8 | Scilab | false | false | 1,386 | sce | loader.sce | // This file is released under the 3-clause BSD license. See COPYING-BSD.
// Generated by builder.sce : Please, do not edit this file
// ----------------------------------------------------------------------------
//
//if win64() then
// warning(_("This module requires a Windows x86 platform."));
// return
//end
////
serial_path = get_absolute_file_path('loader.sce');
//
// ulink previous function with same name
[bOK, ilib] = c_link('open_serial');
if bOK then
ulink(ilib);
end
//
[bOK, ilib] = c_link('close_serial');
if bOK then
ulink(ilib);
end
//
[bOK, ilib] = c_link('write_serial');
if bOK then
ulink(ilib);
end
//
[bOK, ilib] = c_link('status_serial');
if bOK then
ulink(ilib);
end
//
[bOK, ilib] = c_link('read_serial');
if bOK then
ulink(ilib);
end
//
[version, opts]=getversion();
if (opts(2)=='x86') then
link(serial_path + 'libserial' + getdynlibext(), ['open_serial','close_serial','write_serial','status_serial','read_serial'],'c');
elseif (opts(2)=='x64') then
link(serial_path + 'libserial64' + getdynlibext(), ['open_serial','close_serial','write_serial','status_serial','read_serial'],'c');
else
disp('Unsupported architecture')
end
// remove temp. variables on stack
clear serial_path;
clear bOK;
clear ilib;
// ----------------------------------------------------------------------------
|
191e64680b834278c78ac3d26fb19eb99c01e804 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH13/EX13.7/Ex13_7.sce | 5d70d2e96355edd2ddd47826d6ea0442f9301598 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 213 | sce | Ex13_7.sce | clear
//Given
E0=60
R=20.0 //ohm
//Calculation
//
Ev=E0/(sqrt(2))
Iv=Ev/R
//Result
printf("\n (i) A.C ammeter will %0.2f A",Iv)
printf("\n (ii) Average value of a.c over one cycle is zero")
|
fa3f1c86e8c02fc8477cb7faa792f5761c83f9fc | 280a6ba512debfe9018f27b12c6777807f321b28 | /Triangular_Matrix_Solver.sce | edac062f2c73f20144f958bb1b7c5b7cee1de333 | [] | no_license | remullo/Computational-Mathematical-Modeling-Projects-for-Scientific-Approaches | 326381bbbeb4933ccb3ad2e9455a894018130393 | f902df127645a158c9f4bdc37a59652e0e71a845 | refs/heads/master | 2023-04-12T08:08:32.288263 | 2021-07-26T22:22:06 | 2021-07-26T22:22:06 | 54,357,173 | 2 | 0 | null | 2021-07-26T22:22:07 | 2016-03-21T03:29:15 | Scilab | UTF-8 | Scilab | false | false | 2,211 | sce | Triangular_Matrix_Solver.sce | //Upper matrix by Rêmullo Costa - - apr/2016
//solve problems and find the value of x by just giving the values for the matrix A and the
// 'b' matrix (answer vector).
function Triangular(A, b) //THIS FUNCTION TAKES VALUES OF A MATRIX 'A' AND A 'b' ANSWER VECTOR AND
//LOWER FUNCTION ----------------------------------------------------------------------
function x = triangInf(A, b) //creates an lower matrix solving function
[linhas colunas] = size(A); // [rows columns] gets the size of the squared matrix
x(1) = b(1)/A(1,1);
for i = 2:1:linhas //starts from the 2nd line till the last one
soma = 0; // sum starts from zero
for j = 1:1:i-1 //j counter goes till i-1
soma = soma + A(i,j)*x(j); //sums all factors
end
x(i)= (b(i)- soma)/A(i,i); //determines the solution in a vector of x values
end
endfunction //end of the triangInf function
//-------------------------------------------------------------------------------------
//UPPER FUNCTION ----------------------------------------------------------------------
function x = triangSup(A, b) //creates an upper matrix solving function
[linhas colunas] = size(A); // [rows columns] gets the size of the squared matrix
for i = linhas:-1:1 //starts from the latest row 'till the first one.
somatorio = 0; // sum is set to start from zero
for j = i+1:linhas //now it will sum the terms of this line multiplied by the 'x'related
somatorio = somatorio + A(i,j)*x(j);
end
x(i)= (b(i)- somatorio)/A(i,i); //for each iteration in rows, we find the current 'x' value
end
endfunction //end of the TriangSup function
//-------------------------------------------------------------------------------------
//SELECTS WHICH TYPE IS MORE APROPRIATED TO CALCULATE IT!------------------------------
if(A(1,2)==0) then
ans = triangInf(A,b);
disp(ans);
else
ans = triangSup(A,b);
disp(ans);
end
//-------------------------------------------------------------------------------------
endfunction //end of the whole function
|
968f1676088efc3ef1dfd41dfbb995934383c3aa | 449d555969bfd7befe906877abab098c6e63a0e8 | /1268/CH1/EX1.3/1_3.sce | 25d67d63917cd48e992a8c76269cd6d9bc20f694 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 286 | sce | 1_3.sce | clc;
disp("Example 1.3")
density= 1200 // in kg/m^3
r= 0.15 // bowl radius in m
Ri=0.12 // interface position from the bowl axis in m
n= 3500 // rotational speed in rpm
omega= %pi*2*n/60
p= density*omega*omega*(r^2-Ri^2)/2
disp(" Gauge pressure is ")
disp(p)
disp(" N/m^2")
|
6ab5879588fb5869cecffe190ef2a9359935599e | 449d555969bfd7befe906877abab098c6e63a0e8 | /401/CH3/EX3.14/Example3_14.sce | 64b12e32c11f740b7da22dd87163c2d847e8dfcf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 444 | sce | Example3_14.sce | //Example 3.14
//Program to determine the mode coupling parameter for the fiber
clear;
clc ;
close ;
//Given data
L=3.5*10^3; //metre - LENGTH
CT=-27; //dB - POLARIZATION CROSSTALK
//Mode coupling parameter for the fiber
h=(10^(CT/10))/L; //as tan(h*L)=h*L for small values
//Displaying the Result in Command Window
printf("\n\n\t The mode coupling parameter for the fiber is %0.1f X 10^(-7)/m.",h/10^(-7)); |
e28f8f3e69544998007b9fa78870b73d70504eb9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /710/CH9/EX9.12/9_12.sci | 31bbf20a376724c2a2b35833cc61849598993f39 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 432 | sci | 9_12.sci | clc();
clear;
//To determine the angle of second order bragg's reflections
//According to Bragg's eq.2*d*sin(teta)=n*lambda
n=2; //since second order Bragg's eq.
d=5; //since d=5(lambda)
lambda=1;
a=(n*lambda)/(2*5*lambda);
teta=asind(a) //angle of second order Braggs reflections
printf("The angle of second order Braggs reflection is %f",teta); |
775b1a53eef775607f40f994271e741dab5cbfcf | 449d555969bfd7befe906877abab098c6e63a0e8 | /2660/CH4/EX4.10/Ex4_10.sce | d568e832fbab76c53a58fab050f7de753fc82827 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,092 | sce | Ex4_10.sce | clc
forgings = 40
setup = 4
Tc = 12 // machining time in min. per forging
nmt = 21 // non-machining in min. per forging
st = 45 // set up time per set up
ts = 5 // total sharpening in min. per forging
f = 20 // fatigue in percent
f = f/100
pn = 5 // personal needs in percent
pn = pn/100
Tk = 10 // tool chanhe time in min.
T = 8 // tool life in hours
ct = 15 // checking time with 5 checks in 15 secs
R = 1.4 // performance factor
dlc = 5 // direct labour cost in Rs per hour
tt = Tc+nmt // machining and non-machining time in min.
ft = f*tt // fatigue time in min.
pnt = pn*tt // personal needs in min.
t = (Tc*Tk)/(T*60) // total sharpening time in min. per forging
mct = (ts*ct)/60 // measuring and checking time in min.per forging
su = Tc + nmt+ pnt + ft + t + mct // sum of times in min.
tf = su*forgings // time for 40 forgings in min.
tst = st*setup // total set up time in min.
Te = tf+tst // total estimated time in min.
Ta = Te*R // total actual time in min.
lc = (Ta*dlc)/60 // direct labour cost in Rs
printf("\n Direct labour cost = Rs %0.1f" , lc)
|
6519df1e25e57377cb3745e0c1958a21f0bd54f4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /32/CH3/EX3.06/3_06.sce | f6a724ee87ba8c810bbda74adf80db0392d55c62 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 693 | sce | 3_06.sce | //pathname=get_absolute_file_path('3.06.sce')
//filename=pathname+filesep()+'3.06-data.sci'
//exec(filename)
//Initial pressure(in MPa):
p1=1
//Final pressure(in MPa):
p2=2
//Initial volume(in m^3):
v1=0.05
//Value of n:
n=1.4
//Final volume(in m^3):
v2=v1*((p1/p2)^(1/n))
//Change in internal energy(in kJ/kg):
du=7.5*(p2*v2-p1*v1)*10^3
//Work done(in kJ):
w=(p2*v2-p1*v1)*10^3/(1-n)
//Heat interaction(in kJ):
Q=du+w
printf("\nRESULT\n")
printf("\nHeat interaction = %f kJ",Q)
printf("\nWork interaction = %f kJ",w)
printf("\nChange in internal energy = %f kJ",du)
//If 180 kJ heat transfer takes place:
//Work done(in kJ):
w2=180-du
printf("\nNew work = %f kJ",w2) |
6c488dab773b60f3c15df9f67b6868e81d6fd2d0 | 9d0d8cfb131efa34cafc47d938fac6ddcee0750c | /miniproject/2prob/1_auto_correlation.sce | e1de5883925d1cb5cb621f38cd9d492d073f7d58 | [] | no_license | kazipetasurya/ee340 | 52c688b028a28effa88dc4a9eb653735e4fc19bc | 3885ad37122817c03d9a51d9f7df2c9c9f5f7251 | refs/heads/master | 2021-01-18T15:10:53.081056 | 2012-09-07T06:43:54 | 2012-09-07T06:43:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 903 | sce | 1_auto_correlation.sce | // Group_13: Bhargava B
// Surya K
// S K Savant
// Question:
// Let x(n) be the 13-point Barker sequence
// x(n) = {+1, +1, +1, +1, +1, -1, -1, +1, +1, -1, +1, -1, +1}.
// Determine the auto-correlation of the above sequence.
//
// Function to find auto_correlation of x
//Barker NOT WORKING : To FIX TO Auto_Correlation
function[corrvec]=auto_correlation(sequence)
N=length(sequence)
nvec=linspace(0,2*N,2*N) // -
corrvec=[]
for i=0:2*N-1 // i= 0 to 2N+1
corrval=0
for j=1:N
if(i-j>0 & i-j<=N) then
//disp(i-j)
corrval=corrval+sequence(i-j)*sequence(j)
end
end
corrvec=[corrvec,corrval]
end
disp(corrvec)
//disp(length(corrvec))
//disp(length(nvec))
plot(nvec,corrvec)
endfunction
barker=[1,1,1,1,1,-1,-1,1,1,-1,1,-1,1]
auto_correlation(barker)
|
e63e3203e7dfa7271c62d94a91e5dab77367084c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2840/CH7/EX7.4/ex7_4.sce | 5ce37decc61708b0c0d1d7c6bbce84acb18898c8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 415 | sce | ex7_4.sce | clc;
clear all;
l = 16; // Length of optical fiber in Km
Pi = 240e-6; // Mean optical length launched in optical fiber in Watts
Po = 6e-6; // Mean optical power at the output in watts
alpha = 10*log10(Pi/Po);//Signal attenuation in fiber
disp('dB',alpha,'Signal attenuation in fiber')
alpha1 = alpha/l;//Signal attenuation per km of the fiber
disp('dB/km',alpha1,'Signal attenuation per km of the fiber');
|
dfa241072c90c3223f44d9a50a41bfaccf171298 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1946/CH10/EX10.10/Ex_10_10.sce | 23f8f1257e18028652e2173f57214c8caa1c7ad2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 530 | sce | Ex_10_10.sce | // Example 10.10;//threshold quantum limit
clc;
clear;
close;
e=1.6*10^-19;
R=0.5;//responsivity in amper per watt
n=1;//efficiency for idea case
ht=6.62*10^-34;//plank constt.
f=3*10^14;//frequency in hertz
R=35;//mega bits per second
h=0.50^-6;//wavelength in metr
BER=10^-7;//bit error rate
Zm=-(log(BER));//probality of error
Po=(Zm*2*e*R*10^6)/2;
Podb=10*(log10(Po*10^3));//pulse energy in dB when refrence level is one milli watt
disp(Podb , "pulse energy in dB when refrence level is one miiliwatt in dBm")
|
dbbb76e013da973dadff2823b4b30ee7e997065e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1847/CH2/EX2.59/Ch02Ex59.sce | b851b122ce054a5204a47955133e1ec9fd84f223 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 707 | sce | Ch02Ex59.sce | // Scilab Code Ex2.59:: Page-2.47(2009)
clc; clear;
D_15 = 1.62; // Diameter of 15th dark ring with air film, cm
D_15_prime = 1.47; // Diameter of 15th dark ring with liquid, cm
R = 1; // For simplicity assume radius of curvature to be unity, cm
n = 15; // Order of 15rd Newton ring
// As for ring with air film, D_15^2 = 4*15*R*lambda, solving for lambda
lambda = D_15^2/(4*15*R); // Wavelength of light used, cm
// As for ring with liquid, D_15_prime^2 = 4*15*R*lambda/mu, solving for mu
mu = 4*15*R*lambda/D_15_prime^2; // Refractive index of the liquid
printf("\nThe refractive index of the liquid = %4.2f", mu)
// Result
// The refractive index of the liquid = 1.21
|
ab9ba967859dcd719ea5d7a6ae8d722095995395 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3765/CH3/EX3.2/Ex3_2.sce | b845282e591d0bb4ececa46b4f428c6eaa28cace | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,126 | sce | Ex3_2.sce | clc
// Example 3.2.py
// Return to Example 1.6, Calculate the Mach Number and velocity at the exit of the rocket
// nozzle.
// Variable declaration from example 1.6
pc = 15.0 // pressure combustion chamber (atm)
Tc = 2500.0 // temperature combustion chamber (K)
mol_wt = 12.0 // molecular weight (gm)
cp = 4157.0 // specific heat at constant pressure (J/Kg/K)
Tn = 1350.0 // temperature at nozzle exit (K)
// Calculations
R = 8314.0/mol_wt // gas constant = R_prime/mo_wt, R_prime = 8314 J/K
cv = cp - R // specific heat at constant volume (J/Kg k)
gamma1 = cp/cv // ratio of specific heat
pn_by_pc = (Tn/Tc** gamma1/(gamma1-1)) // ratio of pressure for isentropic process** pn/pc
Mn = (2/(gamma1-1)*((1/pn_by_pc**(gamma1-1)/gamma1) - 1)** 0.5) // Mach number at exit** from isentropic flow relation
an = (gamma1*R*Tn** 0.5) // Speed of sound at exit (m/s)
Vn = Mn*an // Velocity at exit (m/s)
// Result
printf("\n Mach number at the exit of the rocket nozzle is %.3f",(Mn))
printf("\n Velocity at the exit of the rocket nozzle is %.1f m/s",(Vn))
|
e4b3f15a3f0a99c15fd309a2130dc2ee3582c896 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2087/CH4/EX4.12/example4_12.sce | 4ad327b9a17ba6f3f2d33259c5aaf1327376d392 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 787 | sce | example4_12.sce |
//example 4.12
//plot IDF curve for return period of 10,2 and 1 years using california formula
clc;funcprot(0);
//given
t=[5 10 20 30 60 90 120]; //duration
//value of P for respective return period is
p10=[10.6 14.7 19.3 20.8 25.5 29 34.7]; //rainfall for T=10 years
p2=[8.2 10.3 13.2 14.2 16.6 19.4 21.4]; //rainfall for T=2 years
p1=[3.5 6.2 8.9 10 13.2 15 16.5]; //rainfall for T=1 year
for i=1:7
i1(i)=p10(i)*60/t(i); //intensity of rainfall with return period of 10 years
i2(i)=p2(i)*60/t(i); //intensity of rainfall with return period of 2 years
i3(i)=p1(i)*60/t(i); //intensity of rainfall with return period of 1 year
end
//graph is plotted between
//t and i1
//t and i2
//t and i3
|
a4016a1921d01f887ca44321b10b059a23ccc9d3 | 42fdf741bf64ea2e63d1546bb08356286f994505 | /test_20160829_nFETpFET_Id_char/pFET_IdVs.sce | 3954b8ced2f3694bb1e95bda74d5de03a7b3fa7f | [] | no_license | skim819/RASP_Workspace_sihwan | 7e3cd403dc3965b8306ec203007490e3ea911e3b | 0799e146586595577c8efa05c647b8cb92b962f4 | refs/heads/master | 2020-12-24T05:22:25.775823 | 2017-04-01T22:15:18 | 2017-04-01T22:15:18 | 41,511,563 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,916 | sce | pFET_IdVs.sce | unix_g('sudo chmod 777 /dev/prologix');
h=openserial("/dev/prologix", "9600,n,8,1"); //please make sure all the tty values are correct before starting the program.
writeserial(h,"++addr 15"+ascii(10));
unix_w("sleep 1");
writeserial(h,"++auto 1"+ascii(10));
unix_w("sleep 1");
writeserial(h,"SYST:ZCH 0"+ascii(10));
pFET_sCTRL=[(0:0.1:1.8)'; (1.82:0.02:2.5)';];
//pFET_sCTRL=[0.0; 0.5; 1; 1.5; 2.0; 2.5;];
size_pFET_sCTRL=size(pFET_sCTRL);
for i_pFET_s=1:size_pFET_sCTRL(1,1)
unix_g('sudo dwfcmd connect target=analogout channel=0 enable=1 function=dc offset="+string(pFET_sCTRL(i_pFET_s,1))+"V run=0 start finish');
writeserial(h,"READ?"+ascii(10)); xpause(3000000); temp_a=readserial(h); temp_b=part(temp_a,1:14); current(1,1)=msscanf(temp_b,"%lg");
while current ==[]
unix_g('sudo chmod 777 /dev/prologix'); h=openserial("/dev/prologix", "9600,n,8,1"); writeserial(h,"++addr 15"+ascii(10)); unix_w("sleep 1"); writeserial(h,"++auto 1"+ascii(10)); unix_w("sleep 1"); writeserial(h,"SYST:ZCH 0"+ascii(10));
writeserial(h,"READ?"+ascii(10)); xpause(3000000); temp_a=readserial(h); temp_b=part(temp_a,1:14); current(1,1)=msscanf(temp_b,"%lg");
end
unix_g('sudo dwfcmd connect target=analogout channel=0 enable=1 function=dc offset="+string(pFET_sCTRL(i_pFET_s,1))+"V run=0 start watch=2s analogin record channel=1 enable=1 range=2V offset=0 frequency=1k run=0.01s start save=null_data.csv');
pFET_sCTRL(i_pFET_s,2)=abs(current);
disp('D: 2.5V V S:'+string(pFET_sCTRL(i_pFET_s,1))+'V Current:'+string(current));
end
csvWrite(pFET_sCTRL,'data_pFET_IdVs.csv');
disp("done");
pFET_IdVs=csvRead('data_pFET_IdVs.csv');
scf(5);clf(5);
plot2d("nl", pFET_IdVs(:,1), pFET_IdVs(:,2));p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 3; p.children.line_mode="off";p.children.mark_foreground=1;
a=gca();a.data_bounds=[0 1e-11; 2.5 1e-4];
xtitle("","Vs(V)","Id(A)");
|
5c3334678fd2436b761a7e5e2f71c173b0852cc0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2753/CH4/EX4.10/Ex4_10.sce | 6dbab84c01981621bbdb101f7a89e3b113dd29b0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 182 | sce | Ex4_10.sce | //Example 4.10:
clc;
clear;
close;
//given data :
format('v',6)
Bv=12;//battery voltage in V
P=2;// power in Watt
Ic=(P/Bv)*10^3;
disp(Ic,"The maximum collector current,Ic(mA) = ")
|
18736637881b1888d889d978e186e5d692c696b3 | 39c5c468df5e2bde0147a30cf092fc8da3e7ed3e | /UFRGS/calcNumerico/area2/m10/pesos.sce | 270613ca9d74300bd7fc1afc3a9094481c3e0703 | [] | no_license | andredxc/Files | 9dffc9fe5f7e923b83035d794dfa15c930cdb898 | e32309b9ab548b829b04be66c2776cf9c9c6656e | refs/heads/master | 2021-06-03T10:44:01.606242 | 2020-09-21T15:39:48 | 2020-09-21T15:39:48 | 107,410,076 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 683 | sce | pesos.sce | /*
ex.
Sejam os nós x=[0, 0.6, 1]. Encontre os pesos A_i da quadratura
I=A_1f(x_1)+A_2f(x_2)+A_3f(x_3) tal que o erro seja o menor possível
para aproximar a integral de f no intervalo 0 a 1.
R: [8/36, 25/36, 3/36]
*/
clear
vetor_nodes = [-0.72, 0.12, 0.82]
lim_inicial = -1
lim_final = 1
len_nodes = length(vetor_nodes)
// Monta matriz A
for i = 1:len_nodes
for j = 1:len_nodes
if i == 1 then
A(i,j) = i // Primeira linha so tem 1s
else
A(i,j) = vetor_nodes(j)^(i-1)
end
end
end
// Monta matriz resultado B
for i = 1:len_nodes
B(i) = (lim_final^i - lim_inicial^i)/i
end
// Obtem pesos
w = inv(A)*B
disp(w)
|
06f0fe05f0a44fe63b0f6421ef64bbf3f51841cd | 449d555969bfd7befe906877abab098c6e63a0e8 | /671/CH4/EX4.50/4_50.sce | 20125fddced8e44200a90b6c82307b583ac7bc34 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 4_50.sce | function Zeq=parallel(Z1,Z2)
Zeq=Z1*Z2/(Z1+Z2)
endfunction
V=12*%i
Vth=4-12*%i/(4-12*%i+6+9*%i)*V
Zth=parallel(4-12*%i,6+9*%i)
I=Vth/(Zth+6+12*%i)
S=V*conj(I)
disp(S)
Zl=conj(Zth)
I=Vth/(Zth+Zl)
S=V*conj(I)
disp(Zth,S) |
dbe52f8cc02986c218b273948ef7013aa54bbd41 | 449d555969bfd7befe906877abab098c6e63a0e8 | /50/CH4/EX4.23/ex_4_23.sce | e06601bef2aaa35d2b04ecfa59ce6f80513f90e0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 498 | sce | ex_4_23.sce | // example: 4.23;
// piecewise cubical interpolating polinomials:
X=[-3 -2 -1 1 3 6 7];
F=[369 222 171 165 207 990 1779];
// we need to apply legranges interpolation in sub-ranges [-3 ,1];[1,7];
x=poly(0,"x");
// 1) in the range [-3,1]
x=[-3 -2 -1 1];
f=[369 222 171 165];
n=3;
P2=lagrangefundamentalpoly(x,f,n);
// 2) in the range [1,7]
x=[1 3 6 7];
f=[165 207 990 1779];
n=3;
P2=lagrangefundamentalpoly(x,f,n)
// hence,
disp('f(6.5)=1339.25'); |
c341129e96aa7b2bf882f2a8a6ca1c1bad870d15 | 449d555969bfd7befe906877abab098c6e63a0e8 | /662/CH4/EX4.9/ex4_9.sce | c6f7b40c47f1cf23ae1b1cc700d77d0556b8f01c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 304 | sce | ex4_9.sce | //Example 4.9
clc
//The scanf function
//a,b,c are integer type variables
printf("Enter value for a, b, c : ");
printf("\n [Enter integer values in single line seperated by spaces]) ");
[n,a, b,c]=mscanf("%3d %3d %3d");
printf("a = %d, b = %d, c = %d ", a, b, c);
|
aad85ac33705e29d3bb15a6210b926f17d1c95e9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /599/CH2/EX2.2/example2_2.sce | a55167831d90f97786705a7e048f6b90a8fe3679 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | sce | example2_2.sce |
clear;
clc;
printf("\t Example 2.2\n");
//kopp's law is valid
u=1.145*10^-3; //viscosity of water1.145cp
v_a=5*.0148+12*.0037+1*.0074; //by kopp's law
t=288; //temperature of water in kelvin
MB=18; //molecular weight of water
phi=2.26; //association parameter for solvent-water
D_ab=(117.3*10^-18)*((phi*MB)^.5)*(t)/(u*(v_a)^.6);
printf("\n the diffusivity of isoamyl alcohol is :%f *10^-9 m^2/s",D_ab/10^-9);
//end |
62ae9c68b921d085280e854d160c12e181a26ad4 | 42fdf741bf64ea2e63d1546bb08356286f994505 | /data_for_calibration_paper/Figure_04_IVconverterRampADC.sce | c442cc5e2868b729c80752503cfaa64e89d52981 | [] | no_license | skim819/RASP_Workspace_sihwan | 7e3cd403dc3965b8306ec203007490e3ea911e3b | 0799e146586595577c8efa05c647b8cb92b962f4 | refs/heads/master | 2020-12-24T05:22:25.775823 | 2017-04-01T22:15:18 | 2017-04-01T22:15:18 | 41,511,563 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,224 | sce | Figure_04_IVconverterRampADC.sce | global file_name path fname extension chip_num board_num hex_1na;
cd("/home/ubuntu/RASP_Workspace/data_for_calibration_paper");
path = pwd();
exec('~/rasp30/prog_assembly/libs/scilab_code/diodeADC_v2i.sce',-1);
exec('~/rasp30/prog_assembly/libs/scilab_code/diodeADC_i2v.sce',-1);
exec('~/rasp30/prog_assembly/libs/scilab_code/diodeADC_v2h.sce',-1);
exec('~/rasp30/prog_assembly/libs/scilab_code/diodeADC_h2v.sce',-1);
hex_1na=int(diodeADC_v2h(diodeADC_i2v(1e-09,chip_num,brdtype),chip_num,brdtype));
exec('~/rasp30/prog_assembly/libs/scilab_code/linefit.sce',-1);
exec('~/rasp30/prog_assembly/libs/scilab_code/ekvfit_diodeADC.sce',-1);
diodeADC_iv=csvRead("~/rasp30/prog_assembly/libs/scilab_code/characterization/char_diodeADC/data_diodeADC_chip"+chip_num+brdtype+"_ivdd25V");
Isat=diodeADC_iv(:,2);
Vout=diodeADC_iv(:,3);
Hex_code=diodeADC_iv(:,4);
epsilon=0.004;
plotting="off"; //"on_all" or "on_final" or "off"
[Is, VT, kappa]=ekvfit_diodeADC(Vout, Isat, epsilon, plotting);
//disp('EKV Fit: I_s = '+string(Is)+'A, V_T = '+string(VT)+'V, Kappa = '+string(kappa));
epsilon=1;
[WIfirst, WIlast, Slope_v2h, Offset_v2h, WIN]=linefit(Vout, Hex_code, epsilon);
csvWrite([Is, VT, kappa, Slope_v2h, Offset_v2h],'EKV_diodeADC');
unix_w("cp EKV_diodeADC ~/rasp30/prog_assembly/libs/chip_parameters/EKV_diodeADC/EKV_diodeADC_chip"+chip_num+brdtype);
EKV_diodeADC_para=csvRead("~/rasp30/prog_assembly/libs/chip_parameters/EKV_diodeADC/EKV_diodeADC_chip"+chip_num+brdtype);
Is=EKV_diodeADC_para(1); VT=EKV_diodeADC_para(2); kappa=EKV_diodeADC_para(3); Slope_v2h=EKV_diodeADC_para(4); Offset_v2h=EKV_diodeADC_para(5);
//Isat2=diodeADC_v2i(Vout, chip_num, brdtype);
//Vout2=diodeADC_i2v(Isat2, chip_num, brdtype);
vdd=2.5;
Vfg=vdd-(Vout/2);
scf(2);clf(2);
plot2d("nl",Vfg, Isat, style=1);p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 1; p.children.line_mode="off";
plot2d("nl", Vfg, diodeADC_v2i(Vfg, chip_num, brdtype), style=1);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on";
legend("Data","EKV fit","in_lower_left");
xtitle("","Vfg [V]","Iprog [A]"); a=gca();a.data_bounds=[1.3 1e-13; 2.4 5e-4];
title(['EKV Fit: I_s = '+string(Is)+'A, V_T = '+string(VT)+'V, Kappa = '+string(kappa)]);
scf(3);clf(3);
plot2d("ln",Isat, 2*(vdd-Vfg), style=1);p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 1; p.children.line_mode="off";
//plot2d("ln",Isat, 2*(vdd-diodeADC_v2i(Vfg, chip_num, brdtype), style=1);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on";
legend("Data","EKV fit","in_upper_left");
xtitle("","Iprog [A])","Vprog [V]");
a=gca();a.data_bounds=[1e-12 0.4; 1e-4 2.4];
//title(['EKV Fit: I_s = '+string(Is)+'A, V_T = '+string(VT)+'V, Kappa = '+string(kappa)]);
scf(4);clf(4);
plot2d("nn", 2*(vdd-Vfg), Hex_code, style=1);p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 1; p.children.line_mode="off";
plot2d("nn", 2*(vdd-Vfg), diodeADC_v2h(Vfg, chip_num, brdtype), style=1);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on";
legend("Data","Data for linefit","linefit","in_lower_right");
a=gca();a.data_bounds=[0.4 1000; 2.4 10000];
xtitle("","Vprog [V]","Hex_code");
//title('Vfg vs. Hex code Fit');
//scf(5);clf(5);
//plot2d("nl", diode_ivdd25V(:,4), diode_ivdd25V(:,2), style=1);p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 1; p.children.line_mode="off";
//plot2d("nl", ADC_range_ivdd25V, exp(diode_fit_ivdd25V), style=5);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on";
//plot2d("nl", diodeADC_v2h(Vfg, chip_num, brdtype), diodeADC_v2i(Vfg, chip_num, brdtype), style=2);p = get("hdl"); p.children.line_style = 1; p.children.thickness = 3; p.children.thickness = 3;p.children.line_mode="on";
//legend("data","Polyfit","EKV_fit","in_lower_right");
//xtitle("","Hex_code","Isat(A)");
//title('Polyfit vs. EKVfit');
//
//Current_to_ADC(:,3)=diodeADC_v2h(diodeADC_i2v(Current_to_ADC(:,1), chip_num, brdtype), chip_num, brdtype);
//
//disp(Current_to_ADC);
|
75bc7f4523046b0842c6616152d3294c894f7bcc | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/rootmusic/rootmusic4.sce | 398a8b40a98f3a0daeb0ccd27f2df951318d1d04 | [] | 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 | 381 | sce | rootmusic4.sce | //sampling frequency is passed as an i/p arg
R=[6.1117 + 0.0000*%i 3.8205 - 3.9887*%i -0.2138 - 5.5126*%i
3.8205 + 3.9887*%i 6.0796 + 0.0000*%i 3.8205 - 3.9887*%i
-0.2138 + 5.5126*%i 3.8205 + 3.9887*%i 6.1117 + 0.0000*%i];
Fs=200;
[F, POW]= rootmusic(R,2,Fs);
disp(F);
disp(POW);
//output
// 63.273966
// 25.713115
//
// 0.0233417
// 97.850188
|
4db3a49293041fa80bf935148f2d595cd3324936 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2438/CH9/EX9.3/Ex9_3.sce | e251cee28166696758171c127e8c3cd8299b558b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 487 | sce | Ex9_3.sce | //=============================================================================
// chapter 9 example 3
clc
clear
// Variable declaration
P = 400; // tensile force in newtons
d = 6*10^-3; // diameter of steel rod m
// Calculations
r =d/2;
E_stress = P/((%pi/4)*r*r); //e_stress in N/m^2
// Result
mprintf('Engineering stress = %3.2f MPa',E_stress/10^6);
//===========================================================================
|
6d7d937ed09b521e84f7575db92c0f8b9eb81254 | 8236d6101d21f50dda499c4ead7862c922885aee | /Scilab/Nightcore.sce | 58b9b786484ba170bf387d6acb36d3c672c31ab8 | [
"MIT"
] | permissive | manasdas17/NightcoreThis | fdd498dc39ad870b7439e3bdaf63fa3e4fa97b56 | fce141ad69f159e4cd4d9e741c6603761d882411 | refs/heads/master | 2021-01-22T09:04:10.071096 | 2016-01-30T11:27:52 | 2016-01-30T11:27:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 518 | sce | Nightcore.sce | Fss = 16000; //the bitrate of the song
Speed = 1.5; //how fast the song will be played
[testsign,Fs,bits]=wavread("SCI/modules/sound/demos/filterTest2(anja).wav"); //reading the wav (music) file in a matrix
testsign = testsign(1,:); //when reading in the wav file it creates 2 channels (stereo) and we only need one (mono)
t = [1:1:length(testsign)]*1/Fs; //We do this to plot the testsign in function of the sample frequetion of the wav file
//muziek afspelen afhankelijk van de speed
playsnd(testsign,Speed*Fss);
|
07f3ca54ce6884eceffe041d51e2d9b5cb031393 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2078/CH3/EX3.7/Example3_7.sce | 2521dcf6254df234048d1494d689eb3821a96062 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 934 | sce | Example3_7.sce | //Exa 3.7
clc;
clear;
close;
//Given data :
P1=1000;//kW
pf1=0.8;//
t1=10;//hours
P2=500;//kW
pf2=0.9;//
t2=8;//hours
P3=100;//kW
pf3=1;//
t3=6;//hours
a=poly(0,'a');//cross section area
I=poly(0,'I');//Current
L=poly(0,'L');//length in km
CcBYL=(8000*a+1500)//Rs/km(variable cost)
i=10;//%(depreciation)
E_lost_cost=80/100;//Rs/kWh
rho=1.72*10^-6;//ohm-cm
Cc_varBYL=8000*a*i/100//Rs/km(variable cost)
I1=P1*1000/sqrt(3)/10000/pf1;//A
I2=P2*1000/sqrt(3)/10000/pf2;//A
I3=P3*1000/sqrt(3)/10000/pf3;//A
R_into_a_BY_L=rho*1000*100;//ohm
W_into_A_BY_Isqr=R_into_a_BY_L;//W
E_loss_into_A_BY_L=3*R_into_a_BY_L*[I1^2*t1+I2^2*t2+I3^2*t3]*365/1000;//kWh
E_loss_cost_into_A_BY_L=E_loss_into_A_BY_L*E_lost_cost;//Rs
//Cc_var=E_loss_cost;//For most economical cross section
a=sqrt(coeff((numer(E_loss_cost_into_A_BY_L))/coeff(numer(Cc_varBYL/a))));//cm^2
disp(a,"Most economical cross sectional area in cm^2 : ");
|
1a9c47892d0c3f7957e8b1f760dfae024144caa3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /172/CH8/EX8.2/ex2.sce | 36431002e4997af823362b45d34d58e05c48cb4f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 736 | sce | ex2.sce | //example 2
//heat transfer in a given process
clear
clc
u1=87.94 //specific internal energy of R-12 at state 1 in kJ/kg
u2=276.44 //specific internal energy of R-12 at state 2 in kJ/kg
s1=0.3357 //specific entropy at state 1 in kJ/kg-K
s2=1.2108 //specific entropy at state 2 in kJ/kg-K
V=0.001 //volume of saturated liquid in m^3
v1=0.000923 //specific volume in m^3/kg
m=V/v1 //mass of saturated liquid in kg
T=20 //temperature of liquid in celsius
Q12=m*(T+273.15)*(s2-s1) //heat transfer in kJ to accomplish the process
W12=m*(u1-u2)+Q12 //work required to accomplish the process
printf(" \n hence,work required to accomplish the process is W12=%.1f kJ.\n",W12)
printf(" \n and heat transfer is Q12=%.1f kJ.\n",Q12) |
fc56adf6cbb6b33eef72de1f71f57eaf59893589 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3428/CH23/EX14.23.26/Ex14_23_26.sce | 443e96eb118ad5091ff51b05ed6bbf20f6d8ecab | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 316 | sce | Ex14_23_26.sce | //Section-14,Example-1,Page no.-PC.125
//To determine the pH of the given solution.
clc;
K_a=1.75*10^-5
pK_a=-log10(K_a)
[CH_3COOH]=(1000/(60*100)) //moldm^-3
[CH_3COONa]=((1.5*1000)/(82*100)) //moldm^-3
pH=(pK_a+ (log10([CH_3COONa]/[CH_3COOH])))
disp(pH,'pH of the given solution')
|
9bea11aad03bcdaffae9c9088243ab7d8dfbbb6e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1694/CH6/EX6.19/Ex6_19.sce | ff50973b9c322b855a0e86e8246d6e22ca5c1a88 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 451 | sce | Ex6_19.sce | clear;
clc;
printf("\nEx-6.19\n");
//page no.-192
//given
E=5.53;......//fermi energy in eV
e=1.6*10^-19;.....//charge
tau=3.91*10^-14;..//relaxation time in s
m=9.11*10^-31;....//mass of electron
v=((2*E*e)/m)^(1/2).......//fermi velocity
printf("\nfermi velocity is 1.39*10^6 m/s\n");
k=1.38*10^-23;......//boltzmann constant
T=(E*e)/k..............//fermi temperature in kelvin
printf("\nfermi temperature is 6.41*10^4 k");
|
bb3ce1ba307f85348b344fc5f6c2be1d6ec60f1e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2201/CH8/EX8.16/ex8_16.sce | f3583e33f9439ecda4aef692a2c7957a0f421cdc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 302 | sce | ex8_16.sce | // Exa 8.16
clc;
clear;
close;
// Given data
I_DSS = 10;// in mA
V_P = -5;// in V
V_GS = -2.5;// in V
g_m = ((-2*I_DSS)/V_P)*(1-(V_GS/V_P));// in mS .... correction
disp(g_m,"The transconductance in mS is");
I_D = I_DSS * ((1-(V_GS/V_P))^2);// in mA
disp(I_D,"The drain current in mA is");
|
54f5b56cdc39432014a37c6cc4de94fa72847b83 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1226/CH12/EX12.2/EX12_2.sce | b1e7e21404f3495942fd83d36ef5cc2c0d65da46 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 949 | sce | EX12_2.sce | clc;funcprot(0);//EXAMPLE 12.2
// Initialisation of Variables
n=6;...............//No of cylinders
N=1500;............//Engine rpm
BP=220;.............//Brake Power in kW
bsfc=0.273;..........//Brake Specific Fuel Consumption in kg/kWh
theta=30;.............//The Period of Injection in degrees of crank angle
spgr=0.85;............//Specific Gravity of fuel
Cf=0.9;................//Orifice discharge co-efficient
ip=160;...............//Injection pressure in bar
cp=40;.................//Pressure in combustion chamber in bar
rhow=1000;................//Density of water in kg/m^3
//Calculations
vf = Cf*sqrt((2*(ip-cp)*10^5)/(spgr*rhow));.............//Actual fuel velocity of injection in m/sec
qf=(bsfc*BP)/(spgr*rhow*3600);..................// Volume of fuel injected per sec in m^3
d=sqrt (qf/((%pi/4)*n*vf*(theta/360)*(60/N)*(N/120)));...........//Diameter of nozzle orifice
disp(d,"Diameter of Nozzle Orifice is (m):")
|
5506640cc3af045f95b2f965faef92817f6ab273 | 381be712cd10ab88d51ef144b1781befee729ab9 | /Project4/fill/FillAutomatic.tst | 1014314c15abf98b22fce2c00b5cee655e2158b6 | [] | no_license | ryoua/OS | 125846d9c121124f6487ea043db43c22e6aafd79 | 1b6de0cc2fbf2e432a552b9c99b0be63a4fdb6c9 | refs/heads/master | 2020-03-26T21:40:05.884264 | 2018-11-19T12:37:00 | 2018-11-19T12:37:00 | 145,401,691 | 14 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 662 | tst | FillAutomatic.tst | load Fill.hack,
output-file FillAutomatic.out,
compare-to FillAutomatic.cmp,
output-list RAM[16384]%D2.6.2 RAM[17648]%D2.6.2 RAM[18349]%D2.6.2 RAM[19444]%D2.6.2 RAM[20771]%D2.6.2 RAM[21031]%D2.6.2 RAM[22596]%D2.6.2 RAM[23754]%D2.6.2 RAM[24575]%D2.6.2;
set RAM[24576] 0, // the keyboard is untouched
repeat 1000000 {
ticktock;
}
output; // test that the screen is white
set RAM[24576] 1, // a keyboard key is pressed
repeat 1000000 {
ticktock;
}
output; // test that the screen is black
set RAM[24576] 0, // they keyboard in untouched
repeat 1000000 {
ticktock;
}
output; // test that the screen is white
|
8fa02bfd12626dfe488cca91abf601577baaa780 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1076/CH13/EX13.19/13_19.sce | 59de3cf68970129ce323262a613041a67d5a0060 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 13_19.sce | clear
clc
Pm=2
Pi=1
H=6
G=1
f=50
p=Pi/Pm
M=G*H/(%pi*f)
d0=asin(p)
dcc=acos(((p*(%pi - (2*d0)))- (Pi*cos(d0)))/(Pm-Pi))
mprintf("Critical Clearing angle = %.4f rad\n\n", dcc)
tcc=sqrt(2*M*(dcc-d0)/Pi)
mprintf("Critical Clearing time = %.3f sec = %.2f cycles", tcc , tcc*50)
|
49b27393fd8493dc5f14b5b46216ea58b51d36ac | 91bba043768342a4e23ee3a4ff1aa52fe67f7826 | /cs/142/1/tests/test23.tst | 987060b53d77b1580ce70393790472ec4cf73dfd | [] | no_license | MaxNanasy/old-homework | 6beecc3881c953c93b847f1d0d93a64ec991d6de | 48b7997a49a8f111344f30787c178e1661db04bd | refs/heads/master | 2016-09-08T04:37:44.932977 | 2010-03-02T00:48:59 | 2010-03-02T00:48:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 278 | tst | test23.tst | const TEST = 12;void proc1() { var x : int; void proc11() { var y : int; type t = newType; int proc111() { return y; } int proc112() { return ::proc111() + y; } y = ::proc111() + ::proc112(); } void proc12() { int proc121() { return TEST; } }}main() { ::proc1();} |
b105d32d5c78f5b99d257490557fd72df769579f | 449d555969bfd7befe906877abab098c6e63a0e8 | /1727/CH8/EX8.3/8_3.sce | 3e024ede387b45f6f8ec1191075a45e0a56e12b9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 265 | sce | 8_3.sce | clc
//Initialization of variables
b=3 //m
y=1 //m
sf=0.005
n=0.028
gam=9.81*1000
Q=0.25 //m^3/s
slope=1.5
//calculations
A= 0.5 *b*y
P=2*sqrt(1 + (slope)^2)
R=A/P
yx= Q*n/(slope * R^(2/3) *sf^(1/2))
y= yx^(3/8)
//results
printf("depth = %.2f m",y)
|
3cb76601b153cffd119ff7d4153b816954da5096 | 449d555969bfd7befe906877abab098c6e63a0e8 | /608/CH13/EX13.21/13_21.sce | f6d2cc149065b3b7fc0eba94536505ef40aeb714 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 591 | sce | 13_21.sce | //Problem 13.21: A d.c. source has an open-circuit voltage of 30 V and an internal resistance of 1.5 ohm. State the value of load resistance that gives maximum power dissipation and determine the value of this power.
//initializing the variables:
V = 30; // in volts
r = 1.5; // in ohms
//calculation:
//current I = E/(r + RL)
//For maximum power, RL = r
RL = r
I = V/(r + RL)
//Power, P, dissipated in load RL, P
P = RL*I^2
printf("\n\n Result \n\n")
printf("\n (a) the value of the load resistor RL is %.1f ohm",RL)
printf("\n (b) maximum power dissipation = %.0f W",P) |
a70b313aaa03cff7d3e95d5b81e7b7a9ffb48006 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2309/CH5/EX5.a.8/A_Ex5_8.sce | c7444c68365f5bdbb2486961b0d736359e5add9f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | A_Ex5_8.sce | // Chapter 5 additional Example 8
//==============================================================================
clc;
clear;
// input data
a = 4*10^-10; // lattice constant of the crystal
h = 1 // miller indice
k = 0 // miller indice
l = 0 // miller indice
//Calculations
// in fig consider (100) plane. the no of atoms in plane ABCD
N = 4*(1/4); // Number of atoms
p = N/(a*a); // planar atomic density in atoms/m^2
p1 = p*10^-6 // planar atomic density in atoms/mm^2
//Output
mprintf('planar atomic density = %3.2e atoms/mm^2',p1);
//==============================================================================
|
19848d21305fa7d8d4f3f15b699557455e696afe | 449d555969bfd7befe906877abab098c6e63a0e8 | /3281/CH5/EX5.1/ex5_1.sce | b1a705ba026db914f79efa9c2e3e42259473361f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 553 | sce | ex5_1.sce | //Page Number: 288
//Example 5.1
clc;
//Given
f=10D+9; //Hz
v=9D+3; //V
i=40D-3; //A
l=3; //cm
l1=l/100; //m
G=2D-6; //mho
bet=0.92;
j1x=0.582;
x=1.841;
ebym=1.7D+11; //J
//Maximum voltage
w=2*%pi*f;
v0x=sqrt(2*ebym);
thet=(w*l1)/(v0x*sqrt(v));
av=(bet^2*thet*i*j1x)/(x*v*G);
disp('V',av,'Maximum voltage:');
//Power Gain
ic=2*i*j1x;
v2=(bet*ic)/G;
pout=bet*ic*v2;
pin=2*i*v;
//Efficiency
eet=pout/pin;
disp('%',eet*100,'Power gain:');
//Answer for effciency comes out to be wrong, it is calculted wrongly in book
|
b81b50772e7750a6e156d00037c8ce7a97cf4a47 | 717ddeb7e700373742c617a95e25a2376565112c | /291/CH8/EX8.3e/eg8_3e.sce | e3712ff9ad45d2a9a76e49747104b1c3675517c5 | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 222 | sce | eg8_3e.sce | n =5;
Xbar = 9.5;
uo = 8;
var = 4;
statistic = sqrt(n/var)*(Xbar - u);
p = 1 - cdfnor("PQ", statistic, 0, 1);
disp("The test would call for rejection at all significance levels greater than or equal to ")
disp(p);
|
c347ee7a9b2d5a9ce09e3f23b238c11b3f293fee | 449d555969bfd7befe906877abab098c6e63a0e8 | /3526/CH3/EX3.11/EX3_11.sce | 77fb17232e3926b7f94725e458f261cd0542f482 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 349 | sce | EX3_11.sce | //page 70
clc;funcprot(0);//EXAMPLE 3.11
// Initialisation of Variables
E=12;......//No. of Edges in the octahedral sites of the unit cell
S=1/4;.......//so only 1/4 of each site belongs uniquelyto each unit cell
N=E*S+1;.....//No.of site belongs uniquely to each unit cell
disp(N,"No.of octahedral site belongs uniquely to each unit cell:")
|
b7f8134918a0fae7e7e97d457a2729da3caa7234 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1733/CH5/EX5.10/5_10.sce | edadfaf2aa637171bbdad6d19d205f6dc3fe93f8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 439 | sce | 5_10.sce | //5.10
clc;
V=415;
P=20*10^3;
disp('For Triacs')
I_line=P/(3^0.5*V);
Irms=I_line*1.5;
printf("RMS current rating of each triac=%.2f A", Irms)
Vrms=1.5*V;
printf("\nRMS Voltage rating of each triac=%.2f V", Vrms)
disp('For reverse connected thyristors')
Irms_thy=1.5*I_line/2^0.5;
printf("RMS current rating of each thyristor=%.2f A", Irms_thy)
Vrms_thy=1.5*V;
printf("\nRMS voltage rating of each thyristor=%.2f V", Vrms_thy) |
894e9cc21bbddc99a36674efb115260f386604b5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1427/CH2/EX2.15/2_15.sce | efcad3bb3d12871440244c5acbe6fb6ed4e5a18e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,455 | sce | 2_15.sce | //ques-2.15
//Calculating volume of air supplied for fuel
clc
M=5;//Percentage of Methane in gaseous fuel
H=20;//Percentage of Hydrogen in gaseous fuel
CM=25;//Percentage of Carbon Monoxide in gaseous fuel
CD=6;//Percentage of Carbon dioxide in gaseous fuel
N=100-(M+H+CM+CD);//Percentage of Nitrogen in gaseous fuel
e=20;//Percentage of excess air supplied
v1=(M/100)*2;//Volume of oxygen required for methane (in kL)
v2=(H/100)*0.5;//Volume of oxygen required for hydrogen (in kL)
v3=(CM/100)*0.5;//Volume of oxygen required for carbon monoxide (in kL)
v4=CD/100;//Volume of oxygen required for carbon dioxide (in kL)
v5=N/100;//Volume of oxygen required for nitrogen (in kL)
V=(v1+v2+v3)*(100/21);//Volume of air for gaseous fuel (in kL)
V=V*(1+e/100);//Volume of air for gaseous fuel using excess (in kL)
v6=M/100+CM/100+v4;//Final volume of carbon dioxide as dry product (in kL)
v7=(e/100)*(v1+v2+v3);//Final volume of oxygen as dry product (in kL)
v8=v5+V*(77/100);//Final volume of nitrogen as dry product (in kL)
V_T=v6+v7+v8;//Total volume (in kL)
P_C=(v6/V_T)*100;//Percentage of carbon dioxide as dry product
P_O=(v7/V_T)*100;//Percentage of oxygen as dry product
P_N=(v8/V_T)*100;//Percentage of nitrogen as dry product
printf("The volume of air required for gaseous fuel is %.3f kL.\n",V);
printf(" Percentage of carbon dioxide, oxygen and nitrogen as dry product are %.3f, %.3f and %.2f respectively.",P_C,P_O,P_N);
|
fd7bf46373ce1dacd4011fd692d58f8a1ec75eae | 449d555969bfd7befe906877abab098c6e63a0e8 | /965/CH7/EX7.47/47.sci | 88e206dc9347a3fb1be886023df096fd46c8edcb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 427 | sci | 47.sci | clc;
clear all;
disp("incerease in bulk temperature")
tb1=200;//degree C
d=25.4/1000;//m diameter of tube
U=10;//m/s
tw=20;// degree C
L=3;//m length of tube
rho=1.493;//kg/m^3
mu=2.57*10^(-5);//Ns/m^2
k=0.0386;//W/m.C
cp=1025;// J/kg.C
Re=rho*U*d/mu
Pr=mu*cp/k
Nu=0.0023*Re^0.8*Pr^0.4
h=Nu*k/d
Q=h*%pi*d*(tb1-tw)
m=rho*%pi*d^2*U;
delT=Q/(m*cp);
disp("degree C",delT,"Increase in bulk temperature is = ")
|
6f6e4bd058838c2943a75fc20c8ca2e7081771a6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1871/CH5/EX5.14/Ch05Ex14.sce | 6ff8f008b6bcb886abca5b866df632b14f87c376 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 656 | sce | Ch05Ex14.sce | // Scilab code Ex5.14: Pg:225 (2008)
clc;clear;
n = 1; // First order diffraction
N = 1000; // Number of lines on the grating
Lambda = 6e-05; // Wavelength of light, cm
// Let Lambda and d_Lambda be the two wavelengths in the first order spectrum. Since the resolving power of a grating is given by Lambda/d_Lambda = n*N. On solving for d_lambda, we have
d_Lambda = Lambda/(n*N); // Difference between two wavelength in the first order spectrum, Angstorm
printf("\nThe wavelength difference in the first order spectrum = %d angstrom", d_Lambda/1e-008);
// Result
// The wavelength difference in the first order spectrum = 6 angstrom |
aa77677408e46d700c729ebc7a8cd67dc416d1bc | cd3c5732d433fc4da34fc30be47c1cb98e180671 | /script.sci | 7ce549e110d25af7ee6c460c6a0eb9817fdf7458 | [
"MIT"
] | permissive | Matii96/lagrange-polynomial-interpolation | 06b68d71d7f903ee0e25e778c7be75731456a785 | e6c9d91479c36003b8ff8d918491889b3057de06 | refs/heads/master | 2021-05-18T01:33:57.216020 | 2020-04-20T17:48:04 | 2020-04-20T17:48:04 | 251,049,025 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 377 | sci | script.sci | getd('functions');
xdel(winsid());
clc;
x = [-3 -1 0 1 3 4];
y = cos(x);
// Lagrange
x2 = linspace(min(x), max(x), 100);
y2 = lagrange(x2, x, y);
y3 = cos(x2);
// Draw results
a=get('current_axes');
a.data_bounds=[min(x)-1, min(y)-1; max(x)+1, max(y)+1];
title('Lagrange demonstration');
plot(x, y, '*r', x2, y3, x2, y2);
legend(['cos(x) - nodes'; 'cos(x)'; 'lagrange(x)']); |
57984a0ea1a90e9291a12b2e7d7591a339d23e5c | 727092dff86e9d034d021bbc56565d9336b988aa | /Códigos CN/RS2_integração.sci | 47f1da5b6eb51c4764f4361c8844096deda33dab | [] | no_license | lucasdksan/Numerical-computing | c54b855bd50f2a06b1970086f2da63c28883f287 | a5a5863499bdf46003437140e3fa3123fc4960f8 | refs/heads/master | 2023-06-24T16:13:01.094230 | 2021-07-29T15:57:00 | 2021-07-29T15:57:00 | 278,514,165 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 273 | sci | RS2_integração.sci | function I = RS2(a,b,n)
h = (a-b)/n;
x = a:h:b;
y = f(x);
I = y(1);
for i = 2:n
if modulo(i,3) == 1
I = I + 2*y(i);
else
I = I + 3*y(i);
end
end
I = (3*h/8)*(I + y(n+1));
endfunction
|
4bfd3479ce54945ff4bace07113caf54d19f7cbb | 449d555969bfd7befe906877abab098c6e63a0e8 | /182/CH3/EX3.11/example3_11.sce | fa7693c65b5f5728789fdb95c94569140839d8a8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 744 | sce | example3_11.sce | //To find resistance Rs and Rsh in the given ciruit
// example 3-10 in page 55
clc;
//data given
Iav=50e-6;//average current through PMCC instrument=50 micro ampere
Rm=1700;// coil resistance in ohm
Vf=0.7;// diode forward drop in volts
If=100e-6;// forward current = 100 micro-ampere
Vrms=50;// ac rms voltage in volts
// calculation
Im=Iav/(0.5*0.637);//peak current in ampere
Ifp=(100/20)*If;//at 20% of FSD, diode peak current(If) must be at least 100 micro ampere; therefore, at 100% of FSD,
Ishp=Ifp-Im;// peak current through Rsh in ampere
Vm=Im*Rm;// peak voltage in volts
Rsh=Vm/Ishp;
Rs=(1.414*Vrms-Vm-Vf)/Ifp;
printf("Rsh=%d ohm\n",Rsh);
printf("Rs=%.1f K-ohm\n",Rs/1000);
//result
//Rsh=778 ohm
//Rs=139.5 K-ohm |
4c2a40a01ee550e1810cd1053ac7dabc320600cb | 449d555969bfd7befe906877abab098c6e63a0e8 | /761/CH17/EX17.5/17_5.sce | 9268f84c298d1a207aadfad2e2117a66e7194939 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 251 | sce | 17_5.sce | clc;
//page no 628
//prob no. 17.5
//determination of characteristic impedance of waveguide with given 5GHz freq
f=5*10^9;fc=3.75*10^9;//Refering in eg. 17.4
Zo=377/sqrt(1-(fc/f)^2);
disp('ohm',Zo,'The characteristic impedance of waveguide is'); |
199de726323790d073ac200756a245287b62380f | 449d555969bfd7befe906877abab098c6e63a0e8 | /1964/CH15/EX15.6/ex15_6.sce | f35878ce1b4d8beb6c678455b0ce2ea2a25e2e50 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,024 | sce | ex15_6.sce | //Chapter-15, Example 15.6, Page 497
//=============================================================================
clc
clear
//CALCULATIONS
x1=base2dec(['110','10'],2)//converting binary to decimal
x2=base2dec(['1111','110'],2)//converting binary to decimal
y1=(x1(1))/(x1(2));//dividing
y2=(x2(1))/(x2(2));//dividing
z1=dec2base(y1,2);//converting decimal to binary
[f,e]=frexp(y2);//separting exponent and mantissa
disp(f)//mantissa
disp(e)//exponent
f=f*2;
g=floor(f);//rounding to nearest integer
disp(g);
z2=dec2base(e,2);//converting decimal to binary--------->before point part of resultant binary number
disp(z2)
g1=dec2base(g,2);//converting decimal to binary--------->after point part of resultant binary number
disp(g1)
//NOTE:here floating point decimal cannot be directly converted to binary for second case.Hence computed to binary
//=================================END OF PROGRAM=======================================================================================================
|
7f4071c90cfd521efef19cc25e18f3d82b97c544 | 449d555969bfd7befe906877abab098c6e63a0e8 | /98/CH4/EX4.7/example4_7.sce | 55bdd94d010098f1125c9c3906311add980c09ae | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 706 | sce | example4_7.sce | //Chapter 4
//Example 4_7
//Page 77
clear;clc;
pc=50;
lf=0.4;
p=12*1e6;
tax=400000;
other_cost=0.01;
interest=0.05;
dep=0.06;
md=pc;
printf("Annual fixed charges\n");
i_and_d=p*(interest+dep);
afc=i_and_d+tax;
printf("Interest and depreciation = Rs. %.0f \n", i_and_d);
printf("Wages and taxation = Rs. %.0f \n", tax);
printf("Total annual fixed charges = Rs. %.0f \n\n", afc);
printf("Annual running charges\n");
ugpa=md*lf*8760*1000;
cost=other_cost*ugpa;
tac=cost+afc;
cpkWh=tac/ugpa;
printf("Units generated per annum = %.0f kWh \n", ugpa);
printf("Cost of fuel and lubrication = Rs. %.0f \n", cost);
printf("Total annual charges = Rs. %.0f \n", tac);
printf("Cost per kWh = Rs. %.4f \n\n", cpkWh); |
e785e2a606753883e5756d925fe8df7516949736 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1826/CH20/EX20.4/ex20_4.sce | d35f2212fcebeee744494c9d27162e2831d8c763 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 187 | sce | ex20_4.sce | // Example 20.4, page no-570
clear
clc
tc1=4.185
m1=199.5
m2=203.4
tc2=tc1* sqrt(m1/m2)
printf("The critical temperature for metal with isotopic mass of %.1f is %.3f K",m2,tc2)
|
bc0dfb11f6aefdd7eea9a1661c1662b6e2dc0f4f | 449d555969bfd7befe906877abab098c6e63a0e8 | /69/CH7/EX7.6/7_6.sce | 69f6c3ea8c326ab4248d18966948d9473962c71e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 972 | sce | 7_6.sce | clear; clc; close;
Idss = 9*10^(-3);
Vp = -3;
Vdd = 20;
Vss = 10;
Rd = 1.8*10^(3);
Rs = 1.5*10^(3);
Vgs1 = Vp;
Id1 = 0;
Vgs2 = Vp/2;
Id2 = Idss/4;
Vgs3 = 0;
Id3 = Idss;
x = [Vgs1 Vgs2 Vgs3];
y = [Id1 Id2 Id3];
yi=smooth([x;y],0.1);
a = gca();
a.thickness = 2;
a.y_location = 'right';
a.x_label.text = 'Vgs';
a.y_label.text = 'Id(mA)';
a.title.text = 'Q-point for network';
a.grid = [1 1];
plot2d(yi(1,:)',yi(2,:)',[3]);
Id1 = 0;
Vgs1 = Vss-Id1*Rs;
Id2 = 4*10^(-3);
Vgs2 = Vss-Id2*Rs;
Id3 = 8*10^(-3);
Vgs3 = Vss-Id3*Rs;
x = [Vgs1 Vgs2 Vgs3];
y = [Id1 Id2 Id3];
plot2d(x,y);
a.data_bounds = [-3 0;10 9*10^(-3)];
Vgsq = -0.35;
disp(Vgsq,'Q-point value of Vgs(found after interpolation) is :');
Idq = 6.9*10^(-3);
Vds = Vdd+Vss-Idq*(Rd+Rs);
Vd = Vdd-Idq*Rd;
Vs = Vd-Vds;
disp(Idq,'Idq(Amperes) = ');
disp(Vds,'Vds(Volts) = ');
disp(Vd,'Vd(Volts) = ');
disp(Vs,'Vs(Volts) = ');
disp(Vds,'Vds(Volts) = ');
|
bdcdeb1cbc5e7a2a545fbf411f09ea4fa7f82c8a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3204/CH3/EX3.2/Ex3_2.sce | c202bafa8c0f33d977cda408bcdd6c824d3882d9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 297 | sce | Ex3_2.sce | //Initilization of variables
F=1000 //N
Lab=1 //m
Lbc=0.25 //m
Lac=1.25 //m
//Calculations
Rb=(F*Lac)/Lab //N // from eq'n 2
Ra=Rb-F //N // fom eq'n 1
//Results
clc
printf('The reaction (downwards)at support A is %f N \n',Ra)
printf('The reaction (upwards)at support B is %f N \n',Rb)
|
7790d00efacb8af4d35f00e621df8f0ca0ca7749 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3648/CH3/EX3.7/Ex3_7.sce | 1b26b2fce52a8580c6b6ee7009b2b496e1a410de | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 267 | sce | Ex3_7.sce | //Example 3_7
clc();
clear;
//To calculate the time taken to travel
v0=16.7 //units in meters/sec
a=1.5 //units in meters/sec^2
x=70 //units in meters
t=-((-v0)+sqrt(v0^2-(4*(a/2)*x)))/(2*(a/2)) //units in sec
printf("Time taken to travel T=%.1f sec",t)
|
c603cd8e61e74f0de6a391d39a2688f6fababb81 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3557/CH5/EX5.5/Ex5_5.sce | 36daf22c664431ae2a557af9a4335c6b4e5b10d6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 306 | sce | Ex5_5.sce | //Example 5.5//
x=1*10^-3;//m// Using the diffusivity from sample problem 5.3
D=2.98*10^-11;//m^2/s //arrhenius equations
a=0.95;//from the figure 5.11
d=(x^2)/((a^2)*(D))// calculating the value of d
mprintf("d = %e h",d)
b=1;//h //hour
c=3.6*10^3;//s //second
t=d*(b/c)
mprintf("\nt = %f h",t)
|
d30a993c501f0f7958f07e247612d1cc998887c2 | 2ba48648eefadee113a7c2f5d608cab5209c3a8b | /Unit&Func Test/单元测试文档/CagOS单元测试结果/LIBC/testcase/strtod.tst | fa7efaae0dcdedc13178a978c384a70f87d941e1 | [] | no_license | wangdong412/Consen-SIS | 879762175575d0a62f26ec1effeb46c3fd62e3e8 | bca3fac35c961c3558a3438bca55e6d20825da3a | refs/heads/master | 2020-07-11T05:17:18.814104 | 2019-08-27T09:41:41 | 2019-08-27T09:41:41 | 204,450,874 | 1 | 5 | null | null | null | null | UTF-8 | Scilab | false | false | 22,799 | tst | strtod.tst | -- VectorCAST 6.4c (02/03/16)
-- Test Case Script
--
-- Environment : LIBC
-- Unit(s) Under Test: abort1 abs atof atoi atol bLib memchr memcmp memcpy memmove memset ns16550 qsort rand random random_r strcat strchr strcmp strcpy strlcat strlcpy strlen strncat strncmp strncpy strpbrk strspn strtod strtok strtok_r strtol strtoul
--
-- Script Features
TEST.SCRIPT_FEATURE:C_DIRECT_ARRAY_INDEXING
TEST.SCRIPT_FEATURE:CPP_CLASS_OBJECT_REVISION
TEST.SCRIPT_FEATURE:MULTIPLE_UUT_SUPPORT
TEST.SCRIPT_FEATURE:MIXED_CASE_NAMES
TEST.SCRIPT_FEATURE:STATIC_HEADER_FUNCS_IN_UUTS
--
-- Unit: strtod
-- Subprogram: is_real
-- Test Case: real1
TEST.UNIT:strtod
TEST.SUBPROGRAM:is_real
TEST.NEW
TEST.NAME:real1
TEST.BASIS_PATH:1 of 1
TEST.NOTES:
No branches in subprogram
TEST.END_NOTES:
TEST.VALUE:strtod.is_real.x:<<MIN>>
TEST.EXPECTED:strtod.is_real.return:0
TEST.END
-- Test Case: real2
TEST.UNIT:strtod
TEST.SUBPROGRAM:is_real
TEST.NEW
TEST.NAME:real2
TEST.NOTES:
No branches in subprogram
TEST.END_NOTES:
TEST.VALUE:strtod.is_real.x:<<MAX>>
TEST.EXPECTED:strtod.is_real.return:0
TEST.END
-- Test Case: real3
TEST.UNIT:strtod
TEST.SUBPROGRAM:is_real
TEST.NEW
TEST.NAME:real3
TEST.NOTES:
No branches in subprogram
TEST.END_NOTES:
TEST.VALUE:strtod.is_real.x:0.0
TEST.EXPECTED:strtod.is_real.return:1
TEST.END
-- Test Case: real4
TEST.UNIT:strtod
TEST.SUBPROGRAM:is_real
TEST.NEW
TEST.NAME:real4
TEST.NOTES:
No branches in subprogram
TEST.END_NOTES:
TEST.VALUE:strtod.is_real.x:-112.345234
TEST.EXPECTED:strtod.is_real.return:1
TEST.END
-- Test Case: real5
TEST.UNIT:strtod
TEST.SUBPROGRAM:is_real
TEST.NEW
TEST.NAME:real5
TEST.NOTES:
No branches in subprogram
TEST.END_NOTES:
TEST.VALUE:strtod.is_real.x:112.345234
TEST.EXPECTED:strtod.is_real.return:1
TEST.END
-- Subprogram: strtod
-- Test Case: strtod
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod
TEST.BASIS_PATH:1 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 1
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> TRUE
Test Case Generation Notes:
Cannot set p due to assignment
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
TEST.END_NOTES:
TEST.VALUE:strtod.strtod.str:<<malloc 1>>
TEST.VALUE:strtod.strtod.endptr:<<malloc 1>>
TEST.EXPECTED:strtod.strtod.return:0.0
TEST.END
-- Test Case: strtod10
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod10
TEST.BASIS_PATH:10 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 10
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> TRUE
(11) case (*(++p)) ==> 43
(14) if (exponent < -1021 || exponent > 1024) ==> TRUE
Test Case Generation Notes:
Cannot set p due to assignment
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set switch condition (*(++p)) in branch 11
Cannot set p due to assignment
Cannot set local variable p in branch 12
Cannot set negative due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.VALUE:strtod.strtod.str:<<malloc 9>>
TEST.VALUE:strtod.strtod.str:"-1234.56"
TEST.VALUE:strtod.strtod.endptr:<<null>>
TEST.EXPECTED:strtod.strtod.return:-1234.56
TEST.END
-- Test Case: strtod11
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod11
TEST.BASIS_PATH:11 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 11
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> TRUE
(11) case (*(++p)) ==> 43
(13) if negative ==> TRUE
(14) if (exponent < -1021 || exponent > 1024) ==> TRUE
Test Case Generation Notes:
Cannot set p due to assignment
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set switch condition (*(++p)) in branch 11
Cannot set p due to assignment
Cannot set local variable p in branch 12
Cannot set negative due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.VALUE:strtod.strtod.str:<<malloc 14>>
TEST.VALUE:strtod.strtod.str:"12345.67afdsf"
TEST.VALUE:strtod.strtod.endptr:<<null>>
TEST.EXPECTED:strtod.strtod.return:12345.7
TEST.END
-- Test Case: strtod12
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod12
TEST.BASIS_PATH:12 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 12
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> TRUE
(11) case (*(++p)) ==> 43
(12) while (*p >= 48 && *p <= 57) ==> TRUE
(14) if (exponent < -1021 || exponent > 1024) ==> TRUE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set switch condition (*(++p)) in branch 11
Cannot set local variable p in branch 12
Cannot set negative due to assignment
Conflict: Cannot resolve multiple comparisons ( ) in branches 8/12
Cannot set local variable p in branch 13
Cannot set negative due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.VALUE:strtod.strtod.str:<<malloc 13>>
TEST.VALUE:strtod.strtod.str:"-123.34abced"
TEST.VALUE:strtod.strtod.endptr:<<malloc 1>>
TEST.EXPECTED:strtod.strtod.endptr[0]:"abced"
TEST.EXPECTED:strtod.strtod.return:-123.34
TEST.END
-- Test Case: strtod13
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod13
TEST.BASIS_PATH:13 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 13
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> TRUE
(10) case (*(++p)) ==> 45
(14) if (exponent < -1021 || exponent > 1024) ==> TRUE
Test Case Generation Notes:
Cannot set p due to assignment
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set switch condition (*(++p)) in branch 10
Cannot set p due to assignment
Cannot set local variable p in branch 12
Cannot set negative due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.VALUE:strtod.strtod.str:<<malloc 11>>
TEST.VALUE:strtod.strtod.str:"-123.34e+4"
TEST.VALUE:strtod.strtod.endptr:<<malloc 1>>
TEST.EXPECTED:strtod.strtod.return:-1233400.0
TEST.END
-- Test Case: strtod14
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod14
TEST.BASIS_PATH:14 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 14
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> TRUE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> TRUE
Test Case Generation Notes:
Cannot set p due to assignment
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.STUB:strtod.is_real
TEST.VALUE:strtod.is_real.return:0
TEST.VALUE:strtod.strtod.str:<<malloc 7>>
TEST.VALUE:strtod.strtod.str:"-10e-1"
TEST.VALUE:strtod.strtod.endptr:<<malloc 1>>
TEST.EXPECTED:strtod.strtod.return:-1.0
TEST.END
-- Test Case: strtod15
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod15
TEST.BASIS_PATH:15 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 15
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> TRUE
(7) if (num_digits == 0) ==> TRUE
Test Case Generation Notes:
Cannot set p due to assignment
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set p due to assignment
Cannot set local variable p in branch 6
Cannot set num_digits due to assignment
TEST.END_NOTES:
TEST.VALUE:strtod.strtod.str:<<malloc 8>>
TEST.VALUE:strtod.strtod.str:"1e+1025"
TEST.VALUE:strtod.strtod.endptr:<<malloc 1>>
TEST.EXPECTED:strtod.strtod.return:1.7E308
TEST.END
-- Test Case: strtod16
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod16
TEST.BASIS_PATH:16 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 16
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> TRUE
(6) while (*p >= 48 && *p <= 57) ==> TRUE
(7) if (num_digits == 0) ==> TRUE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set local variable p in branch 5
Cannot set local variable p in branch 6
Cannot set p due to assignment
Conflict: Cannot resolve multiple comparisons ( ) in branches 5/6
Cannot set local variable p in branch 7
Cannot set num_digits due to assignment
TEST.END_NOTES:
TEST.VALUE:strtod.strtod.str:<<malloc 10>>
TEST.VALUE:strtod.strtod.str:"1.5e-1022"
TEST.VALUE:strtod.strtod.endptr:<<malloc 1>>
TEST.EXPECTED:strtod.strtod.return:1.7E308
TEST.END
-- Test Case: strtod2
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod2
TEST.BASIS_PATH:2 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 2
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> TRUE
Test Case Generation Notes:
Cannot set p due to assignment
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.VALUE:strtod.strtod.str:<<malloc 1>>
TEST.VALUE:strtod.strtod.endptr:<<malloc 1>>
TEST.EXPECTED:strtod.strtod.return:0.0
TEST.END
-- Test Case: strtod3
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod3
TEST.BASIS_PATH:3 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 3
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> FALSE
(15) if (n < 0) ==> FALSE
(16) while n ==> FALSE
(19) if (!is_real(number)) ==> FALSE
(20) if endptr ==> FALSE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.STUB:strtod.is_real
TEST.VALUE:strtod.is_real.return:<<MIN>>
TEST.VALUE:strtod.strtod.str:<<malloc 2>>
TEST.VALUE:strtod.strtod.str:" "
TEST.VALUE:strtod.strtod.endptr:<<null>>
TEST.EXPECTED:strtod.strtod.return:0.0
TEST.END
-- Test Case: strtod4
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod4
TEST.BASIS_PATH:4 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 4
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> FALSE
(15) if (n < 0) ==> FALSE
(16) while n ==> FALSE
(19) if (!is_real(number)) ==> FALSE
(20) if endptr ==> TRUE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.STUB:strtod.is_real
TEST.VALUE:strtod.is_real.return:<<MIN>>
TEST.VALUE:strtod.strtod.str:<<malloc 1>>
TEST.VALUE:strtod.strtod.endptr:<<malloc 1>>
TEST.EXPECTED:strtod.strtod.return:0.0
TEST.END
-- Test Case: strtod5
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod5
TEST.BASIS_PATH:5 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 5
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> FALSE
(15) if (n < 0) ==> FALSE
(16) while n ==> FALSE
(19) if (!is_real(number)) ==> TRUE
(20) if endptr ==> FALSE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.STUB:strtod.is_real
TEST.VALUE:strtod.is_real.return:0
TEST.VALUE:strtod.strtod.str:<<malloc 1>>
TEST.VALUE:strtod.strtod.endptr:<<null>>
TEST.END
-- Test Case: strtod6
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod6
TEST.BASIS_PATH:6 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 6
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> FALSE
(15) if (n < 0) ==> FALSE
(16) while n ==> TRUE
(17) if (n & 1) ==> FALSE
(19) if (!is_real(number)) ==> FALSE
(20) if endptr ==> FALSE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
Cannot set exponent due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.STUB:strtod.is_real
TEST.VALUE:strtod.is_real.return:<<MIN>>
TEST.VALUE:strtod.strtod.str:<<malloc 1>>
TEST.VALUE:strtod.strtod.endptr:<<null>>
TEST.EXPECTED:strtod.strtod.return:0.0
TEST.END
-- Test Case: strtod7
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod7
TEST.BASIS_PATH:7 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 7
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> FALSE
(15) if (n < 0) ==> FALSE
(16) while n ==> TRUE
(17) if (n & 1) ==> TRUE
(18) if (exponent < 0) ==> FALSE
(19) if (!is_real(number)) ==> FALSE
(20) if endptr ==> FALSE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
Cannot set exponent due to assignment
Cannot set exponent due to assignment
Cannot set exponent due to assignment
TEST.END_NOTES:
TEST.STUB:strtod.is_real
TEST.VALUE:strtod.is_real.return:<<MIN>>
TEST.VALUE:strtod.strtod.str:<<malloc 1>>
TEST.VALUE:strtod.strtod.endptr:<<null>>
TEST.EXPECTED:strtod.strtod.return:0.0
TEST.END
-- Test Case: strtod8
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod8
TEST.BASIS_PATH:8 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 8
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> FALSE
(15) if (n < 0) ==> FALSE
(16) while n ==> TRUE
(17) if (n & 1) ==> TRUE
(18) if (exponent < 0) ==> TRUE
(19) if (!is_real(number)) ==> FALSE
(20) if endptr ==> FALSE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
Cannot set exponent due to assignment
Cannot set exponent due to assignment
Cannot set exponent due to assignment
Cannot set p10 due to assignment
TEST.END_NOTES:
TEST.STUB:strtod.is_real
TEST.VALUE:strtod.is_real.return:<<MIN>>
TEST.VALUE:strtod.strtod.str:<<malloc 1>>
TEST.VALUE:strtod.strtod.endptr:<<null>>
TEST.EXPECTED:strtod.strtod.return:0.0
TEST.END
-- Test Case: strtod9
TEST.UNIT:strtod
TEST.SUBPROGRAM:strtod
TEST.NEW
TEST.NAME:strtod9
TEST.BASIS_PATH:9 of 19
TEST.NOTES:
This is an automatically generated test case.
Test Path 9
(1) while (((((*p == 32 || *p == 9) || *p == 10) || *p == 13) || *p == 12) || *p == 11) ==> FALSE
(3) case (*p) ==> 43
(4) while (*p >= 48 && *p <= 57) ==> FALSE
(5) if (*p == 46) ==> FALSE
(7) if (num_digits == 0) ==> FALSE
(8) if negative ==> FALSE
(9) if (*p == 101 || *p == 69) ==> FALSE
(14) if (exponent < -1021 || exponent > 1024) ==> FALSE
(15) if (n < 0) ==> TRUE
(16) while n ==> FALSE
(19) if (!is_real(number)) ==> FALSE
(20) if endptr ==> FALSE
Test Case Generation Notes:
Cannot set local variable p in branch 4
Cannot set p due to assignment
Cannot set local variable p in branch 5
Cannot set num_digits due to assignment
Cannot set negative due to assignment
Cannot set p due to assignment
Cannot set local variable p in branch 9
Cannot set exponent due to assignment
Cannot set n due to assignment
TEST.END_NOTES:
TEST.STUB:strtod.is_real
TEST.VALUE:strtod.is_real.return:<<MIN>>
TEST.VALUE:strtod.strtod.str:<<malloc 14>>
TEST.VALUE:strtod.strtod.str:" 12345.6789"
TEST.VALUE:strtod.strtod.endptr:<<null>>
TEST.EXPECTED:strtod.strtod.return:12345.7
TEST.END
|
510237f7ddf4e3865be93bc3239dd7c812d46746 | 4a1effb7ec08302914dbd9c5e560c61936c1bb99 | /Project 2/Experiments/GFS-GCCL-C/results/GFS-GCCL-C.vowel-10-1tra/result2s0.tst | 5bc2dba4d9d266ea3ae0f49d32a4bdf15cf51486 | [] | 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 | 969 | tst | result2s0.tst | @relation vowel
@attribute TT integer[0,1]
@attribute SpeakerNumber integer[0,14]
@attribute Sex integer[0,1]
@attribute F0 real[-5.211,-0.941]
@attribute F1 real[-1.274,5.074]
@attribute F2 real[-2.487,1.431]
@attribute F3 real[-1.409,2.377]
@attribute F4 real[-2.127,1.831]
@attribute F5 real[-0.836,2.327]
@attribute F6 real[-1.537,1.403]
@attribute F7 real[-1.293,2.039]
@attribute F8 real[-1.613,1.309]
@attribute F9 real[-1.68,1.396]
@attribute Class{0,1,2,3,4,5,6,7,8,9,10}
@inputs TT,SpeakerNumber,Sex,F0,F1,F2,F3,F4,F5,F6,F7,F8,F9
@outputs Class
@data
1 1
7 7
5 7
10 0
6 7
9 9
6 6
0 0
5 3
8 7
4 3
3 3
5 3
0 0
9 9
10 3
5 3
10 2
6 6
1 1
4 4
5 4
10 1
3 3
0 0
8 8
6 6
8 7
3 3
0 0
7 7
3 3
4 4
4 4
7 7
3 3
4 4
10 3
6 7
1 1
2 3
10 10
1 1
1 9
5 8
7 7
9 9
2 0
9 9
6 7
7 7
3 2
5 3
8 7
1 0
3 3
7 7
4 3
7 7
8 8
2 2
4 3
2 2
7 7
9 9
4 6
9 9
8 8
2 2
2 2
10 8
0 0
9 9
10 10
7 8
5 3
6 6
1 1
3 3
10 3
0 0
8 7
6 6
6 6
0 9
3 3
4 6
9 0
1 1
9 0
8 1
5 6
0 0
2 2
2 3
0 0
1 0
2 3
8 8
|
f6093e1b8c05a1337417bdbbda8efbb77f361157 | 449d555969bfd7befe906877abab098c6e63a0e8 | /905/CH2/EX2.8/2_8.sce | f92feb2715f66ccc68bc18e881b5c337cdc6ca4e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,713 | sce | 2_8.sce | clear;
clc;
// Illustration 2.8
// Page: 120
printf('Illustration 2.8 - Page: 120\n\n');
// solution
//*****Data*****//
// a-liquid benzene b-nitrogen
T = 300; // [K]
l = 3; // [length of vertical plate, m]
b = 1.5; // [width of vertical plate, m]
P = 101.3; // [kPa]
v = 5; // [velocity across the width of plate, m/s]
row_a = 0.88; // [gram/cubic cm]
//*****//
y_a1 = 0.139; // [mole fraction of benzene at inner edge]
y_a2 = 0;
// The film conditions, and average properties, are identical to those in Example 2.7, only the geometry is different
// Therefore
M_avg = 31.4; // [kg/kmole]
row = 1.2; // [kg/cubic m]
u = 161*10^-7; // [kg/m.s]
D_ab = 0.0986; // [square cm/s]
Sc = 1.3; // [Schmidt Number]
Re = row*v*b/u; // [Renoylds Number]
if(Re>4000)
printf('The flow across the plate is turbulent\n\n');
else(Re<2000)
printf('The flow across the plate is laminar\n\n');
end
// Using equation 2.57
Sh_l = 0.036*Re^0.8*Sc^(1/3);
// Nitrogen (component B) does not react with benzene (component A), neither dissolves in the liquid; therefore, NB = 0 and siA = 1. The F-form of the mass-transfer coefficient should be used
F = Sh_l*1.26*D_ab*10^-4/(M_avg*b); // [kmole/square m.s]
N_a = F*log((1-y_a2)/(1-y_a1)); // [kmole/square m.s]
// The total mass rate of evaporation over the surface of the plate
S = 1.5*3; // [square m]
M_a = 78.1; // [gram/mole]
wa = N_a*S*M_a*60*1000; // [gram/min]
V = wa/row_a; // [volumetric flow rate, ml/min]
printf("Liquid benzene should be supplied at the top of the plate at the rate %f ml/min so that evaporation will just prevent it from reaching the bottom of the plate.\n\n",V); |
ff7423d976e333f380bc8f15ae8c5a9adba31785 | 527c41bcbfe7e4743e0e8897b058eaaf206558c7 | /Positive_Negative_test/Netezza-Base-DateFunctions/FLDateDiff-NZ-01.tst | 414d55b8c2a309dd418e1633307cb24029302f9f | [] | no_license | kamleshm/intern_fuzzy | c2dd079bf08bede6bca79af898036d7a538ab4e2 | aaef3c9dc9edf3759ef0b981597746d411d05d34 | refs/heads/master | 2021-01-23T06:25:46.162332 | 2017-07-12T07:12:25 | 2017-07-12T07:12:25 | 93,021,923 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 6,319 | tst | FLDateDiff-NZ-01.tst | -- Fuzzy Logix, LLC: Functional Testing Script for DB Lytix functions on Netezza
--
-- Copyright (c): 2014 Fuzzy Logix, LLC
--
-- NOTICE: All information contained herein is, and remains the property of Fuzzy Logix, LLC.
-- The intellectual and technical concepts contained herein are proprietary to Fuzzy Logix, LLC.
-- and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
-- secret or copyright law. Dissemination of this information or reproduction of this material is
-- strictly forbidden unless prior written permission is obtained from Fuzzy Logix, LLC.
-- Functional Test Specifications:
--
-- Test Category: Date Functions
--
-- Test Unit Number: FLDateDiff-Netezza-01
--
-- Name(s): FLDateDiff
--
-- Description: Scalar function which calculates the difference between 2 DATE variables
--
-- Applications:
--
-- Signature: FLDateDiff(pDatePartInd VARCHAR, pStartDate DATE, pEndDate DATE)
--
-- Parameters: See Documentation
--
-- Return value: INTEGER
--
-- Last Updated: 11-24-2014
--
-- Author: Surya Deepak Garimella
--
-- BEGIN: TEST SCRIPT
--.run file=../PulsarLogOn.sql
--.set width 2500
--set session dateform = ANSIDATE;
--SELECT COUNT(*) AS CNT,
-- CASE WHEN CNT = 0 THEN ' Please Load Test Data!!! ' ELSE ' Test Data Loaded ' END AS TestOutcome
--FROM tblTestDate a;
-- BEGIN: POSITIVE TEST(s)
---- Positive Test 1: Manual Example
--- Same Output, Good
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('yy',a.DateIN1, a.DateIN2) AS DateDiffYear,
FLDateDiff('qq',a.DateIN1, a.DateIN2) AS DateDiffQuarter,
FLDateDiff('mm',a.DateIN1, a.DateIN2) AS DateDiffMonth,
FLDateDiff('dd',a.DateIN1, a.DateIN2) AS DateDiffDay
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('wk',a.DateIN1, a.DateIN2) AS DateDiffWeek
FROM tblTestDate a
ORDER BY 1;
---- Positive Test 2: Test for alternative DatePartInd Argument Input
-------- P3a
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('yyyy',a.DateIN1, a.DateIN2) AS DateDiffYear,
FLDateDiff('q',a.DateIN1, a.DateIN2) AS DateDiffQuarter,
FLDateDiff('m',a.DateIN1, a.DateIN2) AS DateDiffMonth,
FLDateDiff('d',a.DateIN1, a.DateIN2) AS DateDiffDay
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('ww',a.DateIN1, a.DateIN2) AS DateDiffWeek
FROM tblTestDate a
ORDER BY 1;
--------- P2b
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('year',a.DateIN1, a.DateIN2) AS DateDiffYear,
FLDateDiff('quarter',a.DateIN1, a.DateIN2) AS DateDiffQuarter,
FLDateDiff('month',a.DateIN1, a.DateIN2) AS DateDiffMonth,
FLDateDiff('day',a.DateIN1, a.DateIN2) AS DateDiffDay
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('week',a.DateIN1, a.DateIN2) AS DateDiffWeek
FROM tblTestDate a
ORDER BY 1;
---- Positive Test 3: Test for Lower bound of Start Date
SELECT a.ObsID,
DATE '0001-01-01' AS DateINLower,
a.DateIN2,
FLDateDiff('yy', DateINLower, a.DateIN2) AS DateDiffYear,
FLDateDiff('qq', DateINLower, a.DateIN2) AS DateDiffQuarter,
FLDateDiff('mm', DateINLower, a.DateIN2) AS DateDiffMonth,
FLDateDiff('dd', DateINLower, a.DateIN2) AS DateDiffDay
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID,
DATE '0001-01-01' AS DateINLower,
a.DateIN2,
FLDateDiff('wk', DateINLower, a.DateIN2) AS DateDiffWeek
FROM tblTestDate a
ORDER BY 1;
---- Positive Test 4: Test for Upper bound of Start Date
SELECT a.ObsID,
DATE '9999-12-31' AS DateINUpper,
a.DateIN2,
FLDateDiff('yy', DateINUpper, a.DateIN2) AS DateDiffYear,
FLDateDiff('qq', DateINUpper, a.DateIN2) AS DateDiffQuarter,
FLDateDiff('mm', DateINUpper, a.DateIN2) AS DateDiffMonth,
FLDateDiff('dd', DateINUpper, a.DateIN2) AS DateDiffDay
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID,
DATE '9999-12-31' AS DateINUpper,
a.DateIN2,
FLDateDiff('wk', DateINUpper, a.DateIN2) AS DateDiffWeek
FROM tblTestDate a
ORDER BY 1;
---- Positive Test 5: Test for Lower bound of End Date
SELECT a.ObsID,
DateIN1,
DATE '0001-01-01' AS DateINLower,
FLDateDiff('yy', a.DateIN1, DateINLower) AS DateDiffYear,
FLDateDiff('qq', a.DateIN1, DateINLower) AS DateDiffQuarter,
FLDateDiff('mm', a.DateIN1, DateINLower) AS DateDiffMonth,
FLDateDiff('dd', a.DateIN1, DateINLower) AS DateDiffDay
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID,
DateIN1,
DATE '0001-01-01' AS DateINLower,
FLDateDiff('wk', a.DateIN1, DateINLower) AS DateDiffWeek
FROM tblTestDate a
ORDER BY 1;
---- Positive Test 6: Test for Upper bound of End Date
SELECT a.ObsID,
DateIN1,
DATE '9999-12-31' AS DateINUpper,
FLDateDiff('yy', a.DateIN1, DateINUpper) AS DateDiffYear,
FLDateDiff('qq', a.DateIN1, DateINUpper) AS DateDiffQuarter,
FLDateDiff('mm', a.DateIN1, DateINUpper) AS DateDiffMonth,
FLDateDiff('dd', a.DateIN1, DateINUpper) AS DateDiffDay
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID,
DateIN1,
DATE '9999-12-31' AS DateINUpper,
FLDateDiff('wk', a.DateIN1, DateINUpper) AS DateDiffWeek
FROM tblTestDate a
ORDER BY 1;
-- END: POSITIVE TEST(s)
-- BEGIN: NEGATIVE TEST(s)
---- Negative Test 1: Invalid Input For Date Part Indicator
--- Return expected error msg, Good
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('gg',a.DateIN1, a.DateIN2) AS DateDiffYear
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff(NULL,a.DateIN1, a.DateIN2) AS DateDiffYear
FROM tblTestDate a
ORDER BY 1;
---- Negative Test 2: Invalid Date Input
--- Return expected error msg, Good
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('yy',NULL, a.DateIN2) AS DateDiffYear
FROM tblTestDate a
ORDER BY 1;
SELECT a.ObsID, a.DateIN1, a.DateIN2,
FLDateDiff('yy',a.DateIN1, NULL) AS DateDiffYear
FROM tblTestDate a
ORDER BY 1;
SELECT FLDateDiff('yy','2010', '2009') AS DateDiffYear;
-- END: NEGATIVE TEST(s)
-- END: TEST SCRIPT
|
e084fa72ac937c7cd539e8e3b601a6fa194caf34 | 449d555969bfd7befe906877abab098c6e63a0e8 | /405/CH10/EX10.1/10_1.sce | da627fc850e2ac24d19c694fa0da78f52fa23a35 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 3,045 | sce | 10_1.sce | clear;
clc;
printf("\t\t\tExample Number 10.1\n\n\n");
// overall heat transfer coefficient for pipe in air
// Example 10.1 (page no.-520-522)
// solution
Tw = 98;// [degree celsius] temperature of hot water
k_p = 54;// [W/m degree celsius] heat transfer coefficient of pipe
Ta = 20;// [degree celsius] atmospheric air temperature
u = 0.25;// [m/s] water velocity
// from appendix A the dimensions of 2-in schedule 40 pipe are
ID = 0.0525;// [m]
OD = 0.06033;// [m]
// the properties of water at 98 degree celsius are
rho = 960;// [kg/cubic meter]
mu = 2.82*10^(-4);// [kg/m s]
k_w = 0.68;// [W/m degree celsius]
Pr = 1.76;// prandtl number
// the reynolds number is
Re = rho*u*ID/mu;
// and since turbulent flow is encountered, we may use equation(6-4):
Nu = 0.023*Re^(0.8)*Pr^(0.4);
hi = Nu*k_w/ID;// [W/square meter degree celsius]
// for unit length of pipe the thermal resistance of the steel is
Rs = log(OD/ID)/(2*%pi*k_p);
// again, on a unit length basis the thermal resistance on the inside is
Ai = %pi*ID;// [square meter]
Ri = 1/(hi*Ai);
Ao = %pi*OD;// [square meter]
// the thermal resistance for outer surface is as yet unknown but is written, for unit lengths, is Ro = 1/(ho*Ao) (a)
// from table 7-2(page no.-339), for laminar flow, the simplified relation for ho is
// ho = 1.32*(dT/d)^(1/4) = 1.32*((To-Ta)/OD)^(1/4) (b)
// where To is the unknown outside pipe surface temperature. we designate the inner pipe surface as Ti and the water temperature as Tw; then the energy balance requires
// (Tw-Ti)/Ri = (Ti-To)/Rs = (To-Ta)/Ro (c)
// combining equations (a) and (b) gives
// (To-Ta)/Ro = %pi*OD*1.32*(To-Ta)^(5/4)/OD^(1/4)
// this relation may be introduced into equation (c) to yield two equations with the two unknowns Ti and To:
// (Tw-Ti)/Ri = (Ti-To)/Rs (1)
// (Ti-To)/Rs = %pi*OD*1.32*(To-Ta)^(5/4)/OD^(1/4) (2)
// this is a non-linear equation which can be solved as
for Ti = 50:0.001:100
Q = ((Ti-(Ti-(Tw-Ti)*(Rs/Ri)))/Rs)-(%pi*OD*1.32*((Ti-(Tw-Ti)*(Rs/Ri))-Ta)^(5/4)/OD^(1/4));
if Q>0 & Q<6 then
Tinew = Ti;
else
Ti = Ti;
end
end
Ti = Tinew;// [degree celsius]
To = (Ti-(Tw-Ti)*(Rs/Ri));// [Degree celsius]
// as a result, the outside heat transfer coefficient and thermal resistance are
ho = 1.32*((To-Ta)/OD)^(1/4);// [W/square meter degree celsius]
Ro = 1/(OD*7.91*%pi);//
// the overall heat transfer coefficient based on the outer area is written in terms of these resistances as
Uo = 1/(Ao*(Ri+Ro+Rs));// [W/area degree celsius]
// in this calculation we used the outside area for 1.0 m length as Ao
// so
Uo = Uo;// [W/square meter degree celsius]
printf("overall heat transfer coefficient is %f W/square meter degree celsius",Uo);
|
25adbccbafb61558d95b3f3164b1cfe16342af27 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1616/CH2/EX2.14/ex2_14.sce | debec0db2a61d225bc385b07b338feee65b7217c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 364 | sce | ex2_14.sce | //ex2.14 find the power delivered to the load and the peak voltage at the load-end of the line
ZL=50;
Z0=50+%i*50;
Tl=(ZL-Z0)/(ZL+Z0);
VSWR=(1+abs(Tl))/(1-abs(Tl));
disp('VSWR = '+string(VSWR));
vmax=50;
PL=0.5*vmax^2/(VSWR*real(Z0));
RL=50;
VL=sqrt(PL*RL*2);
disp('Peak voltage at the load = '+string(VL)+' V','Power delivered to the load = '+string(PL)+' W');
|
0b2425f07bb6583ffd249f3d557566e6a9b5b353 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2744/CH13/EX13.5/Ex13_5.sce | fec832e960b705e16410564a904299f913ad4eb4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 423 | sce | Ex13_5.sce | clear;
clc;
l = 20;//feet
W = 500;// lb per foot run
c = 750;// lb/in^2
t = 18000;// lb/in^2
m = 15;
BM_max = W*l*l*12/8 ;// lb-inches
//by making the effective deapth d twice the width b
d = (BM_max/(126*0.5))^(1/3);//inches
b = 0.5*d;//inches
//necessary reinforcement is 0.8% of concrete section
A_t = 0.008*b*d;// in^2
printf('d = %.2f inches\n b = %.2f inches',d,b);
printf('\n A_t = %.3f in^2',A_t);
|
cf9b4d89d25ec2c2374200a102a2cf9f824cc7d7 | e5c2d718a529b6eb6ccc1629b8488662a8378b9d | /fluencyB_.sce | d39129a93525e34d4a20cea91ec40179047fd12f | [] | no_license | jangwoopark/presentation-language | be726563f36339ed2de4bab80d5780028810b595 | 54cc897d5ef8cc2a6098bdcb8c494f55e0919cb4 | refs/heads/master | 2020-11-30T04:56:31.512999 | 2017-09-11T01:47:33 | 2017-09-11T01:47:33 | 96,718,835 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,939 | sce | fluencyB_.sce | # fluencyB TR=3 62 reps 186seconds 5cycles 2 disdaqs
#onsets: naming 0 12 24 36 48 lines 6 18 30 42 54
#durations: 6 on, 6 off high pass= 72
scenario = "category fluency form B";
scenario_type = fMRI_emulation;
pulses_per_scan = 36;
scan_period=3000;
#scenario_type = fMRI;
pulse_code=10;
sequence_interrupt=false;
#active_buttons = 4;
#button_codes=1,2,3,4;
default_deltat = 0;
default_picture_duration = 9000;
default_font="times";
default_font_size=60;
default_text_color=0,0,90;
default_background_color=80,240,40;
begin;
#defining the stimuli
picture {} default; #blank screen
picture {text {caption = "Instruments" ;};x=0; y=0; }instruments;
picture {text {caption = "Tools" ;};x=0; y=0; }tools;
picture {text {caption = "Furniture" ;};x=0; y=0; }furniture;
picture {text {caption = "Colors" ;};x=0; y=0; }colors;
picture {text {caption = "TV shows" ;};x=0; y=0; }TV;
picture {text {caption = "Clothes" ;};x=0; y=0; }clothes;
picture {text {caption = "Jobs" ;};x=0; y=0; }jobs;
picture {text {caption = "Famous people" ;};x=0; y=0; }famous;
picture {text {caption = "Foods" ;};x=0; y=0; }food;
picture {text {caption = "Drinks" ;};x=0; y=0; }drinks;
picture {text {caption = "RELAX" ;};x=0; y=0; }relax;
picture {text {caption = "think of words
in the category ..." ;}; x=0; y=0; } inst;
#presenting the stimuli
trial {
picture inst; mri_pulse=1; time=0; duration=6000;
picture drinks; mri_pulse=3;
picture famous; mri_pulse=6;
picture relax; mri_pulse=9; duration = 18000;
picture jobs; mri_pulse=15;
picture TV; mri_pulse=18;
picture relax; mri_pulse=21; duration = 18000;
picture food; mri_pulse=27;
picture colors; mri_pulse=30;
picture relax; mri_pulse=33; duration = 18000;
picture instruments; mri_pulse=39;
picture tools; mri_pulse=42;
picture relax; mri_pulse=45; duration = 18000;
picture furniture; mri_pulse=51;
picture clothes; mri_pulse=54;
picture relax; mri_pulse=57; duration = 18000;
};
|
5b84ea9bbf627bb084cf22a25473fcc36a01e23a | 449d555969bfd7befe906877abab098c6e63a0e8 | /746/DEPENDENCIES/3_01.sci | 903102918d2144fe0134beeb6fea12d586b0215d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 326 | sci | 3_01.sci | //Surface tension of water(in mN/m):
STw=72.8*10^-3;
//Surface Tension of mercury(in mN/m):
STm=375*10^-3;
//Contact angle for water:
thetaw=0;
//COntact angle for mercury:
thetam=140;
//Density of water(in kg/m^3):
dw=1;
//Density of mercury(in kg/m^3):
dm=13.6;
//Acceleration de to gravity(in m/sec):
g=9.81;
|
ced77e49ac0588b33d096cc2f7d3aaaf120ae155 | 449d555969bfd7befe906877abab098c6e63a0e8 | /446/CH2/EX2.16/2_16.sce | 06aede701cfd83950b568349df46dba1e3740ca3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 686 | sce | 2_16.sce | clear
clc
disp('Exa-2.16');
K=325; mkc2=498; //kinetic energy and rest mass energy of kaons
mpic=140; //given value
Ek=K+mkc2;
pkc=sqrt(Ek^2-mkc2^2);
//consider the law of conservation of energy which yields Ek=sqrt(p1c^2+mpic^2)+sqrt(p2c^2+mpic^2)
// The above equations (4th degree,hence no direct methods)can be solved by assuming the value of p2c=0.
p1c=sqrt(Ek^2-(2*mpic*Ek));
//consider the law of conservation of momentum. which gives p1c+p2c=pkc implies
p2c=pkc-p1c;
k1=(sqrt(p1c^2+(mpic^2))-mpic); //corresponding kinetic energies
k2=(sqrt((p2c^2)+(mpic^2))-mpic);
printf('The corresponding kinetic energies of the pions are %.0f MeV and %.1f MeV.',k1,k2); |
a6d126ecead941550d5a31933a5980d9519cfa77 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/tests/examples/equil.man.tst | d1ef6851f9507236d8d6bde25afadd6c28901062 | [
"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 | 107 | tst | equil.man.tst | clear;lines(0);
P=rand(4,4);P=P*P';
Q=rand(4,4);Q=Q*Q';
T=equil(P,Q)
clean(T*P*T')
clean(inv(T)'*Q*inv(T))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.