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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
95ce713e189a6d73b20337e4e2912479d8dd8f3c | 3dc5baa0dc5747bbf4d746bdee5cb7072d6b0d16 | /cg.sce | 3c5a7deb3a084c8b0d8d56277486c33c47cf1b74 | [] | no_license | sajin71/poisson | 86621a8d30ee4c8f5eb17d5774f7f79cd7ec2ce6 | 89a35511e16fda0c6be7c6642c6fca51e57045e2 | refs/heads/master | 2021-01-18T14:10:30.931149 | 2014-06-30T09:23:04 | 2014-06-30T09:23:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,776 | sce | cg.sce | function A = make_coefficient_matrix(h, num_of_x, num_of_y)
//xs = xl : h : xr
//ys = yl : h : yr
//num_of_x = size(xs, 'c')
//num_of_y = size(ys, 'c')
A = zeros(num_of_x * num_of_y, num_of_x * num_of_y)
for u_x_index = 1: num_of_x
for u_y_index = 1: num_of_y
row = zeros(1, num_of_x * num_of_y)
for i = 1 : num_of_x
for j = 1: num_of_y
if i == u_x_index - 1 & j == u_y_index | i == u_x_index + 1 & j == u_y_index | i == u_x_index & j == u_y_index - 1 | i == u_x_index & j == u_y_index + 1 then
row(num_of_x * (i - 1) + j) = 1 / (h^2)
elseif ((i == u_x_index) & (j == u_y_index)) then
row(num_of_x * (i - 1) + j) = - 4 / (h^2)
end
end
end
A(((u_x_index - 1) * num_of_x + u_y_index),:) = row
end
end
endfunction
function b = make_b_vector(f, h, xl, xr, yl, yr, xl_f, xr_f, yl_f, yr_f)
xs = xl : h : xr
ys = yl : h : yr
num_of_x = size(xs, 'c') - 2
num_of_y = size(ys, 'c') - 2
b = zeros(num_of_x * num_of_y, 1)
//disp(xs, ys)
for j = 1: num_of_y
for i = 1: num_of_x
b(i + num_of_y * (j - 1)) = b(i+ num_of_y * (j - 1)) - f(xs(i + 1), ys(j + 1))
if i == 1 then
//disp(i + num_of_y * (j- 1))
b(i + num_of_y * (j - 1)) = b(i + num_of_y * (j - 1)) - xl_f(xs(1), ys(j + 1)) / (h ^ 2)
end
if j == 1 then
b(i + num_of_y * (j - 1)) = b(i + num_of_y * (j - 1)) - yl_f(xs(i + 1), ys(1)) / (h ^ 2)
end
if i == num_of_x then
b(i + num_of_y * (j - 1)) = b(i + num_of_y * (j - 1)) - xr_f(xs(num_of_x), ys(j + 1)) / (h ^ 2)
end
if j == num_of_y then
b(i + num_of_y * (j - 1)) = b(i + num_of_y * (j - 1)) - yr_f(xs(i + 1), ys(num_of_y)) / (h ^ 2)
end
end
end
endfunction
function Z = make_z_matrix(u, xs, ys, xl_f, xr_f, yl_f, yr_f)
//disp(size(u))
num_of_x = size(xs, 'c')
num_of_y = size(ys, 'c')
//disp(num_of_x, num_of_y)
for i = 1: num_of_x
for j = 1: num_of_y
if i == 1 then
Z(1, j) = xl_f(xs(1), ys(j))
elseif j ==1 then
Z(i, 1) = yl_f(xs(i), ys(1))
elseif i == num_of_x then
Z(num_of_x, j) = xr_f(xs(num_of_x), ys(j))
elseif j == num_of_y then
Z(i, num_of_y) = yr_f(xs(i), ys(num_of_y))
else
//disp(i, j)
//disp((i - 1) + (num_of_y - 2) * (j - 1))
Z(i, j) = u((i - 1) + (num_of_y - 2) * (j - 2))
end
end
end
endfunction
function u = adaptability(f, xs, ys)
u = zeros((length(xs) - 2) * (length(ys) -2))
for i = 1 : (length(ys) -2)
for j = 1: (length(xs) -2)
u(j + (i - 1)* (length(ys) -2)) = f(xs(j + 1), ys(i + 1))
end
end
endfunction
function Z = cg(f, h, ep, xl, xr, yl, yr, xl_f, xr_f, yl_f, yr_f)
xs = xl : h : xr
ys = yl : h : yr
num_of_x = size(xs, 'c') - 2
num_of_y = size(ys, 'c') - 2
A = make_coefficient_matrix(h, num_of_x, num_of_y)
b = make_b_vector(f, h, xl, xr, yl, yr, xl_f, xr_f, yl_f, yr_f)
u = zeros(num_of_x * num_of_y, 1)
next_u = zeros(num_of_x * num_of_y, 1)
r = zeros(num_of_x * num_of_y, 1)
next_r = zeros(num_of_x * num_of_y, 1)
//adaptability test for kiyono
correct_u = adaptability(kiyono, xs, ys)
//disp(correct_u)
//disp(length(xs), length(ys))
//disp(size(A))
//disp(size(correct_u))
//disp(size(b))
//disp(length(xs), length(ys))
adaptability_error= map_matrix(A * correct_u - b, abs)
//disp(adaptability_error)
avg_error = sum(adaptability_error) / (size(adaptability_error, 'c') * size(adaptability_error, 'r'))
disp(avg_error)
//adaptablility test end
p = b - A * u
next_r = b - A * u
i = 0 //counter
alpha = 0
beeta = 0
while(norm(A * u - b) / norm(b) > ep)
i = i + 1
//disp(p)
//disp(r)
u = next_u
r = next_r
alpha = (r' * r) / (p' * A * p)
next_r = r - alpha * (A * p)
next_u = u + alpha * p
beeta = (next_r' * next_r) / (r' * r)
p = next_r + beeta * p
//disp(alpha)
end
Z = make_z_matrix(u, xs, ys, xl_f, xr_f, yl_f, yr_f)
disp(i)
//plot3d(xs, ys, Z)
//scf(14)
//clf(14)
//xset("colormap",jetcolormap(64))
//surfxs, ys, Z)
endfunction
|
a49a22325d5daee3679bb64e880c28717a22f58f | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.4/Unix-Windows/scilab-2.4/macros/mtlb/%s_m_b.sci | 06277d922c938ab31dec8d3e6da3d51f255c2fbd | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 67 | sci | %s_m_b.sci | function r=%s_m_b(a,b)
// Copyright INRIA
B=zeros(b)
B(b)=1
r=a*B
|
e3e48d53a53b4534b5d03977bb5981eef6d9ec3f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3740/CH5/EX5.5/Ex5_5.sce | 514b322d2fca86f9f1c4ecfb8ae51fc0911b7189 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 957 | sce | Ex5_5.sce | //Optoelectronics - An Introduction, 2nd Edition by J. Wilson and J.F.B. Hawkes
//Example 5.5
//OS=Windows XP sp3
//Scilab version 5.5.2
clc;
clear;
//given
lambda=0.84e-6;//wavelength in m
DeltaNu=1.45e13;//Transition linewidth in Hz
Gamma=3.5e3;//Loss coefficient in m^(-1)
n=3.6;//Refractive index of GaAs medium
n1=1;//Refractive index of air medium
l=300e-6;//Length in m
d=2e-6;//Diameter in m
etai=1;//Internal quantum efficiency
e=1.6e-19;//Electronic charge in C
R=((n-n1)/(n+n1))^2;//Reflectance at GaAs/air interface by Fresnel equation
mprintf("\n R = %.2f",R);
Kth=Gamma+1/(2*l)*log(1/R^2);//Threshold gain in m^(-1)
mprintf("\n Kth = %.1f m^(-1)",Kth);//The answers vary due to round off error
Jth=8*%pi*e*d*DeltaNu*(n^2)/(etai*(lambda^2))*Kth;//Threshold current density in A m^(-2)
mprintf("\n Jth = %.1f A mm^-2",Jth/1e6);//Dividing by 10^6 to convert into A mm^(-2)
//The answers vary due to round off error
|
8191d10a64f406b28ae8b1060afbf36af690fe81 | aca04316c7c96dcc66a208d620f3bf5d6b0e45e9 | /Newton.sci | 95dcfdcb19f19d91d5838b5a7f734635ad06f1d4 | [] | no_license | yamiir/projet_Optimisation | 7979cc942549c745c88c822ec9ccac88094bbc56 | d51aac92f4cbd37013ea2f5f3137b8fb3958f648 | refs/heads/master | 2021-01-21T12:59:11.019376 | 2016-04-29T00:33:29 | 2016-04-29T00:33:29 | 52,592,455 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 872 | sci | Newton.sci | function [fopt,xopt,gopt]=Newton(OraclePG,xini)
x0=xini;
iter=5000;
tol=0.0001;
alphai=1;
logG=[];
logP=[];
Cout=[];
for k=1:iter
[F0,G0,H0]=OraclePG(x0,7)
if norm(G0)<tol then
break;
end
d=-H0\G0;
alpha=Wolfe(alphai,x0,d,OraclePG);
x1=x0+alpha*d;
logG = [ logG ; log10(norm(G0)) ];
logP = [ logP ; log10(alpha) ];
Cout = [ Cout ; F0 ];
x0=x1
end
fopt=F0;
gopt=G0;
xopt=x1;
tcpu = timer();
cvge = ['Iteration : ' string(k);...
'Temps CPU : ' string(tcpu);...
'Critere optimal : ' string(fopt);...
'Norme du gradient : ' string(norm(gopt))];
disp('Fin de la methode de gradient a pas fixe')
disp(cvge)
// - visualisation de la convergence
Visualg(logG,logP,Cout);
endfunction
|
9945f0cb5461f9df40969773dae464495e6341bb | 449d555969bfd7befe906877abab098c6e63a0e8 | /1910/CH11/EX11.3/Chapter113.sce | ad2c4a0be48acf88c854b95f7da4721829951c36 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 692 | sce | Chapter113.sce | // Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
clear;
clc;
disp("Introduction to heat transfer by S.K.Som, Chapter 11, Example 3")
disp("The view factors F13 and F31 between the surfaces 1 and 3 are ")
//Determine the view factors F13 and F31 between the surfaces 1 and 3.
//F1-2,3=F12+F13
//So F13=F1-2,3-F12
//Let F1-2,3=F123
//From Radiation Shape factor b/w two perpendicular rectangles with a commom edge table we get F12=.027,F1-2,3=0.31
F123=0.31;//View factor
F12=.27;//View factor
F13=F123-F12//View factor
//A1,A2 and A3 are the emitting surface areas
//From reciprocity relation F31=(A1/A3)/F13
A1=2;
A3=2.5;
F31=(A1/A3)*F13
|
a480bb2fbe7cb5f6cbd34cc1b0d9ece67354c134 | 683d2599aa2be1a5f74b928d545b20e7ea656cd1 | /microdaq/macros/mdaq_get_version.sci | 65320f13c140d65ee77d1bc57738a1c9f28958e6 | [
"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 | 74 | sci | mdaq_get_version.sci | function mdaq_ver = mdaq_get_version()
mdaq_ver = "1.0.";
endfunction
|
afe7472f6438ca9c1152ae9b987893d7c217d224 | 39c201c777151f939341e8f8150242bcde5a111b | /CH3/EX3.6/example6.sce | ffcf94f31297b558e9fef55c0ccb51c3e167886a | [] | no_license | nidhimj22/Scilab_Project- | 925a5883384736e79f1e600535461c6c9f06de40 | 4a9d1db96787ba0ea4e996349523a0b84bdacae3 | refs/heads/master | 2021-01-20T05:49:48.811688 | 2014-02-06T10:03:52 | 2014-02-06T10:03:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 888 | sce | example6.sce | // to find the load voltage, load current,diode power using second approximation
// Electronic Principles
// By Albert Malvino , David Bates
// Seventh Edition
// The McGraw-Hill Companies
// Example 3-6, page 67`
clear;clc; close;
// Given data
// thevenize the circuit to the left of the diode.
// looking at the diode back toward the source,we see a voltage divider with 6 killo-ohms and 3 killo-ohms.
R=2000;// thevenin resistance in ohms
V(1)=12;// thevenin voltage in volts
// Calculations
disp("Using Thevenin Thm")
V(2)=0.7;// diode voltage in volts
I=(V(1)-V(2))/3000// load current in amperes
P=V(2)*I // diode power in watts
V=I*1000// load voltage in volts
disp("Amperes",I,"Load Current=")
disp("Volts",V,"Load Voltage=")
disp("Watts",P,"Diode power=")
// Results
// load voltage is 3.77 volts
// load current is 3.77 milli amperes
// diode power is 2.64 milli watts
|
4cf200b932310c603a5c0efd7d24cc3094d325e1 | 420d4bcc40d948804a4370652e50a00cbe639cfe | /Graphs API/make-tests/alpha.tst | cc9df71e7abf4a565558c7881aac0856517d20c0 | [] | no_license | itsbriantruong/projects | 8cce3eba78a98e598e249f0adffcd9c3b9e3d5ab | 252ad31d3c74ef77e1cee43244e8f51ca47f9b63 | refs/heads/master | 2021-05-29T19:08:04.548321 | 2015-09-09T09:03:16 | 2015-09-09T09:03:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 70 | tst | alpha.tst | java -ea make.Main -f make-tests/alpha.mk -D make-tests/prealpha food
|
5b47d7b28d32c749aa163f519e3ec06d271d3e0d | 449d555969bfd7befe906877abab098c6e63a0e8 | /1529/CH22/EX22.2/22_02.sce | 6a02bf2bef74c5de72513ff9e01f2decbd6a4e28 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 336 | sce | 22_02.sce | //Chapter 22, Problem 2
clc;
E=240; //e.m.f
Z=50*16; //no of armature conductors
phi=30e-3; //flux
p=4/2; //no of pairs of poles
c=2*p;
n=(E*c)/(2*p*phi*Z); //armature speed
printf("Speed = %d rev/s",n);
|
0c9837c29397ca3f78fbfd36c8d5462e92a5007b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3772/CH5/EX5.15/Ex5_15.sce | 6adcca0910ac17136ca4c712cfdc68fbe073b172 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,304 | sce | Ex5_15.sce | // Problem 5.15,Page no.137
clc;clear;
close;
B=20 //cm //width of timber
D=30 //cm //depth of timber
d=25 //cm //depth of steel plate
b=1.2 //cm //width of steel plate
sigma_s=90 //N/mm**2 //Bending stress in steel
sigma_t=6 //N/mm**2 //Bending stress in timber
m=20 //Ratio of modulus of elasticity of of steel to timber
//Calculation
//Equivalent width of wood section,when 1.2 cm wide steel plate is replaced by steel plate is
b_1=1.2*20 //cm
d_1=25 //cm //depth of wood section
y_1=d*2**-1 //cm //C.G of timber section
y_2=D*2**-1 //cm //C.G of steel section
Y_bar=(2*d*b_1*y_1+D*B*y_2)*(2*d*b_1+D*B)**-1 //cm //Distance of C.G from Bottom edge
I=B*D**3*12**-1+B*D*(y_2-Y_bar)**2+2*(b_1*d_1**3*12**-1+b_1*d_1*(Y_bar-y_1)**2) //M.I of equivalent timber section about N.A
Y=30-Y_bar //distance of C.G from top of equivalent wood section
//Thus max stress will occur at top and that in steel will occur at bottom
//sigma_s=m*Y_bar*Y**-1*sigma_t
//After simplifying we get
//sigma_s=15.99*sigma_t
sigma_t=sigma_s*15.99**-1 //N/mm**2 //Max stress in Equivalent timber section
Z_t=I*Y**-1 //Section modulus of equivalent section
M=sigma_t*Z_t*10**-5*100 //Moment of resistance of beam
//Result
printf("Position of N.A is %.2f cm",Y_bar)
printf("\n Moment of Resistance of beam is %.2f kN-m",M)
|
05c4e3a579545ba1b4ad16e141497436ee999286 | 66106821c3fd692db68c20ab2934f0ce400c0890 | /test/disassembler/cp.instr.tst | 221fc53448e88a86d37bfdc281c219ca0595334a | [] | no_license | aurelf/avrora | 491023f63005b5b61e0a0d088b2f07e152f3a154 | c270f2598c4a340981ac4a53e7bd6813e6384546 | refs/heads/master | 2021-01-19T05:39:01.927906 | 2008-01-27T22:03:56 | 2008-01-27T22:03:56 | 4,779,104 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,494 | tst | cp.instr.tst | ; @Harness: disassembler
; @Result: PASS
section .text size=0x00000080 vma=0x00000000 lma=0x00000000 offset=0x00000034 ;2**0
section .data size=0x00000000 vma=0x00000000 lma=0x00000000 offset=0x000000b4 ;2**0
start .text:
label 0x00000000 ".text":
0x0: 0x00 0x14 cp r0, r0
0x2: 0x10 0x14 cp r1, r0
0x4: 0x20 0x14 cp r2, r0
0x6: 0x30 0x14 cp r3, r0
0x8: 0x40 0x14 cp r4, r0
0xa: 0x50 0x14 cp r5, r0
0xc: 0x60 0x14 cp r6, r0
0xe: 0x70 0x14 cp r7, r0
0x10: 0x80 0x14 cp r8, r0
0x12: 0x90 0x14 cp r9, r0
0x14: 0xa0 0x14 cp r10, r0
0x16: 0xb0 0x14 cp r11, r0
0x18: 0xc0 0x14 cp r12, r0
0x1a: 0xd0 0x14 cp r13, r0
0x1c: 0xe0 0x14 cp r14, r0
0x1e: 0xf0 0x14 cp r15, r0
0x20: 0x00 0x15 cp r16, r0
0x22: 0x10 0x15 cp r17, r0
0x24: 0x20 0x15 cp r18, r0
0x26: 0x30 0x15 cp r19, r0
0x28: 0x40 0x15 cp r20, r0
0x2a: 0x50 0x15 cp r21, r0
0x2c: 0x60 0x15 cp r22, r0
0x2e: 0x70 0x15 cp r23, r0
0x30: 0x80 0x15 cp r24, r0
0x32: 0x90 0x15 cp r25, r0
0x34: 0xa0 0x15 cp r26, r0
0x36: 0xb0 0x15 cp r27, r0
0x38: 0xc0 0x15 cp r28, r0
0x3a: 0xd0 0x15 cp r29, r0
0x3c: 0xe0 0x15 cp r30, r0
0x3e: 0xf0 0x15 cp r31, r0
0x40: 0x00 0x14 cp r0, r0
0x42: 0x01 0x14 cp r0, r1
0x44: 0x02 0x14 cp r0, r2
0x46: 0x03 0x14 cp r0, r3
0x48: 0x04 0x14 cp r0, r4
0x4a: 0x05 0x14 cp r0, r5
0x4c: 0x06 0x14 cp r0, r6
0x4e: 0x07 0x14 cp r0, r7
0x50: 0x08 0x14 cp r0, r8
0x52: 0x09 0x14 cp r0, r9
0x54: 0x0a 0x14 cp r0, r10
0x56: 0x0b 0x14 cp r0, r11
0x58: 0x0c 0x14 cp r0, r12
0x5a: 0x0d 0x14 cp r0, r13
0x5c: 0x0e 0x14 cp r0, r14
0x5e: 0x0f 0x14 cp r0, r15
0x60: 0x00 0x16 cp r0, r16
0x62: 0x01 0x16 cp r0, r17
0x64: 0x02 0x16 cp r0, r18
0x66: 0x03 0x16 cp r0, r19
0x68: 0x04 0x16 cp r0, r20
0x6a: 0x05 0x16 cp r0, r21
0x6c: 0x06 0x16 cp r0, r22
0x6e: 0x07 0x16 cp r0, r23
0x70: 0x08 0x16 cp r0, r24
0x72: 0x09 0x16 cp r0, r25
0x74: 0x0a 0x16 cp r0, r26
0x76: 0x0b 0x16 cp r0, r27
0x78: 0x0c 0x16 cp r0, r28
0x7a: 0x0d 0x16 cp r0, r29
0x7c: 0x0e 0x16 cp r0, r30
0x7e: 0x0f 0x16 cp r0, r31
start .data:
|
4502d9204a5624735ebd496a06267c04fe3eb8c3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1332/CH15/EX15.8/15_8.sce | 49c24e8288fa3663bab0083b4d109cecfa368054 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 209 | sce | 15_8.sce | //Example 15.8
//Euler Method
//Page no. 513
clc;clear;close;
deff('y=f(x,y)','y=x+y')
y(1)=1;
h=0.1;
for i=1:6
printf('\ny(%g) = %g\n',(i-1)/10,y(i))
y(i+1)=y(i)+h*f((i-1)/10,y(i))
end |
4cfb94b02bb9568cd62cc51f4d581b8d8d2addf5 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set4/s_Control_Systems_S._Ghosh_773.zip/Control_Systems_S._Ghosh_773/DEPENDENCIES/6_1.sce | b87f2097de05eb18a47409e5da4d66ae8d598780 | [] | 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 | 99 | sce | 6_1.sce | errcatch(-1,"stop");mode(2);function [y]=parallel(sys1,sys2)
y=sys1+sys2
endfunction
exit();
|
303aa68171f0deffb9ca43d673265c759b8aee10 | 5f48beee3dc825617c83ba20a7c82c544061af65 | /tests/s/77.tst | 8917512f3129aa4c645f51c3a198d184a9aea351 | [] | no_license | grenkin/compiler | bed06cd6dac49c1ca89d2723174210cd3dc8efea | 30634ec46fba10333cf284399f577be7fb8e5b61 | refs/heads/master | 2020-06-20T12:44:17.903582 | 2016-11-27T03:08:20 | 2016-11-27T03:08:20 | 74,863,612 | 3 | 0 | null | null | null | null | WINDOWS-1251 | Scilab | false | false | 48 | tst | 77.tst | int f(int t, int (char)) /* ошибка */
{
} |
ec89400182e002212bea4467b17b16ab11f3a75a | 1489f5f3f467ff75c3223c5c1defb60ccb55df3d | /tests/test_bundle_1_b.tst | b2618db763a1b2b4c0cb330b8abfdc4a6f40f855 | [
"MIT"
] | permissive | ciyam/ciyam | 8e078673340b43f04e7b0d6ac81740b6cf3d78d0 | 935df95387fb140487d2e0053fabf612b0d3f9e2 | refs/heads/master | 2023-08-31T11:03:25.835641 | 2023-08-31T04:31:22 | 2023-08-31T04:31:22 | 3,124,021 | 18 | 16 | null | 2017-01-28T16:22:57 | 2012-01-07T10:55:14 | C++ | UTF-8 | Scilab | false | false | 6,428 | tst | test_bundle_1_b.tst | B 1 B64
D 0 rwxr-xr-x src 5b49f54e761a0d393a51ff22dfa69c8e
F 49 rw-r--r-- test.png 23b783e43b85896668d87c51486db315
iVBORw0KGgoAAAANSUhEUgAAAGQAAABLCAMAAACxxtKFAAAABGdBTUEAALGPC/xhBQAAAwBQTFRF7u7u3Nzc19fX0dHRxcXFvr6+tLS0qqqqpqamm5ubjo6OgoKCdXV1
bm5uZWVlJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn
JycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn
JycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn
JycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn
JycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn
JycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn
JycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn
JycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn4ghZdwAADupJREFUWEc12Qli40gORFFK3Cm57n/ceR/q6aXKlslM
LIFAAF5e63Gd+/p8lvN7bNu5XcffsV/H4b99v+598+Hruc/9fvbnOLZjX+97P+/93vZj3bbj2u7tuG/nvPfTe8++39e2bj17rPvnOJfP4dV7X7/nfnzP89xd6PR5Yj/2
czvO43wf532cpwduP9uuy4ceuNz2uOq67s3Pr8OPtvXjCT/YPOvvjZ3Ldz3P7by84U3XOfe+dqYe/bP5170bZ+9zY2Ef7uvm4nN7c2P9HO993c/zzb7r4efG2u347O+X
916svY/lcx73emb7uZ6Xw97Pnk23zw4R2l16rK8sc+bnYuXFpFPsLuFdHzHzt8OLo48usRbh27vcc/TxLKuQso4Z3GHg8WbJuTPfVWu2CbhT/b8/6/NcTjmPbeXY13ur
3IgKg7y6v93ivdzm9bm62lXHcnns9MZxhQBhlm3mS4ZLDtf+vrmPgu/EO8c+HLk3uZukXdvmHRYDgAckYhWjx8NMPIRkcaX3s+fY9nPdpG2ywYjv4a0yCmGXh/L5LmkT
pb7he0H0XGmFIPH4bt22ivwaKnxyLq/SVuj257+0ySJ31rsMhsGuX+DuPTH5sMcFO4vYV6iF5rmf1aH3ubhNrE8WSbafXoL7WYRMHLy2QbSPHeG+jHci1O7e3q/X+rBk
v/z3OT6OgVHxyRP+CABAcBSaM0RFHArBj/x1r/cCP5e48ktgD5mQtzczfDa3eOlar9z1B+xt13q6V2wY/wCaVIqof7ftn0hVH5WPeD/nVcntu2L8FW3p5ho4Xh/eAQHX
5tPHVVAJBEX4EgEQel4nd4XiOV9ODpHHSzE4VcKO9+Fcjqi5z3MtVYu8dsGbYRhmFQVefLa3y8UtpuF1YLhUUaCFZaf6me/+xCMG6phH/j/CfTwvpS6C4qPkF3koSt56
3ipdsNZcF3x4nCL1Z165/3gUrE/6EW6TR+g9xLZa2cpMIZfu7RkEvqd49mcJQ7jhxXMBFkCEJJvIpsPVq1B45nVLQDeyLRcY37fdcUOCyPjRKpH8icIuwYz+KvHvMrUH
8G9ffCRtXQc2DgNNMQj6nfZiiYT6SlXJFQv+IDEDBCH2dQ1sRY37/i5m22vI5PgsB5RU8vwrzBLHDSkKB0Esqpy7AAaq2H8XUKfLmtJ0Sdl1pMcDAHqNBorC23UifS3v
HFRZ4j6NYfJQsVQv3hUJjzt0/5xxjucqGSkPgM/9QhuFziOx0EeR8LBcYBdO1TAWKPNSVeKSyMQFlV/B9gm0Okx93JC6fUr0tk6nUHAsv96itx7RmPDLCkPEBWSvKBmA
pHxZNYfpOYi10Ki0IQMW82WN7HvCF3WW25t8YFFYiAfF6T7eABaco26OqkaB+n7Uih9/eOKo8+9X2aeEgwB/IOFGSBx++jjz48zwEq877VaE8MyiVX2WDbS7b+/v9apI
pfO1/0NK5+u6FrXykrN6h9ITzAdGGJ6xZ5hwgbsF9KWnlbfrb70+OkuAWHs8BAJUDUObVyKBPtCEp4xa1EefRZFDvHJx4nvWyocrc3TQEo6E2sEPQsblZ0X9/pAK8e60
I5QkThSFNuDMuqAUXIsIPFUCc7u0XlyRT+3yIEZXbUHxR8LyFU6dWmHE05It5ZW69kGLAGJ4U2bedImKj+1WzPqKs+U6higL8nC/r29nj44J2B5Fw3+MmNLClFLPEm1S
jDj29r3rIVv3kwJ1pSNty3oSRfeHfHDle9pEKiho6W9EE1NZ7DWNKFi+fJYmmeqN+B5EFMuiwILg8on+IG90k84oINvxz0vcRiksON6XoNWsfCGMXnXOlGxC4frQb/VD
/4VRlagmcQTQ6zG1kq8n5UjOwkQsXIt9KJhSN6X9RaAxUB8JAjtXKLoPVCQsgiitQ4nzqkO2yizGcW8R0CxqUXkykmphxIekfF/HN7UHBmJWZ9bj8DtE9rAcPJ9LVwK4
dzfHzxU2HhKu6LsqGtx7S1KA/K4vltPlQRSsxZt1vufdn29y4y1KyWBnfXs9Vkshq+aIEjLdU9tIGjFGmY/k3FBIoMyViCMmXRATElr/fA/eSmQ6cQCNDIOjwo3W7oq2
gMZ103v1QQjx8Ak887WgBmwGBUX/CqBipnVEOxvBphOvyujza9q1LLaBAlRwXziGxuuPc6hTUzXclz1tkykO+VkXe/xNRz6xcLbsH+XO76ivxibDAUc4kKxjp6N4nnJR
B1BR4YICGVBpjJpXssBepeNpVKvSvhhWbOvxP5mWYJh0MzcNjCojeuH/cHwHSZa/CQE/qUOznI5JTkbt7kHfTGQXLPsQeddjpJjkE5CMawbh94OI6p/pBK+Jqlou6zNo
pGddJyq1+a7Iq1ElZVi20uzT92rV9Z2vEsZdUgMe12uU4nQ5gWsyakxIHDOGAo12QC1YGaNcdam8j8roBwPzesg0a3aqlRT3vf7B0fJe1/ud+qx1fOsa2OHGZP+lr8IH
pU/hHB2e5N1vPIvlGlbcKU6M7s8Q9Bs9FHQABo1nKyeCgJ+8sn5QXb7EbEGrYFwfgcRQJSPuqIs6r3pK9D7VY5qzsaXeHkGNbqD5QpGhgRYeNRmWrusNTQ1M47Gb1i9S
Gn1UM4zLAA46WJ/QihF9GtWmlfKrm3xekt635iIbq5w0+MSBTUVfn8iuWbiuswGDKoPLIdgRPPVxwVW3OBTOvsFHIGJvSZF58UwLoB9a+jcYLu6EvRQR7Gp6+vzowvMv
hV3ZREf6ZwNsNTsyTCbEDWU+uDusRAAJ6iGJCcNQ2YjDZ6kcIroChrnQc8oSYzay1dhGxUyfKQaixa0kCecIgwZWoj5IkjEC1CX+0n8migL3HIREWWVzAiIU9mX2+Rzn
a2eO5YgUpkkasz1TV1X8lalRrKypXrVTkzNYN1YWDnDXoPST2tn9IdK4xicKBlq4Gl/s9GWjOAB+ocC956t4N7SYDN9i6pNBdiHIgo9Dg/3Q1wz+hqCXMq1WZ36tA4dn
I6nEgxEcjNJEm9JXn90sAUCXj/XjEQMS9MKOUiIKIiVsnJjuqu5ctLxfI25ENNYeNvCVsJVcOIh64zeLl1ieIGhEEO+1XoeZG8u8oKm8PoDVHqGWsZ1fKb/V2Puf0QGs
CoChrDWEepaIAN0o6CLfjzLoEoXdbJ1vCJPzgtyFTYH64a1iw880zaTy4GHVtGoMiQw/f/NRS7zehMUM2XBrhok4/wFQg9PdoifmcUM8GS+krD0sFWPQ6BQhec06KG2/
1GRaskjuzAwtgK5FsfhqFiM1PpI+BmPV/iWOL8iYiWam6BnuoudALV4VKd8EUi0ORy/fppqgnkSbrBSBZm4KhhW0UJ2LgXWjqkvKhKrxyswyj7POjbOAaZVVgYTopF1a
cV0aBmCg7rd927c0HqgFJGEIO9EHEQRAt2meKoGe65s0Z2rzkHkr5hMME9xoJcBLfSSDtZy5cbmR4HyIUfc/mCvJn2f9XOjc2F2DyKIZqiueQGs/pJyih8p0WoADX5ZE
8Q90O4x9DZdlY3FDfUSdEH2NPxVq5DDwTM/+GxC7LSGOFDLW5HEJlAIcnVPEfGEFIE3ni+puu1AxzsbPiG0180h6DpYtqGq5JMh/0yv2D7tnV/BtCK2WpTe9lzW2AhOs
/38bdxsoyzDwa1gpvKVGN/QYB75m/ecLV4uW1MdWHm3OlKOIsOHYUJ8gKd6znlJTLSPwuaVMHU1u7UA121jfJfWRClEDzoUAVeWEknYTMzvk0azvWt3JbJqyUrE48dL6
rAqbdHTyrAjzO2DbQg70l8YT03sT8cyurQP7jmob3cmjdnjpJuXxCk2sN9NrJUMoIFW/gsnterrGYyzK6+F6iFp8LuyXCdedyXmF3QjfvF3vkEv5qfP5aQgUlNmNpQZ/
O4b6LX/TMPnZoN7sWXOY5WwyVVD0GA/b7DRU5YyqjXRmW9B040fzxkxo4WuYKLemrc9oV4dJEs5sAhAzZSrKhyfxjINaFdW+20XXafavmtj+tJD04oiSJtrZMJOjRqM4
o7FzZjZwNUJFnVErOM4aeDYbsVTSLe5Bo8M0v6p90fc1efag7ERMYko+WoOkdEbnfUZhxNZRUtwYdQwr2QjVppv092UGy9hQqFOZythiHsYad3olTvXn3/lv5vz02Gwe
yijNJ/TIFx20OW08634npPUTm43+LkEd7dPcMjxUXkVABc/iOgEgGCA2X4x501zEJNkQ9Y9G9uMWxIk+pwCbtcqs4D7Xovttr2+Co/UlbqGJ0n562idud0l75BmBY5L4
c9R19WOr0g40GITPljcv455dqqiKsJYSjy8WdtvbKF1JDPmrpoYkUE5pJQRvz8yQUPmOwHcCZLagazFmgKuaV/+k4NqmJ6X2f5iuUcxuBTN5yBsjnGZVy1i/MclTIicI
/7b3M+P2Gwklwb/P9hJNW8NYsxWL1lqTrXc31Ax/jzxcZknsjiKCKvWSirR674HWZzOVXryJajottgmojx1AmyZrkcT+byyplLI5XW7wIK8NQb/5/+eXDoBgg1o0DxfF
NZqazXQ98Md5vy1PnCIK+o4IOz0PWy81Bs7CbfvErHK1hKlcSReMIqlPDkq/ayr+N4B+KjX2OpSfMxv8+u+sbVzEE4u9mcgZxDYpvshI9r/uJTqKAX7bqCqi31PNEDPl
Oxe+GyLVkxqqGvqNAE9kjEhr7RaIW4U13voyGdB8Ob8Xet7Uyiwq4+H6++hFAVXEEA1PtQkhD4v10HjDxNsbv0WrMv924ywnRmRPnBqkOipqXc+lBMx00ryb7KyR13QS
OG37hnNnlR0io0KFoUL6lUvSq6JpMRoSa1c8L1ooK3HnvN2is+VXFH3/azLtFdGEicq+VSbskLezZg7VM7ENSSnStlXz24yQlYiYGi/EmHC2ArnbvguSkh6IaFCSwmn6
aOUS5BqfBjkhY9aHIhaXghAylmyllhxSt181MHUyW+oqaOZ529R3v4TMwOx2EJpCrzIw5eyMN5NZ+v9eh4KANghVDc/fDDFJ+r/4YfaKuNG9iu4XkGW7v+2RY6Vvy8Zp
CCGpompvZQQwFTTyzJCQSEoONpn1+xpZZ6NxAppayRSMaFEBGXNzfX/+B0mquRakj436AAAAAElFTkSuQmCC
C e32412a78b9c7622f7c00989db54fa43
|
e9e6e3a08b8b65565e90bc730cb0c9fc64b15ccb | 449d555969bfd7befe906877abab098c6e63a0e8 | /869/CH10/EX10.5/10_5.sce | c3a8933a4a9585f879a7939287842d74d81a41c4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 10_5.sce | clc
//initialisation of variables
Tallowable= 5000 //psi
power= 250 //hp
n= 1800 //rpm
//CALCULATIONS
T= 63000*power/n
d= (16*T/(%pi*Tallowable))^(1/3)
//RESULTS
printf ('Torque= %.2f lb in',T)
printf ('\n diameter=%.2f in',d)
|
83cb3c5b9d358b475039bf8558d6c73181cf1c05 | 449d555969bfd7befe906877abab098c6e63a0e8 | /69/CH2/EX2.19/2_19.sce | 66649932d0c1af0ef7494a54e3813f87c4c7843d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 347 | sce | 2_19.sce | clear; clc; close;
t = 0:0.1:20;
for i=1:int(length(t)/2)
vi(i) = 20;
end
for i = int(length(t)/2):length(t)
vi(i) = 0;
end
for i=1:int(length(t)/2)
vo(i) = 20+5;
end
for i = int(length(t)/2):length(t)
vo(i) = 0;
end
plot2d(t,vo,2,'011','',[0,-5,21,30]);
a = gca();
a.x_label.text = 't';
a.y_label.text = 'Vo';
|
fda09374281cb6d460abae867aea3c83e994b344 | 6b7e9274b9748e4dffc5ede7f068decafb31ee39 | /Common-Core/Basic-numerical-methods/code/src/diff/my_cholesky.sce | bc86a4b65da8ad9dfe0c3038c6bbbe822eea1115 | [] | no_license | nadir-aitlahmouch/Grenoble-inp-Ensimag | 9ae70296c7ddac221dff9cfeb5b02bb2fc673a4a | ea1ea530ea05420e9caf16db6b3d3e4c306248df | refs/heads/main | 2023-03-12T00:08:33.719439 | 2021-03-04T00:53:39 | 2021-03-04T00:53:39 | 343,920,590 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,350 | sce | my_cholesky.sce |
function [A]=cholesky_fact(A)
[n,m] = size(A);
T = zeros(n, m);
T(1,1) = sqrt(A(1,1));
for i=1:n
T(i,1)=A(i,1)/T(1,1);
end
for p=2:m
somme = 0
for k=1:p-1
somme = somme + T(p,k)^2
end
T(p,p)=sqrt(A(p,p) - somme);
for i=1:n
somme2 = 0
for k=1:p-1
somme2 = somme2 + T(i,k)*T(p,k)
end
T(i,p) = (A(i,p) - somme2)/T(p,p);
end
end
A=T
endfunction
function [y]=up_sweep_cholesky(A,x)
[m,n]=size(A);
if (m~=n) then
print(%io(2), "error, not a square matrix");
else
//-------------------------
y = zeros(n,1);
y(n) = x(n)/A(n,n);
for k=n-1:-1:1
somme = 0
for i=n:-1:n-k+1
somme = somme+A(k,i)*y(i);
end
y(k)= (x(k) - somme)/A(k,k);
end
//------------------------
end
endfunction
function [y]=down_sweep_cholesky(A,x)
[m,n]=size(A);
if (m~=n) then
print(%io(2), "error, not a square matrix");
else
y=x;
y(1)=y(1)/A(1,1);
for i=2:n,
y(i)=y(i)-A(i,1:i-1)*y(1:i-1);
y(i)=y(i)/A(i,i);
end;
end;
endfunction
function [U]=my_cholesky(N,S)
[m,n]=size(N);
if (m~=n) then
print(%io(2), "error, not a square matrix");
else
T = cholesky_fact(N);
U=down_sweep_cholesky(T,S);
U=up_sweep_cholesky(T',U);
end;
endfunction
|
ece65babf2d24d6c8e3b4a6ae1ce60c8225c1ada | 449d555969bfd7befe906877abab098c6e63a0e8 | /536/CH9/EX9.24/Example_9_24.sce | e443e2ea8e78ee37d202eb20ed806c345fda5343 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,051 | sce | Example_9_24.sce | clc;
clear;
printf("\n Example 9.24");
d_v=1;//diameter of the vessel
L=0.3;//diameter of propeller agitator
N=2.5;//rotating speed of propeller agitator
T=310;//Temperature
G=0.5;//circulation speed of cooling water
d_o=25e-3;//outer diameter of stainless steel coil
d=22e-3;//inner diameter of stainless steel coil
d_w=(d_o+d)/2;
d_c=0.8;//diameter of helix
T_m=290;//mean temperature
k1=0.59;
Meu1=1.08e-3;
C_p1=4.18e3;
x_w=1.5e-3;
//From equations 9.202 and 9.203, the inside film coefficient for the water
//is given by:
h_i=(k1/d)*(1+3.5*(d/d_c))*0.023*(d*1315/Meu1)^0.8*(C_p1*Meu1/k1)^0.4;
//The external film coefficient is given by equation 9.204:
C_p2=1.88e3;//Specefic heat capacity
Meu2=6.5e-3;//viscosity
k2=0.40;
rho=1666;
Meu_s=8.6e-3;
h_o=0.87*(C_p2*Meu2/k2)^(1/3)*(L^2*N*rho/Meu2)^0.62*(Meu2/Meu_s)^0.14*k2/d_v;
k_w=15.9;
R_o=0.0004;
R_i=0.0002;
U_o=((1/h_o)+(x_w*d_o/(k_w*d_w))+(d_o/(h_i*d))+(R_o)+(R_i*d_o/d))^-1;
printf("\n\n The overall coeffecient of heat transfer = %.0f W/m^2.K",U_o);
|
64b8bc68dd92e39b87d1f8adb803f2cd9ed22005 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1964/CH13/EX13.21/ex13_21.sce | 0bad2ee19145bef4426ba302ea38b13e6415b047 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 667 | sce | ex13_21.sce | //Chapter-13, Example 13.21, Page 394
//=============================================================================
clc
clear
//INPUT DATA
Icbo=0.2*10^-6;//current in A
Iceo=18*10^-6;//current in A
Ib=30*10^-6;//current in A
//CALCULATIONS
a=1-(Icbo/Iceo);//common-base DC current gain
b=(Iceo/Icbo)-1;//common-emitter DC current gain
Ic=(b*Ib)+((1+b)*(Icbo));//collector current in A
mprintf("Thus common-base DC current gain and common-emitter DC current gain are %1.3f and %d respectively",a,b)
//=================================END OF PROGRAM=======================================================================================================
|
8d81ae871f9cbd50d0cb7aeabf4bc943c77b8cfd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2621/CH3/EX3.20/Ex3_20.sce | f133302e128d0729da8e14d6609a58be95b10675 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 707 | sce | Ex3_20.sce | // Example 3.20
clc;
clear;
close;
// Given data
format('v',9);
R1= 3.3;// in kΩ
R2= 3.3;// in kΩ
R3= 1.2;// in kΩ
R4= 1.2;// in kΩ
Rf= 3.9;// in kΩ
R5= 3.9;// in kΩ
Rp= 2.5;// in kΩ
A= 2*10^5;// unit less
f0= 5;// in Hz
Rin= 2*10^6;// in Ω
Rout= 75;// in Ω
Ad= -(1+2*R1/Rp)*Rf/R3;// voltage gain
disp(Ad,"The voltage gain is : ");
Rinf= Rin*(1+A*(R1+Rp)/(2*R1+Rp));//input resistance in Ω
Rinf= Rinf*10^-9;// in GΩ
disp(Rinf,"The input resistance in GΩ is : ");
Routf= Rout/(1+A/Ad);// output resistance in Ω
disp(Routf,"The output resistance in Ω is : ");
f_f= A*f0/abs(Ad);// bandwidth in Hz
f_f= f_f*10^-3;// in kHz
disp(f_f,"The bandwidth in kHz is : ");
|
26c2bdf535e0499476346a557f021f93cbb3c623 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1484/CH4/EX4.16/4_16.sce | ba60becea801dd10e91db4a56257fc561e2a0e30 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 361 | sce | 4_16.sce | clc
//initialisation of variables
l= 70 //ft
b= 10 //ft
Hl= 10 //ft
H1= 6 //ft
h1= 4 //ft
h2= 2 //ft
w= 2 //ft
h3= 3 //ft
Cd= 0.6
g= 32.2 //ft/sec^2
//CALCULATIONS
t= (l*b)*(Hl+H1)/(Cd*h2*w*h1*sqrt(2*g*H1))
t1= 2*l*b*sqrt(Hl)/(Cd*h2*w*h3*sqrt(2*g))
//RESULTS
printf ('Time of filling= %.2f sec',t)
printf ('\n Time of emptying= %.2f sec',t1)
|
7ac2d324f4484e958ecdd0cca9ece92d69ec432b | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.5/Unix-Windows/scilab-2.5/macros/scicos/do_setup.sci | 4523d15623dca7e180d56db05d6c28e8ceca4ce3 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 827 | sci | do_setup.sci | function wpar=do_setup(wpar)
// set integration parameters
// Copyright INRIA
if wpar(4)==[] then wpar(4)=100000;end
if wpar(3)==[] then wpar(3)=[1.d-4,1.d-6,1.d-10,wpar(4)+1];end
tolerances=wpar(3);
tf=wpar(4)
atol=tolerances(1);rtol=tolerances(2);ttol=tolerances(3);deltat=tolerances(4)
while %t do
[ok,tf,atol,rtol,ttol,deltat]=getvalue('Set parameters',[
'Final integration time';
'Integrator absolute tolerance';
'Integrator relative tolerance';
'Tolerance on time'
'max time step for integration'],..
list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1),..
[string([tf;atol;rtol;ttol;deltat])])
if ~ok then break,end
if or([tf,atol,rtol,ttol,deltat]<=0) then
message('Parameter must be positive')
else
wpar(3)=[atol;rtol;ttol;deltat]
wpar(4)=tf
break
end
end
|
fcdf7210f64e824feeb1b92d60073bc462977917 | 449d555969bfd7befe906877abab098c6e63a0e8 | /213/CH8/EX8.5/8_5.sce | 03082824b867e7d7e94f8f4e6ffa986436a77e70 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,652 | sce | 8_5.sce | //To find angular velocities and accelerations
clc
//Given:
omegaAP1=10 //rad/s
alphaAP1=30 //rad/s^2
P1A=300/1000,P2B=360/1000,AB=P2B //m
//Solution:
//Refer Fig. 8.10
//Calculating the velocity of A with respect to P1
vAP1=omegaAP1/P1A //m/s
vA=vAP1
//By measurement from the velocity diagram, Fig. 8.11(b),
vBP2=2.2,vBA=2.05 //m/s
//Calculating the angular velocity of P2B
omegaP2B=vBP2/P2B //rad/s
//Calculating the angular velocity of AB
omegaAB=vBA/AB //rad/s
//Calculating the tangential component of the acceleration of A with respect to P1
atAP1=alphaAP1*P1A //m/s^2
//Calculating the radial component of the acceleration of A with respect to P1
arAP1=vAP1^2/P1A //m/s^2
//Calculating the radial component of the acceleration of B with respect to A
arBA=vBA^2/AB //m/s^2
//Calculating the radial component of B with respect to P2
arBP2=vBP2^2/P2B //m/s^2
//By measurement from the acceleration diagram, Fig. 8.11(c),
aBP2=29.6,aB=aBP2,atBA=13.6,atBP2=26.6 //m/s^2
//Calculating the angular acceleration of P2B
alphaP2B=atBP2/P2B //rad/s^2
//Calculating the angular acceleration of AB
alphaAB=atBA/AB //rad/s^2
//Results:
printf("\n\n The velocity of P2B, vBP2 = %.1f m/s.\n",vBP2)
printf(" The angular velocity of P2B, omegaP2B = %.1f rad/s, clockwise.\n",omegaP2B)
printf(" The angular velocity of AB, omegaAB = %.1f rad/s, anticlockwise.\n",omegaAB)
printf(" The acceleration of the joint B, aB = %.1f m/s^2.\n",aB)
printf(" The angular acceleration of P2B, alphaP2B = %.1f rad/s^2, anticlockwise.\n",alphaP2B)
printf(" The angular acceleration of AB, alphaAB = %.1f rad/s^2, anticlockwise.\n\n",alphaAB) |
a2696aae679f068e07073fb182734a31075785d5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1895/CH8/EX8.13/EXAMPLE8_13.SCE | 275950d1624277eb61aaeab0122404a0a3bd7d01 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 597 | sce | EXAMPLE8_13.SCE | //ANALOG AND DIGITAL COMMUNICATION
//BY Dr.SANJAY SHARMA
//CHAPTER 7
//WAVEFORM CODING TECHNIQUES
clear all;
clc;
printf("EXAMPLE 8.13(PAGENO 404)");
//given
f_m = 3*10^3//bandwidth or maximum frequency
n = 5//system operation times
delta = 250*10^-3//step size in volts
f_m1 = 2*10^3//given maximum frequency to calculate amplitude
//calculations
NR = 2 * f_m//nyquist rate
f_s = n * NR//sampling frequency
T_s = 1/f_s//sampling interval
A_m =(delta/(2 * %pi * f_m1* T_s))//Maximum amplitude
//result
printf("\n\nMaximum amplitude for 2KHz input sinusoid = %.2f V",A_m);
|
6e0054919629c46dbe95a0f175c3644036e09e7d | 449d555969bfd7befe906877abab098c6e63a0e8 | /3860/CH9/EX9.4/Ex9_4.sce | c00f918e7b153779a71a9cdb584b98be9b163ce8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 944 | sce | Ex9_4.sce | //Example 9.4: Reduction of state table
clc // Clears the console
disp("Given State Table")
disp("q | x=0 x=1 | x=0 x=1")
disp('-----------------------------------------')
disp("A | F B | 0 0")
disp("B | E G | 0 0")
disp("C | C G | 0 0")
disp("D | A C | 1 1")
disp("E | E D | 0 0")
disp("F | A B | 0 0")
disp("G | F C | 1 1")
disp('State A-F, B-C-E, and D-G are equivalent. So, reduced state table is as given below.')
disp("q | x=0 x=1 | x=0 x=1")
disp('----------------------------------------------')
disp(" A | A B | 0 0")
disp(" B | B D | 0 0")
disp(" D | A B | 1 1")
//displays the reduced state table.
|
4622b1ae43de6237a9a927fc1ab3a05d7dd1c9ae | c0c48c5a363ac2c0bf21e72833d72a99771dc6ce | /Simulation_Codes/lab08_18i190002/Lab 8/supply.sce | 1aa032a1f556d7744a4c7c27f5a392e037ec9f3b | [] | no_license | shubham1166/Operarions_Research_Projects | 3b6664b83d89b2a005b5194489bfd0d95cafe3d8 | 8f28eea93d9e4ff3d6a8e95160c3f9464ce2fc34 | refs/heads/main | 2023-03-14T02:48:42.359247 | 2021-03-03T05:51:28 | 2021-03-03T05:51:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,661 | sce | supply.sce | supp = [538
481
513
485
548
543
502
487
459
493
466
511
546
535
531
514
530
528
495
536
483
486
495
528
468
513
521
502
520
484
463
528
462
455
498
468
458
518
508
545
509
484
548
550
477
515
537
487
456
486
500
455
474
482
535
471
534
545
528
522
497
540
500
465
496
477
489
456
490
459
479
523
456
471
456
469
521
504
508
523
524
522
461
515
527
462
550
503
547
472
530
527
547
488
528
504
543
547
522
459
463
538
469
499
539
492
464
517
535
507
536
537
513
513
489
501
538
469
468
480
523
509
476
541
503
511
517
536
454
515
485
536
550
473
486
502
549
536
496
490
528
483
465
497
548
484
545
547
455
499
471
504
526
519
464
535
548
541
484
503
533
483
513
498
470
533
483
511
524
539
527
536
459
537
486
519
507
510
542
540
472
494
488
530
471
513
543
533
517
459
496
496
530
500
494
505
495
537
466
454
455
491
480
452
536
527
544
468
518
518
541
513
535
550
501
461
523
457
513
505
492
497
471
455
548
467
463
466
546
456
490
511
481
529
529
487
517
459
530
461
457
483
452
452
541
511
538
550
495
462
522
476
506
537
478
473
539
535
508
542
493
508
461
509
491
542
498
537
511
490
487
464
451
530
539
492
535
472
482
502
454
492
470
517
544
511
534
490
506
505
464
542
458
463
534
528
526
468
462
550
476
527
508
493
478
535
511
517
513
476
460
471
512
460
505
451
538
500
507
498
500
527
518
526
511
540
514
497
475
494
544
523
520
527
536
515
465
524
532
463
521
518
455
459
536
529
527
550
472
537
514
537
524
502
508
505
473
508
456
493
477
458
518
504
503
496
464
545
489
472
511
515
455
543
496
521
540
511
485
537
480
503
523
500
530
480
518
538
516
487
466
547
523
550
509
490
531
492
534
550
477
505
512
507
461
544
464
460
487
471
477
485
544
531
452
527
520
461
486
536
459
547
499
536
452
507
490
529
465
522
540
546
507
498
545
525
535
466
488
531
494
521
453
515
498
502
470
509
546
497
499
458
474
505
460
489
453
516
485
518
511
542
523
500
505
477
471
503
522
503
550
536
525
525
512
500
526
547
492
488
510
488
493
514
483
532
504
484
466
517
469
505
529
458
477
527
548
518
503
527
519
500
479
530
494
495
502
463
461
549
489
455
465
485
454
464
454
548
538
452
482
496
466
487
526
529
545
494
464
545
502
532
471
451
455
516
466
494
523
476
486
540
476
451
512
488
519
519
511
521
515
470
539
493
548
512
463
460
519
517
530
536
480
501
475
501
510
548
455
536
524
462
535
501
522
467
503
547
474
537
523
470
542
467
527
496
542
477
545
509
542
462
473
515
497
471
476
543
522
529
527
483
504
492
491
464
545
545
542
464
456
530
511
466
473
521
486
542
520
529
533
482
507
545
471
457
466
527
469
522
524
514
495
549
511
491
488
511
513
475
480
489
452
457
547
527
514
462
505
519
506
466
534
536
456
533
549
490
548
502
502
532
494
506
525
497
545
529
509
474
542
500
519
523
498
528
451
523
520
469
525
466
475
536
507
478
483
542
486
487
454
483
470
518
462
459
532
540
455
529
486
535
502
509
511
515
480
502
494
473
497
469
534
470
451
535
461
466
530
537
509
475
547
504
519
474
511
476
479
541
];
|
dc7ae3875c682350bc6852059a665d9eda21b84e | 6e257f133dd8984b578f3c9fd3f269eabc0750be | /ScilabFromTheoryToPractice/CreatingPlots/testfchamp.sce | 737c3e87f3670721015d853ba93c6bb4fe295b90 | [] | no_license | markusmorawitz77/Scilab | 902ef1b9f356dd38ea2dbadc892fe50d32b44bd0 | 7c98963a7d80915f66a3231a2235010e879049aa | refs/heads/master | 2021-01-19T23:53:52.068010 | 2017-04-22T12:39:21 | 2017-04-22T12:39:21 | 89,051,705 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 522 | sce | testfchamp.sce | clf; xgrid(4) // grid
A=gca();A.isoview="on"; // isometric display
//choose a different color table
F=gcf();F.color_map=jetcolormap(64)
//two functions for vector fields
function [u]=converge(t,x)
u(1)=-x(1)
u(2)=-x(2)
endfunction
function [u]=rotation(t,x)
u(1)=-x(2)
u(2)=x(1)
endfunction
//plot the vector fields
x=[-4:4]';y=x;
rect=[-4 -4 4 4]
//vector field with current color table
fchamp(converge,0,x,y,rect=rect)
E=gce();E.colored="on";
//vector field in black
fchamp(rotation,0,x,y,rect=rect)
|
074f50942a3526f96a91f341ade6b17343ecdf4b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2855/CH12/EX12.50/Ex12_50.sce | 22695dbe12c2d059cce581bae92751f5613e6368 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 511 | sce | Ex12_50.sce | //chapter 12
//page no 542
//ex 12_50
//given
clear;
clc;
m=3;
n=1;
Tb=100; //ps
l=1; //nm
D=0.07; //ps/nm^2*km
lmn=1; //nm
lmo=2; //nm
Do=0.1; //ps/nm-km
Lc=4*Tb/[5*D*lmn*(lmn+2*lmo)];//Collision length in km
printf("\n Collision length without dispersion slope compensation = %0.1f km\n",Lc);//result
Lc2=2*Tb/[5*Do*lmn];//Collision length in km
printf("\n Collision length with dispersion slope compensation = %0.0f km",Lc2);//result
|
dd5919732d8b05e77d499fdf6a4cbc8f08412439 | 449d555969bfd7befe906877abab098c6e63a0e8 | /842/CH9/EX9.36/Example9_36.sce | 88c213281e77533422950357073c2335de8d65e9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 139 | sce | Example9_36.sce | //clear//
//Example9.36:Unilateral Laplace Transform
//X(S) = ((s^2)-3)/(s+2)
s = %s;
syms t;
[X] = pfss(((s^2)-3)/(s+2));
disp(X)
|
5f862c6ba41a622c26facf6b1e68dc4d526b43f7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2873/CH1/EX1.15/Ex1_15.sce | a697122081a8d9cb6c7e257fd27ca551c1212f0a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 758 | sce | Ex1_15.sce | // Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
clear;
clc;
disp("Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15")
P1=100*10^3;//initial pressure of air in pa
V1=5;//initial volume of air in m^3
T1=300;//initial temperature of gas in k
P2=50*10^3;//final pressure of air in pa
V2=5;//final volume of air in m^3
T2=(7+273);//final temperature of air in K
R=287;//gas constant on J/kg k
disp("from perfect gas equation we get")
disp("initial mass of air(m1 in kg)=(P1*V1)/(R*T1)")
m1=(P1*V1)/(R*T1)
disp("final mass of air(m2 in kg)=(P2*V2)/(R*T2)")
m2=(P2*V2)/(R*T2)
disp("mass of air removed(m)in kg")
m=m1-m2
disp("volume of this mass of air(V) at initial states in m^3")
V=m*R*T1/P1
|
b8abf87fa6252b478a6684a721a80b5e00808fae | 449d555969bfd7befe906877abab098c6e63a0e8 | /773/CH13/EX13.03/13_03.sci | fbe8212f7919d78d6e4c4665af7588557675a379 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 770 | sci | 13_03.sci | //polynomial//
s=poly(0,'s'); //Defines s as polynomial variable
F=syslin('c',[40/((2+s)*s*(s+5))]) //Creates transfer function in forward path
B=syslin('c',(1+0*s)/(1+0*s)) //Creates transfer function in backward path
OL=F*B; //Calculates open-loop transfer function
fmin=0.1; //Min freq in Hz
fmax=20; //Max freq in Hz
scf(1);clf;
bode(OL,fmin,fmax); //Plots frequency response of open-loop system in Bode diagram
[GainMargin,freqGM]=g_margin(OL) //Calculates gain margin [dB] and corresponding frequency [Hz]
[Phase,freqPM]=p_margin(OL) //Calculates phase [deg] and corresponding freq [Hz] of phase margin
PhaseMargin=180+Phase //Calculates actual phase margin [deg]
show_margins(OL) //display gain and phase margin and associated crossover frequencies
|
2dcb13fe685f8b069acebd94e51df40f7264cf8a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2087/CH4/EX4.8/example4_8.sce | a09a2f2dfc86e735f944321dfb096f35376455ab | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,023 | sce | example4_8.sce |
//example 4.8
//compute maximum rainfall intensities for 15,30,45,60,90,120 minutes
//plot intensity duration graph
clc;funcprot(0);
//given
CR=[0 12.4 22.1 35.1 52.7 63.7 81.9 109.2 123.5 132.6 143.3 146.0 146.0]; //cumulative rainfall
c15(2)=12.4;
c30(3)=22.1;
c45(4)=35.1;
c60(5)=52.7;
c90(7)=81.9;
c120(9)=123.5;
for i=3:13
c15(i)=CR(i)-CR(i-1);
end
for i=4:13
c30(i)=CR(i)-CR(i-2);
end
for i=5:13
c45(i)=CR(i)-CR(i-3);
end
for i=6:13
c60(i)=CR(i)-CR(i-4);
end
for i=8:13
c90(i)=CR(i)-CR(i-6);
end
for i=10:13
c120(i)=CR(i)-CR(i-8);
end
mprintf("15min 30min 45min 60min 90min 120min");
for i=1:13
mprintf("\n%f %f %f %f %f %f",c15(i),c30(i),c45(i),c60(i),c90(i),c120(i));
end
I=[109.2 91 79.7 74.1 67.6 61.75]; //maximum intensity at respective durations
D=[15 30 45 60 90 120]; //durations
//greph is plotted between I and D
|
1099a1801211357c705df98d69108259f10c73ad | fd015abd09bced711d72424064e2c554bc440ac0 | /main.sce | 565e0a5655124e30692889be703ed64267d4a864 | [] | no_license | meetps/scilab-sound | df739447adc40116b0c1c5905441117f64da597b | af35a828e61a6cf82f13472b1de870d5560da952 | refs/heads/master | 2021-06-06T17:55:13.748352 | 2015-03-10T19:49:11 | 2015-03-10T19:49:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,419 | sce | main.sce | exec('get_continuous_sinusoid.sci');
// You can use the function 'get_continuous_sinusoid' to obtain an array of values of the continuous time sinusoid
// The inputs to the function will be the signal amplitude 'a'(from 0 to1), fundamental frequency 'F0'(100 to 4000 Hz), phase 'phi'(in radians) and duration 'T'(in ms)
// The outputs will be the values 'y' of the sinusoid & their time indices 't'
// You could call this function multiple times and add the different sinusoids. Finally you can plot, play the resulting signal.
// For example:
a = 0.7;
phi = %pi/4; //(Radians)
time_list = [200, 200, 400, 400, 400, 400, 600, 200, 400, 200, 200, 400, 400, 400, 400, 600, 200, 400, 200, 200, 400, 400, 400, 400, 800, 400, 400, 400, 400, 400, 200, 400, 800];
freq_list = [185, 196, 220, 220, 247, 247, 220, 196, 185, 185, 196, 220, 220, 247, 247, 220, 196, 185, 185, 196, 220, 220, 247, 277, 294, 294, 330, 277, 277, 247, 277, 247, 220];
//[y,t] = get_continuous_sinusoid(a,freq_list(1),phi,time_list(1));
for sound_index = 1:length(freq_list)
[y,t] = get_continuous_sinusoid(a,freq_list(sound_index),phi,time_list(sound_index));
sound(y,10000);
end
// Plot the continuous time curve
//clf();
//plot(t,y,'b');
// Axis properties
//a = gca();
//a.x_location = "origin";
//a.y_location = "origin";
// Play the sinusoid
//sound(y,100000);
|
39807b1cdf73543774a2686115f3acde03e9367b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3392/CH11/EX11.8/Ex11_8.sce | 00748f9686047dfc222597fcfc53b6af73785750 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 393 | sce | Ex11_8.sce | clc
// initialization of variables
clear
a=100 //mm
b=300 //mm
Y=620 //MPa
E=200 //GPa
S_zz=0
v=0.29
rho=7.85e+03 //kg/m^3
// part (a)
S_thmax=Y
Wy=sqrt(4*Y/(rho*((3+v)*b^2+(1-v)*a^2)))
printf('part (a)')
printf('\n Omega_y =%d rad/s',Wy*10^6)
// part (b)
Wp=sqrt(3*Y/(rho*(b^2+a*b+a^2)))
ratio=Wp/Wy
printf('\n Omega_p = %d rad/s',Wp*10^6)
printf('\n ratio = %.2f',ratio)
|
0fded5ba01cadcba38a6419a7427c9cf12a67c52 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1970/CH6/EX6.12/Ch06Exa12.sce | c5d2891ff977176c01ac829277d84480b3330718 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ch06Exa12.sce | // Scilab code Exa6.12: : Page-244(2011)
clc; clear;
h_kt = 1.05457e-34; // Reduced planck's constant, joule sec
c = 3e+08; // velocity of light, metre per sec
m_e = 9.1e-31; // Mass of the electron, Kg
ft_O = 3162.28; // Comparative half life for oxygen
ft_n = 1174.90; // Comparative half life for neutron
M_f_sqr = 2 // Matrix element
g_f = sqrt(2*%pi^3*h_kt^7*log(2)/(m_e^5*c^4*ft_O*M_f_sqr)); // Coupling constant, joule cubic metre
C_ratio = (2*ft_O/(ft_n)-1)/3; // Ratio of coupling strength
printf("\nThe value of coupling constant = %6.4e joule cubic metre\nThe ratio of coupling constant = %5.3f", g_f, C_ratio);
// Result
// The value of coupling constant = 1.3965e-062 joule cubic metre
// The ratio of coupling constant = 1.461 |
2462e98e17dae9e4d23f573b960daaaf91c86226 | 449d555969bfd7befe906877abab098c6e63a0e8 | /374/CH4/EX4.1/41.sci | a41770da793d741f487bcb23d97f3e2398f41c85 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 643 | sci | 41.sci | //chapter 4 example 1//
clc
clear
//recombination life time=Tr,drive current=I,wavelength=l,total carrier life time=Tp,efficicency=E,internal generated power=Pint//
Tr=50;//in nano seconds//
Tnr=100;//in nano seconds//
Tp=(Tr*Tnr)/(Tr+Tnr);
printf("\n Total carrier combination life time=%fns \n",Tp);
E=Tp/Tr;
printf("\n efficiency=%f \n",E);
h=6.62*(10^-34);//plancks constant//
c=3*(10^8);//speed of light//
I=50*(10^-3);//current in amperes//
l=0.85*(10^-6);//wavelength in metres//
e=1.6*(10^-19)//charge of electron//
Pint=((E*I*h*c)/(e*l)*10^(3));//in milli watts//
printf("\n Internal generated power=%f*mW \n",Pint);
|
b57d649ee8c11e4dfaca42b10aee578ee4afc4e0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3834/CH11/EX11.1.3/Ex11_1_3.sce | 53e7893707847e4a23fed8b659503f0156567931 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 475 | sce | Ex11_1_3.sce | //Fiber-optics communication technology, by Djafer K. Mynbaev and Lowell L. Scheiner
//Example 11.1.3
//windows 7
//Scilab version-6.0.0
clc;
clear ;
//given
ETA=0.7;//The quantum efficiency
alphaabs=1E+5;//absorption coefficient
w=(log(1-ETA))/(-alphaabs);//The width of the depletion region of an InGaAs photodiode um
mprintf("The width of the depletion region of an InGaAs photodiode =%.1f um",w*1E+6);//Multiplication by 1e6 to convert unit from m to um
|
627db3315ff875f0278b84381eba6e66eb0e62cd | d4433dc5a6e90f6a26a4c5d9dee686eade240b25 | /3DTEST.TST | 17aec9478174fcbeec2e5085452eeeacd4b2db1a | [] | no_license | qb40/all | 6e2149ef3c6151717e468ca236840de622cf7d2a | e168acb64fbde09277b04515574507dcbe35161c | refs/heads/master | 2022-02-05T17:58:39.207269 | 2014-01-19T13:28:41 | 2014-01-19T13:28:41 | 106,962,623 | 5 | 0 | null | 2017-10-14T21:02:04 | 2017-10-14T21:02:03 | null | UTF-8 | Scilab | false | false | 633 | tst | 3DTEST.TST | 'Vic Luce Rotation formula
'x2=x*cos@+y*sin@
'y2=y*cos@-x*sin@
'My Rotation formula
'd=sqr(x*x+y*y)
'x2=d*cos@
'y2=d*sin@
'Both give exactly same result
'@ = theta = anti-clockwise angle(+ve angle)
'Vic Luce = 2.80
'Mine =1.64
SCREEN 13
k$ = INPUT$(1)
x = 100
y = 0
xcentre = 150
ycentre = 100
a = TIMER
FOR i = 0 TO 6.28 STEP .00001
PSET (xcentre + x * COS(i) + y * SIN(i), ycentre + y * COS(i) - x * SIN(i)), 1
NEXT
PRINT "Vic Luce="; TIMER - a
k$ = INPUT$(1)
a = TIMER
'd = SQR(x * x + y * y)
FOR i = 0 TO 6.28 STEP .00001
d = SQR(x * x + y * y)
PSET (xcentre + d * COS(i), ycentre - d * SIN(i)), 2
NEXT
PRINT "Mine="; TIMER - a
|
93e026e131436a123bec06b97b895fd8810859d2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3428/CH3/EX1.3.4/Ex1_3_4.sce | f8a565b8481d23f2205e4c0c4809c4b491c739c6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 549 | sce | Ex1_3_4.sce | //Section-1,Example-3,Page no.AC-234
//To calculate Temporary,Permanent and Total hardness of water in ppm.
clc;
A_1=4
M_1=100/162
Ce_1=A_1*M_1 //CaCO3 equivalent of Ca(HCO3)2
A_2=6
M_2=100/146
Ce_2=A_2*M_2 //CaCO3 equivalent of Mg(HCO3)2
A_3=8
M_3=100/136
Ce_3=A_3*M_3 //CaCO3 equivalent of CaSO4
A_4=10
M_4=100/120
Ce_4=A_4*M_4 //CaCO3 equivalent of MgSO4
T_H=Ce_1+Ce_2
disp(T_H,'Temporary Hardness of water in ppm')
P_H=Ce_3+Ce_4
disp(P_H,'Permanent Hardness of water in ppm')
Total_H=T_H+P_H
disp(Total_H,'Total Hardness of water in ppm')
|
8ef21a53192985105868c4d2abbb80550fab9f32 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1332/CH14/EX14.9/14_9.sce | 48b3a30b4c7ce4a61ec6c4c95bb87fb955283dfc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 285 | sce | 14_9.sce | //Example 14.9
//Gauss Legendre Three Point Rule
//Page no. 473
clc;close;clear;
deff('y=f(x)','y=1/(x+3)')
s=integrate('f(x)','x',-1,1)
printf('By Direct Method, I = %g',s)
s=5/9*f(-sqrt(3/5))+8/9*f(0)+5/9*f(sqrt(3/5))
printf('\n\n By Gauss-Legendre 3 point rule, I = %g',s) |
113122247058a9faab90426563bd5f49a6caa480 | 449d555969bfd7befe906877abab098c6e63a0e8 | /29/CH5/EX5.9.7/exa5_9_7.sce | 8fba364de85f37706ee010d9aa79af1607f0b682 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 298 | sce | exa5_9_7.sce | //Caption:transfer_function_of_generator
//example 5.9.7
//page 105
syms E Vf Kg R L
s=%s;
//generator_field_constant_Kg=delta(e)/delta(If)
Kg=50/2;
L=2;//field_inductance
R=200;//field_resistance
//transfer function is given by : E/Vf=(Kg/R+s*L)
a=Kg/(R+s*L);
disp(a,"E(s)/Vf(s)=");
|
f6293040f2b360b09a18956084ad5a5ca8635fed | e0124ace5e8cdd9581e74c4e29f58b56f7f97611 | /3913/CH3/EX3.3/Ex3_3.sce | e9933bed1f5124f40a379a68e127dde7e5715a51 | [] | no_license | psinalkar1988/Scilab-TBC-Uploads-1 | 159b750ddf97aad1119598b124c8ea6508966e40 | ae4c2ff8cbc3acc5033a9904425bc362472e09a3 | refs/heads/master | 2021-09-25T22:44:08.781062 | 2018-10-26T06:57:45 | 2018-10-26T06:57:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 268 | sce | Ex3_3.sce | //Chapter 3 : Systems of Linear Equations
//Example 3.3
//Scilab 6.0.1
//Windows 10
clear;
clc;
A=[1 1 1 1;1 -1 -1 1;-1 -1 1 -1;-3 1 -3 -3];
Y=[1;3;1;4];
disp(A,'A:')
disp(Y,'Y:')
mprintf('There are no numbers x,y,z,t that satisfy the matrix equation')
|
198e70b720acb23aab7731126fafafc3effed4c4 | 47adabef6eb8924aff50314b05cfd89f90e19aec | /demos/c_sum.dem.sce | d0fa0defb01b05ee85dc4d66c87c0e80ed87a4a9 | [
"BSD-3-Clause"
] | permissive | sengupta/scilab-http | acf41286543dfadb62bfbf1fc74d19cd6ec65815 | 114ac7ab3a55e08399a82e8a1c084bc23cace3a3 | refs/heads/master | 2021-03-12T20:38:08.900774 | 2012-04-03T13:14:33 | 2012-04-03T13:14:33 | 3,886,870 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 395 | sce | c_sum.dem.sce | // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2008 - INRIA - Allan CORNET
// Copyright (C) 2010 - DIGITEO - Allan CORNET
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
function demo_c_sum()
mode(-1);
lines(0);
disp("c_sum(3,4)");
disp(c_sum(3,4));
endfunction
demo_c_sum();
clear demo_c_sum;
|
1f420025ae5ef0d483faa33aa96f8ac3ac9126e9 | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/X20.prev.tst | b27fb49c3c79fba039c1f936d2e9e8809525aef4 | [
"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 | 17,426 | tst | X20.prev.tst | # orig Pythagoras.X20 a^2+b^2-c^2
# flat Pythagoras.X20 a^2 + b^2 - c
# merg Pythagoras.X20 - x_y_z + 2*x_y_z^2
# poly Pythagoras.X20 a^2 + b^2 - c^2
000001 [1] Pythagoras.X20 factor=1 parm= [1,0,0]
000001 [1] Pythagoras.X20 factor=1 parm= [-1,0,0]
000001 [1] Pythagoras.X20 factor=1 parm= [0,1,0]
000001 [1] Pythagoras.X20 factor=1 parm= [0,-1,0]
000001 [1] Pythagoras.X20 factor=2 parm= [1,1,0]
000001 [1] Pythagoras.X20 factor=2 parm= [-1,1,0]
000001 [1] Pythagoras.X20 factor=2 parm= [1,-1,0]
000001 [1] Pythagoras.X20 factor=2 parm= [-1,-1,0]
000001 [1] Pythagoras.X20 factor=1 parm= [0,0,1]
000001 [1] Pythagoras.X20 factor=1 parm= [0,0,-1]
000001 [1] Pythagoras.X20 factor=2 parm= [1,0,-1]
000001 [1] Pythagoras.X20 factor=2 parm= [-1,0,-1]
000001 [1] Pythagoras.X20 factor=2 parm= [0,1,-1]
000001 [1] Pythagoras.X20 factor=2 parm= [0,-1,-1]
000001 [1] Pythagoras.X20 factor=1 parm= [1,1,1]
000001 [1] Pythagoras.X20 factor=1 parm= [-1,1,1]
000001 [1] Pythagoras.X20 factor=1 parm= [1,-1,1]
000001 [1] Pythagoras.X20 factor=1 parm= [-1,-1,1]
000001 [1] Pythagoras.X20 factor=3 parm= [1,1,-1]
000001 [1] Pythagoras.X20 factor=3 parm= [-1,1,-1]
000001 [1] Pythagoras.X20 factor=3 parm= [1,-1,-1]
000001 [1] Pythagoras.X20 factor=3 parm= [-1,-1,-1]
000001 [1] Pythagoras.X20 factor=4 parm= [2,0,0]
000001 [1] Pythagoras.X20 factor=4 parm= [-2,0,0]
000001 [1] Pythagoras.X20 factor=5 parm= [2,1,0]
000001 [1] Pythagoras.X20 factor=5 parm= [-2,1,0]
000001 [1] Pythagoras.X20 factor=5 parm= [2,-1,0]
000001 [1] Pythagoras.X20 factor=5 parm= [-2,-1,0]
000001 [1] Pythagoras.X20 factor=4 parm= [0,2,0]
000001 [1] Pythagoras.X20 factor=4 parm= [0,-2,0]
000001 [1] Pythagoras.X20 factor=5 parm= [1,2,0]
000001 [1] Pythagoras.X20 factor=5 parm= [-1,2,0]
000001 [1] Pythagoras.X20 factor=5 parm= [1,-2,0]
000001 [1] Pythagoras.X20 factor=5 parm= [-1,-2,0]
000001 [1] Pythagoras.X20 factor=8 parm= [2,2,0]
000001 [1] Pythagoras.X20 factor=8 parm= [-2,2,0]
000001 [1] Pythagoras.X20 factor=8 parm= [2,-2,0]
000001 [1] Pythagoras.X20 factor=8 parm= [-2,-2,0]
000001 [1] Pythagoras.X20 factor=3 parm= [2,0,1]
000001 [1] Pythagoras.X20 factor=3 parm= [-2,0,1]
000001 [1] Pythagoras.X20 factor=5 parm= [2,0,-1]
000001 [1] Pythagoras.X20 factor=5 parm= [-2,0,-1]
000001 [1] Pythagoras.X20 factor=4 parm= [2,1,1]
000001 [1] Pythagoras.X20 factor=4 parm= [-2,1,1]
000001 [1] Pythagoras.X20 factor=4 parm= [2,-1,1]
000001 [1] Pythagoras.X20 factor=4 parm= [-2,-1,1]
000001 [1] Pythagoras.X20 factor=6 parm= [2,1,-1]
000001 [1] Pythagoras.X20 factor=6 parm= [-2,1,-1]
000001 [1] Pythagoras.X20 factor=6 parm= [2,-1,-1]
000001 [1] Pythagoras.X20 factor=6 parm= [-2,-1,-1]
000001 [1] Pythagoras.X20 factor=3 parm= [0,2,1]
000001 [1] Pythagoras.X20 factor=3 parm= [0,-2,1]
000001 [1] Pythagoras.X20 factor=5 parm= [0,2,-1]
000001 [1] Pythagoras.X20 factor=5 parm= [0,-2,-1]
000001 [1] Pythagoras.X20 factor=4 parm= [1,2,1]
000001 [1] Pythagoras.X20 factor=4 parm= [-1,2,1]
000001 [1] Pythagoras.X20 factor=4 parm= [1,-2,1]
000001 [1] Pythagoras.X20 factor=4 parm= [-1,-2,1]
000001 [1] Pythagoras.X20 factor=6 parm= [1,2,-1]
000001 [1] Pythagoras.X20 factor=6 parm= [-1,2,-1]
000001 [1] Pythagoras.X20 factor=6 parm= [1,-2,-1]
000001 [1] Pythagoras.X20 factor=6 parm= [-1,-2,-1]
000001 [1] Pythagoras.X20 factor=7 parm= [2,2,1]
000001 [1] Pythagoras.X20 factor=7 parm= [-2,2,1]
000001 [1] Pythagoras.X20 factor=7 parm= [2,-2,1]
000001 [1] Pythagoras.X20 factor=7 parm= [-2,-2,1]
000001 [1] Pythagoras.X20 factor=9 parm= [2,2,-1]
000001 [1] Pythagoras.X20 factor=9 parm= [-2,2,-1]
000001 [1] Pythagoras.X20 factor=9 parm= [2,-2,-1]
000001 [1] Pythagoras.X20 factor=9 parm= [-2,-2,-1]
000001 [1] Pythagoras.X20 factor=2 parm= [0,0,2]
000001 [1] Pythagoras.X20 factor=2 parm= [0,0,-2]
000001 [1] Pythagoras.X20 factor=1 parm= [1,0,2]
000001 [1] Pythagoras.X20 factor=1 parm= [-1,0,2]
000001 [1] Pythagoras.X20 factor=3 parm= [1,0,-2]
000001 [1] Pythagoras.X20 factor=3 parm= [-1,0,-2]
000001 [1] Pythagoras.X20 factor=2 parm= [2,0,2]
000001 [1] Pythagoras.X20 factor=2 parm= [-2,0,2]
000001 [1] Pythagoras.X20 factor=6 parm= [2,0,-2]
000001 [1] Pythagoras.X20 factor=6 parm= [-2,0,-2]
000001 [1] Pythagoras.X20 factor=1 parm= [0,1,2]
000001 [1] Pythagoras.X20 factor=1 parm= [0,-1,2]
000001 [1] Pythagoras.X20 factor=3 parm= [0,1,-2]
000001 [1] Pythagoras.X20 factor=3 parm= [0,-1,-2]
000001 [1] Pythagoras.X20 factor=4 parm= [1,1,-2]
000001 [1] Pythagoras.X20 factor=4 parm= [-1,1,-2]
000001 [1] Pythagoras.X20 factor=4 parm= [1,-1,-2]
000001 [1] Pythagoras.X20 factor=4 parm= [-1,-1,-2]
000001 [1] Pythagoras.X20 factor=3 parm= [2,1,2]
000001 [1] Pythagoras.X20 factor=3 parm= [-2,1,2]
000001 [1] Pythagoras.X20 factor=3 parm= [2,-1,2]
000001 [1] Pythagoras.X20 factor=3 parm= [-2,-1,2]
000001 [1] Pythagoras.X20 factor=7 parm= [2,1,-2]
000001 [1] Pythagoras.X20 factor=7 parm= [-2,1,-2]
000001 [1] Pythagoras.X20 factor=7 parm= [2,-1,-2]
000001 [1] Pythagoras.X20 factor=7 parm= [-2,-1,-2]
000001 [1] Pythagoras.X20 factor=2 parm= [0,2,2]
000001 [1] Pythagoras.X20 factor=2 parm= [0,-2,2]
000001 [1] Pythagoras.X20 factor=6 parm= [0,2,-2]
000001 [1] Pythagoras.X20 factor=6 parm= [0,-2,-2]
000001 [1] Pythagoras.X20 factor=3 parm= [1,2,2]
000001 [1] Pythagoras.X20 factor=3 parm= [-1,2,2]
000001 [1] Pythagoras.X20 factor=3 parm= [1,-2,2]
000001 [1] Pythagoras.X20 factor=3 parm= [-1,-2,2]
000001 [1] Pythagoras.X20 factor=7 parm= [1,2,-2]
000001 [1] Pythagoras.X20 factor=7 parm= [-1,2,-2]
000001 [1] Pythagoras.X20 factor=7 parm= [1,-2,-2]
000001 [1] Pythagoras.X20 factor=7 parm= [-1,-2,-2]
000001 [1] Pythagoras.X20 factor=6 parm= [2,2,2]
000001 [1] Pythagoras.X20 factor=6 parm= [-2,2,2]
000001 [1] Pythagoras.X20 factor=6 parm= [2,-2,2]
000001 [1] Pythagoras.X20 factor=6 parm= [-2,-2,2]
000001 [1] Pythagoras.X20 factor=10 parm= [2,2,-2]
000001 [1] Pythagoras.X20 factor=10 parm= [-2,2,-2]
000001 [1] Pythagoras.X20 factor=10 parm= [2,-2,-2]
000001 [1] Pythagoras.X20 factor=10 parm= [-2,-2,-2]
000001 [1] Pythagoras.X20 factor=9 parm= [3,0,0]
000001 [1] Pythagoras.X20 factor=9 parm= [-3,0,0]
000001 [1] Pythagoras.X20 factor=10 parm= [3,1,0]
000001 [1] Pythagoras.X20 factor=10 parm= [-3,1,0]
000001 [1] Pythagoras.X20 factor=10 parm= [3,-1,0]
000001 [1] Pythagoras.X20 factor=10 parm= [-3,-1,0]
000001 [1] Pythagoras.X20 factor=13 parm= [3,2,0]
000001 [1] Pythagoras.X20 factor=13 parm= [-3,2,0]
000001 [1] Pythagoras.X20 factor=13 parm= [3,-2,0]
000001 [1] Pythagoras.X20 factor=13 parm= [-3,-2,0]
000001 [1] Pythagoras.X20 factor=9 parm= [0,3,0]
000001 [1] Pythagoras.X20 factor=9 parm= [0,-3,0]
000001 [1] Pythagoras.X20 factor=10 parm= [1,3,0]
000001 [1] Pythagoras.X20 factor=10 parm= [-1,3,0]
000001 [1] Pythagoras.X20 factor=10 parm= [1,-3,0]
000001 [1] Pythagoras.X20 factor=10 parm= [-1,-3,0]
000001 [1] Pythagoras.X20 factor=13 parm= [2,3,0]
000001 [1] Pythagoras.X20 factor=13 parm= [-2,3,0]
000001 [1] Pythagoras.X20 factor=13 parm= [2,-3,0]
000001 [1] Pythagoras.X20 factor=13 parm= [-2,-3,0]
000001 [1] Pythagoras.X20 factor=18 parm= [3,3,0]
000001 [1] Pythagoras.X20 factor=18 parm= [-3,3,0]
000001 [1] Pythagoras.X20 factor=18 parm= [3,-3,0]
000001 [1] Pythagoras.X20 factor=18 parm= [-3,-3,0]
000001 [1] Pythagoras.X20 factor=8 parm= [3,0,1]
000001 [1] Pythagoras.X20 factor=8 parm= [-3,0,1]
000001 [1] Pythagoras.X20 factor=10 parm= [3,0,-1]
000001 [1] Pythagoras.X20 factor=10 parm= [-3,0,-1]
000001 [1] Pythagoras.X20 factor=9 parm= [3,1,1]
000001 [1] Pythagoras.X20 factor=9 parm= [-3,1,1]
000001 [1] Pythagoras.X20 factor=9 parm= [3,-1,1]
000001 [1] Pythagoras.X20 factor=9 parm= [-3,-1,1]
000001 [1] Pythagoras.X20 factor=11 parm= [3,1,-1]
000001 [1] Pythagoras.X20 factor=11 parm= [-3,1,-1]
000001 [1] Pythagoras.X20 factor=11 parm= [3,-1,-1]
000001 [1] Pythagoras.X20 factor=11 parm= [-3,-1,-1]
000001 [1] Pythagoras.X20 factor=12 parm= [3,2,1]
000001 [1] Pythagoras.X20 factor=12 parm= [-3,2,1]
000001 [1] Pythagoras.X20 factor=12 parm= [3,-2,1]
000001 [1] Pythagoras.X20 factor=12 parm= [-3,-2,1]
000001 [1] Pythagoras.X20 factor=14 parm= [3,2,-1]
000001 [1] Pythagoras.X20 factor=14 parm= [-3,2,-1]
000001 [1] Pythagoras.X20 factor=14 parm= [3,-2,-1]
000001 [1] Pythagoras.X20 factor=14 parm= [-3,-2,-1]
000001 [1] Pythagoras.X20 factor=8 parm= [0,3,1]
000001 [1] Pythagoras.X20 factor=8 parm= [0,-3,1]
000001 [1] Pythagoras.X20 factor=10 parm= [0,3,-1]
000001 [1] Pythagoras.X20 factor=10 parm= [0,-3,-1]
000001 [1] Pythagoras.X20 factor=9 parm= [1,3,1]
000001 [1] Pythagoras.X20 factor=9 parm= [-1,3,1]
000001 [1] Pythagoras.X20 factor=9 parm= [1,-3,1]
000001 [1] Pythagoras.X20 factor=9 parm= [-1,-3,1]
000001 [1] Pythagoras.X20 factor=11 parm= [1,3,-1]
000001 [1] Pythagoras.X20 factor=11 parm= [-1,3,-1]
000001 [1] Pythagoras.X20 factor=11 parm= [1,-3,-1]
000001 [1] Pythagoras.X20 factor=11 parm= [-1,-3,-1]
000001 [1] Pythagoras.X20 factor=12 parm= [2,3,1]
000001 [1] Pythagoras.X20 factor=12 parm= [-2,3,1]
000001 [1] Pythagoras.X20 factor=12 parm= [2,-3,1]
000001 [1] Pythagoras.X20 factor=12 parm= [-2,-3,1]
000001 [1] Pythagoras.X20 factor=14 parm= [2,3,-1]
000001 [1] Pythagoras.X20 factor=14 parm= [-2,3,-1]
000001 [1] Pythagoras.X20 factor=14 parm= [2,-3,-1]
000001 [1] Pythagoras.X20 factor=14 parm= [-2,-3,-1]
000001 [1] Pythagoras.X20 factor=17 parm= [3,3,1]
000001 [1] Pythagoras.X20 factor=17 parm= [-3,3,1]
000001 [1] Pythagoras.X20 factor=17 parm= [3,-3,1]
000001 [1] Pythagoras.X20 factor=17 parm= [-3,-3,1]
000001 [1] Pythagoras.X20 factor=19 parm= [3,3,-1]
000001 [1] Pythagoras.X20 factor=19 parm= [-3,3,-1]
000001 [1] Pythagoras.X20 factor=19 parm= [3,-3,-1]
000001 [1] Pythagoras.X20 factor=19 parm= [-3,-3,-1]
000001 [1] Pythagoras.X20 factor=7 parm= [3,0,2]
000001 [1] Pythagoras.X20 factor=7 parm= [-3,0,2]
000001 [1] Pythagoras.X20 factor=11 parm= [3,0,-2]
000001 [1] Pythagoras.X20 factor=11 parm= [-3,0,-2]
000001 [1] Pythagoras.X20 factor=8 parm= [3,1,2]
000001 [1] Pythagoras.X20 factor=8 parm= [-3,1,2]
000001 [1] Pythagoras.X20 factor=8 parm= [3,-1,2]
000001 [1] Pythagoras.X20 factor=8 parm= [-3,-1,2]
000001 [1] Pythagoras.X20 factor=12 parm= [3,1,-2]
000001 [1] Pythagoras.X20 factor=12 parm= [-3,1,-2]
000001 [1] Pythagoras.X20 factor=12 parm= [3,-1,-2]
000001 [1] Pythagoras.X20 factor=12 parm= [-3,-1,-2]
000001 [1] Pythagoras.X20 factor=11 parm= [3,2,2]
000001 [1] Pythagoras.X20 factor=11 parm= [-3,2,2]
000001 [1] Pythagoras.X20 factor=11 parm= [3,-2,2]
000001 [1] Pythagoras.X20 factor=11 parm= [-3,-2,2]
000001 [1] Pythagoras.X20 factor=15 parm= [3,2,-2]
000001 [1] Pythagoras.X20 factor=15 parm= [-3,2,-2]
000001 [1] Pythagoras.X20 factor=15 parm= [3,-2,-2]
000001 [1] Pythagoras.X20 factor=15 parm= [-3,-2,-2]
000001 [1] Pythagoras.X20 factor=7 parm= [0,3,2]
000001 [1] Pythagoras.X20 factor=7 parm= [0,-3,2]
000001 [1] Pythagoras.X20 factor=11 parm= [0,3,-2]
000001 [1] Pythagoras.X20 factor=11 parm= [0,-3,-2]
000001 [1] Pythagoras.X20 factor=8 parm= [1,3,2]
000001 [1] Pythagoras.X20 factor=8 parm= [-1,3,2]
000001 [1] Pythagoras.X20 factor=8 parm= [1,-3,2]
000001 [1] Pythagoras.X20 factor=8 parm= [-1,-3,2]
000001 [1] Pythagoras.X20 factor=12 parm= [1,3,-2]
000001 [1] Pythagoras.X20 factor=12 parm= [-1,3,-2]
000001 [1] Pythagoras.X20 factor=12 parm= [1,-3,-2]
000001 [1] Pythagoras.X20 factor=12 parm= [-1,-3,-2]
000001 [1] Pythagoras.X20 factor=11 parm= [2,3,2]
000001 [1] Pythagoras.X20 factor=11 parm= [-2,3,2]
000001 [1] Pythagoras.X20 factor=11 parm= [2,-3,2]
000001 [1] Pythagoras.X20 factor=11 parm= [-2,-3,2]
000001 [1] Pythagoras.X20 factor=15 parm= [2,3,-2]
000001 [1] Pythagoras.X20 factor=15 parm= [-2,3,-2]
000001 [1] Pythagoras.X20 factor=15 parm= [2,-3,-2]
000001 [1] Pythagoras.X20 factor=15 parm= [-2,-3,-2]
000001 [1] Pythagoras.X20 factor=16 parm= [3,3,2]
000001 [1] Pythagoras.X20 factor=16 parm= [-3,3,2]
000001 [1] Pythagoras.X20 factor=16 parm= [3,-3,2]
000001 [1] Pythagoras.X20 factor=16 parm= [-3,-3,2]
000001 [1] Pythagoras.X20 factor=20 parm= [3,3,-2]
000001 [1] Pythagoras.X20 factor=20 parm= [-3,3,-2]
000001 [1] Pythagoras.X20 factor=20 parm= [3,-3,-2]
000001 [1] Pythagoras.X20 factor=20 parm= [-3,-3,-2]
000001 [1] Pythagoras.X20 factor=3 parm= [0,0,3]
000001 [1] Pythagoras.X20 factor=3 parm= [0,0,-3]
000001 [1] Pythagoras.X20 factor=2 parm= [1,0,3]
000001 [1] Pythagoras.X20 factor=2 parm= [-1,0,3]
000001 [1] Pythagoras.X20 factor=4 parm= [1,0,-3]
000001 [1] Pythagoras.X20 factor=4 parm= [-1,0,-3]
000001 [1] Pythagoras.X20 factor=1 parm= [2,0,3]
000001 [1] Pythagoras.X20 factor=1 parm= [-2,0,3]
000001 [1] Pythagoras.X20 factor=7 parm= [2,0,-3]
000001 [1] Pythagoras.X20 factor=7 parm= [-2,0,-3]
000001 [1] Pythagoras.X20 factor=6 parm= [3,0,3]
000001 [1] Pythagoras.X20 factor=6 parm= [-3,0,3]
000001 [1] Pythagoras.X20 factor=12 parm= [3,0,-3]
000001 [1] Pythagoras.X20 factor=12 parm= [-3,0,-3]
000001 [1] Pythagoras.X20 factor=2 parm= [0,1,3]
000001 [1] Pythagoras.X20 factor=2 parm= [0,-1,3]
000001 [1] Pythagoras.X20 factor=4 parm= [0,1,-3]
000001 [1] Pythagoras.X20 factor=4 parm= [0,-1,-3]
000001 [1] Pythagoras.X20 factor=1 parm= [1,1,3]
000001 [1] Pythagoras.X20 factor=1 parm= [-1,1,3]
000001 [1] Pythagoras.X20 factor=1 parm= [1,-1,3]
000001 [1] Pythagoras.X20 factor=1 parm= [-1,-1,3]
000001 [1] Pythagoras.X20 factor=5 parm= [1,1,-3]
000001 [1] Pythagoras.X20 factor=5 parm= [-1,1,-3]
000001 [1] Pythagoras.X20 factor=5 parm= [1,-1,-3]
000001 [1] Pythagoras.X20 factor=5 parm= [-1,-1,-3]
000001 [1] Pythagoras.X20 factor=2 parm= [2,1,3]
000001 [1] Pythagoras.X20 factor=2 parm= [-2,1,3]
000001 [1] Pythagoras.X20 factor=2 parm= [2,-1,3]
000001 [1] Pythagoras.X20 factor=2 parm= [-2,-1,3]
000001 [1] Pythagoras.X20 factor=8 parm= [2,1,-3]
000001 [1] Pythagoras.X20 factor=8 parm= [-2,1,-3]
000001 [1] Pythagoras.X20 factor=8 parm= [2,-1,-3]
000001 [1] Pythagoras.X20 factor=8 parm= [-2,-1,-3]
000001 [1] Pythagoras.X20 factor=7 parm= [3,1,3]
000001 [1] Pythagoras.X20 factor=7 parm= [-3,1,3]
000001 [1] Pythagoras.X20 factor=7 parm= [3,-1,3]
000001 [1] Pythagoras.X20 factor=7 parm= [-3,-1,3]
000001 [1] Pythagoras.X20 factor=13 parm= [3,1,-3]
000001 [1] Pythagoras.X20 factor=13 parm= [-3,1,-3]
000001 [1] Pythagoras.X20 factor=13 parm= [3,-1,-3]
000001 [1] Pythagoras.X20 factor=13 parm= [-3,-1,-3]
000001 [1] Pythagoras.X20 factor=1 parm= [0,2,3]
000001 [1] Pythagoras.X20 factor=1 parm= [0,-2,3]
000001 [1] Pythagoras.X20 factor=7 parm= [0,2,-3]
000001 [1] Pythagoras.X20 factor=7 parm= [0,-2,-3]
000001 [1] Pythagoras.X20 factor=2 parm= [1,2,3]
000001 [1] Pythagoras.X20 factor=2 parm= [-1,2,3]
000001 [1] Pythagoras.X20 factor=2 parm= [1,-2,3]
000001 [1] Pythagoras.X20 factor=2 parm= [-1,-2,3]
000001 [1] Pythagoras.X20 factor=8 parm= [1,2,-3]
000001 [1] Pythagoras.X20 factor=8 parm= [-1,2,-3]
000001 [1] Pythagoras.X20 factor=8 parm= [1,-2,-3]
000001 [1] Pythagoras.X20 factor=8 parm= [-1,-2,-3]
000001 [1] Pythagoras.X20 factor=5 parm= [2,2,3]
000001 [1] Pythagoras.X20 factor=5 parm= [-2,2,3]
000001 [1] Pythagoras.X20 factor=5 parm= [2,-2,3]
000001 [1] Pythagoras.X20 factor=5 parm= [-2,-2,3]
000001 [1] Pythagoras.X20 factor=11 parm= [2,2,-3]
000001 [1] Pythagoras.X20 factor=11 parm= [-2,2,-3]
000001 [1] Pythagoras.X20 factor=11 parm= [2,-2,-3]
000001 [1] Pythagoras.X20 factor=11 parm= [-2,-2,-3]
000001 [1] Pythagoras.X20 factor=10 parm= [3,2,3]
000001 [1] Pythagoras.X20 factor=10 parm= [-3,2,3]
000001 [1] Pythagoras.X20 factor=10 parm= [3,-2,3]
000001 [1] Pythagoras.X20 factor=10 parm= [-3,-2,3]
000001 [1] Pythagoras.X20 factor=16 parm= [3,2,-3]
000001 [1] Pythagoras.X20 factor=16 parm= [-3,2,-3]
000001 [1] Pythagoras.X20 factor=16 parm= [3,-2,-3]
000001 [1] Pythagoras.X20 factor=16 parm= [-3,-2,-3]
000001 [1] Pythagoras.X20 factor=6 parm= [0,3,3]
000001 [1] Pythagoras.X20 factor=6 parm= [0,-3,3]
000001 [1] Pythagoras.X20 factor=12 parm= [0,3,-3]
000001 [1] Pythagoras.X20 factor=12 parm= [0,-3,-3]
000001 [1] Pythagoras.X20 factor=7 parm= [1,3,3]
000001 [1] Pythagoras.X20 factor=7 parm= [-1,3,3]
000001 [1] Pythagoras.X20 factor=7 parm= [1,-3,3]
000001 [1] Pythagoras.X20 factor=7 parm= [-1,-3,3]
000001 [1] Pythagoras.X20 factor=13 parm= [1,3,-3]
000001 [1] Pythagoras.X20 factor=13 parm= [-1,3,-3]
000001 [1] Pythagoras.X20 factor=13 parm= [1,-3,-3]
000001 [1] Pythagoras.X20 factor=13 parm= [-1,-3,-3]
000001 [1] Pythagoras.X20 factor=10 parm= [2,3,3]
000001 [1] Pythagoras.X20 factor=10 parm= [-2,3,3]
000001 [1] Pythagoras.X20 factor=10 parm= [2,-3,3]
000001 [1] Pythagoras.X20 factor=10 parm= [-2,-3,3]
000001 [1] Pythagoras.X20 factor=16 parm= [2,3,-3]
000001 [1] Pythagoras.X20 factor=16 parm= [-2,3,-3]
000001 [1] Pythagoras.X20 factor=16 parm= [2,-3,-3]
000001 [1] Pythagoras.X20 factor=16 parm= [-2,-3,-3]
000001 [1] Pythagoras.X20 factor=15 parm= [3,3,3]
000001 [1] Pythagoras.X20 factor=15 parm= [-3,3,3]
000001 [1] Pythagoras.X20 factor=15 parm= [3,-3,3]
000001 [1] Pythagoras.X20 factor=15 parm= [-3,-3,3]
000001 [1] Pythagoras.X20 factor=21 parm= [3,3,-3]
000001 [1] Pythagoras.X20 factor=21 parm= [-3,3,-3]
000001 [1] Pythagoras.X20 factor=21 parm= [3,-3,-3]
000001 [1] Pythagoras.X20 factor=21 parm= [-3,-3,-3]
|
054681c3a524724a10a5e1fb5d0a1dd7d57dfd47 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2120/CH9/EX9.12/ex9_12.sce | 9d7bd5c14b8bf94535c03078452d4ea18e18db26 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 338 | sce | ex9_12.sce | // Exa 9.12
clc;
clear;
close;
// Given data
m = 0.5;// in kg
M = 6.6;// in kg
x1 = M / (M+m);
h_dry = 2683;//in kJ/kg
C_p = 2.1;
h_sen = 814.5;//in kJ/kg
L = 1973;// in kJ/kg
t_sup = 120;// in °C
t_sat = 104.8;// in °C
x2 =(h_dry+C_p*(t_sup - t_sat)-h_sen)/ L;
x = x2 * x1;
disp(x,"the dryness fraction of steam is");
|
f96406f782ff15e3cf1bd16e0fd20a0547e946ff | 449d555969bfd7befe906877abab098c6e63a0e8 | /3281/CH9/EX9.13/ex9_13.sce | 9d288f2df753981a556f8c38eb6799e34de3ffab | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 226 | sce | ex9_13.sce | //Page Number: 487
//Example 9.13
clc;
//Given
e=1.6D-19;
n1=1D+16; //m-3
mu1=8000D-4; //m2/Vs
nu=1D+14; //m-3
muu=180D-4; //m2/Vs
///Conductivity
C=e*((n1*mu1)+(nu*muu));
disp('m mho',C*1000,'Conductivity:');
|
d3ca5292e40bc5962fb9a514eeacbc44cbec03c7 | 95beaf56de829d390a567f241221c582c4b682ed | /projet/KSVD_StOMP.sce | 3f98a642f604381d11c468150b26ed3719a82284 | [] | no_license | the-mousaillon/compressive-sensing | 85d5d5ce814ad8ec20271a3b932144e35e640041 | bfa3acf166be6a8141d1eb2064523e7de8f19db7 | refs/heads/master | 2020-04-17T15:02:05.840745 | 2019-03-20T12:55:21 | 2019-03-20T12:55:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,313 | sce | KSVD_StOMP.sce |
clear
// chargement des données
data = csvRead("/Users/nbreizh/Documents/compressive sensing/tp/data.csv")
[N,M] = size(data)
// normalization des données
for i=1:M
data(:,i) = data(:,i)/norm(data(:,i))
end
function y = majIndices(p, alpha)
y = []
for i=1:length(p)
if alpha(p(i)) <> 0 then
y = [y, p(i)]
end
end
endfunction
function cj=contribution(R,dj)
cj=abs(dj'*R)/norm(dj)
endfunction
function y=contriblist(R,D)
[N,M]=size(D)
CJ=[]
for i=1:M
CJ=[CJ,contribution(R,D(:,i))]
end
y= CJ
endfunction
function y= selection_atomes(dic, R, t)
[M,N] = size(dic)
S = t*norm(R)/sqrt(N)
CL = contriblist(R,dic)
y = find(CL>S)
endfunction
function y = stOMP(dic, X, t, K, epsilon)
[M,N] = size(dic)
alpha = zeros(N,1)
R=X
i=1
// on stockera les indices des atomes choisis dans p
p = []
while (i<=K) && (norm(dic*alpha-X)>epsilon)
lambda = selection_atomes(dic, R, t)
p=union(p,lambda)
phi = dic(:, p)
zmK = phi'*pinv(phi*phi')*X
alpha(p) = zmK
R=X-dic*alpha
p = majIndices(p, alpha)
i = i+1
end
y = alpha
endfunction
// t est le critère de seuillage à passer à l'stomp
function [D,Alpha]=KSVD(X,K,L,t,EPS)
[N,l]=size(X);
MAX_ITR=round(K/10);
D=X(:,1:K);
s=sqrt(diag(D'*D));
for i=1:K
D(:,i)=D(:,i)/s(i);
end
Alpha=zeros(K,l);
for j=1:L
for i_vect=1:l
Alpha(:,i_vect)=stOMP(D, X(:,i_vect),t, MAX_ITR, EPS);
end
for i_col=1:K
idx_k=find(Alpha(i_col,:)<>0);
if length(idx_k)>0 then l
E_k=X-D*Alpha+D(:,i_col)*Alpha(i_col,:);
Omega=zeros(l,length(idx_k));
for inz=1:length(idx_k)
Omega(idx_k(inz),inz)=1;
end
E_kR=E_k*Omega;
[U,delta,V]=svd(E_kR);
D(:,i_col)=U(:,1);
Alpha(i_col,idx_k)=delta(1,1)*V(:,1)';
else
g=grand(1,1,"uin",1,l);
D(:,i_col)=X(:,g)/norm(X(:,g));
end
end
end
endfunction
// Apprentissage à l'aide du stomp
N = 99
K = 100
L = 10
eps=1e-6;
[D,Alpha]=KSVD(data, K,L,2.5,eps);
|
d3b5681a81f0b97e9063f76e7c02bef827a6e1be | 364fc2bac23ae5482a18e5e9392ff63e68642dae | /TP3/exo2.sce | be9a19a74a828bf90e87d5d4a486792fab1e94b4 | [] | no_license | Raphael-De-Wang/2M310TP | 259e55e9dc931b0a0102ed7a5dbbb31e82b88295 | af21ffee07fadeb5b27c5f30d0deb1926972ccee | refs/heads/master | 2021-01-11T14:14:21.447623 | 2017-03-29T20:27:35 | 2017-03-29T20:27:35 | 81,227,258 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 354 | sce | exo2.sce | clear;
// Q1.1
function solu = courbe_parametree(A,X0)
if ~isequal( eye(2,2) & A, eye(2,2) & eye(2,2) ) then,
error("[ERROR] Matrix A have to be diagonal. Verifie A");
end
if ~isequal( size(X0), [2,1] ) then,
error("[ERROR] Verifie vector X0");
end
solu = expm(A) * X0;
endfunction
// Q1.2
A = [1,0;0,-1];
|
6f621a123fbf118e6817d1aa83d4c96a2c2d01d4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1286/CH8/EX8.6/8_6.sce | 03388d9be773edf02770ba53606daac1faaeaab9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 224 | sce | 8_6.sce | clc
//initialisation of variables
t0=273//k
d0=1.29//kg/m^3
p=0.75//m
t=273+17//k
p0=0.76//m
v=342.15//m/sec
//CALCULATIONS
d=t0*d0*p/(t*p0)
g=(v*v*d)/(p*13600*9.81)
//results
printf(' \n gamma value= % 1f ',g)
|
a7d76fde5955f9a551d5db1dd436c2deca74b556 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1332/CH15/EX15.22/15_22.sce | 720adda3929df6f8bea035c7cc111e7d212ec2dc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 15_22.sce | //Example 15.22
//Linear Multi Step Method
//Page no. 540
clc;clear;close;
deff('y=f(x,y)','y=x+y')
y(1)=1;y(2)=1;x(1)=0;h=0.1;
printf('n\tXn\t\tYn\t\tfn\n-----------------------------------------------\n 0\t%g\t\t%.3f\t\t%.3f\n',x(1),y(1),f(x(1),y(1)));
for i=2:11
x(i)=(i-1)*h;
y(i+1)=(-y(i)-y(i-1)+h*(f(x(i),y(i))+f(x(i-1),y(i-1))))/2;
printf(' %i\t%.3f\t\t%.3f\t\t%.3f\n',i-1,x(i),y(i),f(x(i),y(i)))
end |
f52625d18319720545dd447ef7b7a3c63da3952f | 1573c4954e822b3538692bce853eb35e55f1bb3b | /DSP Functions/allpasslp2bp/test_4.sce | fff1c0c3c98cdf5766feb073928dafd32a5d030e | [] | no_license | shreniknambiar/FOSSEE-DSP-Toolbox | 1f498499c1bb18b626b77ff037905e51eee9b601 | aec8e1cea8d49e75686743bb5b7d814d3ca38801 | refs/heads/master | 2020-12-10T03:28:37.484363 | 2017-06-27T17:47:15 | 2017-06-27T17:47:15 | 95,582,974 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 315 | sce | test_4.sce | // Test # 4 : When either Input Argument #1 or #2 is of complex type
exec('./allpasslp2bp.sci',-1);
[n,d]=allpasslp2bp(0.4,[0.1,0.2*%i]);
//!--error 10000
//Wt must be real and numeric and must contain only 2 elements
//at line 43 of function allpasslp2bp called by :
//[n,d]=allpasslp2bp(0.4,[0.1,0.2*%i]);
|
eba4bef1b477935c841cd7939fa395ed183d2207 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3137/CH16/EX16.14/Ex16_14.sce | af3141f3198f97ce553a16a6b24b84ab29af4161 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 450 | sce | Ex16_14.sce | //Initilization of variables
W=20 //lb
g=32.2 //ft/s^2
vb=0.5 //rad/s
//Calculations
//Using equations of motion
//Solving the three equations simultaneously by matrix method
X=[0,1,-(W/g)*5.2;-1,0,-(W/g)*3;3,-3,-(1/12)*(W/g)*12^2]
Y=[-0.75*(W/g);(W/g)*1.3-W;0]
C=inv(X)*Y
A=C(1) //lb
B=C(2) //lb
alpha=C(3) //rad/s^2
//Result
clc
printf('The value of alpha is %f rad/s^2 and of A and B are %f lb \nand %f lb respectively',alpha,A,B)
|
1a9642729a9b6076c0ef335786bca39dda4ed920 | 449d555969bfd7befe906877abab098c6e63a0e8 | /536/CH13/EX13.1/Example_13_1.sce | 6cf730384eddbe2ee05a4637225f62dea309e14c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 743 | sce | Example_13_1.sce | clc;
clear;
printf("\n Example 13.1\n");
P=101.3e3;
T=297;
R=8314; //gas constant
RH=60; //Relative humidity
p_b1=12.2e3;//Vapor pressure at 297 K
p_b2=6e3; //Vapor pressure at 283 K
M_w=78; //molecular weight of benzene
M_a=28; //Mass of nitrogen
//From the definition of percentage relative humidity (RH)
P_w=(p_b1)*(RH/100);
//In the benzene -nitrogen mixture:
m_b=P_w*M_w/(R*T);//mass of benzene
m_n=(P-P_w)*M_a/(R*T);//mass of nitrogen
H=m_b/m_n; //Humidity at 297 K
//In order to recover 80 per cent of the benzene, the humidity must be reduced to 20 per cent of the initial value
H_o=H*.20;
//Thus in equation 13.2
P_r=p_b2+(p_b2/M_a*M_w)/H_o;
printf("\n The required pressure is = %.0f kN/m^2",P_r*1e-3); |
00a636ad79b448e8c383b0758df1118c98ba2b53 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1691/CH6/EX6.7/Exmp6_7.sce | fa8d27218e4a1c7ebacd912df7c63ebd21498e8f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 519 | sce | Exmp6_7.sce | //Example 6.7
clc
disp("The maximum power dissipation occurs when the value of V_m is")
disp("V_m = 2/pi * V_CC")
disp("Now P_ac = V_m*I_m / 2")
disp("So at the time of maximum power dissipation, it is")
disp("P_ac = 2/pi * V_CC*I_m/2 = V_CC*I_m / pi")
disp("Now P_DC = 2/pi * V_CC * I_m")
disp("Hence, %eta = P_ac/P_DC * 100 = (V_CC*I_m/pi)/(2*V_CC*I_m/pi)*100 = 50%")
disp("Thus efficiency is just 50% when the power dissipation is maximum. While the maximum effiency of the class B operation is 78.5%")
|
3f850b1f58b74b56d7f435ad5236b511f1d3ccf4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2078/CH4/EX4.20/Example4_20.sce | 83937d30b1458f67fb624917e2d758f7e4e119c7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 372 | sce | Example4_20.sce | //Exa 4.20
clc;
clear;
close;
//Given data :
f=50;//Hz
VL=110;//kV
r=1.05/2;//cm
d1=3.5;//m
d2=3.5;//m
d3=7;//m
epsilon_o=8.854*10^-12;//permitivity
CN=2*%pi*epsilon_o/log((d1*d2*d3)^(1/3)*100/r);//F
disp(CN,"Capacitance per phase per meter line(F)");
Vph=VL*1000/sqrt(3);//V
Ic=2*%pi*f*CN*Vph;//A/m
disp(Ic/10^-3,"Charging current per phase(A/km) : ");
|
b0201c4d74ca4918d08d0ed57044440528ca9bce | 299ec76be485b8d1574b9216bbe8ac6763b2ade3 | /AI_Lab_Ex3/pima-indians-diabetes.sce | 796f187285eac801552278005d233f8f64cdda2e | [
"MIT"
] | permissive | parth2608/Artificial-Intelligence-Basics | 65d42ff4e495c11a2ba536e730714570a58b56c7 | b3a0378c7f5b9dbad91df9a6c29b5f30b865e088 | refs/heads/master | 2022-11-21T01:41:07.713381 | 2020-07-15T07:00:34 | 2020-07-15T07:00:34 | 279,790,254 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,994 | sce | pima-indians-diabetes.sce | clear;
ds_pima = csvRead("pima-indians-diabetes.csv",[],[], "double");
rand('seed',0);
/*
rand_arr = floor((size(ds_pima)(1)) * rand(1,230));
rand_arr = unique(rand_arr);
flag = 0;
ds_pima_train = zeros(size(ds_pima)(1) - length(rand_arr), size(ds_pima)(2));
ds_pima_test = zeros(length(rand_arr) - 1, size(ds_pima)(2));
train_index = 1;
test_index = 1;
for i=1:(size(ds_pima)(1))
for j=1:length(rand_arr)
if i == rand_arr(j) then
flag = 1;
end
end
if flag == 1 then
ds_pima_test(test_index,:) = ds_pima(i,:);
test_index = test_index + 1;
flag = 0;
else
ds_pima_train(train_index,:) = ds_pima(i,:);
train_index = train_index + 1;
end
end
*/
[x, y] = ann_pat_shuffle(ds_pima(:,1:8)', ds_pima(:,9)');
ds_pima = [x' y']
for i=1:(size(ds_pima)(2) - 1)
col_i = double(ds_pima(:,i) == 0);
for j=1:(size(col_i)(1))
if(col_i(j) == 1)
then ds_pima(j,i) = %nan;
end
end
end
for i=1:(size(ds_pima)(2) - 1)
col_i = double(isnan(ds_pima(:,i)));
for j=1:(size(col_i)(1))
if(col_i(j) == 1)
then ds_pima(j,i) = nanmedian(ds_pima(:,i));
end
end
end
ds_pima_train = ds_pima(1:537,:);
ds_pima_test = ds_pima(538:768,:);
ds_pima_train_input = ds_pima_train(:,1:8);
ds_pima_train_output = ds_pima_train(:,9);
ds_pima_test_input = ds_pima_test(:,1:8);
ds_pima_test_output = ds_pima_test(:,9);
N = [8 10 1];
lp = [0.06 0];
W = ann_FF_init(N);
T = 36;
Q = ann_FF_Std_online(ds_pima_train_input', ds_pima_train_output', N, W, lp, T);
y_out = ann_FF_run(ds_pima_test_input', N, Q);
y_out_T = y_out';
y_out_T_rounded = round(10*y_out_T);
y_out_T_rounded_out = y_out_T_rounded > min(y_out_T_rounded);
y_out_T_rounded_out_bin = double(y_out_T_rounded_out);
mprintf("Accuracy of this Network = %f%% \n T = %d, lp(1) = %f \n",(100 * ( 1 - (ann_sum_of_sqr(y_out_T_rounded_out_bin,ds_pima_test_output)/size(y_out_T_rounded_out_bin)(1)))), T, lp(1));
|
fb458f81c0bd98524b9b1c75c51ef970d2598fcf | d963a50c09b7380dd7b1b97cd9997e9bd17ea8f3 | /r38/packages/specfn/fps.tst | 76b5365d8ab97e908499ee074ea17e44e9fbe1e3 | [
"BSD-3-Clause"
] | permissive | reduce-algebra/reduce-historical | 8220e211b116e0e01ff1a38f51917cac9db6069f | e014152729c4d62bb1ce4f5c311a027042a5495a | refs/heads/master | 2023-04-10T22:54:00.796596 | 2021-04-16T08:52:19 | 2021-04-16T08:52:19 | 343,245,204 | 7 | 1 | NOASSERTION | 2021-04-16T08:53:31 | 2021-03-01T00:15:22 | TeX | UTF-8 | Scilab | false | false | 2,331 | tst | fps.tst | % Examples for the algorithmic calculation of formal
% Puiseux, Laurent and power series,
%
% Wolfram Koepf, Freie Universitaet Berlin, Germany
% (taken from the original paper and adapted to REDUCE
% form by Winfried Neun, ZIB Berlin)
% Formal Laurent series
fps(E^x,x);
fps(E^x/(x^3),x);
fps(x * e^(x^4),x);
fps(sin (x + y),x);
simplede (sin x,x); %find a DE for sin
simplede (sin (x)^2,x,w); % DE in w and x
fps(asin x,x);
fps((asin x)^2,x);
fps(e^(asin x),x);
fps(e^(asinh x),x);
fps((x + sqrt(1+x^2))^A,x);
fps(e^(x^2)*erf x,x);
fps(e^x - 2 e^(-x/2) * cos(sqrt(3) * x/2 -pi/3),x);
% fps(int(e^(-a^2*t^2) * cos(2*x*t),t,0,infinity),x) % not yet
% fps(4/x * int(e^(t^2)*erf(t),t,0,sqrt(x)/2),x);
fps(sin x * e^x,x);
fps(cos x * e^(2*x),x);
fps(1/(x-x^3),x);
fps(1/(x^2 + 3 x + 2),x);
fps(x/(1-x-x^2),x);
% Logarithmic singularities and Puisieux series
fps(sin sqrt x,x);
fps(((1 + sqrt x)/x)^(1/3),x);
fps(asech x,x);
% some more (Wolfram Koepf, priv. comm.)
fps((1+x)^alpha,x);
fps((1+sqrt(1+x))^beta,x);
fps(sin(x)^2+cos(x)^2,x);
fps(sin(x)^2*cos(x)^2,x);
fps(sin(x)*cos(x^2),x);
fps((x-1)^(-1),x);
fps(atan(x+y),x);
fps((1-x^5)^6,x);
fps(asec x,x);
fps(besseli(0,x),x);
fps(besseli(1,x),x);
fps(exp(x^(1/3)),x);
fps(log(1-x),x);
fps(exp x*sinh x,x);
fps(atan x,x);
fps(sin x+sinh x,x);
fps(sin x*sinh x,x);
fps(int(erf(x),x),x);
fps(sqrt(2-x),x);
fps(sqrt(1+x)+sqrt(1-x),x);
fps(exp(a+b*x)*exp(c+d*x),x);
fps(1/cos(asin x),x);
fps(sqrt(1-x^2)+x*asin x,x);
fps(sqrt(1-sqrt(x)),x);
fps(cos(n*acos x),x);
fps(cos x+I*sin x,x);
fps(cos(3*asinh x),x);
fps(cos(n*asinh x),x);
fps(sin(n*log(x+sqrt(1+x^2))),x);
fps(sqrt(1+x^2)*asinh x-x,x);
fps(int(erf(x)/x,x),x);
fps(asin(x)^2/x^4,x);
% we had problems here:
fps(cos(asin x),x);
fps(sinh(log x),x);
fps(atan(cot x),x);
% we can cure this one by defining the limit:
let limit(atan(cot ~x),x,0) => pi/2;
fps(atan(cot x),x);
fps(exp(nnn*x)*cos(mmm*x),x);
fps(sqrt(2-x^2),x);
fps(ci x,x);
fps(log(1-2*x*y+x^2),x);
FPS(sin x,x,pi);
% This one takes ages :
%fps(acos(cos(x)),x);
fps_search_depth := 7; % does not find aa DE with the default
fps(sin(x^(1/3)),x);
end;
|
ccc91dd085c74ee1cb99e15197a72d5d8d7933d4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1523/CH4/EX4.14/ex4_14.sce | 99ec7040d7f56de3555d529d139164fc34997d42 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | ex4_14.sce | //AC Circuits: example 4.14 :(pg 4.11)
v1=0;
v2=40;
v3=60;
v4=80;
v5=100;
t=8;
Vavg=((v1+v2+v3+v4+v5+v4+v3+v2)/t);
Vrms=sqrt((v1^2+v2^2+v3^2+v4^2+v5^2+v4^2+v3^2+v2^2)/t);
disp("Vavg=((0+40+60+80+100+80+60+40)/8)");
printf("\nVavg=%.1f V",Vavg);
disp("Vrms=sqrt((0+(40)^2+(60)^2+(80)^2+(100)^2+(80)^2+(60)^2+(40)^2)/8)");
printf("\nVrms=%.2f V",Vrms); |
c8c89d60fec924f5ebe06ec63cf061d703e4f8f4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2081/CH12/EX12.15/Ex12_15.sce | 499e628c87479ac777fbc9b4842607fb38e1c46a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 426 | sce | Ex12_15.sce | d1=1*10^3//dist.direct sig. from A
d11=1.5*10^3//dist.A and building
d12=0.5*10^3//dist.mobile and building
d2=d11+d12//dist.reflected sig.
d3=3*10^3//dist.direct sig. from B
c=3*10^8
D1=(d3-d1)
t1=D1/c//delay direct signal from A
D2=(d3-d2)
t2=D2/c//delay reflected signal from A
printf('time delay for direct signal from A= %.2f microsecs',t1*10^6)
printf('\ntime delay for reflected signal from A= %.2f microsecs',t2*10^6)
|
ebd1775addd46aa1429cb79d5254ed5e8e5c15c2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3754/CH31/EX31.11/31_11.sce | 0883d808fb9ef030f784db2e76b1af89f42443b6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 407 | sce | 31_11.sce | clear//
//Variables
fo = 450.0 * 10**3 //Frequency(in Hertz)
//Let us assume
C1=10.0*10**-6;C2=10.0*10**-6;C=10.0*10**-6;
C21 = 2 * C2 //Capacitance (in Farad)
//Calculation
fo1 = fo * (3.0/4.0)**0.5 //New Frequency (in Hertz)
//Result
printf("\n The oscillation frequency if C2 is doubled is %0.1f kHz.",fo1 * 10**-3)
|
085b9256c6e1ebd5b76b6419e71b285769bb9fb6 | ef7da921e1289d3deaaf9727db2b6f025656e8d9 | /DTFT.sce | 7a92f4889229424844958691e16ee72c0fa2d3eb | [] | no_license | PrayagS/SciLab_Exercises | ea88438207f2dc5d3f211c9abfe137a4bd43f68f | 0495ba76e693750980fefb386c28209a6fd6563e | refs/heads/master | 2020-09-08T01:52:22.914681 | 2019-11-16T05:39:29 | 2019-11-16T05:39:29 | 220,977,317 | 2 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 242 | sce | DTFT.sce | clear; clf; clc;
N = 256;
n = 0 : N-1;
a = 0.5;
x = a^n;
y1 = fft(x);
y = fftshift(y1);
r = real(y);
im = imag(y);
angle = atan(im./r)
yabs = abs(y);
w = 0 : 2*%pi/(N-1) : 2*%pi;
subplot(211);
plot(w, yabs);
subplot(212);
plot(w, angle'); |
e2bb79335b233ad728bc41a47c8830e74b6775bc | b9117a375dfd4994834bffe24f28414f4599c02e | /test/feature.tst | 454a8360ef98686c75a46fcee0bc41c7797a2ffb | [] | no_license | mdolgun/NLPParser | 2a7e1ab5f820c902ecb7ecd05a90a9caca7fb4bf | 54d8494a8799efb94ff0dfa21c8c46292dd9cb22 | refs/heads/master | 2021-07-16T08:32:55.973580 | 2020-10-17T20:28:51 | 2020-10-17T20:28:51 | 218,727,320 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,076 | tst | feature.tst | ###grammar
%auto_dict none
S -> NP(case=nom,numb,pers) VP NP(case=acc)
NP -> i [case=nom,numb=sing,pers=1]
NP -> he [case=nom,numb=sing,pers=3]
NP -> she [case=nom,numb=sing,pers=3]
NP -> it [case=nom,numb=sing,pers=3]
NP -> we [case=nom,numb=plur,pers=1]
NP -> you [case=nom,numb=plur,pers=2]
NP -> they [case=nom,numb=plur,pers=3]
NP -> me [case=acc,numb=sing,pers=1]
NP -> him [case=acc,numb=sing,pers=3]
NP -> her [case=acc,numb=sing,pers=3]
NP -> it [case=acc,numb=sing,pers=3]
NP -> us [case=acc,numb=plur,pers=1]
NP -> you [case=acc,numb=plur,pers=2]
NP -> them [case=acc,numb=plur,pers=3]
NP -> Det Noun [pers=3]
Det -> this [numb=sing]
Det -> these [numb=plur]
Det -> a [numb=sing]
Det -> two [numb=plur]
Det -> the
Det ->
Noun -> man [numb=sing]
Noun -> men [numb=plur]
VP -> am Ving [numb=sing,pers=1]
VP -> is Ving [numb=sing,pers=3]
VP -> are Ving [numb=plur]
VP -> was Ving [numb=sing]
VP -> were Ving [numb=plur]
VP -> Ved
VP -> V [numb=sing,pers=1]
VP -> Vs [numb=sing,pers=3]
VP -> V [numb=plur]
V -> watch
Vs -> watches
Ving -> watching
Ved -> watched
###input
i am watching her
###pformat_ext
S(
#1[numb=sing,pers=1]
NP(
#2[case=nom,numb=sing,pers=1]
i
)
VP(
#25[numb=sing,pers=1]
am
Ving(
#36
watching
)
)
NP(
#11[case=acc,numb=sing,pers=3]
her
)
)
###input
she is watching me
###pformat_ext
S(
#1[numb=sing,pers=3]
NP(
#4[case=nom,numb=sing,pers=3]
she
)
VP(
#26[numb=sing,pers=3]
is
Ving(
#36
watching
)
)
NP(
#9[case=acc,numb=sing,pers=1]
me
)
)
###input
these men are watching us
###pformat_ext
S(
#1[numb=plur,pers=3]
NP(
#16[numb=plur,pers=3]
Det(
#18[numb=plur]
these
)
Noun(
#24[numb=plur]
men
)
)
VP(
#27[numb=plur]
are
Ving(
#36
watching
)
)
NP(
#13[case=acc,numb=plur,pers=1]
us
)
)
###input
me am watching you
###pformat_ext
*UnifyError
###input
she is watching i
###pformat_ext
*UnifyError
###input
two man is watching it
###pformat_ext
*UnifyError
###input
a man watch us
###pformat_ext
*UnifyError
###input
they watch us
###pformat_ext
S(
#1[numb=plur,pers=3]
NP(
#8[case=nom,numb=plur,pers=3]
they
)
VP(
#33[numb=plur]
V(
#34
watch
)
)
NP(
#13[case=acc,numb=plur,pers=1]
us
)
)
###input
he watches the men
###pformat_ext
S(
#1[numb=sing,pers=3]
NP(
#3[case=nom,numb=sing,pers=3]
he
)
VP(
#32[numb=sing,pers=3]
Vs(
#35
watches
)
)
NP(
#16[numb=plur,pers=3]
Det(
#21
the
)
Noun(
#24[numb=plur]
men
)
)
)
###input
he watches a men
###pformat_ext
*UnifyError
|
f6795e827688a81f3330403344c4dc794f9ada29 | 449d555969bfd7befe906877abab098c6e63a0e8 | /635/CH6/EX6.9/Ch06Ex9.sci | 99ea9722c298b806afb039b8147be3275a11ad19 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,896 | sci | Ch06Ex9.sci | // Scilab Code Ex6.9 Activation energy and diffusion constant of a diffusion system obeying Arrhenius rate law: Page 207 (2010)
R = 1.987; // Molar gas constant, cal/mol/K
D_1100 = 8e-013; // Diffusivity of Ga in Si at 1100 degree celsius, cm square per sec
D_1300 = 1e-010; // Diffusivity of Ga in Si at 1300 degree celsius, cm square per sec
T1 = 1100+273; // First temperature at which diffusion of Ga into Si takes place, kelvin
T2 = 1300+273; // Second temperature at which diffusion of Ga into Si takes place, kelvin
// Arrehenius equation in log10 form is given by
// log10(D) = log10(D0)-Q/(2.303*R*T) --- (a)
// Thus log10(D_1100) = log10(D0)-Q/(2.303*R*T1) --- (i)
// log10(D_1300) = log10(D0)-Q/(2.303*R*T2) --- (ii),
// On subtracting (ii) from (i), we get
// log10(D_1100/D_1300) = -Q/(2.303*R)*(1/T2-1/T1), solving for Q
Q = (2.303*log10(D_1100/D_1300)*R)/(1/T2-1/T1); // Activation energy for diffusion of Ga in Si, cal/mol
// Putting Q in (ii) and solving for D0
D0 = exp(2.303*log10(D_1100)+Q/(R*T1))
// D0 = exp(2.303*log10(D_1300)+Q/(R*T2)); // Pre-exponential diffusion constant independent of temperature, cm square per sec
T = 1200+273; // Temperature at which diffusion of Ga into Si is to be calculated, kelvin
// Substituting D0, Q, R and T in (a) and solving for D, we have
D = exp(2.303*log10(D0)-Q/(R*T)); // Diffusivity of the system, cm square per sec
printf("\nThe activation energy for diffusion of Ga in Si = %3d kcal/mol", Q/1000);
printf("\nThe pre-exponential diffusion constant, D0 = %5d cm square per sec", D0);
printf("\nThe diffusivity of the system = %4.2e cm square per sec", D);
// Result
// The activation energy for diffusion of Ga in Si = 103 kcal/mol
// The pre-exponential diffusion constant, D0 = 24893 cm square per sec
// The diffusivity of the system = 1.05e-011 cm square per sec |
e81fcc9ec40eb4e58821cf0cf225f1c8dab78d35 | 449d555969bfd7befe906877abab098c6e63a0e8 | /542/CH1/EX1.2/Example_1_2.sce | efda889b01b30842b7fafe113af1c65a9a1a74a1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,286 | sce | Example_1_2.sce | clear;
clc;
printf("\n Example 1.2");
//from given differential eq we get these functions
//particle number distribution for the size range 0-10um
//n=0.5*d^2;
//const of integration is0 since at n=0,d=0
//particle number distribution for the size range 10-100um
//n=83-(0.33*(10^(5))*d^(-3))
//c2=83,since at d=10um,n=50
//number distribution plot for the powdered material of size range 0-100um
function[n]= number_distribution(d)
if(d<=10) then
n=0.5*d^2;
else
n=83-(0.33*(10^(5))*d^(-3));
end
funcprot(0)
endfunction
d=0;
while(d<=100)
n=number_distribution(d);
plot(d,n,"+-");
d=d+1;
end
xtitle("number_distribution_plot","diameter(um)","number distribution");
ps=[0 6.2 9.0 10.0 11.4 12.1 13.6 14.7 16.0 17.5 19.7 22.7 25.5 31.5 100];
function[n1]=difference(i)
//ps=[0 6.2 9.0 10.0 11.4 12.1 13.6 14.7 16.0 17.5 19.7 22.7 25.5 31.5 10];
//according to the given particle sizes particle sizes are in um
n1=number_distribution(ps(i+1))-number_distribution(ps(i));
funcprot(0);
endfunction
function[da]=average(i)
da= (ps(i+1)+ps(i))/2;
funcprot(0);
endfunction
tot_n1d12=0;
tot_n1d13=0;
i=1;
for i=1:14
tot_n1d12=tot_n1d12+difference(i)*(average(i))^2;
tot_n1d13=tot_n1d13+difference(i)*(average(i))^3;
end
printf("\n tot_n1d12 =%d \n tot_n1d13=%d",tot_n1d12,tot_n1d13);
function[s]=surface_area(j)
s=(difference(j)*(average(j))^2)/tot_n1d12;
funcprot(0);
endfunction
su=0;
j=0;
xset('window',1);
plot(0,0,"o-");
for j=1:14
su=su+surface_area(j);
plot(ps(j+1),su,"o-");
end
xtitle("surface area and mass distribution plot","diameter(um)","surface area or mass distribution");
//mass distribution plot
function[x]=mass_distribution(k)
x=(difference(k)*(average(k))^3)/tot_n1d13;
funcprot(0);
endfunction
ma=0;
k=0;
plot(0,0,"+-");
for k=1:14
ma=ma+mass_distribution(k);
plot(ps(k+1),ma,"+-");
end
//evaluating surface mean diameter
function[d]=surface_mean_diameter(l)
e=0;
for l=1:14
n=(mass_distribution(l)/average(l));
e=e+n;
end
d=1/e;
funcprot(0);
endfunction
printf("\nthe surface mean diameter is: %fum",surface_mean_diameter());
|
743762be1001ef6ead1cb2893b3d47b92d4b8ccb | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronic_Measurements_And_Instrumentation_R._K._Rajput_2096.zip/Electronic_Measurements_And_Instrumentation_R._K._Rajput_2096/CH1/EX1.23/ex_1_23.sce | 7dcf5f60ae6816e41f7565dcb4a1f7ab983b5efc | [] | 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 | 220 | sce | ex_1_23.sce | errcatch(-1,"stop");mode(2);//Example 1.23.// calculate the time constant
;
;
//given data :
Ed=3.9; // dynamic error
Si=0.2; // slope in celcius/seconds
T=Ed/Si;
disp(T,"time constant,T(seconds) = ")
exit();
|
c091e7575b344b49c1d109ad5cfe527b17f44d07 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1319/CH12/EX12.7/i_7.sce | c2b9785e68fb1ec7db203b9c7bff5561a341e7bf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 168 | sce | i_7.sce | // Power Rating Calculation
clc;
clear;
V=250;
I=15;
// Power Equation or Watt's Law P=V*I.
P=V*I;
disp('watts',P,'The power rating of the device =')
|
ea95ebfb55415f55b885099f58d163bdb65bbde1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /32/CH6/EX6.16/6_16.sce | 883cd69a0426bf1b6afe5ace3bfea6ef1f574968 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 948 | sce | 6_16.sce | //pathname=get_absolute_file_path('6.16.sce')
//filename=pathname+filesep()+'6.16-data.sci'
//exec(filename)
//Diameter of the vessel(in m):
D=0.2
//Depth(in m):
d=0.02
//Temperature(in °C):
T=150
//Force applied(in kN):
F=10
//Heat supplied(in kJ):
Q=600
//From steam tables:
hf=612.1
hfg=2128.7
vg=0.4435
h2=1582.8
//Pressure at which process is taking place(in kPa):
p=F/(%pi*D^2)*4+101.3
//Volume of water contained(in m^3):
V1=%pi*D^2*d/4
//Mass of water(in kg):
m=V1*1000
//Dryness fraction:
x=(Q-hf*m+4.18*T*m)/(hfg*m)
//Internal energy of water initially(in kJ):
U1=m*4.18*T-p*V1
//Final volume(in m^3):
V2=m*x*vg
//Internal energy at state 2(in kJ):
U2=m*h2-p*V2
//Change in internal energy(in kJ):
dU=U2-U1
//Work done(in kJ):
W=p*(V2-V1)
printf("\nRESULT\n")
printf("\nDryness fraction of the steam produced = %f",x)
printf("\nChange in internal energy = %f kJ",dU)
printf("\nWork done = %f kJ",W) |
062458dcd7ff9d1133badd32f40c81ec6a654c82 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2339/CH4/EX4.39.1/Ex4_39.sce | 6db9d44d360679512ae3379eb59040ff757cc9d3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 400 | sce | Ex4_39.sce | clc
clear
Ms=5; //in kg
P=5; //in bar
Tsup=250+273; //in K
Cps=2.1; //in kJ/kg K
Tf=30; //in C
Cpw=4.187; //in kJ/kg K
H1=Cpw*Tf;
//At 5 bar pressure
Tsat=151.9+273; //in K
Hg=2748.7; //in kJ/kg
H2=Hg+(Cps*(Tsup-Tsat));
Q=Ms*(H2-H1);
printf('Amount of heat required: %2.2f kJ',Q);
printf('\n');
|
529bb1a6ed5c3ded25e1122b9a4b5404bdbcfe19 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2381/CH7/EX7.1/ex_1.sce | 2951d7f42a1a53745447f88541d56615a0b8ad8c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 267 | sce | ex_1.sce | //Example 1 // ratio
clc;
clear;
close;
ri=9/16;//ratio of intensities
ra=sqrt(ri);//ratio of amplitude
a1=1;//assume
a2=ra*a1;//
rim=(a1+a2)^2/(a1-a2)^2;//
disp("ratio of maximum intensity and minimum intensity in fringe system is "+string(rim)+":"+string(a1)+"")
|
163c6c2583af7c338eb05078fda987dc91e2ac10 | d7232d0b1a2442e91e35d2358ae5ff781a611588 | /pre_amp_e_passa_alta/filtro PA.sce | 4395bc3179bca55fb6de7fc476115d1cac1f6ae6 | [] | no_license | gutovsk49/MyoLab | 2f178c0bced6866b45b8f1ddc8be13601811a918 | d75d6309e994af14e108f11d966cdea6c51471bc | refs/heads/master | 2020-11-25T21:32:20.851108 | 2019-12-18T14:22:11 | 2019-12-18T14:22:11 | 228,855,879 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 98 | sce | filtro PA.sce | f = 25;
w = 2*%pi*f;
G = 51;
R1 = 1000;
C = sqrt((-1)/((w^2)*(((sqrt(2) + 2*sqrt(2))/G)-(R1^2))))
|
2a15dca50b690d612d18985a4cebdb85d7d1f88d | 19ba35741abeefce1e69482bfe706700a7c4fe54 | /step.sci | 4208b74b833ac0157f4c432799a453d1b11f328e | [
"MIT"
] | permissive | swarlesbarkely/SciLab_Functions | 3c3be10d2025c06aa59bdc985d31239d59860d96 | f97d45ee7c2e574041a7b2845e6aad3bfbb76dad | refs/heads/master | 2021-01-17T11:28:57.829853 | 2017-06-06T01:20:01 | 2017-06-06T01:20:01 | 33,019,021 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 446 | sci | step.sci | //***********************************************
// Plots step response for linear system
// Args:
// A, B, C, D -- system matricies
// X0 -- initial conditions
// t -- time vector
//************************************************
function step (A, B, C, D, X0, t)
dt = t(2) - t(1);
X = X0;
Y = zeros (C);
for i = 1:length (t)
dX = A*X + B;
Y(:,i) = C*X + D;
X = X + dX * dt;
end
plot (t, Y)
endfunction
|
12fd196eaf3cdcbf5d9d9c14339c2abf1629320b | 0764595c2d11c42afddd3351da341f9e9c4db651 | /codigos_aula/dec2binario.sci | ff719428098948fb3a9ad100167daaac4423e173 | [] | no_license | ThiagosLima/metodos-numericos | e3933c43362c6f047714980841f7c64f1a345bb0 | df21508b72b94e64a424e6b50564e948019a9eab | refs/heads/main | 2022-12-30T10:06:57.560852 | 2020-10-05T00:41:52 | 2020-10-05T00:41:52 | 301,257,290 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 5,249 | sci | dec2binario.sci | function b=dec2binario(a,n)
p= 2^(n-1:-1:0);
r=int(a./p)
b = rem(r,2) //dec 'a' para o bin'b'
endfunction
function b=dec2binario1(a,n)
// Conversão de decimal INTEIRO E POSITIVO para binário
b=[]
if(a>(2^n)-1) then
printf("%d não pode ser reprentado com %d bits",a,n)
return
end
if(a<0) then
printf("Utilize inteiros positivos\n")
return
end
p= 2^(n-1:-1:0);
r=int(a./p)
b = rem(r,2) //conversão do decimal 'a' para o binário 'b'
s=""
for i=1:n
s=s+string(b(i))
end
printf("%f (B10) = %s (B2)\n",a,s)
a2=binario2dec1(b,n)
printf("%s (B2) = %f (B10)\n",s,a2)
endfunction
function b=dec2binario2(a,n)
// Conversão de decimal INTEIRO POSITIVO OU NEGATIVO para binário
// com 1 BIT PARA SINAL
b=[]
if( a<(-2^(n-1)-1) | a>(2^(n-1)-1) ) then
printf("%d não pode ser reprentado com %d bits",a,n)
return
end
p= 2^(n-2:-1:0);
r=int(abs(a)./p)
b = rem(r,2) //conversão do decimal 'a' para o binário 'b' com n-1 bits
if (a>=0) then
b=[0 b] // acrescentar o bit de sinal
else
b=[1 b] // acrescentar o bit de sinal
end
s=""
for i=1:n
s=s+string(b(i))
end
printf("%f (B10) = %s (B2)\n",a,s)
//a2= (-1)^b(1)* b(2:n)*p'; // conversão do binário 'b' para decimal 'a2'
a2=binario2dec2(b,n)
printf("%s (B2) = %f (B10)\n",s,a2)
endfunction
function b_c2=dec2binario3(a,n)
// Conversão de decimal INTEIRO POSITIVO OU NEGATIVO para binário
// com COMPLEMENTO 2 - Inverter bits e somar 1
b=[]
if( a<(-2^(n-1)) | a>(2^(n-1)-1) ) then
printf("%d não pode ser reprentado com %d bits",a,n)
return
end
p= 2^(n-1:-1:0);
r=int(abs(a)./p)
b = rem(r,2) //conversão do decimal 'a' para o binário 'b' com n bits
b_c2=b
if(a<0) then //complemento 2
b_c2=bitcmp(b,1) // inverter bits
b_c2=SomaBinaria(b_c2,[zeros(1:n-1) 1]) // somar 1
end
s=""
for i=1:n
s=s+string(b_c2(i))
end
printf("%f (B10) = %s (B2)\n",a,s)
a2=binario2dec3(b_c2) // conversão do binário b_ce para decimal a2
printf("%s (B2) = %f (B10)\n",s,a2)
endfunction
function b_c2=dec2binario3b(a,n)
// Conversão decimal INTEIRO POSITIVO OU NEGATIVO para binário
// com COMPLEMENTO 2 - Inverter bits e somar 1
if( a<(-2^(n-1)) | a>(2^(n-1)-1) ) then
printf("%d não pode ser reprentado com %d bits",a,n)
return
end
p= 2^(n-1:-1:0);
r=int(abs(a)./p)
b = rem(r,2) //conversão do decimal 'a' para o binário 'b' com n bits
b_c2=b
if(a<0) then //complemento 2
b_c2=bitcmp(b,1) // inverter bits
b_c2=SomaBinaria(b_c2,[zeros(1:n-1) 1]) // somar 1
end
s=""
for i=1:n
s=s+string(b_c2(i))
end
printf("%f (B10) = %s (B2)\n",a,s)
a2= b(1:n)*p'; // conversão do binário b para decimal a2
if (a<0) then a2= -a2; end
printf("%s (B2) = %f (B10)\n",s,a2)
endfunction
function b_c2=dec2binario3c(a,n)
b=[]
p= 2^(n-1:-1:0);
r=int(abs(a)./p)
b = rem(r,2) //conversão do decimal 'a' para o binário 'b' com n bits
b_c2=b
if(a<0) then //complemento 2
b_c2=bitcmp(b,1) // inverter bits
b_c2=SomaBinaria(b_c2,[zeros(1:n-1) 1]) // somar 1
end
endfunction
function b=dec2binario4(a,n,m)
// Conversão decimal REAL E POSITIVO para binário
// n bits para a parte inteira
// m bits para a parte fracionária
b=[]
if(a>(2^n)-1) then
printf("%d não pode ser reprentado com %d bits",a,n)
return
end
p= 2^(n-1:-1:-m);
r=int(a./p)
b = rem(r,2) //conversão do decimal 'a' para o binário 'b'
s=""
for i=1:n
s=s+string(b(i))
end
s=s+"."
for i=n+1:m+n
s=s+string(b(i))
end
printf("%f (B10) = %s (B2)\n",a,s)
a2=binario2dec4(b,n,m) // conversão do binário 'b' para decimal 'a2'
printf("%s (B2) = %f (B10)\n",s,a2)
endfunction
function b=dec2binario5(a,n) // ANTIGO DEC2BINARIO3(A,N)
// Conversão decimal INTEIRO POSITIVO OU NEGATIVO para binário
// com COMPLEMENTO 2 (Calculando o complemento 2 na Base 10)
if( a<(-2^(n-1)) | a>(2^(n-1)-1) ) then
printf("%d não pode ser reprentado com %d bits",a,n)
return
end
a_c2=a
if (a<0) then
a_c2= 2^n + a // complemento 2 na base 10
end
p= 2^(n-1:-1:0);
r=int(abs(a_c2)./p)
b = rem(r,2) //conversão do decimal a para o binário b
s=""
for i=1:n
s=s+string(b(i))
end
printf("%f (B10) = %s (B2)\n",a,s)
a2= b(1:n)*p'; // conversão do binário b para decimal a2
if (a2>2^(n-1)) then a2= a2-2^n; end
printf("%s (B2) = %f (B10)\n",s,a2)
endfunction
function b=SomaBinaria(b1,b2)
// Soma de números binários b=b1+b2
if (length(b1)<>length(b2)) then
disp("b1 e b2 devem ter o mesmo número de bits")
return
end
n=length(b1)
v1=0
for(k=n:-1:1)
b(1,k)=b1(k)+b2(k)+v1
v1=0
if b(k)==2 then
b(k)=0
v1=1
elseif b(k)==3 then
b(k)=1
v1=1
end
end
endfunction
|
1799840b08465972b65be9c275a3963daf0d2762 | fcd4bce0080771389b4a69338ed6443153942183 | /cores/n64/mupen64plus-rsp-paraLLEl/lightning/check/fop_sqrt.tst | fa93dbcfadb35f2a77721afb112e85f6da71ef84 | [
"LGPL-3.0-only",
"GPL-3.0-only",
"GFDL-1.1-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"GFDL-1.1-only",
"MIT",
"LGPL-2.1-only",
"MPL-1.1",
"LicenseRef-scancode-mame",
"Zlib",
"GPL-2.0-only",
"LGPL-2.1-or-later",
"MPL-2.0",
"CC-PDDC",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-brian-gladman-3-clause",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | wulfebw/retro | d4fcf9229b257b3c495f54b1aeb3ea36004ae4aa | dad4b509e99e729e39a2f27e9ee4120e3b607f58 | refs/heads/master | 2022-10-23T07:17:55.320585 | 2020-06-12T01:38:06 | 2020-06-12T01:38:06 | 260,832,205 | 8 | 1 | MIT | 2020-06-12T01:38:08 | 2020-05-03T05:06:17 | C | UTF-8 | Scilab | false | false | 467 | tst | fop_sqrt.tst | #include "alu.inc"
.code
prolog
#define SQRT(N, T, I, V) FUN(N, T, sqrt, I, V)
#define USQRT(N, T, I, V) UFUN(N, T, sqrt, I, V)
SQRT(0, _f, -0.0, 0.0)
SQRT(1, _f, 4.0, 2.0)
SQRT(2, _f, 2.25, 1.5)
SQRT(3, _f, $Inf, $Inf)
USQRT(0, _f, $NaN, $NaN)
SQRT(0, _d, -0.0, 0.0)
SQRT(1, _d, 4.0, 2.0)
SQRT(2, _d, 2.25, 1.5)
SQRT(3, _d, $Inf, $Inf)
USQRT(0, _d, $NaN, $NaN)
prepare
pushargi ok
ellipsis
finishi @printf
ret
epilog
|
e4fcd8044af8bf0a80334a4909ee4a48839a2fa3 | 91f01d7ebaf06c1dda70fe8fe09c990a1fc4a2df | /Codigos/Convertidor/Entrada.sce | 5dfbc331babd443f9228a7d50c17fe75b6532e47 | [] | no_license | arturo393/Deuterio | 00edcf1a50ef8cb48cef036a04d18376f0d3bae0 | d80fab833770667af43c2d4decdc5ee188de3c26 | refs/heads/master | 2020-05-29T08:50:57.346060 | 2016-12-22T01:44:38 | 2016-12-22T01:44:38 | 70,185,873 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 532 | sce | Entrada.sce | //r.time=(0.01:0.01:10)';
//r.values= ones(1000,1);
clear
//-----------------------------activación semiconductores---------------------
//s1
p.time=(0.01:0.01:10)';
p.values(1:250,1)=10;//
p.values(251:1000,1)=0;
//s2
q.time=(0.01:0.01:10)';
q.values(1:250,1)=0;
q.values(251:1000,1)=10;
//s4
r.time=(0.01:0.01:10)';
r.values(1:250,1)=0;//
r.values(251:1000,1)=10;//
//s3
s.time=(0.01:0.01:10)';
s.values(1:250,1)=10;
s.values(251:1000,1)=0;
//----------------------------------------------------------------------------
|
3d556ea3471a4f8c4c435bb36e14509891f53f38 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/macros/int/%i_2_s.sci | 4260be3472e3841bf0dae57d8934100c688996f0 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 44 | sci | %i_2_s.sci | function r=%i_2_s(a,b)
// a>b
r=double(a)>b
|
a0143782eeb65abb8650c3b4ec8b3e24784c8527 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1658/CH27/EX27.14/Ex27_14.sce | 16007c824e30184cdcc01f6fdcd6775a79fb2f82 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 235 | sce | Ex27_14.sce | clc;
//e.g 27.14
AV=300;
Ri=1.5*10**3;
R0=50*10**3;
b=1/15;
AV1=AV/(1+b*AV);
disp(AV1);
Ri1=(1+b*AV)*Ri;//input resistance
disp('Kohm',Ri1*10**-3,"Ri1=");
Ri1=R0/(1+b*AV);//output resistance
disp('kohm',Ri1*10**-3,"Ri1=");
|
e5d5e94f9e5d9ddd7308b5edae128c4e07de602c | a159f59d19e2b03b234e9c2977ba4a932180e648 | /Software/GreenScilabV0.9/macros/gl_sample.sci | dc23428c2ca4c33e449cf3803996354713935654 | [] | no_license | OpenAgricultureFoundation/openag_sim | e052bbcc31b1d7f9b84add066327b479785f8723 | 425e678b55e24b5848d17181d25770175b8c2c3f | refs/heads/master | 2021-07-01T06:25:08.753260 | 2017-09-20T21:44:18 | 2017-09-20T21:44:18 | 80,540,145 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 11,597 | sci | gl_sample.sci | function [sqa,sqb,sqbu,sqc,sel,um,umb,uml] = gl_sample(Tr,N,maxp,Nu_Ma,Nu_I,Nu_O,u,rt_a,st_j,a,b,bu,c)
// Ouput variables initialisation (not found in input variables)
sqa=[];
sqb=[];
sqbu=[];
sqc=[];
sel=[];
um=[];
umb=[];
uml=[];
// Display mode
//mode(-1);
// Display warning for floating point exception
//sieee(1);
// This function is to get random sequence with MonteCarlo method.
// Tr is number of random structure with each physiologicasl age
// we should be very cautious in using rand matrix because there is covariance
rand("seed",3);
// sqb are 0/1 sequence describing a growth unit grow or not
sqb = zeros(max(Tr),N,maxp);
for p = 1:maxp
for i = 1:min(N,Nu_Ma(p))
for r = 1:Tr(p)
sqb(r,i,p) = ceil(b(p)-rand());
end;
end;
end;
// sqc are 0/1 sequence describing a growth unit die or not
sqc = zeros(max(Tr),N,maxp);
for p = 1:maxp
for r = 1:Tr(p)
count = 0;
for i = 1:min(N,Nu_Ma(p))
if rand()<c(p) then
count = count+1;
else
break;
end;
end;
sqc(r,1:count,p) = 1;
end;
end;
disp("sqbu"); //tic
sqbu = zeros(max(Tr),N*max(u),maxp);
sqa = zeros(max(Tr),N*max(u),max(max(Nu_O(4,:,:))),maxp);
sel = zeros(max(Tr),N*max(u),max(max(Nu_O(4,:,:))),maxp);
umb = zeros(max(Tr),N,maxp,6);
// sel are interger numbers between 1-Tr showing the ID of chosed branch
//N+1 is for terminal structure. If branching probability considered, should one more index
for p = 1:maxp
for r = 1:Tr(p)
sumi = 0;
for i = 1:min(N,Nu_Ma(p))
for k = 6:-1:p //remember the sequence--from min to max phy_age
suma = 0;
for j = 1:Nu_I(p,k) // for each microsate
sumi = sumi+1;
sqbu(r,sumi,p) = ceil(bu(p)-rand());
if sqbu(r,sumi,p)==1 & sqb(r,i,p)==1 & sqc(r,i,p)==1 then
suma = suma+1; //number of microstate(p,k)
if maxp>=k then //only if internode exist
for bj = 1:Nu_O(4,p,k) // for each branch
sqa(r,sumi,bj,p) = ceil(a(k)-rand());
if sqa(r,sumi,bj,p)>0 then
sel(r,sumi,bj,p) = ceil(rand()*Tr(k));
end;
end;
end;
end;
end;
if sqb(r,i,p)==1 & sqc(r,i,p)==1 then
umb(r,i,p,k) = suma;
end;
end;
end;
if N>Nu_Ma(p,1) then // terminal structure exist
k = st_j(p);
if k>=p & k<=maxp then
sel(r,Nu_Ma(p,1)*u(p)+1,1,p) = ceil(rand()*Tr(k));
end;
end;
end;
end;
//toc
//um are number of metamer in G.U. along the aixs, it''s result of b,bu,c
//uml are number of leaves in G.U. along the aixs, it''s result of b,bu,c
um = zeros(max(Tr),N,maxp);
uml = zeros(max(Tr),N,maxp);
for p = 1:maxp
for r = 1:Tr(p)
for i = 1:min(N,Nu_Ma(p))
um(r,i,p) = sqb(r,i,p)*sqc(r,i,p)*sum(sqbu(r,(i-1)*u(p)+1:i*u(p),p));
sumi = (i-1)*u(p); nl = 0;
for k = 6:-1:p
nl = nl+sum(sqbu(r,sumi+1:sumi+Nu_I(p,k),p))*Nu_O(1,p,k);
sumi = sumi+Nu_I(p,k);
end;
uml(r,i,p) = sqb(r,i,p)*sqc(r,i,p)*nl;
end;
end;
end;
disp("end of random sequence")
Flag_smaple_check = 0;
MS = zeros(4,maxp);
MTh = zeros(4,maxp);
VS = zeros(4,maxp);
VTh = zeros(4,maxp);
if Flag_smaple_check==1 then
printf(" Simu/Theo--b; Simu/Theo--bu; Simu/Theo--c; Simu/Theo--compound\n");
for p = 1:maxp
printf("Mp=%3d",p);
Num = min(N,Nu_Ma(p));
//b
MTh(1,p) = Num*u(p)*b(p); VTh(1,p) = Num*u(p)^2*b(p)*(1-b(p)); //theoretical mean and variance
tempb = matrix(sqb(:,:,p),max(Tr),N)*u(p); //simulation mean and variance
MS(1,p) = sum(sum(tempb,1))/Tr(p);
tempb1 = sum(tempb,2);
VS(1,p) = sum((tempb1(1:Tr(p))-MS(1,p)) .^2);
if Tr(p)>1 then
VS(1,p) = VS(1,p)/(Tr(p)-1);
else
VS(1,p) = 0;
end;
//bu
MTh(2,p) = Num*u(p)*bu(p); VTh(2,p) = Num*u(p)*bu(p)*(1-bu(p)); //theoretical mean and variance
tempbu = matrix(sqbu(:,:,p),max(Tr),N*max(u)); //simulation mean and variance
MS(2,p) = sum(sum(tempbu,1))/Tr(p);
tempbu1 = sum(tempbu,2);
VS(2,p) = sum((tempbu1(1:Tr(p))-MS(2,p)) .^2);
if Tr(p)>1 then
VS(2,p) = VS(2,p)/(Tr(p)-1);
else
VS(2,p) = 0;
end;
//c
MTh(3,p) = sum(c(p).^[1:Num]); //theoretical mean and variance
cc = c(p);
if c(p)<1 then
MTh(3,p) = cc*(1-cc^Num)/(1-cc);
else
MTh(3,p) = Num;
end;
if c(p)<1 then
VTh(3,p) = c(p)/(1-c(p))^2*(1-c(p)^Num*(2*Num+1)*(1-c(p))-c(p)^(2*Num+1));
else
VTh(3,p) = 0;
end;
MTh(3,p) = MTh(3,p)*u(p);
VTh(3,p) = VTh(3,p)*u(p)^2;
tempc = matrix(sqc(:,:,p),max(Tr),N)*u(p); //simulation mean and variance
MS(3,p) = sum(sum(tempc,1))/Tr(p);
tempc1 = sum(tempc,2);
VS(3,p) = sum((tempc1(1:Tr(p))-MS(3,p)) .^2);
if Tr(p)>1 then
VS(3,p) = VS(3,p)/(Tr(p)-1);
else
VS(3,p) = 0;
end;
//coumpound
MTh(4,p) = sum(c(p) .^[1:Num])*b(p)*u(p)*bu(p); //theoretical mean and variance
//VTh(4,p)=Num*b(p)*u(p)*bu(p)*(1-bu(p))+Num*b(p)*(1-b(p))*(u(p)*bu(p))^2;%V=m1v2+v1m2^2
m1 = b(p); v1 = b(p)*(1-b(p)); m2 = u(p)*bu(p); v2 = u(p)*bu(p)*(1-bu(p)); m3 = MTh(3,p)/u(p); v3 = VTh(3,p)/(u(p)^2);
m12 = m1*m2; v12 = m1*v2+v1*m2^2;
m312 = m3*m12;
v312 = m3*v12+v3*m12^2;
MTh(4,p) = m312;
VTh(4,p) = v312;
tempum = matrix(um(:,:,p),max(Tr),N); //simulation mean and variance
MS(4,p) = sum(sum(tempum,1))/Tr(p);
tempum1 = sum(tempum,2);
VS(4,p) = sum((tempum1(1:Tr(p))-MS(4,p)) .^2);
if Tr(p)>1 then
VS(4,p) = VS(4,p)/(Tr(p)-1);
else
VS(4,p) = 0;
end;
//output
for j = 1:4
printf("%10.2f%8.2f",MS(j,p),MTh(j,p));
end;
printf("\n");
fprintf("Vp=%3d",p);
for j = 1:4
printf("%10.2f%8.2f",VS(j,p),VTh(j,p));
end;
printf("\n");
printf("\n");
end;
end;
clear("tempb","tempbu","tempc","tempum")
Flag_smaple_distribution = 1;
//distribution figure
if Flag_smaple_distribution==1 then
figu=scf();
set(gca(),"auto_clear","off");
u = sum(Nu_I,2);
for p = 1:maxp
Num = min(N,Nu_Ma(p));
nmax = u(p)*Num;
//compound, theory
// *** MATLAB ***
// f = zeros(1,nmax+1);
// for i = 1:nmax+1
// for j = 0:Num-1
// for k = 0:j
// f(i) = f(i)+(1-c(p))*c(p)^j*binopdf(k,j,b(p))*binopdf(i-1,k*u(p),bu(p));
// end;
// end;
// for k = 0:Num //item when total Num macrostates
// f(i) = f(i)+c(p)^Num*binopdf(k,Num,b(p))*binopdf(i-1,k*u(p),bu(p));
// end;
// end;
// **** MATLAB END *****
// **** SCILAB ***
f=zeros(1,nmax+1);
if u(p)==0 then
for i=1:nmax+1
f(i)=f(i)+(1-c(p));
for j=1:Num-1
proba_1=binomial(b(p),j);
for k=0:j
f(i)=f(i)+(1-c(p))*c(p)^j*proba_1(k+1);
end;
end;
proba_3 = binomial(b(p),Num);
for k=0:Num
f(i)=f(i)+c(p)^Num*proba_3(k+1);
end;
end;
else
for i=1:nmax+1
f(i)=f(i)+(1-c(p));
for j=1:Num-1
proba_1=binomial(b(p),j);
f(i)=f(i)+(1-c(p))*c(p)^j*proba_1(1);
for k=1:j
proba_2=binomial(bu(p),k*u(p)); // ERROR : i may be greater than k*u(p)
if i-1<=k*u(p) then
f(i)=f(i)+(1-c(p))*c(p)^j*proba_1(k+1)*proba_2(i);
end;
end;
end;
proba_3 = binomial(b(p),Num);
f(i)=f(i)+c(p)^Num*proba_3(1);
for k=1:Num
proba_4=binomial(bu(p),k*u(p));
if i-1<=k*u(p) then
f(i)=f(i)+c(p)^Num*proba_3(k+1)*proba_4(i);
end;
end;
end;
end;
// *** SCILAB END ****
i = 0:nmax;
plot(i,f,"k");
//compound, simulation
fS = zeros(1,nmax+1);
tempum = matrix(um(:,:,p),max(Tr),N);
temp = sum(tempum,2); //number of microstate in each axis
size(temp)
for k = 1:Tr(p) //for each stochastic axis
if temp(k)>0 then
fS(temp(k)+1) = fS(temp(k)+1)+1;
end;
end;
fS = fS/Tr(p);
i = 0:nmax;
plot(i,fS);
legend(["Theoritical distribution","Simulated distribution"]);
end
axi=gca();
axi.x_label.text = "Number of internodes in bearing axis";
axi.y_label.text = "Probabilities";
axi.title.text = "Compound distribution of number of internodes in bearing axis. N=5,u=9,p_C=0.99,p_A=0.9,p_I=0.86";
//theoretical distribution of number of microstate of physiological age, single and compound
figu=scf(); set(gca(),"auto_clear","off");
u = sum(Nu_I,2);
for p = 1:maxp
Num = min(N,Nu_Ma(p));
nmax = u(p)*Num;
//c
f = zeros(1,nmax+1);
for i = 1:nmax+1
if pmodulo(i-1,u(p))==0 then //if it is integer times of u(p)
n = (i-1)/u(p); //number of cycles
if n<N then
f(i)=(1-c(p))*c(p)^n;
else
f(i)=c(p)^n;
end;
end;
end;
i = 0:nmax;
//plot(i,f,''r'')
//b
f = zeros(1,nmax+1);
//tmp = binopdf(0:Num,Num,b(p));
tmp = binomial(b(p),Num);
f(1)=tmp(1); //item 0
for i = 1:nmax
if pmodulo(i,u(p))==0 then //it is integer times of u(p)
f(i+1)=tmp(i/u(p)+1); //becareful of the shift
end;
end;
i = 0:nmax;
//plot(i,f,''g'')
//bu
f = zeros(1,nmax+1);
//f = binopdf(0:nmax,nmax,bu(p)); // ORIGINAL
if nmax == 0 then // QR 2006 04 19
f = 1;
else
f = binomial(bu(p),nmax);
end; // QR END
i = 0:nmax;
//plot(i,f,''b'')
//compound
// **** MATLAB *****
// f = zeros(1,nmax+1);
// for i = 1:nmax+1
// for j = 0:Num-1
// for k = 0:j
// f(i)=f(i)+(1-c(p))*c(p)^j*binopdf(k,j,b(p))*binopdf(i-1,k*u(p),bu(p));
// end;
// end;
// for k = 0:Num //item when total Num macrostates
// f(i)=f(i)+c(p)^Num*binopdf(k,Num,b(p))*binopdf(i-1,k*u(p),bu(p));
// end;
// end;
// **** END ****
// *** SCILAB *****
f=zeros(1,nmax+1);
if u(p)==0 then
for i = 1:nmax+1
f(i)=f(i)+(1-c(p));
for j = 1:Num-1
proba_5=binomial(b(p),j);
for k=0:j
f(i)=f(i)+(1-c(p))*c(p)^j*proba_5(k+1);
end;
end;
proba_7=binomial(b(p),Num);
for k = 0:Num //item when total Num macrostates
f(i)=f(i)+c(p)^Num*proba_7(k+1);
end;
end;
else
for i = 1:nmax+1
f(i)=f(i)+(1-c(p));
for j = 1:Num-1
proba_5=binomial(b(p),j);
f(i)=f(i)+(1-c(p))*c(p)^j*proba_5(1);
for k=1:j
proba_6=binomial(bu(p),k*u(p));
if i-1<=k*u(p) then
f(i)=f(i)+(1-c(p))*c(p)^j*proba_5(k+1)*proba_6(i);
end;
end;
end;
proba_7=binomial(b(p),Num);
f(i)=f(i)+c(p)^Num*proba_7(1);
for k=1:Num
proba_8=binomial(bu(p),k*u(p));
if i-1<=k*u(p) then
f(i)=f(i)+c(p)^Num*proba_7(k+1)*proba_8(i);
end;
end;
end;
end;
// *** SCILAB END *****
i = 0:nmax;
//h=plot(i,f,''k'')
bar(i,f,0.5)
//plot2d3(i,f,0.5) // doesnt work
//set(h,''LineWidth'',2);
//legend(''p_c=0.99, p_a=1, p_i=1 '',''p_c=1, p_a=0.9, p_i=1'',''p_c=1, p_a=1, p_i=0.8'',''p_c=0.95, p_a=0.9, p_i=0.8'',1)
//%legend(''p_C=0.99, p_A=0.94, p_I=0.86'',1)
end;
axi = gca();
axi.x_label.text = "Number of internodes in bearing axis";
axi.y_label.text = "Probabilities";
axi.title.text = "Compound distribution of number of internodes in bearing axis. N=5,u=9,p_C=0.99,p_A=0.9,p_I=0.86";
end;
endfunction
|
7aeadd24dda530bee5dcf014a3ea85e8eb2b2fde | 449d555969bfd7befe906877abab098c6e63a0e8 | /2165/CH3/EX3.1/3_1.sce | 9f7204e52ae97c56dfe3498c163b89ac343fc6a4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 444 | sce | 3_1.sce | clc
//initialisation of variables
p=100//lb/in^2
x=0.8//lb
t1=164//degree C
t2=4.45 //ft^3
p1=0.016//ft^3
h1=493.4//C.H.U/lb
h2=165.9//C.H.U/lb
S=h2+h1//C.H.U/lb
w=(144*p)/1400*(t2-p1)//C.H.U/lb
H=h2+(x*h1)//C.H.U//lb
w1=(x*144*p)/1400*(t2-p1)//C.H.U
//CALCULATIONS
E=S-w//C.H.U/lb
IE=H-w1//C.H.U/lb
//RESULTS
printf('The steam is total heat dry and satured=% f C.H.U/lb',E)
printf('Total heat of wet steam=% f C.H.U/lb',IE)
|
c2c3a6ddd8ddb2c9857f89ff889956f427f550dd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2990/CH4/EX4.35/Ex4_35.sce | 00277a0abf35af83c1a56607f830db8bedcca259 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex4_35.sce |
funcprot(0);
// Initialization of Variable
function[dms]=degtodms(deg)
d = int(deg)
md = abs(deg - d) * 60
m = int(md)
sd = (md - m) * 60
sd=round(sd*100)/100
dms=[d m sd]
endfunction
//one of the 2 solution
f0=5+1.9/60;//declination in degrees
n=0.25;//constant
del0=0;//del''0
del1=-0.1;//del''1
d2=23.0//del1/2
//calculation
fn=f0+n*d2/60+n*(n-1)/2*(del1+del0)/60;
fn=degtodms(fn)
disp(fn,"sun declination in deg min sec");
clear()
|
65d77b72de04d182b507013416cceb7e1394a3fc | 449d555969bfd7befe906877abab098c6e63a0e8 | /2294/CH7/EX7.1.2/EX7_1_2.sce | 2badede11fc2283617a8fe3b4f3454de83bf7b90 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 551 | sce | EX7_1_2.sce | //Example 7_1_2
//Find the laplace transform and Roc of the following signal.
clc;
t=-10:.01:10;
a=4;
for i=1:length(t)
if t(i)>0 then
x(i)=0;
else
x(i)=-exp(-a*t(i));
end
end
s=%s;
numfs=1;
denfs=s+.04;
fs=syslin('c',numfs/denfs);
fs1=csim('impulse',t,fs);
f=scf(0);
subplot(2,1,1);
plot2d(t,x,2);
xtitle('Phrasing');
xgrid;
subplot(2,1,2);
plot2d(t,fs1,1);
xtitle('Solution');
xgrid;
disp(fs);
disp('As real(s)<-a,so the integral converges for real(s)<-a');
xs2jpg(0, 'EX7_1_2-plot-a.jpg');
|
a487b220b2b8fcf39c9bb0307c7fd02e8571c6ea | 449d555969bfd7befe906877abab098c6e63a0e8 | /773/CH10/EX10.12/10_12.sci | 28d45e6409d3503abe4232e808a3c384d684527c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 431 | sci | 10_12.sci | //equation//
ieee(2);
syms p K s;
m=s^3+(p*s^2)+(K+3)*s+(2*(K+1))
cof_a_0 = coeffs(m,'s',0);
cof_a_1 = coeffs(m,'s',1);
cof_a_2 = coeffs(m,'s',2);
cof_a_3 = coeffs(m,'s',3);
r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
n=length(r);
routh=[r([4,2]);r([3,1])];
routh=[routh;-det(routh)/routh(2,1),0];
t=routh(2:3,1:2); //extracting the square sub block of routh matrix
routh=[routh;-det(t)/routh(3,1),0];
disp(routh,"routh=")
|
8fd4aaf284a491ab67f9e8ebc37289cabbebe9dc | 717ddeb7e700373742c617a95e25a2376565112c | /278/CH14/EX14.3/ex_14_3.sce | 466c887d1c8916a6cf3604b4ea752d21f49d510d | [] | 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 | 479 | sce | ex_14_3.sce | //determine dia of the shaft
clc
//solution
//given
P=20*1000//W
N=200//rpm
tu=360//N/mm^2
Fs=8
k=0.5//k=di/do
t=tu/Fs//N/mm^2
T=P*60000/(2*%pi*200)//N-mm
//T=(%pi/16)*t*d^3=8.25*d^3
d=(T/8.25)^(1/3)//mm
printf("the dia of solid shaft is,%f mm\n",d)
//elt di and do be inside and do be outer dia
//T=(%pi/16)*t*do^3*(1-k^4)
//T=(%pi/16)*t*do^3[1-0.5^4]
//T=8.3*do^3
do=(T/8.3)^(1/3)//mm
di=0.5*do//mm
printf("the inner and outer dia is,%f mm\n,%f mm\n",di,do) |
8dbf72369115636d8be5583c2c4c8493bf27800e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1541/CH1/EX1.14/Chapter1_Example14.sce | 8076670bea0bccd8a3834de686ca3f363d854d3c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 681 | sce | Chapter1_Example14.sce | //Chapter-1, Example 1.14, Page 1.35
//=============================================================================
clc
clear
//INPUT DATA
Eb=225;//Back emf in V
IL=40;//Line current in A
Rsh=150;//Field resistance in ohm
Ish=1.67;//Field current in A
//CALCULATIONS
V=(Ish*Rsh);//Terminal applied voltage in V
Ia=(IL-Ish);//Armature current in A
Ra=(V-Eb)/Ia;//Armature resistance in ohm
Ia=(V/Ra);//Maximum armature current in A
//OUTPUT
mprintf('i)Armature resistance is %3.2f ohm \nii)Armature current will be maximum at the moment of start up and it is %3.2f A',Ra,Ia)
//=================================END OF PROGRAM==============================
|
1e05fa1460336de0776f743ba8cba11700bdd811 | 449d555969bfd7befe906877abab098c6e63a0e8 | /243/CH12/EX12.2/12_02.sce | 56e7eb842e00bce1950a16e6695338d88d263d7c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 511 | sce | 12_02.sce | //Example No. 12_02
//Tapezoidal rule
//Pg No. 376
clear ;close ;clc ;
deff('F = f(x)','F = exp(x)');
a = -1 ;
b = 1 ;
//case(a)
n = 2
h = (b-a)/n
I = 0
for i = 1:n
I = I + f(a+(i-1)*h)+f(a+i*h);
end
I = h*I/2 ;
disp(I,'intergral for case(a),Ia = ')
//case(b)
n = 4
h = (b-a)/n
I = 0
for i = 1:n
I = I + f(a+(i-1)*h)+f(a+i*h);
end
I = h*I/2 ;
Iexact = 2.35040
disp('n = 4 case is better than n = 2 case',Iexact,'exact integral,Iexact = ',I,'intergral for case(b),Ib = ') |
9d3d6d0595c5c889654f0beae707628da68ee4e2 | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/poly2rc/poly2rc2.sce | 83e934767c00bf3e8c8b2844a64d815a694a4a8f | [] | 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 | 171 | sce | poly2rc2.sce | a = [1.0000 0.6149 0.9899 0.0000 0.0031 -0.0082];
k = poly2rc(a);
disp(k);
//output
// 0.3090264
// 0.9800674
// 0.0031104
// 0.0081427
// - 0.0082
|
3fb0acb8aaec493056ace41f4e6c2c5aa2b9f8ab | 449d555969bfd7befe906877abab098c6e63a0e8 | /1427/CH25/EX25.10/25_10.sce | f20fbc01d582f10f000b0db3284ec8cada1487d0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 25_10.sce | //ques-25.10
//Calculating temperatures required for Carbon dioxide
clc
C=900;//velocity (in m/s)
M=44;//molar mass of CO2 (in g/mol)
T1=(C^2*%pi*M/1000)/(8*8.314);//Cavg
T2=(C^2*M/1000)/(2*8.314);//Cmp
printf("The required temperatures are %d K and %d K.",T1,T2);
|
b0166355ffa8ac1e577b7148a216da0c17f02df7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /125/CH4/EX4.4/Example4_4.sce | 9530d43d1d68bcf54ef4261b104a721ec0237f7b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 378 | sce | Example4_4.sce | //Caption: 2D DFT of 4x4 grayscale image
//Example4.4
//page 170
clc;
f = [1,1,1,1;1,1,1,1;1,1,1,1;1,1,1,1];
N =4; //4-point DFT
kernel = dft_mtx(N);
F = kernel*(f*kernel');
disp(F,'2D DFT of given 2D image =')
//Result
//2D DFT of given 2D image =
//
// 16. 0 0 0
// 0 0 0 0
// 0 0 0 0
// 0 0 0 0 |
31d45aa8c1f5859fb2e7aa9c31827ec1f1eff63a | dc5a2fe4380e1453a12f15f5080b10f3ababb9de | /AutomationTools/bin/1.0/common/ATLAS/tools/txtfile/sh_bcc_all.tst | f6b95025e12049a09ae9d04f14dd84ef38838cd5 | [] | no_license | jameshilliard/PythonCode | f72ad62bb8b8cafbc94cbe7c0d3065343fdf0f98 | 422543bc049f57a67d53ec0b89caef076297cdc5 | refs/heads/master | 2020-04-09T00:06:25.689609 | 2015-03-14T13:14:34 | 2015-03-14T13:14:34 | 32,722,067 | 3 | 0 | null | 2015-03-23T09:21:52 | 2015-03-23T09:21:52 | null | UTF-8 | Scilab | false | false | 6,907 | tst | sh_bcc_all.tst | -v G_USER=jma
-v G_CONFIG=1.0
-v G_TBTYPE=bcc
-v G_TST_TITLE="My Network Broadband Connection Coax"
-v G_PROD_TYPE=MC524WR
-v G_HTTP_DIR=test/
-v G_FTP_DIR=/log/autotest
-v G_TESTBED=tb40
-v G_FROMRCPT=jma@actiontec.com
-v G_FTPUSR=root
-v G_FTPPWD=@ctiontec123
-v U_USER=admin
-v U_PWD=admin1
-v G_LIBVERSION=1.0
-v G_LOG=$SQAROOT/automation/logs
-v U_COMMONLIB=$SQAROOT/lib/$G_LIBVERSION/common
-v U_COMMONBIN=$SQAROOT/bin/$G_LIBVERSION/common
-v U_TBCFG=$SQAROOT/config/$G_LIBVERSION/testbed
-v U_TBPROF=$SQAROOT/config/$G_LIBVERSION/common
-v U_VERIWAVE=$SQAROOT/bin/1.0/veriwave/
-v U_MI424=$SQAROOT/bin/1.0/mi424wr/
-v U_TESTPATH=$SQAROOT/platform/1.0/verizon/testcases/bcc/json
# this value used to setup hytrust.cfg
-v U_DEBUG=3
-v U_RUBYBIN=$SQAROOT/bin/$G_LIBVERSION/rbin
-v U_VZBIN=$SQAROOT/bin/$G_LIBVERSION/vz_bin
-v U_COMMONJSON=$SQAROOT/platform/1.0/verizon2/testcases/common/json
-v U_COAX=1
# $G_PFVERSION=1.0
#-----------------------------
# Set up the test environment.
#-----------------------------
#-nc $SQAROOT/config/$G_CONFIG/common/testbedcfg_env.xml
-nc $SQAROOT/config/$G_CONFIG/common/testbedcfg.xml;
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/login_logout.xml
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/fw_upgrage_image.xml;pass=init
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/fw_upgrage_image.xml;pass=init
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/fw_upgrage_image.xml;fail=finish
-label init
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/reset_dut_to_default.xml
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/tc_init_dut.xml;pass=next
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/tc_init_dut.xml;pass=next
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/tc_init_dut.xml;fail=finish
-label next
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/tc_init_ping.xml;fail=finish
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/enable_tnet.xml
#-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/disable_ath1.xml
#------------------------------
# Test cases
#------------------------------
-nc $SQAROOT/platform/1.0/verizon2/testcases/common/tcases/set_default_time.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpclient_03006000809.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpclient_03006000810.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpclient_03006000811.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpclient_03006000812.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpdisable_03006000825.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelay_03006000819.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelay_03006000820.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelay_03006000821.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelay_03006000822.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelay_03006000823.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelay_03006000824.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelaynapt_03006000819.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelaynapt_03006000820.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelaynapt_03006000821.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelaynapt_03006000822.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelaynapt_03006000823.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcprelaynapt_03006000824.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpserver_03006000813.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpserver_03006000814.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpserver_03006000815.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpserver_03006000816.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpserver_03006000817.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dhcpserver_03006000818.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dnsserver_03006000844.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dnsserver_03006000845.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dnsserver_03006000846.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_dnsserver_03006000847.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000826.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000827.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000828.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000829.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000830.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000831.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000832.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000833.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000834.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000835.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000836.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000837.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000838.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000839.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000840.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000841.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000842.xml
-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_hostname_03006000843.xml
#-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_autoDetection_03006001080.xml
#-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_autoDetection_03006001081.xml
#-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_autoDetection_03006001082.xml
#-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_autoDetection_03006001083.xml
#-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_autoDetection_03006001084.xml
#-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_autoDetection_03006001085.xml
#-tc $SQAROOT/platform/1.0/verizon/testcases/bcc/tcases/tc_autoDetection_03006001086.xml
#------------------------------
# Checkout
#------------------------------
-label finish
-nc $SQAROOT/config/$G_CONFIG/common/finalresult.xml
-nc $SQAROOT/config/$G_CONFIG/common/uploadlog.xml
-nc $SQAROOT/config/$G_CONFIG/common/email.xml
|
798427f00636522a312c099f6c963ddf3a8e720c | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set6/s_Electric_Machinery_And_Transformers_B._S._Guru_And_H._R._Hiziroglu_380.zip/Electric_Machinery_And_Transformers_B._S._Guru_And_H._R._Hiziroglu_380/CH4/EX4.11/Ex4_11.sce | 98b806a33a4641d0c700afaf573cbfb1e34035de | [] | 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 | 1,149 | sce | Ex4_11.sce | errcatch(-1,"stop");mode(2);//Caption:Find the efficiency and voltage regulation
//Exa:4.11
;
;
V_2a=480;//in volts
pf=0.707;//leading
theta=acosd(pf);
a_T=120/480;//ratio of transformation of step-up transformer
a=360/120;//ratio of transformation of two-winding transformer
R_cH=8.64*1000;//in ohms
R_H=18.9;//in ohms
X_H=21.6;//in ohms
X_L=2.4;//in ohms
R_L=2.1;//in ohms
X_mH=6.84*1000;//in ohms
R_cL=R_cH/a^2;//equivalent core loss resistance in ohms
X_mL=X_mH/a^2;//magnetizing reactance
I_2a=(720/360)*(cosd(theta)+%i*sind(theta));
I_H=I_2a;
I_pa=I_2a/a_T;
I_com=I_pa-I_2a;//current through common winding (in Amperes)
//on applying KVL to the output loop
E_L=(I_2a*(R_H+%i*X_H)+V_2a-I_com*(R_L+%i*X_L))/4;
V_1a=E_L+I_com*(R_L+%i*X_L);
I_ca=V_1a/R_cL;//core loss current in Amperes
I_ma=-%i*V_1a/X_mL;//magnetizing current in Amperes
I_phy_a=I_ca+I_ma;//excitation current
I_1a=I_pa+I_phy_a;
P_o=real(V_2a*conj(I_2a));
P_in=real(V_1a*conj(I_1a));
Eff=P_o/P_in;
disp(Eff*100,'Efficiency (%)=');
V_2anL=V_1a/a_T;//no load voltage
VR=(abs(V_2anL)-V_2a)/V_2a;
disp(VR*100,'Voltage regulation (%)=');
exit();
|
c2091338519f59642c78ea9d5d93aaa17a614d8e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH27/EX27.11/Ex27_11.sce | 5a4a516307c20e1828783c0d65bbc515c691d504 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 111 | sce | Ex27_11.sce | clear
//Given
B=50
Ib=0.02 //mA
//Calculation
Ic=B*Ib
Ie=Ib+Ic
//Result
printf("\n Ie = %0.3f mA",Ie)
|
13a5fa49e07155ed54a371a1227c472b9b60f83a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2441/CH2/EX2.18/Ex2_18.sce | 7d51ce332b58ab1a29e7dd85f63224983e4b5b30 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 502 | sce | Ex2_18.sce | //exa 2.18
clc;clear;close;
format('v',6);
Bmn=[0.0676 0.00953 -0.00507
0.00953 0.0521 0.00901
-0.00507 0.00901 0.0294];//Loss Coefficient
Bno=[-0.0766;0.00342;0.0189];//Loss Coefficient
Boo=0.04357;//Loss Coefficient
P1=107.9;//MW
P2=50;//MW
P3=60;//MW
//solution :
PL=[P1 P2 P3]*Bmn+[P1 P2 P3]*Bno+Boo;//MW
PL=sum(-PL);//MW
disp(PL,"Transmission Loss(MW)");
//Note : Values calculated in the book are slightly wrong because of accuracy in calculation as compared to scilab accuracy.
|
632731ba87ee701b910869551fcff014212cd23a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1199/CH3/EX3.4/3_4.sci | 3b333690a416594eb51b741633765ffa5077eaff | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 160 | sci | 3_4.sci | //3.4
clc;
Ta=1480+273;
Tf=0.8;
T=Tf^-0.25*Ta;
printf("\nTrue temperature =%.2f degree K",T)
Tc=T-273;
printf("\nTrue temperature =%.2f degree C",Tc)
|
1ec5eb40bbfa4cf2f1572551cba86988313243ef | 449d555969bfd7befe906877abab098c6e63a0e8 | /1760/CH1/EX1.17/EX1_17.sce | f74260575f3b446e9457efb9835c6f201b99cb57 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 332 | sce | EX1_17.sce | //EXAMPLE 1-17 PG NO-23
N=10^3; //Number of Turns
a=6.25*10^-4; //Diameter
l=0.25;
L=(N*N*4*%pi*10^-7*a)/(%pi*l); //INDUCTANCE
disp('i)inductance = '+string (L)+' H');
e=L*100; //EMF
disp('ii)EMF = '+string (e)+' V')
|
62b26892eac4b0c87b4e7f47706eeb814626e2c0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1286/CH4/EX4.14/4_14.sce | 8bb5cbc6ccaff628726a96ebefdc9016443defa1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 209 | sce | 4_14.sce | clc
//initialisation
v2=1.677//m3
v1=0.001//m3
dp=0.76*13600*9.81
t=100//c
T=t+273//k
L=540000//cal//kg
//CALCULATIONS
dT=(dp*T*(v2-v1))/L
//results
printf(' increase in boiling point= % 1f C',dT)
|
45ecbc5bc1423a0f86be21f3af5f5af57a97e811 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1061/CH8/EX8.3/Ex8_3.sce | bc19f4f2a7d8c3c93834dfe77b8990d9edc90412 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 226 | sce | Ex8_3.sce | //Ex:8.3
clc;
clear;
close;
nx=3.6;// refractive index
Fn=0.68;// transmission factor
pe_pi=(Fn)/(4*nx^2);
pi_p=0.3;
nep=pe_pi*pi_p;// external power efficiency
printf("The external power efficiency =%f %%", nep*100); |
8868a501f183fba411ea0f2177ea131612e7e729 | 449d555969bfd7befe906877abab098c6e63a0e8 | /659/CH10/EX10.4/exm10_4.sce | 6d857b7a0900dddc312981bbc06d2f467bdca266 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,037 | sce | exm10_4.sce | // Example 10.4
//Rewrite the program of Example 10.3 to using an array member to represent
//the three subjects.
//Defining array of structures and array with in structure
student(1)=[struct('sub',[45 67 81],'total',0)];
student(2)=[struct('sub',[75 53 69],'total',0)];
student(3)=[struct('sub',[57 36 71],'total',0)];
total=student;
for i=1:3
total.sub(i)=0;
end
total.total=0;
//Calculate the student-wise and subject-wise totals
for i=1:3
for j=1:3
student(i).total=student(i).total+student(i).sub(j);
total.sub(j)=total.sub(j)+student(i).sub(j);
end
total.total=total.total+student(i).total; //Grand total
end
//Printing student-wise totals
printf("STUDENT TOTAL\n");
for i=1:3
printf("student(%d) %d\n",i,student(i).total);
end
//Printing subject-wise totals
printf("SUBJECT TOTAL\n");
for j=1:3
printf("subject-(%d) %d\n",j,total.sub(j));
end
//Printing grand total
printf("Grand Total = %d",total.total); |
33a42b0986a586b9928f665b25fcbf22dd1a12e7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3159/CH8/EX8.4/Ex8_4.sce | 9caa01a0dffc6c685a385b994d82a7f53c4fc7e6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 472 | sce | Ex8_4.sce | // Calculate time required to get required boron concentration
clc
D = 4e-17 // diffusion coefficient
c1 = 0
cs = 3e26
c_x = 1e23 // number of atoms
x = 2e-6 // depth in m
printf("\n Example 8.4")
A = cs
B = cs - c1
k = (A-c_x)/B
if k >0.99966 then
if k< 0.9997 then
z = 2.55 // from table
end
end
t = x^2/(z^2*4*D)// time in sec
printf("\n Time required to get required boron concentration is %d sec",t)// answer in book is 3845 sec
|
8e562230752b2bc734608d319c3c3e92a4df88e8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /527/CH8/EX8.3/8_3exam.sce | fe13850aa8dcf4d48466014370fe4e14758ba870 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,618 | sce | 8_3exam.sce | //Engineering and Chemical Thermodynamics
//Example 8.3
//Page no :370
clear ; clc ;
//Given
A_C5H12 = 9.2131 ; //From table E8.2A
B_C5H12 = 2477.07 ; //From table E8.2A
C_C5H12 = -39.94 ; //From table E8.2A
A_C6H12 = 9.1325 ; //From table E8.2A
B_C6H12 = 2766.63 ; //From table E8.2A
C_C6H12 = -50.50 ; //From table E8.2A
A_C6H14 = 9.2164 ; //From table E8.2A
B_C6H14 = 2697.55 ; //From table E8.2A
C_C6H14 = -48.78 ; //From table E8.2A
A_C7H16 = 9.2535 ; //From table E8.2A
B_C7H16 = 2911.32 ; //From table E8.2A
C_C7H16 = -56.51 ; //From table E8.2A
y_C5H12 = 0.3 ;
y_C6H12 = 0.3 ;
y_C6H14 = 0.2 ;
y_C7H16 = 0.2 ;
P = 1 ; //[bar]
function y83 = f83(T), y83 = -1 + P * ( y_C5H12 / exp(A_C5H12 - B_C5H12 / (T + C_C5H12)) + y_C6H12 / exp(A_C6H12 - B_C6H12 / (T + C_C6H12)) + y_C6H14 / exp(A_C6H14 - B_C6H14 / (T + C_C6H14)) + y_C7H16 / exp(A_C7H16 - B_C7H16 / (T + C_C7H16)));
endfunction ;
y =fsolve([300],f83) ;
disp(" Example: 8.3 Page no : 370") ;
printf("\n\n The temperature at which vapour develops the first drop of liquid = %.2f K",y) ;
T = y ;
P_sat_C5H12 = exp(A_C5H12 - B_C5H12 / (T + C_C5H12)) ;
p_sat_C6H12 = exp(A_C6H12 - B_C6H12 / (T + C_C6H12)) ;
P_sat_C6H14 = exp(A_C6H14 - B_C6H14 / (T + C_C6H14)) ;
P_sat_C7H16 = exp(A_C7H16 - B_C7H16 / (T + C_C7H16)) ;
x_C5H12 = y_C5H12 * P / P_sat_C5H12 ;
x_C6H12 = y_C6H12 * P / p_sat_C6H12 ;
x_C6H14 = y_C6H14 * P / P_sat_C6H14 ;
x_C7H16 = y_C7H16 * P / P_sat_C7H16 ;
printf("\n\n x_C5H12 = %f x_C6H12 = %f\n\n x_C6H14 = %f x_C7H16 = %f",x_C5H12,x_C6H12 ,x_C6H14,x_C7H16) ;
|
ee3980b2a143a161990ec4ccb5d80bab51b052b5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1061/CH8/EX8.8/Ex8_8.sce | b9c74e1f4ade066b2fa16781bc24a707759c4910 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 387 | sce | Ex8_8.sce | //Ex:8.8
clc;
clear;
close;
Eg=1.43;// bandgap energy in eV
dy=0.15*10^-9;
c=3*10^8;// speed of light in m/s
y=1.24/Eg;// in um
y1=y*10^-6;// wavelength of optical emission in m
df=(c*dy)/(y1^2);// the line width in Hz
Df=df/10^9;// the line width in GHz
printf("The wavelength of optical emission =%f um", y);
printf("\n The frequency separation of the modes =%d GHz", Df); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.