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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ad0fffa1aee231fedbdde6b8e862d0ee1467a56a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1535/CH11/EX11.1/Ch11Ex1.sci | 34574b87e092a1c33eca43f355e3d56cf61062d1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 949 | sci | Ch11Ex1.sci | // Scilab Code Ex11.1: Page-249 (2010)
h = 6.626e-034; // Planck's constant, Js
c = 3e+08; // Speed of light in free space, m/s
k = 1.38e-023; // Boltzmann constant, J/K
T = 300; // Temperature at absolute scale, K
lambda = 5500e-010; // Wavelength of visible light, m
rate_ratio = exp(h*c/(lambda*k*T))-1; // Ratio of spontaneous emission to stimulated emission
printf("\nThe ratio of spontaneous emission to stimulated emission for visible region = %1.0e", rate_ratio);
lambda = 1e-02; // Wavelength of microwave, m
rate_ratio = exp(h*c/(lambda*k*T))-1; // Ratio of spontaneous emission to stimulated emission
printf("\nThe ratio of spontaneous emission to stimulated emission for microwave region = %6.4f", rate_ratio);
// Result
// The ratio of spontaneous emission to stimulated emission for visible region = 8e+037
// The ratio of spontaneous emission to stimulated emission for microwave region = 0.0048 |
caa9534dbba314efb07ddb6eee08a52f73eb224f | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set8/s_Elements_Of_Electromagnetics_M._N._O._Sadiku_42.zip/Elements_Of_Electromagnetics_M._N._O._Sadiku_42/CH11/EX11.1/sadiku_11_1.sce | 351f7da85b7e72e757de982f73618543e57da3b0 | [] | 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 | 226 | sce | sadiku_11_1.sce | errcatch(-1,"stop");mode(2);;
;
format('v',6);
R=0,G=0,a=0,Ro=70,B=3,f=100*10^6;
w=2*%pi*f;
C=B/(w*Ro);
disp(C*10^12,'Capacitance per meter of line in pF')
L=Ro*Ro*C;
disp(L*10^9,'Inductance per meter in nHz')
exit();
|
37d3ba210a8325cb155da8836c873f54812f05bc | 449d555969bfd7befe906877abab098c6e63a0e8 | /2579/CH2/EX2.14/Ex2_14.txt | 04c9e2b0c8d4b9a5de2937a5902f45d5566f3023 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | txt | Ex2_14.txt | //Ex:2.14
clc;
clear;
close;
V2=50;// in micro volt
G=5;// voltage gain in dB
G1=10^(G/20);// voltage gain
V1=V2*G1;// signal at receiving station in volt
printf("The signal at receiving station = %f micro volts", V1); |
075f69c36a7a709af99021c539f69dc981617d0f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2240/CH14/EX13.3/EX13_3.sce | b2d5e445fe49a2b24d25cbc4624e8f533b7918e8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 349 | sce | EX13_3.sce | // Grob's Basic Electronics 11e
// Chapter No. 13
// Example No. 13_3
clc; clear;
// With a flux of 400 uWb through an area of 0.0005 sqm, what is the flux density B in tesla units?
// Given data
A = 0.0005; // Area=0.0005 sqm
flux = 400*10^-6; // Total Flux=400 uWb
B = flux/A;
disp (B,'The Flux Density in Tesla (T)')
|
b11200d8ec6c8cc036d4fc872cb9ca7277d40234 | 449d555969bfd7befe906877abab098c6e63a0e8 | /45/CH14/EX14.4/example_14_4.sce | bc824cc433770dd3fd888eb0233ef52bece22f44 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 266 | sce | example_14_4.sce | //example 14.4
clc;
clear;
v1 = input('Enter the value of V1 in volts :'); //part a : v1 =0 ; part b : v1 =5v
if (v1==0) then // checking for V1
disp('V2 = 5 V');
disp('I = 0 mA');
else
disp('V2 = 0 V');
disp('I = 0.5 mA ');
end
|
81a54cbc9f839dc012a1360252535fea3287428f | b9c6de66a61d6f9a57edaa44baf92266ccbab3db | /macros/distfun_poissstat.sci | 7d0bace5e05220d4467e237724e5fb56af4420f1 | [] | no_license | papriwalprateek/distfun-scilab | 81b3edef0af1d1908e05472dfb15b0a55f61571d | 82fd34521d1e6ebb6513773264b54a0d48f5f3f9 | refs/heads/master | 2016-09-03T07:08:47.605240 | 2013-10-13T05:53:43 | 2013-10-13T05:53:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,999 | sci | distfun_poissstat.sci | // Copyright (C) 2012 - Prateek Papriwal
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
function [M,V] = distfun_poissstat(lambda)
// Poisson mean and variance
//
// Calling Sequence
// M = distfun_poissstat(lambda)
// [M,V] = distfun_poissstat(lambda)
//
// Parameters
// lambda : a 1x1 or nxm matrix of doubles, the average rate of occurrence
// M : a matrix of doubles, the mean
// V : a matrix of doubles, the variance
//
// Description
// Computes statistics from the Poisson distribution.
//
// Any scalar input argument is expanded to a matrix of
// doubles of the same size as the other input arguments.
//
// The Mean and Variance of the Poisson Distribution are
//
//<latex>
//\begin{eqnarray}
// M &=& lambda \\
// V &=& lambda
//\end{eqnarray}
//</latex>
//
// Examples
// // Test with expanded lambda
//[m,v] = distfun_poissstat((1:6))
//me = [ 1 2 3 4 5 6 ];
//ve = [ 1 2 3 4 5 6 ];
//
// //Accuracy test
//lambda = [ 11 22 33 ];
//[M,V] = distfun_poissstat ( lambda )
//ve = [ 11 22 33 ];
//me = [ 11 22 33 ];
//
// Bibliography
// http://en.wikipedia.org/wiki/Poisson_distribution
//
// Authors
// Copyright (C) 2012 - Prateek Papriwal
//
[lhs,rhs] = argn()
apifun_checkrhs("distfun_poissstat",rhs,1)
apifun_checklhs("distfun_poissstat",lhs,1:2)
// Check type
//
apifun_checktype("distfun_poissstat",lambda,"lambda",1,"constant")
//Check content
//
apifun_checkgreq("distfun_poissstat",lambda,"lambda",1,1)
//
[lambda] = apifun_expandvar(lambda)
M = lambda
V = lambda
endfunction |
7d999d1c4f63d44d4672b6d65031dd38df04f6d6 | 7b7be9b58f50415293def4aa99ef5795e6394954 | /sim/cmd/test/man-propsenl.tst | b5eac4a9b7e782c6d5638eb9591eb8cd7015b1e4 | [] | no_license | sabualkaz/sim42 | 80d1174e4bc6ae14122f70c65e259a9a2472ad47 | 27b5afe75723c4e5414904710fa6425d5f27e13c | refs/heads/master | 2022-07-30T06:23:20.119353 | 2020-05-23T16:30:01 | 2020-05-23T16:30:01 | 265,842,394 | 0 | 0 | null | 2020-05-21T12:26:00 | 2020-05-21T12:26:00 | null | UTF-8 | Scilab | false | false | 707 | tst | man-propsenl.tst | #Property Sensor Example
$thermo = VirtualMaterials.Advanced_Peng-Robinson
/ -> $thermo
thermo + WATER TRIETHYLENE_GLYCOL
#generate WATER/TEG bubble temperature curve
units Field
s = Stream.Stream_Material()
s.In.P = 1 atm
s.In.VapFrac = 0.0
ps = Sensor.PropertySensor()
s.Out -> ps.In
ps.SignalType = H
s.In.Fraction = 0.0 1.0
s.Out.T
s.In.Fraction = 0.1 0.9
s.Out.T
s.In.Fraction = 0.2 0.8
s.Out.T
s.In.Fraction = 0.3 0.7
s.Out.T
s.In.Fraction = 0.4 0.6
s.Out.T
s.In.Fraction = 0.5 0.5
s.Out.T
s.In.Fraction = 0.6 0.4
s.Out.T
s.In.Fraction = 0.7 0.3
s.Out.T
s.In.Fraction = 0.8 0.2
s.Out.T
s.In.Fraction = 0.9 0.1
s.Out.T
s.In.Fraction = 1.0 0.0
s.Out.T
ps.Signal |
eb1f6dad9f75fdc5d357b2b8c52d5d3a89fdb4eb | 449d555969bfd7befe906877abab098c6e63a0e8 | /3718/CH15/EX15.2/Ex15_2.sce | 88f5060e4d8f33e969a8ea2e80225b8ea37e9756 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 443 | sce | Ex15_2.sce | //Chapter 15: Environmental Pollution and Control
//Problem: 2
clc;
//Declaration of Variables
v0 = 30 // cm cube, effluent
v1 = 9.8 // cm cube, K2Cr2O7
M = 0.001 // M, K2Cr2O7
// Solution
Oeff = 6 * 8 * v1 * M
mprintf("30 cm cube of effluent contains =:%.4f mg of O2\n",Oeff)
cod = Oeff * 1000 / 30.
mprintf(" 1l of the effluent requires %.2f mg of O2\n",cod)
mprintf(" COD of the effluent sample=%.2f ppm",cod)
|
4267cc9354d6783f06b9b7c3e4cc2a61e34ca3af | 449d555969bfd7befe906877abab098c6e63a0e8 | /29/CH7/EX7.24.4/exa7_24_4.sce | 256e283d5122afb27ab6b1d9c581aac3de0991f1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,322 | sce | exa7_24_4.sce | //caption:root_locus
//example 7.24.4
//page 301
clc;
s=%s;
syms K;
GH=K/(s*(s+4)*(s^2+4*s+13))
disp("the characterstics eq. is determined as:")
CH=(s*(s+4)*(s^2+4*s+13))+K
CH=sym('(s*(s+4)*(s^2+4*s+13))+K');
disp('=0',CH,"characterstics_eq,CH=")
c0=coeffs(CH,'s',0);
c1=coeffs(CH,'s',1);
c2=coeffs(CH,'s',2);
c3=coeffs(CH,'s',3);
c4=coeffs(CH,'s',4);
b=[c0 c1 c2 c3 c4 ]
routh=[b([5,3,1]);b([4,2]),0]
routh=[routh;-det(routh(1:2,1:2))/routh(2,1),routh(1,3),0]
routh(3,1)=simple(routh(3,1))
t=routh(2:3,1:2)
l=simple(-det(t)/t(2,1))
routh=[routh;l,0,0]
routh=[routh;K,0,0]
K=sym('(s*(s+4)*(s^2+4*s+13))')
d=diff(K,s)
e=(-4*s^3+24*s^2+58*s+52)
r=roots(e)
disp("since -2 lies on root locus so complex breakaway point is -2+i1.58 and -2-i1.58")
disp(routh,"routh=")
disp("for given system to be marginally stable:");
disp("((20-4K)/5)=0 ");
disp("which gives:");
disp("K=5");
K=5;
k=5
a=5*s^2+5//intersection of root locus with s plane
r=roots(a)
g=k/(s*(s+2)*(s^2+2*s+2))
G=syslin('c',g)
evans(g,200)
xgrid(2)
eq=(s*(s+4)*(s^2+4*s+13))
p=roots(eq)
disp(p,"open loop poles are:")
phi1=180-(atan(3/2)*180/%pi)
phi2=atan(3/2)*180/%pi
phi3=90
phi_p2=180-(phi1+phi2+phi3)
phi_p3=-phi_p2
disp(phi_p2,"angle of departure for -2+3i=")
disp(phi_p3,"angle of departure for -2-3i=")
|
83e5733cab42859be07b34b322dfb291e8e525d9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /174/CH2/EX2.1/example2_1.sce | 47673083ff3b855ef9e7462f8218175ef805d430 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 495 | sce | example2_1.sce | // To convert area in metre to feet
// Modern Electronic Instrumentation And Measurement Techniques
// By Albert D. Helfrick, William D. Cooper
// First Edition Second Impression, 2009
// Dorling Kindersly Pvt. Ltd. India
// Example 2-1 in Page 29
clear; clc; close;
// Given data
A_m = 5000; // area in metre^2 unit
//Calculation
A_ft = A_m * (1/0.3048)^2; // As 1ft = 0.3048m
printf("The area in feet = %d sq.ft",round(A_ft));
//Result
// The area in feet = 53820 sq.ft
|
f2ec6b7698fe5433755b0c596e33be92e9283e5b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3774/CH7/EX7.7/Ex7_7.sce | 8ec7ff5b30ed936735c0249dc5209459ca2e1938 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 522 | sce | Ex7_7.sce | // exa 7.7 Pg 208
clc;clear;close;
// Given Data
d=50;// mm
tau=42;// MPa
sigma_c=72;// MPa
printf('for key to be equally strong in shear & crushing - \n')
b=d/4;// mm
printf(' b= %.2f mm. Use b=15 mm.',b)
b=15;//mm
//2*b/t=sigma_c/tau for key to be equally strong in shear & crushing
t=2*b/(sigma_c/tau);// mm
printf('\n t=%.2f mm. Use t=20 mm',t)
l= %pi*d**2/8/b;// mm (for key to be equally strong in shear as shaft)
printf('\n for key to be equally strong in shear as shaft - \n')
printf(' l=%.2f mm. Use l=70 mm',l)
|
a8a6f9cb65e8e88681e82662e98934e7804fa2c6 | 8b478a8f9c9ebc5420d79a115b278c7aea7308af | /3rdparty/hdf4-4.2.14-win64/HDF4Examples/hdf/examples/GR/testfiles/h4ex_GR_image_info.tst | 44a9f8c3b7a75416b84491ba5102c884c4b0e2f9 | [
"LicenseRef-scancode-hdf4"
] | permissive | gzliyu/GF2 | 85e71cf298e8365b2f6a94a11ed664aa3f59a4c0 | f0edd69e47022d1d16fc5b0c370d6e607ac594b0 | refs/heads/master | 2023-02-21T11:03:55.830515 | 2021-01-08T06:13:33 | 2021-01-21T12:11:55 | 331,960,655 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 243 | tst | h4ex_GR_image_info.tst | RI# Name Components Type Interlace Dimensions Attributes
0 Image Array 1 2 Int16 MFGR_INTERLACE_PIXEL 10, 5 0
1 Image Array 2 3 Char8 MFGR_INTERLACE_PIXEL 6, 4 2
|
a67fb08f657a9ea618661f16f85365b2a8ed8a7c | 8781912fe931b72e88f06cb03f2a6e1e617f37fe | /matlab/plasma/particle_lorentz_field_trajectory_2.sce | d2dcd346072cbf5633cc144d014c968dc2a3e615 | [] | no_license | mikeg2105/matlab-old | fe216267968984e9fb0a0bdc4b9ab5a7dd6e306e | eac168097f9060b4787ee17e3a97f2099f8182c1 | refs/heads/master | 2021-05-01T07:58:19.274277 | 2018-02-11T22:09:18 | 2018-02-11T22:09:18 | 121,167,118 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,868 | sce | particle_lorentz_field_trajectory_2.sce | //Script to model influence of uniform e and b field
//on charged particle motion
clear();
exec('lorentz.sce');
m=1.6*(10^(-27));
q=1.6*(10^(-19));
dt=5.0*(10^(-9));
it=1:1:1000;
r=zeros(3,1);
v=zeros(3,1);
v(2,1)=1.0*(10^6);
b=zeros(3,1);
e=zeros(3,1);
//bfield in z direction
b(3,1)=0.1;
//efield in y direction
//e(2,1)=0.2;
//e(3,1)=10*(10^4);
ns=200;
labels=["v(1)";"v(2)";"v(3) "];
[ok,v(1,1),v(2,1),v(3,1)]=getvalue("define velocity values",labels,...
list("vec",1,"vec",1,"vec",1),["0.0";"1.0*(10^6)";"0.0"]);
iv=v;
labels=["b(1)";"b(2)";"b(3) "];
[ok,b(1,1),b(2,1),b(3,1)]=getvalue("define b field values",labels,...
list("vec",1,"vec",1,"vec",1),["0.0";"0.0";"0.1"]);
labels=["e(1)";"e(2)";"e(3) "];
[ok,e(1,1),e(2,1),e(3,1)]=getvalue("define e field values",labels,...
list("vec",1,"vec",1,"vec",1),["0.0";"0.0";"0.0"]);
ar=zeros(ns,3);
// xsetech([0,0,0.5,0.5]);
//elseif plotid==2 then
// xsetech([0.5,0.5,0.5,0.5]);
//elseif plotid==3 then
// xsetech([0.0,0.5,0.5,0.5]);
for it=2:1:ns
dv=lorentzf(q,m,v,e,b);
newv=v+dv*dt;
newr=r+v*dt;
v=newv;
r=newr;
ar(it,:)=r(1:3,1)';
end;
// title by default
text=x_dialog('Plot Title?','');
pictitle=sprintf("%s velocity %f %f %f bfield %f %f %f efield %f %f %f ",text,iv(1,1),iv(2,1),iv(3,1),b(1,1),b(2,1),b(3,1),e(1,1),e(2,1),e(3,1));
//pictitle=sprintf("%s ",text);
clf();
da=gda(); // get the handle on axes model to view and edit the fields
//da.title.text=pictitle;
da.title.text=pictitle;
param3d(ar(:,1),ar(:,2),ar(:,3),35,45,"X@Y@Z");
l1=list('Save plot?',2,['yes','no']);
saverep=x_choices('Save plot?',list(l1))
if saverep==1 then
graphicsfile=xgetfile("*.scg", title="Choose a graphics file name");
xsave(graphicsfile);
end;
|
69e366c810e4e80b3db12de49eddc8e9c3831f90 | 449d555969bfd7befe906877abab098c6e63a0e8 | /704/CH2/EX2.32/ex2_32.sce | e3f74b78efb9e0fe942303a211e5040d884157cf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,093 | sce | ex2_32.sce | //Caption:calculate the speed of a d.c. shunt generator when it running as d.c. motor and taking 50 KW power at 250 volt
//Exam:2.32
clc;
clear;
close;
//calculation when machine is running as generator
V=250;//applied voltage to d.c. shunt generator
P_1=50000;//power delivers by d.c. shunt generator at V_1
N_1=400;//generator running at V_1 ,P_1
R_a=0.02;//armature resistance(in Ohm)
R_sh=50;//field resistance(in Ohm)
I_l=P_1/V;//load current(in Amp)
I_sh=V/R_sh;//field current(in Amp)
I_a1=I_l+I_sh;//armature current when machine working as a generator(in Amp)
C_d=1;//contact drop (in volt per brush)
E_1=V+I_a1*R_a+2*C_d;//induced emf by machine when working as a generator(in V)
//calculation when machine is running as motor
I_a2=I_l-I_sh//armature current when machine working as a motor(in Amp)
E_2=V-I_a2*R_a-2*C_d;//induced emf by machine when working as a motor(in V)
N_2=(E_2/E_1)*N_1;//speed of the machine when running as shunt motor(in r.p.m.)
disp(N_2,'speed of the machine when running as shunt motor and taking 50 KW power at 250 volt(in r.p.m.)='); |
8222cb050ad683466f81a362165e720103c43a6c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2774/CH5/EX5.9/Ex5_9.sce | 1a4fc356aea443ba507fb363bb530c051be5edeb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,152 | sce | Ex5_9.sce | clc
// initialization of variables
T1=350+273 // initial temperature in kelvin
P1=1200 // initial pressure in kPa
P2=140 // final pressure in kPa
k=1.4 // polytopic index for air
//solution
// The values are taken from table E.1
Pr660=23.13// relative pressure @ 660K
Pr620=18.36// relative pressure @ 620K
Pr1=((Pr660-Pr620)*3/40)+Pr620 // relative pressure by interpolation
Pr2=Pr1*(P2/P1) // relative pressure at state 2
Pr340=2.149 // relative pressure @ 340K
Pr380=3.176 // relative pressure @ 380K
T2=((Pr2-Pr340)/(Pr380-Pr340))*40+340 // interpolating final temperature from table E.1
// now interpolating u1 AND u2 from table E.1
u620=451.0// specific internal energy @ 620k
u660=481.0// specific internal energy @ 660k
u1=(u660-u620)*(3/40)+u620 // initial internal energy
u380=271.7 //specific internal energy @ 380k
u340=242.8 //specific internal energy @ 340k
u2=((Pr2-Pr340)/(Pr380-Pr340))*(u380-u340)+u340 // final internal energy
w=u2-u1 // work= change in internal energy
printf(" The work done by gas is %.0f kJ/kg",w)
// The answer is slightly different as values are approximated in textbook
|
6c5cead49e5a02f4dcfc20f142721427baf05726 | fdc5047b7bf8122bad1e621df236b0481226c36e | /virtualHartSci/macros/hrtTypeHex2UInt.sci | 98150716fcbb1ed748c109fde517ac00b6603bfe | [] | no_license | jpbevila/virtualHartSci | aea3c6ba23d054670eb193f441ea7de982b531cc | a3f5be6041d230bd9f0fd67e5d7efa71f41cfca5 | refs/heads/main | 2023-07-26T23:05:28.044194 | 2021-09-09T11:50:59 | 2021-09-09T11:50:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 138 | sci | hrtTypeHex2UInt.sci | function result=hrtTypeHex2UInt(strUInt)
number = hex2dec(tokens(strUInt,' '));
result = number(1)*256+number(2);
endfunction
|
6de6ff838655de7ceb78ea316a6afe06fb225d28 | 7df66d80cfee8664f45a7ffd8f571279ce0828b8 | /Laboratorios/Lab Funciones/1d-get_Edad.tst | d37039fd692275d1563e85ba23db20a4e070e76c | [] | no_license | untxi/basesdatos | 31154c4dc853368955ad9fd4f54ea77e55aaed54 | 3ba1ec0d60ef961c70c6824560dab5732ee5dde1 | refs/heads/master | 2021-08-11T21:13:51.658562 | 2021-08-10T20:11:06 | 2021-08-10T20:11:06 | 122,225,841 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 181 | tst | 1d-get_Edad.tst | PL/SQL Developer Test script 3.0
10
declare
--local variables
e_id number :=6;
v_f number;
BEGIN
v_f := get_Edad(e_id);
dbms_output.put_line(v_f);
End;
0
0
|
b1bcd1d6ec525e33d4bfb21f488fde3c4854badd | 449d555969bfd7befe906877abab098c6e63a0e8 | /683/CH8/EX8.10/S8_10.sce | b6de6bf6db0bd07321cb55613b749ca14284086c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 778 | sce | S8_10.sce | // sum 8-10
clc;
clear;
A=1783;
m=0.190;
d=1.5;
D=15;
M=300;
E=20800;
k=30;
//sigult= ultimate strength of the material
// sigy= yield strength of the material
sigult=A/(d^m);
sigy=0.7*sigult;
//siga= allowable yield strength of the material
siga=sigy/2;
C=D/d;
Ki=(4*(C^2)-C-1)/(4*C*(C-1));
Z=%pi*(d^3)/32;
//sigb=bending strength of the material;
sigb=Ki*M/Z;
while (sigb>=siga)
d=d+0.15;
D=15;
C=D/d;
sigult=A/(d^m);
sigy=0.7*sigult;
siga=sigy/2;
Ki=(4*(C^2)-C-1)/(4*C*(C-1));
Z=%pi*(d^3)/32;
sigb=Ki*M/Z;
end
d=2;// rounding off the value of the diameter.
D;
Na=(d^4)*E/(64*D*k);
// printing data in scilab o/p window
printf("d is %0.1f mm ",d);
printf("\n D is %0.1f mm ",D);
printf("\n Na is %0.2f mm ",Na); |
41bf0b6016fc3769d9e84d02c42d17fea87e7a59 | 01ecab2f6eeeff384acae2c4861aa9ad1b3f6861 | /xcos_blocks/ota_c.sci | 9dbe0c044e4a65df59be324a2086212b604986c6 | [] | no_license | jhasler/rasp30 | 9a7c2431d56c879a18b50c2d43e487d413ceccb0 | 3612de44eaa10babd7298d2e0a7cddf4a4b761f6 | refs/heads/master | 2023-05-25T08:21:31.003675 | 2023-05-11T16:19:59 | 2023-05-11T16:19:59 | 62,917,238 | 3 | 3 | null | null | null | null | UTF-8 | Scilab | false | false | 170 | sci | ota_c.sci | function block=ota_c(block,flag)
if flag==1
block.outptr(1)=block.x(1)
elseif flag==0
block.xd(1)=tanh((block.inptr(1)(1)-block.x(1)))/block.rpar;
end
endfunction
|
e502b2d2193f5aa12fc39f4ee1fd8d3a5061afd9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /824/CH13/EX13.8/13_8.sce | f6a9b529873afdc52e2de23057e55aed521b7ea1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 607 | sce | 13_8.sce | //clear//
clc
clear
k=0.1
cao=8;
z0=0;
z = 0:1:200;
function w=f(z,x)
w =zeros(1,1);
lam=200-z;
ca=cao*(1-x)
E1=4.44658e-10*(lam^4)-1.1802e-7*(lam^3)+1.35358e-5*(lam^2)-.00086
5652*lam+.028004;
E2=-2.64e-9*(lam^3)+1.3618e-6*(lam^2)-.00024069*lam+.015011
F1=4.44658e-10/5*(lam^5)-1.1802e-7/4*lam^4+1.35358e-5/3*lam^3-.000865652/2*lam^2+.028004*lam;
F2=-(-9.3076e-8*lam^3+5.02846e-5*lam^2-.00941*lam+.61823-1)
ra=-k*ca^2;
if lam< =70
E=E1
else
E=(E2)
end
if(lam< =70)
F=F1
else
F=F2
end
EF=E/(1-F)
w(1)=-(ra/cao+E/(1-F)*x)
endfunction
X=ode([0],z0,z,f);
plot2d(z,X); |
6d4b44f563bf636dd80875d7efe36a49d4f85443 | 0592c9e4cfbb77a0755aff6f0c798d9fe31f6ff4 | /scilab/CDO_Pricer/nsp2/product.sci | 1349a0daa4d7be6e9d6dc56c9b032f5e7e5fc23c | [] | no_license | FinancialEngineerLab/premia-13-cpp_FICC | e19caa6a9cadb4ad1361053efc0dfc9418071cf9 | e271da627dbfc8c2c1f7e9f700766544f64c72b2 | refs/heads/master | 2023-03-16T11:11:26.830681 | 2016-04-19T05:58:16 | 2016-04-19T05:58:16 | null | 0 | 0 | null | null | null | null | ISO-8859-1 | Scilab | false | false | 784 | sci | product.sci | prod_txt = ['No companies';'Nominal';'Maturité';'Fréquence';'Tranche(s)'];
if exists('product') && size(product,'*')==5 then
prod_def = product;
else
prod_def = ['100';'0.01';'5';'0.25';'[0;0.03;0.06;0.1;1]'];
end;
prod_def = ['100';'0.01';'5';'0.25';'[0;0.03;0.06;0.1;1]'];
product = x_mdialog('Produit', prod_txt, prod_def);
if (product == []) then
product = prod_def;
abort;
else
n_comp = evstr(product(1));
test_nom = execstr('evstr(product(2))',errcatch=%t);
if ~test_nom then
nominal = read(product(2), n_comp, 1);
else
nominal = evstr(product(2));
end;
if (size(nominal,'*') == 1) then nominal=nominal*ones(n_comp,1); end;
dates = [evstr(product(4)):evstr(product(4)):evstr(product(3))]';
tranches = evstr(product(5));
end;
|
9a00071c53a069083adfca0d28d0e12ea254fec7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2855/CH2/EX2.6/Ex2_6.sce | 362059728d0edd127b33a090bf632ceecad1beba | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 616 | sce | Ex2_6.sce |
//Chapter 2
//page no 56
//given
clc;
clear ;
Is=0.12; //in pAmp
V=0.6; //in V
T=293; //in Kelvin
k=1.38*10^-23; //Boltzmann's Constant in J/K
q=1.6*10^-19; // charge of electron in C
Vt=k*T/q; //thermal voltage
printf("\n VT(20 deg Cel) is %0.5f V \n",Vt);//result in book is misprint
T1=373; //in Kelvin
n=1.25;
Vt1=k*T1/q; //thermal voltage
printf("\n VT(100 deg Cel) is %0.5f V \n",Vt1);
I=Is*(exp(V/(n*Vt1))-1); //forward biasing current in mircoA
printf("\n I(100 deg Cel) is %0.2f microA \n",I/10^6);//result
|
93e53856839391db00f61da6c0b9d8935a770f8f | d465fcea94a1198464d7f8a912244e8a6dcf41f9 | /system/kiks_gui_getsenslistbox.sci | 6231b2e6dce0733014f9a2f3900970bb82d7d95f | [] | no_license | manasdas17/kiks-scilab | 4f4064ed7619cad9e2117a6c0040a51056c938ee | 37dc68914547c9d0f423008d44e973ba296de67b | refs/heads/master | 2021-01-15T14:18:21.918789 | 2009-05-11T05:43:11 | 2009-05-11T05:43:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 813 | sci | kiks_gui_getsenslistbox.sci | function [] = kiks_gui_getsenslistbox()
// Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
// -----------------------------------------------------
// (c) 2000-2004 Theodor Storm <theodor@tstorm.se>
// http://www.tstorm.se
// -----------------------------------------------------
global("KIKS_GUI_HDL","KIKS_SENS_LIST","KIKS_PROX_ACCURACY");
// !! L.9: Matlab function findobj not yet converted, original calling sequence used
// L.9: Name conflict: function name changed from findobj to %findobj
h = %findobj(KIKS_GUI_HDL,"Tag","proxsens_popup");
// !! L.10: Matlab function get not yet converted, original calling sequence used
// L.10: Name conflict: function name changed from get to %get
nr = %get(h,"Value");
KIKS_PROX_ACCURACY = mtlb_e(KIKS_SENS_LIST,nr);
endfunction
|
7173fba40b8cbcb0d4545e1a722d2f57683bbb13 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3760/CH6/EX6.43/Ex6_43.sce | 449e68d60184d191aca036606f14d45416965b5e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 738 | sce | Ex6_43.sce | clc;
p=10000; // rated power of SCIM
v=420; // rated voltage of SCIM
p=4; // number of poles
f=50; // frequency of SCIM
// results of blocked rotor test
vb=210; // applied voltage
ib=20; // applied current
pb=5000; // power dissipated
l=300; // stator core loss
rs=0.6; // dc stator resistance
m=3; // number of phases
R=(rs*3)/2; // per phase stator resistance
Rs=1.2*R; // Effective stator resistance per phase
pi=pb*(v/vb)^2; // power input at rated voltage during block rotor test
is=ib*(v/vb); // stator current at rated voltage during block rotor test
pg=pi-m*(is/sqrt(3))^2*Rs-l; // air gap power
ws=(4*%pi*f)/p;
printf('synchronous speed is %f rad/sec\n',ws);
T=pg/ws;
printf('Starting torque is %f Nm',T);
|
ea1aec8a415c363e0652f28e9d16a15c5076d1e3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1847/CH4/EX4.26/Ch04Ex26.sce | 2c2ecda1a1253f105d5604e713d4717de878570e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 653 | sce | Ch04Ex26.sce | // Scilab Code Ex4.26:: Page-4.42 (2009)
clc; clear;
lambda = 6600e-010; // Wavelength of circularly polarized light, cm
mu_R = 1.53914; // Refractive index of right-handed circularly polarized light
mu_L = 1.53920; // Refractive index of left-handed circularly polarized light
t = 0.0005; // Thickness of polarimeter plate, m
theta = %pi/lambda*(mu_L-mu_R)*t; // Angle of rotation produced by the polarimeter plate, radian
printf("\nThe angle of rotation produced by the polarimeter plate = %4.2f degrees", theta*180/%pi);
// Result
// The angle of rotation produced by the polarimeter plate = 8.18 degrees
|
9d3f3fa9cb43a8c6397859000bb355cda387c6f2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2789/CH13/EX13.3/Ex13_3.sce | 8cbd73d97f80ce13b6fdf583cfb831d8825edb15 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 738 | sce | Ex13_3.sce | clear;
clc;
//page no. 524
c = 6;//ft
b = 36;//ft
AR1 = 6;//aspect ratio
Cd = 0.0543;//drag coefficient
Cl = 0.960;//lift coefficient
alpha1 = 7.2;//degrees
AR2 = 8;
//for aspect ratio = 8
CL = 0.960;//negligible change of lift coefficient
//for aspect ratio = 6
C_Di = Cl^2 /(%pi*AR1);
//for aspect ratio = infinity
C_D0 = Cd - C_Di;
//for AR = 8
C_D = C_D0 + Cl^2 /(%pi*AR2);
//for AR = 6
alpha_i = (180/%pi)*Cl/(%pi*AR1);
//for AR = infinty
alpha_0 = alpha1 - alpha_i;
//for AR = 8
alpha = alpha_0 + Cl/(AR2*%pi) *(360/(2*%pi));
printf('Lift coefficient = %.3f (negligible change of lift coefficient)',CL);
printf('\n Drag coefficient = %.4f',C_D);
printf('\n Angle of attack = %.1f degress',alpha);
|
ffae9ac1f4641aa3f08d98d12fd38b98ac196a19 | 449d555969bfd7befe906877abab098c6e63a0e8 | /29/CH12/EX12.49/exa12_49.sce | eb8e50b864af5acc216bd3d798aa4f7a0567678d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 601 | sce | exa12_49.sce | //caption:root_locus_and_value_of_K
//example 12.49
//page 576
s=%s;
syms K;
GH=(K*(s+4))/(s+2)^2
disp("the characterstics eq. is determined as:")
CH=(s+2)^2+(K*(s+4))
CH=sym('((s+2)^2)+K*(s+4)');
disp('=0',CH,"characterstics_eq,CH=")
K=sym('((s+2)^2/(s+4))')
d=diff(K,s)
e=(s+2)*(s+6)
r1=roots(e)
disp(r1,"roots=")
disp("-2 and -6 is break away point")
g=(s+4)/((s+2)^2)
G=syslin('c',g)
clf();
evans(g,10)
xgrid(2)
disp("for wd=2rad/sec,the point on root locus is s=-4+j2")
disp("the value of K at s=-4+j2 is 4")
K=4
k=4
g=k*(s+4)/((s+2)^2)
cl=g/(1+g)
disp(cl,"C(s)/R(s)=") |
bc67f84f4a35cefe1ab26165c38c24f6d5281422 | 037362195179268c71b89f6485fb796c82311d07 | /Integration Approach/jupyter_test.sce | 8407c6b55dc3fc3b6b78dda27eb787faa7263c14 | [] | no_license | SoumitraAgarwal/machine-learning-Toolbox-SCILAB | 34a6884fd0138548955e836836181df0c8169ab1 | ef4dc44a9676a2b63e8c8fa0ce7c0452a98b44fa | refs/heads/master | 2020-03-15T03:59:52.960122 | 2017-08-28T16:36:20 | 2017-08-28T16:36:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 293 | sce | jupyter_test.sce | pyImport jupyter_client
py = pyBuiltin()
jc = jupyter_client
km = jc.KernelManager()
km.start_kernel()
cmd = ("a =1")
c = km.client()
msg_id = c.execute(cmd)
state =''
c.start_channels()
msg = c.get_iopub_msg(timeout =1)
py.print('')
py.print(msg)
km.shutdown_kernel()
|
d951e1fb6128c67a28b371a607a308832d81075f | 6e257f133dd8984b578f3c9fd3f269eabc0750be | /ScilabFromTheoryToPractice/penduleelastique.sce | 82787a175455bb8f2368f1bded865b4b35f026d7 | [] | 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 | 5,331 | sce | penduleelastique.sce | //********************************************************
// animation d'un pendule élastique
//********************************************************
// fonction pour créer la matrice de rotation
function M=rot(a)
M=[cos(a),sin(a);-sin(a),cos(a)];
endfunction
// quelques constantes
n=40; // nombre de spires du ressort
T=5; // durée de la simulation
g=9.81; // g (gravitation)
k=10; // k (raideur du ressort)
dt=0.01; // dt (pas de temps)
//********************************************************
// lancement de l'affichage
//********************************************************
// titre de la fenêtre
xtitle("(clic gauche pour démarrer l''animation, clic droit pour arrêter)")
// page de titre (en LaTeX)
titlepage(["résolution numérique d''une EDO le pendule à ressort : ";
" ";
"$$\Large r{d^2\over dt^2}a+2{d\over dt}r \times {d\over dt}a=g\times \sin(a)$$";
" ";
"$$\Large {d^2\over dt^2}r-{k\over m}(r-r_0)=r\left({d\over dt} a\right)^2+g\times \cos(a)$$";
" ";
" avec les conditions initiales : ";
"$$\Large a(0)=? \;\;\;\;\;\; {d\over dt}a(0)=0 \;\;\;\;\;\; r(0)=r_0=? \;\;\;\;\;\; {d\over dt}r(0)=0 $$"])
//********************************************************
// traitement des interactions avec la fenêtre graphique
//********************************************************
[c_i,c_x,c_y,c_w]=xclick(); // attente d'un clic de souris dans la fenêtre
while (c_i<>2)&(c_i<>5) // tant qu'on n'a pas fait un clic droit
clf() //effacer la fenêtre
//********************************************************
// récupération des données initiales de l'animation
//********************************************************
// titre de la fenêtre
xtitle("(un click pour initialiser la position du pendule, a(0) et r(0) )")
// paramétrage du handle Axes de la fenêtre
plot(0,0,'.k');A=gca();A.x_location="origin";A.y_location="origin";
A.auto_scale="off";A.isoview="on";A.data_bounds=[-1 -1; 1,0];xgrid(3)
//récupération des coordonnées de la position initiale du pendule
[c_i,x,y,c_w]=xclick();
// calcul des données initiales
a=sign(x)*abs(atan(x/y));a0=a;da=0; // calcul de l'angle a(0)
l=sqrt(x^2+y^2);r=l;,dr=0; // calcul de r(0)
//adapter la taille de la fenêtre à la taille maximale du pendule
A.data_bounds=[-1.5,-max(4*l,4);1.5,max(l,0.5)];
//********************************************************
// boucle créant l'animation
//********************************************************
for t=0:dt:T
//********************************************************
// calcul des nouvelles positions
//********************************************************
// résolution des équations différentielles sur a et r par la méthode d'Euler
dda=-(g*sin(a)+2*dr*da)/r;
ddr=r*(da)^2-k*(r-l)+g*cos(a);
da=da+dt*dda;
dr=dr+dt*ddr;
a=a+dt*da;
r=r+dt*dr;
// calcul de la ligne traçant le ressort
ressortr=linspace(0,r,n)'; // étirement du ressort
ressorta=[0;(-1).^[0:n-3]';0]*(l/10); // coordonnées transversales à l'axe du ressort -> /\/\/\
//rotation de l'image du ressort selon l'angle a
x=[x;r*sin(a)];
y=[y;-r*cos(a)];
M=-rot(-a);
N=[ressortr,ressorta]*M;
ressorty=N(:,1);ressortx=N(:,2);
//********************************************************
// affichage du pendule
//********************************************************
drawlater() // écriture dans le buffer graphique
clf() // effacer la fenêtre
plot(ressortx,ressorty) // affichage du ressort du pendule
xstring(0,0.1,["t=" string(t)]) // temps écoulé
xfarc(r*sin(a)-0.05,-r*cos(a)+0.05,0.1,0.1,0,360*64) // la boule du prendule
// redimensionnement de la fenêtre graphique
A=gca();A.data_bounds=[-1.5,-max(4*l,4);1.5,max(l,0.5)];
A.auto_scale="off";A.isoview="on";A.axes_visible=["off" "off" "off"];
drawnow() // afficher le buffer graphique
sleep(10); // delai d'affichage
end
//***********************************************************
// choix d'une nouvelle animation ou d'une sortie du script
//***********************************************************
xtitle("(un clic pour continuer )") // titre de la fenêtre
plot(x,y,'-r') // affichage trajectoire
A=gca();A.isoview="on";xgrid(3); // afficher une grille (verte)
[c_i,x,y,c_w]=xclick(); // attente d'un clic de souris dans la fenêtre graphique
clf(); // choix d'une nouvelle action
xtitle("(clic gauche pour démarrer l''animation, clic droit pour arrêter)")
plot(0,0,'.k');A=gca();A.x_location="origin";A.y_location="origin";
[c_i,x,y,c_w]=xclick(); //attente d'un clic de souris dans la fenêtre
end
|
4adc5a226b41bbd1fe5198fe93e7c9569b247657 | 449d555969bfd7befe906877abab098c6e63a0e8 | /539/CH21/EX21.2/Example_21_2.sce | 6a53cce94c713db1e9ac9720cd03d484a034c739 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 385 | sce | Example_21_2.sce | //Velocity of light in diamond
clear;
clc;
printf("\tExample 21.2\n");
er=5.5; //Relative permitivity
xm=-2.17D-5; //Magnetic Suseptibility
eo=8.85D-12; //Permitivity in free space
uo=4*%pi*10^-7; //Permeability
e=er*eo;
u=uo*(1+xm);
v=1/sqrt(u*e);
printf("\nVelocity in diamond is %.2e m/s\n",v);
//End |
14471dd4607c967c439577ac5323b2166057f7fe | 364f7d17c4f024c39c47c99bda284bacb913d470 | /macros/exposure.sci | b73f344fa087d51b55791b550abd047a5f3aebe1 | [] | no_license | msharsha/FOSSEE-Image-Processing-Toolbox | 6ce7bafc187b99b9e01d1eedcc09a11c3a80370d | f8b16bc3329f9186a3b362f29d9a40d20b48cfd4 | refs/heads/master | 2020-12-02T07:55:57.553927 | 2017-07-10T07:41:21 | 2017-07-10T07:41:21 | 96,747,260 | 0 | 0 | null | 2017-07-10T07:14:37 | 2017-07-10T07:14:37 | null | UTF-8 | Scilab | false | false | 2,949 | sci | exposure.sci | // Copyright (C) 2015 - IIT Bombay - FOSSEE
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Author: Manoj Sree Harsha
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
function x = exposure(algo_type,img_index,varargin)
//Compensate exposure in the specified image.
//
//Calling Sequence
//stacksize('max')
//image1=imread('path of the image file')
//image2=imread('path of the image file')
//y = exposure(algo_type,img_index,image1,image2)
//image3=imread('path of the image file')
//y = exposure(algo_type,img_index,image1,image2,image3)
//image4=imread('path of the image file')
//y = exposure(algo_type,img_index,image1,image2,image3,image4)
//image5=imread('path of the image file')
//y = exposure(algo_type,img_index,image1,image2,image3,image4,image5)
//image6=imread('path of the image file')
//y = exposure(algo_type,img_index,image1,image2,image3,image4,image6)
//
//Parameters
//algo_type : an integer between 1 and 3 (both inclusive) specifying the algorithm to be used for exposure compensation.
//img_index : index of the image on which exposure compensator will be applied
//image1 : an image
//image2 : an image
//image3 : an image
//image4 : an image
//image5 : an image
//image6 : an image
//
//Description
//y = exposure(algo_type,img_index,image1,image2) returns an image whose exposure is compensated.
//Features are extracted from each image and matching is done on two consecutive images to ensure the continuity in images.
//After this camera parameters are estimated which is required to do particular type of warping.
//After warping is done exposure is compensated in an image whose index is mentioned.
//
//Examples
//a=imread('images/lenahi.jpg');
//b=imread('images/lenalow.jpg');
//algo_type=1;
//img_index=1;
//y=exposure(algo_type,img_index,a,b);
//imshow(y)
//Authors
// Manoj Sree Harsha
[lhs rhs]=argn(0)
if rhs<4
error(msprintf("Function need atleast 4 arguments"))
elseif rhs>8
error(msprintf("Too many input arguments,max. no of arguments is 8"))
end
for i=1:(rhs-2)
varargin(i)=mattolist(varargin(i))
end
if rhs==4
y=raw_exposure(algo_type,img_index,varargin(1),varargin(2));
elseif rhs==5
y=raw_exposure(algo_type,img_index,varargin(1),varargin(2),varargin(3));
elseif rhs==6
y=raw_exposure(algo_type,img_index,varargin(1),varargin(2),varargin(3),varargin(4));
elseif rhs==7
y=raw_exposure(algo_type,img_index,varargin(1),varargin(2),varargin(3),varargin(4),varargin(5));
elseif rhs==8
y=raw_exposure(algo_type,img_index,varargin(1),varargin(2),varargin(3),varargin(4),varargin(5),varargin(6));
end
channels = size(y)
for i = 1:channels
x(:, :, i) = (y(i))
end
x=double(x);
endfunction
|
e749d906b5cb629acde17ee857846d3e5776d2e7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1484/CH7/EX7.9/7_9.sce | ece524ab555719507b0a6a7cb32a26dd17055282 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 231 | sce | 7_9.sce | clc
//initialisation of variables
i= 1/1000
d= 4 //ft
C= 125
k= 0.95
o= 5.372
//CALCULATIONS
h= k*d
A= d^2*(o-sind(o*180/%pi))/8
P= (d/2)*o
m= A/P
V= C*sqrt(m*i)
Q= V*A
//RESULTS
printf ('Discharge= %.2f cuses',Q)
|
466444a291b33518015f028c084036fd27ce3347 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3161/CH4/EX4.4/Ex4_4.sce | c73555910c52a4120c73afdf129fbcafc2180856 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,348 | sce | Ex4_4.sce | clc;
//page 208
//problem 4.4
//Given modulating signal m(t) = 2*sin(2*pi*(10^3)*t), B for phase modulation Bp = 10 & for fequency modulation Bf = 10
Bp = 10
Bf = 10
//So Amplitude of modulating signal is Am=2 metres
Am = 2
//Frequency of modulating signal is fm = 1000 hertz
fm=1000
//Bandwidth = 2*(1+B)*fm
//Bandwidth for phase modulation with modulating signal m(t) is bw_pm = 2*(1+Bp)*fm
bw_pm = 2*(1+10)*1000
//Bandwidth for frequency modulation with modulating signal m(t) is bw_fm = 2*(1+Bf)*fm
bw_fm = 2*(1+10)*1000
disp('Bandwidth for phase modulation '+string(bw_pm)+' Hz')
disp('Bandwidth for frequency modulation '+string(bw_fm)+' Hz')
//Bandwidth for phase & frequency modulation if frequency of modulating signal is doubled i.e fm = 2000 hertz
//Bp & Bf after frequency of modulating signal is doubled
//Bp = kp*Am, observing the equation as there is no change in amplitude Bp = 10
Bp = 10
//Bf = kf*Am/fm, observing the equation as there is change in frequency Bf = 10/2 = 5
Bf = 5
//Bandwidth for phase modulation if frequency of modulating signal is doubled is bw_double_pm = 2*(1+Bp)*fm
bw_double_pm = 2*(1+10)*2000
//Bandwidth for frequency modulation if frequency of modulating signal is doubled is bw_double_fm = 2*(1+Bf)*fm
bw_double_fm = 2*(1+5)*2000
disp('Bandwidth for phase modulation for doubled frequency '+string(bw_double_pm)+' Hz')
disp('bandwidth for frequency modulation for doubled frequency '+string(bw_double_fm)+' Hz')
//Bandwidth for phase & frequency modulation if amplitude of modulating signal is halfed i.e Am = 1 metre
//Bp & Bf after amplitude of modulating signal is halfed
//Bp = kp*Am, observing the equation as there is change in amplitude Bp = 10/2 = 5
Bp = 5
//Bf = kf*Am/fm, observing the equation as there is change in amplitude Bf = 5/2 = 2.5
Bf = 2.5
//Bandwidth for phase modulation if frequency of modulating signal is doubled is bw_halfed_pm = 2*(1+Bp)*fm
bw_halfed_pm = 2*(1+5)*2000
//Bandwidth for frequency modulation if frequency of modulating signal is doubled is bw_halfed_fm = 2*(1+Bf)*fm
bw_halfed_fm = 2*(1+2.5)*2000
disp('Bandwidth for phase modulation for halfed amplitude '+string(bw_halfed_pm)+' Hz')
disp('Bandwidth for frequency modulation for halfed amplitude '+string(bw_halfed_fm)+' Hz')
|
69186fcb3461b05b07e999d667f6452ba4e4fe6e | 449d555969bfd7befe906877abab098c6e63a0e8 | /3720/CH12/EX12.16/Ex12_16.sce | f2bb05977c4111419a4dd18fc249d4500926772d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,193 | sce | Ex12_16.sce | //Example 12_16
clc;clear;
// Given values
D=3/100;// Diameter in m
P_1=150;// kPa
T_1=300;// K
Ma_1=0.4;// Mach number
// Properties
k=1.4;// Specific heat ratio
C_p=1.005;// kJ/kg.K
R=0.287;// kJ/kg.K
nu=1.58*10^-5;//Kinematic viscosity in m^2/s
// Calculation
c_1=sqrt(k*R*T_1*1000);// m/s
V_1=Ma_1*c_1;// Mach number
Re_1=(V_1*D)/nu;// The inlet Reynolds number
// The friction factor is determined from the Colebrook equation,
function[X]=frictionfactor(y)
X(1)=real(-(2.0*log10((0/3.7)+(2.51/((Re_1)*sqrt(y(1)))))))-(1/sqrt(y(1)));
endfunction
y=[0.01];
z=fsolve(y,frictionfactor);
f=z(1);
// The Fanno flow functions corresponding to the inlet Mach number of 0.4,From Table A-16
P_0r=1.5901;// (P_0r=P_01/P_0*)
T_r=1.1628;// (T_1r=T_1/T*)
P_r=2.6958;// (P_1r=P_1/P*)
V_r=0.4313;// (V_1r=V_1/V*)
fL_D=2.3085;
L_1=((fL_D*D)/f);// m
T_c=T_1/T_r;// K
P_c=P_1/P_r;// kPa
V_c=V_1/V_r;// m/s
P_01L=(1-(1/P_0r))*100;
printf('\nThe duct length=%0.2f m \nThe temperature at exit=%0.0f K \nThe pressure at exit=%0.1f kPa \nThe velocity at exit=%0.0f m/s \nThe percentage of stagnation pressure lost in the duct=%0.1f percentage',L_1,T_c,P_c,V_c,P_01L);
|
caa48d1cf4f8aca0a24bebdaba2b984abc399881 | 449d555969bfd7befe906877abab098c6e63a0e8 | /991/CH16/EX16.12/Example16_12.sce | 20ade3f3d64e0c9b1f1c0990037928db7cc2334f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Example16_12.sce | //Example 16.12.
clc
format(5)
t=1/(100*10^3) // in seconds
x1=t*10^6 // in us
disp(x1,"The period of oscillation is, T(us) = 1/f =")
disp(" T1 = 2us (given)")
t2=10-2 // in us
disp(t2,"Hence, T2(us) = T - T1 =")
disp(" T1 = 0.693*R1C1")
c1=(2*10^-6)/(0.693*(20*10^3)) // in faraday
x1=c1*10^12 // in pF
disp(x1,"Therefore, C1(pF) = T1 / 0.693R1 =") //answer in textbook is wrong
c2=(8*10^-6)/(0.693*(20*10^3)) // in faraday
x1=c2*10^12 // in pF
disp(" T2 = 0.693*R2*C2") //answer in textbook is wrong
disp(x1,"Therefore, C2(pF) = T2 / 0.693R2 =") |
2765c5b2ecdc1ed4cf095c094ebdaaecdbd77c20 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2855/CH1/EX1.17/Ex1_17.sce | 6c14e84b304d7f23405aabb8bc370cdb528e8887 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 592 | sce | Ex1_17.sce |
//page no. 31
//Example no 1-17
clc;
clear all;
disp('Solution (i) is ');
l=0.045;//wavelength in nm
h=6.63*10^-34; //planks constant in J/s
c=3*10^8; //speed of light in m/s
E=h*c/l/10^-9; //energy of photon in eV
mprintf("\n E = %e J",E);
E1=E/(1.6*10^-19); // energy in joule
mprintf("\n E = %e eV",E1);
e=1.6*10^-19; // charge of electron
disp('Solution (ii) is ');
V=E/e;
printf("\n Required voltage is = %0.2f KV",V/1000);// result
// Value of wavelenght in problem is .45 but in the solution is .045
//the value considered above is .045
|
07c8584d405f45c0f2de4ced8db7d87da81aeefd | fd6e45f66c41ad779a3d47c3bf8ebfa140d3d657 | /P7 - Interpolation and function approximation/newton.sce | 532dad54588f16efed0367baba784d13d31d2b78 | [] | no_license | jere1882/Numerical-Analysis-Assignments | 7f474e2020d010f9f9c3dceff5e48c03b0d38652 | 1074f92ca93d0a402259f92a0f61f105f25e5230 | refs/heads/master | 2021-09-06T20:00:36.411386 | 2018-02-10T18:04:38 | 2018-02-10T18:04:38 | 121,039,769 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 515 | sce | newton.sce | //METODO DE NEWTON
//X vector fila con los puntos a interpolar
//Y vector fila con f(X)=Y
function N = newton(X, Y)
n = length(X);
d = zeros(n, n);
d(:, 1) = Y';
for j=2:n
for k=j:n
d(k, j) = (d(k, j-1) - d(k-1, j-1))/(X(k) - X(k-j+1));
end
end
N = d(1, 1);
for i=2:n
N = N + d(i, i) * poly(X(1:i-1), "x");
end
endfunction
//function y = f(x)
// y = horner(N, x);
//endfunction
//x = min(X):(max(X)-min(X))/100:max(X);
//plot(X, Y, '*r');
//fplot2d(x, f); //o plot(x, f(x))
|
8a340d26b30729f36e90398a4fcc9f45ba648be7 | afcf746e249b9463101019f07a47845355c6acc2 | /starter_files/project/task2/LShift.tst | 572b6e4926482d38528e84a8d9245350ab715d7f | [] | no_license | jyuan2pace/CS506 | afca44ee8df14436d72de97e658a61841091e651 | fa80d2786f006c226c6e6413ee23fe306d6c57d0 | refs/heads/master | 2020-07-28T13:04:37.077116 | 2019-11-24T20:15:20 | 2019-11-24T20:15:20 | 209,419,478 | 8 | 11 | null | null | null | null | UTF-8 | Scilab | false | false | 346 | tst | LShift.tst | load LShift.hdl,
output-file LShift.out,
compare-to LShift.cmp,
output-list in%D1.16.1 out%D1.16.1;
set in 1,
eval,
output;
set in -1,
eval,
output;
set in 2,
eval,
output;
set in -2,
eval,
output;
set in %X8000,
eval,
output;
set in 256,
eval,
output;
set in -256,
eval,
output;
set in %XFFF0,
eval,
output;
|
0ddcda39d64ec3b50d535bdd0d8f229897c8325f | 449d555969bfd7befe906877abab098c6e63a0e8 | /405/CH1/EX1.2/1_2.sce | 0f44806dacc9f4eb6f5cc9e67f98cc22ce40d9c5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 524 | sce | 1_2.sce | clear;
clc;
printf("\t\t\tExample Number 1.2\n\n\n");
// convection calculation
// illustration1.2
// solution
Twall = 250;//[degree celsius] wall temperature
Tair = 20;//[degree celsius] air temperature
h = 25;//[W/square meter] heat transfer coefficient
l = 75*10^(-2);//[m] length of plate
b = 50*10^(-2);//[m] width of plate
area = l*b;//[square meter] area of plate
dt = 250-20;//[degree celsius]
// from newton's law of cooling
q = h*area*dt;// [W]
printf("rate of heat transfer is %f kW",q/1000);
|
75ddc0d6dab2a4073ebb74315b0d9ad07302189d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2240/CH20/EX19.20/EX19_20.sce | c6667f2cd4af056758fa738c3bbbe1f1671c60b2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 723 | sce | EX19_20.sce | // Grob's Basic Electronics 11e
// Chapter No. 19
// Example No. 19_20
clc; clear;
// Two series coils, each with an L of 250 uH, have a total inductance of 550 uH connected series-aiding and 450 uH series-opposing. (a) How much is the mutual inductance Lm between the two coils? (b) How much is the coupling coefficient k?
// Given data
l1 = 250*10^-6; // Coil Inductance 1=250 uH
l2 = 250*10^-6; // Coil Inductance 2=250 uH
Lts = 550*10^-6; // Inductance series-aiding=550 uH
Lto = 450*10^-6; // Inductance series-opposing=450 uH
Lm = (Lts-Lto)/4
disp (Lm,'The Mutual Inductance in Henry')
disp ('i.e 25 uH')
lt = sqrt(l1*l2);
k = Lm/lt;
disp (k,'The Coupling coefficient k is')
|
9fd33f28a46541c45d5b0e76aebd2f922a3ab1af | f891f5aed2e66371488173c2b9c4e8f977a9f64a | /UL 1741 SA - CA Rule 21/Tests/SA13_VV/VV_Test_3.tst | 2a8a88233faa02f835e28482e203665c929cb63b | [] | no_license | jakedm/svp_directories | d9b85c41b45a3ded7572f9f730e8d1efc8515099 | 19272f8784baabf83e197778768933aef015432c | refs/heads/master | 2021-01-18T18:08:29.224016 | 2017-01-16T20:09:35 | 2017-01-16T20:09:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,602 | tst | VV_Test_3.tst | <scriptConfig name="VV_Test_3" script="SA13_volt_var">
<params>
<param name="ratings.v_nom" type="float">0.0</param>
<param name="ratings.var_ramp_max" type="float">0.0</param>
<param name="ratings.k_var_max" type="float">0.0</param>
<param name="ratings.v_msa" type="float">0.0</param>
<param name="ratings.deadband_max" type="float">0.0</param>
<param name="ratings.v_min" type="float">0.0</param>
<param name="ratings.t_settling" type="float">0.0</param>
<param name="ratings.s_rated" type="float">0.0</param>
<param name="ratings.p_rated" type="float">0.0</param>
<param name="ratings.v_max" type="float">0.0</param>
<param name="ratings.deadband_min" type="float">0.0</param>
<param name="ratings.var_msa" type="float">0.0</param>
<param name="ratings.q_max_cap" type="float">0.0</param>
<param name="ratings.q_max_ind" type="float">0.0</param>
<param name="srd.segment_point_count" type="int">3</param>
<param name="srd.p_min_pct" type="float">20.0</param>
<param name="srd.p_max_pct" type="float">100.0</param>
<param name="ratings.power_priority" type="string">Active</param>
<param name="general.tests" type="string">All</param>
<param name="gridsim.auto_config" type="string">Disabled</param>
<param name="pvsim.mode" type="string">Manual</param>
<param name="gridsim.mode" type="string">Manual</param>
<param name="der.mode" type="string">Manual</param>
<param name="das.mode" type="string">Manual</param>
<param name="srd.k_var_min" type="string">None</param>
</params>
</scriptConfig>
|
1b0953e938a6cfd81548492bd389093469e9fcb5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /278/CH25/EX25.5/ex_25_5.sce | 92f32f94f16a65805518eb65da889a1efeedc216 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 458 | sce | ex_25_5.sce | //find..
clc
//solution
//given
de=650//mm
re=0.325//m
d=1//m
r=0.500//mm
n=4
q=(%pi/180)*22.5
m=2000//kg
v=2.5//m/s
h=2.75//m
u=0.2
g=9.81//m/s^2
pb=0.3//N/mm^2
acc=v^2/(2*h)//m/s^2
fc=m*acc//N
W=(2000*9.81)+fc//N
T=W*re//N-m
Ftt=T/r//N
Ft=Ftt/4//N
Rn=Ft/0.2//N
//Ab=w*(2*r*sin(q))=382.7*w//mm^2
//pb=W/Ab
w=Rn/(0.3*382.7)//mm
printf("width of side is ,%f mm\n",w)
TE=(0.5*m*v^2)+(m*g*h)
printf("heat generated is,%f N-m\n",TE)
|
c28f741ab6d118c568621bfafbe4bb5cf9142df4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2081/CH6/EX6.4/Ex6_4.sce | 27af3b56bffce035a021449993068a8b6c81d806 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex6_4.sce | K=4
N=9//no.of cells in 1 cluster
tbw=60*10^6//total bandwidth
cbwpc=25*10^3//channel bandwidth/simplex channel
n=2//in a duplex link no of channels
dcbw=n*cbwpc//duplex channel bandwidth
N=tbw/dcbw
sbw=10^6//bandwidth for setup channels
N1=sbw/dcbw//total no.of available setup channels
disp(N1,'total no.of available setup channels')
vbw=tbw-sbw
N2=vbw/dcbw//total no. of available voice channels
disp(N2,'total no.of available voice channels')
|
5cda1fec4beee3760e2018d6239ac4d60416085f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2912/CH5/EX5.26/Ex5_26.sce | aa5462c507bccdb188febc96fff73174b7927356 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 697 | sce | Ex5_26.sce | //chapter 5
//example 5.26
//Calculate minimum energy of electron
//page 113-114
clear;
clc;
//given
a=4E-10; // in m (length of the box)
m=9.1E-31; // in Kg (mass of electron)
h=6.626E-34; // in J-s (Planck'c constant)
n1=1; // ground state
e=1.6*1E-19; // in C (charge of electron)
//calculate
// Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)
E1=n1^2*h^2/(8*m*a^2); // calculation of energy corresponding to the ground state
printf('\nThe minimum energy of electron is \tE1=%1.3E J',E1);
E1=E1/e; //changing unit from J to eV
printf('\n\t\t\t\t\t =%.3f eV',E1);
// Note: The answer in the book corresponding to J is wrong due to printing error.
|
c55ae4f3cfff95b5f8e6c1a65e48e1d9bfb12199 | 449d555969bfd7befe906877abab098c6e63a0e8 | /575/DEPENDENCIES/272.sci | 2839ad4513259231f58eefc9ad03585e1328d6d1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 62 | sci | 272.sci | T=[10 20 40 80]
M=[14.76 20.14 27.73 38.47]
sqrtT=sqrt(T);
|
9a4a855cace056d6d97c1ff3d77bb80e8ad76654 | 449d555969bfd7befe906877abab098c6e63a0e8 | /551/CH6/EX6.19/19.sce | 7853806aa463c53cd97078d21053d8dafb472bf5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 527 | sce | 19.sce | clc
cp=1.005; //kJ/kg K
cv=0.718; //kJ/kg K
R=0.287; //kJ/kg K
m=1; //kg
T1=290; //K
T0=290; //K
T2=400; //K
p1=1; //bar
p0=1; //bar
p2=6; //bar
//Wrev=change in internal energy - T0*change in entropy
disp("(i) The irreversibility")
Wrev=-[cv*(T2-T1) - T0*[cp*log(T2/T1) - R*log(p2/p1)]];
n=[1/(1-log(T2/T1)/log(p2/p1))];
Wact=m*R*(T1-T2)/(n-1);
I=Wrev-Wact;
disp("Irreversibility=")
disp(I)
disp("kJ")
disp("(ii)The effectiveness = ")
effectiveness=Wrev/Wact*100;
disp(effectiveness)
disp("%") |
a451dea5435a158e33b9c2afd9b6f62748efb67a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1309/CH4/EX4.6/ch4_6.sce | f4d48765aa0e31520d4d079ece107c8e8b3063b2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,004 | sce | ch4_6.sce | clc;
clear;
printf("\t\t\tChapter4_example6\n\n\n");
// properties of aluminium from appendix table B1
k_al=236;
p_al=2.7*1000;
c_al=896;
// properties of oak from appendix table B3
k_oak=0.19;
p_oak=0.705*1000;
c_oak=2390;
sqrt_kpc_al=sqrt(k_al*p_al*c_al);
printf("\nThe square root of kpc product of aluminium is %.2e sq.W.s/(m^4.sq.K)",sqrt_kpc_al);
kpc_R=4;
T_Li=20;
T_Ri=37.3;
T_al=(T_Li*(sqrt_kpc_al)+T_Ri*sqrt(kpc_R))/(sqrt_kpc_al+sqrt(kpc_R));
printf("\nThe temperature of aluminium is felt as %.1f degree celsius",T_al);
sqrt_kpc_oak=sqrt(k_oak*p_oak*c_oak);
printf("\nThe square root of kpc product of oak is %.2e sq.W.s/(m^4.sq.K)",sqrt_kpc_oak);
T_oak=(T_Li*(sqrt_kpc_oak)+T_Ri*sqrt(kpc_R))/(sqrt_kpc_oak+sqrt(kpc_R));
printf("\nThe temperature of oak is felt as %.1f degree celsius",T_oak);
if (T_al>T_oak) then
printf("\nThe aluminium will feel warmer.");
elseif (T_al<T_oak) then
printf("\nThe oak will feel warmer.");
else
printf("\nBoth will be felt equally warm.")
end
|
ada38d54e0a793b66c84795fe4d36a165220c2c2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2489/CH10/EX10.7/10_7.sce | fb71ef0efb5bfbc076c22623e19f8343180813d0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 228 | sce | 10_7.sce | clc
//Intitalisation of variables
clear
Kx= 4
y1= 7.8 //per cent
//CALCULATIONS
y= ((2*(Kx+1)-sqrt(4*(Kx+1)^2-4*(Kx-1)*Kx))*100/(2*(Kx-1)))+y1
//RESULTS
printf ('per cent of acid that is esterified = %.1f per cent ',y)
|
1b7e89a92497d115c8f0b7c8af3c18768ae45253 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3776/CH10/EX10.15/Ex10_15.sce | 62eb98e8c338e10d21b2674de4da0f2d6da6a661 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 671 | sce | Ex10_15.sce | clear
//Given
E = 30*(10**3) //ksi - The youngs modulus of the material
stress_y = 40 //ksi - yield stress
stress_max = 24.4 //ksi - the maximum stress
l = 2 //in - The length of the crossection
b = 3 //in - the width of the crossection
h = 2 //in - the depth of the crossection
//lets check ultimate capacity for a 2 in deep section
M_ul = stress_max*b*(l**2)/4 //K-in the ultimate capacity
curvature = 2*stress_y/(E*(h/2) ) //per inch the curvature of the beam
curvature_max = stress_max/(E*(b/2)) //per inch The maximum curvature
printf("\n the curvature in 11-in is %e per inch",curvature)
printf("\n the ultimate curvature %e per inch",curvature_max)
|
5459e59a9d5fa464c3d1a34ccdc7b80ee8b23d7a | 449d555969bfd7befe906877abab098c6e63a0e8 | /1787/CH2/EX2.20/Exa2_20.sce | b5e7f6a27bb961b7076449da8587e7474188caeb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 260 | sce | Exa2_20.sce | //Exa 2.20
clc;
clear;
close;
//given data
e=1.6*10^-19;//in coulamb
rho=0.00912;//in ohm-m
B=0.48;//in Wb/m^2
RH=3.55*10^-4;//in m^3-coulamb^-1
SIGMA=1/rho;//in (ohm=m)^-1
THETAh=atand(SIGMA*B*RH);//in Degree
disp(THETAh,"Hall angle in degree : "); |
d8348136f22bcfc98dbcc4ad68befde83a027ff7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1655/CH2/EX2.7.13/Example_2_7_13.sce | f298f9d94f37190f54df04d50664f1f0946d50ea | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,116 | sce | Example_2_7_13.sce |
// Example 2.7.13 page 2.31
clc;
clear;
n1=1.447; //refractive index of core
n2=1.442; //refractive index of cladding
lamda=1.3d-6; //Wavelength
a=3.6d-6; //core radius
NA=sqrt(n1^2 - n2^2); //computing Numerical aperture
v= 2*%pi*a*NA/lamda; //computing normalized frequency
printf("As normalized frequency is %.2f which is less than 2.405, this fiber will permit single mode transmission",v);
lamda_cut_off=v*lamda/2.405
lamda_cut_off=lamda_cut_off*10^9
printf("\n\nSingle mode operation will occur above this cut off wavelength of %.2f nm",lamda_cut_off);
printf("\n\n NOTE - Calculation error in the book.\n(1.447^2 - 1.442^2)^0.5=0.121; they have taken 0.141\nHence calculations after that are incorrect in the book");
//Calculation error in the book.(1.447^2 - 1.442^2)^0.5=0.121; they have taken 0.141.Hence calculations after that are incorrect in the book.
//They have taken radius as 2.6d-6, whereas in question it is given 3.6d-6.
//answers in the book
//Normalized frequency is 1.77.(incorrect)
//cut off wavelength 956nm.(incorrect)
|
c40d7f6c40bd068410fde0f6263b84510fea7b96 | f6134e0a162a059c42ec3ef8de2a63941d73936c | /Scilab_code/RLG/RLG.sci | b57b58f5cd1ed92ec8bedcb0ac33fb02945e9af6 | [] | no_license | mxch18/SRL-WRT_pathPlanning | 38a1701934a4a0e919a6c1c7990092b242df72da | 6992febbbe103814d2cef5351a0e8917b183a2b0 | refs/heads/master | 2020-03-23T06:43:54.155192 | 2018-09-26T17:26:56 | 2018-09-26T17:26:56 | 141,226,032 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 15,837 | sci | RLG.sci | function [P,Q,THETA,RMAT,SUCCESS] = RLG(STANCE,NORMALS,PARAMS)
//Author : Maxens ACHIEPI
//Space Robotics Laboratory - Tohoku University
//Description:
// Cxy,WS_proj_R0,footPlane_Rmat,zFinalInterval,psiInter,thetInter,phiInter
//[]
//INPUT
//STANCE: Row array of the current footholds. Contains struct describing
// footholds:
// *foothold: struct.
// *foothold.leg: string identifying the leg (FR,FL,HR,HL);
// *foothold.pos: row vector. Position of the foot in R0
//PARAMS: a struct containing all the parameters relating to the robot
// geometry, as well as problem-specific parameters:
// *PARAMS.extRad;
// *PARAMS.distApiOb: distances between the leg attachment and the EoF CoM
// *PARAMS.intRad;
// *PARAMS.halfAngle;
// *PARAMS.shellPtsNb;
// *PARAMS.shrink
// *PARAMS.kpxy;
// *PARAMS.kpz;
// *PARAMS.kRot
// *PARAMS.tInc;
// *PARAMS.aInc;
// *PARAMS.baseDimensions: (1) on x, (2) on y;
// *PARAMS.legLength: [l1,l2,l3]
// *PARAMS.verbose: %T or %F
//OUTPUT
//P: the base position
//Q: the quaternion defining the rotation
//THETA: the leg's joint angles
//RMAT: the rotation matrix
//SUCCESS: boolean for benchmarking purposes (atm)
//TODO : put psi/theta/phi range finding in function
// could you put bounds on phi so that it doesn't flip over? NAH(?)
// put IK in function
// Remove RMAT output
// Change rotation parametrization to full quaternion
//----------------------------------------------------------------------------//
P = 0;Q = 0;THETA = 0;SUCCESS = %F;RMAT = 0;
//Compute LS-fit plane by ACP
stance_pos_list = STANCE(:).pos;
stance_pos_array = [];
for i=1:size(STANCE,2)
stance_pos_array(i,:) = stance_pos_list(i);
end
foot_nb = size(stance_pos_array,1);
[footPlane_z,footPlane_d,footPlane_or] = plane_ACP(stance_pos_array);
footPlane_z = footPlane_z/norm(footPlane_z);
FL_present = %f;HL_present = %f;FR_present = %f;HR_present = %f;
for i=1:foot_nb
select STANCE(i).leg
case 'FL' then
FL = i;
FL_present = %t;
case 'HL' then
HL = i;
HL_present = %t;
case 'FR' then
FR = i;
FR_present = %t;
case 'HR' then
HR = i;
HR_present = %t;
end
end
if HR_present&FR_present then
// footPlane_x = (STANCE(HR).pos-footPlane_or) + 0.5*(STANCE(FR).pos-STANCE(HR).pos);
footPlane_x = projectionDroite(footPlane_or,STANCE(HR).pos,STANCE(FR).pos-STANCE(HR).pos); //vector from HR to orth proj of stance centroid on line HR-FR
footPlane_x = footPlane_x - footPlane_or;
footPlane_x = footPlane_x;
// footPlane_x = projectionPlan(footPlane_x,footPlane_or,footPlane_z);
// footPlane_x = footPlane_x - (footPlane_z*footPlane_or')*footPlane_z
footPlane_x = footPlane_x/norm(footPlane_x);
footPlane_y = cross(footPlane_z,footPlane_x);
elseif HL_present&FL_present then
// footPlane_x = (STANCE(HL).pos-footPlane_or) + 0.5*(STANCE(FL).pos-STANCE(HL).pos);
footPlane_x = projectionDroite(footPlane_or,STANCE(HL).pos,STANCE(FL).pos-STANCE(HL).pos); //vector from HL to orth proj of stance centroid on line HL-FL
footPlane_x = footPlane_x - footPlane_or;
footPlane_x = -footPlane_x;
// disp(footPlane_x)
// footPlane_x = projectionPlan(footPlane_x,footPlane_or,footPlane_z);
// footPlane_x = footPlane_x - (footPlane_z*footPlane_or')*footPlane_z
// disp(footPlane_x)
footPlane_x = footPlane_x/norm(footPlane_x);
footPlane_y = cross(footPlane_z,footPlane_x);
end
footPlane_Rmat = [footPlane_x;footPlane_y;footPlane_z]; //R_P_0
[footPlane_angle,footPlane_vector] = angle_vector_FromMat(footPlane_Rmat);
footPlane_Q = createQuaternion(footPlane_angle,footPlane_vector);
//Compute leg approximate workspaces. Project them on footPlane.
for i = 1:foot_nb
//leg workspace, all points in R0
WSmi_R0 = [];
WSmi_proj_RP = [];
//shell descriptions
shellDesc_i = struct('origin',stance_pos_array(i,:),'extRad',PARAMS.extRad(i),'intRad',PARAMS.intRad(i),'axis',NORMALS(i,:),'halfAngle',PARAMS.halfAngle);
shellDesc(i) = shellDesc_i;
shellDesc_AUG_i = struct('origin',stance_pos_array(i,:),'extRad',PARAMS.extRad(i)+PARAMS.distApiOb(i),'intRad',PARAMS.intRad(i),'axis',NORMALS(i,:),'halfAngle',PARAMS.halfAngle);
shellDesc_AUG(i) = shellDesc_AUG_i;
WSmi_alpha = linspace(0,2*%pi,PARAMS.shellPtsNb);
WSmi_theta = linspace(%pi/2-shellDesc_AUG_i.halfAngle,%pi/2,PARAMS.shellPtsNb);
[x1,y1,z1] = halfSph(shellDesc_AUG_i.origin,shellDesc_AUG_i.extRad,2*WSmi_alpha,WSmi_theta,shellDesc_AUG_i.axis);
WSmi_R0 = [x1',y1',z1'];
if shellDesc_i.intRad then
[x2,y2,z2] = halfSph(shellDesc_AUG_i.origin,shellDesc_AUG_i.intRad,2*WSmi_alpha,WSmi_theta,shellDesc_AUG_i.axis);
WSmi_R0 = [WSmi_R0;x2' y2' z2'];
end
WS_R0(:,:,i) = WSmi_R0;
//projection, all points in RP
for j=1:size(WSmi_R0,1)
v = projectionPlan(WSmi_R0(j,:),footPlane_or,footPlane_z);
WSmi_proj_R0(j,1) = v(1);WSmi_proj_R0(j,2) = v(2);WSmi_proj_R0(j,3) = v(3);
v = footPlane_Rmat*(v'-footPlane_or');
WSmi_proj_RP(j,1) = v(1);WSmi_proj_RP(j,2) = v(2);
end
WS_proj_RP(:,:,i) = WSmi_proj_RP;
WS_proj_R0(:,:,i) = WSmi_proj_R0;
end
//Compute Cxy
Cxy = computeCxy(WS_proj_RP,[1 0;0 1]);
if isnan(Cxy.origin) then
if PARAMS.verbose then
mprintf('Could not compute intersection of workspaces! Stance is probably unreachable...\n');
end
return;
end
//Sample pxy_RP, transform into pxy_R0
kpxy = 0;
while kpxy<PARAMS.kpxy
kpxy = kpxy+1;
kpz = 0;
pxy_RP = sampleInBBox(Cxy,PARAMS.shrink);
pxy_R0 = footPlane_Rmat'*[pxy_RP 0]'+footPlane_or';
if PARAMS.verbose then
mprintf("XY - At iteration %d of %d:\nBase xy_R0 position: [%.4f, %.4f]\n",kpxy,PARAMS.kpxy,pxy_R0(1),pxy_R0(2));
end
zInterval = cell(1,foot_nb);
//Compute intersections of the line perpendicular to footPlane, going through pxy_R0, with the WSmi
line_z = struct('origin',pxy_R0','direction',footPlane_z);
for i=1:foot_nb
[boolInterT_i,tMultiple_i,tInterval_i,d_i]=intersectLineWS(WS_R0(:,:,i),shellDesc_AUG(i),line_z,PARAMS.tInc);
if boolInterT_i then
tInterval(i).entries = createZInterval(tInterval_i,d_i);
if PARAMS.verbose & tMultiple_i then
mprintf(" T - For leg %d, t lies in %d different intervals", i, size(tInterval(i).entries,1));
elseif PARAMS.verbose then
mprintf(" T - For leg %d, t range is: %.4f to %.4f\n",i,tInterval(i).entries(1),tInterval(i).entries(2));
end
else
if PARAMS.verbose then
mprintf(" T - No intersection with leg %d workspace! Resampling pxy_RP...\n",i);
end
break;
end
end
if ~boolInterT_i then continue; end
//Sample pz_R0
[tFinalBool,tFinalInterval] = intersectSetIntervals(tInterval);
if ~tFinalBool then
if PARAMS.verbose then
mprintf(" T - t valid intervals do not intersect! Resammpling pxy_RP...\n");
end
continue;
end
while kpz<PARAMS.kpz
kpz = kpz+1;
kRot = 0;
t_R0 = sampleFromMultInterval(tFinalInterval);
if PARAMS.verbose then
mprintf('T - At iteration %d of %d:\n Base t_R0 : %.4f\n",kpz,PARAMS.kpz,t_R0);
end
//Compute intersections of Api arcs and WSmi for the rotation parameter(s)
base_R0 = pxy_R0'+t_R0*line_z.direction;
P = base_R0;
offset_i = [];
xOff = [1 0 0]*PARAMS.baseDimensions(1)/2;
yOff = [0 1 0]*PARAMS.baseDimensions(2)/2;
//Rotation is represented by angle-vector
//Sample random axis - Watch out because uniform distrib on the three coordinates is not spherically symmetric
Mean = zeros(3,1);Cov = eye(3,3);
while kRot<PARAMS.kRot
kRot = kRot+1;
rot_axis = grand(1,"mn",Mean,Cov);
rot_axis = rot_axis/norm(rot_axis);
rot_axis = rot_axis'; //guarantee to be uniformly distributed on the unit sphere
if PARAMS.verbose then
mprintf('AXIS - At iteration %d of %d:\n Axis : %.4f %.4f %.4f\n",kRot,PARAMS.kRot,rot_axis(1),rot_axis(2),rot_axis(3));
end
R_0_EF = footPlane_Rmat; //initial rotation of base
// R_0_EF = eye(3,3); //no base rotation
angleInter=cell(1,foot_nb);
arcDesc = struct('origin',base_R0,'normal',rot_axis);
for i=1:foot_nb
select STANCE(i).leg
case 'FR' then
offset_i = xOff + yOff;
case 'FL' then
offset_i = - xOff + yOff;
case 'HR' then
offset_i= + xOff - yOff;
case 'HL' then
offset_i = - xOff - yOff;
else
if PARAMS.verbose then
mprintf("Error in the definition of foothold %d : leg name does not exist!\n",i);
end
return;
end
[boolInterAngle_i,angleMultiple_i,angleInter_i] = intersectArcWS(WS_R0(:,:,i),offset_i,R_0_EF,shellDesc(i),arcDesc,PARAMS.aInc);
if boolInterAngle_i then
angleInter(i).entries = createAngleInterval(angleInter_i);
if PARAMS.verbose & angleMultiple_i then
mprintf(" ANGLE - For leg %d, angle lies in %d different intervals\n", i, size(angleInter(i).entries,1));
elseif PARAMS.verbose then
mprintf(" ANGLE - For leg %d, angle range is: %.4f to %.4f\n",i,angleInter(i).entries(1),angleInter(i).entries(2));
end
else
if PARAMS.verbose then
mprintf(" ANGLE - No intersection with leg %d workspace! Resampling axis...\n",i);
end
break;
end
end
if ~boolInterAngle_i then continue; end
//Sample angle
[angleFinalBool,angleFinalInterval] = intersectSetIntervals(angleInter);
if ~angleFinalBool then
if PARAMS.verbose then
mprintf(" ANGLE - angle valid intervals do not intersect! Resampling axis...\n");
end
continue;
end
angle = sampleFromMultInterval(angleFinalInterval);
if PARAMS.verbose then
mprintf('Rotation angle: %.4f",angle*180/%pi);
end
Q = quatMult(footPlane_Q,createQuaternion(angle,rot_axis));
RMAT = matrix_fromQuaternion(Q);
if PARAMS.verbose then
mprintf("\nBase state sampled! Now using closed form IK for the legs...\n");
end
for i=1:foot_nb
select STANCE(i).leg
case 'FR' then
offset_i = xOff + yOff;
R_Leg_EF = [0 1 0;1 0 0;0 0 -1];
factor_t2 = -1;
factor_t3 = -1;
factor_elbow = +1;
case 'FL' then
offset_i = - xOff + yOff;
R_Leg_EF = [0 1 0;-1 0 0;0 0 1];
factor_t2 = +1;
factor_t3 = +1;
factor_elbow = -1;
case 'HR' then
offset_i= + xOff - yOff;
R_Leg_EF = [0 -1 0;1 0 0;0 0 1];
factor_t2 = +1;
factor_t3 = +1;
factor_elbow = -1;
case 'HL' then
offset_i = - xOff - yOff;
R_Leg_EF = [0 -1 0;-1 0 0;0 0 -1];
factor_t2 = -1;
factor_t3 = -1;
factor_elbow = +1;
end
IK_target_RLeg = -R_Leg_EF*offset_i' + R_Leg_EF*RMAT'*(STANCE(i).pos'-base_R0'); //the foothold for the ith leg, in the leg base frame
IK_target_array(:,i) = IK_target_RLeg;
THETA(i,1) = atan(IK_target_RLeg(2),IK_target_RLeg(1));
rem = sqrt(IK_target_RLeg(1)**2+IK_target_RLeg(2)**2)-PARAMS.legLength(1);
nc3 = IK_target_RLeg(3)**2+rem**2-PARAMS.legLength(2)**2-PARAMS.legLength(3)**2;
dc3 = 2*PARAMS.legLength(2)*PARAMS.legLength(3);
c3 = nc3/dc3;
bool_ik = abs(c3)>1;
if bool_ik then
if PARAMS.verbose then
mprintf("\nIK - NO SOLUTION FOR LEG %s INVERSE KINEMATICS\nResampling axis...\n",STANCE(i).leg);
end
// return;
break;
end
s3 = factor_elbow*sqrt(1-c3**2); //ELBOw UP
THETA(i,3) = factor_t3*atan(s3,c3);
THETA(i,2) = factor_t2*(atan(IK_target_RLeg(3),rem)-atan(PARAMS.legLength(3)*s3,PARAMS.legLength(2)+PARAMS.legLength(3)*c3))
end
if bool_ik then continue; end
SUCCESS=%T;
if PARAMS.verbose then
mprintf("\nSUCCESS!\n");
end
return;
end
if PARAMS.verbose then
mprintf("AXIS - Reached maximum number of trials, resampling T...\n");
end
end
if PARAMS.verbose then
mprintf("Z - Reached maximum number of trials, resampling XY...\n");
end
end
if PARAMS.verbose then
mprintf("XY - Reached maximum number of trials, aborting...\n");
end
endfunction
|
4137fe9f92be02b1181c15d1e3414b293f3cec53 | c89c3eb73e1c7b9f26076ad36749b4fd9ee2a69d | /My Implementations/Add16.tst | 40bee6aea66baf6dd718adca16b9f4df17daa14a | [] | no_license | gvela024/Elements-Of-Computing-Systems | cef0f824a4ca775ff7d2353a49c6510134db83da | 65a2b40979439b0d77e6fab1b3faa4b1a78ddd03 | refs/heads/master | 2021-01-22T03:13:48.244660 | 2015-12-26T00:53:51 | 2015-12-26T00:53:51 | 41,272,979 | 0 | 0 | null | 2015-11-11T22:27:40 | 2015-08-24T00:17:59 | Assembly | UTF-8 | Scilab | false | false | 454 | tst | Add16.tst | load Add16.hdl,
output-file Add16.out,
output-list in0%D1.6.1 in1%D1.6.1 sum%D1.6.1;
set in0 %X0000, set in1 %X0000, eval, output;
set in0 %X0001, set in1 %X0000, eval, output;
set in0 %X0000, set in1 %X0001, eval, output;
set in0 %X0001, set in1 %X0001, eval, output;
set in0 %X0001, set in1 %X0003, eval, output;
set in0 %X0003, set in1 %X0003, eval, output;
set in0 %X0FF0, set in1 %X1000, eval, output;
set in0 %X8000, set in1 %X8000, eval, output;
|
5a402a3bc005e2461c2e6077e468aafbb4d25edf | 8a3446e086bbb6afa038ee746f941996286b32c6 | /Tests/LVRT_VT.tst | 112d3e2690ef6a4d8e27af70b6e64f5496c3c2c7 | [] | no_license | FREA-ENT/svp_UL1741SA | ec5c7fa9a8a2f27b72ba6cea2960699613e10743 | 5d22145fcae26c33fcd62218ff185f6ed0a1bc34 | refs/heads/master | 2020-03-27T21:36:40.461101 | 2018-09-05T07:58:29 | 2018-09-05T07:58:29 | 147,161,108 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 1,307 | tst | LVRT_VT.tst | <scriptConfig name="LVRT_LV1" script="SA9_volt_trip_time">
<params>
<param name="gridsim.frea.phases" type="int">1</param>
<param name="vrt.n_r" type="int">1</param>
<param name="vrt.t_hold" type="float">1.0</param>
<param name="eut.t_msa" type="float">1.0</param>
<param name="eut.v_msa" type="float">2.0</param>
<param name="eut.t_trip" type="int">5</param>
<param name="vrt.v_test" type="float">100.0</param>
<param name="eut.v_nom" type="float">190.0</param>
<param name="gridsim.frea.ip_port" type="int">2001</param>
<param name="eut.p_rated" type="int">4000</param>
<param name="gridsim.frea.ip_addr" type="string">127.0.0.1</param>
<param name="aist.library_version" type="string">3.0.0</param>
<param name="aist.script_version" type="string">3.0.0</param>
<param name="hil.mode" type="string">Disabled</param>
<param name="der.mode" type="string">Disabled</param>
<param name="gridsim.auto_config" type="string">Enabled</param>
<param name="gridsim.mode" type="string">FREA_Simulator</param>
<param name="das.mode" type="string">Manual</param>
<param name="eut.phases" type="string">Single Phase</param>
<param name="gridsim.frea.comm" type="string">TCP/IP</param>
</params>
</scriptConfig>
|
cc4c4164de79892dcbec4a0d218db2f9222c0c3f | 449d555969bfd7befe906877abab098c6e63a0e8 | /1592/CH2/EX2.6/example_2_6.sce | fbec056ec3257e0227120aae2da0c4951ef3ddcc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 257 | sce | example_2_6.sce | //Scilab Code for Example 2.6 of Signals and systems by
//P.Ramakrishna Raoclear;
clc;
clear;
syms s X x t R C V Vo;
//After solving for I(s)
//I(s)=(V-Vo)/R . 1/(s+1/RC)
X=(V-Vo)/((s+1/(R*C))*R);
disp(X,"I(s)=");
x=ilaplace(X);
disp(x,"i(t)=");
|
9774729bf04a7c7c209f3c30143b8d2147099b24 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1646/CH6/EX6.4/Ch06Ex4.sce | 95ed4bb32f9dba7ef30f861b9af6f8a8dd860d0f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 487 | sce | Ch06Ex4.sce | // Scilab Code Ex6.4: Page-371 (2011)
clc;clear;
lambda = 3e-011;....// Wavelength of the X-ray, m
d = 5e-011;....// Lattice spacing, m
n = [2 3];....// Orders of diffraction
// Bragg's equation for X-rays of wavelength lambda is n*lambda = 2*d*sin(theta), solving for thetas
for i = 1:1:2
theta = asind(n(i)*lambda/(2*d));
printf("\nFor n = %d, theta = %4.1f degrees", n(i), theta);
end
// Result
// For n = 2, theta = 36.9 degrees
// For n = 3, theta = 64.2 degrees |
8457f3bcaa2b60061a485a464b608001f8919372 | 449d555969bfd7befe906877abab098c6e63a0e8 | /764/CH8/EX8.20.b/solution8_20.sce | 7479732087e33a66d2a8248b9892b370d03c5d93 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,321 | sce | solution8_20.sce |
//Function to round-up a value such that it is divisible by 5
function[v] = round_five(w)
v = ceil(w)
rem = pmodulo(v,5)
if (rem ~= 0) then
v = v + (5 - rem)
end
endfunction
//Obtain path of solution file
path = get_absolute_file_path('solution8_20.sce')
//Obtain path of data file
datapath = path + filesep() + 'data8_20.sci'
//Clear all
clc
//Execute the data file
exec(datapath)
//Calculate the diameter of the rivets d (mm)
d = 6 * sqrt(t)
dround = ceil(d)
//Calculate the shear resistance of one rivet in double shear Ps (N)
Ps = 1.875 * ((%pi/4) * (dround^2) * tau)
//Calculate the crushing resistance of one rivet Pc (N)
Pc = dround * t * sigmac
//Choose appropriate criterion P (N)
if (Ps < Pc) then
P = Ps
else
P = Pc
end
//Calculate the tensile strength of the plate in the outer row Pt (N)
Pt = (w - dround)* t* sigmat
//Calculate the number of rivets required n
n = Pt/P
n = ceil(n)
//Calculate the margin m (mm)
m = 1.5 * dround
mround = round_five(m)
//Calculate the transverse pitch pt (mm)
pt = 2 * dround
ptround = round_five(pt)
//Calculate the strap thickness t1 (mm)
t1 = 0.625 * t
//Calculate the pitch p (mm)
p = (w - (2 * mround))/2
//Calculate the strength of the joint along:
//Section A-A
SA = (w - dround) * t * sigmat
//Section B-B
SB = ((w - (2 * dround)) * t * sigmat) + Ps
//Section C-C
SC = ((w - (3 * dround)) * t * sigmat) + (3 * Ps)
//Calculate the shear resistance of all the rivets SS (N)
SS = n * Ps
//Choose lowest of all the calculated strengths PLow (N)
if ((SA < SB) & (SA < SC) & (SA < SS)) then
PLow = SA
elseif ((SB < SA) & (SB < SC) & (SB < SS))
PLow = SB
elseif ((SC < SA) & (SC < SB) & (SC < SS))
Plow = SC
else
PLow = SS
end
//Calculate the strength of the plate PSolid (N)
PSolid = w * t * sigmat
//Calculate the efficiency of the joint eta (%)
eta = (PLow/PSolid) * 100
//Print results
printf('\nDiameter of the rivet(d) = %f or %f mm\n',d,dround)
printf('\nNumber of rivets required(n) = %f\n',n)
printf('\nMargin(m) = %f or %f mm\n',m,mround)
printf('\nTransverse pitch(pt) = %f or %f mm\n',pt,ptround)
printf('\nThickness of strap(t1) = %f mm\n',t1)
printf('\nPitch(p) = %f mm\n',p)
printf('\nEfficiency of the joints(eta) = %f percent\n',eta)
|
561fc03d003fcc3eea54ef1adb155d08b7671779 | b26cbe6bc3e201f030705aaf9eb82da94def231f | /tests/transpose-006.tst | f796071236d157a1e904fe8a836aa6a39353eae8 | [] | no_license | RP-pbm/Recurrence-plot | f86c5cd85460661b01a609f8f4281d2cda6b4e07 | b5da95f9b30c1a924a002102219bf0a2ad47df2c | refs/heads/master | 2022-07-24T12:11:34.163543 | 2022-07-09T19:32:43 | 2022-07-09T19:32:43 | 92,934,698 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 21 | tst | transpose-006.tst | ../inputs/mini-06.ssv |
cc01bed1a27446a241d8bde88204d9bdbe91a6f8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3763/CH3/EX3.4/Ex3_4.sce | 1a0159aa3d8f97281dbd8db87f8e5d7b02289602 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 717 | sce | Ex3_4.sce | clear
//
//
//
//Variable declaration
n=4
A=107.87 //atomic weight
rho=10500 //density(kg/m**3)
N=6.02*10**26 //number of molecules
theta=19+(12/60) //angle(degrees)
h=1
k=1
l=1
h0=6.625*10**-34 //planck constant
c=3*10**8 //velocity of light(m/s)
e=1.6*10**-19 //charge(coulomb)
//Calculation
theta=theta*%pi/180 //angle(radian)
a=(n*A/(N*rho))**(1/3)
d=a*10**10/sqrt(h**2+k**2+l**2)
lamda=2*d*sin(theta) //wavelength of x rays(angstrom)
E=h0*c/(lamda*10**-10*e) //energy of x rays(eV)
//Result
printf("\n wavelength of x rays is %0.3f angstrom",lamda)
printf("\n answer varies due to rounding off errors")
printf("\n energy of x rays is %0.0f *10**3 eV",E/10**3)
|
562c4e2b97c2a9561edcd2375109fccaccd331fe | f542bc49c4d04b47d19c88e7c89d5db60922e34e | /PresentationFiles_Subjects - Kopie/CONT/JH56CNU/ATWM1_Working_Memory_MRI_Nonsalient_Cued_Run1.sce | 7eea8c475f0c2816f3c711ee9464a50c750fc683 | [] | no_license | atwm1/Presentation | 65c674180f731f050aad33beefffb9ba0caa6688 | 9732a004ca091b184b670c56c55f538ff6600c08 | refs/heads/master | 2020-04-15T14:04:41.900640 | 2020-02-14T16:10:11 | 2020-02-14T16:10:11 | 56,771,016 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 12,492 | sce | ATWM1_Working_Memory_MRI_Nonsalient_Cued_Run1.sce | # ATWM1 MRI Experiment
scenario = "ATWM1_Working_Memory_MRI_nonsalient_cued_run1";
scenario_type = fMRI; # Fuer Scanner
#scenario_type = fMRI_emulation; # Zum Testen
#scenario_type = trials;
scan_period = 2000; # TR
pulses_per_scan = 1;
pulse_code = 1;
#pulse_width=6;
default_monitor_sounds = false;
active_buttons = 2;
response_matching = simple_matching;
button_codes = 10, 20;
default_font_size = 28;
default_font = "Arial";
default_background_color = 0 ,0 ,0 ;
#write_codes=true; # for MEG only
begin;
#Picture definitions
box { height = 300; width = 300; color = 0, 0, 0;} frame1;
box { height = 290; width = 290; color = 255, 255, 255;} frame2;
box { height = 30; width = 4; color = 0, 0, 0;} fix1;
box { height = 4; width = 30; color = 0, 0, 0;} fix2;
box { height = 30; width = 4; color = 255, 0, 0;} fix3;
box { height = 4; width = 30; color = 255, 0, 0;} fix4;
box { height = 290; width = 290; color = 128, 128, 128;} background;
TEMPLATE "StimuliDeclaration.tem" {};
trial {
sound sound_incorrect;
time = 0;
duration = 1;
} wrong;
trial {
sound sound_correct;
time = 0;
duration = 1;
} right;
trial {
sound sound_no_response;
time = 0;
duration = 1;
} miss;
# baselinePre (at the beginning of the session)
trial {
picture {
box frame1; x=0; y=0;
box frame2; x=0; y=0;
box background; x=0; y=0;
bitmap fixation_cross_black; x=0; y=0;
}default;
time = 0;
duration = 9400;
mri_pulse = 1;
code = "BaselinePre";
#port_code = 1;
};
TEMPLATE "ATWM1_Working_Memory_MRI.tem" {
trigger_volume_encoding trigger_volume_retrieval cue_time preparation_time encoding_time single_stimulus_presentation_time delay_time retrieval_time intertrial_interval alerting_cross stim_enc1 stim_enc2 stim_enc3 stim_enc4 stim_enc_alt1 stim_enc_alt2 stim_enc_alt3 stim_enc_alt4 trial_code stim_retr1 stim_retr2 stim_retr3 stim_retr4 stim_cue1 stim_cue2 stim_cue3 stim_cue4 fixationcross_cued retr_code the_target_button posX1 posY1 posX2 posY2 posX3 posY3 posX4 posY4;
6 11 292 292 399 125 9543 2992 14342 fixation_cross gabor_127 gabor_046 gabor_076 gabor_154 gabor_127_alt gabor_046 gabor_076_alt gabor_154 "1_1_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_300_300_399_9601_3000_14400_gabor_patch_orientation_127_046_076_154_target_position_2_4_retrieval_position_2" gabor_circ gabor_093_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_1_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_retrieval_patch_orientation_093_retrieval_position_2" 2 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
20 25 292 292 399 125 9543 2992 12342 fixation_cross gabor_046 gabor_063 gabor_097 gabor_169 gabor_046 gabor_063 gabor_097_alt gabor_169_alt "1_2_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_300_300_399_9601_3000_12400_gabor_patch_orientation_046_063_097_169_target_position_1_2_retrieval_position_2" gabor_circ gabor_018_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_2_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_retrieval_patch_orientation_018_retrieval_position_2" 2 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
33 38 292 292 399 125 9543 2992 14342 fixation_cross gabor_009 gabor_118 gabor_039 gabor_145 gabor_009 gabor_118 gabor_039_alt gabor_145_alt "1_3_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_300_300_399_9601_3000_14400_gabor_patch_orientation_009_118_039_145_target_position_1_2_retrieval_position_2" gabor_circ gabor_118_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_3_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_retrieval_patch_orientation_118_retrieval_position_2" 1 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
47 52 292 292 399 125 9543 2992 12342 fixation_cross gabor_027 gabor_058 gabor_073 gabor_101 gabor_027 gabor_058 gabor_073_alt gabor_101_alt "1_4_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_UncuedRetriev_300_300_399_9601_3000_12400_gabor_patch_orientation_027_058_073_101_target_position_1_2_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_101_framed blank blank blank blank fixation_cross_target_position_1_2 "1_4_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_UncuedRetriev_retrieval_patch_orientation_101_retrieval_position_4" 1 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
60 66 292 292 399 125 11543 2992 14342 fixation_cross gabor_121 gabor_067 gabor_175 gabor_098 gabor_121_alt gabor_067_alt gabor_175 gabor_098 "1_5_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_300_300_399_11601_3000_14400_gabor_patch_orientation_121_067_175_098_target_position_3_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_098_framed blank blank blank blank fixation_cross_target_position_3_4 "1_5_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_retrieval_patch_orientation_098_retrieval_position_4" 1 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
75 80 292 292 399 125 9543 2992 12342 fixation_cross gabor_105 gabor_029 gabor_157 gabor_138 gabor_105_alt gabor_029 gabor_157_alt gabor_138 "1_6_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_300_300_399_9601_3000_12400_gabor_patch_orientation_105_029_157_138_target_position_2_4_retrieval_position_2" gabor_circ gabor_029_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_6_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_retrieval_patch_orientation_029_retrieval_position_2" 1 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
88 93 292 292 399 125 9543 2992 12342 fixation_cross gabor_011 gabor_122 gabor_082 gabor_151 gabor_011_alt gabor_122 gabor_082_alt gabor_151 "1_7_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_300_300_399_9601_3000_12400_gabor_patch_orientation_011_122_082_151_target_position_2_4_retrieval_position_2" gabor_circ gabor_122_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_7_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_retrieval_patch_orientation_122_retrieval_position_2" 1 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
101 107 292 292 399 125 11543 2992 14342 fixation_cross gabor_002 gabor_142 gabor_109 gabor_167 gabor_002 gabor_142_alt gabor_109_alt gabor_167 "1_8_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_UncuedRetriev_300_300_399_11601_3000_14400_gabor_patch_orientation_002_142_109_167_target_position_1_4_retrieval_position_2" gabor_circ gabor_092_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_8_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_UncuedRetriev_retrieval_patch_orientation_092_retrieval_position_2" 2 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
116 122 292 292 399 125 11543 2992 14342 fixation_cross gabor_133 gabor_025 gabor_062 gabor_103 gabor_133 gabor_025_alt gabor_062 gabor_103_alt "1_9_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_300_300_399_11601_3000_14400_gabor_patch_orientation_133_025_062_103_target_position_1_3_retrieval_position_1" gabor_179_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_9_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_retrieval_patch_orientation_179_retrieval_position_1" 2 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
131 137 292 292 399 125 11543 2992 14342 fixation_cross gabor_045 gabor_174 gabor_008 gabor_064 gabor_045_alt gabor_174 gabor_008_alt gabor_064 "1_10_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_300_300_399_11601_3000_14400_gabor_patch_orientation_045_174_008_064_target_position_2_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_114_framed blank blank blank blank fixation_cross_target_position_2_4 "1_10_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_retrieval_patch_orientation_114_retrieval_position_4" 2 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
146 152 292 292 399 125 11543 2992 14342 fixation_cross gabor_083 gabor_045 gabor_163 gabor_017 gabor_083 gabor_045 gabor_163_alt gabor_017_alt "1_11_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_300_300_399_11601_3000_14400_gabor_patch_orientation_083_045_163_017_target_position_1_2_retrieval_position_1" gabor_083_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_11_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_retrieval_patch_orientation_083_retrieval_position_1" 1 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
161 167 292 292 399 125 11543 2992 12342 fixation_cross gabor_013 gabor_044 gabor_124 gabor_178 gabor_013 gabor_044_alt gabor_124_alt gabor_178 "1_12_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_UncuedRetriev_300_300_399_11601_3000_12400_gabor_patch_orientation_013_044_124_178_target_position_1_4_retrieval_position_2" gabor_circ gabor_044_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_12_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_UncuedRetriev_retrieval_patch_orientation_044_retrieval_position_2" 1 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
175 180 292 292 399 125 9543 2992 12342 fixation_cross gabor_040 gabor_150 gabor_069 gabor_084 gabor_040_alt gabor_150 gabor_069_alt gabor_084 "1_13_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_300_300_399_9601_3000_12400_gabor_patch_orientation_040_150_069_084_target_position_2_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_084_framed blank blank blank blank fixation_cross_target_position_2_4 "1_13_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_NoChange_CuedRetrieval_retrieval_patch_orientation_084_retrieval_position_4" 1 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
188 193 292 292 399 125 9543 2992 14342 fixation_cross gabor_091 gabor_157 gabor_177 gabor_046 gabor_091 gabor_157_alt gabor_177 gabor_046_alt "1_14_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_300_300_399_9601_3000_14400_gabor_patch_orientation_091_157_177_046_target_position_1_3_retrieval_position_3" gabor_circ gabor_circ gabor_130_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_14_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_retrieval_patch_orientation_130_retrieval_position_3" 2 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
202 208 292 292 399 125 11543 2992 12342 fixation_cross gabor_042 gabor_061 gabor_129 gabor_019 gabor_042_alt gabor_061 gabor_129 gabor_019_alt "1_15_Encoding_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_300_300_399_11601_3000_12400_gabor_patch_orientation_042_061_129_019_target_position_2_3_retrieval_position_3" gabor_circ gabor_circ gabor_179_framed gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_15_Retrieval_Working_Memory_MRI_P6_LR_Nonsalient_DoChange_CuedRetrieval_retrieval_patch_orientation_179_retrieval_position_3" 2 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
};
# baselinePost (at the end of the session)
trial {
picture {
box frame1; x=0; y=0;
box frame2; x=0; y=0;
box background; x=0; y=0;
bitmap fixation_cross_black; x=0; y=0;
};
time = 0;
duration = 20600;
code = "BaselinePost";
#port_code = 2;
}; |
d123f1d08f365c9744ca58095c4eeed9928ff3ea | 449d555969bfd7befe906877abab098c6e63a0e8 | /3588/CH2/EX2.1/EX2_1.sce | a9358fcb183c8720174f75f52f53a0f914f743e7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 562 | sce | EX2_1.sce | //Clearing Console
clc
clear
//Node 1 Displacement
U1=0
//Stiffness of Springs
K1=50
K2=75
//Nodal Forces
F2=75
F3=75
//varible decleration
K=[]
F=[]
U=[]
//Constructing Stiffness and Force matrices
K(1,1)=K1+K2
K(1,2)=-K2
K(2,1)=-K2
K(2,2)=K2
F(1,1)=F2
F(2,1)=F3
//Solving for Nodal Displacements U2 and U3
U=linsolve(K,-F) //K*U=F (equlibrium equation)
//Solving for Nodal force F1
F1=-50*U(1,1)
//Printing Results
printf('\nResults\n')
printf('\nNodal displacements \nU1=%fin \nU2=%fin \nU3=%fin\n',U1,U(1,1),U(2,1))
printf('\nNodal Force F1=%flb\n',F1)
|
c6ecbae05900657ce56c1e99696cc32cf8fd3c28 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1019/CH7/EX7.2/Example_7_2.sce | 9116102744f8b48e232b331cda6399ec894697a9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 356 | sce | Example_7_2.sce | //Example 7.2
clear;
clc;
//Given
R=0.08205;//gas constant in dm^3 atm K^-1 mol^-1
b=0.0391;//Van der Waals constant in dm^3 mol^-1
T=1273;//Temperature in K
P=1000;//pressure in atm
//To calculate the fugacity coefficient
k=(b*P)/(R*T);//k=log(f/P)
f=P*exp(k);//fugacity coefficient in atm
mprintf('Fugacity coefficient = %f atm',f);
//end |
ae7234144ff4f5b8cbf1bae90a29a8ef1209c32b | bd9ba5abb6de1e9d9485b5e98b2b68868aab21db | /Graph/plot using plot2d keyword and using numbers for changing marker.sce | 282f1027612f7062cb49ce650fb732d0340648c8 | [] | no_license | ShubhamRattra/Scilab_programs | c61b6538a064afe82c99507c1064cd55bbd870fa | de2bf6ab0de0b1a19c4903bb13819edc39f93d0e | refs/heads/master | 2023-03-04T17:53:58.414180 | 2021-02-11T08:08:11 | 2021-02-11T08:08:11 | 296,920,175 | 2 | 2 | null | 2021-01-11T15:53:39 | 2020-09-19T17:37:42 | Scilab | UTF-8 | Scilab | false | false | 118 | sce | plot using plot2d keyword and using numbers for changing marker.sce | x = [0 : 0.1: 2*%pi];
y = sin(x);
plot2d(x, y, -3); // markers are represented by negative no.
plot2d(x, y, -2);
|
50e51d37cf230fc140752475b921dd795bd36251 | c2c094e5792a8d99eec660157b9b22bf111f175b | /Hardware/MAdd16.tst | d577dc0fab929d7b74b56e4229db6a79020ab026 | [] | no_license | z2512690268/nand2teris | 087bfbdb56fee154ee76d7d9e8d75a92a246be04 | 6f190f3d77b7b24fb0f2ae3a56691b2d60a19c33 | refs/heads/main | 2023-04-19T00:21:49.516211 | 2021-05-05T12:10:30 | 2021-05-05T12:10:30 | 364,537,511 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,205 | tst | MAdd16.tst | load MAdd16.hdl,
output-file MAdd16.out,
output-list a%B1.16.1 b%B1.16.1 out%B1.16.1;
set a %B0101000101110111,
set b %B0011101101101000,
eval,
output;
set a %B1100110100100100,
set b %B0001100101100011,
eval,
output;
set a %B0001011101101101,
set b %B0110010000110101,
eval,
output;
set a %B1100000011100110,
set b %B0010110101000100,
eval,
output;
set a %B1000000111100000,
set b %B1000111011100100,
eval,
output;
set a %B1010000111010100,
set b %B0001101101001001,
eval,
output;
set a %B0100110110010110,
set b %B1110011010101010,
eval,
output;
set a %B1011110111001100,
set b %B1101010000001011,
eval,
output;
set a %B1010011101010100,
set b %B0110101011100000,
eval,
output;
set a %B1111100011010100,
set b %B1011110010000001,
eval,
output;
set a %B1000000001101111,
set b %B1001001011110000,
eval,
output;
set a %B0011111001101111,
set b %B1110001010100101,
eval,
output;
set a %B0001111101000100,
set b %B1100110010110100,
eval,
output;
set a %B0111000110111011,
set b %B0001101000111101,
eval,
output;
set a %B0011001001001011,
set b %B1111001111000110,
eval,
output;
set a %B1001110101100001,
set b %B0011110101111101,
eval,
output; |
2a03499e51b2c10ff03bb72b1b7c876d6ffbc573 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3869/CH7/EX7.2/Ex7_2.sce | 04025cc57bd2e7fe219c12e17fb9b399f7986510 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 752 | sce | Ex7_2.sce | clear
//
//
//
//Variable declaration
lamda=0.58 //wavelength(angstrom)
theta1=6.45*%pi/180 //glancing angle(radian)
theta2=9.15*%pi/180 //glancing angle(radian)
theta3=13*%pi/180 //glancing angle(radian)
n=1 //order
//Calculation
d1=lamda/(2*sin(theta1)) //interplanar spacing at 1st angle(angstrom)
d2=lamda/(2*sin(theta2)) //interplanar spacing at 2nd angle(angstrom)
d3=lamda/(2*sin(theta3)) //interplanar spacing at 3rd angle(angstrom)
//Result
printf("\n interplanar spacing at 1st angle is %0.3f angstrom",d1)
printf("\n interplanar spacing at 2nd angle is %0.3f angstrom",d2)
printf("\n interplanar spacing at 3rd angle is %0.3f angstrom",d3)
printf("\n answers given in the book are wrong")
|
4f281302ffe51db098fb422883524d165689d33a | 717ddeb7e700373742c617a95e25a2376565112c | /3428/CH23/EX14.23.12/Ex14_23_12.sce | 2e4cf103f88411bfdbfa5bb35ffb725f7e72c55a | [] | 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 | 225 | sce | Ex14_23_12.sce | //Section-14,Example-6,Page no.-PC.84
//To calculate the free energy change and justify the given reactions.
clc;
//Cu_2S + O_2 = 2Cu + SO_2
dl_G1=88.2
dl_G2=300.1
dl_G=dl_G1-dl_G2
disp(dl_G,'Free energy change(kJ)')
|
44c785a19f66d9f9f0ceb7edb5f8a2bb9dbde2f2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3638/CH13/EX13.11/Ex13_11.sce | a463dc181ecdca531b52be5155d0d9ed9333a730 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex13_11.sce | //Introduction to Fiber Optics by A. Ghatak and K. Thyagarajan, Cambridge, New Delhi, 1999
//Example 13.11
//OS=Windows XP sp3
//Scilab version 5.5.2
clc;
clear;
//given
R=0.5;//Responsivity in A/W
T=300;//Missing data- Temperature in K
C=1e-12;//Photodiode capacitance in F
BER=1e-9;//Bit error rate
SNR=144;//Signal-to-noise ratio corresponding to BER of (10)^(-9)
kB=1.38e-23;//Boltzmann constant in SI Units
//Case(i):
B=100e6;//Bit rate in b/s
Pmin=B/R*sqrt(2*%pi*kB*T*C*SNR);
mprintf("\n For 100 Mb/s, Pmin=%.2f uW",Pmin/1e-6);//Dividing by 10^(-6) to convert into uW
//Case(ii):
B=1e9;//Bit rate in b/s
Pmin=B/R*sqrt(2*%pi*kB*T*C*SNR);
mprintf("\n For 1 Gb/s, Pmin=%.2f uW",Pmin/1e-6);//Dividing by 10^(-6) to convert into uW
|
d57360423283527a57f8c98b6ec86e6e1e7f0edd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2912/CH5/EX5.7/Ex5_7.sce | edd70ed0e991bf495cc812f082e96b08f5b03d37 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 680 | sce | Ex5_7.sce | //chapter 5
//example 5.7
//Calculate velocity and kinetic energy
//page 105
clear;
clc;
//given
lambda=1.66E-10; // in m (wavelength)
m=9.1E-31; // in Kg (mass of electron)
h=6.626E-34; // in J-s (Planck's constant)
e=1.6E-19; // in C (charge on electron)
//calculate
// Since lambda=h/(m*v)
// Therefore we have
v=h/(m*lambda); // calculation of velocity
printf('\nThe velocity of electron is \tv=%1.3E m/s',v);
K=m*v^2/2;//calculation of kinetic energy
printf('\nThe kinetic energy is \tK=%1.4E J',K);
K=K/e; // changing unit from J to eV
printf('\n\t\t\t=%.3f eV',K);
// Note: The answer in the book for kinetic energy is wrong due to calculation mistake
|
68a5595a2dfa5fa0ac5d0c06b8b9a3d07ab761d0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1733/CH5/EX5.8/5_8.sce | 2d15940be2faac37ad0d1f3988f73ba35ebd1edd | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 460 | sce | 5_8.sce | //5.8
clc;
f=50;
Vin=230;
w=2*%pi*f;
L=20*10^-3;R=5;
th=atand(R/(w*L));
printf("Firing angle=%.2f degree",th)
disp('Therefore, Range of firing angle is 38.51 degree to 180 degree')
Beta=180;
printf("Conduction angle of thyristor=%.0f degree",Beta)
IL=Vin/((R^2+w^2*L^2))^0.5;
printf(" \nRMS load current =%.2f A", IL)
Po=IL^2*R;
printf(" \nPower Output =%.2f W", Po)
pf_input=Po/(Vin*IL);
printf(" \nInput Power factor =%.3f lagging", pf_input) |
3441964758b84af1298972ed7dcb3c32a74acb42 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3647/CH4/EX4.2/ex4_2.sce | e4083cb59814f93fb42604545ab5922ddb62416e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 263 | sce | ex4_2.sce | //Solutions to Problems In applied mechanics
//A N Gobby
clear all;
clc
//initialisation of variables
a=10//ft/s
x=1/12//ft/s
g=32.2//ft
//CALCULATIONS
P=2*%pi*sqrt(x/a)//sec
L=(P)/(2*%pi/sqrt(g))/2//ft
//RESULTS
printf('the simple pendulum =% f ft',L)
|
91e653af33a990a2e5a1230327f578482f016b7e | 76d58c93412c99ad3e8468ca843883add5b16d43 | /ads-influence2.sci | 9a513b7678b42b520382ec1b0e19c4fc9b4479c1 | [] | no_license | NnataKha/Mixed-plus-minus-interaction-conflict-model | cd6daadc26e6189720f088adf9a739072125f1fa | a02cf4c1c21dc5559721c219c93ad706f3af30be | refs/heads/master | 2020-03-16T18:52:00.884504 | 2018-05-10T11:24:44 | 2018-05-10T11:24:44 | 132,889,968 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,407 | sci | ads-influence2.sci | //Change plus/minus interaction depending on the scalar product of the vectors
//main
clear;
number_of_steps = 50;//number of inetrations
n = 3; //number of agents
a = [1,0];
agents(:,1) = zeros(n,1);
agents(:,2) = ones(n,1);
for i = 1:n
val(i,1) = abs(rand());
val(i,2) = abs(rand());
s = val(i,1)+val(i,2);
val(i,1) = val(i,1) / s;
val(i,2) = val(i,2) / s;
end
p = [0,0];
for i=1:n
for j =1:2
X(i,1,j) = agents(i,j)
end
end
for k = 1:number_of_steps
// Value(k,:) = v
for i = 1:n
p = [X(i,k,1) X(i,k,2)]
v = val(i,:)
tau = max(v.*p, v.*a)
p_temp = p + tau
s = sum(p_temp)
p = p_temp ./ s
X(i,k+1,1) = p(1)
X(i,k+1,2) = p(2)
end
end
t = [1:1:number_of_steps]
mean_val = mean(val,'c');
for k = 1:number_of_steps
for i =1:n
for j = 1:2
temp(j,i) = X(i,k,j)
end
end
mean_agents(k,1) = mean(temp(1,:),'c');
mean_agents(k,2) = mean(temp(2,:),'c');
end
//t=[1:1:number_of_steps+1]
//V1 = mean_val(1).*ones(1,number_of_steps+1)
//V2 = mean_val(2).*ones(1,number_of_steps+1)
//plot(t,V1,'r',t,V2,'r')
//plot(mean_agents)
//legend('innovation', 'old product')
for i=1:n
for k=1:number_of_steps
y1(i,k) = X(i,k,1)
y2(i,k) = X(i,k,2)
end
end
plot(t',y1,'--')
plot(t',y2)
|
9ae948d7a63316c744c90259118e696e3b2595e1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3392/CH2/EX2.2/Ex2_2.sce | 866942ac911b2d2118c18d79bbbbcf2950dda3b1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 843 | sce | Ex2_2.sce | clc
// initialization of variables
clear
sig_xx=20 // MPa
sig_yy=10 // MPa
sig_xy=30 // MPa
sig_xz=-10 // MPa
sig_yz=80 // MPa
I2=-7800 // (MPa)^2
// part (a)
// Assume sig_zz=k and evaluate determinants to solve for k
det1=sig_xx*sig_yy-sig_xy^2
//det2=k*sig_xx-sig_xz^2
//det3=k*sig_yy-sig_yz^2
k=(I2-det1+sig_xz^2+sig_yz^2)/(sig_xx+sig_yy)
sig_zz=k
I1=sig_xx+sig_yy+sig_zz
M=[sig_xx sig_xy sig_xz
sig_xy sig_yy sig_yz
sig_xz sig_yz sig_zz]
I3=det(M)
// p=poly([1 -I1 I2 -I3], "x")
p=[1 -I1 I2 -I3]
sigma=roots(p)
// results
printf('\n part (a) \n')
printf(' The unknown stress component is = %.d M Pa and the stress invariants I1, I2, I3 are respectively %.d , %.d , %.d ',sig_zz,I1,I2,I3)
printf('\n The principal stresses are sigma1= %.3f , sigma2=%.3f , sigma3=%.3f M Pa',sigma(2),sigma(3),sigma(1))
|
d3bf356ad873f6eb0c14a7e43a1abc1501b1d431 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2384/CH4/EX4.22/ex4_22.sce | d07a1bcf09e68aa34a3902fd569e36bb793d83e9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 468 | sce | ex4_22.sce | // Exa 4.22
clc;
clear;
close;
format('v',6)
// Given data
P = 100;// in W
V = 120;// in V
f= 50;// in Hz
I = P/V;// in A
V = 200;// in V
V_R = 120;// in V
V_L = sqrt( (V^2) - (V_R^2) );// in V
// V_L = I*X_L;
X_L = V_L/I;// in ohm
// X_L = 2*%pi*f*L;
L = X_L/(2*%pi*f);// in H
disp(L,"The value of pure inductance in H is");
// Note: There is calculation error to find the value of V_L, So the answer in the book is wrong and coding is correct.
|
f2b415af882db2b13c8528a317640f1eab44cb99 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1271/CH3/EX3.7/example3_7.sce | 0643404086189d81d15e1071e08e2d183ae9b48f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 357 | sce | example3_7.sce | clc
// Given that
alpha = %pi / 3 // angle between polarizer and analyzer
// Sample Problem 7 on page no. 3.25
printf("\n # PROBLEM 7 # \n")
r = (cos(alpha))^2 // where r = transmitted intensity / incident intensity
printf("\n Standard formula used \n r = (cos(alpha))^2. \n")
printf("\n Ratio between transmitted intensity to incident intensity = %f ",r)
|
5065faacda68cb117692be59999e31968a12b272 | 058366d0dd1a4214c2e310ce1875016834464d9b | /tools/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst | 14922edbdd77db5ccf7965d6c6b30d5b0196dfe6 | [
"LicenseRef-scancode-llnl",
"LicenseRef-scancode-hdf4",
"LicenseRef-scancode-hdf5"
] | permissive | dearman/HDF5 | 45ac8d017c401a3e48d5bc653b3233bcccfb6845 | d333f2c3e0d010cf46b00a64eb3d9e6c7658b84f | refs/heads/master | 2020-04-13T23:19:50.717938 | 2018-04-23T12:43:58 | 2018-04-23T12:43:58 | 163,503,639 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 547 | tst | plugin_none.h5repack_layout.UD.h5.tst | No all objects to modify layout
All objects to apply filter are...
Uncompress all
Making new file ...
-----------------------------------------
Type Filter (Compression) Name
-----------------------------------------
group /
dset (1.000:1) /dset1
dset (1.000:1) /dset2
dset (1.000:1) /dset3
dset (1.000:1) /dset4
dset (1.000:1) /dset_chunk
dset (1.000:1) /dset_compact
dset (1.000:1) /dset_contiguous
|
afd8216ee49b39ef2858d559cfd748790adc8fd9 | 089894a36ef33cb3d0f697541716c9b6cd8dcc43 | /NLP_Project/test/tweet/bow/bow.13_3.tst | 079bed454a7dcbdb409ed03f7aa3e0482a20ccdf | [] | no_license | mandar15/NLP_Project | 3142cda82d49ba0ea30b580c46bdd0e0348fe3ec | 1dcb70a199a0f7ab8c72825bfd5b8146e75b7ec2 | refs/heads/master | 2020-05-20T13:36:05.842840 | 2013-07-31T06:53:59 | 2013-07-31T06:53:59 | 6,534,406 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 15,428 | tst | bow.13_3.tst | 13 1:0.1111111111111111 6:0.058823529411764705 97:0.5 169:1.0 534:0.3333333333333333 908:0.5 955:0.5 1412:0.25 1492:0.5 1814:2.0 3644:1.0 4167:1.0 5125:0.25 5191:1.0 5211:1.0 6068:0.3333333333333333
13 34:0.1111111111111111 37:0.2 63:0.2 128:0.1111111111111111 206:0.3333333333333333 273:0.3333333333333333 534:0.3333333333333333 927:0.3333333333333333 1497:0.14285714285714285 2989:1.0 5226:0.3333333333333333 5378:1.0 5808:1.0
13 1:0.1111111111111111 5:0.5 132:1.0 135:0.2 171:0.5 339:0.5 1288:1.0 1497:0.2857142857142857 5214:1.0 5621:1.0 5866:1.0 5867:1.0 6136:1.0 6169:0.5 6658:1.0 6661:1.0 6663:1.0
13 5:0.5 34:0.1111111111111111 235:0.14285714285714285 258:1.0 339:0.5 441:0.08333333333333333 5775:1.0 5866:1.0
13 5:1.0 17:0.25 95:1.0 165:0.125 191:0.6666666666666666 583:1.0 1281:0.5 1389:0.5 5214:1.0 5334:1.0 5394:1.0 5939:0.16666666666666666 6068:0.3333333333333333 6169:0.5
13 6:0.058823529411764705 73:1.0 441:0.08333333333333333 1256:1.0 1412:0.25 5174:0.3333333333333333 5238:0.2 5394:1.0 5580:0.5 5939:0.16666666666666666
13 6:0.058823529411764705 114:0.3333333333333333 171:1.0 177:0.09090909090909091 223:0.14285714285714285 671:1.0 908:0.5 1586:1.0 1872:1.0 5125:0.25 5146:2.0 5191:1.0 5394:1.0 5939:0.16666666666666666 6068:0.3333333333333333 6199:1.0 6596:1.0
13 1:0.1111111111111111 4:1.0 5:0.5 17:0.5 82:0.16666666666666666 128:0.1111111111111111 424:1.0 1814:1.0 5103:0.125 5226:0.3333333333333333 5297:1.0 5394:1.0 5701:1.0 5939:0.16666666666666666
13 23:0.125 49:1.0 51:0.25 128:0.1111111111111111 135:0.2 146:1.0 150:0.04 171:0.5 190:1.0 320:1.0 338:1.0 1098:1.0 1412:0.5 1499:1.0 3083:2.0 4556:1.0 5146:1.0 5214:1.0 5459:1.0 5628:1.0 6068:0.3333333333333333 6117:1.0 6200:1.0 6598:2.0
13 17:0.25 25:0.5 64:0.25 114:0.3333333333333333 129:0.5 135:0.2 169:1.0 177:0.09090909090909091 223:0.14285714285714285 226:0.3333333333333333 1123:0.5 1586:1.0 5179:1.0 5341:0.5 5621:1.0
13 4:1.0 5:0.5 42:1.0 114:0.3333333333333333 128:0.1111111111111111 249:0.3333333333333333 251:0.5 911:1.0 1905:1.0 3337:1.0 5226:0.3333333333333333 5273:1.0 5306:1.0 5381:0.2 5434:1.0 5600:0.3333333333333333 6646:1.0
13 6:0.058823529411764705 171:0.5 235:0.14285714285714285 2796:1.0 5121:0.16666666666666666 5125:0.25 5238:0.2 5311:1.0 5759:1.0 6297:1.0 6300:1.0 6419:1.0
13 5394:1.0 5468:1.0 5939:0.16666666666666666
13 6:0.058823529411764705 34:0.1111111111111111 37:0.2 1734:1.0 5394:1.0 5522:1.0 5939:0.16666666666666666
13 25:0.5 30:0.5 37:0.2 42:1.5 56:0.6666666666666666 73:1.0 169:1.0 235:0.2857142857142857 424:1.0 523:1.0 911:1.0 1412:0.5 1472:1.0 1522:1.0 2119:1.0 4616:1.0 5270:1.0 5381:0.2 5394:1.0 5600:0.3333333333333333 5842:1.0 5939:0.16666666666666666
13 17:0.25 37:0.2 42:0.5 56:0.3333333333333333 177:0.09090909090909091 946:1.0 1210:0.5 1543:1.0 2782:1.0 4341:1.0 5226:0.3333333333333333 5296:1.0 5394:1.0 5582:1.0 5939:0.16666666666666666 6158:1.0
13 82:0.16666666666666666 155:0.09090909090909091 177:0.09090909090909091 320:4.0 441:0.08333333333333333 549:1.0 583:1.0 587:1.0 622:0.5 671:3.0 730:1.0 1345:1.0 3628:1.0 4259:3.0 5124:1.0 5125:0.25 5146:1.0 5158:1.0 5191:1.0 5334:1.0 5346:0.3333333333333333 5678:1.0 5708:1.0 5991:0.5 6341:1.0
13 5:0.5 82:0.16666666666666666 114:0.3333333333333333 2676:1.0 5394:1.0 5520:1.0 5521:1.0 5796:1.0 5939:0.16666666666666666
13 1:0.1111111111111111 4:2.0 5:0.5 114:0.6666666666666666 128:0.1111111111111111 129:0.5 135:0.2 223:0.14285714285714285 226:0.3333333333333333 410:1.0 725:1.0 1219:1.0 1281:0.5 1412:0.5 1586:1.0 2101:1.0 3595:0.3333333333333333 4250:0.3333333333333333 5341:0.5 5394:1.0 5939:0.16666666666666666
13 1:0.1111111111111111 5:0.5 17:0.25 63:0.2 64:0.25 97:0.5 235:0.14285714285714285 320:1.0 1053:1.0 1412:0.25 1497:0.14285714285714285 1806:1.0 2783:1.0 5170:0.5 5340:0.14285714285714285 5394:1.0 5939:0.16666666666666666 6656:1.0
13 1:0.1111111111111111 53:1.0 64:0.25 169:1.0 177:0.09090909090909091 226:0.3333333333333333 5330:1.0
13 4:1.0 37:0.2 275:1.0 892:1.0 1497:0.14285714285714285 1806:1.0 2500:1.0 2676:1.0 5939:0.16666666666666666
13 5:0.5 42:0.5 51:0.25 89:1.0 197:0.5 411:1.0 927:0.3333333333333333 1497:0.14285714285714285 3959:1.0 5121:0.16666666666666666 5394:1.0 5759:1.0 5939:0.16666666666666666
13 1:0.1111111111111111 177:0.09090909090909091 443:1.0 1412:0.25 1497:0.14285714285714285 5121:0.16666666666666666 5394:1.0 5939:0.16666666666666666
13 37:0.2 441:0.08333333333333333 927:0.3333333333333333 1412:0.25 1497:0.14285714285714285 5121:0.16666666666666666 5394:1.0 5939:0.16666666666666666
13 25:0.5 37:0.2 155:0.09090909090909091 235:0.14285714285714285 320:1.0 534:0.3333333333333333 1123:0.5 1389:0.5 1497:0.2857142857142857 5394:1.0 5939:0.16666666666666666 5991:0.5
13 73:1.0 522:1.0 908:0.5 1412:0.25 1497:0.14285714285714285 1572:1.0 5270:1.0 5394:1.0 5735:1.0 5939:0.16666666666666666
13 6:0.058823529411764705 56:0.6666666666666666 105:0.25 114:0.3333333333333333 128:0.1111111111111111 226:0.3333333333333333 292:2.0 319:0.08333333333333333 647:1.0 949:0.5 1412:0.5 2956:1.0 5191:1.0 5211:1.0 5239:1.0 5307:1.0 5394:1.0 5468:1.0 6300:2.0
13 6:0.058823529411764705 64:0.25 97:0.5 105:0.25 109:1.0 128:0.1111111111111111 147:0.25 226:0.3333333333333333 336:0.5 373:0.1 486:1.0 522:1.0 534:0.6666666666666666 2791:1.0 2892:1.0 4155:1.0 5166:0.16666666666666666 5270:1.0 6059:1.0 6157:1.0
13 6:0.058823529411764705 37:0.2 42:0.5 63:0.2 143:0.3333333333333333 155:0.09090909090909091 169:1.0 197:0.5 312:1.0 587:1.0 908:0.5 914:1.0 1412:0.5 1472:1.0 1814:2.0 2325:1.0 3683:1.0 3736:1.0 5125:0.25 5260:1.0 6157:1.0 6171:1.0
13 17:0.25 34:0.1111111111111111 37:0.2 42:0.5 56:0.3333333333333333 231:0.5 235:0.14285714285714285 245:0.125 1013:1.0 1412:0.25 6169:0.5
13 4:1.0 5:0.5 6:0.11764705882352941 17:0.25 23:0.125 37:0.2 42:0.5 135:0.2 150:0.04 169:1.0 177:0.09090909090909091 245:0.125 474:1.0 587:1.0 648:1.0 795:1.0 927:0.3333333333333333 1160:1.0 1412:0.5 3028:1.0 4259:1.0 5249:0.3333333333333333 5459:1.0 5517:1.0 5735:1.0 5975:1.0
13 5:0.5 6:0.058823529411764705 114:0.3333333333333333 128:0.1111111111111111 139:0.5 671:1.0 735:1.0 778:0.2 785:1.0 4927:1.0 5123:1.0
13 1:0.3333333333333333 56:0.3333333333333333 82:0.16666666666666666 97:0.5 114:0.3333333333333333 135:0.2 150:0.04 223:0.14285714285714285 318:1.0 319:0.08333333333333333 386:0.3333333333333333 534:0.3333333333333333 561:1.0 717:1.0 737:1.0 1412:0.25 1509:0.5 2752:1.0 2966:1.0 3491:1.0
13 1:0.2222222222222222 6:0.17647058823529413 45:1.0 56:0.3333333333333333 63:0.2 114:0.3333333333333333 177:0.18181818181818182 223:0.14285714285714285 319:0.08333333333333333 373:0.1 427:0.5 671:1.0 1028:1.0 1037:1.0 1345:1.0 1412:0.75 1586:1.0 1885:1.0 2070:1.0 2288:1.0 4498:0.5 5226:0.3333333333333333 5340:0.14285714285714285 5603:1.0 5787:1.0
13 17:0.25 63:0.2 177:0.09090909090909091 191:0.3333333333333333 223:0.14285714285714285 226:0.3333333333333333 319:0.08333333333333333 1412:0.25 1586:1.0 5174:0.3333333333333333 5238:0.2 5334:1.0 5394:1.0 6169:0.5
13 1:0.1111111111111111 23:0.125 56:0.3333333333333333 82:0.16666666666666666 177:0.09090909090909091 204:1.0 320:1.0 340:1.0 671:1.0 1013:1.0 1412:0.5 2431:0.5 5226:0.3333333333333333 5340:0.14285714285714285 6498:1.0
13 4:1.0 5:0.5 42:0.5 128:0.1111111111111111 911:1.0 1905:1.0 5226:0.3333333333333333 5273:1.0 5381:0.2 5434:1.0 5600:0.3333333333333333 5625:1.0 6646:1.0
13 1:0.2222222222222222 5:1.0 17:0.25 34:0.1111111111111111 97:0.5 128:0.1111111111111111 135:0.2 185:1.0 534:0.3333333333333333 549:1.0 927:0.3333333333333333 1236:1.0 1572:1.0 2317:1.0 3767:1.0 5367:1.0 5604:1.0 6036:1.0 6169:0.5
13 6:0.11764705882352941 42:0.5 56:0.3333333333333333 186:1.0 273:0.3333333333333333 1412:0.25 5217:0.5 5313:2.0
13 6:0.058823529411764705 135:0.2 671:1.0 1412:0.25 3006:1.0 5276:1.0 5340:0.14285714285714285 5394:1.0 6045:1.0
13 114:0.3333333333333333 128:0.2222222222222222 441:0.08333333333333333 1955:1.0 2759:0.5 2927:1.0 5187:0.16666666666666666 5834:1.0 6169:0.5
13 830:1.0
13 114:0.3333333333333333 150:0.04 2288:1.0 5125:0.25 6169:0.5
13 150:0.04 549:1.0 1515:1.0 5170:0.5 6169:0.5
13 1:0.1111111111111111 63:0.2 441:0.08333333333333333 840:1.0 1509:0.5 5121:0.16666666666666666 5125:0.25 5215:1.0 5260:1.0 5307:1.0 5554:1.0 5669:1.0 6169:0.5
13 56:0.3333333333333333 114:0.6666666666666666 190:1.0 272:0.5 359:0.5 399:0.5 409:1.0 728:1.0 1497:0.14285714285714285 1522:1.0 5119:0.16666666666666666 5214:1.0 5247:1.0 5515:0.25
13 64:0.25 82:0.16666666666666666 369:0.5 908:0.5 3656:1.0 5146:1.0 5187:0.16666666666666666 5277:1.0 5301:1.0 5519:1.0 6169:0.5
13 1:0.1111111111111111 42:0.5 82:0.16666666666666666 105:0.25 147:0.25 150:0.04 1109:1.0 1537:0.5 5114:1.0 5404:0.5
13 42:0.5 114:0.3333333333333333 169:1.0 177:0.09090909090909091 320:1.0 5121:0.16666666666666666 5889:1.0 6541:1.0
13 6:0.058823529411764705 587:1.0 3419:1.0 4039:1.0 6635:1.0
13 4:1.0 5:0.5 6:0.058823529411764705 97:0.5 128:0.1111111111111111 441:0.08333333333333333 949:0.5 5103:0.125
13 5:0.5 56:0.3333333333333333 114:0.3333333333333333 1033:1.0 1389:0.5 1412:0.5 3595:0.3333333333333333 5307:1.0 5346:0.3333333333333333 6169:0.5 6531:1.0
13 1:0.1111111111111111 5:0.5 15:0.07692307692307693 17:0.5 53:1.0 60:1.0 64:0.25 114:0.3333333333333333 164:0.3333333333333333 171:0.5 177:0.09090909090909091 1537:0.5 3595:0.3333333333333333 3701:1.0 4259:1.0 5463:1.0 6169:0.5
13 5:1.0 17:0.5 42:1.0 114:0.3333333333333333 251:0.5 373:0.1 622:0.5 668:1.0 927:0.3333333333333333 1033:1.0 1123:0.5 1295:1.0 1412:0.5 1432:1.0 3595:0.3333333333333333 5123:1.0 5125:0.25 5128:1.0 5238:0.2
13 23:0.125 31:1.0 114:0.3333333333333333 339:0.5 534:0.3333333333333333 795:1.0 878:1.0 1412:0.25 2852:1.0 5712:1.0 5955:1.0 6346:1.0 6586:1.0
13 5:0.5 6:0.058823529411764705 778:0.2 1669:1.0 5169:0.5 5785:1.0 6503:1.0
13 5:0.5 17:0.25 49:1.0 60:1.0 441:0.08333333333333333 3379:1.0 3977:1.0 5238:0.2 5394:1.0 5573:1.0 6169:0.5
13 169:1.0 177:0.09090909090909091 1412:0.25 4556:1.0 5260:2.0 5994:1.0 6427:1.0
13 1:0.1111111111111111 5:0.5 6:0.058823529411764705 31:1.0 147:0.25 150:0.04 169:1.0 427:0.5 1412:0.75 1580:1.0 2966:1.0 4425:1.0 5174:0.3333333333333333 5208:1.0 5217:0.5 5238:0.2 6068:0.3333333333333333
13 97:0.5 177:0.09090909090909091 459:1.0 1412:0.25 5121:0.16666666666666666 5125:0.25 5174:0.3333333333333333 5238:0.2 6300:1.0
13 17:0.25 34:0.1111111111111111 339:0.5 1347:1.0 1412:0.25 1497:0.14285714285714285 1509:0.5 2285:1.0 5110:1.0 5238:0.2 6663:1.0
13 63:0.2 344:1.0 587:2.0 1412:0.25 4259:1.0 5125:0.25 5191:1.0 5634:1.0 6659:1.0 6660:1.0
13 17:0.25 51:0.25 226:0.3333333333333333 5346:0.3333333333333333 5394:1.0
13 1:0.1111111111111111 17:0.5 42:0.5 545:1.0 1412:0.75 1432:1.0 1580:1.0 2535:1.0 3595:0.3333333333333333 3701:1.0 3859:1.0 5507:1.0 6180:0.5 6258:1.0
13 5:1.0 6:0.058823529411764705 64:0.25 82:0.16666666666666666 231:0.5 312:1.0 386:0.3333333333333333 587:1.0 1013:1.0 1412:0.25 1669:1.0 1740:1.0 1872:1.0 2252:1.0 2571:1.0 2942:1.0 3516:1.0 3998:1.0 5381:0.2
13 1:0.4444444444444444 6:0.058823529411764705 23:0.125 31:1.0 56:0.3333333333333333 82:0.16666666666666666 96:0.14285714285714285 97:0.5 114:0.3333333333333333 135:0.2 177:0.09090909090909091 261:0.05555555555555555 318:1.0 367:2.0 409:1.0 427:0.5 561:1.0 615:1.0 1412:0.25 1471:1.0 2966:1.0 3767:1.0 5098:1.0 5394:1.0 5780:1.0
13 101:0.5 114:0.3333333333333333 128:0.1111111111111111 223:0.14285714285714285 1123:0.5 4054:1.0 5121:0.16666666666666666 5360:1.0 6592:1.0
13 6:0.058823529411764705 37:0.2 71:0.5 82:0.16666666666666666 128:0.1111111111111111 191:0.3333333333333333 223:0.14285714285714285 231:0.5 506:1.0 561:1.0 642:0.5 1013:1.0 1311:1.0 1497:0.2857142857142857 1586:1.0 1776:1.0 2640:1.0 3604:1.0 5394:1.0
13 5:0.5 17:0.25 37:0.2 82:0.16666666666666666 768:0.5 1497:0.14285714285714285 1814:1.0 3595:0.3333333333333333 5166:0.16666666666666666 5394:1.0 5604:1.0 5630:1.0
13 6:0.058823529411764705 23:0.125 37:0.2 60:1.0 63:0.2 82:0.16666666666666666 671:1.0 908:0.5 1412:0.25 4923:1.0 5334:1.0 5340:0.14285714285714285 5411:1.0 5848:1.0 5939:0.16666666666666666 5986:1.0 6169:0.5
13 6:0.058823529411764705 51:0.25 56:0.3333333333333333 3133:1.0 3743:1.0 5174:0.3333333333333333 5394:1.0 5520:1.0
13 6:0.11764705882352941 34:0.1111111111111111 37:0.2 60:1.0 73:1.0 795:1.0 5334:1.0 5360:1.0 5569:1.0 5590:1.0 6169:0.5
13 25:0.5 96:0.14285714285714285 114:0.3333333333333333 150:0.04 191:0.3333333333333333 197:0.5 226:0.3333333333333333 292:1.0 1661:1.0 5179:1.0 5187:0.16666666666666666 5214:1.0 5381:0.2 5394:1.0 5515:0.25
13 2282:1.0
13 1:0.1111111111111111 462:1.0 3169:1.0 4082:1.0 5121:0.16666666666666666 5678:1.0 6420:1.0
13 6:0.058823529411764705 97:0.5 114:0.3333333333333333 1295:1.0 1509:0.5 1956:1.0 5515:0.25 5543:0.5 5790:1.0 5798:1.0 6203:1.0 6417:1.0
13 42:0.5 177:0.09090909090909091 228:0.5 1956:1.0 4054:1.0 5121:0.16666666666666666
13 15:0.07692307692307693 17:0.25 23:0.125 73:1.0 399:1.0 514:1.0 553:1.0 1389:0.5 4770:1.0 5334:1.0 5335:0.5 5396:0.3333333333333333
13 1:0.1111111111111111 5:0.5 427:0.5 549:1.0 1448:0.5 5447:1.0
13 1:0.1111111111111111 6:0.058823529411764705 34:0.1111111111111111 63:0.2 135:0.2 312:1.0 410:1.0 1295:1.0 1814:1.0 2547:1.0 4039:1.0 5573:1.0
13 1:0.1111111111111111 5:0.5 17:0.25 34:0.1111111111111111 63:0.2 114:0.3333333333333333 135:0.2 339:0.5 402:1.0 443:1.0 549:1.0 927:0.3333333333333333 1295:1.0 1412:0.25 2666:1.0 3854:1.0 5052:1.0 5121:0.16666666666666666 5166:0.16666666666666666 5174:0.3333333333333333 5515:0.25 5573:1.0 5945:1.0 6258:1.0
13 5:1.0 60:1.0 63:0.2 114:0.3333333333333333 128:0.2222222222222222 147:0.25 226:0.3333333333333333 235:0.14285714285714285 245:0.125 339:0.5 350:0.16666666666666666 441:0.08333333333333333 791:0.5 949:0.5 1210:0.5 1537:1.0 1572:1.0 5270:1.0 5463:1.0 5520:1.0 5580:0.5 5902:1.0
13 56:0.3333333333333333 82:0.16666666666666666 180:0.5 231:0.5 5121:0.16666666666666666 5174:0.3333333333333333 5217:0.5 5238:0.2
13 6:0.058823529411764705 56:0.3333333333333333 319:0.08333333333333333 2003:1.0 3794:1.0 4276:1.0 5238:0.2 5323:1.0
13 17:0.25 42:0.5 169:1.0 292:1.0 320:1.0 644:1.0 1412:0.25 1497:0.2857142857142857 6050:1.0 6334:1.0
13 23:0.125 42:0.5 95:1.0 96:0.14285714285714285 251:0.5 1083:1.0
13 117:0.0625 908:0.5 949:0.5 1497:0.14285714285714285 2279:1.0
13 1160:1.0 1696:1.0 5513:1.0
13 5:0.5 17:0.25 23:0.125 114:0.3333333333333333 226:0.3333333333333333 866:1.0 927:0.3333333333333333 1412:0.25 1497:0.14285714285714285 5297:1.0 5395:1.0 5443:1.0 5991:0.5
13 6:0.058823529411764705 1033:1.0 1579:1.0 2139:1.0 5134:1.0
13 5:0.5 42:1.0 150:0.04 169:1.0 533:0.25 778:0.2 2789:0.3333333333333333 5099:2.0
13 34:0.1111111111111111 56:0.3333333333333333 64:0.25 150:0.04 584:1.0 949:0.5 1288:1.0 1389:0.5 1497:0.14285714285714285 5126:1.0 5307:1.0 5844:1.0
13 25:0.5 129:0.5 1295:1.0 1389:0.5 1706:1.0 2796:1.0 5554:1.0 5764:1.0 5843:1.0
13 25:0.5 129:0.5 681:0.3333333333333333 1295:1.0 1389:0.5 1412:0.25 1706:1.0 5499:1.0 5554:1.0 5588:1.0 5764:1.0
13 5:0.5 34:0.1111111111111111 1497:0.14285714285714285 1814:1.0 5304:1.0 5346:0.3333333333333333 5449:1.0
13 4:1.0 5:0.5 908:0.5 1497:0.14285714285714285 5103:0.125
13 5:0.5 6:0.058823529411764705 42:0.5 51:0.25 71:0.5 96:0.14285714285714285 135:0.2 190:1.0 191:0.3333333333333333 245:0.125 424:1.0 441:0.08333333333333333 474:0.5 534:0.3333333333333333 583:1.0 1033:1.0 1743:1.0 2231:1.0 2849:1.0 5123:1.0 5142:1.0 5143:1.0 5701:1.0
13 6:0.058823529411764705 42:0.5 56:0.3333333333333333 96:0.14285714285714285 1083:1.0 5125:0.25
|
3341135742c149ec91cf95efc4a4e14112afa194 | 30ad7dd5146dfff03b7639186330ec527bfc0524 | /Control Systems Programs/Bode Plot.sce | 772e9b5bf0e2a89261dd03949df1bf3767a13314 | [] | no_license | boberae/Other-Small-Projects | fcc79d8fd69c6d39de68a8b83360b32b28216d73 | 63d668d2f2c022f653cf44f55992dd05420437e3 | refs/heads/master | 2020-06-11T10:07:44.474211 | 2016-12-06T06:42:33 | 2016-12-06T06:42:33 | 75,697,420 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 851 | sce | Bode Plot.sce | steps_per_dec = 6;
decades = 6;
start_freq = 0.1;
// the transfer function
function foo=G(w)
D = %i*w;
foo = ((D+1000)/(D^2+5*D+100));
endfunction
// this section writes the values to a datafile that may be graphed in a spreadsheet
fd = mopen("data.txt", "w");
for step = 0:(steps_per_dec*decades),
f = start_freq*10^(step/steps_per_dec); //calculate the next frequency
w = f*2*%pi; //convert the frequency to radians
[gain,phase] = polar(G(w)); //find the gain and convert it to mag and angle
gaindb = 20*log10(gain); //convert magnitude to dB
phasedeg = 180*phase/%pi; //convert to degrees
//mfprint(fd, "%f, %f, %f \n", f, gaindb, phasedeg);
end
mclose(fd);
//to graph it directly the following is used
D = poly(0, 'D');
h = syslin('c', ((D+1000)/(D^2+5*D+100)));
bode(h, 0.1, 1000, 'Sample Transfer Function');
|
071987d48a04a9c7e4d6ec983849d0899a9ba426 | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/rc2poly/rc2poly4.sce | 729eb99fcd72081abb6cdd41bac9d2f0b8ab9b81 | [] | 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 | 503 | sce | rc2poly4.sce | k = [0.3090 0.9800 0.0031 0.0082 0.0082];
l = [10 0.9800 0.0031 0.0082 0.0082];
[a, efinal] = rc2poly(k,l)
disp(a);
disp(efinal);
//output
//!--error 15
//Submatrix incorrectly defined.
//at line 44 of function rc2poly called by :
//[a, efinal] = rc2poly(X,l)
//at line 3 of exec file called by :
//2poly\rc2poly4.sce', -1
//MATLAB o/p
//Subscripted assignment dimension mismatch.
//Error in rc2poly (line 54)
//e(1) = e0.*(1-kr(1)'.*kr(1));
|
c884425b464297511987a052ad1e43a9565b732f | 449d555969bfd7befe906877abab098c6e63a0e8 | /944/CH5/EX5.5/example5_5_TACC.sce | f37567929a4235e601b824dc010ac67653c64fe0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 351 | sce | example5_5_TACC.sce | //example 5.5
clear;
clc;
//Given:
T=298;//Temperature [K]
n=1;//no. of moles
V1=500;//initial volume [cm3]
V2=1000;//final volume [cm3]
R=8.314;//Universal gas constant [J/mol/K]
//to find the molar entropy change
S=R*log(V2/V1)//molar entropy change at constant temperature[J/K]
printf("Molar entropy change of argon = %f J/K", S);
|
478d625cf47b3afda1cf51d7891309128c1c8e8f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3845/CH17/EX17.3/Ex17_3.sce | 55b79f5cb923dfbaea098b1f3de5ac31b2206bb0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 366 | sce | Ex17_3.sce | //Example 17.3
ratio=2;//Ratio of the two sound wave intensities, I2/I1
delta_beta=10*log10(ratio);//Difference in sound intensity levels, beta2-beta1, (dB)
printf('Difference in sound level = %0.2fdB (when one sound wave is twice as intense as the other)',delta_beta)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|
5ccb809fff1fd3c9b923b3a2814d01f690aeaddb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2621/CH2/EX2.9/Ex2_9.sce | 38d78f6fb82d524c0af2732c1e7cfc1a625815a6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 627 | sce | Ex2_9.sce | // Example 2.9
clc;
clear;
close;
// Given data
format('v',9);
V1= 745;// in µV
V2= 740;// in µV
Ad= 5*10^5;// differential voltage gain
CMRR= 80;// in dB
CMRR= 10^(CMRR/20);
Vd= V1-V2;// difference signal in µV
Vcm= (V1+V2)/2;// common-mode signal in µV
// Output voltage,
Vout= Ad*Vd*(1+1/CMRR*Vcm/Vd);// in µV
AdVd= Ad*Vd;// in µV
// Error voltage
Verror= Vout-AdVd;// in µV
Vout= Vout*10^-6;// in V
Verror= Verror*10^-6;// in V
Per_error= Verror/Vout*100;// percentage error
disp(Vout,"The output voltage in volts is : ")
disp(Per_error,"The percentage error in the output voltage is : ")
|
641ae995d1ea44790a894943bdfacacc98aa51db | 449d555969bfd7befe906877abab098c6e63a0e8 | /1067/CH21/EX21.04/21_04.sce | 1c0e095386f2e0d27ec6708d380b3e8714ef29e6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,414 | sce | 21_04.sce | clear;
clc;
ia=20;
ib=20*(%e^(%i*%pi));
ic=0;
a=1*%e^(%i*(120*%pi/180));
b=a^2;
ia0=1/3*(ia+ib+ic);
ia1=1/3*(ia+(a*ib)+(b*ic));
ia2=1/3*(ia+(b*ib)+(a*ic));
ia0r=real(ia0);
ia0i=imag(ia0);
ia0m=sqrt((ia0r^2)+(ia0i^2));
ia0a=0-atand(ia0r/ia0i);
ia1r=real(ia1);
ia1i=imag(ia1);
ia1m=sqrt((ia1r^2)+(ia1i^2));
ia1a=atand(ia1i/ia1r);
ia2r=real(ia2);
ia2i=imag(ia2);
ia2m=sqrt((ia2r^2)+(ia2i^2));
ia2a=atand(ia2i/ia2r);
mprintf("the symmetric components are \n ia0=%f+j%f A \tor\t %f/_%d A",ia0r,ia0i,ia0m,ia0a);
mprintf("\n ia1=%f+j%f A \tor\t %f/_%d A",ia1r,ia1i,ia1m,ia1a);
mprintf("\n ia2=%f+j(%f) A \tor\t %f/_%d A",ia2r,ia2i,ia2m,ia2a);
ib1=b*ia1;
ib2=a*ia2;
ic1=a*ia1;
ic2=b*ia2;
ib0=ia0;
ic0=ia0;
ib1r=real(ib1);
ib1i=imag(ib1);
ib1m=sqrt((ib1r^2)+(ib1i^2));
ib1a=atand(ib1i/ib1r);
ib2r=real(ib2);
ib2i=imag(ib2);
ib2m=sqrt((ib2r^2)+(ib2i^2));
ib2a=atand(ib2i/ib2r);
ic1r=real(ic1);
ic1i=imag(ic1);
ic1m=sqrt((ic1r^2)+(ic1i^2));
ic1a=atand(ic1i/ic1r);
ic2r=real(ic2);
ic2i=imag(ic2);
ic2m=sqrt((ic2r^2)+(ic2i^2));
ic2a=atand(ic2i/ic2r);
mprintf("\n \n ib0=%fA ",ib0);
mprintf("\n ib1=%f+j%f A \tor\t %f/_%d A",ib1r,ib1i,ib1m,ib1a);
mprintf("\n ib2=%f+j(%f) A \tor\t %f/_%d A",ib2r,ib2i,ib2m,ib2a);
mprintf("\n \n ic0=%f A",ic0);
mprintf("\n ic1=%f+j%f A \tor\t %f/_%d A",ic1r,ic1i,ic1m,ic1a);
mprintf("\n ic2=%f+j(%f) A \tor\t %f/_%d A",ic2r,ic2i,ic2m,ic2a);
|
51dabc0e0a9f799bfc9ed7bc1a8e696caa708656 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1694/CH1/EX1.20/EX1_20.sce | 66152fb91e1ee94d884ccea4ae6445bf16a3f226 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 318 | sce | EX1_20.sce | clear;
clc;
printf("\nEx1.20\n");
//page no.-33
//given
a=2.9*10^-10;......//lattice constant in m
M=55.85;........//atomic wt. of Ge
N=6.02*10^26;....//avagadro no.
rho=7870;........//density in Kg/m^3
n=(a^3*rho*N)/M........//no. of atoms per unit cell
printf("\nNo. of atoms per unit cell is 2 \n");
|
cd1ce4086ab248d67bdb2605893527e570fb21bb | 449d555969bfd7befe906877abab098c6e63a0e8 | /3492/CH2/EX2.14/Ex2_14.sce | 5e4abd604213de757dd8f4646c9206e0d71db8e3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 185 | sce | Ex2_14.sce | clc
//Chapter2
//Ex_2.14
//Given
Xd=0.15
p_c=4*10^-8 //ohm*m
p_eff=p_c((1+0.5*Xd)/(1-Xd))
disp(p_eff,"Effective resistivity in ohm m is")
// change in the answer due to coding
|
582c2276178bd3f260c7a1852061b17da70c2f90 | 4a1effb7ec08302914dbd9c5e560c61936c1bb99 | /Project 2/Experiments/Ripper-C/results/Ripper-C.led7digit-10-1tra/result3s0.tst | 7691e4232e4702f4b2f30ddb6a8cf6daecd04a44 | [] | no_license | nickgreenquist/Intro_To_Intelligent_Systems | 964cad20de7099b8e5808ddee199e3e3343cf7d5 | 7ad43577b3cbbc0b620740205a14c406d96a2517 | refs/heads/master | 2021-01-20T13:23:23.931062 | 2017-05-04T20:08:05 | 2017-05-04T20:08:05 | 90,484,366 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 535 | tst | result3s0.tst | @relation led7digit
@attribute Led1 real[0.0,1.0]
@attribute Led2 real[0.0,1.0]
@attribute Led3 real[0.0,1.0]
@attribute Led4 real[0.0,1.0]
@attribute Led5 real[0.0,1.0]
@attribute Led6 real[0.0,1.0]
@attribute Led7 real[0.0,1.0]
@attribute number{0,1,2,3,4,5,6,7,8,9}
@inputs Led1,Led2,Led3,Led4,Led5,Led6,Led7
@outputs number
@data
1 1
2 2
2 2
5 6
9 9
5 6
7 1
8 6
8 8
0 0
1 1
4 4
1 1
2 2
9 9
3 4
3 9
6 5
0 8
1 1
2 2
2 2
3 9
7 2
8 0
9 4
0 0
4 4
5 6
6 6
7 1
7 1
3 3
4 4
5 9
5 6
6 6
7 1
8 6
0 6
0 0
3 9
4 4
4 4
5 6
6 6
7 1
8 6
9 9
9 6
|
ae58c3eba30b8c1a2ed49d61005d4f363b89c36d | 1db0a7f58e484c067efa384b541cecee64d190ab | /macros/idst1.sci | 98fc87461abbb7b8b7dbaa400a96b8eb8f591a5f | [] | no_license | sonusharma55/Signal-Toolbox | 3eff678d177633ee8aadca7fb9782b8bd7c2f1ce | 89bfeffefc89137fe3c266d3a3e746a749bbc1e9 | refs/heads/master | 2020-03-22T21:37:22.593805 | 2018-07-12T12:35:54 | 2018-07-12T12:35:54 | 140,701,211 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 823 | sci | idst1.sci | function y = idst1(x,varargin)
//This function computes the inverse type I discrete sine transform.
//Calling Sequence
//Y = idst(X)
//Y = idst(X, N)
//Parameters
//X: Matrix or integer
//N: If N is given, then X is padded or trimmed to length N before computing the transform.
//Description
//This function computes the inverse type I discrete sine transform of Y. If N is given, then Y is padded or trimmed to length N before computing the transform. If Y is a matrix, compute the transform along the columns of the the matrix.
//Examples
//idst([1,3,6])
//ans =
// 3.97487 -2.50000 0.97487
funcprot(0);
rhs=argn(2);
if(rhs<1 | rhs>2) then
error("Wrong number of input arguments.");
end
select(rhs)
case 1 then
y=callOctave("idst",x);
case 2 then
y=callOctave("idst",x,varargin(1));
end
endfunction
|
b11d3ab01d61dcedb468a956cf33e65773a459d0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1061/CH10/EX10.9/Ex10_9.sce | 6ce9e2353e6f1cbbb18f1c0ed6a8b8bf3ec28eb6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex10_9.sce | //Ex:10.9
clc;
clear;
close;
Br=20*10^6;// data rate in b/s
c=3*10^8;// speed of light in m/s
y=86*10^-9;// wavelength in m
dy=30*10^-9;// spectral width in m
X=0.024;
Tb=1/Br;
Lmax=(0.35*Tb*c*y)/(dy*X);// material dispersion limited transmission distance for RZ coding in m
printf("The material dispersion limited transmission distance =%d m", Lmax); |
010ea563ec584deb16b62e2546042915f937f5ef | 449d555969bfd7befe906877abab098c6e63a0e8 | /564/CH14/EX14.2/14_2.sce | cd8548a558437e70acc9bf192155a2d61899bfc5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 464 | sce | 14_2.sce | pathname=get_absolute_file_path('14_2.sce')
filename=pathname+filesep()+'14_2data.sci'
exec(filename)
clear
ax=Rh/(W/g);//horizontal deceleration
ay=(Rv-W)/(W/g);//vertical deceleration
Ialpha=Rv*Sh +Rh*Sv;
alpha=(Ialpha*10^6)/Icg;
t=v0/ay;
omega=alpha*t;
printf("\nhorizontal reaction force: %f kN",W*ax/g);
printf("\nvertical reaction force: %f kN",W*ay/g);
printf("\nα: %f rad/s^2",alpha);
printf("\nt: %f s",t);
printf("\nω: %f rad/s",omega);
|
515237973c45fcff835d6067f75a04c9ff7ac498 | 449d555969bfd7befe906877abab098c6e63a0e8 | /213/CH10/EX10.7/10_7.sce | 856381c1d6cd1a0bdcab1dd0d7fae0a5962bf0fe | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 582 | sce | 10_7.sce | //To find diameter of hand wheel
clc
//Given:
d=50,p=12.5,D=60,R=D/2 //mm
W=10*1000,P1=100 //N
mu=0.15,mu1=0.18
//Solution:
//Calculating the helix angle
alpha=atan(p/(%pi*d)) //radians
//Calculating the tangential force required at the circumference of the screw
phi=atan(mu) //Limiting angle of friction, radians
P=W*tan(alpha+phi) //N
//Calculating the total torque required to turn the hand wheel
T=P*d/2+mu1*W*R //N-mm
//Calculating the diameter of the hand wheel
D1=T/(2*P1*1000)*2 //m
//Results:
printf("\n\n Diameter of the hand wheel, D1 = %.3f m.\n\n",D1) |
ba48e939e20bce53ad1bf20a59f16e7d68422b46 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3843/CH3/EX3.6/Ex3_6.sce | c075fbd932a76a66ad08928eee87840b11dfa826 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 262 | sce | Ex3_6.sce | // Example 3_6
clc;funcprot(0);
// Given data
T=100;// The torque in N.m
n=3000;// rpm
// Calculation
omega=n*(2*%pi)*(1/60);// rad/s
W=T*omega;// The power in W
Hp=W/746;// The horse power in hp
printf("\nThe horse power delivered,Hp=%2.1f hp",Hp);
|
5939c47ebdeb8081e8779d1ee27f92744574f068 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2175/CH7/EX7.4/7_4.sce | bcc06db795634762df3532d477ffa0f8ec6b65f5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 7_4.sce | clc;
mC=1;
mO=3;
mN=(3*79/21);
Tar=mC+mO+mN;
p1=1.013*10^5;
R=8.3145*10^3;
T=338;
V=Tar*R*T/p1;
Vr=V/[(2*12)+6+16];
disp(Vr,"Volume of reactants per kilogram of fuel:");
//part II
mCO2=2;
mH2O=3;
mN2=(3*79/21);
Tap=mCO2+mH2O+mN2;
T=393;
p=10^5;
V=Tap*R*T/p1;
Vr=V/[(2*12)+6+16];
disp(Vr,"Volume of products per kg of fuel is:");
|
04f7c3da05a0fbd8013ab78a2dd367d7f9b42ab5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1938/CH3/EX3.15/3_15.sce | 8ebbd4fa30f58a7e666411169f37d04c58bb0fbc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 864 | sce | 3_15.sce | clc,clear
printf('Example 3.15\n\n')
V=250
R_sh=275,R_a=0.8 //resistance of shunt field and amature
I_L0=3.91 //load current
I_sh=V/R_sh
I_a0= I_L0 - I_sh
constant_losses= V*I_L0 -R_a*(I_a0)^2
//as a generator
P_out=10*10^3
I_L=P_out/V
I_a = I_L + I_sh
field_cu_loss=R_sh*(I_sh)^2 //field copper loss
arm_cu_loss= R_a*(I_a)^2 //armature copper loss
eta_gen = 100 *(P_out/(P_out+constant_losses + field_cu_loss+ arm_cu_loss)) //efficiency as generator
printf('Efficiency as a generator = %.2f percent\n',eta_gen)
//as a motor
P_in=10*10^3 //at V=250
I_L=P_in/V
I_a=I_L - I_sh
field_cu_loss=R_sh*(I_sh)^2 //field copper loss
arm_cu_loss= R_a*(I_a)^2 //armature copper loss
eta_m = 100 *((P_in-(constant_losses + field_cu_loss+ arm_cu_loss))/(P_in)) //efficiency as motor
printf('Efficiency as a motor = %.2f percent',eta_m)
|
5ff5d29db3408881d4d91be76e9e65f06cb2d61f | 449d555969bfd7befe906877abab098c6e63a0e8 | /48/CH2/EX2.16/eg_2_16.sce | dd4507ba88a18c22fc5831a1473396eeb15090b7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 308 | sce | eg_2_16.sce | clear;
clc;
par1=['ab','cde','fh','gi']; //initial partitions par1
par2=['abc','de','fg','hi']; //partition 2
//par=par1+par2;
//lub-lower upper bound
par_lub=['abcde','fghi'];
disp(par_lub);
//par=par1.par2
//glb-greatest lower bound
par_glb=['ab','c','de','f','g','h','i'];
disp(par_glb); |
4f9e503d015f2cfcc7c64720e2da54f0a8aa5618 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2267/CH1/EX1.1/Ex1_1.sce | fdfb00f4b320d69afcc8170412446db22f280ef8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 218 | sce | Ex1_1.sce | //Part A Chapter 1 Example 1
clc;
clear;
close;
format('v',8);
rho=13550;//kg/m^3
g=9.78;//m/s^2
h=30*10^-2;//m
//Pressure Difference
P_diff=rho*g*h;//Pa
disp("Pressure difference = "+string(P_diff)+" pa");
|
65a63e4a7ec1f65a58025577bf454652b85f587b | 3c47dba28e5d43bda9b77dca3b741855c25d4802 | /microdaq/macros/mdaqBlockDelete.sci | 83dec574a1a32c3171bf1eba7b11d22c2440e8d9 | [
"BSD-3-Clause"
] | permissive | microdaq/Scilab | 78dd3b4a891e39ec20ebc4e9b77572fd12c90947 | ce0baa6e6a1b56347c2fda5583fb1ccdb120afaf | refs/heads/master | 2021-09-29T11:55:21.963637 | 2019-10-18T09:47:29 | 2019-10-18T09:47:29 | 35,049,912 | 6 | 3 | BSD-3-Clause | 2019-10-18T09:47:30 | 2015-05-04T17:48:48 | Scilab | UTF-8 | Scilab | false | false | 1,763 | sci | mdaqBlockDelete.sci | function mdaqBlockDelete(block_name)
if argn(2) < 1 then
mprintf("Description:\n");
mprintf("\tDeletes MicroDAQ user block\n");
mprintf("Usage:\n");
mprintf("\tmdaqBlockDelete(block_name);\n")
return;
end
mprintf("WARNING: This function will remove all files related to ''%s'' block (including C source).\n", block_name);
opt = input(" Are you sure? [y/n]: ", "string");
if opt <> 'y' & opt <> 'Y' then
return;
end
//Convert name
name_converted = convstr(block_name,'l');
name_converted = strsubst(name_converted, ' ', '_');
name_converted = 'mdaq_' + name_converted;
// Delete from macros
macrosPath = pathconvert(mdaqToolboxPath()+'macros/user_blocks/');
mdelete(macrosPath+name_converted+'.sci');
mdelete(macrosPath+name_converted+'_sim.sci');
mdelete(macrosPath+name_converted+'.bin');
mdelete(macrosPath+name_converted+'_sim.bin');
// Delete images
imagesPath = pathconvert(mdaqToolboxPath()+'images/');
mdelete(imagesPath+'gif'+filesep()+name_converted+'.gif');
mdelete(imagesPath+'h5'+filesep()+name_converted+'.sod');
mdelete(imagesPath+'svg'+filesep()+name_converted+'.svg');
// Delete code
srcPath = pathconvert(mdaqToolboxPath()+'src/c/userlib/');
backUpPath = mdaqToolboxPath()+pathconvert("src\c\userlib\.removed_code");
try
if isdir(backUpPath) == %F then
mkdir(backUpPath);
end
copyfile(srcPath+name_converted+'.c', backUpPath);
catch
end
mdelete(srcPath+name_converted+'.c');
mdelete(srcPath+name_converted+'.o');
mprintf("Block has been deleted. Please restart Scilab software.\n");
endfunction
|
9d2a3322bcf143c53da4119d5362fd023b5ed8ca | 6a3d6ad5e81b7b8f9d48952cf7390a24ed063653 | /chips/Dmux8Way.tst | e0a166ab44ebdd6153debb1d382861ed84ee6995 | [] | no_license | phazel/nand2tetris | 597e98b6f661fa74a724a1f0644e60e9550c9efd | baa9fbfdcd1a87e3d22aeac876e089af104d76f7 | refs/heads/master | 2021-01-09T20:39:26.902012 | 2016-08-01T06:04:10 | 2016-08-01T06:04:10 | 63,301,906 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 738 | tst | Dmux8Way.tst | load DMux8Way.hdl;
output-file DMux8Way.out,
compare-to DMux8Way.cmp,
output-list sel%B1.3.1 in a b c d e f g h;
set sel %B000, set in 0, eval, output;
set sel %B001, set in 0, eval, output;
set sel %B010, set in 0, eval, output;
set sel %B011, set in 0, eval, output;
set sel %B100, set in 0, eval, output;
set sel %B101, set in 0, eval, output;
set sel %B110, set in 0, eval, output;
set sel %B111, set in 0, eval, output;
set sel %B000, set in 1, eval, output;
set sel %B001, set in 1, eval, output;
set sel %B010, set in 1, eval, output;
set sel %B011, set in 1, eval, output;
set sel %B100, set in 1, eval, output;
set sel %B101, set in 1, eval, output;
set sel %B110, set in 1, eval, output;
set sel %B111, set in 1, eval, output;
|
caf62d3aeb2094286fcf17a00f16a99359b29792 | 91da29a7783c3162b1b743ad75d48814bd1f556e | /2_año/MN/p2.sce | f1d02050b3358875a9c7e697938c5498d4c3594d | [] | no_license | jfarizano/LCC | a149631059129b07a7c603bf16df0c1b25479edb | 70cb03b0ff0a788b1bbbf1a6bcd51beff48460fe | refs/heads/master | 2022-11-15T14:46:36.171561 | 2022-11-10T21:15:13 | 2022-11-10T21:15:13 | 246,933,544 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,684 | sce | p2.sce | function r = raicesRobustas(p)
c = coeff(p, 0);
b = coeff(p, 1);
a = coeff(p, 2);
disc = b^2 - 4*a*c
if disc < 0 then
return [%nan, %nan]
end
if b < 0 then
r(1) = 2*c / (-b + sqrt(disc))
r(2) = (-b + sqrt(disc))/(2*a)
else
if b > 0 then
r(1) = (-b - sqrt(disc))/(2*a)
r(2) = 2*c / (-b - sqrt(disc))
else
r(1) = sqrt(c/a)
r(2) = -r(1)
end
end
endfunction
function [x, d] = horner(p, x0)
coeffs = coeff(p)
n = length(coeffs)
x = 0
d = 0
for i = n:-1:1
x = coeffs(i) + x*x0
if i > 1 then
d = coeffs(i) * (i-1) + d*x0
end
end
endfunction
function x = derivar(f,v,n,h)
if (n ==0) then
x = f(v)
else
x = (derivar(f,v+h,n-1,h)-derivar(f,v,n-1,h))/h
end
endfunction
function x = derivarExtra(f,v,n,h)
deff("y=D0F(x)", "y="+f)
for i = 1:1:n-1
deff("y=D"+string(i)+"F(x)", "y=(D"+string(i-1)+"F(x+h)-D"+string(i-1)+"F(x))/h")
end
deff ("y=DnF(x)", "y=(D"+string(n-1)+"F(x+h)-D"+string(n-1)+"F(x))/h")
x = DnF(v)
endfunction
function x = derivarMultiple(f,v,n,h)
deff("y=D0F(x)", "y="+f)
for i = 1:1:n
deff("y=D"+string(i)+"F(x)", "y=(D"+string(i-1)+"F(x+h)-D"+string(i-1)+"F(x))/h")
x(i) = evstr("D" + string(i) +"F(v)")
end
endfunction
function x = taylor(f, n, a, v, h)
deff("y=F0(x)", "y="+f)
x = F0(a)
factorial = 1
derivadas = derivarMultiple(f, a, n, h)
for i = 1:1:n
factorial = factorial * n
x = x + (derivadas(i) * ((v - a) ** i))/factorial
end
endfunction
|
3bcad73d9e56f6437e81ae2caced54c7548e0eb5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2489/CH11/EX11.2/11_2.sce | f08da9999e98f65807c6fc3e411259b7e00d97d7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 183 | sce | 11_2.sce | clc
//Intitalisation of variables
clear
T= 500 //C
Kp= 1.43*10^-5 //atm
R= 1.987 //cal
//CALCULATIONS
dF= -2.303*R*(273+T)*log10(Kp)
//RESULTS
printf ('dF = %.f cal ',dF+3)
|
e23b767cc48a6a684f1f75e2df8828a6c739cc1a | 9b3a82b71b55170a9d272048e2f4dc6858ff106c | /control-system/step_response1.sce | ce6545cda65d45a621225a92ca5ff6b6f8a969ba | [] | no_license | omrastogi/Digital-Signal-Processing | afcee58a1decbd9949e0bfcda47b62bbf19c935f | 68b4f85ec5b9dbf7840a0857ee388f9d660bbb2e | refs/heads/main | 2023-01-03T13:54:45.554127 | 2020-11-02T05:40:13 | 2020-11-02T05:40:13 | 309,267,769 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 248 | sce | step_response1.sce | clc;
s = poly(0,'s');
num1 = 2; den1 = s+3;
s1 = syslin('c',num1,den1);
num2 = 4; den2 = s^2+2*s+4;
s2 = syslin('c',num2,den2);
num3 = 1; den3 = s;
s3 = syslin('c',num3,den3);
s4 = s2+s3;
s5 = s1*s4;
disp(s5);
t = 0 : 0.01 : 10;
plot(t,s5);
|
8f7bb22d67d1842b069e2933850e311b5ddb2943 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1775/CH3/EX3.3/Chapter3_Example3.sce | d3842170637ed1482884691635373e608ec48269 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,247 | sce | Chapter3_Example3.sce | //Chapter-3, Illustration 3, Page 141
//Title: Internal Combustion Engines
//=============================================================================
clc
clear
//INPUT DATA
n=6;//No. of cylinders
d=0.61;//Diameter in m
L=1.25;//Stroke in m
N=2;//No.of revolutions per second
m=340;//mass of fuel oil in kg
CV=44200;//Calorific value in kJ/kg
T=108;//Torque in kN-m
imep=775;//Indicated mean efective pressure in kN/(m^2)
//CALCULATIONS
IP=(imep*L*3.1415*(d^2)*N)/(8);//Indicated power in kW
TotalIP=(n*IP);//Total indicated power in kW
BP=(2*3.1415*N*T);//Brake power in kW
PI=(m*CV)/3600;//Power input in kW
nB=(BP/PI)*100;//Brake thermal efficiency
bmep=(BP*8)/(n*L*3.1415*(d^2)*2);//Brake mean effective pressure in kN/(m^2)
nM=(BP/TotalIP)*100;//Mechanical efficiency
bsfc=m/BP;//Brake specific fuel consumption in kg/kWh
//OUTPUT
mprintf('Total Indicated Power is %3.1f kW \n Brake Power is %3.1f kW \n Brake thermal efficiency is %3.1f percent \n Brake mean effective pressure is %3.1f kN/(m^2) \n Mechanical efficiency is %3.1f percent \n Brake specific fuel consumption is %3.3f kg/kW.h',TotalIP,BP,nB,bmep,nM,bsfc)
//==============================END OF PROGRAM=================================
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.