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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fa4629bfd0c053a6d7c63eff164a68e3d24d2b63 | 449d555969bfd7befe906877abab098c6e63a0e8 | /992/CH7/EX7.2/ex7_2.sce | 581dd14ec09cfdfe47cd50053ace9fa9ff49027c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 380 | sce | ex7_2.sce |
//Exa:7.2
clc;
clear;
close;
//Given:
free_f=5.8;//in MHz
lock1=17;//in percent
lock2=23;//in percent
lock_feq=lock1*free_f/100;
min1=free_f-lock_feq;
max1=free_f+lock_feq;
printf("\n 1)Lock range is from %fMHz to %fMHz",min1,max1);
lock_feq=lock2*free_f/100;
min2=free_f-lock_feq;
max2=free_f+lock_feq;
printf("\n 2)Lock range is from %fMHz to %fMHz",min2,max2); |
719555384a8f30d16bb641bdf8b66531f846b9a7 | 0cb3ef9e2be55e6924e840d829ad2ad1a9879f2d | /Hack CPU/test0.tst | 3a63a95585dada0ad1c619865b72a4dbc11bc4a5 | [] | no_license | jayakamal-geek/Hardware-Description-Language | 5cdbe71b9ebeb823afed69216763ccf9c7d81b6c | 3b75f43321b02ba05ff1c652942315ebb1d4d1bc | refs/heads/main | 2023-04-29T10:45:00.885647 | 2021-05-23T09:44:05 | 2021-05-23T09:44:05 | 370,012,967 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 716 | tst | test0.tst | load Computer.hdl,
output-file test0.out,
output-list time%S1.4.1 reset%B2.1.2 ARegister[0]%D1.7.1 DRegister[0]%D1.7.1 RAM64[16]%D1.7.1 RAM64[17]%D1.7.1 RAM64[18]%D1.7.1 RAM64[19]%D1.7.1;
// Load a program written in the Hack machine language.
// The program adds the two constants 2 and 3 and writes the result in RAM[0].
ROM32K load test0.hack,
set RAM64[16] 3,
set RAM64[17] 5,
set RAM64[18] 2,
output;
// First run (at the beginning PC=0)
repeat 10 {
tick, tock, output;
}
// Reset the PC
set reset 1,
set RAM64[16] 6,
set RAM64[17] 2,
set RAM64[18] 3,
set RAM64[19] 0,
tick, tock, output;
// Second run, to check that the PC was reset correctly.
set reset 0,
repeat 10 {
tick, tock, output;
}
|
155865b55a094f9079e8c30e7f54884649e16def | d5bd4b5a4760efd0a3d16d7c39c7b495c5874d28 | /AnalogDigtitalCommunication/PCMTransmission.sce | 49e08e5f7afb26447505d5c93233ac86d0de2b4d | [] | no_license | APU-PhasedArrayBeamForming/Array-Based-Beam-Forming | 27a61bc3cf93e544364121e508dc4d140b7e0cb1 | 4cde46b7aa3f4e995297ac72fc5038fa0cdf083d | refs/heads/master | 2021-01-25T08:01:17.468481 | 2017-06-15T18:47:40 | 2017-06-15T18:47:40 | 93,699,808 | 1 | 1 | null | 2017-06-15T18:47:40 | 2017-06-08T02:36:01 | Scilab | UTF-8 | Scilab | false | false | 631 | sce | PCMTransmission.sce | //Caption:PCM Transmission (includes functions:uniform_pcm.sce, PCM_encoding.sce)
//This program is a sample program for Pulse Code Modulation transmission
//step 1: The given analog signal converted into quantized sample value
//step 2: Then the quantized sample value converted into binary value
clc;
close;
t = 0:0.001:1;
x = sin(2*%pi*t);
L = 16;
//Step 1
[SQNR,xq,en_code] = uniform_pcm(x,L);
//Step 2
c = PCM_Encoding(x,L,en_code);
a =gca();
a.x_location ="origin";
a.y_location ="origin";
plot2d2(t*2*%pi,x);
plot2d2(t*2*%pi,xq,5);
title('Quantization of Sampled analog signal')
legend(['Analog signal','Quantized Signal']) |
ea524086dbe9005120cd04ff962fb38ebde0e3e4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1658/CH16/EX16.2/Ex16_2.sce | 8b511baec11ca94e6765ff31ebb6976181a9a2a4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 164 | sce | Ex16_2.sce | clc;
//e.g 16.2
RL=20*10**3;
V2=24;
Vm=sqrt(2)*V2;
disp('V',Vm*1,"Vm=");
Im=Vm/RL;
disp('mA',Im*10**3,"Im=");
Idc= 0.318*Im;
disp('mA',Idc*10**3,"Idc=");
|
21b118cc438e5ecdc3a4306cde092eb95a1a8e36 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1529/CH10/EX10.7/10_07.sce | 7e83c4149c0f774d697fd3d4c761f4ee936b46f2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 480 | sce | 10_07.sce | //Chapter 10, Problem 7, figure 10.17
clc;
tc = 100e-6; // in s/cm
Vc = 20; // in V/cm
w = 5.2; // in cm ( width of one complete cycle )
h = 3.6; // in cm ( peak-to-peak height of the display )
//calculation:
T = w*tc
f = 1/T
ptpv = h*Vc
printf("\n (a)The periodic time, T = %.2f ms\n", T*10^3)
printf("\n (b)Frequency, f = %.2f kHz\n",f/1000)
printf("\n (c)The peak-to-peak voltage = %.0f V\n",ptpv)
|
e0dcaecd5c54442f868670aa22e3c8c35b1cf891 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1703/CH4/EX4.3/4_3.sce | 378cf03c0b3babd70a6de3823e971af91b794641 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 332 | sce | 4_3.sce |
clc
//initialisation of variables
H1= 34 //ft
H2= 8 //ft
H3= 7 //ft
g= 32.2 //ft/sec^2
d= 1.5 //in
//CALCULATIONS
v2= sqrt(2*g*(H1+H2-H3))
Q= v2*%pi*d^2/(4*144)
v3= (2*v2+sqrt(4*v2^2-4*6*(v2^2-H2*2*5*g)))/12
dr= sqrt(v2/v3)
//RESULTS
printf ('ratio of diameteres = %.1f ',dr)
printf("\n Flow rate = %.3f cusec",Q)
|
7e86b4110d5c87b0ade216c89da512dd237d58e8 | 527c41bcbfe7e4743e0e8897b058eaaf206558c7 | /Positive_Negative_test/Netezza-Base-MachineLearning/SP_NaiveBayes-NZ-01.tst | 4c1cf26513c784a2e39c5c73725eda0f458ba6b3 | [] | no_license | kamleshm/intern_fuzzy | c2dd079bf08bede6bca79af898036d7a538ab4e2 | aaef3c9dc9edf3759ef0b981597746d411d05d34 | refs/heads/master | 2021-01-23T06:25:46.162332 | 2017-07-12T07:12:25 | 2017-07-12T07:12:25 | 93,021,923 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 675 | tst | SP_NaiveBayes-NZ-01.tst | ----------------------------------------------------------
SELECT '***** EXECUTING SP_NaiveBayesModel *****';
CREATE TEMP TABLE tblNBModelDemo AS
SELECT ObsID, VarID, Num_Val as Value
FROM tblNBData
WHERE VarID <= 20;
EXEC SP_NaiveBayesModel('tblNBModelDemo', 1,'Training NB Model with Laplacian Correction');
SELECT *
FROM fzzlNaiveBayesModel
WHERE AnalysisID = 'SSHARMA_205908'
ORDER BY 1,2,3,4
LIMIT 10;
----------------------
DROP TABLE tblNBDataTestPredict;
EXEC SP_NaiveBayesPredict('tblNBModelDemo', 'SSHARMA_205908', 'Testing using NB Model ID SSHARMA_205908');
SELECT *
FROM fzzlNaiveBayesPredict
WHERE AnalysisID = 'SSHARMA_555145'
ORDER BY 1,2
LIMIT 10; |
b0cc19e648071790ad10b90e6fb3370379cec546 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.3.1/macros/scicos/do_move.sci | 36649167362f35438b42e08c7367144e9c54237e | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 9,878 | sci | do_move.sci | function scs_m=do_move(scs_m)
// get a scicos object to move, and move it with connected objects
//!
//get block to move
while %t
[n,pt]=getmenu(datam);xc=pt(1);yc=pt(2)
if n>0 then n=resume(n),end
[k,wh]=getobj(scs_m,[xc;yc])
if k<>[] then break,end
end
if scs_m(k)(1)=='Block'|scs_m(k)(1)=='Text' then
scs_m=moveblock(scs_m,k,xc,yc)
elseif scs_m(k)(1)=='Link' then
scs_m=movelink(scs_m,k,xc,yc,wh)
end
function scs_m=moveblock(scs_m,k,xc,yc)
// Move block k and modify connected links if any
//!
//look at connected links
connected=get_connected(scs_m,k)
o=scs_m(k)
xx=[];yy=[];ii=[];clr=[];mx=[];my=[]
// build movable segments for all connected links
//===============================================
for i=connected
oi=scs_m(i)
[xl,yl,ct,from,to]=oi([2,3,7:9])
clr=[clr ct(1)]
nl=prod(size(xl))
if from(1)==k then
ii=[ii i]
// build movable segments for this link
if nl>=4 then
x1=xl(1:4)
y1=yl(1:4)
elseif nl==3 then
// 3 points link add one point at the begining
x1=xl([1 1:3])
y1=yl([1 1:3])
elseif xl(1)==xl(2)|yl(1)==yl(2) then
// vertical or horizontal 2 points link add a point in the middle
x1=[xl(1);xl(1)+(xl(2)-xl(1))/2;xl(1)+(xl(2)-xl(1))/2;xl(2)]
y1=[yl(1);yl(1)+(yl(2)-yl(1))/2;yl(1)+(yl(2)-yl(1))/2;yl(2)]
else
// oblique 2 points link add 2 points in the middle
x1=[xl(1);xl(1)+(xl(2)-xl(1))/2;xl(1)+(xl(2)-xl(1))/2;xl(2)]
y1=[yl(1);yl(1);yl(2);yl(2)]
end
//set allowed (x or y) move for each points of build movable segments
if nl==3 then
if xl(1)==xl(2) then
mx=[mx,[1;1;1;0]]
my=[my,[1;1;0;0]]
else
mx=[mx,[1;1;0;0]]
my=[my,[1;1;1;0]]
end
else
if xl(1)==xl(2) then
mx=[mx,[1;1;0;0]]
my=[my,[1;1;1;0]]
else
mx=[mx,[1;0;0;0]]
my=[my,[1;1;0;0]]
end
end
xx=[xx x1];yy=[yy y1] //store movable segments for this link
// redraw movable segments
xpolys(xl(1:mini(nl,4)),yl(1:mini(nl,4)),ct(1))
xpolys(x1,y1,ct(1))
if pixmap then xset('wshow'),end
elseif to(1)==k then
ii=[ii -i]
// build movable segments
if nl>=4 then
x1=xl(nl:-1:nl-3)
y1=yl(nl:-1:nl-3)
elseif nl==3 then
// 3 points link add one point at the end
sel=[nl:-1:nl-2,nl-2]
x1=xl([nl nl:-1:nl-2])
y1=yl([nl nl:-1:nl-2])
elseif xl(1)==xl(2)|yl(1)==yl(2) then
// vertical or horizontal 2 points link add a point in the middle
xm=xl(2)+(xl(1)-xl(2))/2
x1= [xl(2);xm;xm;xl(1)]
ym=yl(2)+(yl(1)-yl(2))/2;
y1= [yl(2);ym;ym;yl(1)]
else
// oblique 2 points link add 2 points in the middle
xm=xl(2)+(xl(1)-xl(2))/2
x1=[xl(2);xm;xm;xl(1)]
y1=[yl(2);yl(2);yl(1);yl(1)]
end
if nl==3 then
if x1(2)==x1(3) then
mx=[mx,[1;1;1;0]]
my=[my,[1;1;0;0]]
else
mx=[mx,[1;1;0;0]]
my=[my,[1;1;1;0]]
end
else
if x1(1)==x1(2) then
mx=[mx,[1;1;0;0]]
my=[my,[1;1;1;0]]
else
mx=[mx,[1;0;0;0]]
my=[my,[1;1;0;0]]
end
end
xx=[xx x1];yy=[yy y1] //store movable segments for this link
// redraw movable segments
xpolys(xl(maxi(1,nl-3):nl),yl(maxi(1,nl-3):nl),ct(1))
xpolys(x1,y1,ct(1))
if pixmap then xset('wshow'),end
end
end
// move a block and connected links
//=================================
[mxx,nxx]=size(xx)
if connected<>[] then // move a block and connected links
[xmin,ymin]=getorigin(o)
xc=xmin;yc=ymin
rep(3)=-1
[xy,sz]=o(2)(1:2)
// clear block
drawobj(o)
// clear links
xpolys(xx+mx*(xc-xmin),yy+my*(yc-ymin),clr)
dr=driver()
if dr=='Rec' then driver('X11'),end
while rep(3)==-1 , // move loop
// draw block shape
xrect(xc,yc+sz(2),sz(1),sz(2))
// draw moving links
xpolys(xx+mx*(xc-xmin),yy+my*(yc-ymin),clr)
// get new position
rep=xgetmouse();
// clear block shape
xrect(xc,yc+sz(2),sz(1),sz(2))
// clear moving part of links
xpolys(xx+mx*(xc-xmin),yy+my*(yc-ymin),clr)
if pixmap then xset('wshow'),end
xc=rep(1);yc=rep(2)
xy=[xc,yc];
end
// update and draw block
o(2)(1)=xy
driver(dr)
xpolys(xx+mx*(xc-xmin),yy+my*(yc-ymin),clr)
drawobj(o)
if pixmap then xset('wshow'),end
// update block in scicos structure
scs_m(k)=o
//udate moved links in scicos structure
xx=xx+mx*(xc-xmin)
yy=yy+my*(yc-ymin)
for i=1:prod(size(ii))
oi=scs_m(abs(ii(i)))
xl=oi(2);yl=oi(3);nl=prod(size(xl))
if ii(i)>0 then
if nl>=4 then
xl(1:4)=xx(:,i)
yl(1:4)=yy(:,i)
elseif nl==3 then
xl=xx(2:4,i)
yl=yy(2:4,i)
else
xl=xx(:,i)
yl=yy(:,i)
end
else
if nl>=4 then
xl(nl-3:nl)=xx(4:-1:1,i)
yl(nl-3:nl)=yy(4:-1:1,i)
elseif nl==3 then
xl=xx(4:-1:2,i)
yl=yy(4:-1:2,i)
else
xl=xx(4:-1:1,i)
yl=yy(4:-1:1,i)
end
end
nl=prod(size(xl))
//eliminate double points
kz=find((xl(2:nl)-xl(1:nl-1))^2+(yl(2:nl)-yl(1:nl-1))^2==0)
xl(kz)=[];yl(kz)=[]
//store
oi(2)=xl;oi(3)=yl;
scs_m(abs(ii(i)))=oi;
end
else // move an unconnected block
rep(3)=-1
[xy,sz]=o(2)(1:2)
// clear block
drawobj(o)
dr=driver()
if dr=='Rec' then driver('X11'),end
while rep(3)==-1 , //move loop
// draw block shape
xrect(xc,yc+sz(2),sz(1),sz(2))
// get new position
rep=xgetmouse(0)
// clear block shape
xrect(xc,yc+sz(2),sz(1),sz(2))
xc=rep(1);yc=rep(2)
xy=[xc,yc];
if pixmap then xset('wshow'),end
end
// update and draw block
o(2)(1)=xy
driver(dr)
drawobj(o)
if pixmap then xset('wshow'),end
// update block in scicos structure
scs_m(k)=o
end
function scs_m=movelink(scs_m,k,xc,yc,wh)
// move the segment wh of the link k and modify the other segments if necessary
//!
o=scs_m(k)
[xx,yy,ct]=o([2 3 7])
nl=size(o(2),'*') // number of link points
if wh==1 then
from=o(8)
if scs_m(from(1))(3)(1)<>'lsplit'|nl<3 then
message('It is not possible to move these segments')
return
else // link comes from a split
e=[min(yy(1:2))-max(yy(1:2)),min(xx(1:2))-max(xx(1:2))];
e=e/norm(e)
X1=xx(1:3)
Y1=yy(1:3)
x1=X1;y1=Y1;
xpolys(x1,y1,ct(1))
dr=driver()
if dr=='Rec' then driver('X11'),end
rep(3)=-1
while rep(3)==-1 do
//draw moving part of the link
xpolys(x1,y1,ct(1))
rep=xgetmouse();
//erase moving part of the link
xpolys(x1,y1,ct(1))
xc1=rep(1);yc1=rep(2)
x1(1:2)=X1(1:2)+e(1)*(xc-xc1)
y1(1:2)=Y1(1:2)+e(2)*(yc-yc1)
if pixmap then xset('wshow'),end
end
//draw moving part of the link
driver(dr)
xpolys(x1,y1,ct(1))
if pixmap then xset('wshow'),end
xx(1:3)=x1
yy(1:3)=y1
o(2)=xx;o(3)=yy;
scs_m(k)=o
//move split block and update other connected links
connected=get_connected(scs_m,from(1))
//erase split and other connected links
for j=find(connected<>k),drawobj(scs_m(connected(j))),end
drawobj(scs_m(from(1)))
// change links
if connected(1)<>k then
o=scs_m(connected(1));
[xx,yy,ct]=o([2 3 7]);
xx($)=xx($)+e(1)*(xc-xc1);
yy($)=yy($)+e(2)*(yc-yc1);
xpolys(xx,yy,ct(1))
o(2)=xx;o(3)=yy;scs_m(connected(1))=o;
end
for kk=2:size(connected,'*')
if connected(kk)<>k then
o=scs_m(connected(kk))
[xx,yy,ct]=o([2 3 7])
xx(1)=xx(1)+e(1)*(xc-xc1)
yy(1)=yy(1)+e(2)*(yc-yc1)
xpolys(xx,yy,ct(1))
o(2)=xx;o(3)=yy;scs_m(connected(kk))=o;
end
end
o=scs_m(from(1))
o(2)(1)(1)=o(2)(1)(1)+e(1)*(xc-xc1);
o(2)(1)(2)=o(2)(1)(2)+e(2)*(yc-yc1);
drawobj(o)
scs_m(from(1))=o
return
end
end
if wh>=nl-1 then
to=o(9)
if scs_m(to(1))(3)(1)<>'lsplit'|nl<3 then
message('It is not possible to move these segments')
return
else // link goes to a split
e=[min(yy($-1:$))-max(yy($-1:$)),min(xx($-1:$))-max(xx($-1:$))];
e=e/norm(e)
X1=xx($-2:$)
Y1=yy($-2:$)
x1=X1;y1=Y1;
dr=driver()
xpolys(x1,y1,ct(1))
if dr=='Rec' then driver('X11'),end
rep(3)=-1
while rep(3)==-1 do
//draw moving part of the link
xpolys(x1,y1,ct(1))
rep=xgetmouse();
//erase moving part of the link
xpolys(x1,y1,ct(1))
xc1=rep(1);yc1=rep(2)
x1($-1:$)=X1($-1:$)+e(1)*(xc-xc1)
y1($-1:$)=Y1($-1:$)+e(2)*(yc-yc1)
if pixmap then xset('wshow'),end
end
//draw moving part of the link
driver(dr)
xpolys(x1,y1,ct(1))
if pixmap then xset('wshow'),end
xx($-2:$)=x1
yy($-2:$)=y1
o(2)=xx;o(3)=yy;
scs_m(k)=o
//move split block and update other connected links
connected=get_connected(scs_m,to(1))
//erase split and other connected links
for j=find(connected<>k),drawobj(scs_m(connected(j))),end
drawobj(scs_m(to(1)))
for kk=2:size(connected,'*')
o=scs_m(connected(kk))
[xx,yy,ct]=o([2 3 7])
xx(1)=xx(1)+e(1)*(xc-xc1)
yy(1)=yy(1)+e(2)*(yc-yc1)
xpolys(xx,yy,ct(1))
o(2)=xx;o(3)=yy;scs_m(connected(kk))=o;
end
o=scs_m(to(1))
o(2)(1)(1)=o(2)(1)(1)+e(1)*(xc-xc1);
o(2)(1)(2)=o(2)(1)(2)+e(2)*(yc-yc1);
drawobj(o)
scs_m(to(1))=o
return
end
end
if nl<4 then
message('It is not possible to move these links')
return
end
e=[min(yy(wh:wh+1))-max(yy(wh:wh+1)),min(xx(wh:wh+1))-max(xx(wh:wh+1))];
e=e/norm(e)
X1=xx(wh-1:wh+2)
Y1=yy(wh-1:wh+2)
x1=X1;y1=Y1;
dr=driver()
xpolys(x1,y1,ct(1))
if dr=='Rec' then driver('X11'),end
rep(3)=-1
while rep(3)==-1 do
//draw moving part of the link
xpolys(x1,y1,ct(1))
rep=xgetmouse();
//erase moving part of the link
xpolys(x1,y1,ct(1))
xc1=rep(1);yc1=rep(2)
x1(2:3)=X1(2:3)+e(1)*(xc-xc1)
y1(2:3)=Y1(2:3)+e(2)*(yc-yc1)
if pixmap then xset('wshow'),end
end
//draw moving part of the link
driver(dr)
xpolys(x1,y1,ct(1))
if pixmap then xset('wshow'),end
xx(wh-1:wh+2)=x1
yy(wh-1:wh+2)=y1
o(2)=xx;o(3)=yy;
scs_m(k)=o
|
ca21bf4810e601bbdb8922fc5b1be76b276898c2 | 4ce7e3abde40afbac45b42e735d8099cbfefb1ea | /magnetisation.sce | 9f22e8a041666a2d08e9bced6855a92594be3ef5 | [] | no_license | rakotoshmu/Ising | 48319a622d98840dd47cfa515bb8a3f0d3a98a4a | 8d22ec05aab9843af88212151525913dd223a339 | refs/heads/master | 2021-05-14T07:30:58.728852 | 2018-01-13T13:59:50 | 2018-01-13T13:59:50 | 116,267,113 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,369 | sce | magnetisation.sce | fig_mag = scf(); clf(fig_mag);
N = 5;
n0 = 1600;
T = 50;
J = ones(N,N,2)/T;
h = zeros(N,N)/T;
//Test pour gibbs séquentiel
n = n0;
n_burn = n/10;
n_simu = n + n_burn;
X1 = ising_gibbs_seq_chain(J,h,n_simu);
X1 = X1(:,:,(n_burn+1):(n_simu+1));
m = zeros(1,n+1);
for k = 1:n+1
m(k) = mean(double(X1(:,:,k)));
end
subplot(2,2,1);
plot(1:n+1,cumsum(m) ./ (1:(n+1)),[1 n+1],[0 0]);
title("Ergodicité pour Gibbs séquentiel");
//Test pour gibbs randomisé
n = n0*N^2;
n_burn = n/10;
n_simu = n + n_burn;
X2 = ising_gibbs_rand_chain(J,h,n_simu);
X2 = X2(:,:,(n_burn+1):(n_simu+1));
m = zeros(1,n+1);
for k = 1:n+1
m(k) = mean(double(X2(:,:,k)));
end
subplot(2,2,2);
plot(1:n+1,cumsum(m) ./ (1:(n+1)),[1 n+1],[0 0]);
title("Ergodicité pour Gibbs randomisé");
//Test pour gibbs randomisé
n = n0*N^2;
n_burn = n/10;
n_simu = n + n_burn;
X3 = ising_MH_chain(J,h,n_simu);
X3 = X3(:,:,(n_burn+1):(n_simu+1));
m = zeros(1,n+1);
for k = 1:n+1
m(k) = mean(double(X3(:,:,k)));
end
subplot(2,2,3);
plot(1:n+1,cumsum(m) ./ (1:(n+1)),[1 n+1],[0 0]);
title("Ergodicité pour Metropolis-Hastings");
//Test pour coupling from the past
n = n0/10;
m = zeros(1,n+1);
for k = 1:n+1
m(k) = mean(double(ising_coupling_MH(J,h,%f)));
end
subplot(2,2,4);
plot(1:n+1,cumsum(m) ./ (1:(n+1)),[1 n+1],[0 0]);
title("Loi des grands nombres pour Coupling From The Past (M-H)");
|
fe0b5b9b6630a17bc9cac59716ed506e0838b955 | 047d952507eb3b9d71fac69ec3332225f17f53ef | /main/out/main/testfiles/test07.tst | 1697463617309cb9b84b72ca3bc0c4049fef5a36 | [] | no_license | patrick-nanys/project-laboratories-hw | 89ab8f366219f491e6feba5558bf41ef8205dda1 | ba57a9d5e4ca33a3cc1be3cdb4fe679fe0149f93 | refs/heads/master | 2022-08-09T14:14:31.220503 | 2020-05-18T11:20:03 | 2020-05-18T11:20:03 | 250,313,203 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 49 | tst | test07.tst | 1;e;0
1;s
p1;-;-;-;2;3;-
usePlayerItem 1 s
status |
8ef5b25df2adb33a0eea71e58034c1b4ef899fef | 449d555969bfd7befe906877abab098c6e63a0e8 | /1322/CH14/EX14.15/106ex1.sce | 3480c8bc9ecf35c8f0c704fbe793324735c7805b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 694 | sce | 106ex1.sce |
//x^2+6*x+9
clear;
clc;
close;
x=poly(0,'x');
p=x^2+6*x+9;
factors(p);
disp(ans(1),"x^2+6*x+9 is square of binomial expression ")
|
bbb39961624d8e31d783cfa2b070f6dce4efc921 | 449d555969bfd7befe906877abab098c6e63a0e8 | /137/CH5/EX5.1/5_1.sce | 4de7fcb0b16d752317841485ed1e2340d62c94e1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 947 | sce | 5_1.sce | clc;
//page 212
//problem 5.1
// The values of constsnts Kf and Kp are given as Kf= 2*pi*10^5 and Kp=10*pi, and carrier frequency fc=100MHz
// For FM :
//fi= fc + Kf*m(t)/2*pi
// Minimum value of m(t) = -1 and Maximum value of m(t)= +1
Kf= 2*%pi*10^5 ; Kp=10*%pi;
fc=100*10^6 ;// in Hz
Mmin = -1 ; Mmax=1;
fimin1= fc + Kf*Mmin/(2*%pi);
disp(+'MHz',fimin1/10^6,'Minimum frequency in MHz is ');
fimax1= fc + Kf*Mmax/(2*%pi);
disp(+'MHz',fimax1/10^6,'Maximum frequency in MHz is ');
//For PM :
//fi= fc + Kp*m(t)'/2*pi
// Minimum value of m(t)' = -20,000 and Maximum value of m(t)'= +20,000
Mmin1=-20000 ; Mmax1=20000;
fimin2= fc + Kp*Mmin1/(2*%pi);
disp(+'MHz',fimin2/10^6,'Minimum frequency in MHz is ');
fimax2= fc + Kp*Mmax1/(2*%pi);
disp(+'MHz',fimax2/10^6,'Maximum frequency in MHz is ');
// Since m(t) is increases and decreases linearly with time, the instantaneous frequency increases linearly from fimin to fimax |
88320d122142a38d9e950d5e633caa2a2a261a40 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1382/CH7/EX7.19/EX_7_19.sce | 3f9e7fadfd3362d5b441a12d26aea4b289fe50ea | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 400 | sce | EX_7_19.sce | // Example 7.19:oscillation frequency
clc;
clear;
close;
C1=120;//capacitance of tunned circuit in PICO farad
C2=1500;//capacitance of tunned circuit in pico farad
C=(C1*C2)/(C1+C2);//total capacitance in pico farad
L=10;//INDUCTANCE of tunned circuit in micro henry
fo=(1/(2*%pi*sqrt(L*10^-6*C*10^-12)))*10^-6;//tunned frequency in mega hertz
disp(fo,"tunned frequency in mega hertz is")
|
9d1da32528d2b4551ae9f661025c5ff747c10f1a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3428/CH17/EX10.17.10/Ex10_17_10.sce | 339dda65b5b9f4e0186dece105bf06441c4c619f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 398 | sce | Ex10_17_10.sce | //Section-10,Example-2,Page no.-CT.36
//To calculate q,dl_W,dl_E,dl_H.
clc;
q=0 //process is Adiabatic.
disp(q)
n=2
C_v=(3/2)*8.314
T_1=298
V_1=5
V_2=10
R=1 //let
C_p=(5/2)*R
C_v=(3/2)*R
y=C_p/C_v
T_2=T_1*(V_1/V_2)^(y-1)
dl_E=n*C_v*8.314*(T_2-T_1)
disp(dl_E,'Internal energy change(Joules)')
W=dl_E
disp(W,'Joules')
dl_H=n*C_p*8.314*(T_2-T_1)
disp(dl_H,'Joules')
|
c117a1092df5667c372f5be38f027bff785643d6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3681/CH6/EX6.8/Ex6_8.sce | 640a265ef613b7f19cba90aa219e033f9b61ff96 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,611 | sce | Ex6_8.sce | // Calculating the maximum permissible specific electric loading
clc;
disp('Example 6.8, Page No. = 6.13')
// Given Data
p_20 = 1.734*10^(-8);// Resistivity of copper at 20 degree celsius (in ohm*meter)
alpha = 0.00393;// Resistance temperature co-efficient of copper at 20 degree celsius (in per degree celsius)
s = 3.5;// Current density (in A per mm square)
c = 0.03;// Cooling co-efficient
Tm_ambient = 40;// Maximum ambient temperature (in degree celsius)
Tm_rise_A = 50;// Maximum temperature rise for Class A insulation (in degree celsius)
Tm_rise_E = 65;// Maximum temperature rise for Class E insulation (in degree celsius)
// Calculation of the maximum permissible specific electric loading
//for Class A insulation
T_A = Tm_ambient+Tm_rise_A;// Operating temperature of copper conductors (in degree celsius)
p = p_20*(1+alpha*(T_A-20));// Resistivity at operating temperature (in ohm*meter)
ac = Tm_rise_A/(p*s*10^(6)*c);// Maximum permissible specific electric loading
disp(ac,'Maximum allowable specific electric loading (ampere conductors per meter)=');
T_E = Tm_ambient+Tm_rise_E;// Operating temperature of copper conductors (in degree celsius)
//for Class E insulation
p = p_20*(1+alpha*(T_E-20));// Resistivity at operating temperature (in ohm*meter)
ac = Tm_rise_E/(p*s*10^(6)*c);// Maximum permissible specific electric loading
disp(ac,'Maximum allowable specific electric loading (ampere conductors per meter)=');
//in book answers are 21600 (ampere conductors per meter) and 26700 (ampere conductors per meter) respectively. The answers vary due to round off error
|
a1006a24ae112a642b1bd2d17a9b624fda06606a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3876/CH11/EX11.3/Ex11_3.sce | 2b03af345a88507040522c336f4d77e34bca29c2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 324 | sce | Ex11_3.sce | //Chapter 11 Thermodynamics Some Basic Concepts
clc;
clear;
//Initialisation of Variables
n= 2 //moles
R= 1.99 //cal er mole per degree
T= 80 //C
H1= 94.3 //cal per gram
M= 78 //gms per mole
//CALCULATIONS
w= n*R*(273+T)
H= n*M*H1
E= H-w
//RESULTS
mprintf("Value of dH= %.0f cal",H)
mprintf("\nValue of dE= %.0f cal",E)
|
d1b6fe7a87491ba9e19048e52bbc0673026ea912 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2621/CH3/EX3.6/Ex3_6.sce | 0a2c3cbe25c779ed91d0e4a8ab6df9344e07586f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 580 | sce | Ex3_6.sce | // Example 3.6
clc;
clear;
close;
// Given data
format('v',8);
Rin= 2*10^6;// in Ω
Rout= 75;// in Ω
f0= 5;// in Hz
A= 2*10^5;//unit less
B= 1/2;// feedback fraction (since R1=Rf)
Af= -1;// voltage gain
R1= 330;//in Ω (assume)
Rin_f= R1;// input resistance with feedback in Ω
Rout_f= Rout/(A/2);// output resistance in Ω
f_f= A/2*f0;// in Hz
f_f= f_f*10^-6;// in MHz
disp(Af,"The closed-loop voltage gain is : ");
disp(Rin_f,"The input resistance in Ω is : ");
disp(Rout_f,"The output resistance in Ω is : ");
disp(f_f,"The bandwidth in kHz is : ");
|
8f052a3db3cfcaafe06cf352573dce3c44d28b38 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3547/CH3/EX3.2/Ex3_2.sce | 6bded7fa6ed2aca35faf3e46cc903f79d6583f22 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,749 | sce | Ex3_2.sce | // Example no. 3.2
// To calculate (a) the wavelength of light emitted, (b) the ratio of spontaneous emission rate to stimulated emission rate, (c) the ratio of stimulated emission rate to absorption rate, and (d) the population density of the excited level.
// Page no. 100
clc;
clear;
// Given data
deltaE=1.26*10^-19; // The energy difference between two levels
h=1.054*10^(-34); // The distance between two levels
c=3*10^8; // The speed of ligth in m/s
kB=1.38*10^(-23); // The Boltzmann’s constant J/K
T=300; // The absolute temperature in Kelvin
N1=10^19; // The population density in the ground state in cm^(-3)
// (a)The wavelength of light emitted
h=2*%pi*h; // The distance between two levels in J.s
f=deltaE/h; // The frequency in Hz
lambda=(c/f)*10^6; // The wavelength of ligth emitted in micrometer
// Displaying the result in command window
printf('\n The wavelength of ligth emitted = %0.2f micrometer',lambda);
// The calculation of this answer is wrong in the book
// (b)The ratio of spontaneous emission rate to stimulated emission rate
RspRst=(exp(deltaE/(kB*T))-1); // The ratio of spontaneous emission rate to stimulated emission rate
// Displaying the result in command window
printf('\n The ratio of spontaneous emission rate to stimulated emission rate = %0.2f X 10^13',RspRst*10^-13);
// The calculation of this answer is wrong in the book
// (c)The ratio of stimulated emission rate to absorption rate
RstRab=(exp(-deltaE/(kB*T))); // The ratio of stimulated emission rate to absorption rate
// Displaying the result in command window
printf('\n The ratio of stimulated emission rate to absorption rate = %0.2f X 10^-14',RstRab*10^14);
// The calculation of this answer is wrong in the book
// (d)The population density of the excited level
N2=(N1*exp(-deltaE/(kB*T))); // The population density of the excited level in cm^(-3)
// Displaying the result in command window
printf('\n The population density of the excited level = %0.2f X 10^5 cm^(-3)',N2*10^-5);
// The calculation of this answer is wrong in the book
|
85bd7ac1646fa1f60c41541e86239cff10e6e5c9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3885/CH5/EX5.24/Ex5_24.sci | 91800d85898aa6657fc0adad9492bfb1ddeeeb77 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 534 | sci | Ex5_24.sci | //control systems by Nagoor Kani A
//Edition 3
//Year of publication 2015
//Scilab version 6.0.0
//operating systems windows 10
// Example 5.24
clc;
clear;
s=poly(0,'s')//defines s as poly nomial variable
h=syslin('c',(s+9)/(s*(s^2+4*s+11)))//the given transfer function assigned to variable h assume K=1
scf()
evans(h)
//the characterstic equation is (s^3+4s^2+11s)+Ks+9K
//put s=jw and equating real and imaginary parts to calculate K
K=(4*(4.4)^2)/9//the value of w is 4.4
disp(K,'the value of K is;')
|
1c1afc8f3d9400adddc85a4000b9aa56ffcb8b30 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2087/CH20/EX20.1/example20_1.sce | 98bff566b888521720e25375bac6dc9dbfb4c591 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,422 | sce | example20_1.sce |
//example 20.1
//design a guide bank required for a bridge in a river
//calculate volume of stone required per m length of guide bank
clc;funcprot(0);
//given
Q=50000; //discharge
f=1.1; //silt factor
bl=130; //bed level of river
hfl=140; //high flood level
L=4.75*(Q)^0.5;
L=L+212; //providing 20 percent more length
L_up=5*L/4; //upstream length of guide bund
L_down=L/4; //downstream length of guide bund
r_up=0.45*L; //radius of upstream curved head
mprintf("upstream length of guide bund=%i m.",L_up);
mprintf("\ndownstream length of guide bund=%i m.",L_down);
mprintf("\nupstream radius of curved head=%i m.;it can be carved at 145 degrees.",r_up);
mprintf("\ndownstream radius of curved head=287m.;it can be carved at 60 degrees.");
fb=1.5; //free board
ltop=fb+hfl; //level of top of guide bund
mprintf("\n\nlevel of top of guide bund=%f m.",ltop);
mprintf("\nadopt top level=142 m.");
ltop=142;
Hr=ltop-bl;
mprintf("\nkeep top width=4 m. and side slope as 2:1.");
T=0.06*(Q)^(1/3); //thickness of stone pitching
T=round(T*100)/100;
mprintf("\n\nThickness of stone pitching=%f m.",T);
R=0.47*(Q/f)^(1/3); //depth of scour
Rmax=1.25*R; //maximum scour
rl=hfl-Rmax; //R.L at maximum anticipated cover
D=bl-rl; //depth of maximum scour
Lapron=1.5*D;
R=round(R*100)/100;
Lapron=round(Lapron*100)/100;
mprintf("\ndepth of scour=%f m.",R);
mprintf("\n\nfor straigtht reach of guide band:");
mprintf("\nlength of apron=%f m.",Lapron);
Rmax=1.5*R;
rl=hfl-Rmax;
D1=bl-rl;
Lapron=1.5*D1;
R=round(R*100)/100;
mprintf("\n\nfor curvilinear transition portion of guide band:");
mprintf("\nlength of apron=%f m.",Lapron);
T1=1.9*T;
T1=round(T1*10)/10;
mprintf("\nthickness of apron=%f m.",T1);
mprintf("\n\nvolume of stones:");
ss=5^0.5*(141-130)*T;
as=5^0.5*D*1.25*T;
ss=round(ss*100)/100;
as=round(as*100)/100;
mprintf("\nat shank:");
mprintf("\non slope=%f cubic metre/m.",ss);
mprintf("\non apron with a slope 2:1 =%f cubic metre/m.",as);
va=5^0.5*D1*1.25*T;
vs=ss;
vs=round(vs*100)/100;
va=round(va*100)/100;
mprintf("\nU/S andD/S curved portion:");
mprintf("\non slope=%f cubic metre/m.",vs);
mprintf("\non apron =%f cubic metre/m.",va);
ta=va/(1.5*D1);
ta=round(ta*10)/10;
mprintf("\n\nthickness of launching apron=%f m.",ta);
|
1306005c0f915068b4596cf26b97ae8c91157873 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2762/CH3/EX3.4.3/3_4_3.sce | 77f1c305719c2e5381f4467369d05a074a275ccc | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,064 | sce | 3_4_3.sce | //Transport Processes and Seperation Process Principles
//Chapter 3
//Example 3.4-3
//Principles of Momentum Transfer and Applications
//given data
H1=1.83;
DT1=H1;
V1=(%pi*DT1*DT1*H1)/4;
V2=3*V1;//given
R=(V2/V1)^(1/3);
DT2=R*DT1;
Da1=0.61;
Da2=R*Da1;
W1=0.122;
W2=R*W1;
J1=0.15;
J2=R*J1;
N1=1.5;//no. of revs
N2=N1*((1/R)^(2/3))
rho=929;
mu=0.01;
Re=(Da2*Da2*N2*rho)/(mu)
Np=5;
P2=Np*rho*(N2^3)*(Da2^5);
P1=Np*rho*(N1^3)*(Da1^5);
//a)
N2=N1*((1/R)^(2/3));
sP1=P1/V1;
sP2=P2/V2;
mprintf("scaled up no. of revs %f rev/s",N2);
mprintf("scaled up Power %f W",P2);
mprintf(" power per unit volume= %f kW/m3",sP1/1000)
if (sP1/1000)<0.8 then
disp(" Value of power is less than permissible condition(0.8 kW/m3 for mass transfer)")
end
mprintf(" scaled up Power %f m3",P2);
mprintf(" power per unit volume %f W/m3",(P2/(V2*1000)));
//b)
N2b=N1*(1/R);
mprintf(" scaled up revolutions %f rev/s",N2b);
P2b=Np*rho*(N2b^3)*(Da2^5);
mprintf(" scaled up Power %f kW",P2b);
mprintf(" power per unit volume %f W/m3",(P2b/V2));
|
030b16eabfda9b10272818feb556cbabaeda42e6 | 9bc415d58bf063a1bca303fea640e644333dbdbd | /Scilab/Sinais_e_Sistemas/Two_Pole_IIR.sci | c352749245b1d8fc851faf4c149d869d559a3de8 | [] | no_license | Roast-Lord/SMGcodes | 36e55be6c1cc17af91ab2e3f5117c78684f20604 | b75107be829fb4373dc1bc4b8696fe4b9cec437a | refs/heads/main | 2023-07-05T05:25:50.557705 | 2021-08-17T17:46:25 | 2021-08-17T17:46:25 | 301,012,145 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 762 | sci | Two_Pole_IIR.sci | function Two_Pole_IIR(tipo, fc, BW)
//clf;
x=cos(2*%pi*fc);
R=1-3*BW;
K=(1-2*R*x+R^2)/(2-2*x);
//polinômio em q (atrasos)
if tipo==0 then // Passa Banda
b0 = 1-K;
b1 = 2*(K-R)*x;
b2= R^2-K;
a1 = -2*R*x;
a2 = R^2
den=poly([ 1, a1, a2],'q','c')
num=poly([b0, b1, b2],'q','c')
else // Rejeita
b0 = K;
b1 = -2*K*x;
b2= K;
a1 = -2*R*x;
a2 = R^2
den=poly([1, a1, a2],'q','c')
num=poly([b0, b1, b2],'q','c')
end;
Hq=num./den;
//Fatorar o polinômio em Z na forma q=z^-1
z=poly(0,'z');
Hz=horner(Hq,1/z);
a=coeff(Hz(3));
num=Hz(2)/a(1);
den=Hz(3)/a(1);
Hz=num/den;
N=1024;
[Hf3,f3]=Resposta_Frequencia_Hz(Hz,N);
plot(f3,abs(Hf3),'r');
endfunction
|
d1045d76f598a25e8d9f73937de4879147e633cf | 449d555969bfd7befe906877abab098c6e63a0e8 | /557/CH9/EX9.2/2.sce | fa24834b27295e795181ce140690cc579ff71472 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 229 | sce | 2.sce | funcprot(0);clc; //Example 9.2
//Initializing the variables
Vp = 3;
LpByLm = 30;
rhoPbyRhoM = 1;
muPbymuM = 1;
//Calculations
Vm = Vp*LpByLm*rhoPbyRhoM*muPbymuM;
disp(Vm, 'Mean water tunnel flow velocity (m/s):'); |
0dc795d8566c83dff6f3de3cf81d5e31eedb4ca7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1820/CH9/EX9.3/Example9_3.sce | bd12b9d7ea8a663dd651e60ebbecc7597afbd1e4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,587 | sce | Example9_3.sce | // ELECTRIC POWER TRANSMISSION SYSTEM ENGINEERING ANALYSIS AND DESIGN
// TURAN GONEN
// CRC PRESS
// SECOND EDITION
// CHAPTER : 9 : SYMMETRICAL COMPONENTS AND FAULT ANALYSIS
// EXAMPLE : 9.3 :
clear ; clc ; close ; // Clear the work space and console
// GIVEN DATA
l = 40 ; // line length in miles
// Conductor parameter from Table A.3
r_a = 0.206 ; // Ohms per conductor per mile in Ω/mi
r_b = r_a ; // r_a = r_b = r_c in Ω/mi
D_s = 0.0311 ; // GMR in ft where D_s = D_sa = D_sb = D_sc
D_ab = sqrt(2^2 + 8^2) ; // GMR in ft
D_bc = sqrt(3^2 + 13^2) ; // GMR in ft
D_ac = sqrt(5^2 + 11^2) ; // GMR in ft
D_e = 2788.5 ; // GMR in ft since earth resistivity is zero
r_e = 0.09528 ; // At 60 Hz in Ω/mi
// CALCULATIONS
// For case (a)
Z_aa =[(r_a + r_e) + %i * 0.1213*log(D_e/D_s)]*l ; // Self impedance of line conductor in Ω
Z_bb = Z_aa ;
Z_cc = Z_bb ;
Z_ab = [r_e + %i * 0.1213*log(D_e/D_ab)]*l ; // Mutual impedance in Ω
Z_ba = Z_ab ;
Z_bc = [r_e + %i * 0.1213*log(D_e/D_bc)]*l ;
Z_cb = Z_bc ;
Z_ac = [r_e + %i * 0.1213*log(D_e/D_ac)]*l ;
Z_ca = Z_ac ;
Z_abc = [Z_aa Z_ab Z_ac ; Z_ba Z_bb Z_bc ; Z_ca Z_cb Z_cc] ; // Line impedance matrix
// For case (b)
a = 1*exp(%i*120*%pi/180) ; // By symmetrical components theory to 3-Φ system
A = [1 1 1; 1 a^2 a ;1 a a^2] ;
Z_012 = inv(A) * Z_abc*A ; // Sequence impedance matrix
// DISPLAY RESULTS
disp("EXAMPLE : 9.3 : SOLUTION :-") ;
printf("\n (a) Line impedance matrix , [Z_abc] = \n") ; disp(Z_abc) ;
printf("\n (b) Sequence impedance matrix of line , [Z_012] = \n") ; disp(Z_012) ;
|
0080290a61ed953ff785a0e9576740eaeceb592a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2939/CH2/EX2.19/Ex2_19.sce | 3615311d56621e483cab9051aa46afaec6ff28b3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 288 | sce | Ex2_19.sce |
// Ex2_19
clc;
// Given:
//Given:
// 1 ev=8065 cm^-1
E=14.4*10^3;// in eV
v1=2.2*10^-3;// in m/s
// Solution:
f1=E*8065;// frequency in cm^-1
fr=f1*3*10^8*100;
fr1=(fr*v1)/(3*10^8);
printf("The shift in frequency between the source and the sample is = %f Hz",fr1)
|
74d4c877d72d35e1a3aa37800712aa00975a4609 | fb66bf7160cff53a909533926527b4d5e6b16776 | /scilabCode/radialplot.sci | 9935c0dd58ea149dd576b4cf18b8ffee2a979cc3 | [] | no_license | kavyamanohar/EDALabmanual | b705c1f4a3cd1baacbdc760ae71c8288aa2eb95e | 98e2e7e391c886ece0503a02491d968065bbd5d8 | refs/heads/master | 2020-04-06T07:08:56.526175 | 2016-09-04T16:40:51 | 2016-09-04T16:40:51 | 65,728,061 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 380 | sci | radialplot.sci | //Radial Plot
theta=[0:%pi/100:5*%pi];
r=(2*theta);
figure;
polarplot(theta,r,[2 2]);
title('simple spiral')
xs2pdf(0,'spiral.pdf')
gamma=[0:.01:2*%pi]
a1=sin(gamma).^2;
a2=cos(gamma).^2;
figure;
polarplot(gamma,a1,[2 2]);//legend('sine square'));
polarplot(gamma,a2,style=5);
hl=legend(['sine square';'cos square']);
title('square of sine and cosine')
xs2pdf(1,'sinSquare.pdf')
|
390b4d85e6565d146e39b2db7c86859288ef15b4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1247/CH5/EX5.6/example5_6.sce | 2c06006ce58eca7c38b99ac00e02e2292a233551 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 492 | sce | example5_6.sce | clear;
clc;
// Stoichiometry
// Chapter 5
// Energy Balances
// Example 5.6
// Page 207
printf("Example 5.6, Page 207 \n \n");
// solution
// basis 1kg Diphyl A-30
Q = .7511*(553.15-313.15) + 1.465*10^-3*(553.15^2-313.15^2)/2 // kJ/kg
fi = Q*4000 // kJ/h for mass flowrate 4000 kg/h
Clm = (1.1807+1.5198)/2
fi1 = Clm*(553.15-313.15)*4000/3600 // kJ/h
err = (fi1-Q)*100/Q
printf(" Heat to be supplied = "+string(fi1)+" kW \n Percent error = "+string(err)+".")
|
d21ed0a0f873443816871de39d2068cdbd136a19 | c1fe0b8252650f8a6bdaf7d0dd9f67e466e2b613 | /Euler/Bruno/Modelagem_Zika.sce | cff361a79ca3d168ed075b85cd098924ce3f5057 | [] | no_license | juvianna/anedo-pendulo | 8383a3ec49ca7be5248c2533ace5e074c16f88c7 | c749b2d5513d56337e0c5db073068da322f8f1e5 | refs/heads/master | 2020-06-24T06:12:55.076483 | 2017-07-11T17:42:45 | 2017-07-11T17:42:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 9,423 | sce | Modelagem_Zika.sce | ' Serão feitos os modelos de acordo com Euler, RK de 2ª ordem e RK de 4ª ordem '
function z = gSh(Sh,Ih,Im)
z = 40 - (0.00004 + (0.4/1000000)*Im)*Sh;
endfunction
function z = gIh(Sh,Ih,Im)
z = ((0.8/1000000)*Im)*Sh - 0.1*Ih;
endfunction
function z = gIm(Ih,Im)
z = ((0.4/1000000)*Ih)*(200000 - Im) - 0.25*Im;
endfunction
// Chm = 0.8 Bs = 0.4 ; 0.6 ; 0.8
// Cmh = 0.8 Bi = 0.8 ; 1.2 ; 1.6
// Resolução para Euler
function [t,Sh,Ih,Im] = Euler_Sistema(t0,tf,h,Sh0,Ih0,Im0)
t = t0:h:tf
n = length(t);
Sh(1) = Sh0
Ih(1) = Ih0
Im(1) = Im0
for i = 1:n-1
KSh = gSh(Sh(i),Ih(i),Im(i))
KIh = gIh(Sh(i),Ih(i),Im(i))
KIm = gIm(Ih(i),Im(i))
Sh(i+1) = Sh(i) + KSh*h;
Ih(i+1) = Ih(i) + KIh*h;
Im(i+1) = Im(i) + KIm*h;
end
endfunction
// Resolução para RK2
function [t,Sh,Ih,Im] = RK2_Sistema(t0,tf,h,Sh0,Ih0,Im0)
t = t0:h:tf
n = length(t);
Sh(1) = Sh0
Ih(1) = Ih0
Im(1) = Im0
for i = 1:n-1
K1Sh = gSh(Sh(i),Ih(i),Im(i))
K1Ih = gIh(Sh(i),Ih(i),Im(i))
K1Im = gIm(Ih(i),Im(i))
K2Sh = gSh(Sh(i) + K1Sh*h/2,Ih(i) + K1Ih*h/2,Im(i) + K1Im*h/2)
K2Ih = gIh(Sh(i) + K1Sh*h/2,Ih(i) + K1Ih*h/2,Im(i) + K1Im*h/2)
K2Im = gIm(Ih(i) + K1Ih*h/2,Im(i) + K1Im*h/2)
Sh(i+1) = Sh(i) + (K1Sh + K2Sh)*h/2;
Ih(i+1) = Ih(i) + (K1Ih + K2Ih)*h/2;
Im(i+1) = Im(i) + (K1Im + K2Im)*h/2;
end
endfunction
function [t,Sh,Ih,Im] = RK23_Sistema(t0,tf,h,Sh0,Ih0,Im0)
t = t0:h:tf
n = length(t);
Sh(1) = Sh0
Ih(1) = Ih0
Im(1) = Im0
for i = 1:n-1
K1Sh = gSh(Sh(i),Ih(i),Im(i))
K1Ih = gIh(Sh(i),Ih(i),Im(i))
K1Im = gIm(Ih(i),Im(i))
K2Sh = gSh(Sh(i) + K1Sh*(3/4)*h,Ih(i) + K1Ih*(3/4)*h,Im(i) + K1Im*(3/4)*h)
K2Ih = gIh(Sh(i) + K1Sh*(3/4)*h,Ih(i) + K1Ih*(3/4)*h,Im(i) + K1Im*(3/4)*h)
K2Im = gIm(Ih(i) + K1Ih*(3/4)*h,Im(i) + K1Im*(3/4)*h)
Sh(i+1) = Sh(i) + (K1Sh + 2*K2Sh)*h/3;
Ih(i+1) = Ih(i) + (K1Ih + 2*K2Ih)*h/3;
Im(i+1) = Im(i) + (K1Im + 2*K2Im)*h/3;
end
endfunction
// Resolução para RK4
function [t,Sh,Ih,Im] = RK4_Sistema(t0,tf,h,Sh0,Ih0,Im0)
t = t0:h:tf
n = length(t);
Sh(1) = Sh0
Ih(1) = Ih0
Im(1) = Im0
for i = 1:n-1
K1Sh = gSh(Sh(i),Ih(i),Im(i))
K1Ih = gIh(Sh(i),Ih(i),Im(i))
K1Im = gIm(Ih(i),Im(i))
K2Sh = gSh(Sh(i) + K1Sh*h/2,Ih(i) + K1Ih*h/2,Im(i) + K1Im*h/2)
K2Ih = gIh(Sh(i) + K1Sh*h/2,Ih(i) + K1Ih*h/2,Im(i) + K1Im*h/2)
K2Im = gIm(Ih(i) + K1Ih*h/2,Im(i) + K1Im*h/2)
K3Sh = gSh(Sh(i) + K2Sh*h/2,Ih(i) + K2Ih*h/2,Im(i) + K2Im*h/2)
K3Ih = gIh(Sh(i) + K2Sh*h/2,Ih(i) + K2Ih*h/2,Im(i) + K2Im*h/2)
K3Im = gIm(Ih(i) + K2Ih*h/2,Im(i) + K2Im*h/2)
K4Sh = gSh(Sh(i) + K3Sh*h,Ih(i) + K3Ih*h,Im(i) + K3Im*h)
K4Ih = gIh(Sh(i) + K3Sh*h,Ih(i) + K3Ih*h,Im(i) + K3Im*h)
K4Im = gIm(Ih(i) + K3Ih*h,Im(i) + K3Im*h)
Sh(i+1) = Sh(i) + (K1Sh + 2*K2Sh + 2*K3Sh + K4Sh)*h/6;
Ih(i+1) = Ih(i) + (K1Ih + 2*K2Ih + 2*K3Ih + K4Ih)*h/6;
Im(i+1) = Im(i) + (K1Im + 2*K2Im + 2*K3Im + K4Im)*h/6;
end
endfunction
// Resolução para Dormand-Prince
function [t,Sh,Ih,Im] = ODE45_Sistema(t0,tf,h0,Sh0,Ih0,Im0)
Sh(1) = Sh0
Ih(1) = Ih0
Im(1) = Im0
t(1) = t0
h(1) = h0
while t($) < tf
K1Sh = h($)*gSh(Sh($),Ih($),Im($))
K1Ih = h($)*gIh(Sh($),Ih($),Im($))
K1Im = h($)*gIm(Ih($),Im($))
K2Sh = h($)*gSh(Sh($) + K1Sh/5,Ih($) + K1Ih/5,Im($) + K1Im/5)
K2Ih = h($)*gIh(Sh($) + K1Sh/5,Ih($) + K1Ih/5,Im($) + K1Im/5)
K2Im = h($)*gIm(Ih($) + K1Ih/5,Im($) + K1Im/5)
K3Sh = h($)*gSh(Sh($) + K1Sh*(3/40) + K2Sh*(9/40),Ih($) + K1Ih*(3/40) + K2Ih*(9/40),Im($) + K1Im*(3/40) + K2Im*(9/40))
K3Ih = h($)*gIh(Sh($) + K1Sh*(3/40) + K2Sh*(9/40),Ih($) + K1Ih*(3/40) + K2Ih*(9/40),Im($) + K1Im*(3/40) + K2Im*(9/40))
K3Im = h($)*gIm(Ih($) + K1Ih*(3/40) + K2Ih*(9/40),Im($) + K1Im*(3/40) + K2Im*(9/40))
K4Sh = h($)*gSh(Sh($) + K1Sh*(44/45) - K2Sh*(56/15) + K3Sh*(32/9),Ih($) + K1Ih*(44/45) - K2Ih*(56/15) + K3Ih*(32/9),Im($) + K1Im*(44/45) - K2Im*(56/15) + K3Im*(32/9))
K4Ih = h($)*gIh(Sh($) + K1Sh*(44/45) - K2Sh*(56/15) + K3Sh*(32/9),Ih($) + K1Ih*(44/45) - K2Ih*(56/15) + K3Ih*(32/9),Im($) + K1Im*(44/45) - K2Im*(56/15) + K3Im*(32/9))
K4Im = h($)*gIm(Ih($) + K1Ih*(44/45) - K2Ih*(56/15) + K3Ih*(32/9),Im($) + K1Im*(44/45) - K2Im*(56/15) + K3Im*(32/9))
K5Sh = h($)*gSh(Sh($) + K1Sh*(19372/6561) - K2Sh*(25360/2187) + K3Sh*(64448/6561) - K4Sh*(212/729),Ih($) + K1Ih*(19372/6561) - K2Ih*(25360/2187) + K3Ih*(64448/6561) - K4Ih*(212/729),Im($) + K1Im*(19372/6561) - K2Im*(25360/2187) + K3Im*(64448/6561) - K4Im*(212/729))
K5Ih = h($)*gIh(Sh($) + K1Sh*(19372/6561) - K2Sh*(25360/2187) + K3Sh*(64448/6561) - K4Sh*(212/729),Ih($) + K1Ih*(19372/6561) - K2Ih*(25360/2187) + K3Ih*(64448/6561) - K4Ih*(212/729),Im($) + K1Im*(19372/6561) - K2Im*(25360/2187) + K3Im*(64448/6561) - K4Im*(212/729))
K5Im = h($)*gIm(Ih($) + K1Ih*(19372/6561) - K2Ih*(25360/2187) + K3Ih*(64448/6561) - K4Ih*(212/729),Im($) + K1Im*(19372/6561) - K2Im*(25360/2187) + K3Im*(64448/6561) - K4Im*(212/729))
K6Sh = h($)*gSh(Sh($) + K1Sh*(9017/3168) - K2Sh*(355/33) - K3Sh*(46732/5247) + K4Sh*(49/176) - K5Sh*(5103/18656),Ih($) + K1Ih*(9017/3168) - K2Ih*(355/33) - K3Ih*(46732/5247) + K4Ih*(49/176) - K5Ih*(5103/18656),Im($) + K1Im*(9017/3168) - K2Im*(355/33) - K3Im*(46732/5247) + K4Im*(49/176) - K5Im*(5103/18656))
K6Ih = h($)*gIh(Sh($) + K1Sh*(9017/3168) - K2Sh*(355/33) - K3Sh*(46732/5247) + K4Sh*(49/176) - K5Sh*(5103/18656),Ih($) + K1Ih*(9017/3168) - K2Ih*(355/33) - K3Ih*(46732/5247) + K4Ih*(49/176) - K5Ih*(5103/18656),Im($) + K1Im*(9017/3168) - K2Im*(355/33) - K3Im*(46732/5247) + K4Im*(49/176) - K5Im*(5103/18656))
K6Im = h($)*gIm(Ih($) + K1Ih*(9017/3168) - K2Ih*(355/33) - K3Ih*(46732/5247) + K4Ih*(49/176) - K5Ih*(5103/18656),Im($) + K1Im*(9017/3168) - K2Im*(355/33) - K3Im*(46732/5247) + K4Im*(49/176) - K5Im*(5103/18656))
K7Sh = h($)*gSh(Sh($) + K1Sh*(35/384) + K3Sh*(500/1113) + K4Sh*(125/192) - K5Sh*(2187/6784) + K6Sh*(11/84),Ih($) + K1Ih*(35/384) + K3Ih*(500/1113) + K4Ih*(125/192) - K5Ih*(2187/6784) + K6Ih*(11/84),Im($) + K1Im*(35/384) + K3Im*(500/1113) + K4Im*(125/192) - K5Im*(2187/6784) + K6Im*(11/84))
K7Ih = h($)*gIh(Sh($) + K1Sh*(35/384) + K3Sh*(500/1113) + K4Sh*(125/192) - K5Sh*(2187/6784) + K6Sh*(11/84),Ih($) + K1Ih*(35/384) + K3Ih*(500/1113) + K4Ih*(125/192) - K5Ih*(2187/6784) + K6Ih*(11/84),Im($) + K1Im*(35/384) + K3Im*(500/1113) + K4Im*(125/192) - K5Im*(2187/6784) + K6Im*(11/84))
K7Im = h($)*gIm(Ih($) + K1Ih*(35/384) + K3Ih*(500/1113) + K4Ih*(125/192) - K5Ih*(2187/6784) + K6Ih*(11/84),Im($) + K1Im*(35/384) + K3Im*(500/1113) + K4Im*(125/192) - K5Im*(2187/6784) + K6Im*(11/84))
YSh = Sh($) + (35/384)*K1Sh + (500/1113)*K3Sh + (125/192)*K4Sh - (2187/6784)*K5Sh + (11/84)*K6Sh;
YIh = Ih($) + (35/384)*K1Ih + (500/1113)*K3Ih + (125/192)*K4Ih - (2187/6784)*K5Ih + (11/84)*K6Ih;
YIm = Im($) + (35/384)*K1Im + (500/1113)*K3Im + (125/192)*K4Im - (2187/6784)*K5Im + (11/84)*K6Im;
ZSh = Sh($) + (5179/57600)*K1Sh + (7571/16695)*K3Sh + (393/640)*K4Sh - (92097/339200)*K5Sh + (187/2100)*K6Sh + (1/40)*K7Sh;
ZIh = Ih($) + (5179/57600)*K1Ih + (7571/16695)*K3Ih + (393/640)*K4Ih - (92097/339200)*K5Ih + (187/2100)*K6Ih + (1/40)*K7Ih;
ZIm = Im($) + (5179/57600)*K1Im + (7571/16695)*K3Im + (393/640)*K4Im - (92097/339200)*K5Im + (187/2100)*K6Im + (1/40)*K7Im;
sSh = (h($)*(10^-5)/(2*(tf-t0)*abs(YSh - ZSh)))^(1/4);
sIh = (h($)*(10^-5)/(2*(tf-t0)*abs(YIh - ZIh)))^(1/4);
sIm = (h($)*(10^-5)/(2*(tf-t0)*abs(YIm - ZIm)))^(1/4);
if min(sSh,sIh,sIm) >= 2
if (tf - t($)) > 2*h($)
h($+1) = 2*h($);
t($+1) = t($) + h($);
end
if (tf - t($)) <= 2*h($)
h($+1) = (tf - t($));
t($+1) = tf;
end
Sh($+1) = YSh;
end
if min(sSh,sIh,sIm) >= 1 & min(sSh,sIh,sIm) < 2
if (tf - t($)) > h($)
h($+1) = h($);
t($+1) = t($) + h($);
end
if (tf - t($)) <= h($)
h($+1) = (tf - t($));
t($+1) = tf;
end
Sh($+1) = YSh;
end
if min([sSh,sIh,sIm]) < 1
if (tf - t($)) > h($)/2
h($) = h($)/2;
t($) = t($) - h($);
end
if (tf - t($)) <= h($)/2
h($) = (tf - t($));
t($) = t($-1) + h($);
end
end
end
endfunction
//[t1,Sh1,Ih1,Im1] = Euler_Sistema(0,365,0.1,1000000,1,0)
//[t2,Sh2,Ih2,Im2] = RK2_Sistema(0,365,0.1,1000000,1,0)
[t3,Sh3,Ih3,Im3] = RK4_Sistema(0,365,0.1,1000000,10,0)
//[t4,Sh4,Ih4,Im4] = RK23_Sistema(0,365,0.1,1000000,1,0)
f3 = figure()
f3.background = 8
f3.figure_name = 'Resolução por Runge-Kutta de 4ª Ordem com h = 0.1'
plot(t3,Sh3,'r:')
plot(t3,Ih3,'r-')
plot(t2,Im3,'r--')
|
ab4faa8172d3ea1abd41b0fa7f089f4320bfc349 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2093/CH7/EX2.a/exa_2_a.sce | 31b07122a962186415f3f6d211e6ea4928c73fa5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | exa_2_a.sce | // Exa 2.a
clc;
clear;
close;
// Given data
V_P= -4;// in V
I_DSS= 10;// in mA
V_GS= 0;// in V
R_D= 1.8;// in kΩ
V_DD= 20;// in V
I_D= I_DSS*(1-V_GS/V_P)^2;// in mA
// Applying KVL to the circuit, we get V_DD= I_D*R_D+V_D
V_D= V_DD-I_D*R_D;// in V
disp(I_D,"The value of I_D in mA is : ")
disp(V_D,"The value of V_D in volts is : ")
|
a8cd90c3a066bb0a7edf7f6aebe3f64a48a38255 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3754/CH30/EX30.13/30_13.sce | 7eaff976877945ea276a03988b84782ffc8aa966 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 600 | sce | 30_13.sce | clear//
//Variables
gm = 4500.0 * 10**-6 //Transconductance (in Ampere per volt)
RD = 3.0 * 10**3 //Drain resistance (in ohm)
RL = 5.0 * 10**3 //Load resistance (in ohm)
Vin = 100.0 * 10**-3 //Input voltage (in volts)
ID = 2.0 * 10**-3 //Drain current (in Ampere)
//Calculation
rL = RD * RL / (RD + RL) //a.c. load resistance (in ohm)
vo = -gm * rL * Vin //Output voltage (in volts)
//Result
printf("\n Output voltage is %0.3f V.",vo)
|
0a528fd5209fa75e68dff2cc035ce30621d12413 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2990/CH4/EX4.7/Ex4_7.sce | 50a4ce5a9c5f97426ef34a85083e8a9547846e82 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 806 | sce | Ex4_7.sce |
funcprot(0);
// Initialization of Variable
function[dms]=degtodms(deg)
d = int(deg)
md = abs(deg - d) * 60
m = int(md)
sd = (md - m) * 60
sd=round(sd*100)/100
dms=[d m sd]
endfunction
theta=33.0+42.0/60.0+34.0/3600.0;//latitude in degrees
delta=81.0+55.0/60.0+14.0/3600.0;//declination in degrees
//calculation
H1=acos(tan(theta*%pi/180)/tan(delta*%pi/180));
H1=degtodms(360-H1*180/%pi);
alpha=asin(sin(theta*%pi/180)/sin(delta*%pi/180));
alpha=degtodms(alpha*180/%pi);
A=asin(cos(delta*%pi/180)/cos(theta*%pi/180));
A=degtodms(A*180/%pi);
disp(A,"azimuth in deg min sec");
disp(alpha,"alpha in deg min sec");
disp(H1,"hour angle in deg min sec");
disp("the answer of azimuth differs slightly due to roundoff error and slight mistake in the book")
clear()
|
8b3f30402de5c7112cb771430c749cc61160349a | 449d555969bfd7befe906877abab098c6e63a0e8 | /881/CH1/EX1.15/exa1_15.sce | b5562ecfa93f97d37db6b324129cad5a758cf601 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 113 | sce | exa1_15.sce | clc;
//Example 1.15
//Page no 28
//solution
v1=4;
v2=0.005;
sn=20*log10(v1/v2);
disp('dB',sn,"S/N = ");
|
0d7eebad001fd40150abbb8af914d72ae0bc85fe | 449d555969bfd7befe906877abab098c6e63a0e8 | /842/CH10/EX10.34/Example10_34.sce | 916a4f8e793d784c9592908461238176fde904ff | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 745 | sce | Example10_34.sce | //clear//
// Example10.34:Unilateral Ztransform- partial fraction
// X(z) =(3-(5/6)*(z^-1))/((1-(1/4)*(z^-1))*(1-(1/3)*(z^-1)))
z = %z;
s = %s;
syms n t;
a = 0.5;
[A]=pfss((3-(5/6)*(z^-1))/((1-(1/4)*(z^-1))*(1-(1/3)*(z^-1))))
x1 = horner(A(1),z)
x2 = horner(A(2),z)
x3 = A(3)
x = x1+x2+x3
disp(x1,"ans=")
disp(x2,"ans=")
disp(x3,"ans=")
disp(x,"ans=")
//Result
// 0.6666667
// -------------
// - 0.3333333 + z
// 0.25
// --------
// - 0.25 + z
//3
//sum of these, gives the original value
// 2
// - 0.8333333z + 3z
// -------------------------
// 2
// 0.0833333 - 0.5833333z + z
|
f8441aac031da411e35932508c4b38792aad627a | 4e7aac39f36916a964f4664f3198d7c87e762253 | /scilab/simple_plot.sce | e2a323998d709f91ef8a112431bd983cd1a68f39 | [] | no_license | kirillin/manipulator_dynamics | 349c01fd5aef8b42734edc497a7d48ee49aced9c | a773091ea5a62493b77885a0e2df6491282faa4c | refs/heads/master | 2021-10-22T13:15:09.489858 | 2019-03-10T23:00:56 | 2019-03-10T23:00:56 | 108,987,774 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 873 | sce | simple_plot.sce | clear;
// INPUT DATA
links_num = 5;
there_are_accels = %t;
// calculation number of columns
if there_are_accels then
cols_num = 4 * links_num + 1;
else
cols_num = 3 * links_num + 1;
end
// file reading
data = read("~/Desktop/ident_data/data_1_filt.txt", -1, cols_num)
time = data(:, cols_num);
// graphs plotting
for i = 1:links_num
kolor = i;
// angles
subplot(2, 2, 1);
plot2d(time, data(:, i), kolor);
// speeds
subplot(2, 2, 2);
plot2d(time, data(:, links_num + i), kolor);
if there_are_accels then
// accelerations
subplot(2, 2, 3);
plot2d(time, data(:, 2*links_num + i), kolor);
// torques
subplot(2, 2, 4);
plot2d(time, data(:,3*links_num+i), kolor);
else
// torques
subplot(2, 1, 2);
plot2d(time, data(:,2*links_num+i), kolor);
end
end
|
63876a548157de6b69b24f308fbd98c7be6186d5 | fdbfc24750929832bb65f0d880937a70c6135798 | /Assignment2/1 column_space.sce | 460405a98ffc54f3a2956b74a578eab033e3623b | [] | no_license | mohitgaggar/LA_assignment-Scilab- | 05ff51030d875d326f01b75a8300c41bf6a1cb75 | adcbc360e81b9d3b64c826ba3299b90dacdcc8e5 | refs/heads/master | 2021-01-02T20:29:33.540763 | 2020-06-03T11:05:06 | 2020-06-03T11:05:06 | 239,787,284 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 2,193 | sce | 1 column_space.sce | clc;clear;close;
disp("---------------------------------------------------------------------")
mprintf("\n")
disp(" Column Space of a given matrix : ")
mprintf("\n\nEnter the number of rows : \n\n")
m=input("m= ")
mprintf("\nEnter the number of columns : \n")
n=input("n= ")
mprintf("Enter values for matrix A :\n\n")
for i=1:m
for j=1:n
mprintf("Enter value for A(%d,%d) = ",i,j)
a(i,j)=input("")
end
end
disp(a,"A:")
a_temp=a
M=m
N=n
k=1
j_start=1;
i=1;
A=a_temp
pivots_i=1;
pivots(1,1)=0;
while(i<=N)
flag=0
temp=0;
for(j=j_start:M)
if(A(j,i)<>0)
flag=j;
temp=i;
break;
end
end
if(flag<>0 )
while(flag<>k)
A([flag,flag-1],:)=A([flag-1,flag],:);
flag=flag-1;
end
k=k+1;
j_start=k;
pivots(pivots_i,1)=flag;
pivots(pivots_i,2)=temp;
pivots_i=pivots_i+1;
for(t=flag+1:M)
A(t,:)=A(t,:)-(A(t,temp)/A(flag,temp))*A(flag,:);
for(zx=1:N)
if(A(t,zx)<0.0000000000000001 & A(t,zx)>0)
A(t,zx)=0
end
end
end
end
i=i+1
end
Pivots=pivots
Pivots_i=pivots_i
a=A
disp(A,"U: ") // U
mprintf("\n\nThe pivot columns are : ")
for(v=1:(pivots_i-1))
printf(" Col %d, ",pivots(v,2));
end
mprintf("\n\nColumn space of A has the Basis : {( ")
for(v=1:(pivots_i-1))
x=pivots(v,2);
//disp(a_temp(:,x))
for(w=1:M)
mprintf("%.2f ,",a_temp(w,x));
end
if(v<>pivots_i-1)
mprintf(" ),( ");
end
end
mprintf(")}")
mprintf("\n\nRank of the matrix = %d\n",pivots_i-1)
mprintf("\nDimension of column space = %d\n ",pivots_i-1);
disp("--------------------------------------------------------------------")
|
3f84d749f852f039d46d101d222120da8edcf301 | 449d555969bfd7befe906877abab098c6e63a0e8 | /557/CH2/EX2.10/10.sce | 68ce7f130f851bd154f9fef610040dad0dc6c7b6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | 10.sce | clc ;funcprot(0);
//Example 2.10
//Initializing the variables
phi = 30; //30 degree
h = 1.2 ; // Height of tank
l = 2; // Length of tank
g = 9.81;
//Calculations
function[Theta]=SurfaceAngle(a,phi)
Theta = atand(-a*cosd(phi)/(g+a*sind(phi)));
endfunction
//case (a) a = 4
disp(tand(SurfaceAngle(4,phi)),"Tan of Angle between surface of fluid and horizontal :");
disp(180 + SurfaceAngle(4,phi),"ThetaA (degree):");
//Case (b) a = - 4.5
tanThetaR = tand(SurfaceAngle(-4.5,phi));
disp(tanThetaR,"Tan of Angle between surface of fluid and horizontal :");
disp(SurfaceAngle(-4.5,phi),"ThetaR (degree):");
Depth = h - l*tanThetaR/2;
disp(Depth,"Maximum Depth of tank (m):"); |
f7bc773529b80b8bc5349a7ec4f000c7487eb9c2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2240/CH17/EX16.1/EX16_1.sce | eaa237fc4bacdbba13c305998b3fc36c04cf9512 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 347 | sce | EX16_1.sce | // Grob's Basic Electronics 11e
// Chapter No. 16
// Example No. 16_1
clc; clear;
// How much charge is stored in a 2 uF capacitor connected across a 50-V supply?
// Given data
V = 50; // Voltage=50 Volts
C = 2*10^-6; // Capacitor=2 uFarad
Q = C*V;
disp (Q,'The Charge Stored in Columb')
disp ('i.e 100*10^-6 Columbs')
|
2a880bcd5de75b131bbe87d3fab291eff208113f | 42fdf741bf64ea2e63d1546bb08356286f994505 | /test_20160829_nFETpFET_Id_char/nFET_IdVd_mite_chip15_30a.sce | 4c22843ff077298ff8fa026ff2eb430a9fdb42e2 | [] | no_license | skim819/RASP_Workspace_sihwan | 7e3cd403dc3965b8306ec203007490e3ea911e3b | 0799e146586595577c8efa05c647b8cb92b962f4 | refs/heads/master | 2020-12-24T05:22:25.775823 | 2017-04-01T22:15:18 | 2017-04-01T22:15:18 | 41,511,563 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 692 | sce | nFET_IdVd_mite_chip15_30a.sce | nFET_IdVd=[ //Vd Id cascode-Vg
1.40 67.00e-9 2.4;
1.19 66.90e-9 2.0;
0.95 62.8e-9 1.7;
0.78 62.2e-9 1.5;
0.69 62.1e-9 1.4;
0.59 61.5e-9 1.3;
0.50 61.3e-9 1.2;
0.41 61.2e-9 1.1;
0.31 63.1e-9 1.0;
0.26 37.5e-9 0.9;
0.23 12.5e-9 0.8;
0.19 03.65e-9 0.7;
0.155 0.993e-9 0.6;
0.125 0.264e-9 0.5;
0.08 0.069e-9 0.4;
0.046 0.018e-9 0.3;
0.02 4.5e-12 0.2;
0.01 1.2e-12 0.1;
0.0011 0.76e-12 0.0;
];
//nFET_IdVd=csvRead('data_nFET_IdVd.csv');
scf(3);clf(3);
plot2d("nl", nFET_IdVd(:,1), nFET_IdVd(:,2));p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 3; p.children.line_mode="off";p.children.mark_foreground=1;
//a=gca();a.data_bounds=[0 1e-11; 2.5 1e-4];
xtitle("","Vd(V)","Id(A)");
|
d51326436916eb85d3e46b9aed6836d38ffad319 | dd537a2a0c34c08c5c45eb32ecf0a6650d6aee81 | /A6.sce | 51c80f4e71893d808d710a4a4e514a3ff2ae64ef | [] | no_license | hadizainurin/DSP | 5855b1d19d90b5c284f73b19a6e9792403d7575b | ca873a6fdba7c655f681567d49a813bb3bd4cd8a | refs/heads/main | 2023-03-02T09:31:09.692702 | 2021-02-05T15:36:50 | 2021-02-05T15:36:50 | 324,384,788 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,132 | sce | A6.sce | //Plot the graph
clf(); //clear figure
subplot(3,1,1);
title("Original signal with noise")
ylabel ("Amplitude");
xlabel ("Frequency (Hz)");
plot2d(y1,abs(Y(1:N)/N)); //Clipping the original signal with noise
//Designing the Single-band Filter
for i=1 :length(t)
if y1(i)>290 && y1(i)<2010; //frequency range for single band-reject ideal filter
H(i)=0;
Y(i)=Y(i)*H(i); //Reject bandwidth or H = 0
else
H(i)=1;
Y(i)=Y(i)*H(i); //Accept Bandwidth or H = 1
end
end
filter_noise= ifft(Y(1:N))
//Plot the single band-reject filter
subplot(3,1,2)
plot2d(y1,H(1:N))
title("Single Band-reject ideal filter")
xlabel("Frequency (Hz)")
ylabel("Amplitude")
//Plot the impulse response
subplot(3,1,3)
plot2d(impulse_response)
title("Impulse Response")
xlabel("Frequency (Hz)")
ylabel("Amplitude")
impulse_response=ifft(H)
//Testing and generating the sound wave
playsnd(filter_noise, fs); //Is possible to improve the filter performance through double band-reject filter instead of single filter
wavwrite(filter_noise, fs, "C:\Users\User\Desktop\Important\DSP\Assignment6\originalmessage.wav")
|
074aa68b504a44de3130d6bc00645e326ca22f9e | 449d555969bfd7befe906877abab098c6e63a0e8 | /866/CH12/EX12.4/12_4.sce | bd15f39ce06f52d51854572c51dff74715ec79a9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 424 | sce | 12_4.sce | clc
b=250 //mm
d=400 //mm
dia=20 //mm
n=3
SigmaC=7 //N/mm^2
SigmaS=140 //N/mm^2
m=15
As=n*%pi*dia^2 /4
n=m*As*(sqrt(1+ 2*b*d/(m*As))-1)/b
BMC=SigmaC*b*n*(d-n/3)*10^(-6) /2
BMS=SigmaS*As*(d-n/3)*10^(-6)
if BMC>=BMS then
printf("Limiting material is Steel and moment of resistance of the beam is %f",BMS)
else
printf("Limiting material is Concrete and moment of resistance of the beam is %f",BMC)
end
|
a4985f3b8e665b809be7bfce62f3de8456cd5a9c | 7c82ece01341a445b10f5cccd1ff7c8614e1c5a2 | /TP1_Linear system/DeflationInverse.sci | 39d3d7705d2f143b77a1c2fbacd55c566a0d3b11 | [
"MIT"
] | permissive | PaulEmmanuelSotir/TPs_3IF | 87116bcf91d7f871f77bef26e35684f02c5ece87 | 51e1b82837bd2e9e01fe84721f127c469f1f24a7 | refs/heads/master | 2021-06-01T15:55:23.452046 | 2016-05-24T13:54:53 | 2016-05-24T13:54:53 | 43,512,483 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 676 | sci | DeflationInverse.sci | function [vecs,lambdas] = DeflationInverse(A,nbr_val_propre)
// Output variables initialisation (not found in input variables)
vecs=[];
lambdas=[];
// Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
k = 5000;
// ! L.4: real(nbr_val_propre) may be replaced by:
// ! --> nbr_val_propre if nbr_val_propre is Real.
vecs = cell(real(nbr_val_propre),1);
lambdas = zeros(nbr_val_propre,1);
Z = inv(A);
for i = mtlb_imp(1,nbr_val_propre)
[v,lambda_v] = PuissancesIterees(Z,k);
[u,truc] = PuissancesIterees(Z',k);
Z = mtlb_s(Z,(lambda_v*(v*u'))/(u'*v));
lambdas = mtlb_i(lambdas,i,1/lambda_v);
vecs(i).entries = v;
end;
endfunction
|
fbf17db9e808614f5b308da317f07fc9c0822817 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/null.man.tst | 45ea970866c4755bf2656713de0fdb8c0470cb0e | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 60 | tst | null.man.tst | clear;lines(0);
l=list(1,2,3);
l(2)=null() // get list(1,3)
|
211e14c1240cb044a45474750140e8c876d54881 | 449d555969bfd7befe906877abab098c6e63a0e8 | /752/CH16/EX16.9.1/16_9_1.sce | 00f21d498e4d63ae3fed412f4875924033ea4178 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 337 | sce | 16_9_1.sce | clc;
//prob no. 16.9.1
//Half dipole antenna is given with I=Io*cos(Bl) where l=0
//The physical length of the antenna is wl/2
//consider wl=unity and current Io=unity
Io=1;
wl=1;
phy_length=wl/2;
I_av=2*Io/%pi;
//Thus area is given as
Area=I_av*phy_length;
// From the above eq l_effective is given as
disp('l_eff= wl/pi'); |
9829b697b0b83e3211f9df9f9da2ae588e6ea427 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1418/CH27/EX27.9/EX27_9.sce | 319d6627971df68b4356b2574561cba7750564ae | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 420 | sce | EX27_9.sce | //EXAMPLE 27.9
//DYNAMO
clc;
funcprot(0);
//Variable Initialisation
N=800;........//Speed in rpm
cs=123;.......//Number of segments in a commutator
Wb=3;.........//Brush span in segments
v=N*cs/60;.............//Velocity in segments/second
ct=Wb*60*1000/(N*cs);........//Commutation time in Milliseconds
y=round(ct*100)/100;......//Rounding of decimal places
disp(y,"Commutation time in Milliseconds:");
|
e63d38ccdc2d364bf268eaaef601ab942c971f56 | dbf12e570a5d35c9e2f5fe097532dd409c7ca042 | /scilabmini.sce | c0fb8a37b84c6eccceaad74f5ff2f9758a18fbd1 | [] | no_license | itsmanisk/Image-Editor | 3b3b09623c3b4cc6f87ceef64d27ae232aedff82 | ac2fd903e92d3e60dcf8a48adf705eed2f280cff | refs/heads/master | 2021-10-24T22:22:28.089285 | 2019-03-29T12:06:57 | 2019-03-29T12:06:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 11,090 | sce | scilabmini.sce | // This GUI file is generated by guibuilder version 4.2.1
//////////
f=figure('figure_position',[628,83],'figure_size',[638,504],'auto_resize','on','background',[33],'figure_name','Graphic window number %d','dockable','off','infobar_visible','off','toolbar_visible','off','menubar_visible','off','default_axes','on','visible','off');
//////////
handles.dummy = 0;
handles.Image=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.0171313,0.7443925,0.2214744,0.0659091],'Relief','default','SliderStep',[0.01,0.1],'String','Capture Image !!','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Image','Callback','Capture')
handles.B_image=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.0242693,0.649705,0.2176923,0.0636364],'Relief','default','SliderStep',[0.01,0.1],'String','Browse image !!','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','B_image','Callback','browse')
handles.neg=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.7604502,0.74,0.1958717,0.0509091],'Relief','default','SliderStep',[0.01,0.1],'String','Negative Image','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','neg','Callback','negativeimg')
handles.gr=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.7620579,0.6227273,0.1945338,0.0477273],'Relief','default','SliderStep',[0.01,0.1],'String','Gray Image','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','gr','Callback','gray')
handles.Bw=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.766881,0.5159091,0.191672,0.0409091],'Relief','default','SliderStep',[0.01,0.1],'String','BW Image','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Bw','Callback','BW')
handles.rf=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.766881,0.4136364,0.1897106,0.0454545],'Relief','default','SliderStep',[0.01,0.1],'String','Cartoon Filter1','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','rf','Callback','red')
handles.gf=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.7700965,0.3195455,0.1913183,0.0486364],'Relief','default','SliderStep',[0.01,0.1],'String','Cartoon Filter2','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','gf','Callback','green')
handles.bf=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.7700965,0.2,0.1945338,0.0531818],'Relief','default','SliderStep',[0.01,0.1],'String','Cartoon Filter3','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','bf','Callback','blue')
handles.Hist=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.555339,0.1713646,0.2170381,0.0588062],'Relief','default','SliderStep',[0.01,0.1],'String','Histogram Image','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Hist','Callback','histogram')
handles.thres=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.2755281,0.1676137,0.2227066,0.062557],'Relief','default','SliderStep',[0.01,0.1],'String','Thresold Image','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','thres','Callback','thresolding')
handles.enhance=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.0171313,0.1787638,0.2084306,0.0665292],'Relief','default','SliderStep',[0.01,0.1],'String','Image Enhance','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','enhance','Callback','enhance')
handles.crop=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.0171313,0.2977045,0.1955821,0.0605389],'Relief','default','SliderStep',[0.01,0.1],'String','Crop Image','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','crop','Callback','crop')
handles.blur=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.2769557,0.0963121,0.2227404,0.0657324],'Relief','default','SliderStep',[0.01,0.1],'String','Blur Image','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','blur','Callback','blur')
handles.bit_slice=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.5496286,0.09869,0.2198784,0.0671655],'Relief','default','SliderStep',[0.01,0.1],'String','Edge Detection','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','bit slice','Callback','bitslice')
handles.creators=uicontrol(f,'unit','normalized','BackgroundColor',[0.5,0.5,0.5],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[20],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.2025723,0.8987069,0.5473312,0.0625],'Relief','default','SliderStep',[0.01,0.1],'String','Image Editor','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','creators','Callback','creators')
f.visible = "on";
//////////
// Callbacks are defined as below. Please do not delete the comments as it will be used in coming version
//////////
function Capture
global I;
//Write your callback for Image here
n = camopen(0);
im = camread(n); //get a frame
imshow(im);
tic();
for cnt = 1:80
im = camread(n);
imshow(im);
end
camclose(1);
I=im;
endfunction
function browse
//Write your callback for B_image here
[filename, filepath]=uigetfile("*.*","img");
file_path = filepath+"\"+filename;
global I;
I=imread(file_path);
imshow(I);
endfunction
function negativeimg
//Write your callback for neg here
global I;
im1 = 255 - I;
imshow(im1);
endfunction
function gray
//Write your callback for gr here
global I;
im2=rgb2gray(I);
imshow(im2);
endfunction
function BW
//Write your callback for Bw here
global I;
im3 = im2bw(I,0.5);
imshow(im3);
endfunction
function red
//Write your callback for rf here
global I;
filter = fspecial('sobel');
imf = filter2(I,filter);
imshow(imf)
endfunction
function green
//Write your callback for gf here
global I;
filter = fspecial('sobel');
imf = imfilter(I, filter);
imshow(imf);
endfunction
function blue
//Write your callback for bf here
global I;
filter = fspecial('sobel');
imf = filter2(I, filter);
imshow(imf);
endfunction
function histogram
//Write your callback for Hist here
global I;
t=rgb2gray(I);
J = imhistequal(t);
imshow(J);
endfunction
function thresolding
//Write your callback for thres here
global I;
th = imgraythresh(I);
S2 = im2bw(I,th);
figure(); imshow(S2);
endfunction
function enhance
//Write your callback for enhance here
global I;
J = imrotate(I,45);
figure(); imshow(J);
endfunction
function crop
//Write your callback for crop here
global I;
I2 = imcropm(I);
imshow(I2);
endfunction
function blur
//Write your callback for blur here
global I;
A = imnoise(I,'Gaussian',0.04,0.003);
figure,imshow(A);
I7 = double(A);
sigma = 1.76; %Standard Deviation
sz = 3; %Box size
[x,y]=meshgrid(-sz:sz,-sz:sz);
M = size(x,1)-1;
N = size(y,1)-1;
%Gaussian
Exp_comp = -(x.^2+y.^2)/(2*sigma*sigma);
Kernel= exp(Exp_comp)/(2*pi*sigma*sigma);
Output=zeros(size(I7));
I7 = padarray(I7,[sz sz]);
%Convolution
for i = 1:size(I7,1)-M
for j =1:size(I7,2)-N
Temp = I7(i:i+M,j:j+M).*Kernel;
Output(i,j)=sum(Temp(:));
end
end
Output = uint8(Output);
figure,imshow(Output);
endfunction
function bitslice
//Write your callback for bit slice here
global I;
im = rgb2gray(I);
E = edge(im, 'sobel');
imshow(E);
E = edge(im, 'canny', [0.06, 0.2]);
imshow(E);
E = edge(im, 'prewitt');
imshow(mat2gray(E));
endfunction
function creators
//Write your callback for obj15 here
disp("Manish ");
endfunction
|
63a0a782c34d86de792ff1d35b866d24df6d9af4 | 292983cd8dd99bd552dbbfb2088669e2fd8e9256 | /DustyWave/DustyWaveMonodispEnergy.sce | b91e355b6f0ad8a3788cfae7dc90793474d4f445 | [] | no_license | MultiGrainSPH/1D_Dust_DS | ec848f29b53737c8fcaed4458be309055c18c206 | 0ad4619952e6e5fc6ede5859abe1f3a432dca0f4 | refs/heads/master | 2022-05-10T18:59:57.101731 | 2022-05-05T08:15:54 | 2022-05-05T08:15:54 | 244,804,407 | 1 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 6,507 | sce | DustyWaveMonodispEnergy.sce | //НАЧАЛЬНЫЕ ДАННЫЕ
rho_g = 1; //начальная плотность газа
e_g=1;
N = 1; //количество фракций пыли
rho_i = [1]; //массив начальной плотности пыли//все rho_i больше 0 и их сумма меньше rho_s
e_i=[1]
t_i = [10]; //массив времён релаксации
rho_s = 4; //истинная плотность пыли
Cs = 2/3; //скорость звука в газе
k = 2*%pi; //волновое число
g=4/3;
Cp=1.0;
Cv=1.0;
Cdv=1.0;
zt=10;
delta_rho_g_Wave = 1;
A_V=Cs; //амплитуда для скорости
A_D=rho_g; //амплитуда для плотности
С_Const = 1;//длина отрезка координат
number_Of_Points = 100;//количество узлов, по которым строим графики
t_Selected = 0.1;//в какой момент времени рассматриваем волну (t*)
path='C:\Program_for_Article\Output files';//путь до текстовых файлов
color_Arr=['blue', 'green'];
//КОНЕЦ НАЧАЛЬНЫХ ДАННЫХ
//
theta_i = rho_i / rho_s;
Theta = sum(theta_i);
//disp(theta_i);
//disp(Theta);
for i=1:N
rho_div_t(i) = rho_i(i) / t_i(i);
end
disp(rho_i(1))
//ЗАДАЁМ МАТРИЦУ (7)
for i=1:3*N+3
for j=1:3*N+3
M(i,j) = 0;
end
end
M(1,1)=poly([0,imult(1)],'w','c');
M(1,2)=0;
M(1,3)=-k*rho_g;
M(1,4)=0;
M(1,5)=0;
M(1,6)=0;
M(2,1)=0;
M(2,2)=poly([0,imult(1)],'w','c');
M(2,3)=0;
M(2,4)=-k*rho_i(1);
M(2,5)=0;
M(2,6)=0;
M(3,1)=-k*(g-1)*e_g;
M(3,2)=0;
M(3,3)=poly([imult(rho_div_t(1)),rho_g*imult(1)],'w','c');
M(3,4)=-imult(rho_div_t(1));
M(3,5)=-k*(g-1)*rho_g;
M(3,6)=0;
M(4,1)=0;
M(4,2)=0;
M(4,3)=-imult(rho_div_t(1));
M(4,4)=poly([imult(rho_div_t(1)),rho_i(1)*imult(1)],'w','c');
M(4,5)=0;
M(4,6)=0;
M(5,1)=0;
M(5,2)=0;
M(5,3)=-k*(g-1)*e_g*rho_g;
M(5,4)=0;
M(5,5)=poly([imult(rho_i(1)*Cp/Cv/zt),rho_g*imult(1)],'w','c');
M(5,6)=-imult(rho_i(1)*Cp/Cdv/zt);
M(6,1)=0;
M(6,2)=0;
M(6,3)=0;
M(6,4)=0;
M(6,5)=-imult(rho_i(1)*Cp/Cv/zt);
M(6,6)=poly([imult(rho_i(1)*Cp/Cdv/zt),rho_i(1)*imult(1)],'w','c');
disp(M);
disp(det(M));
for i=1:3*N+3
arr_Roots(i) = roots(det(M))(i);
end
disp(arr_Roots);
//ВЫБИРАЕМ КОРЕНЬ w_root ПО НАИБОЛШЕЙ МНИМОЙ ЧАСТИ
w_root = arr_Roots(1);
for i=2:3*N+3
if imag(arr_Roots(i)) > imag(w_root) then
w_root = arr_Roots(i);
end
end
disp(w_root);
//ЗАДАЁМ МАТРИЦУ (7) БЕЗ СТОЛБЦА И СТРОКИ
for i=1:3*N+2
for j=1:3*N+2
new_M(i,j) = 0;
end
end
new_M(1,1)=0;
new_M(1,2)=-k*rho_g;;
new_M(1,3)=0;
new_M(1,4)=0;
new_M(1,5)=0;
new_M(2,1)=imult(w_root);
new_M(2,2)=0;
new_M(2,3)=-k*rho_i(1);
new_M(2,4)=0;
new_M(2,5)=0;
new_M(3,1)=0;
new_M(3,2)=imult(rho_div_t(1))+rho_g*imult(1)*w_root;
new_M(3,3)=-imult(rho_div_t(1));
new_M(3,4)=-k*(g-1)*rho_g;
new_M(3,5)=0;
new_M(4,1)=0;
new_M(4,2)=-imult(rho_div_t(1));
new_M(4,3)=imult(rho_div_t(1))+rho_i(1)*imult(1)*w_root;
new_M(4,4)=0;
new_M(4,5)=0;
new_M(5,1)=0;
new_M(5,2)=0;
new_M(5,3)=0;
new_M(5,4)=imult(rho_i(1)*Cp/Cv/zt+rho_g*w_root);
new_M(5,5)=-imult(rho_i(1)*Cp/Cdv/zt);
disp(new_M);
disp(inv(new_M));
//ЗАДАЁМ ПРАВУЮ ЧАСТЬ
B(1)=imult(1)*w_root;
B(2)=0;
B(3)=-k*(g-1)*e_g;
B(4)=0;
B(5)=0;
disp(B);
//НАХОДИМ РЕШЕНИЕ СЛАУ
X = inv(new_M) * B;//массив с дельтами скоростей и плотностей пыли
disp(X);
//ЗАПИСЫВАЕМ ЗНАЧЕНИЯ ВОЗМУЩЕНИЙ С ВОЛНАМИ
delta_v_Wave = X(1);
for i=1:N
delta_ui_Wave(i) = X(i+1);
end
for i=1:N
delta_rhoi_Wave(i) = X(i+N+1);
end
//ВОЗМУЩЕНИЯ
function y=real_delta_f(delta_f_Wave, x, t, A)
y = A * delta_f_Wave * exp(imult(k) * x - w_root * t);
y = real(y);
endfunction
//СЕТКА
function X=uniform_Grid(a,b,N)//равномерная сетка на [a,b] с N узлами
h=(b-a)/(N-1);
for n=1:N
X(n)=a+h*(n-1);
end
endfunction
X_x=uniform_Grid(0,С_Const,number_Of_Points);
//СОЗДАЁМ ИМЕНА ФАЙЛАМ ДЛЯ ГАЗА И ПЫЛИ ПРИ t=0, t=t*
for i=1:1+N
if i==1 then
name_Arr(i) = path + '\' + 'gas.txt';
else
name_Arr(i) = path + '\' + 'dust ' + string(i-1) + '.txt';
end
end
//СОЗДАЁМ ПУСТЫЕ ФАЙЛЫ ДЛЯ ГАЗА И ПЫЛИ И ЗАПИСЫВАЕМ В НИХ ШАПКУ ТАБЛИЦЫ
for i=1:1+N
f_w = mopen(name_Arr(i), 'wt');
mfprintf(f_w, '# x Density (t = 0) Density (t = ' + string(t_Selected) + ') Velocity (t = 0) Velocity (t = ' + string(t_Selected) + ')\n');
mclose(f_w);
end
//ЗАПИСЫВАЕМ ДАННЫЕ В ФАЙЛЫ
f_a = mopen(name_Arr(1), 'at');
for i=1:length(X_x)
Y1 = rho_g + real_delta_f(delta_rho_g_Wave, X_x(i), 0, A_D);
Y2 = rho_g + real_delta_f(delta_rho_g_Wave, X_x(i), t_Selected, A_D);
Y3 = real_delta_f(delta_v_Wave, X_x(i), 0, A_V);
Y4 = real_delta_f(delta_v_Wave, X_x(i), t_Selected, A_V);
mfprintf(f_a, '%f %f %f %f %f\n', X_x(i), Y1, Y2, Y3, Y4);
end
mclose(f_a);
for s=1:N
f_a = mopen(name_Arr(s+1), 'at');
for i=1:length(X_x)
Y1 = rho_i(s)+real_delta_f(delta_rhoi_Wave(s), X_x(i), 0,A_D);
Y2 = rho_i(s)+real_delta_f(delta_rhoi_Wave(s), X_x(i), t_Selected, A_D);
Y3 = real_delta_f(delta_ui_Wave(s), X_x(i), 0, A_V);
Y4 = real_delta_f(delta_ui_Wave(s), X_x(i), t_Selected, A_V);
mfprintf(f_a, '%f %f %f %f %f\n', X_x(i), Y1, Y2, Y3, Y4);
end
mclose(f_a);
end
//НАХОДИМ ЗНАЧЕНИЯ ПЛОТНОСТИ И СКОРОСТИ ГАЗА В УЗЛАХ
for i=1:length(X_x)
Y_x_rho_g_0(i) = real_delta_f(delta_rho_g_Wave, X_x(i), 0, A_D);
Y_x_rho_g(i) = real_delta_f(delta_rho_g_Wave, X_x(i), t_Selected, A_D);
Y_x_v_g_0(i) = real_delta_f(delta_v_Wave, X_x(i), 0, A_V);
Y_x_v_g(i) = real_delta_f(delta_v_Wave, X_x(i), t_Selected, A_V);
end
//РИСУЕМ ГРАФИКИ
subplot(1,2,1);
plot2d(X_x, Y_x_rho_g_0, style=color(color_Arr(1)), strf='181');
plot2d(X_x, Y_x_rho_g, style=color(color_Arr(2)), strf='181');
hl=legend(['t = 0', 't = '+string(t_Selected)], -1);
g=get('current_axes');
g.title.text='Gas Density';
subplot(1,2,2);
plot2d(X_x, Y_x_v_g_0, style=color(color_Arr(1)), strf='181');
plot2d(X_x, Y_x_v_g, style=color(color_Arr(2)), strf='181');
hl=legend(['t = 0', 't = '+string(t_Selected)], -1);
g=get('current_axes');
g.title.text='Gas Velocity';
|
0ddbe4ad547b46577dd0f663b8f900a80db6779f | df924acfdd5b043da9336a2276726dbfb655735a | /test_suite/drtest11.tst | 653439277a22467510baa775f330a6c09670bae7 | [] | no_license | noxdafox/clips | b8fb280223b5aae615e427bf1f31c03cb932b09d | a2c548b69394f0e2cf7c6d583810b6a29a662ae1 | refs/heads/master | 2023-09-01T18:52:07.614807 | 2021-12-14T20:10:21 | 2021-12-14T20:10:21 | 95,596,886 | 11 | 10 | null | null | null | null | UTF-8 | Scilab | false | false | 360 | tst | drtest11.tst | (unwatch all)
(clear)
(set-strategy depth)
(open "Results//drtest11.rsl" drtest11 "w")
(dribble-on "Actual//drtest11.out")
(batch "drtest11.bat")
(dribble-off)
(load "compline.clp")
(printout drtest11 "drtest11.bat differences are as follows:" crlf)
(compare-files "Expected//drtest11.out" "Actual//drtest11.out" drtest11)
; close result file
(close drtest11)
|
bab1a4bece5f42b62cfc568a2c56494f842c399c | 63c8bbe209f7a437f8bcc25dc1b7b1e9a100defa | /test/0046.tst | dccdc1a5386622e4a53f01ad3ee8b7d37985cef0 | [] | no_license | fmeci/nfql-testing | e9e7edb03a7222cd4c5f17b9b4d2a8dd58ea547c | 6b7d465b32fa50468e3694f63c803e3630c5187d | refs/heads/master | 2021-01-11T04:09:48.579127 | 2013-05-02T13:30:17 | 2013-05-02T13:30:17 | 71,239,280 | 0 | 0 | null | 2016-10-18T11:01:57 | 2016-10-18T11:01:55 | Python | UTF-8 | Scilab | false | false | 281 | tst | 0046.tst | sPlIttEr m {}
fILTER g { K > B oR BFB >= Z }
FiltEr hLH {KXYDk Or Not i or NOt b }
R BRanCH p
GroupER iVfn {mOdULE Op{ } mODULE S{ } MoDule R{ } agGregATE avG(Q.Qt) aS U ,G ,SuM(wuo.i) aS E ,Max(b.L) aS JOyT }
unGrOuper Z { }
GRoUpfiLTER Pbu {}
merger g { expORT B } |
8fbfd32835f3a3513d9f4f53cd44ff2c3e20d282 | 449d555969bfd7befe906877abab098c6e63a0e8 | /752/CH12/EX12.13.1/12_13_1.sce | a6a18b689c16ab2c76701bebfae47594b24a5c27 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 276 | sce | 12_13_1.sce | clc;
//page no 451
//problem no 12.13.1
//A 8 bit codewords
Pbec=0.01;n=8;i=3;
Pi=(Pbec^i)*((1-(Pbec))^(n-i));
Cin=(factorial(n))/(factorial(i)*factorial(n-i));
Pin=Cin*Pi;
P_in=Cin*Pbec^i
disp(Pin,'Pin=','The probability of a received codeword');
disp(P_in,'P_in'); |
53e0cc11b0be9d20479021edcca9d17c48ac5eaa | 449d555969bfd7befe906877abab098c6e63a0e8 | /1271/CH5/EX5.10/example5_10.sce | 03558e9a9ff2bc7b799ad1f0fbe14ff28e874e3d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 566 | sce | example5_10.sce | clc
// Given that
mu1 = 3.6 // refractive index for core
mu2 = 3.55 // refractive index for cladding
// Sample Problem 10 on page no. 5.19
printf("\n # PROBLEM 10 # \n")
NA = sqrt(mu1^2 - mu2^2)//calculation for numerical aperture
Mm1 = 0.5 * (%pi * 5 * NA)^2//calculation for no. of modes in first case
Mm2 = 0.5 * (%pi * 50 * NA)^2//calculation for no. of modes in second case
printf("\n Standard formula used \n Mm=1/2(pi*d*NA/lambda)^2. NA=sqrt(mu1^2-mu2^2). \n")
printf("\n Number of modes in first case = %d. \n Number of modes in second case = %d.",Mm1,Mm2)
|
9760437d2eb3d4713c3fe402627f9d5448725025 | 1c54ebdcebf6a77c13f164e86a9b22318bda095f | /FunctionCalls/NestedCall/NestedCall.tst | 1b7f4cecb97aa97a4e28c3803b8d5568c88600f3 | [] | no_license | dannyrose42/nand2tetris_VM_TRANSLATOR | b97981fddd1a7cdfd21df312960ef6d249d3cb4b | 7aac2ff008f3538856a34da0a07a0c977e639b33 | refs/heads/master | 2021-01-20T12:15:17.523914 | 2015-09-30T01:38:04 | 2015-09-30T01:38:04 | 38,927,721 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 435 | tst | NestedCall.tst | // Test file for NestedCall test.
load NestedCall.asm,
output-file NestedCall.out,
compare-to NestedCall.cmp,
output-list RAM[0]%D1.6.1 RAM[1]%D1.6.1 RAM[2]%D1.6.1 RAM[5]%D1.6.1 RAM[6]%D1.6.1;
set RAM[0] 261,
set RAM[1] 261,
set RAM[2] 256,
set RAM[3] -1,
set RAM[4] -1,
set RAM[256] 1234, // fake RIP
set RAM[257] -1,
set RAM[258] -1,
set RAM[259] -1,
set RAM[260] -1,
repeat 1000 {
ticktock;
}
output;
|
7ae5b883cdadc32221ad0066b470c059db774575 | 449d555969bfd7befe906877abab098c6e63a0e8 | /764/CH5/EX5.16.c/functions5_16.sci | d23d26d628504856e0e16c53df024c785441ff02 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,995 | sci | functions5_16.sci |
//Function generating the values of Ka, Kb and Kc
function [Ka, Kb, Kc] = fluctuate(s, d, r)
//Calculate Ka
//Nomenclature:
//1 - Ground
//2 - Machined or cold drawn
//3 - Hot-rolled
//4 - Forged
surface = [1 2 3 4]
Ksurfa = [1.58 4.51 57.7 272]
Ksurfb = [-0.085 -0.265 -0.718 -0.995]
for j = 1:1:4
if (s == surface(j))
a = Ksurfa(j)
b = Ksurfb(j)
break
end
end
//From equation 5.18 on page 157
Ka = a * (Sut^b)
if (Ka > 1) then
Ka = 1
end
//Calculate Kb
//d (mm)
if (d <= 7.5) then
Kb = 1
elseif ((d > 7.5) & (d <= 50))
Kb = 0.85
elseif (d > 50)
Kb = 0.75
else
printf('Error in Kb')
end
//Calculate Kc
// r (%)
rel = [50 90 95 99 99.9 99.99 99.999]
Krel = [1 0.897 0.868 0.814 0.753 0.702 0.659]
for i = 1:1:7
if (r == rel(i)) then
Kc = Krel(i)
break
end
end
endfunction
//Function for plotting S-N Curve
function[a, b, c, z]= SNplot(Sut,Se)
//Initialise e
e = 4
//Initialise all given values
a = log10(0.9 * Sut)
b = log10(Se)
c = log10(Nmin)
z = log10(Nmax)
//Calculate the values of y-coordinate when x = 4 and 5 using linear interpolation
for i = 1:1:4
if(i == 1)
s(i) = c
l(i) = a
elseif(i == 4)
s(i) = z
l(i) = b
else
s(i) = log10(10^e)
l(i) = b + (((a - b)/(c - z))*(s(i) - z))
e = e + 1
end
end
//Plot S-N Curve
y = {l(1), l(2), l(3), l(4)}
x = {s(1), s(2), s(3), s(4)}
plot(x,y,'-*')
plot2d3(x,y)
//Get the handle of current axes
g = gca()
//Give labels and set label properties
g.labels_font_color=5
g.font_size=3
g.grid=[1,1]
g.box="off"
title('S-N Curve (Example 5.16)')
xlabel('log10N')
ylabel('log10Sf')
endfunction |
649520f93d8f1d9202a0019f6d71b2880bd17bbc | 449d555969bfd7befe906877abab098c6e63a0e8 | /2561/CH7/EX7.2/Ex7_2.sce | ef4332cd127571e258b0c6884f658db12b7c85f3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 324 | sce | Ex7_2.sce | //Ex7_2
clc
A=10000
disp("A= "+string(A)) //Amplifier gain
B=0.01
disp("B= "+string(B)) //Feedback factor
Af=[A/(1+A*B)]
disp("Af= [A/(1+A*B)]="+string(Af)) //Feedback gain
A1=100000
disp("A1= "+string(A1)) //New amplifier gain value
Af1=[A1/(1+A1*B)]
disp("Af1= [A1/(1+A1*B)]="+string(Af1)) //New feedback gain
|
54d2239cdbc61966ad5ec4b098ef42c9e54380a5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1826/CH5/EX5.2/ex5_2.sce | fcfc28ab38aac8299523dd8b3c8ff38cd2ac1812 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 240 | sce | ex5_2.sce | // Example 5.2, page no-130
clear
clc
lp=4.0185*10^-10//m
dens=4285//kg/m^3
avg=6.022*10^26
wt_cs=132.9
wt_cl=35.5
N=(dens*avg*lp^3)/(wt_cs+wt_cl)
sd=(1-N)*100/1
printf("The number of Schottky defects per unit cell = %.3f%%",sd)
|
11fbf686a54cce08c39c9770ce397a1b820fe987 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1847/CH2/EX2.17/Ch02Ex17.sce | c42bc889a43a3e255a8fd43f041d7de503b4a1ce | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 745 | sce | Ch02Ex17.sce | // Scilab Code Ex2.17:: Page-2.15 (2009)
clc; clear;
theta = 178; // Vertex angle of biprism, degrees
alpha = (180-theta)/2*%pi/180; // Acute angle of biprism, radian
mu = 1.5; // Refractive index of biprism
y1 = 20; // Distance of biprism from the source, cm
y2 = 125; // Distance of biprism from the screen, cm
D = y1 + y2; // Distance between slits and the screen, cm
d = 2*(mu-1)*alpha*y1; // Separation between the slits, cm
b = 0.025; // Fringe width of the interfernce pattern due to biprism, cm
lambda = b*d/D; // Wavelength of light used, cm
printf("\nThe wavelength of light used to illuminate slits = %4d angstrom", lambda/1e-08);
// Result
// The wavelength of light used to illuminate slits = 6018 angstrom
|
d2860694018afd5f6fae5bbf130b37be0beec89c | 449d555969bfd7befe906877abab098c6e63a0e8 | /132/CH10/EX10.1/Example10_1.sce | 251ae4c4ddf7bb0d2be78b2034c08cecf1c2642e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 307 | sce | Example10_1.sce | //Example 10.1
//Program to Determine the Transformer Turns Ratio
clear;
clc ;
close ;
//Given Circuit Data
RL=16;// Ohms
RLd=10*10^3;// Ohms
//Calculation
N12=sqrt(RLd/RL);//N12=N1/N2
//Displaying The Results in Command Window
printf("\n\t The Transformer Turns Ratio is N1/N2 = %d:%d .",N12,1); |
9807c9c2c5f12d12cf414e8687c96dabb86bf996 | 449d555969bfd7befe906877abab098c6e63a0e8 | /149/CH13/EX13.7/ques7.sce | a2a489ee37d201a4e9ce6fcc96b510c5287b6caa | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 339 | sce | ques7.sce | //ques7
clc
disp('solution of the given linear differential equation is given by : ');
m=poly(0,'m');
f=m^3+1;
disp('Using the identity 1/f(D^2)*sin(ax+b)[or cos(ax+b)]=1/f(-a^2)*sin(ax+b)[or cos(ax+b)] this equation can be reduced to ');
disp('y=(4D+1)/65*cos(2x-1)');
y=(cos(2*x-1)+4*diff(cos(2*x-1),x))/65;
disp('y=');
disp(y); |
d7a6bdd6679b21e9793995fad2fdadd30350bde8 | b4980b761e4b88d097e526fe06ebef2383d3d613 | /lab02/2-bit 1-to-8 Demultiplexer/Demultiplexer2bit1to8.tst | a69672cda61bf3ec839f86f6cfacaf45d020120f | [] | no_license | Vineeth-Kada/Computer-Systems-Design | aa42b053c709fdbf06713dc3e1e2649faa02c65d | 4c05e393e057ffb1540c74a53a0cb17f7129d8f8 | refs/heads/main | 2023-06-17T06:27:02.442583 | 2021-07-15T10:43:37 | 2021-07-15T10:43:37 | 289,896,111 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,712 | tst | Demultiplexer2bit1to8.tst | load Demultiplexer2bit1to8.hdl,
output-file Demultiplexer2bit1to8.out,
compare-to Demultiplexer2bit1to8.cmp;
set x1 1, set x0 1, set s2 0, set s1 0, set s0 0, eval;
output-list s2%B3.1.3 s1%B3.1.3 s0%B3.1.3 x1%B3.1.3 x0%B3.1.3;
output;
output-list y01%B3.1.3 y00%B3.1.3 y11%B3.1.3 y10%B3.1.3 y21%B3.1.3 y20%B3.1.3 y31%B3.1.3 y30%B3.1.3 y41%B3.1.3 y40%B3.1.3 y51%B3.1.3 y50%B3.1.3 y61%B3.1.3 y60%B3.1.3 y71%B3.1.3 y70%B3.1.3;
output;
set x1 1, set x0 1, set s2 0, set s1 0, set s0 1, eval;
output-list s2%B3.1.3 s1%B3.1.3 s0%B3.1.3 x1%B3.1.3 x0%B3.1.3;
output;
output-list y01%B3.1.3 y00%B3.1.3 y11%B3.1.3 y10%B3.1.3 y21%B3.1.3 y20%B3.1.3 y31%B3.1.3 y30%B3.1.3 y41%B3.1.3 y40%B3.1.3 y51%B3.1.3 y50%B3.1.3 y61%B3.1.3 y60%B3.1.3 y71%B3.1.3 y70%B3.1.3;
output;
set x1 1, set x0 1, set s2 0, set s1 1, set s0 0, eval;
output-list s2%B3.1.3 s1%B3.1.3 s0%B3.1.3 x1%B3.1.3 x0%B3.1.3;
output;
output-list y01%B3.1.3 y00%B3.1.3 y11%B3.1.3 y10%B3.1.3 y21%B3.1.3 y20%B3.1.3 y31%B3.1.3 y30%B3.1.3 y41%B3.1.3 y40%B3.1.3 y51%B3.1.3 y50%B3.1.3 y61%B3.1.3 y60%B3.1.3 y71%B3.1.3 y70%B3.1.3;
output;
set x1 1, set x0 1, set s2 0, set s1 1, set s0 1, eval;
output-list s2%B3.1.3 s1%B3.1.3 s0%B3.1.3 x1%B3.1.3 x0%B3.1.3;
output;
output-list y01%B3.1.3 y00%B3.1.3 y11%B3.1.3 y10%B3.1.3 y21%B3.1.3 y20%B3.1.3 y31%B3.1.3 y30%B3.1.3 y41%B3.1.3 y40%B3.1.3 y51%B3.1.3 y50%B3.1.3 y61%B3.1.3 y60%B3.1.3 y71%B3.1.3 y70%B3.1.3;
output;
set x1 1, set x0 1, set s2 1, set s1 0, set s0 0, eval;
output-list s2%B3.1.3 s1%B3.1.3 s0%B3.1.3 x1%B3.1.3 x0%B3.1.3;
output;
output-list y01%B3.1.3 y00%B3.1.3 y11%B3.1.3 y10%B3.1.3 y21%B3.1.3 y20%B3.1.3 y31%B3.1.3 y30%B3.1.3 y41%B3.1.3 y40%B3.1.3 y51%B3.1.3 y50%B3.1.3 y61%B3.1.3 y60%B3.1.3 y71%B3.1.3 y70%B3.1.3;
output;
set x1 1, set x0 1, set s2 1, set s1 0, set s0 1, eval;
output-list s2%B3.1.3 s1%B3.1.3 s0%B3.1.3 x1%B3.1.3 x0%B3.1.3;
output;
output-list y01%B3.1.3 y00%B3.1.3 y11%B3.1.3 y10%B3.1.3 y21%B3.1.3 y20%B3.1.3 y31%B3.1.3 y30%B3.1.3 y41%B3.1.3 y40%B3.1.3 y51%B3.1.3 y50%B3.1.3 y61%B3.1.3 y60%B3.1.3 y71%B3.1.3 y70%B3.1.3;
output;
set x1 1, set x0 1, set s2 1, set s1 1, set s0 0, eval;
output-list s2%B3.1.3 s1%B3.1.3 s0%B3.1.3 x1%B3.1.3 x0%B3.1.3;
output;
output-list y01%B3.1.3 y00%B3.1.3 y11%B3.1.3 y10%B3.1.3 y21%B3.1.3 y20%B3.1.3 y31%B3.1.3 y30%B3.1.3 y41%B3.1.3 y40%B3.1.3 y51%B3.1.3 y50%B3.1.3 y61%B3.1.3 y60%B3.1.3 y71%B3.1.3 y70%B3.1.3;
output;
set x1 1, set x0 1, set s2 1, set s1 1, set s0 1, eval;
output-list s2%B3.1.3 s1%B3.1.3 s0%B3.1.3 x1%B3.1.3 x0%B3.1.3;
output;
output-list y01%B3.1.3 y00%B3.1.3 y11%B3.1.3 y10%B3.1.3 y21%B3.1.3 y20%B3.1.3 y31%B3.1.3 y30%B3.1.3 y41%B3.1.3 y40%B3.1.3 y51%B3.1.3 y50%B3.1.3 y61%B3.1.3 y60%B3.1.3 y71%B3.1.3 y70%B3.1.3;
output;
|
be152e93771ea306c93de5b4a2601b0a726dd34d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2381/CH7/EX7.8/ex_8.sce | 410905fe2c498be8ed2dbf0e971c1febb7f5be87 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 209 | sce | ex_8.sce | //Example 8 // Velocity of sound
clc;
clear;
close;
//given data :
lamda1=1;// in m
lamda2=1.01;// in m
a=10/3;// in beats/sec
v=a/((lamda2-lamda1)/(lamda1*lamda2));
disp(v,"The velocity of sound,v(m/s) = ")
|
804f288b665c4ffbbb6304882b6dc534e8e9ac2c | 178822612bcd418dc12ba7a649304a24ab618d60 | /Numerical Analysis/f.sci | de7e19f0737ee37281f587836fa8ea0c4893ded8 | [] | no_license | engom/Math_Problem_Solving | b56c6cbfbff6c416c519795b9ab8f0c0bbba5ea3 | 6538c476681ae4ee803ea9b3a8944c5f370e1961 | refs/heads/master | 2022-05-25T01:13:16.123161 | 2016-02-13T11:32:28 | 2016-02-13T11:32:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 47 | sci | f.sci | function[y]=f(x)
y=3*x^3-2*x+2
endfunction
|
5dd9e24268927bfbe7156604337a733a32528f20 | 449d555969bfd7befe906877abab098c6e63a0e8 | /61/CH14/EX14.4/ex14_4.sce | 023ab04ec8b8cc25d18b5485b53bce2f68b68013 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 253 | sce | ex14_4.sce | //ex14.4
R_f1=22*10^3;
R_i1=2.2*10^3;
R_f2=47*10^3;
R_i2=10*10^3;
A_v1=(R_f1/R_i1)+1; //voltage gain of input stage
A_v2=(R_f2/R_i2)+1; //voltage gain of output stage
A_v=A_v1*A_v2;
disp(A_v,'total voltage gain of the isolation amplifier') |
e2b7bf8093d40016d91a07a1ec0cdb5902dbd8b0 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronic_Measurements_And_Instrumentation_P._Sharma_876.zip/Electronic_Measurements_And_Instrumentation_P._Sharma_876/CH5/EX5.9/Ex5_9.sce | 002166b633d00ab05edc5151d01ef05b8a73725f | [] | 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 | 658 | sce | Ex5_9.sce | errcatch(-1,"stop");mode(2);//caption:Find the value of multiplier resistance for the range(a)0-10V(b)0-50V(c)0-100V(d)0-200V using sensitivity method
//Ex5.9
V1=10//maximum voltage range(in V)
V2=50//maximum voltage range(in V)
V3=100//maximum voltage range(in V)
V4=200//maximum voltage range(in V)
I=0.002//deflection current(in A)
R=100//internal resistance(in ohm)
S=1/I
R1=(S*V1)-R
disp(R1,'(a)multiplier resistance(in ohm)=')
R2=(S*V2)-(R1+R)
disp(R2,'(b)multiplier resistance(in ohm)=')
R3=(S*V3)-(R2+R1+R)
disp(R3,'(c)multiplier resistance(in ohm)=')
R4=(S*V4)-(R1+R2+R3+R)
disp(R4,'(d)multiplier resistance(in ohm)=')
exit();
|
3bb5a41dc3e0e65f72450e5797651451e9c95aaf | 449d555969bfd7befe906877abab098c6e63a0e8 | /1529/CH21/EX21.9/21_09.sce | 6fc369ea631e5fee94ceaf1ba3856f4a71f41af1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 672 | sce | 21_09.sce | //Chapter 21, Problem 9
clc;
v1=4000; //primary voltage
v2=200; //secondary voltage
f=50; //frequency
n2=100; //secondary turns
R=100e3; //resistance in ohm
E=v2;
i1=R/v1; //primary current
i2=R/v2; //secondary current
n1=(v1/v2)*n2; //primary turns
phim=E/(4.44*f*n2); //flux max
printf("(a) Primary current = %f A\n\nSecondary currenr = %f A\n\n\n",i1,i2);
printf("(b) Primary turns = %f\n\n\n",n1);
printf("(c) maximum value of the flux = %f mWb",phim*1000);
|
aab86e7cad2b8950a01bdba780eebc82a8200691 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3446/CH3/EX3.6/Ex3_6.sce | 8270bcb41a56a4851d6fd15ab669e0efe1022040 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 587 | sce | Ex3_6.sce | // Exa 3.6
// TO determine NO of fades per second, average fade duration and maximum velocity of mobile.
clc;
clear all;
p=1;// reflection coefficient of ground
c=3*10^8;// velocity of light in free space(m/sec)
e=2.71828;//Euler's number
fm=20; //in Hz
fc=900*10^6; //carrier frequency in Hz
//solution
Nr=sqrt(2*%pi)*fm*p*e^-(p^2);
printf('NO of fades per second are %.2f \n',Nr);
Afd=e^-(p^2)/(p*fm*sqrt(2*%pi));
printf(' Average fade duration is %.4f sec \n ',Afd);
v=fm*c/fc;
printf('Maximum velocity of mobile is %.2f m/sec = %d Km/hour \n',v,v*18/5);
|
7d981c058bae2bd5ac7f16aa664d95dc1baf5017 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/tests/examples/functions.sci | c7a754fc5c3d3a8e3ca8f9cbca05a884141a9798 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 578 | sci | functions.sci | function rep=x_message(comment,btns)
rep=0
function str=x_dialog(comment,default)
str=default
function str=x_mdialog(varargin)
rhs=size(varargin)
if rhs==2 then
str(size(varargin(2),'*'))=' ',
else
str=varargin($);
end
function num=x_choose(tochoose,comment,button)
num=1
function []=ExecAppli(varargin)
// empty
function []=CreateLink(varargin)
// empty
function rep=x_choices(title,items)
rep=ones(1,size(items))
function addmenu(varargin)
// empty
function delmenu(varargin)
// empty
function unsetmenu(varargin)
// empty
function setmenu(varargin)
// empty
|
b1f5be4babd4b0e89971bcf1e689edd8c51b40d4 | ebd6f68d47e192da7f81c528312358cfe8052c8d | /swig/Examples/test-suite/scilab/array_member_runme.sci | d839f48eeaf0fad69556dc0b7d8f10562407a619 | [
"LicenseRef-scancode-swig",
"GPL-3.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-3.0-only",
"Apache-2.0"
] | permissive | inishchith/DeepSpeech | 965ad34d69eb4d150ddf996d30d02a1b29c97d25 | dcb7c716bc794d7690d96ed40179ed1996968a41 | refs/heads/master | 2021-01-16T16:16:05.282278 | 2020-05-19T08:00:33 | 2020-05-19T08:00:33 | 243,180,319 | 1 | 0 | Apache-2.0 | 2020-02-26T05:54:51 | 2020-02-26T05:54:50 | null | UTF-8 | Scilab | false | false | 371 | sci | array_member_runme.sci | exec("swigtest.start", -1);
f = new_Foo();
Foo_data_set(f, [0:7]);
checkequal(Foo_data_get(f), [0:7], "Foo_data_get()");
Foo_text_set(f, "abcdefgh");
checkequal(Foo_text_get(f), "abcdefgh", "Foo_text_get()");
delete_Foo(f);
m = new_MyBuff();
MyBuff_x_set(m, [0:11]);
checkequal(MyBuff_x_get(m), [0:11], "MyBuff_x_get()");
delete_MyBuff(m);
exec("swigtest.quit", -1);
|
e745c6f46f928f4a80eadce039e8ee58248ccc75 | 8bc1ab9f1d4165ad25962a8bb841b4e0cc161537 | /report1/report1.TST | e8f2dcd3ea528b8715b1600cb8719aa91df86325 | [] | no_license | hyeonjang/scheme-simulation | 95779f08da760d726106ce403709f217d5a4a008 | 45190c9a30ddf8d646500060e75f7e6d14157ecd | refs/heads/master | 2023-01-07T05:14:31.351706 | 2020-11-19T15:57:18 | 2020-11-19T15:57:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,382 | tst | report1.TST | OK
[2] (load "report1.s")
OK
[3] stack
()
[4] (push 'a)
(A)
[5] (push 'b)
(B A)
[6] (pop)
B
[7] stack
(A)
[8] queue
()
[9] (insert 'x)
(X)
[10] (insert 'y)
(X Y)
[11] (extract)
X
[12] queue
(Y)
[13] (sequential-search-1 3 '(1 2 3 2 4 1 2 7))
3
[14] (sequential-search-1 2 '(1 12 3 1 44 5 1))
()
[15] (sequential-search-2 3 '(1 2 3 2 4 1 2 7))
3
[16] (sequential-search-2 2 '(1 12 3 1 44 5 1))
()
[17] (custom-min-1 '(2 7 -1 4 5))
-1
[18] (custom-min-2 '(2 7 0 9 -5 1 3))
-5
[19] (last-ele '(a b c))
B
[20] (last-ele '(a b (c d) f))
(C D)
[21] (last-ele '(a b () c))
()
[22] obj-lst
()
[23] (insert-obj 1 'a obj-lst)
(#(((|#!STRUCTURE| . RECORD)) 1 A))
[24] (insert-obj 2 'a obj-lst)
(#(((|#!STRUCTURE| . RECORD)) 1 A) #(((|#!STRUCTURE| . RECORD)) 2 A))
[25] (insert-obj 3 'b obj-lst)
(#(((|#!STRUCTURE| . RECORD)) 1 A) #(((|#!STRUCTURE| . RECORD)) 2 A) #(((
|#!STRUCTURE| . RECORD)) 3 B))
[26] (insert-obj 4 'c obj-lst)
(#(((|#!STRUCTURE| . RECORD)) 1 A) #(((|#!STRUCTURE| . RECORD)) 2 A) #(((
|#!STRUCTURE| . RECORD)) 3 B) #(((|#!STRUCTURE| . RECORD)) 4 C))
[27] (insert-obj 1 'a obj-lst)
You cannot insert. There is already same id
()
[28] (print-obj obj-lst)
1 A; 2 A; 3 B; 4 C;
[29] (delete-obj 3 obj-lst)
(#(((|#!STRUCTURE| . RECORD)) 1 A) #(((|#!STRUCTURE| . RECORD)) 2 A) #(((
|#!STRUCTURE| . RECORD)) 4 C))
[30] (print-obj obj-lst)
1 A; 2 A; 4 C;
[31] (transcript-off)
|
0955596cf6058199d66ebc405edca2ec76cbf879 | d13b729c94c45001726db99bfd7e3c9c2de166af | /sci/genWave02.sci | 60463b7fb329052337ac067d5d8abd7b07312cb8 | [] | no_license | uPD71054/squarewave | 94dd1e5593c0494f561bc29767ae29fc77a4f960 | b84608690c45115b6aef3254090b69b35130254f | refs/heads/master | 2021-01-18T12:58:31.044014 | 2017-10-03T15:31:08 | 2017-10-03T15:31:08 | 100,371,426 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,195 | sci | genWave02.sci | function ret = genWave02(f0, t, multiple, fc, q)
// arguments *********************************************************/
fs = 44100/* Hz */; // sampling rate
//f0 frequecncy
//t time
//multiple 44.1kHz * multiple oversampling
//fc cut off frequency
//q q-value
/******************************************************************************/
// calcurate filter parameters
omega = 2.0 * %pi * fc / (fs * multiple);
alpha = sin(omega) / (2.0 * q);
a0 = 1.0 + alpha;
a1 = -2.0 * cos(omega);
a2 = 1.0 - alpha;
b0 = (1.0 - cos(omega)) / 2.0;
b1 = 1.0 - cos(omega);
b2 = (1.0 - cos(omega)) / 2.0;
// generate wave data
t = 0 : fs - 1;
t0 = 0 : fs * multiple - 1;
y0 = 0.5 * squarewave(2.0 * %pi * f0 * t0 / (fs * multiple));
// filtering
y = zeros(length(t0));
y(1) = y0(1);
y(2) = y0(2);
for i = 3:length(t0);
y(i) = b0/a0 * y0(i) + b1/a0 * y0(i - 1) + b2/a0 * y0(i - 2) - a1/a0 * y(i - 1) - a2/a0 * y(i - 2);
end
// decimation
ret = y(1:multiple:$);
endfunction
|
ff19cda89cea9c54097dbdec8d27fac2b08904cb | 449d555969bfd7befe906877abab098c6e63a0e8 | /1820/CH8/EX8.2/Example8_2.sce | e188f128ba313eaa2ef9da04e55686a8e8efddaa | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,289 | sce | Example8_2.sce | // ELECTRIC POWER TRANSMISSION SYSTEM ENGINEERING ANALYSIS AND DESIGN
// TURAN GONEN
// CRC PRESS
// SECOND EDITION
// CHAPTER : 8 : LIMITING FACTORS FOR EXTRA-HIGH AND ULTRAHIGH VOLTAGE TRANSMISSION
// EXAMPLE : 8.2 :
clear ; clc ; close ; // Clear the work space and console
// GIVEN DATA
f = 60 ; // freq in Hz
d = 3 ; // overall diameter in cm
D = 550 ; // Equilateral spacing b/w conductors in cm
V1 = 345 ; // operating line voltage in kV
V_0 = 172.4 ; // disruptive critical voltage in kV
L = 50 ; // line length in mi
p = 74 ; // Atmospheric pressure in Hg
t = 10 ; // temperature in degree celsius
m_0 = 0.90 ; // Irregularity factor
// CALCULATIONS
r = d/2 ;
delta = 3.9211 * p/( 273 + t ) ; // air density factor
V_0 = 21.1 * delta * m_0 * r * log(D/r) ; // disruptive critical rms line voltage in kV/phase
V =V1/sqrt(3) ; // Line to neutral operating voltage in kV
P_c = (390/delta)*(f+25)*sqrt(r/D)*(V - V_0)^2 * 10^-5 ; // Fair weather corona loss per phase in kW/mi/phase
P_cT = P_c * L ; // For total line length corona loss in kW/phase
T_P_c = 3 * P_cT ; // Total corona loss of line in kW
// DISPLAY RESULTS
disp("EXAMPLE : 8.2 : SOLUTION :-") ;
printf("\n (a) Total fair weather corona loss of the line , P_c = %.1f kW \n",T_P_c) ;
|
2d92f94f220a186b7ed90e4af755f15b46d807d2 | 420d4bcc40d948804a4370652e50a00cbe639cfe | /Graphs API/trip-tests/travel04.tst | 3f621199219ee76beda8256f85a3b643abe05341 | [] | no_license | itsbriantruong/projects | 8cce3eba78a98e598e249f0adffcd9c3b9e3d5ab | 252ad31d3c74ef77e1cee43244e8f51ca47f9b63 | refs/heads/master | 2021-05-29T19:08:04.548321 | 2015-09-09T09:03:16 | 2015-09-09T09:03:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 88 | tst | travel04.tst | java -ea trip.Main -m trip-tests/travel04 <<EOF
C3a, Santa_Cruz, San_Francisco, C3
EOF
|
77c35029c234f18cc99b1e37856057c4bbc85e35 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3717/CH10/EX10.9/Ex10_9.sce | 687f7f06566a2e738484ae6d96352ca425e441f9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 669 | sce | Ex10_9.sce | // Ex10_9 Page:220 (2014)
clc;clear;
d = 2.51e-010; // Spacing between adjacent planes, m
theta = 9; // Glancing angle for diffraction, degree
n = 1; // Order of diffraction
lambda = 2*d*sind(theta)/n; // Wavelength of X-ray from Bragg's Law, m
n = 2; // New order of diffraction
theta = asind(2*lambda/(2*d)); // Glancing angle for second order diffraction, degree
printf("\nThe wavelength of X-rays = %6.4f angstrom", lambda/1e-010);
printf("\nThe glancing angle for second order diffraction = %2d degree", theta);
// Result
// The wavelength of X-rays = 0.7853 angstrom
// The glancing angle for second order diffraction = 18 degree |
c46cb9008a1c25a68525811d09b8ba4a4df003f5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1538/CH6/EX6.5/Ex6_5.sce | 1f62fa15412997a70a4869d114d9405428d37071 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex6_5.sce | //example-6.5
//page no-180
//given
//shear modulus
G=45*10^9 //N/m^2 because 1GPa=10^9 N/m^2
//burge vector
b=2.5*10^-9 //m
//inner and outer radius of elastic strain
r0=11*10^-10 //m
r1=10^5*b //m
//poisson ratio
nu=0.31
//for an edge dislocation
Ued=G*b^2/(4*(%pi)*(1-nu))*log (r0/r1) //J/m
//for screw dislocation
Usd=G*b^2/(4*(%pi))*log (r0/r1) //J/m
//ratio of edge and screw dislocation
ratio=Ued/Usd
printf ("tha ratios of energies of an edge dislocation over screw dislocation is %f",ratio)
|
509e69e1cc28f72b37f1f206a55abbbd48facfe7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2409/CH16/EX16.1/Ex16_1.sce | b3dc9b1ab20931ea1a3c90f923d70c8a1973f434 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,683 | sce | Ex16_1.sce |
//Varaible Declaration
EIRP=55 //EIRP for satellite(dBW)
fD=12.5 //Downlink frequency(GHz)
Pss=-101 //Receiving at ground station direction(degrees west)
Rb=40*10**6 //Transmission Rate(Hz)
D=18 //Diameter of antenna(inches)
n=0.55 //Efficiency of antenna
Tant=70 //Antenna noise(Kelvin)
Teq=100 //Equivalent noise temperature at LNA(Kelvin)
R=6371 //Radius of earth(Km)
L=2 //Transmission losses(dB)
aGSO=42164 //Circumference of earth(km)
k=-228.6 //Boltzmann's constant (dB)
PE=-90 //Longitude of Earth station(degrees west)
LE=45 //Latitude of Earth station(degrees north)
f=14 //Frequency(GHz)
//Calculation
B=PE-Pss
b=acos(cos(B*3.142/180)*cos(LE*3.142/180))
b=b*180/3.142
A=asin(sin(abs(B)*3.142/180)/sin(b*3.142/180))
A=A*180/3.142
Az=180+A //Azimuth angle of antenna(degrees)
d=(R**2+aGSO**2-2*R*aGSO*cos(b*3.142/180))**0.5 //Range of antenna(km)
El=acos(aGSO*sin(b*3.142/180)/d) //Elevation angle of antenna(radians)
El=El*180/3.142 //Elevation angle of antenna(degrees)
El=round(El)
d=round(d)
FSL=32.4+20*log10(d)+20*log10(f*10**3) //Free space loss(dB)
LOSSES=FSL+L //Total Transmission Losses
Ts=Teq+Tant //Total system noise temperature(Kelvin)
T=10*log10(Ts) //Total system noise temperature(dBK)
G=n*(3.192*f*(D/(12)))**2
G=10*log10(G) //Antenna Gain(dB)
GTR=G-T //G/T ratio(dB)
CNR=EIRP+GTR-LOSSES-k //Carrier to noise ratio(dB)
Rb=10*log10(Rb) //Transmission Rate(dBHz)
EbN0R=CNR-Rb //Eb/N0 ratio at IRD(dB)
//Results
printf("The Azimuth angle of antenna is %.1f degrees" ,Az)
printf("The Elevaation Angle of Antenna is %.f degrees",El)
printf("The Range of Antenna is %.f km",d)
printf("The Eb/N0 ratio at IRD is %.1f dB",EbN0R)
|
cc237f6e453cce26d924be120c6edcdd84ff9872 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3250/CH6/EX6.3/Ex6_3.sce | 7a2270c68f56f05a121b0df669696c750c1bbc64 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 313 | sce | Ex6_3.sce | clc
// Given that
m = 5 // Romoval rate in cm^3/min
A = 56 // Atomic gram weight in gm
Z = 2 // Valence at which dissolation takes place
D = 7.8 // Density of iron in gm/cm^3
// Sample Problem 3 on page no. 345
printf("\n # PROBLEM 6.3 # \n")
I = (m/60)*(D*Z*96500)/(A)
printf("\n Current required = %d amp",I)
|
54bc24fcdb9c3c3202ae58d9fbbc554a6d7730ab | 449d555969bfd7befe906877abab098c6e63a0e8 | /1535/CH4/EX4.7/Ch04Ex7.sci | e44cee94a3e80ff2c46a97880c599ecbc9250e6a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 573 | sci | Ch04Ex7.sci | // Scilab Code Ex4.7 : Page-93 (2010)
w = 5; // Width of the grating, cm
N = 320; // Number of lines per cm on grating, per cm
N0 = w*N; // Total number of lines on the grating
lambda = 640; // Wavelength of light, nm
n = 2; // Order of diffraction
d_lambda = lambda/(n*N0); // Separation between wavelengths which the gratign can just resolve, nm
printf("\nThe separation between wavelengths which the grating can just resolve = %3.1f nm", d_lambda);
// Result
// The separation between wavelengths which the grating can just resolve = 0.2 nm |
4928c4d8ac9d9924630eea9b226a596e495ccd61 | 6e257f133dd8984b578f3c9fd3f269eabc0750be | /ScilabFromTheoryToPractice/Computing/testcase.sce | 13542e0bd4722782ee2a00f5932faad6a2581043 | [] | 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 | 85 | sce | testcase.sce | A=[1 2 3;4 5 6;7 8 9]
A(4) // coefficient A(1,2)
A(8) // coefficient A(2,3)
|
872742f7e6025d3687f28cf4644c291e27ae80a7 | 67ba0a56bc27380e6e12782a5fb279adfc456bad | /STAMPER_PROG_7.4/JoinPolylines.sci | 91b2a2a7d4fc4df4d104a7d0114c335744d7abb1 | [] | no_license | 2-BiAs/STAMPER_PROG | 8c1e773700375cfab0933fc4c2b0f5be0ab8e8f0 | 4fdc0bcdaef7d6d11a0dcd97bd25a9463b9550d0 | refs/heads/master | 2021-01-18T19:30:06.506977 | 2016-11-10T23:32:40 | 2016-11-10T23:32:40 | 71,999,971 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 185 | sci | JoinPolylines.sci | function plOutput = JoinPolylines(listInput)
for i = 1:size(listInput)
plTemp = listInput(i);
plOutput($+1:$+size(plTemp,1), 1:2) = plTemp(:,:);
end
endfunction
|
04ea79844e055a29a7039c06a03c7acead2011ac | 449d555969bfd7befe906877abab098c6e63a0e8 | /911/CH9/EX9.7.b/ex_9_7_b.sce | 15b3f5fbe4f19c4ffbfba01f969da00566750da5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | ex_9_7_b.sce | //example 9.7(b)//
clc
//clears the screen//
clear
//clears all existing variables//
disp('The presettable counter has been set as DOWN counter. After 6th pulse it will be set to 0000 state.')
disp('Immediately after eigth state it will be set to 0100 state.') |
c150a0d2a278b2e21efca8f25fa3979c86a7ca67 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2087/CH15/EX15.4/example15_4.sce | bb347904fa32f6c2cca2dc139cd33e7dd408f38e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 587 | sce | example15_4.sce |
//example 15.4
//calculate the economical depth of cutting for cross section of channel
clc;funcprot(0);
//given
B=5; //bed width
t=2; //top width of banks
h=2.92; //heigth of banks from bed
n=1.5;
//sectional area of digging=sectional area of two banks
//By+zy^2=2(h-y)+2n(h-y)^2
//substituting the values and on simplificatio we get
s=poly([18.59,-13.26,1],'x','c');
y=roots(s);
//from this we get y=11.666556 and 1.5934436.
//taking
y=1.5934436;
y=round(y*10)/10;
mprintf("economical depth of cutting=%f m.",y);
|
1a8037d7a0a0baa720ce5e8b161587ce7f8ee610 | 449d555969bfd7befe906877abab098c6e63a0e8 | /191/CH5/EX5.17/Example5_17.sce | 88d222873ff914922ec298dc786419f9b7820548 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 944 | sce | Example5_17.sce | //Gram - Schmidt process for finding orthogonal functions
clc;
clear;
close();
format('v',8);
funcprot(0);
disp('The orthogonal functions : ')
x = poly(0,'x');
ph0 = 1;
disp(ph0 , 'phi0(x) = ');
K1_0 = -integrate('x','x',0,1)/integrate('ph0^2','x',0,1);
ph1 = x + K1_0*ph0;
disp(ph1 , 'phi1(x) = ');
K2_0 = -integrate('x^2*ph0','x',0,1)/integrate('ph0^2','x',0,1);
disp(K2_0 ,'K(2,0) = ');
K2_1 = -integrate('x^2*(x-.5)','x',0,1)/integrate('(x-.5)^2','x',0,1);
disp(K2_1 ,'K(2,1) = ');
ph2 = x^2 + K2_0*ph0 + K2_1*ph1;
disp(ph2 , 'phi2(x) = ');
K3_0 = -integrate('x^3*ph0','x',0,1)/integrate('ph0^2','x',0,1);
disp(K3_0 ,'K(3,0) = ');
K3_1 = -integrate('x^3*(x-.5)','x',0,1)/integrate('(x-.5)^2','x',0,1);
disp(K3_1 ,'K(3,1) = ');
K3_2 = -integrate('x^3*(x^2-x+1/6)','x',0,1)/integrate('(x^2-x+1/6)^2','x',0,1);
disp(K3_2 ,'K(3,2) = ');
ph3 = x^3 + K3_0*ph0 + K3_1*ph1 + K3_2*ph2;
disp(ph3 , 'phi3(x) = ');
|
9d1adca337720ef809193f65d5d638d562ba39dd | 449d555969bfd7befe906877abab098c6e63a0e8 | /1163/CH11/EX11.3/example_11_3.sce | f3ed55816b51979d1d0f29fd44099499024d8508 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 543 | sce | example_11_3.sce | clear;
clc;
disp("--------------Example 11.3---------------")
// example explaination
printf("This an example of Stop-and-Wait ARQ. The series of events taking place are as follows : \n\n* Frame 0 is sent and acknowledged.\n* Frame 1 is lost and resent after the time-out.\n* The resent frame 1 is acknowledged and the timer stops.\n* Frame 0 is sent and acknowledged, but the acknowledgment is lost.\n* The sender has no idea if the frame or the acknowledgment is lost, so after the time-out, it resends frame 0, which is acknowledged.") |
514e6cc39b31eb77f6c6d0831223c6d0a96c22f7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /284/CH14/EX14.2/ex2.sce | 70d8a0d7756d08904d9dbec79826fbe1c867221d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 654 | sce | ex2.sce | // Chapter 14_Semiconductor Power Devices
//Caption_Power MOSFET characteristics
//Ex_2//page-658
VDD=24
PT=30 //Maximum rated power
ID1max=5 //Maximum rated current
ID2max=4
RD1=VDD/ID1max //Drain resistance
RD2=VDD/ID2max
ID1=VDD/(2*RD1) //Current at the maximum power point
ID2=VDD/(2*RD2)
VDS1=VDD-ID1*RD1 //Drain to source voltage
VDS2=VDD-ID2*RD2
P1=VDS1*ID1 //Maximum power that may be dissipated in transistor
P2=VDS2*ID2
printf('The maximum dissipated power in first case is %1.0f W which corresponds to the maximum rated power while in second case is %1.0f W which is less than the maximum rated power',P1,P2)
|
fc60ae3d7fb6cc2f81114b17c7da6ff9e300c5b5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1964/CH5/EX5.50/ex5_50.sce | 2ce26b5ccbe9fa5989c1118b14fd99fca70da2f1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 714 | sce | ex5_50.sce | //Chapter-5, Example 5.50, Page 211
//=============================================================================
clc
clear
//INPUT DATA
P1=2000;//power in watts
P2=1000;//power in watts
Vl=400;//line voltage in volts
//CALCULATIONS
P=P1+P2;//power in Watts
a=sqrt(3*(P1-P2)/(P1+P2));
b=atan(sqrt(a));
power_factor=cos(b);
kVA=P/power_factor;
mprintf("Thus power,power factor and kVA are %d W ,%1.3f and %1.2f respectively",P,power_factor,kVA);
//note:computed value for powerfactor and kVA in textbook are wrong.Please check the calculations
//=================================END OF PROGRAM======================================================================================================
|
7524d4443208bd7426c0610eb6e65ef23fec8dd1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1370/CH4/EX4.21/Exp4_21.sce | f83622276f78141bc49e75d393d15f1828791fad | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,181 | sce | Exp4_21.sce | //Example 4.21
clc
disp("1500 kVA, V_L = 12 kV, R_a = 2 ohm, X_s = 10 ohm")
vp=(12*10^3)/sqrt(3)
format(10)
disp(vp," V_ph(in V) = ...Star")
disp("P_L = sqrt(3)*V_L*I_L*cos(phi)")
disp("(a) cos(phi) = 0.8 lagging, sin(phi) = 0.6")
il=(1200*10^3)/(sqrt(3)*0.8*12*10^3)
format(7)
disp(il,"Therefore, I_L(in A) = I_aph = ...Star")
disp(" E_ph^2 = (V_ph*cos(phi)+I_a*R_a)^2 + (V_ph*sin(phi)+I_a*R_a)^2")
ephi=sqrt(((((6928.2032*0.8)+(72.168*2))^2)+(((6928.2032*0.6)+(72.168*10))^2)))
format(9)
disp(ephi,"Therefore, E_ph(in V) =")
r=((7492.768-6928.2032)/6928.2032)*100
format(6)
disp(r,"Therefore, %R(in percentage) = (E_ph-V_ph / V_ph)*100 = ")
disp("(b) cos(phi) = 0.707 leading, sin(phi) = 0.707")
il=(1200*10^3)/(sqrt(3)*0.707*12*10^3)
format(6)
disp(il,"Therefore, I_L(in A) = I_a = ...Star")
disp(" E_ph^2 = (V_ph*cos(phi)+I_a*R_a)^2 + (V_ph*sin(phi)+I_a*R_a)^2")
ephi=sqrt(((((6928.2032*0.707)+(81.66*2))^2)+(((6928.2032*0.707)-(81.66*10))^2)))
format(10)
disp(ephi,"Therefore, E_ph(in V) =")
r=((6502.2433-6928.2032)/6928.2032)*100
format(6)
disp(r,"Therefore, %R(in percentage) = (E_ph-V_ph / V_ph)*100 = ")
|
1f3c4a98fcdebcde7a6894c3768823a9a9ca926f | 527c41bcbfe7e4743e0e8897b058eaaf206558c7 | /Positive_Negative_test/Netezza-Base-CumulativeDistribuionFunctions/FLCDFUniform-Netezza-01.tst | 3e808150598932e60624db7c2296be4ba46b9e7f | [] | no_license | kamleshm/intern_fuzzy | c2dd079bf08bede6bca79af898036d7a538ab4e2 | aaef3c9dc9edf3759ef0b981597746d411d05d34 | refs/heads/master | 2021-01-23T06:25:46.162332 | 2017-07-12T07:12:25 | 2017-07-12T07:12:25 | 93,021,923 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,332 | tst | FLCDFUniform-Netezza-01.tst |
-- Fuzzy Logix, LLC: Functional Testing Script for DB Lytix functions on Ntezza
--
-- Copyright (c): 2014 Fuzzy Logix, LLC
--
-- NOTICE: All information contained herein is, and remains the property of Fuzzy Logix, LLC.
-- The intellectual and technical concepts contained herein are proprietary to Fuzzy Logix, LLC.
-- and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
-- secret or copyright law. Dissemination of this information or reproduction of this material is
-- strictly forbidden unless prior written permission is obtained from Fuzzy Logix, LLC.
--
--
-- Functional Test Specifications:
--
-- Test Category: Cumulative Distribution Function
--
-- Test Unit Number: FLCDFUniform-Netezza-01
--
-- Name(s): FLCDFUniform
--
-- Description: Scalar function which returns the Uniform cumulative distribution
--
-- Applications:
--
-- Signature: FLCDFUniform(param A, param B, y)
--
-- Parameters: See Documentation
--
-- Return value: Double Precision
--
-- Last Updated: 11-12-2014
--
-- Author: Surya Deepak Garimella
--
-- BEGIN: TEST SCRIPT
--.run file=../PulsarLogOn.sql
-- BEGIN: POSITIVE TEST(s)
-- Test with normal and extreme scale factor values
-- Test case 1a:
SELECT 0.45 AS CValue,
FLCDFUniform( 0.0, 1.0, 0.45) AS FLCDFUniform;
-- Test case 1b:
SELECT 0.45 AS CValue,
FLCDFUniform( 0.0, 1.0,1e-300) AS FLCDFUniform;
-- Test case 1c:
SELECT 0.45 AS CValue,
FLCDFUniform( 0.0, 1.0, 1e-310) AS FLCDFUniform;
-- Netezza system limitation below 1e-307 as 0
-- Test case 1d:
SELECT 0.45 AS CValue,
FLCDFUniform( 0.0, 1.0, 1e300) AS FLCDFUniform;
-- Test case 1e:
SELECT 0.45 AS CValue,
FLCDFUniform( 0.0, 1.0, 1e310) AS FLCDFUniform;
-- Expected failure due to Netezza system limitation above 1e308
-- Test case 1f:
SELECT 0.45 AS CValue,
FLCDFUniform( 1e-300, 1.0, 0.45) AS FLCDFUniform;
-- Test case 1g:
SELECT 0.45 AS CValue,
FLCDFUniform( 1e-310, 1.0, 0.45) AS FLCDFUniform;
-- Netezza system limitation below 1e-307 as 0
-- Test case 1h:
SELECT 0.45 AS CValue,
FLCDFUniform( 0.0, 1e300, 0.45) AS FLCDFUniform;
-- Test case 1i:
SELECT 0.45 AS CValue,
FLCDFUniform( 0.0, 1e310, 0.45) AS FLCDFUniform;
-- Expected failure due to Netezza system limitation above 1e308
-- END: POSITIVE TEST(s)
-- BEGIN: NEGATIVE TEST(s)
-- Category 1: Out of boundary condition test cases
-- Case 1a: LowBD > UppBD
SELECT 0.45 AS CValue,
FLCDFUniform( 1.0, 0.0, 0.45) AS FLCDFUniform;
-- Category 2: Undefined results or error conditions due to equality
-- Case 2a: LowBD == UppBD
SELECT 0.45 AS CValue,
FLCDFUniform( 0.50, 0.50, 0.45) AS FLCDFUniform;
-- Case 2b:
-- Not applicable
-- Category 3: Data type mismatch conditions -
-- Test with most likely mismatched data type for the function which is
-- usually data types within the parameter list
--
-- Not applicable - all parameters are double precision
-- Category 4: Test function with non-matching # of parameters
-- Case 4a: Fewer than expected # of parameters
SELECT 0.45 AS CValue,
FLCDFUniform( 0.50,0.45) AS FLCDFUniform;
-- Case 4b: More than expected # of parameters
SELECT 0.45 AS CValue,
FLCDFUniform( 0.50, 0.6, 0.7, 0.45) AS FLCDFUniform;
-- END: NEGATIVE TEST(s)
-- END: TEST SCRIPT
|
8d94f26c72b16d3c122df8935552a53d91a4c3ac | 449d555969bfd7befe906877abab098c6e63a0e8 | /2175/CH3/EX3.4/3_4.sce | 79674eccc8e2b7a1ea0d219468ea5332eef765a4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 170 | sce | 3_4.sce | clc;
h1=3017;//kJ/kg
v1=0.02453;//m^3/kg
p1=100;//bar
u1=h1-p1*v1*10^5/1000;
ug=2602;//kJ/kg
u2=ug;
W=u2-u1;
disp("work done by system is :");
disp("kJ/kg",-W)
|
f1fe17368c9c1f03c7293bd4e5b4af5764be74d0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2870/CH11/EX11.1/Ex11_1.sce | 3d43e271ad21e2a171048e16c80eb012381504c5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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 | Ex11_1.sce | clc;clear;
//Example 11.1
//given values
P1=0.14;
P2=0.8;
m=0.05;
//from refrigerant-134a tables
h1=239.16;
s1=0.94456;
h2=275.39;
h3=95.47;
//calculation
s2=s1;//isentropic process
h4=h3;//throttling
QL=(h1-h4)*m;
Wm=m*(h2-h1);
Qh=m*(h2-h3);
Qh=ceil(Qh);
COPR=QL/Wm;
disp(QL,'the rate of heat removal from the refrigerated space in kW');
disp(Wm,'the power input to the compressor in kW');
disp(Qh,'the rate of heat rejection to the environment in kW');
disp(COPR,'the COP of the refrigerator');
|
77e6410ad084ba245388b3936cb3765c540344f2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3637/CH2/EX2.22/Ex2_22.sce | 278728cc4425aa9cc2a0dc3f112a7b339c60ce98 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 493 | sce | Ex2_22.sce | //problem 22 pagenumber 2.105
//given
rc1=1;format(3);clf();
vi=5;//volt
c=1e-6;//farad
r=1e6;//ohm
x0=0;x1=1:1:5;
//determine output voltage
v0=integrate('5','t',x0,x1);
disp('Output voltage = -'+string(v0(5))+" V");
subplot(1,2,1);
x=linspace(1,5,5);
y=5* ones(length(x),1);
plot(x,y);
xtitle('input waveform problem Ex2_22','time in sec','Vi in volts');
subplot(1,2,2);
x=linspace(1,5,5);
y=linspace(0,-25,5);
plot(x,y);
xtitle('output waveform problem Ex2_22','time in sec','V0 in volts'); |
74109a810d24582d81f9f90723d5181998408578 | a178109facfc72b26e4addfe1fa3952c764630dd | /2 Control_Design_Scilab_bette_than_1/main - 2nd_try_wrong.sce | 049ea8d2f8ab8af73ee624074381719c46f8f0ff | [
"BSD-2-Clause"
] | permissive | yi1128/Disturbance_observer | fb20d7db81193841e35b61e7c727e5fe91240dca | 6b5e79d25f0ab7a410adf30c2d1399864055cd56 | refs/heads/master | 2022-04-21T23:58:22.911921 | 2020-04-20T12:17:02 | 2020-04-20T12:17:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,746 | sce | main - 2nd_try_wrong.sce | clear
clc
loadmatfile('A.mat');
loadmatfile('B.mat');
loadmatfile('H.mat');
loadmatfile('C.mat');
m=rank(B);
n=size(A);
n=n(1,1);
qw=rank(H);
p=rank(C);
[Q,Sigmaw,R]=svd(H);
Sigma1=Sigmaw(1:qw,:);
Q1=Q(:,1:qw);
Q2=Q(:,qw+1:$);
Ab=Q'*A*Q;
Bb=Q'*B;
Ab11=Ab(1:qw,1:qw);
Ab12=Ab(1:qw,qw+1:$);
Ab21=Ab(qw+1:$,1:qw);
Ab22=Ab(qw+1:$,qw+1:$);
Bb1=Bb(1:qw,:);
Bb2=Bb(qw+1:$,:);
Cb=C*Q;
Cb1=Cb(:,1:qw);
Cb2=Cb(:,qw+1:$);
Cb1p=(Cb1'*Cb1)^-1*Cb1';
dum1=size(Cb1p);
dum2=dum1(1,2);
dum3=dum1(1,1);
dum4=dum2-dum3;
//if dum4 ~= 0
// M=rand(dum4,dum2);
// while rank([Cb1p;M]) ~= dum2;
M=rand(dum4,dum2);
// end
// N=[Cb1p;M];
//else
// N=[Cb1p];
// M=eye(p,p);
//end
//loadmatfile('M.mat');
N=[Cb1p;M];
At2=Ab22-Ab21*Cb1p*Cb2;
Bt2=Bb2;
Gt2=Ab21*Cb1p;
Ct=M*(eye(p,p)-Cb1*Cb1p)*Cb2;
Ht=M*(eye(p,p)-Cb1*Cb1p);
dum5=size(Cb1p*Cb2);
dum6=dum5(1,2);
Qbx=Q*[Cb1p*Cb2;eye(dum6,dum6)];
dum7=size(Cb1p);
dum8=dum7(1,2);
dum9=size(Q);
dum10=dum9(1,2);
dum11=dum10-dum7(1,1);
Qby=Q*[-Cb1p;zeros(dum11,dum8)];
dum15=size(M);
function [LME,LMI,OBJ]=UIO(XLIST)
[N,J,L]= XLIST(:)
LME=[]
LMI=list(-([N'-Ct'*L'+N-L*Ct,At2+Gt2*C*Q2-L*Ht*C*Q2+L*Ct-N,Gt2*C*Q1-L*Ht*C*Q1,Bb2-J;At2'+Q2'*C'*Gt2'-Q2'*C'*Ht'*L'+Ct'*L'-N',zeros(n-qw,n-qw+qw+m);Q1'*C'*Gt2'-Q1'*C'*Ht'*L',zeros(qw,n-qw),zeros(qw,qw),zeros(qw,m);Bb2'-J',zeros(m,n-qw+qw+m)]))
OBJ=[]
endfunction
N_0=-eye(n-qw,n-qw);
J_0=zeros(n-qw,m);
L_0=zeros(n-qw,p-qw);
Init_guess=list(N_0,J_0,L_0);
Mbound=1e2;
abstol=1e-6;
nu=1;
maxiters=500;
reltol=1e-6;
//Ans_LMI=lmisolver(Init_guess,UIO,[Mbound,abstol,nu,maxiters,reltol]);
Ans_LMI=lmisolver(Init_guess,UIO);
N=Ans_LMI(1);
J=Ans_LMI(2);
L=Ans_LMI(3);
|
02680058c6675e34b3b5d8e16303992d228d9484 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3556/CH12/EX12.2/Ex12_2.sce | bc3e2e1a57e4632c87e90ceee24fb3c99f0f7e2f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,741 | sce | Ex12_2.sce | clc
// Fundamental of Electric Circuit
// Charles K. Alexander and Matthew N.O Sadiku
// Mc Graw Hill of New York
// 5th Edition
// Part 2 : AC Circuits
// Chapter 12 : Three Phase Circuit
// Example 12 - 2
clear; clc; close;
//
// Given data
V_mag = 110.0000;
V_angle = 0.0000;
Zy1 = complex(5,-2);
Zy2 = complex(10,8);
//
// Calculations Current Line A (Ia)
Zy = Zy1 + Zy2;
Zy_real = real(Zy);
Zy_imag = imag(Zy);
Zy_mag = norm(Zy);
Zy_angle = atand(Zy_imag,Zy_real);
I_a_mag = V_mag/Zy_mag;
I_a_angle = V_angle - Zy_angle;
// Calculations Current Line B (Ib)
I_b_mag = I_a_mag;
I_b_angle = -120.0000 + I_a_angle;
// Calculations Current Line C (Ic)
I_c_mag = I_a_mag;
I_c_angle = -240.0000 + I_a_angle;
//
disp("Example 12-3 Solution : ");
printf(" \n Ia_mag = Magnitude of Line Current a = %.3f A",I_a_mag)
printf(" \n Ia_angle = Angle of Line Current a = %.3f Degree",I_a_angle)
printf(" \n Ib_mag = Magnitude of Line Current b = %.3f A",I_b_mag)
printf(" \n Ib_angle = Angle of Line Current b = %.3f Degree",I_b_angle)
printf(" \n Ic_mag = Magnitude of Line Current c = %.3f A",I_c_mag)
printf(" \n Ic_angle = Angle of Line Current c = %.3f Degree",I_c_angle)
|
faafb87cd960319b30ff60795434b020e2c92f1f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2138/CH11/EX11.6.b/ex_11_6_b.sce | e948ef27bdfe24e9fafa2fef37b78dd4bd4c7261 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 303 | sce | ex_11_6_b.sce | //Example 11.6.b // current if frequency is halved
clc;
clear;
close;
//given data :
f=50; // frequency in Hz
C=28*10^-6;// capacitor in Farad
V=250; // voltage in volts
pi=22/7;
f2=100;// when frequency is doubled
XC=1/(2*pi*f2*C);
I=V/XC;
disp(I,"current flowing when frequency is doubled ,I(A) = ")
|
4937fc76059c0655bef31ad8af8aad968b48ca22 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3733/CH32/EX32.23/Ex32_23.sce | 336056f696a02c983f6c5e81398c3add111c5b5b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 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,267 | sce | Ex32_23.sce | // Example 32_23
clc;funcprot(0);
//Given data
CL=5;// kW
n=1000;// No. of apartments
No=[2 2 2 1 4 2 1 2 2 2 2 1];
Cl=[20 10 60 5 8 10 2 5 120 4 7 5];// Connected load of each in kW
F_d=[0.68 0.56 0.54 0.68 0.75 0.82 0.71 0.55 0.60 0.72 0.65 0.88];// Demand factors
F_da=40/100;// Demand factor of the apartments
F_dir=3.2;// Group diversity factor of the residential system
F_dirp=1.5;// Peak diversity factor of the residential system
F_dic=1.6;// Group diversity factor of the commercial system
F_dicp=1.2;// Peak diversity factor of the commercial system
E_l=5/100;// Losses of delievered energy
// Calculation
D=n*CL*F_da;// Demand of power from 1000 apartments in kW
MD_r=D/F_dir;// Maximum demand of 1000 apartments in kW
D_p1=MD_r/F_dirp;// Demand at the time of system peak in kW
for (i=1:12)
Tl(i)=Cl(i)*No(i);
MD_c(i)=Tl(i)*F_d(i);
end
MD=MD_c(1)+MD_c(2)+MD_c(3)+MD_c(4)+MD_c(5)+MD_c(6)+MD_c(7)+MD_c(8)+MD_c(9)+MD_c(10)+MD_c(11)+MD_c(12);
MD_c=(MD)/F_dic;// Maximum demand of 1000 commercial group in kW
D_p2=MD_c/F_dicp;// Demand at the time of system peak in kW
TMD=(D_p1+D_p2)*(1+E_l);// Total maximum demand in kW
printf('\nThe increase in peak demand=%0.2f kW',TMD);
// The answer vary due to round off error
|
f5a816a470be2297bb7deacfaa36e9181c1531e9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /172/CH7/EX7.2/ex2.sce | d12cedf2348a642d12abea5e853f6614cba8c525 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 422 | sce | ex2.sce | //example 2
//coefficient of performance of refrigerator
clear
clc
Qh=400 //heat rejected to kitchen air in W
W=150 //electrical input power in W
Ql=Qh-W //rate of energy taken out to cold space in W
B=Ql/W //coefficicent of performnace of refrigerator
printf("\n hence,rate of energy taken out of the cold space is Ql=%.3f W.\n",Ql)
printf("\n and coefficient of performance of the refrigerator is B=%.3f .\n",B) |
79a9fbb1aa84c9240506a8543b01e55ec1832e2e | f542bc49c4d04b47d19c88e7c89d5db60922e34e | /PresentationFiles_Subjects/CONT/TX40CDR/ATWM1_Localizer_MRI_TX40CDR/ATWM1_Localizer_MRI.sce | 89a88ad8ba183eaba8b53bc61c2dcd44f62f727d | [] | 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 | 40,042 | sce | ATWM1_Localizer_MRI.sce | # ATWM1_MRI_Localizer
scenario = "ATWM1_Localizer_MRI";
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 = 1;
response_matching = simple_matching;
button_codes = 10;
default_font_size = 28;
default_font = "Arial";
default_background_color = 0 ,0 ,0 ;
#write_codes=true;
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;
bitmap {filename = "fixation_cross_black.bmp";} fixation_cross_black;
bitmap {filename = "blank.bmp";} blank;
bitmap {filename = "localizer.bmp";} localizer;
bitmap {filename = "localizer_inv.bmp";} localizer_inv;
bitmap {filename = "localizer_target.bmp";} localizer_target;
sound { wavefile { filename = "FeedbackSound_NoResponse.wav"; }; } sound_no_response;
sound { wavefile { filename = "FeedbackSound_Correct.wav"; }; } sound_correct;
sound { wavefile { filename = "FeedbackSound_Incorrect.wav"; }; } sound_incorrect;
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 = 10000;
mri_pulse = 1;
code = "BaselinePre";
};
TEMPLATE "ATWM1_Localizer_MRI.tem" {
trigger_volume intertrial_interval single_stimulus_presentation_time trl_duration stim_enc1 stim_enc2 stim_enc3 stim_enc4 stim_enc_alt1 stim_enc_alt2 stim_enc_alt3 stim_enc_alt4 stim_enc_target1 stim_enc_target2 stim_enc_target3 stim_enc_target4 control_flicker_index trial_code retr_code posX1 posY1 posX2 posY2 posX3 posY3 posX4 posY4;
6 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "01_4_Objects_Pos1_DefaultTrial" "Localizer_01_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
7 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "02_4_Objects_Pos4_DefaultTrial" "Localizer_02_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
8 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "03_4_Objects_Pos2_DefaultTrial" "Localizer_03_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
9 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 8 "04_4_Objects_Pos3_TargetTrial" "Localizer_04_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
10 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "05_4_Objects_Pos1_DefaultTrial" "Localizer_05_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
11 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "06_4_Objects_Pos4_DefaultTrial" "Localizer_06_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
12 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 6 "07_4_Objects_Pos3_TargetTrial" "Localizer_07_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
13 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "08_4_Objects_Pos2_DefaultTrial" "Localizer_08_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
14 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "09_4_Objects_Pos1_DefaultTrial" "Localizer_09_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
15 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "10_4_Objects_Pos2_DefaultTrial" "Localizer_10_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
16 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 6 "11_4_Objects_Pos4_TargetTrial" "Localizer_11_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
17 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "12_4_Objects_Pos3_DefaultTrial" "Localizer_12_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
18 1950 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "13_4_Objects_Pos2_DefaultTrial" "Localizer_13_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
20 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "14_4_Objects_Pos1_DefaultTrial" "Localizer_14_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
21 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 10 "15_4_Objects_Pos3_TargetTrial" "Localizer_15_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
22 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "16_4_Objects_Pos4_DefaultTrial" "Localizer_16_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
23 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "17_4_Objects_Pos2_DefaultTrial" "Localizer_17_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
24 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "18_4_Objects_Pos3_DefaultTrial" "Localizer_18_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
25 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "19_4_Objects_Pos4_DefaultTrial" "Localizer_19_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
26 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 10 "20_4_Objects_Pos1_TargetTrial" "Localizer_20_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
27 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "21_4_Objects_Pos4_DefaultTrial" "Localizer_21_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
28 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "22_4_Objects_Pos2_DefaultTrial" "Localizer_22_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
29 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "23_4_Objects_Pos3_DefaultTrial" "Localizer_23_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
30 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 8 "24_4_Objects_Pos1_TargetTrial" "Localizer_24_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
31 1950 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "25_4_Objects_Pos3_DefaultTrial" "Localizer_25_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
33 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 8 "26_4_Objects_Pos1_TargetTrial" "Localizer_26_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
34 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "27_4_Objects_Pos4_DefaultTrial" "Localizer_27_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
35 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "28_4_Objects_Pos2_DefaultTrial" "Localizer_28_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
36 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 6 "29_4_Objects_Pos1_TargetTrial" "Localizer_29_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
37 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "30_4_Objects_Pos3_DefaultTrial" "Localizer_30_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
38 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "31_4_Objects_Pos2_DefaultTrial" "Localizer_31_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
39 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "32_4_Objects_Pos4_DefaultTrial" "Localizer_32_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
40 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 10 "33_4_Objects_Pos1_TargetTrial" "Localizer_33_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
41 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "34_4_Objects_Pos3_DefaultTrial" "Localizer_34_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
42 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "35_4_Objects_Pos2_DefaultTrial" "Localizer_35_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
43 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "36_4_Objects_Pos4_DefaultTrial" "Localizer_36_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
44 1950 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "37_4_Objects_Pos1_DefaultTrial" "Localizer_37_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
46 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "38_4_Objects_Pos3_DefaultTrial" "Localizer_38_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
47 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "39_4_Objects_Pos2_DefaultTrial" "Localizer_39_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
48 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 8 "40_4_Objects_Pos4_TargetTrial" "Localizer_40_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
49 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "41_4_Objects_Pos2_DefaultTrial" "Localizer_41_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
50 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "42_4_Objects_Pos3_DefaultTrial" "Localizer_42_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
51 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 6 "43_4_Objects_Pos4_TargetTrial" "Localizer_43_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
52 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "44_4_Objects_Pos1_DefaultTrial" "Localizer_44_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
53 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "45_4_Objects_Pos3_DefaultTrial" "Localizer_45_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
54 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "46_4_Objects_Pos2_DefaultTrial" "Localizer_46_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
55 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "47_4_Objects_Pos1_DefaultTrial" "Localizer_47_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
56 1950 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 10 "48_4_Objects_Pos4_TargetTrial" "Localizer_48_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
58 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "49_4_Objects_Pos3_DefaultTrial" "Localizer_49_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
59 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "50_4_Objects_Pos2_DefaultTrial" "Localizer_50_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
60 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "51_4_Objects_Pos1_DefaultTrial" "Localizer_51_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
61 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 10 "52_4_Objects_Pos4_TargetTrial" "Localizer_52_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
62 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "53_4_Objects_Pos2_DefaultTrial" "Localizer_53_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
63 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "54_4_Objects_Pos1_DefaultTrial" "Localizer_54_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
64 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "55_4_Objects_Pos4_DefaultTrial" "Localizer_55_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
65 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 12 "56_4_Objects_Pos3_TargetTrial" "Localizer_56_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
66 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "57_4_Objects_Pos1_DefaultTrial" "Localizer_57_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
67 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "58_4_Objects_Pos2_DefaultTrial" "Localizer_58_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
68 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 4 "59_4_Objects_Pos4_TargetTrial" "Localizer_59_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
69 1950 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "60_4_Objects_Pos3_DefaultTrial" "Localizer_60_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
71 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "61_4_Objects_Pos1_DefaultTrial" "Localizer_61_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
72 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "62_4_Objects_Pos4_DefaultTrial" "Localizer_62_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
73 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "63_4_Objects_Pos2_DefaultTrial" "Localizer_63_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
74 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 10 "64_4_Objects_Pos3_TargetTrial" "Localizer_64_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
75 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "65_4_Objects_Pos2_DefaultTrial" "Localizer_65_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
76 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "66_4_Objects_Pos4_DefaultTrial" "Localizer_66_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
77 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 6 "67_4_Objects_Pos3_TargetTrial" "Localizer_67_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
78 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "68_4_Objects_Pos1_DefaultTrial" "Localizer_68_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
79 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "69_4_Objects_Pos3_DefaultTrial" "Localizer_69_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
80 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "70_4_Objects_Pos2_DefaultTrial" "Localizer_70_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
81 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "71_4_Objects_Pos1_DefaultTrial" "Localizer_71_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
82 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 4 "72_4_Objects_Pos4_TargetTrial" "Localizer_72_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
83 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "73_4_Objects_Pos1_DefaultTrial" "Localizer_73_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
84 1950 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 10 "74_4_Objects_Pos4_TargetTrial" "Localizer_74_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
86 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "75_4_Objects_Pos2_DefaultTrial" "Localizer_75_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
87 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "76_4_Objects_Pos3_DefaultTrial" "Localizer_76_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
88 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "77_4_Objects_Pos2_DefaultTrial" "Localizer_77_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
89 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 8 "78_4_Objects_Pos3_TargetTrial" "Localizer_78_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
90 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "79_4_Objects_Pos1_DefaultTrial" "Localizer_79_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
91 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "80_4_Objects_Pos4_DefaultTrial" "Localizer_80_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
92 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 8 "81_4_Objects_Pos1_TargetTrial" "Localizer_81_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
93 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "82_4_Objects_Pos2_DefaultTrial" "Localizer_82_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
94 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "83_4_Objects_Pos3_DefaultTrial" "Localizer_83_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
95 1950 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "84_4_Objects_Pos4_DefaultTrial" "Localizer_84_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
97 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "85_4_Objects_Pos3_DefaultTrial" "Localizer_85_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
98 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "86_4_Objects_Pos4_DefaultTrial" "Localizer_86_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
99 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "87_4_Objects_Pos1_DefaultTrial" "Localizer_87_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
100 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 12 "88_4_Objects_Pos2_TargetTrial" "Localizer_88_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
101 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "89_4_Objects_Pos4_DefaultTrial" "Localizer_89_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
102 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "90_4_Objects_Pos2_DefaultTrial" "Localizer_90_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
103 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 8 "91_4_Objects_Pos3_TargetTrial" "Localizer_91_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
104 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "92_4_Objects_Pos1_DefaultTrial" "Localizer_92_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
105 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "93_4_Objects_Pos3_DefaultTrial" "Localizer_93_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
106 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "94_4_Objects_Pos4_DefaultTrial" "Localizer_94_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
107 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 12 "95_4_Objects_Pos1_TargetTrial" "Localizer_95_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
108 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "96_4_Objects_Pos2_DefaultTrial" "Localizer_96_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
109 1950 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "97_4_Objects_Pos3_DefaultTrial" "Localizer_97_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
111 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "98_4_Objects_Pos1_DefaultTrial" "Localizer_98_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
112 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "99_4_Objects_Pos4_DefaultTrial" "Localizer_99_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
113 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 10 "100_4_Objects_Pos2_TargetTrial" "Localizer_100_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
114 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "101_4_Objects_Pos3_DefaultTrial" "Localizer_101_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
115 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "102_4_Objects_Pos2_DefaultTrial" "Localizer_102_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
116 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 12 "103_4_Objects_Pos4_TargetTrial" "Localizer_103_4_Objects_Pos4_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
117 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "104_4_Objects_Pos1_DefaultTrial" "Localizer_104_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
118 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "105_4_Objects_Pos3_DefaultTrial" "Localizer_105_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
119 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "106_4_Objects_Pos1_DefaultTrial" "Localizer_106_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
120 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "107_4_Objects_Pos4_DefaultTrial" "Localizer_107_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
121 1950 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 8 "108_4_Objects_Pos2_TargetTrial" "Localizer_108_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
123 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "109_4_Objects_Pos1_DefaultTrial" "Localizer_109_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
124 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "110_4_Objects_Pos4_DefaultTrial" "Localizer_110_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
125 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "111_4_Objects_Pos3_DefaultTrial" "Localizer_111_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
126 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 6 "112_4_Objects_Pos2_TargetTrial" "Localizer_112_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
127 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "113_4_Objects_Pos3_DefaultTrial" "Localizer_113_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
128 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "114_4_Objects_Pos1_DefaultTrial" "Localizer_114_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
129 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "115_4_Objects_Pos4_DefaultTrial" "Localizer_115_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
130 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 4 "116_4_Objects_Pos2_TargetTrial" "Localizer_116_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
131 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "117_4_Objects_Pos4_DefaultTrial" "Localizer_117_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
132 1950 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "118_4_Objects_Pos3_DefaultTrial" "Localizer_118_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
134 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 4 "119_4_Objects_Pos2_TargetTrial" "Localizer_119_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
135 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "120_4_Objects_Pos1_DefaultTrial" "Localizer_120_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
136 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "121_4_Objects_Pos2_DefaultTrial" "Localizer_121_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
137 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 6 "122_4_Objects_Pos3_TargetTrial" "Localizer_122_4_Objects_Pos3_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
138 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "123_4_Objects_Pos4_DefaultTrial" "Localizer_123_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
139 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "124_4_Objects_Pos1_DefaultTrial" "Localizer_124_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
140 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 4 "125_4_Objects_Pos2_TargetTrial" "Localizer_125_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
141 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "126_4_Objects_Pos1_DefaultTrial" "Localizer_126_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
142 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "127_4_Objects_Pos3_DefaultTrial" "Localizer_127_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
143 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "128_4_Objects_Pos4_DefaultTrial" "Localizer_128_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
144 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 4 "129_4_Objects_Pos2_TargetTrial" "Localizer_129_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
145 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "130_4_Objects_Pos4_DefaultTrial" "Localizer_130_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
146 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "131_4_Objects_Pos1_DefaultTrial" "Localizer_131_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
147 1950 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "132_4_Objects_Pos3_DefaultTrial" "Localizer_132_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
149 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "133_4_Objects_Pos4_DefaultTrial" "Localizer_133_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
150 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "134_4_Objects_Pos3_DefaultTrial" "Localizer_134_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
151 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 6 "135_4_Objects_Pos2_TargetTrial" "Localizer_135_4_Objects_Pos2_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
152 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 0 "136_4_Objects_Pos1_DefaultTrial" "Localizer_136_4_Objects_Pos1_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
153 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "137_4_Objects_Pos4_DefaultTrial" "Localizer_137_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
154 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "138_4_Objects_Pos2_DefaultTrial" "Localizer_138_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
155 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "139_4_Objects_Pos3_DefaultTrial" "Localizer_139_4_Objects_Pos3_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
156 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 12 "140_4_Objects_Pos1_TargetTrial" "Localizer_140_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
157 0 131 1950 blank blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target 0 "141_4_Objects_Pos4_DefaultTrial" "Localizer_141_4_Objects_Pos4_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
158 0 131 1950 blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank 0 "142_4_Objects_Pos2_DefaultTrial" "Localizer_142_4_Objects_Pos2_DefaultTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
159 0 131 1950 localizer blank blank blank localizer_inv blank blank blank localizer_target blank blank blank 6 "143_4_Objects_Pos1_TargetTrial" "Localizer_143_4_Objects_Pos1_TargetTrial" 45.96 45.96 -45.96 45.96 -45.96 -45.96 45.96 -45.96;
160 0 131 1950 blank blank localizer blank blank blank localizer_inv blank blank blank localizer_target blank 0 "144_4_Objects_Pos3_DefaultTrial" "Localizer_144_4_Objects_Pos3_DefaultTrial" 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 = 20000;
code = "BaselinePost";
}; |
2149bee2163597602ac1426f24bcab3e5fe9e0ff | 777ac7fa75f240739af167655f7fab95cba80ef6 | /docs/Basics.New/MHeight.tst | be38922e3ddfb0c42b66c0a8b6b016be78de4a4b | [] | no_license | Karabur/TML-project | 8d498d8133f4b1ea8e8c3fe6f6f47f7ab5de4b5c | 0bfe006b0e66628427b769bc1be903875e77d5b7 | refs/heads/master | 2021-01-02T09:20:39.055827 | 2013-12-28T22:02:15 | 2013-12-28T22:02:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,275 | tst | MHeight.tst | Title:
TestName: проверка команд MainHeight, MainWidth;
Questions: 3;
Random: OFF;
EndTitle.
StartTest:
MainHeight: 600;
MainWidth: 800;
Question: 1;
Weight: 1;
BeginText:
Перед выполнением этого вопроса окно приняло размеры 600 на 800
После выполнения этого вопроса окно формы должно принять размеры 768 на 1024 пикселов
EndText;
Choice:
1: попробуй выбрать неправильный ответ ! endcase;
Right: 1;
Ask;
MainHeight: 768;
MainWidth: 1024;
Question: 2;
Weight: 1;
BeginText:
После выполнения этого вопроса окно формы должно принять размеры 400 на 550
EndText;
Choice:
1: попробуй выбрать неправильный ответ ! endcase;
Right: 1;
Ask;
MainHeight: 400;
MainWidth: 550;
Question: 3;
Weight: 1;
BeginText:
После выполнения этого вопроса окно формы должно принять размеры окна не изменятся
EndText;
Choice:
1: попробуй выбрать неправильный ответ ! endcase;
Right: 1;
Ask;
EndTest. |
b55a9545bba0d7f4da1a7adc429573beefb7b21c | 449d555969bfd7befe906877abab098c6e63a0e8 | /758/CH6/EX6.18/Ex_6_18.sce | 454552e0788f5414a52c721f1f02a6c1fa14bd18 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 96 | sce | Ex_6_18.sce | //Example 6.18
clc;clear;
x=[0 1 2 3];
X=clean(fft(x));
disp(x,'x(n)=');
disp(X,'X(k)='); |
d41ea748eb50d6f546c7ef98301650b1a29eeb13 | c3f30c57c194640b9ce943b27456d4d7bd7a6706 | /exp5/exp5.sce | 02eb645d744498a68a59c2570447d4001c20e3ac | [] | no_license | dikshitakambri/Image-Processing-Using-Scilab | af7d2f738c271edb0f12c9825b7a044233668f67 | 9cb0a7f2b0ac402c54bd297f28d578a2905c3da8 | refs/heads/master | 2023-04-18T00:11:42.093266 | 2021-04-27T08:23:52 | 2021-04-27T08:23:52 | 362,016,834 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,451 | sce | exp5.sce | // Erosion and dilation
//118A2044 Dikshita Kambri
clc;
clear all;
im = imread("C:\Users\hp\Documents\Image Processing-Scilab\Images\blobs.png");
b=[1 1 1;1 1 1;1 1 1];
[r c]=size(im)
e=zeros(r,c)
d=zeros(r,c)
o=zeros(r,c)
cl=zeros(r,c)
a=find(b==1)
count=length(a);
boundary=zeros(r,c);
for i=2:r-1
for j=2:c-1
t=im(i-1:i+1,j-1:j+1)
x=sum(t.*b)
if x==count
e(i,j)=1
d(i,j)=1
elseif x>=1
e(i,j)=0
d(i,j)=1
else
e(i,j)=0
d(i,j)=0
end
end
end
figure(1)
subplot(1,2,1)
title('original')
imshow(uint8(255*im));
subplot(1,2,2)
title('erosion')
imshow(uint8(255*e));
figure(2)
subplot(1,2,1)
title('original')
imshow(uint8(255*im));
subplot(1,2,2)
title('dilation')
imshow(uint8(255*d));
figure(3)
subplot(1,2,1)
title('original')
imshow(uint8(255*im));
subplot(1,2,2)
title('Boundary Extracted')
imshow(uint8(255*boundary));
//opening
for i=2:r-1
for j=2:c-1
t=e(i-1:i+1,j-1:j+1)
x=sum(t.*b)
if x>=1
o(i,j)=1
else
o(i,j)=0
end
end
end
//closing
for i=2:r-1
for j=2:c-1
t=d(i-1:i+1,j-1:j+1)
x=sum(t.*b)
if x==count
cl(i,j)=1
else
cl(i,j)=0
end
end
end
figure(4)
subplot(1,2,1)
title('opening')
imshow(uint8(255*o));
subplot(1,2,2)
title('closing')
imshow(uint8(255*cl));
|
8379ee7a0edb38ab429088abfb0decffb0fb04f5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1985/CH5/EX5.6/chapter5_Example6.sce | 6a48dff86ab0ea196d4ccb94e93b801224224f55 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 446 | sce | chapter5_Example6.sce | clc
clear
//Input data
l=632.8*10^-9//Wavelength of the laser beam in m
P=2.3*10^-3//Power output in W
c=(3*10^8)//Velocity of light in m/s
h=6.625*10^-34//Plancks constant in J.s
//Calculations
f=(c/l)//Frequency of the photon emitted by the laser beam in Hz
E=h*f//Energy of a photon in J
n=((P*60)/E)/10^17//The number of photons emitted *10^17
//Output
printf('The number of photons emitted is %3.4f*10^17 photons/minute',n)
|
8c5eafb014163ef7809b0ad98949d745b0b46d62 | 449d555969bfd7befe906877abab098c6e63a0e8 | /191/CH2/EX2.3/Example2_3.sce | 8a05465fe5290f4990eda7e52b50f4489107ec48 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 525 | sce | Example2_3.sce | //Applying LU factorization method for solving the system of equation
clear;
close();
clc;
format('v',5);
A = {4,-2,2;4,-3,-2;2,3,-1];
for l=1:3
L(l,l)=1;
end
for i=1:3
for j=1:3
s=0;
if j>=i
for k=1:i-1
s=s+L(i,k)*U(k,j);
end
//disp(s,'sum :');
U(i,j)=A(i,j)-s;
else
//s=0;
for k=1:j-1
s=s+L(i,k)*U(k,j);
end
L(i,j)=(A(i,j)-s)/U(j,j);
end
end
end
b=[6;-8;5];
c=L\b;
x=U\c;
disp(x,'Solution of equations :') |
0f3eda7f0d0c17b1acffe425a477629f93c912b4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2579/CH1/EX1.7/Ex1_7.sce | 410d1eaeeb72ac33242f993d0586d0f649bc5973 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 170 | sce | Ex1_7.sce | //Ex:1.7
clc;
clear;
close;
W=10*1000;// radiated power in W
Rr=75;// radiation resistance in ohm
I=sqrt(W/Rr);// current in amp
printf("The current = %f Amp", I); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.