blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
214
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
50
| license_type
stringclasses 2
values | repo_name
stringlengths 6
115
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 21
values | visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 141k
586M
⌀ | star_events_count
int64 0
30.4k
| fork_events_count
int64 0
9.67k
| gha_license_id
stringclasses 8
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 50
values | src_encoding
stringclasses 23
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 1
class | length_bytes
int64 5
10.4M
| extension
stringclasses 29
values | filename
stringlengths 2
96
| content
stringlengths 5
10.4M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
763d71099b307961f4b85680dd8be89ee69c2760
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3885/CH6/EX6.5/Ex6_5.sci
|
caff6d671fbd35cdf2fe77537734e295174a8afb
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,419
|
sci
|
Ex6_5.sci
|
//control systems by Nagoor Kani A
//Edition 3
//Year of publication 2015
//Scilab version 6.0.0
//operating systems windows 10
// Example 6.5
clc;
clear;
s=poly(0,'s')
//calculation of gain K
//given for ramp input ess(steady state error ) is 1/15
ess=1/15
kv=1/ess
// open loop transfer function G(s)=K/s*(s+1)
//by definition of velocity error constant applying limit s=0 in G(s)
disp('the value of K is 15;')
h=syslin('c',15/(s*(s+1)))
bode(h)
show_margins(h)
xtitle("uncompensated system")
//from the plot the phase margin of uncompensated system is 13
//but the system requires phase margin of 45 so lead compensation required
pm=45//choose PM of compensated system is 45 degree
phim=37//maximum lead angle
alpha=(1-(sind(phim)))/(1+(sind(phim)))
disp(alpha,'the vale of alpha is')
wmdb=-20*log(1/sqrt(alpha))////db magnitude
wm=5.6//from the bode plot of uncompensated system the frequency wm corrosponding to db gain of -6db is 5.6rad/sec
t=1/(wm*sqrt(alpha))
disp(t,'the value of t is')
//transfer function of lead compensator is (s+1/t)/(s+1/alpha*t)
hc=syslin('c',(0.25*(1+0.36*s))/(1+0.09*s))
disp(hc,' transfer function of lead compensator is')
//open loop transfer function of compensated system is h*hc
hcmp=syslin('c',h*hc)
disp(hcmp,'open loop transfer function of compensated system is ')
figure()
bode(hcmp)
show_margins(hcmp)
xtitle("compensated system")
|
cf8800d4e370d146c557a5aa08fd291a62493465
|
7c1f9cb43fe4f0583ce300f8d8136f76a38e71a1
|
/src/test_server_1_a.tst
|
21b85ce1a0d8b2faac3f353af4a8ccda26b105f7
|
[
"OML",
"BSD-3-Clause",
"Zlib",
"MIT"
] |
permissive
|
Aloz1/ciyam
|
4a1123c6a6009f0fbc2a80ac7a81a3b7acb72bf5
|
424b47fd73fa1f6a1a076f8908ae7086eeeeedc5
|
refs/heads/master
| 2021-01-18T03:01:14.018660
| 2018-01-03T16:39:56
| 2018-01-03T16:39:56
| 7,141,120
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,973
|
tst
|
test_server_1_a.tst
|
> version
0.1
> session_list -min
1* session_list <none> <unknown> 0:0 0:0
> encrypt -no_ssl -no_salt for_testing_password
Zm9yX3Rlc3RpbmdfcGFzc3dvcmQ=
>
>
>
> X
> X.
> .X
> X
> X.
> .X
> XY
> XY.
> .XY
> X.Y.
> XY
> .XY
> XY.
> X.Y.
> XYZ
> XYZ.
> .XYZ.
> X.Y.Z.
> XYZ
> XYZ.
> .XYZ.
> X.Y.Z.
> crypto_keys XBT test
1Hri98tpTekszQQTBnKbBrMsecrjik4PX8
02b0dbb9b8c580f2cc7b45aaf10d8353cea7880903e1f07ce996614260c55db4a1
0f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
>
>
>
> addr is: 1Hri98tpTekszQQTBnKbBrMsecrjik4PX8
> pubkey is 02b0dbb9b8c580f2cc7b45aaf10d8353cea7880903e1f07ce996614260c55db4a1
> privkey is 0f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
>
> abcdefghi
>
> defghi
>
> abcdef
>
> def
>
> abc<def>ghi
>
> def
>
>
> ff00000000000000
>
> 00000000000000ff
>
> ff000000
>
> 000000ff
>
> 4080
>
> 4100
>
> 4000
>
> 1
>
> ifdef true
>
>
>
>
>
>
>
> ifdef false
>
>
> 1234567890
>
> 31323334353637383930
>
> 1234567890
>
> c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646
> utc_to_local AEST "2013-10-05 15:00"
2013-10-06 01:00 AEST
> utc_to_local AEST+ "2013-10-05 15:00"
2013-10-06 01:00 AEST
> utc_from_local AEST "2013-10-06 01:00"
2013-10-05 15:00
> utc_to_local AEST "2013-10-06 16:00"
2013-10-07 02:00 AEST
> utc_to_local AEST+ "2013-10-06 16:00"
2013-10-07 03:00 AEDT
> utc_from_local AEST "2013-10-07 03:00"
2013-10-06 17:00
> utc_from_local AEDT "2013-10-07 03:00"
2013-10-06 16:00
> utc_to_local AEST "2014-04-05 15:00"
2014-04-06 01:00 AEST
> utc_to_local AEST+ "2014-04-05 15:00"
2014-04-06 02:00 AEDT
> utc_from_local AEST "2014-04-06 02:00"
2014-04-05 16:00
> utc_from_local AEDT "2014-04-06 02:00"
2014-04-05 15:00
> utc_to_local AEST "2014-04-05 16:00"
2014-04-06 02:00 AEST
> utc_to_local AEST+ "2014-04-05 16:00"
2014-04-06 02:00 AEST
> utc_from_local AEST "2014-04-06 02:00"
2014-04-05 16:00
>
|
b70e8b2bea6552683edd31512f7169d2711d04f3
|
f23e565144f1b0f63c7b613c0f549944d425a073
|
/Cours/TP_INFO/TP_noteD3/TD4-ballarinlea-merciermarielle.sci
|
78c917c731d462136072cd46f6d6d9ff18a47df4
|
[] |
no_license
|
Antoine-Gerard/Valar-Morghulis
|
c45766f03898241bd9c424256744b5ffa16dd82c
|
796363bfbc6f2e3249c90f1762e041ff5a4e705a
|
refs/heads/master
| 2021-08-31T06:06:55.296982
| 2017-12-20T13:54:33
| 2017-12-20T13:54:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,727
|
sci
|
TD4-ballarinlea-merciermarielle.sci
|
// Ballarin Léa
// Mercier Marielle
// A
ones(1, 50)*0
ones(1, 50).*10
z = 0:0.3:10
linspace(-3, 7, 50)
(2 .* ones(0,25)) .^linspace(1, 25, 25)
// B
// 1
function r = f(x)
r = (1 + x) .* sin(%pi .* x)
endfunction
x = linspace(-2, 2, 100)
y = f(x)
fenetre = figure("Figure_name", "Equation", "position", [100 50 1000 600]);
fenetre.background = color("white");
set("current_figure", fenetre);
subplot(2, 2, 1);
plot2d(x', y', style=[color("black")])
// 2
function r = g(x)
r = %pi .* x + %pi .* x^2
endfunction
x = linspace(-2, 2, 100)
y = g(x)
function r = P1(x)
r = %pi .* x
endfunction
x = linspace(-2, 2, 100)
y = P1(x)
subplot(2, 2, 1);
plot2d(x', y', style=[color("blue")])
function r = P2(x)
r = %pi .* x + %pi .* x^2
endfunction
x = linspace(-2, 2, 100)
y = P2(x)
subplot(2, 2, 1);
plot2d(x', y', style=[color("pink")])
// C
// 1
function r = G(t, y)
r = (y./t) + t .* log(t)
endfunction
u = 1
a = 1
t = linspace( 1, 4, 100)
y = ode("rk", u, a, t, G)
fenetre2 = figure ("Figure_name", "Equations", "position", [100 50 1000 600]);
fenetre2.background = color("white");
set("current_figure", fenetre2);
subplot(2, 2, 1);
plot2d(t, y, style=[color("black")])
// 2
function r = G(t, y)
r = (y./t) + t .* log(t)
endfunction
u = -2
a = 1
t = linspace( 1, 4, 100)
y = ode("rk", u, a, t, G)
fenetre3 = figure ("Figure_name", "Equations", "position", [100 50 1000 600]);
fenetre3.background = color("white");
set("current_figure", fenetre3);
subplot(2, 2, 1);
plot2d(t, y, style=[color("black")])
function r = G(t, y)
r = (y./t) + t .* log(t)
endfunction
u = 2
a = 1
t = linspace( 1, 4, 100)
y = ode("rk", u, a, t, G)
subplot(2, 2, 1);
plot2d(t, y, style=[color("black")])
|
8109d67b33bf3662973b54a36129dd112008937f
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/896/CH8/EX8.14/14.sce
|
f61569212b199c9573aff658f27286ce702bf7ee
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 287
|
sce
|
14.sce
|
clc
//Example 8.14
//Calculate the ratio of area of throat to area of a certain point
A_throat=1//in^2
A_exit=1.5//in^2
ratio_A=2.2385//dimentionless
ratio_A1=ratio_A*(A_throat/A_exit)//dimentionless
printf("the ratio of area of throat to area of a certain point is %f",ratio_A1);
|
5b684aff73c4cfb538bb74cdf7d3f2c7fd6279e6
|
01ecab2f6eeeff384acae2c4861aa9ad1b3f6861
|
/sci2blif/sci2blif_added_blocks/Matmul.sce
|
3ce52f146d012a88e902452af944155714064148
|
[] |
no_license
|
jhasler/rasp30
|
9a7c2431d56c879a18b50c2d43e487d413ceccb0
|
3612de44eaa10babd7298d2e0a7cddf4a4b761f6
|
refs/heads/master
| 2023-05-25T08:21:31.003675
| 2023-05-11T16:19:59
| 2023-05-11T16:19:59
| 62,917,238
| 3
| 3
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 340
|
sce
|
Matmul.sce
|
//**************************** Matmul **********************************
if (blk_name.entries(bl) == "Matmul") then
for ss=1:scs_m.objs(bl).model.ipar(1)
l=mgetl('/home/ubuntu/rasp30/sci2blif/sci2blif_added_blocks/b.txt');
sci2blif_str=evstr(l);
mputl(sci2blif_str,fd_w);
mputl(" ",fd_w);
end
end
|
ec3014399628ebbb4976f6bd591ee8708d84fc66
|
932d6f0f83a2eaed579be193b551589dc6674c52
|
/romana.sci
|
bbd2ab6d1323e0fd9f5932c92e0016dcbab2b26a
|
[] |
no_license
|
JossueRenteria/Raudel
|
31f69ca750031b1515034155bce6109a358ca46d
|
664c502976a9430a4215b25454d3cb38f3c810fc
|
refs/heads/master
| 2016-08-12T20:00:55.727841
| 2015-11-28T19:17:16
| 2015-11-28T19:17:16
| 47,035,904
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,085
|
sci
|
romana.sci
|
function menu()
n=1
while n<>0
n=input("Capture un numero: ")
if n<0 then
disp("La formacion no es valida.")
else
j=n
while j<>0
if j==3 then
for h=1:2
a(1,h)='*'
end
disp(a)
m(1,1)='*'
disp(m)
j=j-3
else
if j==2 then
for h=1:2
a(1,h)='*'
end
disp(a)
j=j-2
else
j=matriz(j)
end
end
end
end
end
endfunction
function n=matriz(n)
res=0
v=0
for i=1:n
res=i*i
if res<=n then
v=i
end
end
for h=1:v
for j=1:v
a(h,j)='*'
end
end
n=n-(v*v)
disp(a)
endfunction
|
60cc4eb9ba247254f2caa12f61b2b2da620a9dac
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3845/CH2/EX2.5/Ex2_5.sce
|
4ff363b5a45e757638e88d3d567c402befee934e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 442
|
sce
|
Ex2_5.sce
|
//Example 2.5
v_0=30;//Initial velocity (km/h)
v_f=0;//Final velocity (km/h)
delta_t=8;//Time period (s)
delta_v=v_f-v_0;//Change in velocity (km/h)
delta_v=delta_v*10^3/3600;//Change in velocity (m/s)
a=delta_v/delta_t;//Acceleration (m/s^2)
printf('Average acceleration = %0.2f m/s^2',a)
//Acceleration is negative as it is to the left
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|
01402bac5de48d8653b504c2dee312a1b8b83a0a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3802/CH2/EX2.14/Ex2_14.sce
|
29641811867ccc56e1a4e0bde571fd2d56b41ae7
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 452
|
sce
|
Ex2_14.sce
|
//Book Name:Fundamentals of Electrical Engineering
//Author:Rajendra Prasad
//Publisher: PHI Learning Private Limited
//Edition:Third ,2014
//Ex2_14.sce
clc;
clear;
I=5/31; //Circuit current in ampere
Vs=5; //Source voltage in volt
R1=3; //Resistance in ohm
R2=4; //Resistance in ohm
driving_point_resistance=Vs/I;
printf("\n The driving point resistance of the voltage source=%d ohm \n",driving_point_resistance)
|
cca4ec6e2c0bc5148ef240b96b23731b2e7fe925
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/599/CH6/EX6.2/example6_2.sce
|
1729d9aadd3d650067e3a657689b8cf18d0a322d
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,169
|
sce
|
example6_2.sce
|
clear;
clc;
printf("\t Example 6.2\n");
//table X*100,(kgmoisture/kg dry solid) N*100 (kg moisture evaporated /hr*m^2)
// 35 30
// 25 30
// 20 30
// 18 26.6
// 16 23.9
// 14 20.8
// 12 18
// 10 15
// 9 9.7
// 8 7
// 7 4.3
// 6.4 2.511111
Ls=262.5; //mass of bone dry solid ais the drying surface
A=262.5/8; //both upper surafce and lower surface are exposed
Nc=0.3; //in kg/m^2*hr
x2=.06; //moisture content on wet basis finally after drying
x1=.25; //moisture content on wet basis finally after drying
Xcr=0.20; //crtical moisture content
X1=x1/(1-x1); //moisture content on dry basis intially
X2=x2/(1-x2); //moisture content on dry basis finally after drying
Xbar=0.025; //equillibrium moisture
t1=Ls/(A*Nc) *(X1-Xcr); //so for constant rate period
//for falling rate period we find time graphically
p = [.20 .18 .16 .14 .12 .10 .09 .08 .07 .064];
a = [3.3 5.56 6.25 7.14 8.32 10.00 11.11 12.5 14.29 15.625];
plot(p,a,"o-");
title("Fig.6.18 Example2 1/N vs X for fallling rate period");
xlabel("X-- Moisture content, X(kg/kg)");
ylabel("Y-- 1/N, hr,m^2/kg");
Area=1.116; //area under the curve
t2=Area *Ls/A; //falling rate period we find time graphically
ttotal=t1+t2; //total time for drying
printf("\n the total time for drying the wet slab on wet basis is :%f min",ttotal);
//end
|
c169b667f967de244c474e3260facbaeca6077fc
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1871/CH4/EX4.23/Ch04Ex23.sce
|
1c2f4477ef3f11c31ffffc6357b9e625a9719c5a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,063
|
sce
|
Ch04Ex23.sce
|
// Scilab code Ex4.23 : Pg:159 (2008)
clc;clear;
a = 1; // Assume amplitude of the wave from coherent sources to be unity
D = 1; // The distance between the slits and the screen, m
d = 5e-004/2; // Half the separation between two slits, m
mu = 1.5; // The refractive index of glass plate
t = 1.5e-006; // Thickness of glass plate, m
lambda = 5000e-010; // Wavelength of light used, m
x0 = D/(2*d)*(mu - 1)*t; // The lateral shift of central fringe, m
delta = (mu - 1)*t; // Path difference created due to the introduction of the thin glass plate, m
kro_delta = 2*%pi/lambda*delta; // Phase difference, rad
a1 = a, a2 = a; // Amplitude of waves from coherent sources
I = a1^2 + a2^2 + 2*a1*a2*cos(kro_delta); // Intensity of central fringe
printf("\nThe lateral shift of central fringe = %4.2f cm", x0*100);
printf("\nThe intensity of central fringe = %d", I);
// Result
// The lateral shift of central fringe = 0.15 cm
// The intensity of central fringe = 0
// The first answer is given wrong in the textbook
|
f5a311be8967581f10bd4278355f58a06cf7c317
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3784/CH8/EX8.6/Ex8_6.sce
|
06bd87f7971abffe4a9e5cad4bf4fcf2b145bba5
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 962
|
sce
|
Ex8_6.sce
|
clc
//Variable Initialisation
Vs=6.6e+3//Supply voltage in Volts
f1=50//Supply Frequency
Ns=1000//rated motor speed
Rd=0.2//dc link inductor resistance in ohm
Xs=2.6//Reactance in ohm
P=10e+6//motor rating in Watt
pf1=1
al=150
//solution
V1=Vs/sqrt(3)
Is=P/(3*V1*pf1)
Id=Is*%pi/sqrt(6)
phi=180-al
N2=500
f2=f1*N2/Ns
Vph=V1*N2/Ns
P2=3*Vph*Is*cosd(phi)
Pd=P2*10^(-6)//Power delivered in mega watt
Vdl=3*sqrt(6)*Vph*cosd(al)/%pi
Vds=(Id*Rd)-Vdl
A=Vds*%pi/(3*sqrt(6)*V1)
as=acosd(A)
N3=600
f3=f1*N3/Ns
Vph2=V1*N3/Ns
P3=3*Vph2*Is*pf1
Ps=P3-((Id^2)*Rd)
Ps2=Ps*10^(-6)
Vdl2=3*sqrt(6)*Vph2*pf1/%pi
Vds2=(Id*Rd)-Vdl2
B=Vds2*%pi/(3*sqrt(6)*V1)
as2=acosd(B)
printf('\n\n The Power Delivered by Motor=%0.1f MWatt\n\n',Pd)
printf('\n\n The Firing angle for motoring operation=%0.1f\n\n',as)
printf('\n\n The Power supplied to source =%0.1f MWatt\n\n',Ps2)
printf('\n\n The Firing angle for regenerative braking operation=%0.1f\n\n',as2)
|
41b67375620c6253a0e20fb87ae7e09c1ba46fcb
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/135/CH2/EX2.14/EX14.sce
|
ade81eeec62c774af8abb14258d9565d7943535e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 655
|
sce
|
EX14.sce
|
// Example 2.14: (a) Change in capacitance
// (b) Change in capacitance
clc, clear
C=4e-12; // Depletion capacitance in farads
V=4; // in volts
K=C*sqrt(V); // a constant
disp("Part (a)");
V=4+0.5; // in volts
C_new=K/sqrt(V); // in farads
deltaC=C_new-C; // Change in capacitande in farads
deltaC=deltaC*1e12; // Change in capacitande in pico-farads
disp(deltaC,"Change in capacitance (pF) =");
disp("Part (b)");
V=4-0.5; // in volts
C_new=K/sqrt(V); // in farads
deltaC=C_new-C; // Change in capacitande in farads
deltaC=deltaC*1e12; // Change in capacitande in pico-farads
disp(deltaC,"Change in capacitance (pF) =");
|
a0f1c8f6e914d07cfae09555db5ded6e246459a0
|
a62e0da056102916ac0fe63d8475e3c4114f86b1
|
/set7/s_Electronic_Measurements_And_Instrumentation_P._Sharma_876.zip/Electronic_Measurements_And_Instrumentation_P._Sharma_876/CH1/EX1.5/Ex1_5.sce
|
4364c72f36073b4bf515e83ab9380a5bc90393d2
|
[] |
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
| 260
|
sce
|
Ex1_5.sce
|
errcatch(-1,"stop");mode(2);//caption:Find resolution of the meter
//Ex1.5
Rmax=100//maximum range of voltmeter(in V)
D=200//division on scale
Sd=0.5//divisions which can be read
V=Rmax/D
R=Sd*V
disp(R,'resolution of the meter is(in V)=')
exit();
|
065b90866e1e267097fb6e9469c37b0de7d64459
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1985/CH17/EX17.4/Chapter17_example4.sce
|
58805ea497ffc39a47b5f1404d6a3e9cbabff203
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 588
|
sce
|
Chapter17_example4.sce
|
clc
clear
//Input data
m=1//Mass of water collected in kg
r=0.02//Radius of bar in m
d=0.05//Distance between the thermometers in m
T1=80+273//Temperature of the thermometer 1 in K
T2=70+273//Temperature of the thermometer 2 in K
T3=30+273//Temperature of water at the inlet in K
T4=40+273//Temperature of water at the outlet in K
t=(7*60)//Time of flow in s
S=4190//Specific heat of water in J/kg.K
//Calculations
K=(m*d*(T4-T3)*S)/(3.14*r^2*t*(T1-T2))//Thermal conductivity of the metal in W/m.K
//Output
printf('Thermal conductivity of the metal is %3.2f W/m.K',K)
|
b107af58726c62779fef464a9cd506ab82bc974c
|
055c13e7618a6f6178e87646438dfd16583e0244
|
/OPtisto.sce
|
ea52f19d490c33f6f5c2491b52881723a2af06ae
|
[] |
no_license
|
Thomartin1/Stochastic-Optimisation
|
4cd3717f6fbfbc0261b7cecdd4b9d1056875ca46
|
fccb7a0138a7b3d69c92cd6328f7a68e98c77ac3
|
refs/heads/master
| 2021-07-25T18:04:22.967209
| 2017-11-02T22:00:54
| 2017-11-02T22:00:54
| 109,321,152
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,624
|
sce
|
OPtisto.sce
|
policy = [1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 1.0 1.0 1.0 1.0 0.0 -1.0 -1.0 -1.0 -1.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0];
function cost=simulation_mc(x0,policy,N)
cost=0;
for i=1:N do
x=x0;
for t=1:TF-1 do
w=W(grand(1,1,'uin',1,2));
x=x+policy(t,x)+w;
end
cost=cost+(x-xref)^2
end
cost=cost/N;
endfunction
function cost=simulation_ex(x0,policy) // Exact computation with the law of W Wa=all_w(TF-1);
cost=0;
for i=1:size(Wa,'r') do
x=x0;
for t=1:TF-1 do
x=x+policy(t,x)+Wa(i,t);
end
cost=cost+(x-xref)^2
end
cost=cost/size(Wa,'r');
endfunction
function W=all_w(n)
// generated all the possible (W_1,...,W_(TF-1)) if n==1 then
W=[-1;1]
else
Wn=all_w(n-1);
W=[-1*ones(size(Wn,'r'),1),Wn;1*ones(size(Wn,'r'),1),Wn];
end
endfunction;
function costs=simulation_dp(policy)
// evaluation by dynamic programming with fixed policy Vs=ones(TF,length(X))*%inf;
// Bellman function at time TF
Vs(TF,:)=(X-xref) .^2;
// Compute final value functions
// Loop backward over time:
for t=(TF-1):-1:1 do
for x=1:10 do
// loop on noises
EV=0;
for iw=1:size(W,"*") do
next_state=x+policy(t,x)+W(iw);
EV=EV+P(iw)*Vs(t+1,next_state);
end
Vs(t,x)=EV;
end
end
costs=Vs(1,:);
endfunction
print(simulation_dp(policy))
|
02d115074acb04625b147ae4577b7d0d21da002b
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/788/CH3/EX3.1.a/3_1_data.sci
|
5a0e5cd132b8b9d44e0e48f4128d06053bf3aed6
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 169
|
sci
|
3_1_data.sci
|
// Aim:To find work done and power deliver
// Given:
// Force excerted by the person:
F=30; //lb
// Distance moved by hand truck:
S=100; //ft
// time taken:
t=60; //s
|
0dc7ae9ee54cb9a8282773ca74dfd1906f7b934c
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1553/CH4/EX4.7/4Ex7.sce
|
62f603f0d0594a2704d5c2a31da2778d4258513e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 148
|
sce
|
4Ex7.sce
|
//Chapter 4 Ex 7
clc;
clear;
close;
expr=(((7/2)/(5/2)*(3/2))/((7/2)/((5/2)*(3/2))))/5.25;
mprintf("The value of expression is %.2f",expr);
|
493d481495078852495b769b45f48d3e0efe9948
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1076/CH13/EX13.12/13_12.sce
|
89ef99c857a10e6b87329d71c26489c91a3331a2
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 161
|
sce
|
13_12.sce
|
clear
clc
G=100
f=50
H=5
dL=50
t=.6
J = G*H*1e3;
dJ=dL*1e3*t
f2=sqrt((J-dJ)/J)*f
fd=(f-f2)/f;
mprintf("Freq deviation = %.3f percent", fd*1e2)
|
daf35801cb04ad6c8f023b43068400d0369a94ac
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/620/CH5/EX5.5/example5_5.sce
|
6eb550cab0d6a74cf0261e33098ff10794401db2
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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
|
example5_5.sce
|
disp("Part a");
r=82;
v1=9;
v2=3;
v=v1-v2;
i=v/r;
disp("the normal current (in mA) flowing in the circuit is"); disp(i*10^3);
disp("Part b");
r1=v2/i;
i1=v1/r1;
disp("the current (in mA) flowing through the resistor is"); disp(i1*10^3);
disp("Part c");
disp("select the nearest standard fuse above the normal operating current : 0.1 A");
|
8f6a5c40be0d0c551a24ea0ec0265379741f24e2
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2660/CH17/EX17.1/Ex17_1.sce
|
011abc8dbdef5306cda43c36bac82fefbdd658fc
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 153
|
sce
|
Ex17_1.sce
|
clc
d = 80 // outside diameter in mm
p = 6 // pitch diameter in mm
d = 0.5774*p // best wire size in mm
printf("\n Best wire size = %0.3f mm" , d)
|
388cd4eee59dfa6c1809aa3db0090daaabd0b617
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1523/CH4/EX4.84/ex4_84.sce
|
69b22536e4f78c980089bc64d51d2cec9a24be1e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 669
|
sce
|
ex4_84.sce
|
//AC Circuits : example 4.84 :(pg 4.67)
BW=400;
Vco=500;
R=100;
Vm=10;
V=(Vm/sqrt(2));
I0=V/R;
L=R/BW;
Q0=Vco/V;
C=(L/(Q0*R)^2);
f0=(1/(2*%pi*sqrt(L*C)));
f1=(f0-(R/(4*%pi*L)));//lower cut-off frequency
f2=(f0+(R/(4*%pi*L)));//upper cut-off frequency
printf("\nv(t)=10sinwt \nVco=5000V \nBW=400rad/s \nR=100 Ohm");
printf("\nV=%.2f V",V);
printf("\nI0=V/R=%.4f A",I0);
printf("\nBW=R/L \nL=%.2f H",L);
printf("\nQ0=Vco/V =%.2f",Q0);
printf("\nQ0=1/R*sqrt(L/C) \nC=%.e F",C);
printf("\nf0=1/2.pi.sqrt(LC)=%.2f Hz",f0);
printf("\nf1=f0-R/4.pi.L =%.2f Hz",f1);//lower cut-off frequency
printf("\nf2=f0+R/4.pi.L =%.2f Hz",f2); //upper cut-off frequency
|
333be58d0be95299766d7f7c474693ed058fc923
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2144/CH3/EX3.24/ex3_24.sce
|
2c1a4a17874d8941bb2cf509f024be718baec51a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 996
|
sce
|
ex3_24.sce
|
// Exa 3.24
clc;
clear;
close;
// Given data
C_P = 1.005;// in kJ/kg-K
C_V = 0.718;// in kJ/kg-K
R = C_P-C_V;// in kJ/kg-K
P1 = 20;//in bar
P2 = 12;// in bar
T1 = 200;//in degree C
T1 = T1 + 273;// in K
T2 = 125;//in degree c
T2 = T2 + 273;// in K
V1 = (R*10^3*T1)/(P1*10^5);// in m^3
V2 = (R*10^3*T2)/(P2*10^5);// in m^3
W = 10^5 * integrate('-293*V + 40','V',0.0679,0.0952);//in Joules
W = round(W * 10^-3);// in kJ
disp(W,"Work done in kJ is");
m = 1;// in kg
del_U = m*C_V*(T2-T1);//change in internal energy in kJ
disp(del_U,"Change in internal energy in kJ is");
disp("Negative sign indicates that there is decrease in internal energy of the gas. ")
C_Enthalpy = m*C_P*(T2-T1);//change in enthalpy in kJ
disp(C_Enthalpy,"The change in enthalpy in kJ is :")
disp("Negative sign indicates that there is decrease in enthalpy of the gas")
Q = W+ del_U;// in kJ
disp(Q,"Heat transfer in kJ is");
disp("Negative sign indicates that the heat is rejected by the air")
|
c8bc941d7e56309f0fbc3b427883f8d427718947
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2384/CH9/EX9.2/ex9_2.sce
|
5adca13149b5f88ed4d2411d5cc8d49b41450b68
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 308
|
sce
|
ex9_2.sce
|
// Exa 9.2
clc;
clear;
close;
format('v',5)
// Given data
E1 = 3000;// in V
E2 = 200;// in V
f = 50;// in Hz
a = 150;// in cm^2
N2 = 80;// turns
//Formula E2 = 4.44*phi_m*f*N2;
phi_m = E2/(4.44*f*N2);// in Wb
Bm = phi_m/(a*10^-4);// in Wb/m^2
disp(Bm,"The maximum flux density in Wb/m^2 is");
|
cfac2844ff1a481bff1fa305576d4580ab3bc62e
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3768/CH3/EX3.10/Ex3_10.sce
|
4b3c2c2efa4be0751d4544eceafee490410690b6
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 468
|
sce
|
Ex3_10.sce
|
//Example number 3.10, Page number 49
clc;clear;
close;
//Variable declaration
r=0.1278*10**-9; //atomic radius(m)
h1=1;
k1=1;
l1=1;
h2=3;
k2=2;
l2=1;
//Calculation
a=2*sqrt(2)*r;
d111=a*10**10/sqrt(h1**2+k1**2+l1**2); //interplanar spacing for (111)
d321=a*10**10/sqrt(h2**2+k2**2+l2**2); //interplanar spacing for (321)
//Result
printf("interplanar spacing for (111) is %.3f Angstrom",d111)
printf("\n interplanar spacing for (321) is %.3f Angstrom",d321)
|
e4ad05333475b42fe1cf24f01b4df9caab05c58a
|
a56536320fd14b35e21c2b9997d8aac037da6124
|
/FOCAC/FOCAC.sce
|
2e15884a7910c088d2edeeaa151cd93fe43dd9ce
|
[] |
no_license
|
HigorKolecha/OtimizacaoDeRedes
|
97869a5d4593b2e765304a23edcb4e825883eacb
|
f0057b6a4d9c1f00734fecdf9ea5b4a859abf433
|
refs/heads/master
| 2023-05-12T12:11:43.074997
| 2021-06-04T23:44:25
| 2021-06-04T23:44:25
| 369,598,892
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 15,662
|
sce
|
FOCAC.sce
|
//-----------------------------------------------
// Algorítimo FOCA responsável pela otimização na
// corrente injetada na rede distribuição com op-
// ção de manobra e controle de tensão.
// Projeto de Pesquisa FAPESP.
// Projeto número: #2019/24128-2.
// @date 01/07/2020.
// @author Higor de Paula Kolecha.
// @author Adolfo Blengini Neto.
// @author Marcius Fabius Henriques de Carvalho.
// @version 1.0
//-----------------------------------------------
// Responsável pela limpeza toda memória.
clear;
// Responsável pela limpeza de tela.
clc;
// Solicitação ao usuário do endereço para obtenção do arquivo de entrada.
entradaDeDados=input("Digite o endereço com localização do arquivo de entrada de dados. Obs: seguir instruções no arquivo Guideline. ");
// Arquivo de Entrada com a estrutura da Rede de Distribuição.
M = fscanfMat(entradaDeDados, "%lg"); // Importa arquivo que apresenta os dados de entrada da rede.
// Inicio de contagem de timer para tempo de resolução da rede.
tic();
// Separação de dados a serem usandos ao longo do algoritimo.
// Número de barras da rede
NBc=M(1,2);
// Salva o número de ramos
NR=M(1,1);
// Salva o número de barras
NB=NBc+M(1,3);
// Valor de refencia de tensão inicial Real.
vrReal=1.0;
// Valor de referencia para tensão inicial Imag.
vrImag=0;
// Tensão mínima estabelecida para tensão na nova barra de geração
vi=(0.977);
// Inserção de numeros para barra de geração antes iguais a 0.
// Facilitando a criação de um arquivo de entrada para o usuário.
a=1;
for i=2:size(M,"r")
if M(i,1)==0
M(i,1)=NBc+a;
a=a+1;
end
end
// --------------------------------------------------------------------
// Funcao responsável pela construçao do laço externo.
// Entrada : Estrutura do arquivo completo.
// Saida : Matriz de lacos externos, informação de quantos laços foram
// criados.
// -------------------------------------------------------------------
function [controleDeTensaoReal,controleDeTensaoImag,limiteInferiorParaTensao,M]=controleDeTensao(M)
endfunction
// ---------------------------------------------------------------
// Funcao responsavel pela construção da Matriz incidência A.
// Entrada : Estrutura do arquivo completo e Matriz laços externos.
// Saída : Matriz incidência para restrição de igualdade Aeq
// inequaldade A, informação de colunas para resolução de caso real,
// informação de colunas para resolução de caso completo de rede.
//----------------------------------------------------------------
function [Aeq,qnt_coluna_MA_incidencia,qnt_coluna_MA,aux,A,barraDefeitoFalha] = MatrizA(M)
AuxC=1; // Auxiliar para criação da matriz incidência de "carga", endereço da coluna.
AuxG=1; // Auxiliar para criação da matriz incidência de "geração", endereço da coluna.
aux=0;
MAg=zeros(M(1,2),M(1,3)); // Criação de vaiáveis novas para descartar restrições de desigualdade.
for i=2:(NR+1)
// Orientação.
origem=M(i,1);
destino=M(i,2);
// Parte real matriz incidencia (A).
Aeq(origem,AuxC)=1;
Aeq(destino,AuxC)=-1;
// Atualização da variável auxiliar
AuxC=AuxC+1;
// Complemento da matriz incidencia (A) com as barras de geração.
if(M(i,7)==1)
MAg(origem,AuxG)=1;
AuxG=AuxG+1;
end
end
// Concatenação da Matriz indicencia com variáveis de folga.
Aeq=cat(2,Aeq,MAg);
//Criação da matriz que será responsável por receber quais ramos devem estar normalmente abertas ou fechadas.
A=[];
// Definição inicial da matriz responsável pela definição dos limtes das linhas de contingência.
matrizLimite=[];
// Criação da variável auxiliar para criação da matriz que receberá a informação de quais ramos são abertos.
a=1;
// Estrutura de repetição para busca por todo arquivo de entrada da informação de ramos abertos.
for i=2:(NR+1)
if M(i,8)==1
// Criação da matriz incidência para restrições de inegualdade.
A(a,i-1)=1;
aux=aux+1; // Informação de quantos ramos da rede são de linhas abertas.
// inserção de dados na matriz referente aos limites da rede, afim de criar uma equação que associa as variáveis inteiras com as não inteiras.
matrizLimite(a,a)=-5;
a=a+1; // Atualização de posição da matriz.
end
end
// Expansão da matriz de igualdade para inserção das equações que serão responsáveis pela associação de variáveis inteiras e não inteiras.
Aeq=cat(2,Aeq,zeros(size(Aeq,'r'),aux));
A3=zeros(1,(size(Aeq,'c')-aux)); // Matriz auiliar para criação de restrição inteira.
A3=cat(2,A3,ones(1,aux));
// Inserção de restrição para variáveis inteiras.
Aeq=cat(1,Aeq,A3);
// Comunicação ao usuário para que seja informado qual barra ocorreu o defeito falha.
desligamento=zeros(1,size(Aeq,"c"));
barraDefeitoFalha=restricao(M);
if barraDefeitoFalha==0 then
continue;
else
desligamento(1,barraDefeitoFalha)=1;
end
// Inserção da restrição de desligamento para barra.
Aeq=cat(1,Aeq,desligamento);
// Informação sobre tamanho da matriz incidencia referente a restrições de igualdade.
qnt_coluna_MA_incidencia=size(Aeq,'c');
// Ajuste de matriz auxiliar para que seja possível inserir a matriz incidência para restrições de igualdade para parte Imaginária da rede.
A3=zeros(size(Aeq,'r'),size(Aeq,'c'));
A3=cat(2,A3,Aeq);
// Expansão da matriz incidência restrições Real, para que seja inserida restrições para parte imaginária da rede.
Aeq=cat(2,Aeq,zeros(size(Aeq,'r'),size(Aeq,'c')));
Aeq=cat(1,Aeq,A3);
// Informação sobre quantidade de colunas da matriz Aeq.
qnt_coluna_MA=size(Aeq,'c');
// Matriz A referente a inequações, inegualdades.
ANegativo=A*(-1); // Mudança de sinal para criação das restições de inegualdade de forma adequada.
A=cat(2,A,zeros(size(A,'r'),2*M(1,3))); // Expansão da matriz incidência para restrições de inegualdade.
// Adição da matriz de limites à matriz incidência para restrições de ingualdade.
A=cat(2,A,matrizLimite);
// Ajuste de tamanho.
ANegativo=cat(2,ANegativo,zeros(size(ANegativo,'r'),2*M(1,3)));
// Adição da matriz de limites à matriz negativa de incidência para restrições de ingualdade.
ANegativo=cat(2,ANegativo,matrizLimite);
// Junção de todas restrições de inegualdade para associação de variáveis inteiras e não inteiras.
A=cat(1,A,ANegativo);
// Inserção para parte Imaginária da rede.
A2=zeros(size(A,'r'),size(A,'c'));
A2=cat(2,A2,A);
// Expansão da matriz para inegualdades.
A=cat(2,A,zeros(size(A,'r'),size(A,'c')));
A=cat(1,A,A2);
endfunction
// --------------------------------------------------------------------
// Funcao responsavel pela contrução da Matriz de carga b.
// Entrada: Estrutura do arquivo completo, informação de colunas para
// resolução de caso real, informação de colunas para resolução de caso
// completo de rede, informação de existencia de Defeito Falha.
// Saída : Matriz de carga b.
//---------------------------------------------------------------------
function [beq,b] = MatrizB(M,A,barraDefeitoFalha)
// Definição inicial dos vetores de carga real e imaginário.
beq=zeros(NB,1); // Real.
b1eq=zeros(NB,1); // Imaginário.
// Criação da matriz B com todos valores negativos.
for i=2:NR+1
// Verificação da característica da barra, 1=geração, diferente de 0=carga.
if(M(i,7)==1)
// Matriz b parte real da geração.
beq(M(i,1),1)=(M(i,3))//+M((i+1),9));
// Matriz B parte imaginário da geração.
b1eq(M(i,1),1)=M(i,4);
elseif(M(i,3)~=0)
// Matriz b parte real de carga.
beq(M(i,2),1)=(-1)*(M(i,3));
// Matriz b parte real de carga.
b1eq(M(i,2),1)=(-1)*(M(i,4));
end
end
// Complemento às cargas da rede, definição resultados esperados para as equações de restrição da rede.
// Verificação da existência de existir ou não defeito falha.
if barraDefeitoFalha==0 then // Não houve Defeito Falha.
// Restrição de inteiro para Real.
beq=cat(1,beq,zeros(1,1));
// Restrição para desligamento de barra Real.
beq=cat(1,beq,zeros(1,1));
// Junção matriz de carga beq Real com restrições, com Imaginário.
beq=cat(1,beq,b1eq);
// Restrição de inteiro para Imaginário.
beq=cat(1,beq,zeros(1,1));
// Restrição para desligamento de barra Imaginário.
beq=cat(1,beq,zeros(1,1));
else
// Restrição de inteiro para Real.
beq=cat(1,beq,ones(1,1));
// Restrição para desligamento de barra Real.
beq=cat(1,beq,zeros(1,1));
// Junção matriz de carga beq Real com restrições, com Imaginário.
beq=cat(1,beq,b1eq);
// Restrição de inteiro para Imaginário.
beq=cat(1,beq,ones(1,1));
// Restrição para desligamento de barra Imaginário.
beq=cat(1,beq,zeros(1,1));
end
// Criação da matriz de restrições para inequações (<=) da rede.
b=zeros(size(A,'r'),1);
endfunction
//-------------------------------------------------------------------
// Função responsável pela criação da matriz H.
// Entrada : Estrutura do arquivo completo, informação de colunas para
// resolução de caso real, informação de colunas para resolução de caso
// completo de rede.
// Saída : Matriz simétrica para resistência e reatância H.
//-------------------------------------------------------------------
function [H]=MatrizH(M,qnt_coluna_MA_incidencia,aux)
AuxG=1; // Auxiliar para criação da matriz inciência de "geração", endereço da coluna.
// Dimensionamento de tamanho para matriz Q e auxiliares.
H=zeros(NR,qnt_coluna_MA_incidencia);
H2=H;
// Criação da matriz simétrica para resistência e reatância de cada barra.
for i=2:(NR+1)
// Matriz simétrica para resistência.
H(i-1,i-1)=M(i,5);
// Matriz simétrica para reatância.
H2(i-1,i-1)=M(i,6);
end
// Criação de complemento que será responsável pela resistência e impedância das as barras de geração.
AuxH=0.0000001*eye(M(1,3),M(1,3));
// Responsável pela criação de uma matriz complementar, responsável para ordenar e possibilitar a concatenação posteriormente (inserir as variáveis responsáveis pela variável de folga).
H1=zeros(M(1,3),NR);
// Concatenação para que seja possível incrementar as variáveis com baixa resistencia.
H1=cat(2,H1,AuxH);
// Incremento de restrições para variáveis de restição inteiras Reais.
H1=cat(2,H1,zeros(M(1,3),aux));
H=cat(1,H,H1); //Real.
H3=zeros(aux,size(H,'r'));
H3=cat(2,H3,zeros(aux,aux));
H=cat(1,H,H3);
// Incremento de restrições para variáveis de restição inteiras Imaginárias.
H1=cat(2,H1,zeros(1,size(H2,'c')-size(H1,'c')))
H2=cat(1,H2,H1); //Real.
H3=zeros(aux,size(H2,'r'));
H3=cat(2,H3,zeros(aux,aux));
H2=cat(1,H2,H3);
// Junção de pesos para real e imaginário.
H=cat(2,H,zeros(size(H,'r'),size(H,'r')));
H2=cat(2,zeros(size(H2,'r'),size(H2,'r')),H2);
H=cat(1,H,H2);
endfunction
//----------------------------------------------------
// Função responsável pela criação matriz da f.
// Entrada : Valor de colunas da matriz incidência A.
// Saída : Matriz f.
//----------------------------------------------------
function [f]=MatrizF(qnt_coluna_MA)
// Matriz de coeficientes dos termos lineares no problema quadrático.
for i=1:qnt_coluna_MA
f(i,1)=0;
end
endfunction
//----------------------------------------------------------------
// Função responável por inserção de restrições para abertura e
// fechamento de ramos.
// Entrada : Matriz incidência C e Estrutura do arquivo completo.
// Saída : Vetor informação de onde ocorreu Defeito Falha.
//---------------------------------------------------------------
function [barraDefeitoFalha]=restricao(M)
while 1>0 do
// Comunicação ao usuário.
disp("Houve um Defeito Falha em algum ramo?");
algumRamoFalhou=input("Digita 1 (um) para sim ou 0 (zero) para não. ");
// Verificação de existência de Defeito Falha.
if algumRamoFalhou==1
barraDefeitoFalha=input("Digite o ramo com Defeito Falha: ");
// Verificação de possibilidade de existir o Defeito Falha informado.
if(barraDefeitoFalha>NB)
disp("Você digitou um valor inválido");
elseif(barraDefeitoFalha~=0)
break;
else
disp("Você digitou um valor inválido");
end
else
barraDefeitoFalha=0;
break;
end
end
endfunction
// --------------------------------------------------
// Estutura principal do Algoritimo para Otimização
// do fluxo de Corrente Alternada com Contingência.
// --------------------------------------------------
// Instrução para criação da matriz incidência A.
[Aeq,qnt_coluna_MA_incidencia,qnt_coluna_MA,aux,A,barraDefeitoFalha]=MatrizA(M);
// Instrução para criação da matriz incidência Q.
[H]=MatrizH(M,qnt_coluna_MA_incidencia,aux);
// Instrução para criação da matriz incidência P.
[f]=MatrizF(qnt_coluna_MA);
// Instrução para criação da matriz incidência B.
[beq,b]=MatrizB(M,A,barraDefeitoFalha);
// Definição das variáveis inteiras/binárias da rede.
// Encontrar as variáveis inteiras/binárias reais da rede.
intconReal=find(Aeq(NB+1,:)==1);
// Encontrar as variáveis inteiras/binárias imaginárias da rede.
intconImaginario=find(Aeq(2*(NB+1)+1,:)==1);
// Junção das variáveis inteiras/binárias reais e imaginárias da rede.
// As variáveis reais e imaginárias da rede serão as mesmas, apenas deslocadas umas das outras.
intcon=cat(2,intconReal,intconImaginario);
// Limite inferior.
lb=(-5)*ones(size(Aeq,"c"),1);
// Limite superior.
ub=lb*(-1);
// Função de otimização FOT_INTQUADPROG - objetivo: Minimização de perdas na rede com opções de manobra.
[xopt,fopt,exitflag,output]=fot_intquadprog(H,f,intcon,A,b,Aeq,beq,lb,ub);
// Término de contagem de timer para tempo de resolução da rede.
toc();
// Identificação de qual Ramo foi ligado para que se chegue na convergência da rede.
ondeTaNaMatrizM=find(M(:,8)==1);
qualLigou=find(xopt(intcon(1,1):intcon(1,size(ondeTaNaMatrizM,"c")),1)==1);
lugarNaMatriz=ondeTaNaMatrizM(1,qualLigou);
disp("O ramo ativado tem como origem e destino as barras que se seguem.");
disp(M(lugarNaMatriz,1),M(lugarNaMatriz,2));
// Comunicação ao usuário sobre os resultados obtidos com a função de otimização.
if exitflag == 0 then
disp("Solução Ótima Encontrada!");
disp(fopt,"O valor ótimo encontrado para a função objetivo.");
disp(ans,"CPU time (s).");
elseif exitflag == 1 then
disp("Solução não encontrada.")
else
disp("Erro encontrado.")
end
|
83d71f205166e9c92fc3c11028c3d7d150384449
|
b80969c9d72c732b0153d0de2b8fd28dc10d8a16
|
/Biologie/Site/sauvegarde/28.07.2016/www/Documents/simulation/equationDifferentielle/chapitre3/ex6.sci
|
61ea6feff12c9d91adabaf84f0cca10230aaaf71
|
[] |
no_license
|
adamdepossylux/stem_cells
|
6a2596a0734e3604b570cfdaa1e6cb798d13d7b7
|
e1ffdf24a223fea3a3606a0bd262067edc81f5b9
|
refs/heads/master
| 2020-04-01T17:26:21.772875
| 2017-05-10T15:15:09
| 2017-05-10T15:15:09
| 61,795,551
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 330
|
sci
|
ex6.sci
|
clf
close
clc
clear
function[y]=f6(t,u)
y(1)=4*u(1)-u(2)+t;
y(2)=u(1)+7*u(2)+exp(-t);
endfunction
N=101;
h=(1-0)/(N-1)
t=linspace(0,1,101);
y=zeros(2,N);
y(1,1)=1;
y(2,1)=1;
for i=1:N-1
y(:,i+1)=y(:,i)+h*f6(t(i),y(:,i));
end
figure(1)
clf
plot2d(t,y(1,:),1)
plot2d(t,y(2,:),2)
figure(2)
clf
plot2d(y(1,:),y(2,:),6)
|
74e1ed05ce62f85b7fb979071167c94d74ddf220
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/848/CH3/EX3.5/Example3_5.sce
|
8944c281252b7ceeee1498d1c889950adbbbdcff
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 428
|
sce
|
Example3_5.sce
|
//clear//
//Caption: Calculation of pulse broadening
//Example3.5
//page 103
clear;
clc;
close;
C = 3e08; //free space velocity in metre/sec
n1 = 1.48;//core refractive index
n2 = 1.465;//cladding refractive index
delta = 0.01; //index difference
L = 10^3;//fiber length 10KM
deltaT = (L*(n1^2)/(C*n2))*delta;
disp((deltaT/L)*10^12,'pulse broadening in ns/KM')
//Result
//pulse broadening in ns/KM = 49.838453
|
558c52943594d4959792f701d40bb938eb858597
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1883/CH4/EX4.6.3/Example4_3.sce
|
701ba17ae7996987619399305d0e342731e0dbda
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 501
|
sce
|
Example4_3.sce
|
//Chapter-4,Example4_6_3,pg 4-8
P=100*10^3 //avrage power per pulse
t=20*10^-9 //time duration
h=6.63*10^-34 //Plancks constant
c=3*10^8 //velocity of light in air
N=6.981*10^15 //No. of photons per pulse
wavelength=N*h*c/(P*t)*10^10
printf("\nWavelength of photons = %.f A.\n",wavelength)
|
cde64953c9d8aac92773b729dda09b77af647071
|
48d313982e11468e3406524c01f1cba2700a2db5
|
/Calcul numeric/ResurseTemaCalculNumeric/New folder/ExFct/chebpoints.sci
|
cc38d47a03dcabd7ed21ea5fa3ba538718c5f828
|
[] |
no_license
|
albanionut/University
|
b8e918a192c131647099c57e1b2caa231de98d6d
|
b3d3dfe3cf64d0cddfaeb570151adf7d4c9ad0b7
|
refs/heads/master
| 2021-07-13T11:31:29.880681
| 2020-10-10T15:07:00
| 2020-10-10T15:07:00
| 214,223,943
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 315
|
sci
|
chebpoints.sci
|
function x=chebpoints(n,varargin)
l=-1
r=1
if length(varargin)>0 then
if length(varargin)==2 then
l=varargin(1)
r=varargin(2)
else
error('Wrong number of input parameters')
end
end
k=0:n
x=l+0.5*(r-l)*(cos(k*%pi/n)+1)
endfunction
|
84a6f57d0400d5b1b3e3b7e8869b3acdf22e8db9
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3871/CH10/EX10.5/Ex10_5.sce
|
6bd6b4cbdb474f362990d827531d1bb62396e42e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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
|
Ex10_5.sce
|
//===========================================================================
//chapter 10 example 5
clc;clear all;
//variable declaration
Vx1 = 0.835; //indicated calue of voltage drop across the unknown resistance in V
emf = -25*10^-6; //thermal emf with unknown resistance in V
S = 0.10025; //resistance of standard resistor in Ω
Vs = 0.984; //voltage drop across standard resistor in V
//calculations
Vx = Vx1-emf;
X = (S*Vx)/Vs; //Resistance of resistor under test in Ω
//result
mprintf("unknown resistor = %3.5f Ω",X);
|
01ab1b751828551044f8ffb6a78500230b1defc4
|
a2a27dab4370e4f12d306f70e46ce3ab870ee117
|
/VB6_ETDOT_Files/code/stepp2/comm/tnrogers_990623 (Loll code)/AWLOLL/RESULTS/FRAGMENT.TST
|
15c05fbc8f21245f5f9af41fc32baa57ddde9162
|
[] |
no_license
|
USEPA/Environmental-Technologies-Design-Option-Tool
|
7725d624f5e7b5368ca601422f69d83897ffbf12
|
84e1c5e405370232574b666abfaeeb78098a717e
|
refs/heads/master
| 2022-05-03T23:58:12.228328
| 2022-04-11T15:12:32
| 2022-04-11T15:12:32
| 231,101,614
| 17
| 8
| null | 2021-07-30T19:29:48
| 2019-12-31T14:21:38
|
VBA
|
UTF-8
|
Scilab
| false
| false
| 459
|
tst
|
FRAGMENT.TST
|
1
2
3
4
5
-6
-7
8
-9
-10
-11
12
13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
|
4b51f1f0baa95418bad681401e4ee46e10b91224
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1085/CH9/EX9.1/ex9_1.sce
|
817dcd4a05bacb9bc4ed7e7196c5e9d8058273f7
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 256
|
sce
|
ex9_1.sce
|
//Exam:9.1
clc;
clear;
close;
//Fulcrum is at 0.5% carbon
//from lever rule
Pro_f=((0.80-0.5)/(0.80-0.0))*100;// % Proeutectoid ferrite
Pea_f=100-Pro_f;// % Pearlite ferrite
disp(Pro_f,'% Proeutectoid ferrite=');
disp(Pea_f,'% Pearlite ferrite=');
|
d9d8e6251e320f8bd11e2061b83ff340554b8118
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1583/CH2/EX2.11/SSA_Ex_2_11.sce
|
c28db6625edf8cf3a80fd4628f9ff7de40d61cf8
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 344
|
sce
|
SSA_Ex_2_11.sce
|
clc
//Chapter 2:Small Signal Amplifiers
//example 2.11 pag no 51
//given
wL=10^6//bandwidth
R1=1*10^3//taking resistance value for required specification
Av=-50//voltage gain
Rf=-Av*R1//feedback resistance
C=(wL*Rf)^-1//capacitance
mprintf('R1=%d K ohm \n feedback resistance= %d K ohm \n capacitance= %d pF',R1*1e-3,Rf*1e-3,C*1e12)
|
8b474cfbb8948b9a5ab48ac67585a5e8cfde75d5
|
da5b40d917ec2982828bd9bdf06b18b7bf189f26
|
/sim/cmd/test/heatexUA.tst
|
a211907710deaf5ef15ed095ba3008945135d398
|
[] |
no_license
|
psy007/NNPC-CHEMICAL-SIM-
|
4bddfc1012e0bc60c5ec6307149174bcd04398f9
|
8fb4c90180dc96be66f7ca05a30e59a8735fc072
|
refs/heads/master
| 2020-04-12T15:37:04.174834
| 2019-02-06T10:10:20
| 2019-02-06T10:10:20
| 162,587,144
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,077
|
tst
|
heatexUA.tst
|
# Heat exchanger test
units SI
$thermo = VirtualMaterials.Peng-Robinson
/ -> $thermo
thermo + PROPANE ISOBUTANE n-BUTANE n-PENTANE
# lets have some streams for this test
hotInlet = Stream.Stream_Material()
coldInlet = Stream.Stream_Material()
hotOutlet = Stream.Stream_Material()
coldOutlet = Stream.Stream_Material()
cd hotInlet.In
Fraction = .25 .25 .25 .25
T = 375 K
P = 500
MoleFlow = 800
cd /coldInlet.In
Fraction
Fraction = .95 0 .05 0
P = 300
MoleFlow = 1000
cd /
exch = Heater.HeatExchangerUA()
exch
cd exch
DeltaP1 = 10
DeltaP0 = 50
cd /
coldInlet.Out -> exch.In1
exch.Out1 -> coldOutlet.In
hotInlet.Out -> exch.In0
exch.Out0 -> hotOutlet.In
#spec UA and coldInlet.T
exch.UA0_1 = 52710.6781154
coldInlet.In.T = -8 C
coldInlet.Out
coldOutlet.Out
hotInlet.Out
hotOutlet.Out
exch.UA0_1
###See if it forgets
exch.UA0_1.UA =
coldInlet.Out
coldOutlet.Out
hotInlet.Out
hotOutlet.Out
#Spec UA again nowspect coldOutlet.T
exch.UA0_1 = 52710.6781154
coldInlet.In.T =
coldOutlet.In.T = 80 C
coldInlet.Out
coldOutlet.Out
hotInlet.Out
hotOutlet.Out
exch.UA0_1
|
fa217aa63fd6c78b639c0cf63cac9b10fefd425a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/181/CH1/EX1.23/example1_23.sce
|
2249d2dd829f4810bf89a0ac5cb3e412474c4920
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 596
|
sce
|
example1_23.sce
|
// Percentage of increse in carrier concentration
// Basic Electronics
// By Debashis De
// First Edition, 2010
// Dorling Kindersley Pvt. Ltd. India
// Example 1-23 in page 51
clear; clc; close;
// Data given
kT=0.026; // Value at T=300K
T=300; // Room temperature in K
dT=1/300; // Rate of change of temperature
E_g=0.785; // Band gap energy in germanium in eV
// Calculation
dni=((1.5+(E_g/(2*kT)))*dT)*100;
printf("Rise in intrinsic carrier concentration is %0.1f percent/degree",dni);
// Result
// Percentage rise in intrinsic carrier concentration is 5.5 %/degree
|
8dbf91669c6e297591a64ecd6faa2d3798bbe7be
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/147/CH14/EX14.24/Example14_24.sce
|
0ef0107c6d6021c8a2d355b189788b580490b1a6
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 412
|
sce
|
Example14_24.sce
|
//Synchronous speed of induction motor N, Input Power Ps, Current Is
//Stator resistance per phase R1, Transformation ratio a
close();
clear;
clc;
N = 900;//rpm
Ps = 45000/3;//W
Is = 193.6;//A
R1 = 0.2;//ohm
a = 2;
R2 = (Ps/Is^2 - R1)/a^2;
R2dash = a^2*R2;
//Starting Torque 'Ts'
Ts = 3*Is^2*R2dash/(2*%pi*N/60);
mprintf('Rotor resistance per phase = %0.2f ohm\nStarting Torque = %0.1f N.m',R2,Ts);
|
1ef7671d00b72d6cc408c3a9de35d28693730870
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2863/CH7/EX7.12/ex7_12.sce
|
7afea4847bf4d86d03bf684b038bd9a05fd3487d
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 143
|
sce
|
ex7_12.sce
|
//chapter 7
printf("\n");
D=2500;
h=200;
fcr=5*10^6;
fmuf=fcr*sqrt(1+(D/(2*h))^2);
printf("the maximum usable frequency is %gHz",fmuf);
|
a044d3c7f9fac5aec60e837ce59920855420a708
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/812/CH8/EX8.04/8_04.sce
|
e65781809bd4343ff84f02eb458198e8570aa385
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 362
|
sce
|
8_04.sce
|
//Viscosity of fluid//
pathname=get_absolute_file_path('8.04.sce')
filename=pathname+filesep()+'8.04-data.sci'
exec(filename)
//Viscosity of the liquid(in N-s/m^2):
u=%pi/128*p*1000*D^4/Q/L/1000
//Velocity(in m/sec)
V=Q/(%pi/4*D^2)/1000
//Reynolds number:
Re=d*V*D/u/1000
printf("\n\nRESULTS\n\n")
printf("\n\nViscosity of fluid %.3f N-s/m^2\n\n",u)
|
d7147c652f384ff56a7ab53e49e49537f1921fb1
|
8217f7986187902617ad1bf89cb789618a90dd0a
|
/source/2.3/macros/calpol/coffg.sci
|
066d6e78f911e9475f0f94519d185f852b6c7758
|
[
"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
| 711
|
sci
|
coffg.sci
|
function [Ns,d]=coffg(Fs)
// [Ns,d]=coffg(Fs) computes Fs^-1 where Fs is a polynomial
// matrix by co-factors method.
// d = common denominator; Ns = numerator (matrix polynomial)
// Fs inverse = Ns/d.
// (Be patient...results are generally reliable)
//F.D.
// See also determ, detr, invr, penlaur, glever, leverrier
//!
//
if type(Fs)<>2 then
error('First argument to coffg must be a polynomial matrix'),end
[lhs,rhs]=argn(0);
[n,np]=size(Fs);
if n<>np then error('First argument to coffg must be square!');end
d=determ(Fs) // common denominator
n1=n;
for kk=1:n1,for l=1:n1,
signe=(-1)^(kk+l);
col=[1:kk-1,kk+1:n1];row=[1:l-1,l+1:n1];
Ns(kk,l)=-signe*determ(Fs(row,col))
end;end
Ns=-Ns;
|
78e31449298f9dab303b7e4c5e13dc1c2d8b7105
|
54cca39cd1cf7f62b001c8a4d64dcc3d29e3cb4e
|
/LinearFit/fit.sci
|
a5fc55780a063d4e40a48195626631fd4758b9a7
|
[] |
no_license
|
hamling-ling/NumericalResearches
|
d2487c2566c24ba3dc674e7e17f1745c1020d542
|
a824357d7650d3ed86220f1315ee37e577285a7d
|
refs/heads/master
| 2021-01-25T08:36:58.455319
| 2015-04-22T15:17:21
| 2015-04-22T15:17:21
| 7,775,139
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 396
|
sci
|
fit.sci
|
function y = fun2fit(x, c)
y = c(1)*x + c(2);
endfunction
function e = myerror(c, x, y)
e = fun2fit(x, c) - y;
endfunction
xy=read("test.txt",-1,2);
xfull=xy(:,1)
yfull=xy(:,2)
x=xfull(300:length(xfull))
y=yfull(300:length(yfull))
tgty = zeros(length(y),1)
tgty = tgty + 44444
c0 = [1, 0]
[f, copt] = leastsq(list(myerror, x, y), c0)
yopt0 = fun2fit(x, copt)
plot2d(x, [y yopt0])
|
3d092205aab8c3645b6c92acc550a7d277b79b4d
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2606/CH8/EX8.2/ex8_2.sce
|
5d77e6fd7d7a6bd3d33fa57bb9a3e78c7042812a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 224
|
sce
|
ex8_2.sce
|
//Page Number: 8.7
//Example 8.2
clc;
//Given,
R=1000;
T=27; //degree celsius
TK=T+273; //kelvin
// We know, rms noise voltage is 4RKTB
K=1.38D-28;
B=10;
V=sqrt(4*R*K*TK*B);
disp('V',V,'Rms noise voltage:');
|
8fa43579ea7b219952b4016957c72c4b2ef47e48
|
c206e3f57b0a6f75bd1feefefecd29398746c358
|
/scripts/opening.sci
|
9ba4eaaa9f098874d526a8988cdc09765555f3d3
|
[] |
no_license
|
danielfcollier/scilab-image-processing-scripts
|
e092a7c1a6a0ade906c020218a9571290245e40f
|
43d78cb06dc6c27ab8663f351e4c172d038280ce
|
refs/heads/main
| 2023-04-12T20:05:52.840157
| 2021-04-27T18:56:06
| 2021-04-27T18:56:06
| 362,219,761
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 74
|
sci
|
opening.sci
|
function O = opening(I,M)
O = dilate( erode(I,M), M );
endfunction
|
c91c56240c1b5fb4fe31b8c0e3619f2e68b391df
|
683d2599aa2be1a5f74b928d545b20e7ea656cd1
|
/microdaq/macros/microdaq_macros/mdaq_pwm_init.sci
|
04502147730c2ee27dbb6ff8290d882083da8e7c
|
[
"BSD-3-Clause"
] |
permissive
|
pj1974/Scilab
|
5c7fb67d5cae5ac0cdf78e3dd66b97ba50f9fc95
|
cd54f1bd8502d6914ad6ff5271ca0e6e3d323935
|
refs/heads/master
| 2020-12-25T17:12:56.934984
| 2015-10-06T17:16:11
| 2015-10-06T17:16:11
| 41,862,822
| 0
| 0
| null | 2015-09-03T14:00:56
| 2015-09-03T14:00:56
| null |
UTF-8
|
Scilab
| false
| false
| 1,573
|
sci
|
mdaq_pwm_init.sci
|
function mdaq_pwm_init(link_id, module, period, active_low, channel_a, channel_b)
if link_id < 0 then
disp("Wrong link ID!")
return;
end
if module > 3 | module < 1 then
disp("Wrong PWM module!")
return;
end
if period > 1000000 | period < 1 then
disp("Wrong PWM period!")
return;
end
if active_low > 1 | active_low < 0 then
disp("WARNING: active_low parameter should be 0 or 1. Value will be modified to 1!")
end
if channel_a > 100 | channel_a < 0 then
if channel_a > 100 then
disp("WARNING: channel_a value will be modified to 100!")
channel_a = 100;
end
if channel_a < 0 then
disp("WARNING: channel_a value will be modified to 0!")
channel_a = 0;
end
end
if channel_b > 100 | channel_b < 0 then
if channel_b > 100 then
disp("WARNING: channel_b value will be modified to 100!")
channel_b = 100;
end
if channel_b < 0 then
disp("WARNING: channel_b value will be modified to 0!")
channel_b = 0;
end
end
result = [];
result = call("sci_mlink_pwm_config",..
link_id, 1, "i",..
module, 2, "i",..
period, 3, "i",..
active_low, 4, "i",..
channel_a, 5, "d",..
channel_b, 6, "d",..
"out",..
[1, 1], 7, "i");
if result < 0 then
mdaq_error(result)
end
endfunction
|
03d82d5535d2dc513a9a9740640d55849bf3a6b0
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/758/CH9/EX9.5.a/Ex_9_5_a.sce
|
595552baf03acd293a8066c50827d185f0662150
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 279
|
sce
|
Ex_9_5_a.sce
|
//Example 9.5.a
clc;clear;close;
z=poly(0,'z');
s=poly(0,'s');
Hz=3*(2*z^2+5*z+4)/(2*z+1)/(z+2);
H=pfss(Hz/z);
for k=1:length(H)
H(k)=clean(H(k));
H1(k)=z*horner(H(k),z);
disp(H1(k),'System Function for parallel realisation Hk(z)=');
end
disp(Hz,'System Function H(z)=');
|
cafd06f2939387766bccc681126f9b88fa4114ef
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1682/CH3/EX3.6/Exa3_6.sce
|
fa832b46941b1989d191d8e2a3caf8b453c66f6d
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 264
|
sce
|
Exa3_6.sce
|
//Exa3_6
clc;
clear;
close;
//given data is :
P=1000000;//in rupees
n=15;//in years
i=18;//% per annum
A=P*(((i/100)*(1+i/100)^n)/((1+i/100)^n-1));
disp("The annual equivalent installment to be paid by the company to the bank is : "+string(A)+" Rupees.");
|
21bfd23c9a4839d43e96fe88295e555c9068fcb8
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1931/CH8/EX8.6/6.sce
|
0e9c84b3690dbbc020a16ce72d5defea2686fb7c
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 515
|
sce
|
6.sce
|
clc
clear
//INPUT DATA
angle=180//x ray carbon scattered at a angle in degrees
h=6.625*10^-34//Planck's constant in m^2 Kg /sec
c=3*10^8//velocity of light in m/s
m=9.11*10^-31//mass of electron in Kg
v=1.8*10^18//frequency of incident rays in s^-1
//CALCULATION
w=(c/v)//wavelength in m
tw=(h/(c*m))*(1-cosd(angle))//The change wavelength for Xray carbon in m
NW=(w+tw)/10^-10//The wavelength of X-rays carbon in Armstrong
//OUTPUT
printf('The wavelength of X-rays carbon is %3.2f Armstrong',NW)
|
c32e4795adb754bca9496a4f294bffe5513b1882
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2297/CH5/EX5.6/Ex5_6.sce
|
211ca3a89c621a2666e9ddeefc6a569b83a5eeaa
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 509
|
sce
|
Ex5_6.sce
|
// Example 5.6;multiplier and sensivity
clc;
clear;
// given :
format('v',6)
rm=50;//resistance in ohms
rsh=rm;//shunt resistance in ohms
it=2;//current in mA
erms=10;//rms voltage in volts
ede=0.45*erms;//voltage in volts
rd1=400;//resistance in ohms
x=(rm*rsh)/(rm+rsh);//resistance in ohms
r1=ede/(it*10^-3);//resistance in ohms
rs=r1-x-rd1;//resistance in ohms
disp("part (a)")
disp(rs,"multiplier resistance Rs is,(Ohm)=")
S=r1/erms;//sensivity in ohms/V
disp("part (b)")
disp(S,"sensivity is,(Ohm/V)=")
|
1995b8f1be30a71f19e7b056aee0bb322a70c4a9
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3754/CH20/EX20.16/20_16.sce
|
4c0729d955e9ab333daca74c40db50f3a1401b4f
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,170
|
sce
|
20_16.sce
|
clear//
//Variables
VS = 15.0 //Input voltage (in volts)
VZ = 8.3 //Zener voltage (in volts)
beta = 100.0 //Common-emitter current gain
R = 1.8 //Resistance (in kilo-ohm)
RL = 2.0 //Resistance (in kilo-ohm)
VBE = 0.7 //Voltage across base-emitter junction (in volts)
//Calculation
VL = VZ - VBE //Voltage across load (in volts)
VCE = VS - VL //Collector to emitter voltage (in volts)
IR = (VS - VZ)/ R //Current through R (in milli-Ampere)
IL = VL / RL //Load current (in milli-Ampere)
IB = IL / beta //Base current (in milli-Ampere)
IZ = IR - IB //Current through Zener (in milli-Ampere)
//Result
printf("\n Load voltage is %0.3f V.",VL)
printf("\n Collector to Emitter voltage is %0.3f V.",VCE)
printf("\n Current through R is %0.2f mA.",IR)
printf("\n Load current is %0.3f mA.",IL)
printf("\n Base current is %0.3f micro-A.",IB * 10**3)
printf("\n Current through Zener is %0.2f mA.",IZ)
|
a97502c8c519af68089722902cbde76fb65fb5c5
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1979/CH8/EX8.12/Ex8_12.sce
|
d2b9f5d61aa4c93a5ace79d4c4b3f8e277b99c24
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 741
|
sce
|
Ex8_12.sce
|
//chapter-8 page 345 example 8.12
//==============================================================================
clc;
clear;
//For a reflex klystron
f=5*10^9;//Frequency of operation in hz
V0=1000;//anode voltage in V
d=0.002;//cavity gap in m
Vr=-500;//repeller voltage in V
//CALCULATION
N=7/4;//mode value
VR=abs(Vr);
L=(((VR+V0)*N)/(6.74*10^(-6)*f*sqrt(V0)))/10^(-3);//Optimum length of the drift region in mm
u=5.93*10^5*sqrt(V0);// in m/sec
w=2*(%pi)*f;//angular frequency in rad
Tg=(w*d)/u;//Gap transit angle in rad
//OUTPUT
mprintf('\nOptimum length of the drift region is L=%1.3f mm \nGap transit angle is Tg=%1.3f rad',L,Tg);
//=========================END OF PROGRAM===============================
|
3387e86cde6ad5d136774f37e2defad010d371fd
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/605/CH2/EX2.7/2_7.sce
|
000e2c73fc8db480cf285cfb009edfabfb0a2bc4
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 961
|
sce
|
2_7.sce
|
//data in question
// input power to the antenna(W)
Ps=2;
//reflection coefficient of transmitting antenna
Yt=0.1
//reflection coefficient of receiving antenna
Yr=0.2
//distance between two antennas
//consider
A=10^(-5)
R=100*(A)
//maximum directivity of receiving antenna(20 dB = 10^(20/10))
Gr=10^(20/10)
//maximum directivity of transmitting antenna(16dB=10^(16/10))
Gt=10^(16/10)
//data print
printf("\nPs=2 W\tYt=0.1\tYr=0.2\tR=100λ\tGr=20 dB\tGt=16 dB\n")
//equations and result
// power transmitted in the forward direction
printf("\nresult:-")
Pt = (1-Yt^2)*Ps
printf("\npower transmitted in the forward direction\n\tPt = (1-Yt^2)*Ps=%.2f W",Pt)
//Friis transmission equation
Pr=Pt*(A/(4*%pi*R))^2*Gr*Gt
printf("\nFriis equation \n\tPr=Pt*(λ/(4*pi*R))^2*Gr*Gt=%fW",Pr)
printf(" =%.0f mW",Pr*1000)
//power delivered to receiver
Pd=(1-Yr^2)*Pr
printf("\npower delivered to receiver\n\tPd=(1-Yr^2)*Pr=%.1f mW",Pd*1000)
|
f41106177c9b46310c0edccd7c32412793c7945a
|
843ddfc1f1137ace0ddbffdc051fb2b2a3e2ba6b
|
/P6/P603.sce
|
2243c0061872836b3e6c97e8f01c914682e5f4dc
|
[] |
no_license
|
aguadix/SIMCON
|
8169169577fc5e69257f6dc91558b7b320974161
|
5f83003937740a730c4593c241309c9da7693ddf
|
refs/heads/master
| 2022-10-27T00:34:29.074871
| 2022-10-24T11:24:08
| 2022-10-24T11:24:08
| 53,549,792
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,826
|
sce
|
P603.sce
|
clear; clc;
// P603.sci
s = syslin('c',%s,1);
// Proceso de segundo orden críticamente amortiguado (variable manipulada)
Kp = 1, Tp = 10; Gp = Kp/(Tp*s+1)^2
// Proceso de segundo orden críticamente amortiguado (perturbación)
Kd = 2; Gd = Kd/(Tp*s+1)^2
// Válvula de primer orden
Kv = 1; Tv = 1; Gv = Kv/(Tv*s+1)
// Medida ideal
Gm = 1
dt = 0.01; tfin = 500; t = 0:dt:tfin;
u = 'step';
function y = f(x)
// Controlador PI
Kc = x(1);
Ti = x(2);
P = Kc; I = Kc/Ti; D = 0;
Gc = P + I/s + D*s;
// Regulador
Gcl = Gd/(1+Gm*Gc*Gv*Gp);
// Respuesta temporal a escalón
y = csim(u,t,Gcl);
endfunction
function ISE = fobj(x)
// Respuesta temporal a escalón
y = f(x)
// Error
e = 0 - y;
// Integral del cuadrado del error
ISE = inttrap(t,e.^2);
endfunction
// Valores óptimos supuestos
Kcoptguess = 10;
Tioptguess = 10;
scf(1); clf(1);
plot(Kcoptguess,Tioptguess,'go');
xtitle('Optimización con el algoritmo Nelder-Mead','Kc','Ti');
xoptguess = [Kcoptguess,Tioptguess];
yoptguess = f(xoptguess);
scf(2); clf(2);
xgrid; xtitle('Respuesta temporal a escalón','t','y');
plot(t,yoptguess,'g-');
ISEguess = fobj(xoptguess)
// Región estable
Tiinterval = [1:1:50];
for i = 1:length(Tiinterval)
Ti = Tiinterval(i);
Grl = (1+1/(Ti*s))*Gp*Gv*Gm;
Kcu(i) = kpure(Grl);
end
scf(1);
plot(Kcu,Tiinterval,'r-');
// Determinar Kc y Ti para minimizar ISE
function stop = outfun(x,optimValues,state)
scf(1); xnumb(x(1),x(2),optimValues.iteration);
stop = %F;
endfunction
options = optimset ('Display','iter','OutputFcn',outfun,'MaxIter',100);
[xopt,ISEmin,exitflag,output] = fminsearch(fobj,xoptguess,options)
// Valores óptimos calculados
Kcopt = xopt(1)
Tiopt = xopt(2)
scf(1); plot(Kcopt,Tiopt,'bo');
yopt = f(xopt);
scf(2); plot(t,yopt,'b-');
|
1352fac4618df8a283afa2591d127ace25ffa1e3
|
717ddeb7e700373742c617a95e25a2376565112c
|
/278/CH10/EX10.16/ex_10_16.sce
|
65cd4e99273ae70c91149271bbe65a6beeb88eb2
|
[] |
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
| 588
|
sce
|
ex_10_16.sce
|
//find size of fillet welds at top and bottom
clc
//solution
//given
//ref fig 10.34
P=15000//N
t=150//N/mm^2
l=25//mm
//Pva+Pvb=P,Pva=Pvb
Pva=P/2//N
Pvb=P/2//N
//balnce moments abt B
Pha=(P*50)/75//N
//let s1 be size at top
Pa=sqrt(Pva^2+Pha^2)//N
printf("the value of force at A is,%f N\n",Pa)
//Pa=thorat area* permissible stress
//Pa=0.707*s1*l*t=0.707*s1*25*150=2650*s1
s1=Pa/2650//mm
printf("the size of weld at top is,%f mm\n",s1)
//let s2 be size at bottom
//Pvb=0.707*s2*l*t
//Pvb=2650*s2
s2=Pvb/2650//mm
printf("the size of weld at bottom is,%f mm\n",s2)
|
07f1eaf6f54940cd5183190e7572e257129a1d3c
|
b0ec3c95e6b967fabb9b53e0629980e5bc07e752
|
/Mesher/Surface Remesher/LexicalTriangulation2.sce
|
4fa24570e3bf7660893021d6446a0532bbcab7de
|
[] |
no_license
|
chi-tech/whitepapers
|
8847ae667fc02418daf123896daf1c027f55ea20
|
fe758fa106e7c8d144e1ac108c9e9f3238310d9c
|
refs/heads/development
| 2020-09-10T16:07:05.190042
| 2020-07-15T14:38:09
| 2020-07-15T14:38:09
| 221,751,686
| 0
| 1
| null | 2020-07-15T14:38:11
| 2019-11-14T17:27:50
|
TeX
|
UTF-8
|
Scilab
| false
| false
| 8,572
|
sce
|
LexicalTriangulation2.sce
|
clear all;
clc;
funcprot(0)
//rand('seed',200)
rand('seed',200)
getd()
printf("Hello\n")
//========================================================== Generated points
N=10; //Number of points
points=rand(N,2);
if (%F) then
N=8;
points=rand(N,2);
points(1,1) =0; points(1,2) =0;
points(2,1) =1; points(2,2) =0;
del=0.25;
points(3,1) =del; points(3,2) =del;
points(4,1) =1-del-del; points(4,2) =del;
points(5,1) =1-del-del; points(5,2) =1-del-del;
points(6,1) =del; points(6,2) =1-del-del;
points(N-1,1)=1; points(N-1,2)=1;
points(N,1) =0; points(N,2) =1;
end
//========================================================== Lexicographically sort points
printf("================ Lexicographically sorting points\n");
[lexlist,lexpoints]=SortLexicographically2D(points);
//========================================================== Create initial convex hull
//The convex hull data structure is as follows:
// point_a point_b point_c neigbor_ab neighbor_bc neighbor_ca
//"point_" is only an index to a vertex not an actual xyz value
//"neighbor_" is the index of a triangle in the convexHull list
printf("================ Creating initial convex hull (i.e. first Triangle)\n");
hullPoint1 = lexlist(1);
hullPoint2 = -1;
hullPoint3 = -1;
for i=2:N
if (points(lexlist(1),1)~=points(lexlist(i),1)) then
hullPoint2=lexlist(i);
break;
end
end
for i=2:N
a=points(lexlist(i),:);
b=points(hullPoint1,:);
c=points(hullPoint2,:);
orientation = Orient2D(a,b,c);
if ( (lexlist(i)~=hullPoint2) )
hullPoint3=lexlist(i);
if (orientation>0) then
tempHullpoint=hullPoint2;
hullPoint2 = hullPoint3;
hullPoint3 = tempHullpoint;
disp("Vertices flipped")
end
break;
end
end
convexHull=[hullPoint1 hullPoint2 hullPoint3 -1 -1 -1]
//========================================================== Create the left over point list
[unusedLexlist]=GetUnusedVertices(lexlist,convexHull)
//========================================================== Iterate until all vertices are used
printf("================ Iterating over unused vertices\n");
stopLoop=%F
iter=0;
while (~stopLoop)
//============================================ Convexify hull
convexHull = ConvexifyHull(convexHull,points);
//============================================ Run over unused verts attempt to attach them to hull
[convexHull,unusedLexlist]=AttachUnusedVertices(convexHull,lexlist,unusedLexlist,points)
iter=iter+1;
if ( (size(unusedLexlist)(1)==0) | (iter>2000))
stopLoop=%T;
end
end
printf("================ Done iterating, final convexifying\n");
//========================================================== Final Convexify hull
convexHull = ConvexifyHull(convexHull,points);
lexi_convexHull=convexHull;
printf("================ Done convexifying the hull\n");
ExportAsOBJ("TestSurface4.obj", points,convexHull);
//========================================================== Create list of non-locally-delaunay edges
non_loc_del_edges = ListNonLocallyDelaunayEdges(convexHull,points);
temp_nlde=non_loc_del_edges //for plotting
temp_convexHull=convexHull
//========================================================== Iterate to remove non-locally delaunay edges
iter=0;
while (size(non_loc_del_edges)(1)>0)
//while (%F)
iter=iter+1;
printf("============ ITERATION %3d ==============\n",iter)
[convexHull]=EdgeFlip(convexHull,non_loc_del_edges)
non_loc_del_edges = ListNonLocallyDelaunayEdges(convexHull,points);
if (iter==0) then
//temp_nlde=non_loc_del_edges
//temp_convexHull=convexHull
disp(non_loc_del_edges)
disp(convexHull)
end
end
//temp_nlde=non_loc_del_edges
//while (size(non_loc_del_edges)(1)>0)
//end
scf(0)
clf(0)
subplot(321)
scatter(points(1:N,1),points(1:N,2),,"black",".")
a=gca();
a.axes_visible = ["off" "off" "off"];
//a.box = "off"
a.data_bounds = [-0.1,-0.1;1.1,1.1]
subplot(322)
plot2d(points(1:N,1),points(1:N,2))
scatter(points(1:N,1),points(1:N,2),,"black",".")
a=gca();
a.axes_visible = ["off" "off" "off"];
a.box = "on"
a.data_bounds = [-0.1,-0.1;1.1,1.1]
subplot(323)
plot2d(lexpoints(1:N,1),lexpoints(1:N,2))
scatter(lexpoints(1:N,1),lexpoints(1:N,2),,"black",".")
a=gca();
a.axes_visible = ["off" "off" "off"];
a.box = "on"
a.data_bounds = [-0.1,-0.1;1.1,1.1]
subplot(324)
for t=1:(size(lexi_convexHull)(1))
firstTri=[
points(lexi_convexHull(t,1),:)
points(lexi_convexHull(t,2),:)
points(lexi_convexHull(t,3),:)
points(lexi_convexHull(t,1),:)
]
plot2d(firstTri(:,1),firstTri(:,2))
end
scatter(lexpoints(1:N,1),lexpoints(1:N,2),,"black",".")
a=gca();
a.axes_visible = ["off" "off" "off"];
a.box = "on"
a.data_bounds = [-0.1,-0.1;1.1,1.1]
subplot(325)
for t=1:(size(temp_convexHull)(1))
firstTri=[
points(temp_convexHull(t,1),:)
points(temp_convexHull(t,2),:)
points(temp_convexHull(t,3),:)
points(temp_convexHull(t,1),:)
]
id=color("green")
plot2d(firstTri(:,1),firstTri(:,2),id)
xstring(mean(firstTri(:,1)),mean(firstTri(:,2)),string(t))
id=color("gray")
t=get("hdl")
t.font_foreground=id
end
id=color("red")
for k=1:size(temp_nlde)(1)
edge=temp_nlde(k,:)
plotPoints=[points(edge(1),:); points(edge(2),:)];
plot2d(plotPoints(:,1),plotPoints(:,2),id)
end
scatter(lexpoints(1:N,1),lexpoints(1:N,2),,"black",".")
dx=0.00
dy=-0.05
xstring(lexpoints(1:N,1)+dx,lexpoints(1:N,2)+dy,string(lexlist(1:N)))
a=gca();
a.axes_visible = ["off" "off" "off"];
a.box = "on"
a.data_bounds = [-0.1,-0.1;1.1,1.1]
subplot(326)
for t=1:(size(convexHull)(1))
firstTri=[
points(convexHull(t,1),:)
points(convexHull(t,2),:)
points(convexHull(t,3),:)
points(convexHull(t,1),:)
]
plot2d(firstTri(:,1),firstTri(:,2))
end
scatter(lexpoints(1:N,1),lexpoints(1:N,2),,"black",".")
a=gca();
a.axes_visible = ["off" "off" "off"];
a.box = "on"
a.data_bounds = [-0.1,-0.1;1.1,1.1]
scf(1)
clf(1)
for t=1:(size(convexHull)(1))
firstTri=[
points(convexHull(t,1),:)
points(convexHull(t,2),:)
points(convexHull(t,3),:)
points(convexHull(t,1),:)
]
//id=color("green")
plot2d(firstTri(:,1),firstTri(:,2))
dx=-0.005
dy=-0.015
xstring(mean(firstTri(:,1))+dx,mean(firstTri(:,2))+dy,string(t))
id=color("gray")
t=get("hdl")
t.font_foreground=id
end
circsize = 4;
xc=zeros(circsize,1); yc=zeros(circsize,1); r=zeros(circsize,1);
ex= 0.588; ey= 0.695;
xc(1)= 0.664; yc(1)= 0.662; r(1)= 0.163;
xc(2)= 0.571; yc(2)= 0.692; r(2)= 0.196;
xc(3)= 0.382; yc(3)= 0.555; r(3)= 0.282;
xc(4)= 0.382; yc(4)= 0.656; r(4)= 0.286;
scatter(lexpoints(1:N,1),lexpoints(1:N,2),,"black",".")
scatter(xc,yc,,"red","+")
scatter([ex; ex],[ey; ey],,"green",".")
dx=0.005
dy=-0.01
xstring(lexpoints(1:N,1)+dx,lexpoints(1:N,2)+dy,string(lexlist(1:N)-1))
a=gca();
//a.axes_visible = ["off" "off" "off"];
a.box = "on"
a.data_bounds = [-0.1,-0.1;1.1,1.1]
scf(2)
clf(2)
ponts = zeros(10,3);
ponts(1,1)= 0.018; ponts(1,2)= 0.977; ponts(1,3)=1
ponts(2,1)= 0.140; ponts(2,2)= 0.699; ponts(2,3)=2
ponts(3,1)= 0.515; ponts(3,2)= 0.306; ponts(3,3)=3
ponts(4,1)= 0.907; ponts(4,2)= 0.976; ponts(4,3)=4
ponts(5,1)= 0.551; ponts(5,2)= 0.887; ponts(5,3)=5
ponts(6,1)= 0.835; ponts(6,2)= 0.043; ponts(6,3)=6
ponts(7,1)= 0.751; ponts(7,2)= 0.279; ponts(7,3)=7
ponts(8,1)= 0.625; ponts(8,2)= 0.504; ponts(8,3)=8
ponts(9,1)= 0.726; ponts(9,2)= 0.812; ponts(9,3)=9
ponts(10,1)= 0.771; ponts(10,2)= 0.539; ponts(10,3)=10
cHull = [ 1 4 0];
cHull=[cHull; 1 7 4]
cHull=[cHull; 7 1 2]
cHull=[cHull; 7 8 4]
cHull=[cHull; 2 6 7]
cHull=[cHull; 7 9 8]
cHull=[cHull; 9 7 6]
cHull=[cHull; 2 5 6]
cHull=[cHull; 5 9 6]
cHull=[cHull; 5 3 9]
cHull=[cHull; 3 8 9]
cHull=[cHull; 3 4 8]
cHull=[cHull; 3 0 4]
for t=1:(size(cHull)(1))
firstTri=[
ponts(cHull(t,1)+1,:)
ponts(cHull(t,2)+1,:)
ponts(cHull(t,3)+1,:)
ponts(cHull(t,1)+1,:)
]
//id=color("green")
plot2d(firstTri(:,1),firstTri(:,2))
dx=-0.005
dy=-0.015
xstring(mean(firstTri(:,1))+dx,mean(firstTri(:,2))+dy,string(t))
id=color("gray")
t=get("hdl")
t.font_foreground=id
end
scatter(ponts(1:N,1),ponts(1:N,2),,"black",".")
dx=0.005
dy=-0.01
xstring(ponts(1:N,1)+dx,ponts(1:N,2)+dy,string(ponts(1:N,3)-1))
a=gca();
//a.axes_visible = ["off" "off" "off"];
a.box = "on"
a.data_bounds = [-0.1,-0.1;1.1,1.1]
printf("Bye\n")
|
dc28007dbfe5c0f3f7ab8fea286436c7301da09a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/812/CH8/EX8.05/8_05.sce
|
7d3d6eac68b527c7fe6acbf196976026c21f11a6
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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
|
8_05.sce
|
//required//
pathname=get_absolute_file_path('8.05.sce')
filename=pathname+filesep()+'8.05-data.sci'
exec(filename)
//Reservoir depth required to maintain flow(in m):
D1=8*Q^2/(%pi)^2/D^4/g*(f*L/D+K+1)
//Reynolds number:
Re=4*d*Q/((%pi)*u*D)
printf("\n\nRESULTS\n\n")
printf("\n\nReservoir depth required to maintain flow: %.3f m\n\n",D1)
|
382f7880f752ce5e6316e3ea75f6aaf55d11428c
|
99b4e2e61348ee847a78faf6eee6d345fde36028
|
/Toolbox Test/eqtflength/eqtflength4.sce
|
9f8a973b93fe664aeed8db15d8a247c173b74255
|
[] |
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
| 269
|
sce
|
eqtflength4.sce
|
num=[1 0.5 50 5];
n=[1 3 4 5];
den=[1 0.75 0.6 0];
[b,a]=eqtflength(num,den,n);
disp(b);
disp(a);
//output
//[b,a]=eqtflength(num,den,n);
// !--error 58
//Wrong number of input arguments.at line 4 of exec file called by : //length4.sce', -1
|
925fcde9d443a0f6954f9f4afb7e5afc54a86ce8
|
c89c3eb73e1c7b9f26076ad36749b4fd9ee2a69d
|
/My Implementations/FullAdder.tst
|
6504c935257f779401b950d7e41d9476d98f79b4
|
[] |
no_license
|
gvela024/Elements-Of-Computing-Systems
|
cef0f824a4ca775ff7d2353a49c6510134db83da
|
65a2b40979439b0d77e6fab1b3faa4b1a78ddd03
|
refs/heads/master
| 2021-01-22T03:13:48.244660
| 2015-12-26T00:53:51
| 2015-12-26T00:53:51
| 41,272,979
| 0
| 0
| null | 2015-11-11T22:27:40
| 2015-08-24T00:17:59
|
Assembly
|
UTF-8
|
Scilab
| false
| false
| 494
|
tst
|
FullAdder.tst
|
load FullAdder.hdl,
output-file FullAdder.out,
output-list in0%D1.2.1 in1%D1.2.1 in2%D1.2.1 sum%D1.2.1 carry%D2.2.2;
set in0 0, set in1 0, set in2 0, eval, output;
set in0 0, set in1 0, set in2 1, eval, output;
set in0 0, set in1 1, set in2 0, eval, output;
set in0 0, set in1 1, set in2 1, eval, output;
set in0 1, set in1 0, set in2 0, eval, output;
set in0 1, set in1 0, set in2 1, eval, output;
set in0 1, set in1 1, set in2 0, eval, output;
set in0 1, set in1 1, set in2 1, eval, output;
|
a692c35bf9c15577a0b2a57d4f0c68dbbbc9d003
|
78de1b37ac7fbc77bc00584d6677402639eb8ccf
|
/Ex_9_4.sce
|
e13b899bc5ab5317337e8546a905904f518b0077
|
[] |
no_license
|
devanshmody/c-c-programs
|
de25f17728b488bb5245342338d303d968f2ee05
|
7405239f4fc792a1382d7726cb1aaeffc3e740a8
|
refs/heads/main
| 2023-04-16T14:11:06.271935
| 2021-05-05T09:39:48
| 2021-05-05T09:39:48
| 364,526,778
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 195
|
sce
|
Ex_9_4.sce
|
//Example 9.4
clc;clear;close;
z=poly(0,'z');
Hz=2*(z+2)/(z*(z-0.1)*(z+0.5)*(z+0.4));
H=dscr(Hz);
disp(Hz,'System Function H(z)=');
disp(H,'System Function for cascade realisation Hk(z)=');
|
bfa7e4dcc3ce177b1b8505abcbc2cda9a4f73f3b
|
fbd17575bab2ee4dc49cc7d13b5b94d24ab9482c
|
/TP5/test_ex2.sci
|
49513017fdc4b5ce2e004cf79d4e47b241375cb0
|
[] |
no_license
|
1saac-W/MT09-Analyse-Num-rique
|
05b509981dfa00e3b7b550716b1487cbbf0a3fed
|
0853f8053254f5dd23179073187ada3d936aff84
|
refs/heads/master
| 2020-09-27T04:34:36.549125
| 2020-01-05T16:02:18
| 2020-01-05T16:02:18
| 226,431,201
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 263
|
sci
|
test_ex2.sci
|
exec './newton.sci';
exec './foncjac_ex2.sci'
tol = 1e-6;
N = 1000;
x0 = [1, 1]';
[X0, k0] = newton(foncjac, tol, N, x0);
x1 = [-1, 0]';
[X1, k1] = newton(foncjac, tol, N, x1);
x2 = [30, 30]';
[X2, k2] = newton(foncjac, tol, N, x2);
plot(X1(1,:),X1(2,:),'r*');
|
faa5fc222d80b4cceeada72e120c02be800c5cc7
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/629/CH7/EX7.2/example7_2.sce
|
6d2594101271b630cd31212a655195b20f8cf205
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 596
|
sce
|
example7_2.sce
|
clear
clc
//Example 7.2 PRESSURE IN A PIPE
//Energy equation, (p1/gamma)+(alpha1*V1^2/2g)+hp=(p2/gamma)+(alpha2*V2^2/2g)+ht+hL
p1=0; //pressure at top of reservoir is p_atm=0
ht=0;
hp=0;
V1=0;
Gamma=9810; //specific weight[N/m^3]
alpha2=1;
z1=100; //[m]
z2=20; //[m]
L=2000; //[m]
D=0.2; //diameter[m]
A=%pi*D^2/4 //area[m^2]
Q=0.06; //rate of flow[m^3/s]
g=9.81; //[m/s^2]
V2=Q/A //[m/s]
hL=(0.02*(L/D)*V2^2)/(2*g) //head loss[m]
p2=p1+Gamma*((z1-z2)+hp-ht-hL-(alpha2*V2^2)/(2*g))/10^3 //pressure at L[kPa]
printf("\nThe pressure in the pipe at L=2000m is = %.f kPa.\n",p2)
|
ec74507a55a4f02832a53eb0f7de287985aeed4b
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/243/CH4/EX4.11/4_11.sce
|
ec56325c97a7c945b612a8752c8c031e94eb328b
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 622
|
sce
|
4_11.sce
|
//Example No. 4_11
//Addition of Chain of Numbers
//Pg No. 77
clear ; close ; clc ;
x = 9678 ;
y = 678 ;
z = 78 ;
d = 4 ; //length of mantissa
fx = x/10^4
fy = y/10^4
fu = fx + fy
Eu = 4
if fu >= 1 then
fu = fu/10
Eu = Eu + 1
end
//since length of mantissa is only four we need to maintain only four places in decimal, so
fu = floor(fu*10^4)/10^4
u = fu * 10^Eu
w = u + z
n = length(string(w))
w = floor(w/10^(n-4))*10^(n-4) //To maintain length of mantissa = 4
disp(w,'w = ')
True_w = 10444
ew = True_w - w
er_w = (True_w - w)/True_w
disp(er_w,'er,w = ',ew,'ew = ',True_w,'True w = ')
|
92a69a1bfdb6a86daf9cb29aee68774f12d21767
|
1db0a7f58e484c067efa384b541cecee64d190ab
|
/macros/cummax.sci
|
672dc5c81ce61697a5b450deb9f30ae5378d6fab
|
[] |
no_license
|
sonusharma55/Signal-Toolbox
|
3eff678d177633ee8aadca7fb9782b8bd7c2f1ce
|
89bfeffefc89137fe3c266d3a3e746a749bbc1e9
|
refs/heads/master
| 2020-03-22T21:37:22.593805
| 2018-07-12T12:35:54
| 2018-07-12T12:35:54
| 140,701,211
| 2
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 5,714
|
sci
|
cummax.sci
|
function M = cummax(varargin)
// Cumulative maximum
//
// Calling Sequence
// M = cummax(A)
// returns the cumulative maximum of the arguments of A. The dimension
// of M is same as the dimension of A. If A is a 2D matrix, the operation
// is performed along the columns. For a hypermatrix, the operation is
// performed along the first non-zero dimension
// M = cummax(A,dim)
// The operation is performed along the dimension specified by dim
// M = cummax(_,direction)
// direction specifies as the direction of operation
//
// Parameters
// A - real|complex numbers - vector|matrix
// Input Array
// For complex elements, cummax compares the magnitude of elements. If
// the magnitude are same, phase angles are compared.
// dim - positive integer - scalar
// Dimension to operate along
// If no dimension is specified, then the default value is the first
// array dimension whose value is greater than 1
// direction - string flag - 'forward' (default) or 'reverse'
// Direction of cumulation
// If the direction is forward, cummax works from 1 to end of the active
// dimension. Otherwise, it works in the opposite sense
//
// Examples
// 1) Cumulative maximum values in a vector
// v = [8 9 1 10 6 1 3 6 10 10]
// M = cummax(v)
//
// Expected output: [8 8 1 1 1 1 1 1 1 1]
//
// Authors
// Ayush Baid
//
// See Also
// cummax | cumprod | cumsum | max | max
[numOutArgs,numInArgs] = argn(0);
// ** Checking number of arguments
if numInArgs<1 | numInArgs>3 then
msg = "cummax: Wrong number of input argument; 1-6 expected";
error(77,msg);
end
if numOutArgs~=1 then
msg = "cummax: Wrong number of output argument; 1 expected";
error(78,msg);
end
// ** Parsing input args **
// defining default arguments
isForward = %t;
dim = [];
directionArg = "";
A = varargin(1);
// A should contain numeric entries
if ~(type(A)==1 | type(A)==8 | type(A)==17) then
msg = "cummax: Wrong type for argument #1 (A); Real or complex entries expected ";
error(53,msg);
end
if numInArgs>1 then
temp = varargin(2);
if type(temp)==10 then
// it is the direction argument
directionArg = temp;
elseif type(temp)==1 | type(temp)==8 then
dim = int(temp);
else
msg = "cummax: Wrong type for argument #2; Either dim (integer) or direction (string) expected";
error(53,msg);
end
end
if numInArgs>2 then
directionArg = varargin(3);
if type(directionArg)~=10 then
msg = "cummax: Wrong type for argument #3 (direction); String expected";
error(53,msg);
end
end
if isempty(dim) then
dimArray = 1:ndims(A);
dim = find(size(A)~=1,1);
end
// additional checks on dim
if size(A,dim)==1 then
M = A;
return
end
// extracting direction
if strcmpi(directionArg,"reverse")==0 then
isForward = %f;
elseif strcmpi(directionArg,"forward")==0 then
isForward = %t;
elseif strcmpi(directionArg,"")~=0 then
msg = "cummax: Wrong value for argument #3 (direction)";
error(53,msg);
end
sizeA = size(A);
sizeDim = size(A,dim);
// restructuring A into a 3D matrix with the specified dimension as the middle elements
leftSize = prod(sizeA(1:dim-1));
rightSize = prod(sizeA(dim+1:$));
middleSize = sizeDim;
A_ = matrix(A,[leftSize,middleSize,rightSize]);
M_ = zeros(leftSize,middleSize,rightSize);
for i=1:leftSize
for j=1:rightSize
M_(i,:,j) = cummaxVec(A_(i,:,j),isForward);
end
end
M = matrix(M_,sizeA);
endfunction
function out = cummaxVec(inp,isForward)
// performs cummax on vector inputs
if isForward then
startIndex=1;
endIndex = length(inp);
step = 1;
else
startIndex=length(inp);
endIndex = 1;
step = -1;
end
out(startIndex) = inp(startIndex);
if isreal(inp) then
for i=startIndex+step:step:endIndex
if isnan(out(i-step)) then
out(i) = inp(i);
elseif inp(i)>=out(i-step) then
out(i) = inp(i);
else
out(i) = out(i-step);
end
end
else
magVec = abs(inp);
phaseVec = atan(imag(inp),real(inp));
// phase - first compare absolute value; then give priority to positive phases
prevMag = magVec(startIndex);
prevPhase = phaseVec(startIndex);
for i=(startIndex+step):step:endIndex
if isnan(out(i-step)) then
out(i) = inp(i);
prevMag = magVec(i);
prevPhase = phaseVec(i);
elseif magVec(i)>prevMag then
out(i) = inp(i);
prevMag = magVec(i);
prevPhase = phaseVec(i);
elseif magVec(i)<prevMag then
out(i) = out(i-step);
else
if phaseVec(i)>prevPhase then
out(i) = inp(i);
prevMag = magVec(i);
prevPhase = phaseVec(i);
else
out(i) = out(i-step);
end
end
end
end
endfunction
|
8da971cc5a8100d2a5071c55e3556f0ab2cab4ba
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2777/CH3/EX3.16/Ex3_16.sce
|
7286b30852ba600e3d93e46ee9a7f914b7aba73b
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,422
|
sce
|
Ex3_16.sce
|
// ELECTRICAL MACHINES
// R.K.Srivastava
// First Impression 2011
// CENGAGE LEARNING INDIA PVT. LTD
// CHAPTER : 3 : TRANSFORMERS
// EXAMPLE : 3.16
clear ; clc ; close ; // Clear the work space and console
// GIVEN DATA
S = 20 * 10 ^ 3; // Rating of the Step-down Transformer in VA
f = 50; // Frequency in Hertz
V = 200; // Normally supplied Voltage of Step-down Transformer in Volts
Vsc = 100; // Potential difference when Secondary being Short- Circuited in Volts
Isc = 10; // Primary Current when Secondary being Short- Circuited in Amphere
Cos_theta_sc = 0.28; // Power factor when Secondary being Short- Circuited
// CALCULATIONS
I = S/V; // Rated primary current in Amphere
Wsc = Vsc * Isc * Cos_theta_sc; // Power loss when Secondary being Short- Circuited in Watts
R = Wsc/(Isc ^ 2); // Resistance of Transformer referred to primary side in Ohms
Z = Vsc/Isc; // Referred Impedence in Ohms
X = sqrt((Z^2)-(R^2)); // Leakage Reactance referred to primary side in Ohms
Er = (I*R)/V; // Per unit Resistance in Ohms
Ex = (I*X)/V; // Per unit Reactance in Ohms
Cos_theta1 = 1.0; // Unity Power factor
Cos_theta2 = 0.6; // 0.6 Power factor Lagging
Cos_theta3 = 0.6; // 0.6 Power factor Leading
Sin_theta1 = 0.0; // Unity Power factor
Sin_theta2 = 0.8; // 0.6 Power factor Lagging
Sin_theta3 = 0.8; // 0.6 Power factor Leading
E1 = (Er*Cos_theta1)+(Ex*Sin_theta1); // pu Regulation at Unity Power factor
E2 = (Er*Cos_theta2)+(Ex*Sin_theta2); // pu Regulation at 0.6 Power factor Lagging
E3 = (Er*Cos_theta3)-(Ex*Sin_theta3); // pu Regulation at 0.6 Power factor Leading
// DISPLAY RESULTS
disp("EXAMPLE : 3.16 : SOLUTION :-") ;
printf("\n (a) pu Regulation at Unity Power factor , E = %.1f \n ",E1);
printf("\n (b) pu Regulation at 0.6 Power factor Lagging , E= % .2f \n",E2);
printf("\n (c) pu Regulation at 0.6 Power factor Leading , E= % .2f \n",E3);
|
3956a815f1fbb9d5122ac570ed4c02734d488a44
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2183/CH7/EX7.10/Ex_7_10.sce
|
a4e4aacaac505598074311a994f4801230379dd9
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 179
|
sce
|
Ex_7_10.sce
|
//Example 7.10 // Bandwidth
clc;
clear;
close;
//given data :
t_tr=100;// in ps
tau_rc=100;// in ps
BW=(1/(2*%pi*(t_tr+tau_rc)*10^-12))*10^-9;
disp(BW,"Bandwidth,BW(G bit/s) = ")
|
22cae996f4b5eaa5aa1d18b67dd946e0c0218f38
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1427/CH18/EX18.39/18_39.sce
|
963c1976de02c8ab93296cf6a93b58b2a074704c
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 430
|
sce
|
18_39.sce
|
//ques-18.39
//Calculating values of q and w and U for conversion of water to steam
clc
n=1;//moles of water
P=1;//pressure (in atm)
L=540;//latent heat of steam (in cal/g)
T1=273; T2=373;//temperature (in K)
V1=22.4;//volume (in L)
q=n*18*L;
V2=(V1*T2)/T1;
w=-P*V2;//neglecting V1 (in L atm)
w=w*24.2;//(in cal)
U=q+w;
printf("q=%.2f kcal, w=%.1f cal and change in internal energy is %.4f kcal.",q/1000,w,U/1000);0
|
b78d4fdeca26936881feccb01db0cdade86c65d3
|
1bb72df9a084fe4f8c0ec39f778282eb52750801
|
/test/SH8.prev.tst
|
a6689cb2439022ca0926145fe8e4067c098f1e07
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
gfis/ramath
|
498adfc7a6d353d4775b33020fdf992628e3fbff
|
b09b48639ddd4709ffb1c729e33f6a4b9ef676b5
|
refs/heads/master
| 2023-08-17T00:10:37.092379
| 2023-08-04T07:48:00
| 2023-08-04T07:48:00
| 30,116,803
| 2
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 285
|
tst
|
SH8.prev.tst
|
expression: sin(cos(tan(cot(1))) + e^Pi^i^0
postfix1: ;sin(;cos(;tan(;cot(;1;cot);tan);cos);e;Pi;i;0;^;^;^;+;sin)
rebuilt1: sin(cos(tan(cot(1)))+e^(Pi^(i^0)))
postfix2: ;sin(;cos(;tan(;cot(;1;cot);tan);cos);e;Pi;i;0;^;^;^;+;sin)
rebuilt2: sin(cos(tan(cot(1)))+e^(Pi^(i^0)))
same
|
0499d804360f4c6c917837947ed9e72432ed5f06
|
1b969fbb81566edd3ef2887c98b61d98b380afd4
|
/Rez/bivariate-lcmsr-post_mi/bfi_hp8_aspfin/~BivLCM-SR-bfi_hp8_aspfin-PLin-VLin.tst
|
7e893c7e30cc5ffa52d91b7d627ba5d53c198b5e
|
[] |
no_license
|
psdlab/life-in-time-values-and-personality
|
35fbf5bbe4edd54b429a934caf289fbb0edfefee
|
7f6f8e9a6c24f29faa02ee9baffbe8ae556e227e
|
refs/heads/master
| 2020-03-24T22:08:27.964205
| 2019-03-04T17:03:26
| 2019-03-04T17:03:26
| 143,070,821
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 11,974
|
tst
|
~BivLCM-SR-bfi_hp8_aspfin-PLin-VLin.tst
|
THE OPTIMIZATION ALGORITHM HAS CHANGED TO THE EM ALGORITHM.
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
1 2 3 4 5
________ ________ ________ ________ ________
1 0.234004D+00
2 -0.333790D-02 0.185874D-02
3 -0.724884D-01 0.105433D-02 0.525994D+00
4 0.202529D-02 -0.401733D-03 -0.832836D-02 0.399858D-02
5 -0.102070D-03 -0.365039D-04 -0.863508D-03 0.163090D-04 0.235449D-02
6 -0.408148D-03 0.885570D-04 0.800931D-04 -0.908100D-04 -0.830392D-04
7 -0.120208D-02 0.130853D-03 0.337044D-03 0.643399D-04 -0.190944D-03
8 0.175493D-02 0.586301D-04 -0.157759D-02 0.174632D-04 -0.266555D-03
9 -0.291469D+00 0.323669D-02 -0.187217D+00 -0.254210D-02 0.373291D-01
10 -0.206618D+00 -0.448279D-02 0.383158D+00 0.321911D-02 0.110467D+00
11 0.311821D-01 0.391374D-02 -0.101277D+00 0.219080D-01 0.108924D-01
12 -0.287612D+00 0.659796D-02 0.772470D+00 0.135244D-01 0.390776D-01
13 -0.496385D-01 -0.540473D-02 0.137495D+00 -0.392542D-02 -0.722421D-02
14 -0.101181D+00 0.223513D-01 0.116558D+00 -0.219841D-01 -0.117318D-01
15 -0.102272D+01 0.240623D-01 0.462227D+00 0.437778D-03 -0.598045D-01
16 -0.239081D-01 -0.223518D-02 -0.142068D-02 0.466166D-03 0.296503D-03
17 0.333458D-02 -0.517805D-03 -0.299803D-03 -0.156109D-03 -0.579131D-03
18 0.723162D+00 0.293682D-01 0.611862D-01 -0.339688D-02 0.230792D-01
19 0.497382D-01 0.140178D-01 -0.114169D+00 0.455193D-02 -0.990082D-03
20 0.262347D+00 -0.300496D-01 0.342910D+01 -0.180681D-01 0.167104D-01
21 -0.382165D-01 -0.110910D-01 0.749764D-01 0.101020D-02 0.164878D-02
22 -0.302248D-02 -0.328914D-03 0.226080D-02 -0.770326D-04 -0.155257D-04
23 -0.762664D-02 0.138835D-02 0.661162D-01 0.627400D-02 0.170404D-02
24 0.222859D-03 -0.206304D-04 -0.106450D-01 0.764817D-03 0.233210D-04
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
6 7 8 9 10
________ ________ ________ ________ ________
6 0.957733D-03
7 0.781573D-03 0.338837D-02
8 -0.573031D-03 -0.911733D-03 0.339407D-02
9 0.128730D-01 0.513254D-01 -0.352355D-01 0.397228D+02
10 -0.767312D-02 -0.224526D-01 -0.223455D-01 0.924897D+00 0.154437D+02
11 0.187971D-01 -0.107236D-01 0.128003D-01 -0.301386D+01 0.649228D+00
12 0.374108D-01 -0.245166D-03 -0.661148D-01 0.210538D+01 0.488906D+01
13 0.574305D-01 0.110695D+00 -0.595254D-01 0.140208D+01 -0.719839D+00
14 -0.349382D-01 -0.853742D-02 0.278197D+00 -0.347492D-01 0.383456D-01
15 0.230936D-02 0.885713D-02 0.170386D-01 -0.602807D+01 -0.748231D+01
16 -0.139744D-02 0.794577D-03 0.530120D-03 0.637000D+00 -0.865229D-01
17 0.262926D-03 -0.101074D-03 -0.359400D-03 -0.619445D-01 -0.191175D-01
18 -0.226297D-01 -0.498823D-01 -0.478396D-04 -0.240285D+01 0.162091D+01
19 -0.122608D-01 0.133676D-01 0.348031D-02 -0.200962D+00 -0.291941D+00
20 0.506009D-01 0.595844D-01 -0.382096D+00 0.141901D+01 0.935920D+01
21 0.148731D-01 -0.954096D-02 -0.781030D-02 -0.523487D+00 0.271966D+00
22 -0.465088D-03 -0.730211D-03 0.601739D-03 0.504105D-01 -0.400192D-02
23 0.123238D-02 0.801640D-03 -0.305900D-02 0.544773D+00 0.303648D+00
24 -0.331629D-03 -0.121697D-03 0.471434D-03 -0.641988D-01 -0.335225D-01
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
11 12 13 14 15
________ ________ ________ ________ ________
11 0.350496D+02
12 -0.695940D+01 0.124438D+03
13 -0.213772D+01 0.393130D+01 0.123475D+02
14 0.135069D+01 -0.189273D+02 -0.707863D+01 0.853927D+02
15 0.241643D+00 0.607026D+01 0.116748D+01 0.639451D+00 0.138324D+03
16 -0.470524D-01 0.186796D-01 0.453041D-01 -0.142376D+00 0.745400D+00
17 0.116607D-01 -0.255674D-01 -0.819969D-02 0.469315D-02 -0.734527D+00
18 -0.276239D+01 0.765907D+01 -0.294977D+01 0.438918D+01 -0.260017D+02
19 -0.487765D+00 -0.190307D+01 -0.623061D+00 0.659693D+00 0.479204D+00
20 -0.110660D+02 0.167009D+02 0.964181D+01 -0.696443D+02 0.348672D+01
21 0.124801D+01 0.269308D+01 0.675469D+00 -0.832579D+00 -0.155494D+00
22 -0.581620D-01 -0.138951D+00 -0.368918D-01 0.357438D-01 0.536664D-01
23 -0.227611D+00 0.172993D+01 0.162496D+00 -0.316545D+00 -0.195971D+00
24 0.584076D-01 -0.297483D+00 -0.264821D-01 0.170905D-01 0.354902D-04
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
16 17 18 19 20
________ ________ ________ ________ ________
16 0.212371D+00
17 -0.146212D-01 0.890106D-02
18 -0.269400D+00 0.508106D-01 0.174128D+03
19 0.113076D-01 -0.232575D-01 0.367187D+00 0.534871D+01
20 -0.296536D+00 0.683136D-01 -0.464049D+02 0.431982D+01 0.602810D+03
21 -0.153164D+00 0.292739D-01 0.153370D+01 -0.473884D+01 -0.597541D+01
22 0.646496D-02 -0.957283D-03 -0.731946D+00 -0.905996D-02 0.352479D-01
23 0.262545D-01 -0.329048D-02 -0.859387D+00 -0.211435D-01 0.565179D+01
24 -0.343009D-02 -0.239806D-03 0.715166D-01 -0.290206D-01 -0.250313D+01
ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES
21 22 23 24
________ ________ ________ ________
21 0.544487D+01
22 -0.489462D-01 0.878779D-02
23 -0.217828D+00 0.940074D-02 0.114345D+01
24 0.535465D-01 -0.765120D-04 -0.922665D-01 0.291168D-01
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
1 2 3 4 5
________ ________ ________ ________ ________
1 1.000
2 -0.160 1.000
3 -0.207 0.034 1.000
4 0.066 -0.147 -0.182 1.000
5 -0.004 -0.017 -0.025 0.005 1.000
6 -0.027 0.066 0.004 -0.046 -0.055
7 -0.043 0.052 0.008 0.017 -0.068
8 0.062 0.023 -0.037 0.005 -0.094
9 -0.096 0.012 -0.041 -0.006 0.122
10 -0.109 -0.026 0.134 0.013 0.579
11 0.011 0.015 -0.024 0.059 0.038
12 -0.053 0.014 0.095 0.019 0.072
13 -0.029 -0.036 0.054 -0.018 -0.042
14 -0.023 0.056 0.017 -0.038 -0.026
15 -0.180 0.047 0.054 0.001 -0.105
16 -0.107 -0.113 -0.004 0.016 0.013
17 0.073 -0.127 -0.004 -0.026 -0.127
18 0.113 0.052 0.006 -0.004 0.036
19 0.044 0.141 -0.068 0.031 -0.009
20 0.022 -0.028 0.193 -0.012 0.014
21 -0.034 -0.110 0.044 0.007 0.015
22 -0.067 -0.081 0.033 -0.013 -0.003
23 -0.015 0.030 0.085 0.093 0.033
24 0.003 -0.003 -0.086 0.071 0.003
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
6 7 8 9 10
________ ________ ________ ________ ________
6 1.000
7 0.434 1.000
8 -0.318 -0.269 1.000
9 0.066 0.140 -0.096 1.000
10 -0.063 -0.098 -0.098 0.037 1.000
11 0.103 -0.031 0.037 -0.081 0.028
12 0.108 0.000 -0.102 0.030 0.112
13 0.528 0.541 -0.291 0.063 -0.052
14 -0.122 -0.016 0.517 -0.001 0.001
15 0.006 0.013 0.025 -0.081 -0.162
16 -0.098 0.030 0.020 0.219 -0.048
17 0.090 -0.018 -0.065 -0.104 -0.052
18 -0.055 -0.065 0.000 -0.029 0.031
19 -0.171 0.099 0.026 -0.014 -0.032
20 0.067 0.042 -0.267 0.009 0.097
21 0.206 -0.070 -0.057 -0.036 0.030
22 -0.160 -0.134 0.110 0.085 -0.011
23 0.037 0.013 -0.049 0.081 0.072
24 -0.063 -0.012 0.047 -0.060 -0.050
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
11 12 13 14 15
________ ________ ________ ________ ________
11 1.000
12 -0.105 1.000
13 -0.103 0.100 1.000
14 0.025 -0.184 -0.218 1.000
15 0.003 0.046 0.028 0.006 1.000
16 -0.017 0.004 0.028 -0.033 0.138
17 0.021 -0.024 -0.025 0.005 -0.662
18 -0.035 0.052 -0.064 0.036 -0.168
19 -0.036 -0.074 -0.077 0.031 0.018
20 -0.076 0.061 0.112 -0.307 0.012
21 0.090 0.103 0.082 -0.039 -0.006
22 -0.105 -0.133 -0.112 0.041 0.049
23 -0.036 0.145 0.043 -0.032 -0.016
24 0.058 -0.156 -0.044 0.011 0.000
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
16 17 18 19 20
________ ________ ________ ________ ________
16 1.000
17 -0.336 1.000
18 -0.044 0.041 1.000
19 0.011 -0.107 0.012 1.000
20 -0.026 0.029 -0.143 0.076 1.000
21 -0.142 0.133 0.050 -0.878 -0.104
22 0.150 -0.108 -0.592 -0.042 0.015
23 0.053 -0.033 -0.061 -0.009 0.215
24 -0.044 -0.015 0.032 -0.074 -0.597
ESTIMATED CORRELATION MATRIX FOR PARAMETER ESTIMATES
21 22 23 24
________ ________ ________ ________
21 1.000
22 -0.224 1.000
23 -0.087 0.094 1.000
24 0.134 -0.005 -0.506 1.000
|
8920a84071098592be88b2b0671ca43472e48aab
|
a56c819cac1642277378ae343dfd64119c07195a
|
/BatallaNaval.sce
|
bc7fe978fca29601f7d322aebcf10bd860c52ae5
|
[] |
no_license
|
masebato/Batalla-naval-scilab
|
cbac8749d44d5370a7e142f39ff95713b8ced4a0
|
bfe8de38454d66ad7aa63b421e35616400d3f8e6
|
refs/heads/master
| 2021-05-20T09:03:18.148618
| 2020-04-03T22:35:37
| 2020-04-03T22:35:37
| 252,213,279
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 3,729
|
sce
|
BatallaNaval.sce
|
function Batalla()
/* Creacion de tablero en una matriz 10x10--> JUGADOR 1*/
a=floor(rand(10,10)*(0)+0)
coordenada=[];
for i= 1:3
x=0;
y=0;
while (10-x)>=5 && (10-y)>=5
x=floor(rand(1,1)*(10-1))+1;
y=floor(rand(1,1)*(10-1))+1;
end
bandera=floor(rand(1,1)*(3-1))+1;
disp(bandera);
disp(x);
disp(y);
a(x,y)=1;
select i
case 1 then
for i=1:4
if bandera <>1 then
a(x,y+i)=1;
else
a(x+i,y)=1;
end
end
case 2 then
for i=1:3
if bandera <>1 then
a(x,y+i)=1;
else
a(x+i,y)=1;
end
end
case 3 then
for i=1:2
if bandera <>1 then
a(x,y+i)=1;
else
a(x+i,y)=1;
end
end
end
end
disp("Jugador 1");
disp(a);
b=floor(rand(10,10)*(0)+0)
for i= 1:3
x=0;
y=0;
while (10-x)>=5 && (10-y)>=5
x=floor(rand(1,1)*(10-1))+1;
y=floor(rand(1,1)*(10-1))+1;
end
bandera=floor(rand(1,1)*(3-1))+1;
b(x,y)=1;
select i
case 1 then
for i=1:4
if bandera <>1 then
b(x,y+i)=1;
else
b(x+i,y)=1;
end
end
case 2 then
for i=1:3
if bandera <>1 then
b(x,y+i)=1;
else
b(x+i,y)=1;
end
end
case 3 then
for i=1:2
if bandera <>1 then
a(x,y+i)=1;
else
a(x+i,y)=1;
end
end
end
end
disp("Jugador 2:")
disp(b);
disparox=1;
disparoy=1;
while disparox <> 00 || disparoy<>00
disp("para terminarla partida escribir 00")
disp("jugador 1:")
disparox = input("Coordenadas disparo en x ");
disparoy = input("Coordenadas disparo en y ");
b(disparox,disparoy)=5;
disp(b);
disp("para terminarla partida escribir 00")
disp("jugador 2:")
disparox = input("Coordenadas disparo en x ");
disparoy = input("Coordenadas disparo en y ");
a(disparox,disparoy)=5;
disp(a);
end
endfunction
|
8ce4ab88a8a1ce940cf3b8a80e24a9cf0c2d904a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1784/CH33/EX33.5/example5.sce
|
4fafc5364300f9fb0dd98416a92f9a874c1e5c5f
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 344
|
sce
|
example5.sce
|
//chapter 33
//example5
clc
//given
i=200 //current in the strip in amp
B=1.5 //magnetic field in wb/m2
n=8.4*10^28 //in m-3
e=1.6*10^-19 //in coul
h=1.0*10^-3 //thickness of copper strip in metre
w=2*10^-2 //width of copper strip in meter
//calculation
Vxy=i*B/(n*e*h)
disp(Vxy,"Hall potential difference aross strip in volt is")
|
2b180f6d91c8000000f69856bc63cd3b48fb9030
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/416/CH9/EX9.3/exp9_3.sce
|
827205301ba2e94799d336427833bdf8df0190b9
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 723
|
sce
|
exp9_3.sce
|
clear
clc
disp("example 9.3")
hm=2.0141
hp=1.007825
hn=1.008665
nm=58.9342
np=28
nn=59
um=235.0439
up=92
un=235
hmd=hp+hn-hm;nmd=np*hp+(nn-np)*hn-nm;umd=up*hp+(un-up)*hn-um;
hbe=931*hmd;nbe=931*nmd;ube=931*umd;
ahbe=hbe/2;anbe=nbe/nn;aube=ube/un;
printf("\t(a)\n mass defect is for hydrogen %famu \n total binding energy for hydrogens %fMev \n average binding energy for hydrogen is %fMeV",hmd,hbe,ahbe)
printf("\n\t(b)\n mass defect is for nickel %famu \n total binding energy for nickel is %fMev \n average binding energy for nickelis %fMeV",nmd,nbe,anbe)
printf("\n\t(c)\n mass defect of uranium is %famu \n total binding energy uranium is %fMev \n average binding energy uranium is %fMeV",umd,ube,aube)
|
7df49d3bd23d93c458576d9596a0d1907611e78b
|
99b4e2e61348ee847a78faf6eee6d345fde36028
|
/Toolbox Test/pchip/pchip4.sce
|
595de28887fa8c013517ac5e521f6ff04ebde3cb
|
[] |
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
| 236
|
sce
|
pchip4.sce
|
x = [-3 -2 -1; 0 1 2 ;4 1 2];
y = [-1 -1 -1; 0 1 1;2 3 1];
t = -3:.01:3;
p = pchip(x,y,t);
disp(p);
////output
//!--error 9999
//Inconsistent element-wise operationat line 40 of function pchip called by :
//p = pchip(x,y,t);
//
|
97f4b76d928ecbae32f9b3c8bfe5e79c43102435
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/154/DEPENDENCIES/ch3_4.sce
|
26e79328e3bb2f27b6766bab562e48ffbf64b5d9
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 430
|
sce
|
ch3_4.sce
|
clc
disp("Example 3.4")
printf("\n")
printf("Given")
disp("values of two capacitors are 2uF and 10uF")
C1=2*10^-6;C2=10*10^-6;
//For two capacitors in series
disp("Ceq=(C1*C2)/(C1+C2)")
//On solving for Ceq
Ceq=((C1*C2)/(C1+C2))*10^6
printf("Value of equivalent capacitance is %3.2fuF\n",Ceq)
disp("If C2=10pF")
C2=10*10^-12;
Ceq=((C1*C2)/(C1+C2))*10^12
printf("Value of equivalent capacitance is %3.2fpF\n",Ceq)
|
674df7bb5d2f870317fb937bade61738af5352b2
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2375/CH8/EX8.7/ex8_7.sce
|
b9b070d1ea01c5365a27a56350eb0cf0c97967ab
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 810
|
sce
|
ex8_7.sce
|
// Exa 8.7
clc;
clear;
close;
format('v',6)
// Given data
V_GSQ = -2;// in V
I_DSS = 8;// in mA
I_DSS = I_DSS * 10^-3;// in A
V_P = -8;// in V
YoS = 20;// in µS
YoS = YoS * 10^-6;// in S
R_D = 5.1;// in k ohm
R_D = R_D * 10^3;// in ohm
R_G = 1;// in Mohm
R_G = R_G * 10^6;// in ohm
g_mo = (2*I_DSS)/(abs(V_P));// in S
g_m = g_mo * (1 - (V_GSQ/V_P));// in S
g_m= g_m*10^3;// in mS
disp(g_m,"The value of g_m in mS is");
g_m= g_m*10^-3;// in S
r_d = 1/YoS;// in ohm
r_d= r_d*10^-3;// in k ohm
disp(r_d,"The value of r_d in k ohm is");
r_d= r_d*10^3;// in ohm
Zi = R_G;// in ohm
Zi= Zi*10^-6;// in M ohm
disp(Zi,"The value of Zi in M ohm is");
V_GS = 0;// in V
Zo = (r_d*R_D)/(r_d+R_D);// in ohm
disp(Zo,"The value of Zo in ohm is");
Av = -g_m*Zo;
disp(Av,"The value of Av is");
|
d9f80bb8b72103f3be9adf2ac617575dd300f242
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3137/CH16/EX16.16/Ex16_16.sce
|
f6bfd339527f8aab2877d9d022bfeb9de6b5465a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 482
|
sce
|
Ex16_16.sce
|
//Initilization of variables
mc=7.25 //kg
d=0.9 //m
la=0.2 //m
ma=9 //kg
F=45 //N
ay=0 //m/s^2
g=9.8 //m/s^2
//Calculations
I=2*(0.5*mc*(d/2)^2)+0.5*ma*(la/2)^2 //kg-m^2
//Using the equations of motion
Na=(2*mc+ma)*g //N
//Simplfying using radial velocity formula
//Solving the two equations using matrix method
A=[-1,-(2*mc+ma);(d/2),-I/(d/2)]
B=[-F;F*(la/2)]
C=inv(A)*B
F=C(1) //N
ax=C(2) //m/s^2
//Result
clc
printf('The computation yields ax=%f m/s^2',ax)
|
f368f7a664612eacb757e2ad2ff480b25d32e099
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/75/CH9/EX9.8/ex_8.sce
|
25013bc144bad1e4f017f958833ceca984366aee
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 278
|
sce
|
ex_8.sce
|
// PG (608)
A = [1 2 3;2 3 4;3 4 5]
lam = spec(A)' // Eigen values of A
lam1 = lam(1,3)
lam2 = lam(1,1)
lam3 = lam(1,2)
// Theoretical ratio of convergence
lam2/lam1
// After extrapolating, we get
lame1 = 9.6234814
// Error:
lam1-lame1
|
7d3bd836138310b8fac66009edca32f8965b3a1a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/167/CH5/EX5.11/ex11.sce
|
ec348a7df1d3d04e4af6fd2abba67da8b2628e67
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 571
|
sce
|
ex11.sce
|
//example 11
// electric heating of air in house
clear
clc
T1=290 //Initial temp. of air in K
P1=100 //Initial pressure of air in kPa
R=0.287 //Gas constant in KPa*m^3/kg-K
V1=R*T1/P1 //Initial specific volume of air in m^3/kg
v1=150 //volume flow rate in m^3/min
m=v1/(V1*60) //mass flow rate in kg/s
win=15 //Power of Electric heating system in kJ/s
qout=0.2 //heat lost from air to surroundings in kJ/s
cp=1.005 //heat capacity in kJ/kg-C
T2=(win-qout)/(m*cp)+(T1-273) //Exit temp. of air in C
printf("\n Hence,the exit temp. of air is = %.1f C. \n",T2);
|
c3d391ec118a70232e9f78dc6ad30df00497561d
|
036a77bd5f07b7b2b808ef3d90e92d20bd7b6c33
|
/easy/tests/wrongTypeInPlusExpression.tst
|
29286d1eb0b7e03fbaa8086b81db1c043dc6f940
|
[] |
no_license
|
Jaymee-Ericca-7/simple-compiler
|
186b11486e5af8debdde301acba84851c4545b02
|
209a8ed43c579a9ce34c63a10083cdbde5546313
|
refs/heads/master
| 2020-09-18T06:19:53.304100
| 2015-08-11T13:44:06
| 2015-08-11T13:44:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 75
|
tst
|
wrongTypeInPlusExpression.tst
|
main begin
int i;
boolean b;
b = true;
i = 1 + b;
return 0;
end
|
1774e33c717060b7b9acac73edeef3b85f2b6898
|
1db0a7f58e484c067efa384b541cecee64d190ab
|
/macros/ismaxphase.sci
|
883db97738296f7db994677e3e1a54969cc021b7
|
[] |
no_license
|
sonusharma55/Signal-Toolbox
|
3eff678d177633ee8aadca7fb9782b8bd7c2f1ce
|
89bfeffefc89137fe3c266d3a3e746a749bbc1e9
|
refs/heads/master
| 2020-03-22T21:37:22.593805
| 2018-07-12T12:35:54
| 2018-07-12T12:35:54
| 140,701,211
| 2
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 3,310
|
sci
|
ismaxphase.sci
|
<<<<<<< HEAD
//ismaxphase Determine whether filter is maximum phase or not
// Description : It determines whether the given system function is maximum phase system or not . Maximum phase system means all zeros of transfer function will be outside the unit circle in z-plane also poles mustbe within unit circle for stability and causality
=======
//ismaxphase Determine whether filter is maximum phase
>>>>>>> 6bbb00d0f0128381ee95194cf7d008fb6504de7d
//Syntax
//flag = ismaxphase(b,a)
//flag = ismaxphase(sos)
//flag = ismaxphase(...,tol)
<<<<<<< HEAD
// b and a are the vectors containing numerator and denumerator coefficients respectively
//tol, tolerance is used to determine when two numbers are close enough to be considered equal.
//Example : of maximum phase system
//flag = ismaxphase([1 -5 6],1)
//Output
// flag =
//
// 1.
=======
// b and a are the vectors containing zero and pole coefficients respectively
//tol, tolerance is used to determine when two numbers are close enough to be considered equal.
>>>>>>> 6bbb00d0f0128381ee95194cf7d008fb6504de7d
//Author: Parthasarathi Panda
//parthasarathipanda314@gmail.com
function ismax=ismaxphase(varargin)
[nargout,nargin]=argn();
if (nargin==2) then
a=varargin(1);
b=varargin(2);
if type(a)~=1 | type(b)~=1 then
error('check input type');
end
v=size(a);
if length(v)>2 then
error('check input dimension');
end
v=size(b);
if length(v)>2 then
error('check input dimension');
end
[n,k]=size(a);
if k==1 then
a=a';
elseif n~=1 then
error('check input dimension');
end
[n,k]=size(b);
if k==1 then
b=b';
k=n;
elseif n~=1 then
error('check input dimension');
end
elseif (nargin==1) then
sos=varargin(1);
if type(sos)~=1 then
error('check input dimension');
end
v=size(sos);
if length(v)>2 then
error('check input dimension');
end
if v(2)~=6 then
error('no. of columns must be 6');
end
a=1;b=1;
for i=[1:v(1)]
a=convol(a,sos(1:3));
b=convol(b,sos(4:6));
end
else
error('no. of inputs not matching');
end
poly_a=inv_coeff(a);
poly_b=inv_coeff(b);
z=inv_coeff([1,0]);
gc=gcd([poly_a,poly_b]);
[r,den]=pdiv(poly_b,gc);
[r,num]=pdiv(poly_a,gc);
<<<<<<< HEAD
maxpole=max(abs(roots(den)));
minzero=min(abs(roots(num)));
if length(b)==1 then
if length(a)==1 then
ismax=1;
=======
maxpole=min(abs(roots(den)));
minzero=max(abs(roots(num)));
if length(a)==1 then
if length(b)==1 then
ismax=0;
>>>>>>> 6bbb00d0f0128381ee95194cf7d008fb6504de7d
elseif minzero>1 then
ismax=0;
else
ismax=1;
end
elseif maxpole>1 then
<<<<<<< HEAD
if length(a)==1 then
=======
if length(b)==1 then
>>>>>>> 6bbb00d0f0128381ee95194cf7d008fb6504de7d
ismax=0;
elseif minzero>1 then
ismax=0;
else
ismax=1;
end
else
ismax=0;
end
endfunction
|
a3398830b0d4daa8507abe442f73557efa990475
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/551/CH12/EX12.3/3.sce
|
5800f34ef56c61f1a45b2812a167fb20ac0c81b5
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 522
|
sce
|
3.sce
|
clc
p1=20; //bar
p2=0.08; //bar
//At 20 bar, 360 0C
h1=3159.3; //kJ/kg
s1=6.9917; //kJ/kg K
//At 0.08 bar
h_f2=173.88; //kJ/kg
s_f2=0.5926; //kJ/kg K
h_fg2=2403.1; //kJ/kg
s_g=8.2287; //kJ/kg K
v_f=0.001008; //m^3/kg
s_fg=7.6361; //kJ/kg K
x2=(s1-s_f2)/s_fg;
h2=h_f2+x2*h_fg2;
W_pump=v_f*(p1-p2)*100; //kJ/kg
W_turbine=h1-h2;
W_net=h1-h2;
disp("Net work done=")
disp(W_net)
disp("kJ/kg")
h_f4=W_pump+h_f2;
Q1=h1-h_f4;
n_cycle=W_net/Q1;
disp("Cycle efficiency=")
disp(n_cycle)
|
21554f48587ea1da2d0621fcd742180bed723546
|
37ecd78225875673db86fad4abb97404437eb339
|
/Escalonamento_sem_pivo.sce
|
3003ee8e8b197aff03082508a11dcf5e87261995
|
[] |
no_license
|
andreviniciusmb/Calculo_Numerico
|
4a856ffb3887e447dcbd6d39a1b12218e38dc088
|
316a4c29686fd40b25a6353e404d7b1455b2d507
|
refs/heads/master
| 2022-04-20T13:55:09.969949
| 2020-04-15T19:17:39
| 2020-04-15T19:17:39
| 255,652,623
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 691
|
sce
|
Escalonamento_sem_pivo.sce
|
a = [173 128 255;216 128 192;230 128 203]
d = [a(1,1)/255 a(2,1)/255 a(3,1)/255;a(1,2)/255 a(2,2)/255 a(3,2)/255;a(1,3)/255 a(2,3)/255 a(3,3)/255]'
b = [64;224;208]
n = size(a,1) //Num de linhas
c = size(a,2) //Num de colunas
//Eliminação de Gauss sem pivotamento
for k = 1:n-1
for i = k+1:n
m = a(i,k)/a(k,k)
for j = k:n
a(i,j) = a(i,j) - m*a(k,j)
end
b(i) = b(i) - m*b(k)
end
end
x(n) = b(n)/a(n,c)
for i = (n-1):-1:1 //Substituicao retroativa
soma = 0
for j = (i+1):c
soma = soma + a(i,j)*x(j)
end
x(i) = (b(i)-soma)/a(i,i)
end
s = [x(1);x(2);x(3)]
disp("Sem pivo:")
disp(s)
|
fc88ff068ed54edd461fb10484307635edb3299c
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1895/CH5/EX5.22/EXAMPLE5_22.SCE
|
6c25936fbf01c6f1b78b416c7f0bae6a9bf77412
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,288
|
sce
|
EXAMPLE5_22.SCE
|
//ANALOG AND DIGITAL COMMUNICATION
//BY Dr.SANJAY SHARMA
//CHAPTER 5
//ANGLE MODULATION
clear all;
clc;
printf("EXAMPLE 5.22(PAGENO 251)");
//given
//first case
//The maximum deviation in commerical FM is given as
delta_f1 = 75*10^3//frequency deviation in commerical FM
f_m1 = 30//maximum modulating frequency
f_m2 = 15*10^3//minimum modulating frequency
//second case
delta_f2 = 10*10^3//frequency deviation for narrowband FM
f_m3 = 100//maximum modulating frequency
f_m4 = 3*10^3//minimum modulating frequency
//calculations
//first case
m_f1 = delta_f1/f_m1//modulation index for maximum modulating frequency
m_f2 = delta_f1/f_m2//modulation index for minimum modulating frequency
//second case
m_f3 = delta_f2/f_m3//modulation index for maximum modulating frequency
m_f4 = delta_f2/f_m4//modulation index for minimum modulating frequency
//results
printf("\n\n i.a.modulation index for maximum modulating frequency of commercial FM = %.2f",m_f1)
printf("\n\n b.modulation index for minimum modulating frequency of commercial FM = %.2f",m_f2)
printf("\n\nii.a.modulation index for maximum modulating frequency of narrowband FM = %.2f",m_f3)
printf("\n\n b.modulation index for minimum modulating frequency of commercial FM = %.2f",m_f4)
|
9ed93e63afa15ce5987b2ff2702561f6995c685c
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/191/CH2/EX2.9/Example2_9.sce
|
a6a83da542e32bc6abec4067c08fa25a13842e82
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,732
|
sce
|
Example2_9.sce
|
//Solving four linear system of equations with Gauss-Seidel and SOR method
//the convergence is much faster in SOR method
clear;
close();
clc;
format('v',7);
x1=[0,0];
x2=[0,0];
x3=[0,0];
x4=[0,0];
x1(1,2)=-0.33333*(1-x2(1,1)-3*x4(1,1));
x2(1,2)=0.16667*(1-x1(1,2)-x3(1,1));
x3(1,2)=0.16667*(1-x2(1,2)-x4(1,1));
x4(1,2)=-0.33333*(1-3*x1(1,2)-x3(1,2));
i=1;
while (abs(x1(1,1)-x1(1,2))>0.5*10^-2 | abs(x2(1,1)-x2(1,2))>0.5*10^-2 | abs(x3(1,1)-x3(1,2))>0.5*10^-2 | abs(x4(1,1)-x4(1,2))>0.5*10^-2)
x1(1,1)=x1(1,2);
x2(1,1)=x2(1,2);
x3(1,1)=x3(1,2);
x4(1,1)=x4(1,2);
x1(1,2)=-0.33333*(1-x2(1,1)-3*x4(1,1));
x2(1,2)=0.16667*(1-x1(1,2)-x3(1,1));
x3(1,2)=0.16667*(1-x2(1,2)-x4(1,1));
x4(1,2)=-0.33333*(1-3*x1(1,2)-x3(1,2));
i=i+1;
end
disp([x1; x2; x3; x4],'Answers are:')
disp(i,'Number of Iterations :')
w=1.6;
x1=[0,0];
x2=[0,0];
x3=[0,0];
x4=[0,0];
x1(1,2)=x1(1,1)-0.33333*w*(1+3*x1(1,1)-x2(1,1)-3*x4(1,1));
x2(1,2)=x2(1,1)+0.16667*w*(1-x1(1,2)-6*x2(1,2)-x3(1,1));
x3(1,2)=x3(1,1)+0.16667*w*(1-x2(1,2)-6*x3(1,2)-x4(1,1));
x4(1,2)=x4(1,1)-0.33333*w*(1-3*x1(1,2)-x3(1,2)+3*x4(1,1));
i=1;
while (abs(x1(1,1)-x1(1,2))>0.5*10^-2 | abs(x2(1,1)-x2(1,2))>0.5*10^-2 | abs(x3(1,1)-x3(1,2))>0.5*10^-2 | abs(x4(1,1)-x4(1,2))>0.5*10^-2)
x1(1,1)=x1(1,2);
x2(1,1)=x2(1,2);
x3(1,1)=x3(1,2);
x4(1,1)=x4(1,2);
x1(1,2)=x1(1,1)-0.33333*w*(1+3*x1(1,1)-x2(1,1)-3*x4(1,1));
x2(1,2)=x2(1,1)+0.16667*w*(1-x1(1,2)-6*x2(1,2)-x3(1,1));
x3(1,2)=x3(1,1)+0.16667*w*(1-x2(1,2)-6*x3(1,2)-x4(1,1));
x4(1,2)=x4(1,1)-0.33333*w*(1-3*x1(1,2)-x3(1,2)+3*x4(1,1));
i=i+1;
end
disp([x1; x2; x3; x4],'Answers are :')
disp(i,'Number of Iterations :')
|
20946179070c2250681f11755ca201dd7144c5f1
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3717/CH7/EX7.10/Ex7_10.sce
|
649c96aef622bf8724f1a64802da2d330eeb2920
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,296
|
sce
|
Ex7_10.sce
|
// Ex7_10 Page:136 (2014)
clc;clear;
// Case 1: For pure orbital angular momentum
S = poly(0, 'S'); // Total spin angular momentum variable
S = 0; // S value for pure orbital angular momentum
L = poly(0, 'L'); // Total orbital angular momentum variable
J = L + S; // J value for pure orbital angular momentum
g = horner(1 + (J*(J + 1) + S*(S + 1) - L*(L + 1))/(2*J*(J + 1)), 0); // Lande's g-factor
printf("\nFor pure orbital angular momentum, g = %d", g);
// Case 2: For pure spin angular momentum
S = poly(0, 'S'); // Total spin angular momentum variable
L = 0; // L value for pure spin angular momentum
J = L + S; // J value for pure spin angular momentum
g = horner(1 + (J*(J + 1) + S*(S + 1) - L*(L + 1))/(2*J*(J + 1)), 0); // Lande's g-factor
printf("\nFor pure spin angular momentum, g = %d", g);
// Case 3: For state 3P1
S = 1; // S value for pure spin angular momentum
L = 1; // L value for pure spin angular momentum
J = L + S; // J value for pure spin angular momentum
g = horner(1 + (J*(J + 1) + S*(S + 1) - L*(L + 1))/(2*J*(J + 1)), 0); // Lande's g-factor
printf("\nFor 3P1 state, g = %d/2", 2*g);
// Result
// For pure orbital angular momentum, g = 1
// For pure spin angular momentum, g = 2
// For 3P1 state, g = 3/2
|
4db9ae909a413bce92df24b5eac62f8d48819026
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2072/CH16/EX16.4/Ex16_4.sce
|
60a21079086e0d8c482d5c4cfbe0a24b771e4b0e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 122
|
sce
|
Ex16_4.sce
|
//Example 16.4
clc
e0=8.85*10^-12//in c2/N.m2
A=2*10^-4//in m2
d=1*10^-3//in m
c=(e0*A)/d
disp(c,"Capacitance in farad=")
|
507a0e64db7190a851e41af7835fc9df1e869516
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1268/CH11/EX11.1/a_1.sce
|
b13af849d563d315fcc2472abac084c80cd19ba2
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 290
|
sce
|
a_1.sce
|
clc;
disp("Example A.1")
g=9.81
density=1000 // of water in kg/m^3
densitym=13600 // of mercury in kg/m^3
h=0.1 // in m
p1=density*g*h
p2=p1+(densitym*g*h)
waterhead=p2/(density*g)
hghead=p2/(g*densitym)
disp(waterhead,"Head of water is ")
disp(hghead,"Head of mercury is ")
|
0406f1ebc35d77594e4d1a812575c717bf682757
|
907843f7d8c0871eec2850b95a5d2077c14c182a
|
/solvers/APESolver/Tests/APE_2DPulseWall_WeakDG_MODIFIED.tst
|
b7543f1f4b5101a69e3f0c2298edc742fdf69b1f
|
[
"MIT"
] |
permissive
|
li12242/nektar
|
4792c4f8f88992875ecefb590e804e850887ae19
|
a31e519cdde5d58d2fa23e0eaedd54ce3ed9fb72
|
refs/heads/master
| 2020-05-29T12:21:41.203547
| 2015-07-29T14:15:38
| 2015-07-29T14:15:38
| 65,020,427
| 1
| 0
| null | 2016-08-05T13:26:59
| 2016-08-05T13:26:58
| null |
UTF-8
|
Scilab
| false
| false
| 848
|
tst
|
APE_2DPulseWall_WeakDG_MODIFIED.tst
|
<?xml version="1.0" encoding="utf-8"?>
<test>
<description>desc P=400</description>
<executable>APESolver</executable>
<parameters>APE_2DPulseWall_WeakDG_MODIFIED.xml</parameters>
<files>
<file description="Session File">APE_2DPulseWall_WeakDG_MODIFIED.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="p" tolerance="1e-12">7.93225</value>
<value variable="u" tolerance="1e-12">0.0189841</value>
<value variable="v" tolerance="1e-12">0.0109285</value>
</metric>
<metric type="Linf" id="2">
<value variable="p" tolerance="1e-12">18.7643</value>
<value variable="u" tolerance="1e-12">0.0322549</value>
<value variable="v" tolerance="1e-12">0.0460461</value>
</metric>
</metrics>
</test>
|
aa287bafb5554bc7193031a29abe8894264aa099
|
b762d5d85061b3dd84ccf900726db6098e257125
|
/Álgebra Linear/Métodos/levirrier_fadeev.sce
|
177bb8471efd69096408fbfa664a980704e0cc7a
|
[] |
no_license
|
hugosousa111/scilab-studies
|
8efdba8849fb49eeae6df35e2d9ffd3018bed313
|
5d1db65577683c8fe60bb81620f2281f04688c98
|
refs/heads/master
| 2020-12-20T18:14:07.202293
| 2020-01-25T11:35:28
| 2020-01-25T11:35:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 430
|
sce
|
levirrier_fadeev.sce
|
A = input("Insira a matriz A ")
disp("Matriz A: ")
disp(A)
I = eye(A)
p = I(:,1)
fa = A
for q = 1 : size(A,'c')
p(q,1) = -((trace(fa))/q)
fa = A * (fa + (p(q,1) * I))
end
pi = [I(:,1)]
for j = 0: size(A,'c')-1
pi(j+1,1)= p(length(p)-j,1)
end
vt = [1]
pii = [pi;vt]
polinomio = poly(pii,'Y','coeff')
disp("Polinômio: ")
disp(polinomio)
auto_valores = roots(polinomio)
disp("AutoValores: ")
disp(auto_valores)
|
0f95d17b839df892e69c37b651499441048c2c65
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/503/CH9/EX9.6/ch9_6.sci
|
5c2f425b8febc825b2cfc4e75018cc7cf298dc73
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,194
|
sci
|
ch9_6.sci
|
//to calculate starting torque and current,full load current,pf, torque , internal and overall eff,slip and max torque
clc;
R1=.3;
R2=.25;
X1=.6;
X2=.6;
Xm=35;
Prot=1500;
V=231;
Z_TH=complex(0,Xm)*complex(R1,X1)/complex(R1,X1+Xm);
V_TH=(V*complex(0,Xm))/complex(R1,X1+Xm);
n_s=1500;
w_s=2*%pi*n_s/60;
s=1;
Z_f=complex(0,Xm)*complex(R2,X2)/complex(R2,X2+Xm);
R_f=real(Z_f);
Z_in=Z_f+complex(R1,X1);
I1=V/abs(Z_in);disp(I1,'starting current(A)');
Tstart=3*I1^2*R_f/w_s;disp(Tstart,'starting torque(Nm)');
n=1450;
s=1-n/n_s;
a=R2/s;
Z_f=complex(0,Xm)*complex(a,X2)/complex(a,X2+Xm);
R_f=real(Z_f);
Z_in=Z_f+complex(R1,X1);
I1=V/abs(Z_in);disp(I1,'full load current(A)');
pf=cosd(atand(imag(Z_in)/real(Z_in)));disp(pf,'pf');
P_G=3*I1^2*R_f;
Popg=P_G*(1-s);
Pop=Popg-Prot;
Tnet=Pop/((1-s)*w_s);disp(Tnet,'net torque(Nm)');
Vt=400;
Pip=sqrt(3)*Vt*I1*pf;
eff=Pop/Pip;disp(eff*100,'efficiency(%)');
int_eff=Popg/Pip;disp(int_eff*100,'internal eff(%)');
s_max_T=1/(sqrt(real(Z_TH)^2+(imag(Z_TH)+X1)^2)/R2);disp(s_max_T,'max slip');
Z_tot=Z_TH+complex(R2/s_max_T,X2);
I2=abs(V_TH)/abs(Z_tot);
T_max=3*I2^2*(R2/s_max_T)/w_s;
disp(T_max,'max torque(Nm)');
|
95410dbb61f94003dd7aae7eb3cbfe5723ca5abb
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3281/CH8/EX8.9/ex8_9.sce
|
c37d30f9e1e2befe3d061da844604308bad2a4f6
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 188
|
sce
|
ex8_9.sce
|
//Page Number: 434
//Example 8.9
clc;
//Given
e=0.0001;
s=330;
//Charge transfer effciency
n=1-e;
//Final charge pulse
//x=P/P0
x=(1-(e*s));
disp(x,'Final charge pulse:');
|
0b796827ce161161f9f66e0354ad7937b69643b4
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2129/CH1/EX1.23.6/ex1_23_6.sce
|
8b85b2fe476792f0d61f8e9a72b2a5d6cc04af19
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 273
|
sce
|
ex1_23_6.sce
|
//Exa 1.23.6
clc;
clear;
close;
// Given data
e = 1.6 * 10^-19;// in C
R_H = 0.0145;// in m^3/coulomb
Mu_e = 0.36;// in m^2/v-s
E = 100;// in V/m
n = 1/(e * R_H);// in /m^3
J = n * e * Mu_e * E;// in A/m^2
disp(J,"The current density of specimen in A/m^2 is");
|
b6d6301189302d1c83b3bfc28245bac47eacb053
|
1bb72df9a084fe4f8c0ec39f778282eb52750801
|
/test/L03.prev.tst
|
64ed9d601914e4c3e82b8b76ecae74f6f70f029c
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
gfis/ramath
|
498adfc7a6d353d4775b33020fdf992628e3fbff
|
b09b48639ddd4709ffb1c729e33f6a4b9ef676b5
|
refs/heads/master
| 2023-08-17T00:10:37.092379
| 2023-08-04T07:48:00
| 2023-08-04T07:48:00
| 30,116,803
| 2
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 46
|
tst
|
L03.prev.tst
|
Vector 3 4 5 6 is sum of like powers
|
ded89157a21a20e5adf26a253545c747feb306e4
|
b29e9715ab76b6f89609c32edd36f81a0dcf6a39
|
/ketpicscifiles6/Phsparadata.sci
|
3c8018e38e04b6381dffc1db84d7f69de56bfcd5
|
[] |
no_license
|
ketpic/ketcindy-scilab-support
|
e1646488aa840f86c198818ea518c24a66b71f81
|
3df21192d25809ce980cd036a5ef9f97b53aa918
|
refs/heads/master
| 2021-05-11T11:40:49.725978
| 2018-01-16T14:02:21
| 2018-01-16T14:02:21
| 117,643,554
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 100
|
sci
|
Phsparadata.sci
|
// 08.08.22
// 09.10.27
function Out=Phsparadata(Fdata)
Out=Facesdata(Fdata,'para')
endfunction
|
c5a07266fce82887cc80c12970002d2d45906035
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2273/CH4/EX4.12/ex4_12.sce
|
c0504615327bd14dbc10ddc2aaf2348a8d677e2e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 821
|
sce
|
ex4_12.sce
|
//Find inductive reactance of 3 phase bundled conductor
clear;
clc;
//soltion
//given
r=1.75*10^-2;//m//radius of the conductor
re=r*exp(-1/4);
d=7;//spacing
S=0.4;//spacing between subconductors
Ds=sqrt(re*S);//GMR
dab=7;
dab_=7.4;
da_b=6.6;
da_b_=7;
Dab=(dab*dab_*da_b*da_b_)^.25;
Dbc=Dab;
dca=14;
dca_=13.6;
dc_a=14.4;
dc_a_=14;
Dca=(dca*dca_*dc_a*dc_a_)^.25;
Dm=(Dab*Dca*Dbc)^(1/3);//GMD
L=0.2*log(Dm/Ds);
printf("Inductance(L)=%.4f mH/km\n",L);
Xl=2*%pi*50*L*10^-3;
printf("Inductive reactance= %.1f Ω/km\n",Xl);
r1=sqrt(2*((r*10^2)^2));
re1=r1*exp(-1/4);
Dab1=7;
Dbc1=7;
Dca1=14;
Dm1=(Dab1*Dbc1*Dca1)^(1/3);//GMD of single conductor line
L1=0.2*log(Dm1/(re1*10^-2));
printf("Inductance(L)=%.3f mH/km\n",L1);
Xl1=2*%pi*50*L1*10^-3;
printf("Inductive reactance= %.3f Ω/km",Xl1);
|
d4b146dd2bd3b43795b6bd9e5ed2876b2f5bd236
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1682/CH12/EX12.1/Exa12_1.sce
|
9060cbf2718cd50cdcf5be3d15984de0a69d8374
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 499
|
sce
|
Exa12_1.sce
|
//Exa 12.1
clc;
clear;
close;
//given data :
D=24000;//in units/year
Co=150;//in Rs./order
Pprice=75;//Rs./unit
Cpupy=18;//in % of Pprice/unit
Cc=Pprice*Cpupy/100;//in Rs.
EOQ=sqrt((2*Co*D)/Cc);//in units
disp(round(EOQ),"Economic order quantity in units : ");
n=D/round(EOQ);//no. of orders/year
disp(n,"No. of orders/year : ");
T=round(EOQ)/D;// time between successive orders in year
T=T*12;//in months
T=T*30;//in Days
disp(round(T),"Time between successive orders in days : ");
|
f1cd3cb97b83d28ddba13762d19c791ca0d1a117
|
14a4e12ae6317d8ba53b8dd6462a9fe4e3eaa628
|
/calcTs.sci
|
d14126232a9588b66b0f7b365e4c3bbec3740e95
|
[] |
no_license
|
tarikachittajalu/Discrete-Cos-Lab
|
d93353366801c961ce8596755b37a1bfeab5af36
|
242f8980c947e7623e247757cc3a60d1912ba925
|
refs/heads/master
| 2021-01-10T21:52:27.084218
| 2015-09-16T15:29:24
| 2015-09-16T15:29:24
| 42,470,221
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 47
|
sci
|
calcTs.sci
|
function[z]= calcTs(Fs)
z=1/Fs
endfunction
|
840e67552b107417feddd0db0974d7c2671184ab
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1319/CH1/EX1.29/1_29.sce
|
afb594f840994c1430bb0b193a302f2e5f796746
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 588
|
sce
|
1_29.sce
|
// To determine the parameters of an alternating current of 50Hz frequency
clc;
clear;
f=50;
Im=20;
w=2*%pi*f;
t=1/100;
It=10;
Irms=Im/(sqrt(2));
Iav=0;//Full Cycle
t10=asin(It/Im)/w;// time taken to rach 10A
Ih=Im*sin(w*t);// Current at 1/100 sec
printf('i) The general ecpression is i(t) = %g sin %gt\n',Im,w)
printf('ii) The instantaneous value at t= 1/100 sec is %g A\n',floor(Ih*10)/10)
printf('iii) The time taken to reach 10A for the first time = %g s\n',t10)
printf('iv) The average and the rms value of current is %g A and %g A respectively\n',Iav,Irms)
|
987f68ece89156b7e8902c508799e94e5ebd18ad
|
04227b0d1bb094503d6c9ca0b21de26102c7572c
|
/Apprentisage-decision.sce
|
a9babe97795505d9ce15c3dd9e77cfef9563b0ce
|
[] |
no_license
|
C-ELAzouzi/Reconnaissance-facial-matlab
|
be48b496aab193ec07f7aaa95cae2915ea5badfa
|
ee8073c77bd5fd3f9647ddd18b0115b4a9d27ae3
|
refs/heads/master
| 2023-06-05T16:25:23.844539
| 2021-06-16T12:46:06
| 2021-06-16T12:46:06
| 377,476,453
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 3,366
|
sce
|
Apprentisage-decision.sce
|
clear ;
xdel(winsid());
clc ;
exec lbp.sci
exec getmapping.sci
nb_classe =50;
nb_image =12;
nb_ima_train = 6 ;
nb_bins =255;
Attribut = zeros(nb_ima_train * nb_classe,nb_bins);
Attributs_test=zeros(nb_ima_train * nb_classe,nb_bins);
attribut_test=zeros(1,nb_bins);
comp_train = 1;
comp_train_test=1;
inter=0;
classe_estime=zeros(nb_bins,1);
taux_de_classification=0;
nombre_image_test=nb_ima_train * nb_classe;
tic
//apprentissage
for i = 1: nb_image * nb_classe
//extraction des attributs de texture pour les images de la base d'apprentissage
if(modulo(i,2)~= 0)
num_classe(comp_train)=floor((i-1)/nb_image)+1;
num_image=1+ modulo (i-1,12) ;
// le path de chaque image
if (num_image <10)
fichier_train=strcat(['Base\', msprintf('%d',num_classe(comp_train)),'-0',msprintf('%d',num_image),'.jpg']);
else
fichier_train=strcat(['Base\',msprintf('%d',num_classe(comp_train)),'-',msprintf('%d',num_image),'.jpg']);
end
disp([fichier_train 'Classe' msprintf('%d',num_classe(comp_train))]);
Ima_train=imread(fichier_train);
Ima_gray_train = rgb2gray(Ima_train);
//Extraction des attributs de texture
//mapping = getmapping(16,'u2');
//X = lbp(Ima_gray_train,4,16, mapping,'h');
Attribut(comp_train,:) = lbp(Ima_gray_train,1,8, 0,'h');
comp_train = comp_train + 1 ;
//extraction des attributs de texture pour les images de la base test
else
num_classe_test(comp_train_test)=floor((i-1)/nb_image)+1;
num_image_test=1+ modulo (i-1,12) ;
// le path de chaque image
if (num_image_test <10)
fichier_train_test=strcat(['Base\', msprintf('%d',num_classe_test(comp_train_test)),'-0',msprintf('%d',num_image_test),'.jpg']);
else
fichier_train_test=strcat(['Base\',msprintf('%d',num_classe_test(comp_train_test)),'-',msprintf('%d',num_image_test),'.jpg']);
end
disp([fichier_train_test 'Classe' msprintf('%d',num_classe_test(comp_train_test))]);
Ima_train_test=imread(fichier_train_test);
Ima_gray_train_test = rgb2gray(Ima_train_test);
//Extraction des attributs de texture
//mapping = getmapping(16,'u2');
Attributs_test(comp_train_test,:) = lbp(Ima_gray_train_test,1,8, 0, 'h');
comp_train_test = comp_train_test + 1 ;
end
end
t1=toc()
//ima_test=imread('Base\21-01.jpg');
//ima_test_gray=rgb2gray(ima_test);
//imshow(ima_test);
//décision
tic
//attribut_test=lbp(ima_test_gray,1, 8, 0, 'h');
compteur=zeros(nb_ima_train * nb_classe,1);
// extraire les histrogrammes
for k = 1:nb_ima_train * nb_classe
for i = 1: nb_ima_train * nb_classe
for j=1:nb_bins
inter=inter+min(Attributs_test(k,j),Attribut(i,j));
end
compteur(k,i)=inter;
inter=0;
end
end
//extraction de la classe estimée pour chaque image test
for i =1:nb_ima_train * nb_classe
[maxi,indice]=max(compteur(i,:));
//classe_estime(i)=(floor((indice-1)/6)) + 1;
classe_estime(i)= num_classe(indice);
end
//comparaison
for i =1:nb_ima_train * nb_classe
if(classe_estime(i)==num_classe_test(i))
taux_de_classification=taux_de_classification+1;
end
end
taux_de_classification=taux_de_classification/nombre_image_test;
t2=toc()
/*
maxi=max(compteur);
indice=0;
for i=1:nb_ima_train * nb_classe
if(compteur(i)==maxi)
indice=(floor((i-1)/6)) + 1;
return;
end
end
*/
|
6f36050e0f43cef16f2e8c9982243f94f8234ae1
|
b5801afaa3964cbd7f9c1c8cf732cdcdb020e7fc
|
/Scilab6-Keras-Toolbox/sci_gateway/cpp/loader.sce
|
c368f01d49dcd13bf816479465b9f72aca3a78f4
|
[
"BSD-3-Clause"
] |
permissive
|
TanayKarve/scilab-keras-toolbox
|
e179b283102a580f2192d44c63dbc44a6fbaf03d
|
48045cd955c821a00377f9719f21fe0f91148541
|
refs/heads/master
| 2022-12-03T09:22:16.551928
| 2020-08-23T13:26:21
| 2020-08-23T13:26:21
| 289,681,759
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 841
|
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
// ----------------------------------------------------------------------------
//
libkeras_toolbox_path = get_absolute_file_path('loader.sce');
//
// ulink previous function with same name
[bOK, ilib] = c_link('libkeras_toolbox');
if bOK then
ulink(ilib);
end
//
list_functions = [ 'ANN';
'ANN_test';
'image_train_tl';
'image_test_tl';
];
addinter(libkeras_toolbox_path + filesep() + 'libkeras_toolbox' + getdynlibext(), 'libkeras_toolbox', list_functions);
// remove temp. variables on stack
clear libkeras_toolbox_path;
clear bOK;
clear ilib;
clear list_functions;
// ----------------------------------------------------------------------------
|
ca2490ddfdeb9e649396ed4bcc89a4f86b3060f0
|
95a097a2fe8699932e1301c6d095bc4127c62da8
|
/07/StackArithmetic/StackTest/StackTestVME.tst
|
7fab6f028ebcae2706a4192b9da9322f39813809
|
[] |
no_license
|
itzhak-razi/From-Nand-to-Tetris
|
f508703b6cdb7a4841b2fae6849382c80a731c3f
|
4b11c4fe802dbea1c863b03ca71fd5891e39e45b
|
refs/heads/master
| 2021-06-01T11:09:02.084364
| 2012-11-23T01:12:45
| 2012-11-23T01:12:45
| 7,025,062
| 36
| 38
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 447
|
tst
|
StackTestVME.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/07/StackArithmetic/StackTest/StackTestVME.tst
load StackTest.vm,
output-file StackTest.out,
compare-to StackTest.cmp,
output-list RAM[0]%D2.6.2 RAM[256]%D2.6.2 RAM[257]%D2.6.2
RAM[258]%D2.6.2 RAM[259]%D2.6.2;
set RAM[0] 256,
repeat 19 {
vmstep;
}
output;
|
ec4b18619b1647873d10b1e679a9f812b3f37ea9
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/998/CH29/EX29.85/Ex85.sce
|
50465cb8dd853b9a8d4280e6e349843d9629ee21
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 563
|
sce
|
Ex85.sce
|
//Ex:85
clc;
clear;
close;
d=20;//dia in m
A=(%pi*d*d)/4;// Aperture raea
c=3*10^8;//velocity of light in m/s
f1=11.95*10^9;//in Hz
f2=14.25*10^9;// in Hz
y1=c/f1;//wavelength in m for f1
y2=c/f2;//wavelength in m for f2
u1=0.98*0.99*0.97*0.85*0.90*0.92;//aperture eff for 11.95 GHz
u2=0.96*0.99*0.97*0.85*0.90*0.92;//aperture eff for 14.25 GHz
G1=(u1*4*%pi*A)/(y1*y1);
G2=(u2*4*%pi*A)/(y2*y2);
g2=10*log(G2)/log(10);// in db
g1=10*log(G1)/log(10);// in db
printf("The antenna power gain=%f db",g1);
printf("\n The antenna power gain=%f db",g2);
|
4617d3ee9ba4b70e627cc454583f2caebcba5ef0
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2138/CH9/EX9.3/ex_9_3.sce
|
021e0ca484b75fd369c4ad5c623fc9f5ff36f065
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 238
|
sce
|
ex_9_3.sce
|
//Example 9.3 // current
clc;
clear;
close;
//given data :
m=3;
n=10; // dry cells of emf
E=1.5; // emf in volts
R=2.5; // resistance in ohm
r=0.5; // internal resistance in ohm
I=(m*n*E)/((m*R)+(n*r));
disp(I,"current flowing,I(A) = ")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.