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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b2cde6befc5a1f8eba0ecd806744fcbf1815cf3f
|
01ecab2f6eeeff384acae2c4861aa9ad1b3f6861
|
/xcos_blocks/ota_buf_c.sci
|
6cc256e38be7b39ae5e66d7506287443b9b8343d
|
[] |
no_license
|
jhasler/rasp30
|
9a7c2431d56c879a18b50c2d43e487d413ceccb0
|
3612de44eaa10babd7298d2e0a7cddf4a4b761f6
|
refs/heads/master
| 2023-05-25T08:21:31.003675
| 2023-05-11T16:19:59
| 2023-05-11T16:19:59
| 62,917,238
| 3
| 3
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 269
|
sci
|
ota_buf_c.sci
|
global Ut_sim Kappa_sim;
function block=ota_buf_c(block,flag)
if flag ==1
in_out_num = block.ipar(1);
row_vec_io = 1:in_out_num; // Row vector for input & output
block.outptr(1)(row_vec_io)=block.inptr(1)(row_vec_io);
end
endfunction
|
5106e37ebbe0222a0bd3889e79535e1bcec346ca
|
e0124ace5e8cdd9581e74c4e29f58b56f7f97611
|
/3913/CH12/EX12.6/Ex12_6.sce
|
86a47697ff897dafbaa8556511ea1a5dc4748e9e
|
[] |
no_license
|
psinalkar1988/Scilab-TBC-Uploads-1
|
159b750ddf97aad1119598b124c8ea6508966e40
|
ae4c2ff8cbc3acc5033a9904425bc362472e09a3
|
refs/heads/master
| 2021-09-25T22:44:08.781062
| 2018-10-26T06:57:45
| 2018-10-26T06:57:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 201
|
sce
|
Ex12_6.sce
|
//Chapter 12 : Solutions to the Exercises
//Scilab 6.0.1
//Windows 10
clear;
clc;
//Solution for 1.12
mat_prod=[3 1 -2;2 -2 0;-1 1 2;]*[1 1 1;1 -1 1;0 1 2]
disp(mat_prod,'Matrix product=')
|
ff7463074706364c905e29ed2d004d37479b82cc
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3689/CH8/EX8.2/8_2.sce
|
5081c8a836c59f112902b14f314c9d9642bca074
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,044
|
sce
|
8_2.sce
|
////
//Varialble Declaration
Tn = 353.24 //normal boiling point of Benzene, K
pi = 1.19e4 //Vapor pressure of benzene at 20°C, Pa
DHf = 9.95 //Latent heat of fusion, kJ/mol
pv443 = 137. //Vapor pressure of benzene at -44.3°C, Pa
R = 8.314 //Ideal Gas Constant, J/(mol.K)
Pf = 101325 //Std. atmospheric pressure, Pa
T20 = 293.15 //Temperature in K
P0 = 1.
Pl = 10000.
Ts = -44.3 //Temperature of solid benzene, °C
//Calculations
Ts = Ts + 273.15
//Part a
DHv = -(R*log(Pf/pi))/(1./Tn-1./T20)
//Part b
DSv = DHv/Tn
DHf = DHf*1e3
//Part c
Ttp = -DHf/(R*(log(Pl/P0)-log(pv443/P0)-(DHv+DHf)/(R*Ts)+DHv/(R*T20)))
Ptp = exp(-DHv/R*(1./Ttp-1./Tn))*101325
//Results
printf("\n Latent heat of vaporization of benzene at 20°C %4.1f kJ/mol",DHv/1000)
printf("\n Entropy Change of vaporization of benzene at 20°C %3.1f J/mol",DSv)
printf("\n Triple point temperature = %4.1f K for benzene",Ttp)
printf("\n Triple point pressure = %4.2e Pa for benzene",Ptp)
|
497e120c77c58814ad1250a59604dd6865035085
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/551/CH7/EX7.18/18.sce
|
b0a6668015e02143cb84c3a049e6960f50d3d636
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 157
|
sce
|
18.sce
|
clc
vg=0.1274; //m^3/kg
vf=0.001157; //m^3/kg
// dp/dT=32; //kPa/K
T3=473; //K
h_fg=32*10^3*T3*(vg-vf)/10^3;
disp("h_fg=")
disp(h_fg)
disp("kJ/kg")
|
39333263dac21613de1a6d2c7a00cf5302a6865b
|
7a1adf0a5d79d7bcd6706889d8257746a118d373
|
/oldScenarios/children_dev2.sce
|
5c6ffe6330c5576f2c49bbdc1c0bd704557de8c5
|
[] |
no_license
|
stakar/Go_NoGo
|
c8cddf1eff6b62b7a4bfdb850c774031cd401fcc
|
fd2ef2b919ad66e825aeb37b5ceaddac7682813a
|
refs/heads/master
| 2020-04-12T15:01:13.369575
| 2019-07-04T08:23:53
| 2019-07-04T08:23:53
| 162,568,405
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 6,740
|
sce
|
children_dev2.sce
|
active_buttons = 2;
response_matching = simple_matching;
default_all_responses = false;
default_font_size = 160;
default_background_color = 222, 222, 222;
default_text_color = 25, 25, 25;
begin;
# ponizej zdefiniowane obiekty będą
# modyfikowane z poziomu PCL
# --- obiekty text ---
text {caption = "GO";
font = "Times New Roman";} cyfra_txt;
text {
caption = "No-Go";
font = "Times New Roman";
font_size = 96;
} no_go_txt;
text {
caption = "Go";
font = "Times New Roman";
font_size = 48;
} go_txt;
# --- bitmap section ---
bitmap {filename = "rakieta.png";} go_stimuli_pic;
bitmap {filename = "ufo.png";} no_go_stimuli_pic;
array{
bitmap {filename = "rakieta.png"; preload = false; };
bitmap {filename = "star_go.png"; preload = false; };
bitmap {filename = "car1_go.png"; preload = false; };
} graphics_go;
array{
bitmap {filename = "ufo.png"; preload = false; };
bitmap {filename = "heart_no_go.png"; preload = false; };
bitmap {filename = "car1_no_go.png"; preload = false; };
} graphics_no_go;
# --- obiekty picture ---
picture {
# instrukcja na początek bloku
# text{caption = "Witaj w badaniu. Zapoznaj się z bodźcami. \n Kiedy będziesz gotowy, kliknij spację";
# font = "Times New Roman";
# font_size = 36;
# };
# x = 0; y = 340;
text{
caption = "Nie klikaj na znak";
font = "Times New Roman";
font_size = 48;
};
x = -400; y = 170;
text{
caption = "Klikaj na znak";
font = "Times New Roman";
font_size = 48;
};
x = 400; y = 170;
} instrukcja_blok_pic;
picture {
# koniec pierwszej części
text{
caption = "To już koniec";
font = "Times New Roman";
font_size = 48;
};
x = 0; y=0;
} koniec_pic;
picture {
#Pierwszy obrazek - znak GO
background_color = 222, 222, 222;
} znak_pic_go;
picture {
background_color = 222, 222, 222;
} znak_pic_no_go;
picture{} blank; # pusty ekran
picture {
# placeholder - set by PCL
box { height = 1; width = 1; color = 0,0,0; };
x = 0; y = 0;
} stimuli_go;
picture {
# placeholder - set by PCL
box { height = 1; width = 1; color = 0,0,0; };
x = 0; y = 0;
} stimuli_no_go;
# ---------------------
# --- obiekty trial ---
# ---------------------
trial{
# instrukcja na początek bloku
# all_responses = true;
trial_duration = forever;
# trial_type = first_response;
trial_type = specific_response;
terminator_button = 2;
picture instrukcja_blok_pic;
time = 0; duration = 12500;
# picture blank;
# time = 1250; duration = 1000;
} instrukcja_blok_trial;
trial{
picture blank;
time = 1250; duration = 1000;
}blank_trial;
trial{
# koniec pierwszej części
trial_duration = 50000;
picture koniec_pic;
} koniec_trial;
trial{
# głowny trial - wyswietlenie cyfry
trial_duration = 1250;
stimulus_event{
picture znak_pic_go;
time = 0;
duration = 250;
code = "xxx";
} cyfra_stimev;
picture blank;
time = 250;
}my_trial;
# --- --- --- --- ---
# --- --- PCL --- ---
# --- --- --- --- ---
begin_pcl;
# wczytaj bodzce i przerwy
int quantityStimuli;
quantityStimuli = 138;
array<string> stimSign[quantityStimuli];
array<int> przerwy[quantityStimuli];
input_file in2 = new input_file;
string go;
go = "GO";
string no_go;
no_go = "NO_GO";
in2.open("przerwy_ms.txt");
loop
int i = 1
until
i > quantityStimuli
begin
przerwy[i] = in2.get_int();
i = i+1;
end;
# przygotowanie bodzcow
loop
int i = 1
until
i > quantityStimuli
begin
stimSign[i] = go;
i = i + 1;
end;
loop
int i = 1
until
i > 46
begin
int which;
which = random(1,quantityStimuli);
if stimSign[which] != no_go then
stimSign[which] = no_go;
i = i + 1;
end;
end;
in2.close();
# deklaracje zmiennych
int fontNumber;
int stimNumber = 1;
string znak;
int current_go;
int przerwa;
array<string>go_names[]={"go1","go2","go3"};
array<string>no_go_names[]={"no_go1","no_go2","no_go3"};
array<int> no_go_objects[] = {0, 1, 2, 3, 0, 3, 2, 1}; # cyfry no-go dla każdego bloku
###############################
#Instrukcja na początku badania
###############################
#####################
#Prezentacja bodźców#
#####################
int y = 0;
string name_trial_go = "trial";
string name_trial_no_go = "trial";
array<int> proba[] = {1,2,3};
proba.shuffle();
y = proba[1];
name_trial_go.append(go_names[y]);
name_trial_no_go.append(no_go_names[y]);
graphics_go[y].load();
graphics_no_go[y].load();
instrukcja_blok_pic.add_part(graphics_no_go[y],400,-180);
instrukcja_blok_pic.add_part(graphics_go[y ],-400,-180);
instrukcja_blok_trial.present();
blank_trial.present();
loop
int t = 1
until
t > 10
begin
# weź znak i długość przerwy
znak = stimSign[stimNumber];
cyfra_txt.set_caption(znak);
cyfra_txt.redraw();
przerwa = przerwy[stimNumber];
stimNumber = stimNumber + 1;
#Zaprezentuj znak GO
if znak == "GO" then
graphics_go[y].load();
stimuli_go.set_part(1,graphics_go[y]);
cyfra_stimev.set_stimulus(stimuli_go);
cyfra_stimev.set_target_button(0);
cyfra_stimev.set_response_active(true);
cyfra_stimev.set_event_code(name_trial_go);
#Zaprezentuj znaj NO-GO
else
graphics_no_go[y].load();
stimuli_no_go.set_part(1,graphics_no_go[y]);
cyfra_stimev.set_stimulus(stimuli_no_go);
cyfra_stimev.set_target_button(1);
cyfra_stimev.set_event_code(name_trial_no_go);
end;
my_trial.set_duration(przerwa + 250);
my_trial.present();
t = t + 1;
end;
stimSign.shuffle();
loop
int blok = 1
until
blok > 3
begin
current_go = blok;
graphics_go[current_go].load();
graphics_no_go[current_go].load();
instrukcja_blok_pic.add_part(graphics_no_go[current_go],-400,-180);
instrukcja_blok_pic.add_part(graphics_go[current_go],400,-180);
instrukcja_blok_trial.present();
blank_trial.present();
stimNumber = 1;
loop
int t = 1
until
t > (quantityStimuli-1)
#t > 2
begin
# weź znak i długość przerwy
znak = stimSign[stimNumber];
cyfra_txt.set_caption(znak);
cyfra_txt.redraw();
przerwa = przerwy[stimNumber];
stimNumber = stimNumber + 1;
#Zaprezentuj znak GO
if znak == "GO" then
graphics_go[current_go].load();
stimuli_go.set_part(1,graphics_go[current_go]);
cyfra_stimev.set_stimulus(stimuli_go);
cyfra_stimev.set_target_button(0);
cyfra_stimev.set_response_active(true);
cyfra_stimev.set_event_code(go_names[current_go])
#Zaprezentuj znaj NO-GO
else
graphics_no_go[current_go].load();
stimuli_no_go.set_part(1,graphics_no_go[current_go]);
cyfra_stimev.set_stimulus(stimuli_no_go);
cyfra_stimev.set_target_button(1);
cyfra_stimev.set_event_code(no_go_names[current_go])
end;
my_trial.set_duration(przerwa + 250);
my_trial.present();
t = t + 1;
end;
blok = blok + 1
end;
# zakończenie
koniec_trial.present();
|
e851c58f923a15039519825e27dd49e4a6c1709c
|
2306fe37806fcf2e0b7509d8c35d5b5761d87624
|
/octaedre.sce
|
f431bb5087d6029838549d47ebe556606e74225f
|
[
"MIT"
] |
permissive
|
thbt/PlanetarySystem
|
60532b0a9e0e59a8ee2089eb721b68ff9c518335
|
a8a514c583e59cebacaa3ad32cf5c2ac923d7e60
|
refs/heads/master
| 2021-01-01T16:40:28.843162
| 2015-07-30T09:30:03
| 2015-07-30T09:30:03
| 39,942,394
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,309
|
sce
|
octaedre.sce
|
// octaedre.sce
// Longueur des côtés
oLx = 2.5;
oLy = 2.5;
oLz = 2.5;
// Les sommets de l'octa
sOcta = [oLx*ones(6,1),oLy*ones(6,1),oLz*ones(6,1)] .* ...
[ 0, 0, 0; // 1
1, 0, 0; // 2
0, 1, 0; // 3
1, 1, 0; // 4
0.5,0.5, 0.5; // 5
0.5,0.5,-0.5]; // 6
sOcta = sOcta';
octaOrigine = getOrigin(sOcta);
sOcta = translation(sOcta, -octaOrigine);
fOcta = [1 3 5; // A
1 2 5; // B
3 4 5; // C
2 4 5; // D
1 3 6; // E
3 4 6; // F
1 2 6; // G
2 4 6]; // H
axeRotOcta = [8 * %pi / 12, 0, 0];
function updateOctaedre(elapsedTime)
temp = sOcta;
// On fait tourner l'octa sur lui-même en tennant compte de son axe de rotation
temp = rotationLocale(temp, 0, 0, (elapsedTime * %pi / 13)); // Ca porte chance.
temp = rotationLocaleVect(temp, axeRotOcta);
// On translate l'octa et on le tourne par rapport au soleil (le centre de l'univers)
temp = translation(temp, [4 0 0]);
temp = rotationGlobale(temp, 0, 0, elapsedTime * %pi / 9);
// On annule la rotation de l'axe de rotation
temp = rotationLocale(temp, 0, 0, -(elapsedTime * %pi / 9));
// Enfin, on dessine l'octa
dessinerForme(temp, fOcta);
endfunction
|
8cd9404d97290483ed22f9af0a0c2ae5a83bd6c1
|
0e1b45c07f0938ba9c8a003d6ae1cf2d8315efdb
|
/acmp.ru/423, Message/java/test-02.tst
|
69ece51b561984fa797da63db8f9ac9225ee7751
|
[] |
no_license
|
Kot-Angens/acm
|
c85d8582c3e84f218415321743864b9680e01f2e
|
05472eaa0fff7abb6679826085da5e0c990df4cb
|
refs/heads/master
| 2021-01-24T22:36:05.159612
| 2012-10-02T13:51:56
| 2012-10-02T13:51:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 35
|
tst
|
test-02.tst
|
21705
~~~~~~~~~~~~~~~~~~~~~~~~~~
3
|
e1f1e8381a6eab3dd1a327890355cc569d255d9d
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/278/CH10/EX10.1/ex_10_1.sce
|
97647ef54b0cfd2d28d6cd454950acb31974d6f6
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 230
|
sce
|
ex_10_1.sce
|
clc
//soltion
//given
b=100//mm//width
t=10//mm//thickness
P=80*10^3//N
T=55//N/mm^2
//let l and s be length of wled and size of weld
//s=t
s=10//mm
//P=1.414*s*l*T
l=P/(1.414*s*T)//mm
printf("the length of weld is,%f mm",l+12.5)
|
d8c2c805e5b5a01663c1655b999e34a7bb7c55fc
|
3592fbcb99d08024f46089ba28a6123aeb81ff3c
|
/main/testQualysisRead.sce
|
49b7f138f2762896928aa340063e74ff307e5c0c
|
[] |
no_license
|
clairedune/sciGaitanLib
|
a29ab61206b726c6f0ac36785ea556adc9ef03b9
|
7498b0d707a24c170fc390f7413359ad1bfefe9f
|
refs/heads/master
| 2020-12-11T01:51:13.640472
| 2015-01-28T13:52:26
| 2015-01-28T13:52:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 593
|
sce
|
testQualysisRead.sce
|
// 21 janvier 2013
// construction du modele du bonhomme
// modelisation 2 D 5 segments pour le bonhomme et
// le deambulateur est un objet rigide a trois branches
// On ajoute un PI pour vrifier que la pose est telle que les pieds touchent le sol.
// read qualysis data
path = '/home/dune/Documents/data/AnalysisQualisys/MADN/';
pathres = 'results/essai1-';
pathMatFile = path+ 'KBM-essai1.mat';
loadmatfile(pathMatFile);
P = mocap10dofData(essai1);
index=350;
Ptest = P(:,index);
Ptest = Ptest'/1000; //tout mettre en metre
xset("window",10);
humanMocap10dofPlot(Ptest);
show_pixmap();
|
d01124e489c539bf9956401d858b4dd73497fd85
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3720/CH5/EX5.15/Ex5_15.sce
|
4b035622717515c1d3f94d89b110b11970ea3629
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 491
|
sce
|
Ex5_15.sce
|
//Example 5_15
clc;clear;funcprot(0);
// Properties
rho=1000;//The density of water in kg/m^3
// Given values
v=0.03;//The flow rate of water in m^3/s
W_p=20;// kW
g=9.81;//The acceleration due to gravity in m/s^2
z_2=45;// m
// Calculation
m=rho*v;//The mass flow rate of water through the system in kg/s
E_ml=(W_p-(m*g*z_2)/1000);
printf('The lost mechanical power,E_mechloss=%0.2f kW\n',E_ml);
h_l=E_ml*1000/(m*g);
printf('The irreversible head loss,h_L=%0.1f m\n',h_l);
|
e6c4ff140646bb6ac3476bd9cad9ec83bf382244
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1460/CH2/EX2.2/2_2.sce
|
e0f6dff6467bda5d15c6aaea1fb7d13d51948cbf
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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
|
2_2.sce
|
clc
//initialization of variables
w=0.1 //lbm
Pv=30000 //ft-lb/lbm
v1=14 //ft^3 /lbm
v2=3 //ft^3/lbm
//calculations
function [W]=func(v)
W=Pv/v
endfunction
Work=w*intg(v1,v2,func)
//results
//Answer varies a bit from the text due to rounding off of log value
printf("Work done = %d ft-lb",Work)
|
183afa05775b3caefd0be256468d93e28b1e83b3
|
3c47dba28e5d43bda9b77dca3b741855c25d4802
|
/microdaq/macros/gen_mdaq_palette.sci
|
e5f0a24d0765843b2e70973ede232500bdea5de8
|
[
"BSD-3-Clause"
] |
permissive
|
microdaq/Scilab
|
78dd3b4a891e39ec20ebc4e9b77572fd12c90947
|
ce0baa6e6a1b56347c2fda5583fb1ccdb120afaf
|
refs/heads/master
| 2021-09-29T11:55:21.963637
| 2019-10-18T09:47:29
| 2019-10-18T09:47:29
| 35,049,912
| 6
| 3
|
BSD-3-Clause
| 2019-10-18T09:47:30
| 2015-05-04T17:48:48
|
Scilab
|
UTF-8
|
Scilab
| false
| false
| 2,016
|
sci
|
gen_mdaq_palette.sci
|
function [res] = gen_mdaq_palette()
is_generated = %F;
config_path = mdaqToolboxPath() + "etc"+filesep()+"mblockstmpdir";
tbx_tmp_path = mdaqToolboxPath() + "etc"+filesep()+"tmp";
//check if sod files were generated
try
load(config_path);
catch
is_generated = %F;
end
if exists('tmp_dir') == 1 then
if isdir(tbx_tmp_path+filesep()+basename(tmp_dir)) then
is_generated = %T;
else
is_generated = %F;
end
end
if is_generated == %F then
//Generete palette sod files
tmp_dir = TMPDIR;
palette_path = tmp_dir + filesep() + "palette";
mkdir(palette_path);
//generate & load
build_mdaq_palette(palette_path);
save(config_path, 'tmp_dir');
//Bugfix
//replace mdaq .svg files in TMPDIR
svg_path = mdaqToolboxPath() + filesep() + "images" +..
filesep() + "svg" + filesep();
copyfile(svg_path, TMPDIR+filesep());
if isdir(tbx_tmp_path) == %F then
mkdir(tbx_tmp_path)
end
mkdir(tbx_tmp_path+filesep()+basename(TMPDIR));
copyfile(TMPDIR, tbx_tmp_path+filesep()+basename(TMPDIR));
else
palette_path = tmp_dir + filesep() + "palette";
//Load generated sod files
if isdir(tmp_dir) == %F then
mkdir(fileparts(TMPDIR)+basename(tmp_dir));
copyfile(tbx_tmp_path+filesep()+basename(tmp_dir), fileparts(TMPDIR)+basename(tmp_dir));
end
// load generated sod files
palette_files = ls(palette_path);
palette_files = gsort(palette_files, 'lr', 'i');
palette_files_index = grep(palette_files, ".sod");
if palette_files_index <> [] then
pal_size = size(palette_files_index, '*');
for i = 1:pal_size
xcosPalAdd(palette_path + filesep() + palette_files(palette_files_index(i)),'MicroDAQ')
end
end
end
res = 0;
endfunction
|
8cc6f31dd7a408df2f58379fe65a904de04aa649
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1949/CH6/EX6.3/Ex6_3.sce
|
03a0f535e9a661fd9761009490ad7399c0a3317b
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 444
|
sce
|
Ex6_3.sce
|
//Chapter-6,Example 6_3,Page 6-27
clc()
//Given Values:
u=0.8*10^-23 //Magnetic dipole moment of an atom in paramagnetic gas in J/T
B=0.8 //Magnetic field in tesla
K=1.38*10^-23 //Boltzmann constant
//To find Temperature at which Average thermal energy is equal to Magnetic energy
//i.e. uB=3KT/2
T=2*u*B/(3*K) //Required temperature
printf('Required temperature is =%.3f Kelvin \n',T)
|
569a3c45e0b6ddc507e26db5a07bd525a1cffe00
|
45a93944a52f35e5601f5eebc0ff0e0c885849fd
|
/scripts/additionnerPas.sci
|
344f41adb6c950dfffdde501cc4df2eb50b2bb4b
|
[] |
no_license
|
madox35/Simulations-numeriques
|
ae32655f213f5a1dc04de86387652264a5b56aa0
|
11d59864210370b2524ad533bf864d0968053131
|
refs/heads/master
| 2020-03-17T13:32:10.082544
| 2018-05-21T21:14:09
| 2018-05-21T21:14:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 53
|
sci
|
additionnerPas.sci
|
function marche = additionnerPas(tabPas)
endfunction
|
959f628711240868b6f80eecb89d8343766763c7
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/551/CH3/EX3.2/2.sce
|
92333742817a445d9b4c87bfb1057835088c4456
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 519
|
sce
|
2.sce
|
clc
V=0.6; //m^3
m=3.0; //kg
p=5; //bar
v=V/m;
// At 5 bar: From steam tables
v_g=0.375; //m^3/kg
v_f=0.00109; //m^3/kg
v_fg=v_g - v_f;
x=1-((v_g - v)/v_fg);
disp("(i) Mass and volume of liquid")
m_liq=m*(1-x);
disp("mass of liquid=")
disp(m_liq)
disp("kg")
V_liq=m_liq*v_f;
disp("volume of liquid=")
disp(V_liq)
disp("m^3")
disp("(ii) Mass and volume of vapour")
m_vap=m*x;
disp("mass of vapour=")
disp(m_vap)
disp("kg")
V_vap=m_vap*v_g;
disp("volume of vapour=")
disp(V_vap)
disp("m^3")
|
0b82ad42e220dab142098e8509d04eb9bc706330
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1370/CH7/EX7.1/exp7_1.sce
|
d11c0f13c63ccc3860375d9bb3b90b2a7e856117
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 379
|
sce
|
exp7_1.sce
|
//Example 7.1
clc
disp("Forbidden gap for silicon is given by,")
disp("E_C = 1.21 - 3.6*10^-4 * T")
disp("Now T = 35+273 = 308 K")
ec=1.21-(308*3.6*10^-4)
format(6)
disp(ec,"Therefore, E_C(in eV) =")
disp("While forbidden gap for germanium is given by,")
disp("E_C = 0.785 - 2.23*10^-4 * T")
ec=0.785-(308*2.23*10^-4)
format(7)
disp(ec,"Therefore, E_C(in eV) =")
|
719d7876f5b9edd775693be2d218559d6bba6f77
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2240/CH34/EX33.9/EX33_9.sce
|
afe1cb5badcb54b13dddab81ba965f6145b4f832
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 589
|
sce
|
EX33_9.sce
|
// Grob's Basic Electronics 11e
// Chapter No. 33
// Example No. 33_9
clc; clear;
// Calculate Zin(CL) and Zout(CL). Assume Rin is 2 MOhms, Avol is 100,000, and Zout(OL) is 75 Ohms.
// Given data
Avol = 100000; // Open loop voltage gain=100,000
Ri = 2*10^6; // Input resistance=2 MOhms
B = 0.0909; // Beta=0.0909
Zool = 75; // Output impedence (open-loop)=75 Ohms
Zicl = Ri*(1+Avol*B);
disp (Zicl,'The Input Impedence Closed-Loop in Ohms')
disp ('i.e 18 GOhms')
A = Avol*B;
Zocl = Zool/(1+A);
disp (Zocl,'The Closed-Loop Output Impedence in Ohms')
|
e0a4f2e224fe0f50d18a3013691f8769882fccad
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3819/CH1/EX1.10/Ex1_10.sce
|
0edc8dda95feb1c890fcb278180e0fd4e3eb3086
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 336
|
sce
|
Ex1_10.sce
|
// A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal
// Chapter 1-Properties of Fluid
// Problem 1.10
//Given Data Set in the Problem
density=981
ss=0.2452
vel_grad=0.2
//Calculations
visc=ss/(vel_grad)
kin_visc=visc/density
mprintf("The Kinematic viscosity of the oil is %f stokes\n",kin_visc*10^4)
|
9aeb5ae24ea1178e636413b26f1ea960f560971c
|
b29e9715ab76b6f89609c32edd36f81a0dcf6a39
|
/ketpic2escifiles6/Bezier.sci
|
7d1993eb56de4d1925abad3898a533958a8197b2
|
[] |
no_license
|
ketpic/ketcindy-scilab-support
|
e1646488aa840f86c198818ea518c24a66b71f81
|
3df21192d25809ce980cd036a5ef9f97b53aa918
|
refs/heads/master
| 2021-05-11T11:40:49.725978
| 2018-01-16T14:02:21
| 2018-01-16T14:02:21
| 117,643,554
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 666
|
sci
|
Bezier.sci
|
// 15.01.01
function Out=Bezier(varargin)
Nargs=length(varargin);
Ptlist=varargin(1);
Ctrlist=varargin(2);
Num=10;
for J=3:Nargs
Tmp=varargin(J);
K=mtlb_findstr(Tmp,'=');
Tmp1=strsplit(Tmp,[K-1,K]);
Tmp2=ascii(Tmp1(1,1));
Lhs=char(Tmp2(1));
if Lhs=="N" then
Num=evstr(Tmp1(3,1));
end;
end;
if length(Num)==1
Num=Num*ones(1:length(Ctrlist))
end;
Out=[];
for ii=1:length(Ctrlist)
Tmp1=[Ptlist(ii),Ptlist(ii+1)];
Tmp2=Ctrlist(ii);
if ii==1 then
St=0
else
St=1
end;
for J=St:Num(ii)
Tmp=Bezierpt(J/Num(ii),Tmp1,Tmp2);
Out=[Out;Tmp];
end;
end;
endfunction;
|
e045233e44f9d1c638245170cd8ffc305777fd7f
|
8217f7986187902617ad1bf89cb789618a90dd0a
|
/browsable_source/2.3/Unix-Windows/scilab-2.3/macros/percent/%svr.sci
|
dd4d2fa807c493107a29adb33f919c7030709ccd
|
[
"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
| 286
|
sci
|
%svr.sci
|
function h=%svr(h1,h2)
// %svr(h1,h2) = (I+h1*h2)\h1. h1 constant h2 rational
//!
[m1,n1]=size(h1)
[m2,n2]=size(h2(2))
if abs(n1-m2)+abs(m1-n2)<>0 then error('inconsistent dimensions'),end
if m1*n1==1 then
h=h2;h(2)=h1*h2(3);h(3)=h1*h2(2)+h2(3);
else
h=(eye(m1,m1)+h1*h2)\h1
end
|
945427bdd67be7a9a8bf6c3d7c32cbdee13a330e
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1640/CH6/EX6.2/6_2.sce
|
7bfcdb8da20a7fab84d418a9e7275ace7e6f3bd8
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 259
|
sce
|
6_2.sce
|
clc
//initialisation of variables
b= 10 //ft
n= 1
i= 1/1000
d= 1.5 //ft
C= 110
w= 62.4 //lb/ft^3
//CALCULATIONS
L= sqrt(2*d^2)
P= b+2*L
A= d*(b+n*d)
m= A/P
v= C*sqrt(m*i)
Q= A*v*w*60*60*24/10
//RESULTS
printf ('Discharge = %.2e gal/day ',Q)
|
6467846a8561057552d492aa88197b1d4483cfd7
|
6c7a728e11a427c93b15669517131a79a0703108
|
/sql/dbms/dbms_sql/fetch_rows_array.tst
|
02a471f9c5f4f17f5de3ddb432ecb33545aaba1f
|
[] |
no_license
|
ZVlad1980/adm_scripts
|
0b9fe4ff166213dc649d555c81e8d65b858074e4
|
9978a098c8140f5722b51e799969b76e2d68b42e
|
refs/heads/master
| 2020-03-31T08:45:49.405822
| 2019-04-30T05:04:03
| 2019-04-30T05:04:03
| 152,071,490
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 899
|
tst
|
fetch_rows_array.tst
|
PL/SQL Developer Test script 3.0
36
declare
c number;
d number;
n_tab dbms_sql.number_table;
indx number := 1;
v number;
begin
c := dbms_sql.open_cursor;
dbms_sql.parse(c,
'select code from test_tbl order by 1',
dbms_sql.native);
dbms_sql.define_array(c, 1, n_tab, 100, indx);
d := dbms_sql.execute(c);
loop
d := dbms_sql.fetch_rows(c);
dbms_output.put_line('d: ' || d);
dbms_sql.column_value(c, 1, n_tab);
--DBMS_SQL.variable_value(c, 'code', n_tab);
dbms_output.put_line('n_tab.count: ' || n_tab.count);
for i in 1 .. n_tab.count loop
dbms_output.put_line('n_tab(' || i || '): ' || n_tab(i));
end loop;
exit when d != 100;
end loop;
dbms_sql.close_cursor(c);
exception
when others then
if dbms_sql.is_open(c) then
dbms_sql.close_cursor(c);
end if;
raise;
end;
0
0
|
d6e13b5af457dfd1b72d877edb0eb1136e5699e3
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/281/CH5/EX5.11/example5_11.sce
|
5fc0abb8308116308bb4b3c410074b3419c29b39
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 310
|
sce
|
example5_11.sce
|
disp('chapter 5 ex5.11')
disp('given')
disp('R1=R3=2.2kohms')
disp('R2=220kohms')
disp('Rs=220ohms')
Rs=220
R1=2200
R3=2200
R2=220000
disp('R=R3+R2||(R1+Rs)')
R=R3+(R2*(R1+Rs)/(R2+R1+Rs))
disp('ohms',R)
disp('f=600kHz')
f=600000
disp('Cs=1/(2*%pi*f*10*R)')
Cs=1/(2*%pi*f*10*R)
disp('farads',Cs)
|
1dc7ecb75f43a4b32865e83cc8a27ec47b139e7d
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/866/CH18/EX18.1/18_1.sce
|
9f620deeb867fe3652bb9fe670e4f452c3dbc077
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 194
|
sce
|
18_1.sce
|
clc
//initialisation of variables
sigmay= 100 //N/mm^2
b= 10 //mm
d= 12 //mm
//CALCULATIONS
My= sigmay*b*d^3*2/(d*12)
Mp= sigmay*b*(d/2)*(d/2)
f= Mp/My
//RESULTS
printf ('f= %.1f',f)
|
8138acc6e9e9cb33961ec508522fa05d27967800
|
eb7eeb04a23a477e06f3c0e3d099889caee468b4
|
/src/examples/course/scilab/membrane/membrane.sce
|
c306af2d35a73a8f1cc49e905fbc5a55c1c274b2
|
[] |
no_license
|
mikeg64/iome
|
55699b7d7b3d5c1b006d9c82efe5136b8c909dfd
|
cc1c94433133e32776dcf16704ec4ec337b1b4a0
|
refs/heads/master
| 2020-03-30T15:57:33.056341
| 2016-04-13T09:24:27
| 2016-04-13T09:24:27
| 151,387,236
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 2,282
|
sce
|
membrane.sce
|
//
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA
//
// This file is distributed under the same license as the Scilab package.
//
// =============================================================================
// Demonstrate animation based on the evolution of a 3D surface
// ============================================================================
curFig = scf(100001);
clf(curFig,"reset");
demo_viewCode("membrane.sce");
drawlater();
xselect(); //raise the graphic window
// set a new colormap
//-------------------
cmap= curFig.color_map; //preserve old setting
curFig.color_map = jetcolormap(64);
//The initial surface definition
//----------------------
x=linspace(-%pi,%pi,50);
y=x;
Z=15*sin(x)'*cos(y);
myones=ones(50,50);
[mmx,mmy]=meshgrid(x,y);
//Creates and set graphical entities which represent the surface
//--------------------------------------------------------------
plot3d1(x,y,Z,35,45,' ');
s=gce(); //the handle on the surface
s.color_flag=1 ; //assign facet color according to Z value
title("evolution of a 3d surface","fontsize",3)
I=4000:-0.1:1;
realtimeinit(0.1);;//set time step (0.1 seconds) and date reference
drawnow();
for i=1:max(size(I))
realtime(i); //wait till date 0.1*i seconds
//s.data.z = (sin((I(i)/10)*x)'*cos((I(i)/10)*y))';
//s.data.z = sin(6*%pi*i/max(size(I)))*(sin((2)*x)'*sin((4)*y))';
//s.data.z = sin((100*9*%pi*i*myones/max(size(I))-2*mmx+4*mmy));//+sin((100*8*%pi*i*myones/max(size(I))-4*mmx+2*mmy))+sin((100*20*%pi*i*myones/max(size(I))-2*mmx+20*mmy));
s.data.z = 5.0*sin((50*4.5*%pi*i*myones/max(size(I)))).*(sin((mmx/2)).*sin((mmy/2)))+4.0*sin((100*4.5*%pi*i*myones/max(size(I)))).*(sin((mmx)).*sin((mmy)))+2.0*sin((100*9*%pi*i*myones/max(size(I)))).*(sin((-2*mmx)).*sin((+4*mmy)))+4.0*sin((100*45*%pi*i*myones/max(size(I)))).*(sin((3*mmx)).*sin((-3*mmy)))+0.5*sin((100*80*%pi*i*myones/max(size(I)))).*(sin((6*mmx)).*sin((-6*mmy)))+0.25*sin((100*160*%pi*i*myones/max(size(I)))).*(sin((12*mmx)).*sin((-12*mmy)))+0.2*sin((100*180*%pi*i*myones/max(size(I)))).*(sin((24*mmx)).*sin((-24*mmy)))+3*sin((100*180*%pi*i*myones/max(size(I)))).*(sin((6*mmx)).*sin((-5*mmy)))+3*sin((100*360*%pi*i*myones/max(size(I)))).*(sin((-12*mmx)).*sin((10*mmy)));;
end
|
7057f6670ef1acb576731dfcb30481498ad25bc0
|
405c256a99ff01ab212f015ee71b394a89cb07ec
|
/lista_1/iris/bezdekIris.sce
|
4cfff3b1ae388a2620213921e56efbddfd980632
|
[] |
no_license
|
diegomhamilton/machine-learning
|
ab38b0d9d4f8ccd1f0ca1e2ef083a088674e20ca
|
728f143bbc5f2a2cff56bc1cacf6d832ed010ecc
|
refs/heads/master
| 2020-03-30T00:13:32.181748
| 2018-12-19T21:04:48
| 2018-12-19T21:04:48
| 150,511,438
| 2
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 2,711
|
sce
|
bezdekIris.sce
|
bIris=[
5.1,3.5,1.4,0.2,0
4.9,3.0,1.4,0.2,0
4.7,3.2,1.3,0.2,0
4.6,3.1,1.5,0.2,0
5.0,3.6,1.4,0.2,0
5.4,3.9,1.7,0.4,0
4.6,3.4,1.4,0.3,0
5.0,3.4,1.5,0.2,0
4.4,2.9,1.4,0.2,0
4.9,3.1,1.5,0.1,0
5.4,3.7,1.5,0.2,0
4.8,3.4,1.6,0.2,0
4.8,3.0,1.4,0.1,0
4.3,3.0,1.1,0.1,0
5.8,4.0,1.2,0.2,0
5.7,4.4,1.5,0.4,0
5.4,3.9,1.3,0.4,0
5.1,3.5,1.4,0.3,0
5.7,3.8,1.7,0.3,0
5.1,3.8,1.5,0.3,0
5.4,3.4,1.7,0.2,0
5.1,3.7,1.5,0.4,0
4.6,3.6,1.0,0.2,0
5.1,3.3,1.7,0.5,0
4.8,3.4,1.9,0.2,0
5.0,3.0,1.6,0.2,0
5.0,3.4,1.6,0.4,0
5.2,3.5,1.5,0.2,0
5.2,3.4,1.4,0.2,0
4.7,3.2,1.6,0.2,0
4.8,3.1,1.6,0.2,0
5.4,3.4,1.5,0.4,0
5.2,4.1,1.5,0.1,0
5.5,4.2,1.4,0.2,0
4.9,3.1,1.5,0.2,0
5.0,3.2,1.2,0.2,0
5.5,3.5,1.3,0.2,0
4.9,3.6,1.4,0.1,0
4.4,3.0,1.3,0.2,0
5.1,3.4,1.5,0.2,0
5.0,3.5,1.3,0.3,0
4.5,2.3,1.3,0.3,0
4.4,3.2,1.3,0.2,0
5.0,3.5,1.6,0.6,0
5.1,3.8,1.9,0.4,0
4.8,3.0,1.4,0.3,0
5.1,3.8,1.6,0.2,0
4.6,3.2,1.4,0.2,0
5.3,3.7,1.5,0.2,0
5.0,3.3,1.4,0.2,0
7.0,3.2,4.7,1.4,1
6.4,3.2,4.5,1.5,1
6.9,3.1,4.9,1.5,1
5.5,2.3,4.0,1.3,1
6.5,2.8,4.6,1.5,1
5.7,2.8,4.5,1.3,1
6.3,3.3,4.7,1.6,1
4.9,2.4,3.3,1.0,1
6.6,2.9,4.6,1.3,1
5.2,2.7,3.9,1.4,1
5.0,2.0,3.5,1.0,1
5.9,3.0,4.2,1.5,1
6.0,2.2,4.0,1.0,1
6.1,2.9,4.7,1.4,1
5.6,2.9,3.6,1.3,1
6.7,3.1,4.4,1.4,1
5.6,3.0,4.5,1.5,1
5.8,2.7,4.1,1.0,1
6.2,2.2,4.5,1.5,1
5.6,2.5,3.9,1.1,1
5.9,3.2,4.8,1.8,1
6.1,2.8,4.0,1.3,1
6.3,2.5,4.9,1.5,1
6.1,2.8,4.7,1.2,1
6.4,2.9,4.3,1.3,1
6.6,3.0,4.4,1.4,1
6.8,2.8,4.8,1.4,1
6.7,3.0,5.0,1.7,1
6.0,2.9,4.5,1.5,1
5.7,2.6,3.5,1.0,1
5.5,2.4,3.8,1.1,1
5.5,2.4,3.7,1.0,1
5.8,2.7,3.9,1.2,1
6.0,2.7,5.1,1.6,1
5.4,3.0,4.5,1.5,1
6.0,3.4,4.5,1.6,1
6.7,3.1,4.7,1.5,1
6.3,2.3,4.4,1.3,1
5.6,3.0,4.1,1.3,1
5.5,2.5,4.0,1.3,1
5.5,2.6,4.4,1.2,1
6.1,3.0,4.6,1.4,1
5.8,2.6,4.0,1.2,1
5.0,2.3,3.3,1.0,1
5.6,2.7,4.2,1.3,1
5.7,3.0,4.2,1.2,1
5.7,2.9,4.2,1.3,1
6.2,2.9,4.3,1.3,1
5.1,2.5,3.0,1.1,1
5.7,2.8,4.1,1.3,1
6.3,3.3,6.0,2.5,2
5.8,2.7,5.1,1.9,2
7.1,3.0,5.9,2.1,2
6.3,2.9,5.6,1.8,2
6.5,3.0,5.8,2.2,2
7.6,3.0,6.6,2.1,2
4.9,2.5,4.5,1.7,2
7.3,2.9,6.3,1.8,2
6.7,2.5,5.8,1.8,2
7.2,3.6,6.1,2.5,2
6.5,3.2,5.1,2.0,2
6.4,2.7,5.3,1.9,2
6.8,3.0,5.5,2.1,2
5.7,2.5,5.0,2.0,2
5.8,2.8,5.1,2.4,2
6.4,3.2,5.3,2.3,2
6.5,3.0,5.5,1.8,2
7.7,3.8,6.7,2.2,2
7.7,2.6,6.9,2.3,2
6.0,2.2,5.0,1.5,2
6.9,3.2,5.7,2.3,2
5.6,2.8,4.9,2.0,2
7.7,2.8,6.7,2.0,2
6.3,2.7,4.9,1.8,2
6.7,3.3,5.7,2.1,2
7.2,3.2,6.0,1.8,2
6.2,2.8,4.8,1.8,2
6.1,3.0,4.9,1.8,2
6.4,2.8,5.6,2.1,2
7.2,3.0,5.8,1.6,2
7.4,2.8,6.1,1.9,2
7.9,3.8,6.4,2.0,2
6.4,2.8,5.6,2.2,2
6.3,2.8,5.1,1.5,2
6.1,2.6,5.6,1.4,2
7.7,3.0,6.1,2.3,2
6.3,3.4,5.6,2.4,2
6.4,3.1,5.5,1.8,2
6.0,3.0,4.8,1.8,2
6.9,3.1,5.4,2.1,2
6.7,3.1,5.6,2.4,2
6.9,3.1,5.1,2.3,2
5.8,2.7,5.1,1.9,2
6.8,3.2,5.9,2.3,2
6.7,3.3,5.7,2.5,2
6.7,3.0,5.2,2.3,2
6.3,2.5,5.0,1.9,2
6.5,3.0,5.2,2.0,2
6.2,3.4,5.4,2.3,2
5.9,3.0,5.1,1.8,2];
|
bf7e7f782e76216ee445e5e975f6a2cd3b09ec15
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/752/CH5/EX5.4.2/5_4_2.sce
|
b07448f95e571e7efd899f779300c0d966a06721
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 768
|
sce
|
5_4_2.sce
|
clc;
//page no 163
// problem no 5.4.2
//Resonating freq of a tuned ckt of a CE amplifier is 5MHz
f=5*10^6;//in Hz
w0=2*%pi*f;
Q=100;//Q-factor of the ckt
L=2*10^-6;//inductance expressed in H
Rs=1000;//source resistance in ohm
Ic=500*10^-6;//transister collector current in A
Vt=26*10^-3;//thermal voltage in V
hfe=200;
C_be=10*10^-12;//in pF
// refer to problem 5.4.1
Av=78;
Cm=47;
gm=Ic/Vt;
r_be=hfe/gm;
// The dynamic resistance of the tuned ckt is
RD1=Q*w0*L;
//The effective dynamic conductance is
RD1eff_1=(1/Rs)+(1/RD1)+(1/r_be);
RD1_eff=1/RD1eff_1
// Tha effective Q-factor is
Qeff=RD1_eff/(w0*L);
disp(Qeff,'The effective Q-factor is');
// The voltage gain refered to source is
Avs=RD1_eff*Av/Rs;
disp(Avs,'The voltage gain is');
|
ab08a7791316651e858f34892b0d24e552d41468
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/281/CH7/EX7.5/example7_5.sce
|
17e0fa80f03e67a8028edc827f56abdf4333fe86
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 635
|
sce
|
example7_5.sce
|
disp('chapter 7 ex7.5')
disp('given')
disp('Design a dead zone circuit using BIFET op-amp')
disp('voltage of 1volt to pass only in upper portion')
disp('peak voltage Vp=3volt')
Vp=3
disp('Vref=Vp-1')
Vref=Vp-1
disp('volts',Vref)
disp('Ir1min=Idmin=500*10^(-6)')
Ir1min=500*10^(-6)
disp('R1=Vref/Ir1min')
R1=Vref/Ir1min
disp('ohms',R1)
disp('use standard value R1=3.9kohm')
R1=3900
disp('R2=R3=R1=3.9kohm')
R2=3900
R3=3900
disp('R4=R1||R2||R3')
R4=R1*R2*R3/(R1*R2+R2*R3+R3*R1)
disp('ohms',R4)
disp('use 1.2kohm standard value')
disp('select the diodes as in ex7.1 and compensate the op-amp as a voltage follower')
|
dae5de6290d0b30165043f60d3be6cd3990764c3
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/615/CH3/EX3.9/3_9.sce
|
8c9feec8ddfcdf7069dc9ae08f9c0222a56b40ea
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 264
|
sce
|
3_9.sce
|
//chemical kinetics and catalysis//
//example 3.9//
k=6*10^-4;//rate constant of first order decomposition of N2O5 in CCl4 in /min//
k1=k/60;
printf("Rate constant in terms of seconds is %f/s",k1);
t=0.693/k;
printf("\nHalf life of the reaction is %fmin",t);
|
4acc9e7676dfcb7955d05cde498cc30157262fd7
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1865/CH4/EX4.5/prob_5.sce
|
6e5ce54ef5705b30fd71bf3c6de9c2ef4cebfaed
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 427
|
sce
|
prob_5.sce
|
//Problem 5
//Calculate the (1) the line frequency, (2) the bandwidth, (3) the coherence length
clear
clc
w=6058//wavelength (in A)
dw=0.00550//Doppler width (in A)
c=3*(10)^8//speed of light
f=c/(w*(10)^(-10))//the line frequency (in Hz)
df=(dw*f)/w//bandwidth (in Hz)
l=c/df//coherence length (in m)
printf('line frequency = %.f Hz \n',f)
printf('bandwidth = %.f Hz\n',df)
printf(' coherence length = %.f m' , l)
|
b66997cd37648892dead4da5f9ee40a10db2abec
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/995/CH1/EX1.20/Ex1_20.sce
|
b92f32e93ce844424ebfb419e7033ef1743c4fd4
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 118
|
sce
|
Ex1_20.sce
|
//Ex:1.20
clc;
clear;
close;
v=4;//in volts
r=100;//in ohms
p=(v^2)/r;
printf("Power dissipated = %f watts",p);
|
7e2522e213b3809b3e618ce4819e1f1055d953a7
|
a62e0da056102916ac0fe63d8475e3c4114f86b1
|
/set13/s_Introductory_Fluid_Mechanics_J._Katz_2783.zip/Introductory_Fluid_Mechanics_J._Katz_2783/CH10/EX10.1/Ex10_1.sce
|
903803f13f8ff70e7725514d707f0cf934a8f3de
|
[] |
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
| 203
|
sce
|
Ex10_1.sce
|
errcatch(-1,"stop");mode(2);
//initialization of new variables
T=300 //k
gama=1.4
R=286.6
//calculations
a=sqrt(gama*R*T)
//results
printf('The speed of sound in air is %.2f m/s',a)
exit();
|
ec91b61517dbc9019ef4f4694521d9bd3edb0ebb
|
60942a0ce55fe4c61fa78aebb849b3a352611edd
|
/higher order/fifthorderhigher.sci
|
e74a0397205528e98bb187d0f69991be36f0e97a
|
[] |
no_license
|
lalithDupathi/EIL-lab-IITB
|
7a7d3232368546b5cbc5d3aa32bf5d74fbc91c98
|
cac01a81a92e2d8444996a710325634a20b4b942
|
refs/heads/master
| 2022-08-22T23:42:48.202385
| 2017-10-17T16:27:26
| 2017-10-17T16:27:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 282
|
sci
|
fifthorderhigher.sci
|
function y=fifthorderhigher(a0,a1,a2,a3,a4,a5,b0,b1,b2,b3,b4,b5)
s=%s;
sysG=syslin('c',(((b5*s^5+b4*s^4+b3*s^3)+(b2*s^2)+(b1*s^1)+(b0))/((a5*s^5+a4*s^4+a3*s^3)+(a2*s^2)+(a1*s^1)+(a0))););
t= 0:0.01:10;
y=csim('impulse',t,sysG);
plot2d(t,y)
endfunction
|
03075c7a10bbd49fb3af439340c42c9b1e1d841c
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/260/CH3/EX3.17/3_17.sce
|
6f2dd870bb737da664c6cb27a5c2c761968e7a8a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 659
|
sce
|
3_17.sce
|
//Eg-3.17
//pg-114
clear
clc
A=[-3.5 1 1.5;1 4 -1;-2 -.6 -3.5];
B=[2.5;4;-16];
es=10^-5;
imax=10;
[r,c] = size(A)
n = r;
X=[0;0;0];
iter=1;
lambda=1;
while iter<imax//condition for termination
for i=1:n
summ=B(i);
pivot=A(i,i);
if pivot==0
error('gsie not applicable');//to avoid a/0 forms
end
old=X(i);
for j=1:n
if i~=j
summ=summ-A(i,j)*X(j);
end
end
X(i)=(lambda*summ/pivot)+(1-lambda)*old;//relaxation
end
iter=iter+1;
end
disp("Solution after 10 iterations")
disp(X)
|
134df6115d7cb8f87266ab3c8753a2b4c415aa70
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2252/CH21/EX21.1/Ex21_1.sce
|
68861da55a2e1eb289772cb1d5f7e0f20ad87da1
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 771
|
sce
|
Ex21_1.sce
|
//calculating speed
f=50//frequency
P=20//no. of poles
N=120*f/P
mprintf("Speed at which alternator must be run=%d rpm\n", N)
//calculating the generated emf per phase
x=180//total no. of slots
y=x/P//slots per pole
m=y/3//slots per pole per phase
alpha=180/9//phase displacement between adjacent slots
Kd=sin((m*alpha/2)*%pi/180)/(m*sin((alpha/2)*%pi/180))//distribution factor
Kc=1//coil span factor
Kw=Kd*Kc//winding factor
Z=180*8//total no. of conductors
a=Z/3//conductors per phase
T=a/2//turns per phase
phi=25D-3//flux per pole
Eph=round(4.44*Kw*f*phi*T)
mprintf("Generated emf per phase=%d V\n", Eph)
//calculating line emf
El=sqrt(3)*round(Eph)
mprintf("Line emf=%d V", round(El))
//answer vary from the textbook due to round off error
|
0b72234000c31904ffef3696e74b5242317a1cac
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/620/CH3/EX3.5/example3_5.sce
|
5be59d2dc0c623a8eec4772d6eccc8e2757b67ee
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 453
|
sce
|
example3_5.sce
|
v1=60;
i1=0.6;
r1=v1/i1;
disp("At point 1 the resistance of the lamp filament (in Ω) is"); disp(r1);
v2=120;
i2=0.8;
r2=v2/i2;
disp("At point 2 the resistance of the lamp filament (in Ω) is"); disp(r2);
disp("The curve does not obey Ohms law since a doubling of voltage from 60 V to 120 V does not result in a corresponding doubling of current. That is, the resistance is not constant-it increases at higher currents due to a heating effect");
|
6557687fc413ad075c8c00065976995369947213
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1109/CH13/EX13.12/13_12.sce
|
fd4bb2be55af4127ffebe31d8bfc0f091b70223d
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 299
|
sce
|
13_12.sce
|
clear;
clc;
Za=2;Zb=2.5;Zc=5;
Ya=1/Za;Yb=1/Zb;Yc=1/Zc;
Y1=(Ya*Yc)/(Ya+Yb+Yc);
Z1=1/Y1;
Y2=(Yb*Yc)/(Ya+Yb+Yc);
Z2=1/Y2;
Y3=(Ya*Yb)/(Ya+Yb+Yc);
Z3=1/Y3;
printf("The equivalent pi network is: \n");
printf(" Z1 = %f ohms\n",Z1);
printf(" Z2 = %f ohms\n",Z2);
printf(" Z3 = %f ohms\n",Z3);
|
81b140e7ffeeb69d944ae601f089e85e0ffee4fc
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2621/CH8/EX8.7/Ex8_7.sce
|
b52c9c566fe81a8547fbd3b65cf2561b944560c2
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 482
|
sce
|
Ex8_7.sce
|
// Example 8.7
clc;
clear;
close;
// Given data
format('v',6);
t= 0;
Vc= 0;// in volts
Vo= 5;// in volts
R= 10;// in 2 Ω (assume)
RC= 1;// (assume)
R3= 2*R;// in Ω
R2= 3*R;// in Ω
// From equation : T= 2*Rf*C*log[1+2*R3/R2]
T= 2*RC*log(1+2*R3/R2);
Vc_t= 2;// in volts
t= T/2;
//Voltage across capacitor,
// Vc_t= Vco*[1-%e^(-t/ReqC)]= 1/5*(VR+4*Vo)*[1-%e^(-t/4*RC/5)]
VR= Vc_t*5/[1-%e^(-t/(4*RC/5))]-4*Vo;
disp("The value of VR is : "+string(VR)+" volts")
|
c689007257d0a8bb844c92b799a12d2ecf8a482e
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/149/CH4/EX4.10/ques10.sce
|
604fbf59d5650c530f850a83a0adaf4759f87109
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,019
|
sce
|
ques10.sce
|
clc
disp(' y^(1/m)+y^-(1/m)=2x ');
disp(' OR y^(2/m)-2xy^(1/m)+1');
disp('OR y=[x+(x^2-1)]^m and y=[x-(x^2-1)]^m ');
syms x m
disp('For y=[x+(x^2-1)]^m ');
y=(x+(x^2-1))^m
disp('we have to prove (x^2-1)y(n+2)+(2n+1)xy(n+1)+(n^2-m^2)yn ') ;
//n=input('Enter the order of differentiation ");
disp('calculating yn for various values of n');
for n=1:4
//yn=diff(F,x,n)
F=(x^2-1)*diff(y,x,n+2)+(2*n+1)*x*diff(y,x,n+1)+(n^2-m^2)*diff(y,x,n);
disp(n);
disp('the expression for yn is ');
disp(F);
disp('Which is equal to 0 ');
end
disp('For y=[x-(x^2-1)]^m ');
y=(x-(x^2-1))^m
disp('we have to prove (x^2-1)y(n+2)+(2n+1)xy(n+1)+(n^2-m^2)yn ') ;
//n=input('Enter the order of differentiation ");
disp('calculating yn for various values of n');
for n=1:4
//yn=diff(F,x,n)
F=(x^2-1)*diff(y,x,n+2)+(2*n+1)*x*diff(y,x,n+1)+(n^2-m^2)*diff(y,x,n);
disp(n);
disp('the expression for yn is ');
disp(F);
disp('Which is equal to 0 ');
end
disp('Hence proved');
|
83a7f84a1c4157481c647d50832c34bbc0c0d3ee
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3281/CH1/EX1.4/ex1_4.sce
|
e662a453e6128c6c6a19ddda1104e1fb790c488a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 281
|
sce
|
ex1_4.sce
|
//Page Number: 14
//Example 1.4
clc;
//Given
c=3D+8; //m/s
z0=200;//ohm
zl=800;//ohm
f=30D+6;//hz
//Characterstic impedance
z00=sqrt(z0*zl);//ohm
disp('ohm',z00,'Characterstic impedance:');
//Length of line
lam=c/f;//m
l=lam/4;//m
disp('m',l,'Length of line:');
|
1808c1a9d6e6d1401c90c49595e4e4a868a07508
|
b513eb49824ff62ddd2289a920c92cfcb362d5f2
|
/magister/course_2/gerasimov/adaptive/Lab5/scilab/plot_graph.sce
|
0cbc78544496b776c271aa4ffeeb3d327800345d
|
[] |
no_license
|
kirillin/ifmo
|
6264ac42ec2031777145b39d4930f2f645e1d316
|
633919ba09d43814298c3a2145d5d6f72b5b068e
|
refs/heads/master
| 2021-01-12T09:32:27.270130
| 2018-11-18T12:17:46
| 2018-11-18T12:17:46
| 76,181,268
| 3
| 1
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,303
|
sce
|
plot_graph.sce
|
////<first_task>
////
//importXcosDiagram("/home/evgeniy/Рабочий стол/Учеба/Магистратура/Адаптивное и робастное управление/Lab5/scilab/for_output.zcos");
//xcos_simulate(scs_m, 4);
//plot2d(Y.time, [Y.values Y_lin.values]);
//legend("Выход модели ВСВ", "Выход регрессионной модели" ,4)
//a = gca();
//a.x_label.text = "$t\text{, с}$"
//a.x_label.font_size = 4;
//line2 = a.children(2).children(1);
//line2.thickness = 3;
//line2.foreground = 1;
//a.children(1).font_size = 2;
////
////<\first_task>
//<second_task>
//
importXcosDiagram("/home/evgeniy/Рабочий стол/Учеба/Магистратура/Адаптивное и робастное управление/Lab5/scilab/for_state.zcos");
xcos_simulate(scs_m, 4);
for i = 1:2
subplot(2,1,i)
plot2d(X.time, [X.values(:,i) X_lin.values(:,i)]);
legend("Модель ВСВ", "Наблюдатель" ,4)
a = gca();
a.x_label.text = "$t\text{, с}$"
a.x_label.font_size = 4;
str = "$x_{\small" + string(i)+ "}$"
a.y_label.text = str;
a.y_label.font_size = 4;
line2 = a.children(2).children(1);
line2.thickness = 3;
line2.foreground = 1;
a.children(1).font_size = 2;
end
//
//<\second_task>
|
813427c6abe9591115acf4d86c69930c802504fc
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2120/CH2/EX2.17/exa_2_17.sce
|
5e7a655510bba0232da7119e849e0bbd9c602138
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 309
|
sce
|
exa_2_17.sce
|
// Exa 2.17
clc;
clear;
close;
// Given data
u='196+0.718*t';
pv= '0.278*(t+273)';
duBydt= 0.718;
Cv= duBydt;// in kJ/kg-K
h= u+pv;
h='273.351+1.005*t';
dhBydt= 1.005;// in kJ/kg-K
Cp= dhBydt;// in kJ/kg-K
disp(Cv,"The value of Cv in kJ/kg-K is : ")
disp(Cp,"The value of Cp in kJ/kg-K is : ")
|
ea4a8c5c62296aa97fce4e9726b891feda10b705
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1850/CH6/EX6.12/exa_6_12.sce
|
17887b328f793af84d22e0871d913b9b07326b6b
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 429
|
sce
|
exa_6_12.sce
|
// Exa 6.12
clc;
clear;
close;
// Given Data
format('v',5)
fH= 200;// in Hz
fL= 2;// in kHz
fL=fL*10^3;// in Hz
C= 0.05;// in micro F
C=C*10^-6;// in F
R_desh= 1/(2*%pi*fH*C);// in ohm
R_desh=R_desh*10^-3;// in kohm
R= 1/(2*%pi*fL*C);// in ohm
R=R*10^-3;// in kohm
disp(R_desh,"Value of R_desh in kohm");
disp("Or 18 kohm (Standard value)")
disp(R,"Value of R in kohm");
disp("Or 1.8 kohm (Standard value)")
|
babe4d7297cabdd9d9397803d7109eebfe9aef43
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3176/CH3/EX3.3/Ex3_3.sce
|
ed8e2139cde180b7d4784d14673c70ec63d6672a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 986
|
sce
|
Ex3_3.sce
|
//Ex3_3
// Intensity Level Slicing
// Version : Scilab 5.4.1
// Operating System : Window-xp, Window-7
//Toolbox: Image Processing Design 8.3.1-1
//Toolbox: SIVP 0.5.3.1-2
//Reference book name : Digital Image Processing
//book author: Rafael C. Gonzalez and Richard E. Woods
clc;
close;
clear;
xdel(winsid())//to close all currently open figure(s).
gray=imread("Ex3_3.tif");
//gray=im2double(gray);
figure,ShowImage(gray,'Gray Image');
title('Original Image','color','blue','fontsize',4);
[M,N]=size(gray);
A=145;
B=245;
for i=1:M
for j=1:N
if(gray(i,j)>A & gray(i,j)<=B)
b(i,j)=255;
c(i,j)=255;
else
b(i,j)=0;
c(i,j)=gray(i,j);
end
end
end
figure,ShowImage(b,'Gray Image');
title('Image after Intensity Slicing transformation','color','blue','fontsize',4);
figure,ShowImage(c,'Gray Image');
title('Image after Intensity Slicing transformation(Linear)','color','blue','fontsize',4);
|
e01f7c1c84e40e351211f185d0cd6506c79a1db2
|
45c7d9d2836acbb24e1448b0e4248091a5f4a361
|
/gradient_pas_optimal.sci
|
9113c7b20911f8823e531fc798201f14731c937a
|
[] |
no_license
|
JingyiHU/Linear_Programming_Non_Linear_Programming_school_project
|
2fd582b0aefb3bee067ac444b32e5f9149615c97
|
971eeb3614268dfc704751b1b48b31d0f9925a69
|
refs/heads/master
| 2023-03-08T00:42:30.607241
| 2021-02-22T19:09:11
| 2021-02-22T19:09:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 447
|
sci
|
gradient_pas_optimal.sci
|
function [x,it]= Gradient_pas_optimal(A,b,rho,tol,itmax,x0)
// A CHANGER
it = 0;
x = x0;
d = b - A*x;
// while(it < itmax & norm(xn-x) > tol) do
while(it < itmax) do
xn = x + rho*d;
d = b - A*xn;
rho = (d'*d)/((A*d)'*d);
it = it + 1;
if norm(xn-x) < tol then return;end
x = xn;
end;
mprintf('Arret sur nombre maximum d''itérations %d',it)
endfunction
//norm(d)^2 = d'*d
|
248f4dd1ab563bbc413120596500bcde288f2b55
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3751/CH7/EX7.2/Ex7_2.sce
|
8f75a0621c7f7c5acd130d4285675ccec96b7616
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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
|
Ex7_2.sce
|
//Fluid Systems by Shiv Kumar
//Chapter 7 - Performance of water turbine
//Example 7.2
//To Find (a) Specific speed of turbine (b) Power Developed (c) Type of turbine
clc
clear
//Given:
H=28; //Head, m
N=225; //Speed, rpm
Q=10; //Discharge, cumec=m^3/s
eta_o=90/100; //Overall Efficiency
//Data Required
rho=1000 // Density of Water, Kg/m^3
g=9.81; // Acceleration due to gravity, m/ s^2
//Computations
P=eta_o*rho*Q*g*H/1000; //Power developed, KW
Ns=N*P^(1/2)/(H^(5/4)); // specific speed of turbine , in SI UNITS
//Result1
printf("(a)The Specific speed of Turbine = %.2f (SI Units)\n",Ns) //The Answer Vary due to Round off Error
printf("(b)Power developed =%.2f kW\n",P)
//To Determine the type of turbine, Result2
if Ns>51 & Ns<=255 then
printf("(c)The type of turbine is Francis.")
elseif Ns>=8.5 & Ns<=30 then
printf("(c)The type of turbine is Pelton Wheel with single jet.")
elseif Ns>30 & Ns<=51 then
printf("(c)The type of turbine is Pelton Wheel with multi jet.")
elseif Ns>255 & Ns<=860 then
printf("(c)The type of turbine is Kaplan or Propeller turbine.")
end
|
673a192e6e7cdfe1001e57b560a520cd88960be0
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1962/CH2/EX2.6/example2_6.sce
|
2b5636d78e6e1f41acec712f4ae12b19f75db922
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 319
|
sce
|
example2_6.sce
|
//example 2.6
//page 66
clc; funcprot(0);
//initialisation of variable
Gamma=9810;
ybar=5+0.5;
pi=3.14;
theta=90/180*pi;
Ig=pi*1^4/64;//moment of Inertia
A=pi*1^2/4;
F=Gamma*A*ybar;//force
hbar=ybar+Ig*(sin(theta))^2/A/ybar;//centroid
F1=F*(hbar-5);
disp(F1,"Force required to open the gate (N)");
clear
|
9bc6c0fbe621a41f0514ece1613db48dfcff08bf
|
897ce6a3fd5b682122c396af7e24fa53014c7cb3
|
/src_script/scilab/_import/rtsx_10/demo/rprdemo.sci
|
7edd19c88cadf37db084c8a0c51668d5a82e1471
|
[] |
no_license
|
stub22/glue-ai-v1_friendularity
|
e66f5ab357eba45de2def6f7900f414e358a4125
|
74949dc3e9b0d08b39857735aad901915e61322d
|
refs/heads/master
| 2022-12-19T18:57:01.336831
| 2017-08-04T12:55:12
| 2017-08-04T12:55:12
| 284,544,364
| 0
| 0
| null | 2020-10-14T00:08:14
| 2020-08-02T21:24:34
|
Java
|
UTF-8
|
Scilab
| false
| false
| 669
|
sci
|
rprdemo.sci
|
// rprdemo.sci building an RPR robot using RTSX
// www.controlsystemslab.com August 2012
function rprdemo()
printf("\nRPR Robot Demonstration\n");
printf("\nCreating robot model and joint variable sequence...\n");
exec('./models/mdl_ex1.sce',-1);
exec('./models/ex1_genqs2.sce',-1);
printf("\nSee PlotRobot( ) in window number 1\n");
PlotRobot(ex1_robot,q0,'figure',1);
printf("\nSee PlotRobotFrame( ) in window number 2\n");
PlotRobotFrame(ex1_robot,q0,'figure',2);
printf("\nSee AnimateRobot( ) in window number 3\n");
AnimateRobot(ex1_robot,qs,'figure',3);
printf("\n=========== End of RPR Robot Demonstration =======\n");
endfunction
|
d1e328fe9759c130d08f15b2030686c29a808820
|
1a50fe78c1413f8559b28861ace1767322e787bd
|
/macros/slr_strip_blanks.sci
|
9c51b3e2222e5ddbe0243025410dc01037e91e56
|
[] |
no_license
|
pivui/slr
|
105b6b4035974bd4e4b17283c98fa287627f5618
|
d10c2f46ee7563d0bd05bfea74408ba30aaf856b
|
refs/heads/master
| 2019-07-11T14:06:45.762247
| 2018-02-27T16:29:08
| 2018-02-27T16:29:08
| 91,713,612
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 236
|
sci
|
slr_strip_blanks.sci
|
//
function str = slr_strip_blanks(str)
// Removes any blanks character at the end and at the beginning of a string.
str = strsubst(str, '/(\\n{1,}|\s)*+$/', '', 'r')
str = strsubst(str, '/^(\\n{1,}|\s)*/', '','r')
endfunction
|
5e7a9a99af9ac272eb328baa5ca971af5241671c
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/884/CH5/EX5.4/Example5_4.sce
|
b2d8c91c36cf4ae1792527551353e36e919839b1
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 319
|
sce
|
Example5_4.sce
|
//Ideal Gas Equation
clear;
clc;
printf("\t Example 5.4\n");
m=7.4;//mass of NH3, g
//at STP for NH3 for 1mole of NH3
V1=22.41;// volume, L
NH3=17.03;//molar mass of NH3, g
n=m/NH3;//moles of NH3
V=n*V1;//volume, L
printf("\t the volume of NH3 under given conditions is : %4.2f L\n",V);
//End
|
5fb02d279f69af319fa21a5862b3b460eda547db
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/587/CH1/EX1.13/example1_13.sce
|
88d6c4fd6bad18d8069d5e0e99019d4f15c04554
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 651
|
sce
|
example1_13.sce
|
clear;
clc;
//Example1.13[Heating of a Plate by Solar Energy]
//Given:-
a=0.6;//absorptivity of exposed surface of plate
q_incident=700;//Rate at which solar radiation incident on the plate [W/m^2]
T_surr=25+273;//Surrounding air temperature[K]
h=50;//Combined radiation and convection heat transfer coefficient[W/m^2.K]
//Solution
//Temperature keeps on increasing till a point comes at which the rate of heat loss from the plate equals the rate of solar energy absorbed, and the temperature of the plate no longer changes
T_surface=T_surr+(a*(q_incident)/h);//[K]
disp("degree Celcius",T_surface-273,"The plate surface temperature is")
|
f9622ad68f93f8d3d39612082c72a0d6ff77b4f8
|
e04f3a1f9e98fd043a65910a1d4e52bdfff0d6e4
|
/New LSTMAttn Model/.data/form-split/DEVELOPMENT-LANGUAGES/oto-manguean/czn.tst
|
8f77c32c5ae1635291ddbda06d0f321fc34409fe
|
[] |
no_license
|
davidgu13/Lemma-vs-Form-Splits
|
c154f1c0c7b84ba5b325b17507012d41b9ad5cfe
|
3cce087f756420523f5a14234d02482452a7bfa5
|
refs/heads/master
| 2023-08-01T16:15:52.417307
| 2021-09-14T20:19:28
| 2021-09-14T20:19:28
| 395,023,433
| 3
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 4,619
|
tst
|
czn.tst
|
i-k-ikwą V;PFV
s-uwi¹ V;PROG
u-ka¹ti² V;PFV
u-la¹ti²ʔ V;HAB
ta²kwi V;PROG
xiti V;POT
u¹-ke²ʔ V;PROG
wi¹ʔi² V;HAB
ta¹a²ʔ V;PFV
a¹su²ʔ V;HAB
i-ty-ala¹ V;PFV
y-atą V;POT
lu²u¹ V;POT
tza² V;PFV
ka²ʔne¹ V;PROG
i¹-hni² V;POT
tuuʔ V;PFV
hu²ʔu¹ V;PFV
u¹-hni² V;POT
u-sa¹na² V;POT
katzǫ¹ V;PROG
u-tita¹ V;POT
u-s-a¹a²ʔ V;POT
u-te²e¹ʔ V;PROG
witi V;HAB
tyehna¹ V;HAB
yaʔne V;PROG
y-a¹lu² V;PROG
u²ti¹ V;POT
u-tzu V;PROG
y-u²kwa¹ʔ V;PFV
u-kaʔa V;POT
ta¹a² V;HAB
li²hi¹ V;PFV
u²ti¹ V;PFV
i-lyu²u¹ V;HAB
oʔǫ¹ V;PFV
tz-u¹kų²ʔ V;PFV
i¹ʔya² V;PROG
nee V;HAB
yu¹kwą² V;PFV
ala¹ V;HAB
u¹ra² V;PROG
nyą¹ʔ V;PROG
tza² V;PROG
u-sa¹na² V;HAB
oʔǫ¹ V;POT
la²kwi V;HAB
u-lakwa¹ V;PROG
sǫ² V;HAB
ka²ʔne¹ V;PFV
tiyaą V;HAB
yakwa V;PROG
y-aha¹ V;HAB
i-ki¹-hnya² V;PROG
y-u¹kwa² V;POT
i²chaa¹ V;POT
u-suʔu¹ V;PROG
i-ly-a²su V;HAB
u-ki¹į² V;POT
lala¹ V;PROG
i-lyu²u¹ V;POT
ukwą¹ V;HAB
u-tikwę V;POT
i-ni¹i² V;POT
yaʔne V;POT
lyaʔa¹ V;PFV
u-lukwa¹ V;PROG
y-atzu V;PFV
li²nto¹ V;POT
i-k-isu V;POT
yatę¹ V;PROG
y-aką¹ʔ V;POT
u²ne¹ V;PFV
yu¹kwą² V;HAB
wini V;POT
u¹-hlya² V;PROG
kalaʔ V;POT
u-hnya¹ʔ V;PFV
lala¹ V;PFV
u-ni¹tza²ʔ V;HAB
sesu V;PFV
u-nakǫʔ V;POT
tu²ʔu V;POT
ala¹ V;PROG
i¹-ty-e²ʔe V;HAB
ka¹ʔa² V;PFV
u-l-a²su¹ V;PFV
aʔna¹ V;PROG
yata V;PFV
u-s-atiʔ V;PROG
sana¹ V;POT
u-ʔne V;HAB
lya V;POT
a¹lu² V;HAB
itzu V;PFV
u-loʔo V;PROG
wi¹ʔi² V;POT
tza² V;POT
u-tikąʔ V;PROG
u-xu¹ʔu² V;PROG
u-ti¹te² V;PROG
yu¹kwą² V;PROG
ya¹a² V;HAB
u-s-atę¹ V;HAB
u¹-li¹hi² V;PFV
saʔą V;PFV
su¹ V;PFV
eʔe V;POT
na¹ʔa² V;PFV
u-ka¹ta² V;PFV
hiʔį¹ V;HAB
hya¹ V;PROG
u-ko¹ʔo² V;PROG
witi V;POT
u¹-tu²kwi V;PFV
suuʔ V;PFV
hu²ʔu¹ V;PROG
i-ch-ukwą¹ V;POT
u-suʔu¹ V;HAB
y-asu V;POT
u-tzu V;POT
u-ke¹la² V;PROG
su¹ V;HAB
ʔni V;POT
te¹tza² V;POT
u¹-so²ʔ V;PFV
y-u¹kwa² V;PFV
u-ne¹ʔe² V;PFV
u-tu¹su²ʔ V;HAB
y-asu V;PFV
u-la¹ʔa² V;PFV
yakwa V;HAB
u-sa¹na² V;PROG
ichi¹ V;PROG
tihi V;POT
u-ti¹kų² V;POT
yaą V;PFV
u-kachi¹ʔ V;POT
i¹-s-a²ta V;POT
tza¹ʔą² V;PROG
u-t-u¹ʔu² V;HAB
i-ty-alaʔ V;POT
s-uwi¹ V;POT
i-lyatza V;PFV
atiʔ V;POT
li²tiʔ V;HAB
u-xu¹ʔu² V;HAB
hnii V;HAB
xę² V;PFV
u¹la² V;PFV
u-ke¹la² V;POT
y-a²na¹ V;POT
toǫ V;PFV
ya²ʔą V;HAB
aa V;PROG
i-ni¹ʔi² V;PFV
oo¹ V;PROG
se²su V;PROG
u-ki¹į² V;HAB
i²kwą¹ V;HAB
kalaʔ V;HAB
u-hwi V;POT
a¹tzu²ʔ V;HAB
tu²ʔu V;PFV
tu¹kwa² V;PROG
tee¹ V;PFV
katzǫ¹ V;POT
u¹-x-i²ti V;HAB
ya¹a² V;POT
ti¹te² V;HAB
ki¹į² V;POT
y-asu V;HAB
y-atzu V;POT
ya¹ʔne² V;PFV
ta¹a² V;PROG
u-la¹ha² V;POT
y-uwi V;PROG
y-a²ta V;PFV
la¹la² V;PROG
u-ko¹ʔo² V;PFV
a¹lu² V;POT
ala¹ V;PFV
xę V;PFV
u-laʔa V;PROG
nyą¹ʔ V;POT
atzu V;POT
i-lyu²u¹ V;PFV
eta V;PFV
ya²ʔą¹ V;PROG
y-a¹ʔwe² V;PROG
t-a²ha¹ V;PFV
hnii V;PROG
tu²ʔya V;HAB
lakwi V;PROG
u¹-tu²we V;PROG
i-s-uwi¹ʔ V;PROG
ata V;PFV
i-tyotza V;HAB
i-s-e¹lu² V;PFV
sana¹ V;HAB
ti¹kų² V;PROG
t-uʔu V;PROG
u-s-a¹ʔwe² V;HAB
u-ti¹kų² V;PFV
kehę V;POT
u¹-ke²ʔ V;PFV
tita V;PROG
y-ukwą V;POT
nee V;PROG
u-t-a²ha¹ V;HAB
u-ko¹ʔo² V;HAB
u-t-ano V;PFV
anaʔ V;HAB
u-s-u²kwa¹ʔ V;PROG
u-l-a²su¹ V;PROG
u-kaʔa V;HAB
tza¹ʔą² V;HAB
y-a¹la² V;POT
hu²ų¹ V;PROG
ichi¹ V;HAB
y-atiʔ V;POT
i-tyunu V;PROG
u-ni¹tza²ʔ V;PFV
u-na¹kwą² V;HAB
u-hwi V;HAB
naa V;POT
yakwa¹ V;PROG
u¹-ke²ʔ V;POT
i-s-uweʔ V;PFV
nyaxęʔ V;HAB
i-xi¹-ką²ʔ V;PFV
hnaʔ V;POT
nyaxęʔ V;PROG
yaa V;HAB
u-sa¹ʔą² V;HAB
nakwą¹ V;PFV
u¹-kų² V;PFV
y-akę¹ V;PROG
ala V;PFV
u-tisa¹ʔ V;POT
u-li¹ti²ʔ V;PFV
kili V;HAB
ukwęʔ V;PROG
u¹-hna²ʔ V;HAB
hlya¹ V;HAB
i-lyaa V;POT
na¹a² V;HAB
u²ti¹ V;PROG
u-la¹ti²ʔ V;PFV
i-s-uwi¹ʔ V;HAB
lu²u¹ V;PFV
i-katzǫ¹ V;PFV
isę V;PFV
i-tyunu V;PFV
i-lyatza V;HAB
sę² V;HAB
u-so¹sa² V;PROG
ku¹na²ʔ V;POT
ti¹kų² V;HAB
i-s-e¹lu² V;HAB
lya V;HAB
ka¹ta² V;PFV
i-lyo¹o² V;PROG
y-atą V;PFV
lya V;PROG
u¹ra² V;HAB
u-katę¹ V;HAB
u¹-na²na V;PROG
i-tyaʔą V;PROG
ahi¹ V;HAB
u-tihi V;POT
u-s-ene¹ V;HAB
i-k-isu V;HAB
kachi¹ʔ V;PROG
u¹-ba²ʔa¹ V;HAB
u¹-li²nto V;HAB
su¹ V;POT
u-hnya¹ V;PROG
u-tzaʔ V;HAB
a¹ta²ʔ V;PFV
ta²su¹ V;POT
tzoʔo V;PROG
taʔą V;PFV
u-t-a²ha¹ V;POT
akwaʔ V;HAB
i-lyatza V;POT
laha V;PROG
u-xikwą V;POT
yee V;PROG
u-s-uweʔ V;PFV
ka¹ta² V;HAB
y-a²ha¹ V;POT
tya²na V;PFV
u-xi¹-ką²ʔ V;HAB
hnaʔ V;PFV
hiʔį¹ V;PFV
u-kachi¹ʔ V;PROG
hlya¹ V;POT
u-xiką V;PFV
s-uwi¹ V;PFV
i-ni¹i² V;HAB
sukwa¹ V;PROG
ya¹chi²ʔ V;PFV
y-u¹kų²ʔ V;PFV
|
ca8671ce4261b70e54778164f6779990a8e369ae
|
8217f7986187902617ad1bf89cb789618a90dd0a
|
/browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/fchamp.man.tst
|
cf5e8173040ec647d1270e84119c325765033521
|
[
"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
| 255
|
tst
|
fchamp.man.tst
|
clear;lines(0);
deff("[xdot] = derpol(t,x)",..
["xd1 = x(2)";..
"xd2 = -x(1) + (1 - x(1)**2)*x(2)";..
"xdot = [ xd1 ; xd2 ]"])
xf= -1:0.1:1;
yf= -1:0.1:1;
fchamp(derpol,0,xf,yf)
xbasc()
fchamp(derpol,0,xf,yf,1,[-2,-2,2,2],"011")
|
88d25732afacc4f7801562258340beb476e1a7ce
|
16f807178d75bf8f92b14bf909e62d286193cc13
|
/linearizingmodif.sce
|
b5f8bd0830b3bb5fafa3c76359641881257f1048
|
[] |
no_license
|
renzo-source/LABORATORIO-03-Linealizaci-n-num-rica-del-sistema-MoDiCA-X
|
11440801c8552f7f613fca0b05be21a8b6ccbab4
|
d6a990da1a41b86f726620c28c1af1da5d50c0d7
|
refs/heads/master
| 2022-12-04T17:48:33.145635
| 2020-08-16T04:13:16
| 2020-08-16T04:13:16
| 279,112,222
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 782
|
sce
|
linearizingmodif.sce
|
// linearizing.sce
// steps before
// 1. Open edsonj.m and execute from editor "Execute > file with echo".
// 2. Open edsonjXcosLincos.zcos run the simulation using "srtat" button.
// 3. Then run this file
// Search the SUPERBLOCK in Xcos
for i=1:length(scs_m.objs)
if typeof(scs_m.objs(i))=="Block" & scs_m.objs(i).gui=="SUPER_f" then
scs_m = scs_m.objs(i).model.rpar;
break;
end
end
// Set the equilibrium point, in this parto we use x=0 and theta=pi
X=[0.001;0.001;%pi;0.001];
U=[0.001];
// linearize the model
sys = lincos(scs_m,X,U);
// obtaingin the matrices A,B,C,D
A=sys.A
B=sys.B
C=sys.C
D=sys.D
// save the data
save("edsonjLTImodif.sod","X","U","sys")
// load the data
//load("edsonjLTI.sod","X","U","sys")
|
3c31c0464394e4021c3ea34e5d71503374a36bcd
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1184/CH8/EX8.3/Ex8_3.sce
|
f0ba0c97844eab9c8804678e048bcad2b580923c
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 219
|
sce
|
Ex8_3.sce
|
//Example 8-3, Page No - 259
clear
clc
f = 10*10^6
div_factor = 100
A =63
N = 285
M=32
ref = f/div_factor
R =M*N+A
fout= R*ref
printf('The output frequency of the synthesizer is %.1f Mhz',fout/10^6)
|
33fa3c1c658d3d9467ad9695fe72ad4f3de3da8e
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2522/CH19/EX19.4/exm19_4.sce
|
7091f2cd4314710680ea993b1e3af6793071f113
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 230
|
sce
|
exm19_4.sce
|
// page no 625
// example no A.4
// 2's COMPLIMENT OF BINARY NUMBER
clc;
printf('Given binary no= 00011100 \n \n');
str='00011100'
d=bin2dec(str);
x=bitcmp(d,8);
s=x+1;
y=dec2bin(s);
printf('2s complement=');
disp(y);
|
b45d75028c1a306504e083f59275f718c24da125
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/122/CH6/EX6.9.1/exa6_9_1.sce
|
40f5daade91d67a4a5bb14553b5fcce030796bbc
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,689
|
sce
|
exa6_9_1.sce
|
// Example 6-9-1
// Design of a lag lead compensator using root locus 2
// gamma = beta case
clear; clc;
xdel(winsid()); //close all windows
// please edit the path
// cd "/<your code directory>/";
// exec("rootl.sci");
s = %s;
G = syslin('c',4 , s * (s + 0.5)); //open loop system
Kv = 80; // desired velocity constant
wn = 5; // desired natural frequency and damping
_zeta = 0.5;
sigma = -1*wn * _zeta;
wd = wn * sqrt(1 - _zeta^2);
dp = sigma + %i*wd; // desired closed loop poles
disp(roots(G.den + 4),'Closed loop poles (uncompensated)=');
disp(horner(s*G,0),'Kv (uncompensated system = ');
rootl(G,[-5 -2; 1 2],'Uncompensated system');
xgrid(color('gray'));
plot([sigma sigma],[wd -wd],'x');
xstring(sigma,wd,'Desired CL poles');
// Designing Lead Part
Kc = Kv / horner(s*G,0); disp(Kc,'Kc = ');
z1 = 2.38; //z1 and p1 determinded graphically
p1 = 8.34;
T1 = 1 / z1; disp(T1,'T1');
_beta = T1 * p1; disp(_beta,'beta =');
Gc1 =Kc * (s + z1)/(s + p1); disp(Gc1,'Lead compensator Gc1 =');
// Lag compensator design
T2 = 10; //say
z2 = 1 / T2; p2 = z2 / _beta;
Gc2 = (s + z2)/(s + p2);
disp(Gc2,'Lag compensator Gc2 =');
disp(abs(horner(Gc2,dp)),'magnitude contribution of lag part =');
disp(phasemag(horner(Gc2,dp)),'angle contribution of lag part =');
// these are acceptable
Gc = Gc1*Gc2;
disp(Gc,'final lag lead controller = ');
scf()
rootl(Gc*G,[-5 -2; 1 2],'Compensated system');
xgrid(color('gray'));
plot([sigma sigma],[wd -wd],'x');
C = Gc*G /. 1;
disp(C,'closed loop system =');
disp(roots(C.den),'closed loop poles = ');
disp(horner(s*Gc*G,0),'velocity error constant Kv =')
disp(dp,'desired poles =');
|
461ed3bb9612e61acfbd272085dfc9fa6291240c
|
a32457bc76e1a5fe9898d7f84b937381d3bcb80d
|
/experiment7.sce
|
fbf7e1febf52b0c9c7ab07a705502b78d11a057b
|
[] |
no_license
|
kunalsparkx10/signal-and-systems
|
90d80c4b279b3c44ddd328fbf088ddbbc1ca9b5f
|
97164f97bd59b1d8b302efeab6a7f6a2640c0a57
|
refs/heads/main
| 2023-01-14T10:44:22.315838
| 2020-11-25T18:24:57
| 2020-11-25T18:24:57
| 316,021,693
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 857
|
sce
|
experiment7.sce
|
//part-1
clc;
j=sqrt(-1)
x_mag1=[];
x_phase1=[];
w1=[w1 w];
x=1/(1-0.5*exp(-j*w))
for w=-2*%pi:0.01:2*%pi
x_mag=abs(x);
x_phase=phasemag(x)
x_mag1=[x_mag1 x_mag]
x_phase1=[x_phase1 x_phase];
w1=[w1 w]
end
plot(w1,x_mag1)
figure;
plot(w1,x_phase1)
//part-2
clc;
j=sqrt(-1)
h_mag1=[]
w1=[]
h_phase1=[]
for w=-2*%pi:0.01:2*%pi
h=1/(1+0.2*exp(-j*w));
h_mag=abs(h);
h_phase=phasemag(h)
h_mag1=[h_mag1 h_mag]
h_phase1=[h_phase1 h_phase];
w1=[w1 w]
end
plot(w1,h_mag1)
//W=0 then H=1/(1+0.2)=1/1.2=0.833
figure;
plot(w1,h_phase1)
//part-3
//find the z transform of a simple sequence
function[za]=ztransfer(seq,n)
z=poly(0,'z','r')
za=seq*(1/z)^n'
endfunction
// -6 to 2
x1=[2 -1 3 2 1 0 2 3 -1]
n= -6:2
zz=ztransfer(x1,n)
//Roc of the above sequence
|
992edde1ad7a4b4311df653f330629c74605e4eb
|
f4d3c7f7e8954cdeb6eb0c7b54a056242b07da22
|
/BCPST Vaisseau/Vaisseau.sce
|
d6162f3570fba09a7b3ac59cc6a9ac5417c12884
|
[] |
no_license
|
ThibaultLatrille/Slides-Sciencework
|
bfdf959dbbe4a94e621a3a9a71ccbcd06c5fc338
|
84b53f3901cbdb10fab930e832dc75431a7dce05
|
refs/heads/master
| 2020-04-27T07:53:52.313720
| 2019-03-06T16:17:57
| 2019-03-06T16:17:57
| 174,151,758
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 731
|
sce
|
Vaisseau.sce
|
exec('C:\Users\Thibault\Desktop\Vaisseau\triangle.sci')
exec('C:\Users\Thibault\Desktop\Vaisseau\choixpseudo.sci')
pseudo="Jack";
couleur=5;
f=figure();
time=uicontrol("BackgroundColor",[0.20,0.56,0.12],"String", "Nouveau jeu", "Position", [10 10 110, 25], "Callback", "newgame(pseudo,couleur)");
pseudo=uicontrol("BackgroundColor",[0.80,0.45,0.05],"String", "Choix du pseudo", "Position", [130 10 100, 25],"Callback", "choixpseudo()");
couleur=uicontrol("BackgroundColor",[0.12,0.45,0.77],"String", "Couleur du vaisseau", "Position", [240 10 125, 25], "Callback", "choixcouleur()");
uicontrol("BackgroundColor",[0.85,0.05,0.05],"String", "Quitter", "Position", [375 10 100, 25], "Callback", "delete(gcf())");
|
a440a3fc60c1f5a62ed8f8e873c9a3432be37836
|
e4fb5d5b74926250f6730bfa3995e52ea55e4dc4
|
/examples/toy_model_10u/toy_model_10u_1.tst
|
b7f8efb288151d08b3d164209f89ab1cd1d1ecb2
|
[
"BSD-2-Clause"
] |
permissive
|
maxvonhippel/S3CAMX
|
7629225410eaae455148e7ec0512c9575829b17c
|
03f63f84e6e1e18598edff52a901f669c2fee342
|
refs/heads/master
| 2022-12-07T09:44:14.519479
| 2016-06-21T05:21:27
| 2016-06-21T05:21:27
| 292,167,603
| 0
| 0
| null | 2020-09-02T03:20:25
| 2020-09-02T03:20:24
| null |
UTF-8
|
Scilab
| false
| false
| 2,239
|
tst
|
toy_model_10u_1.tst
|
import toy_instance
# sampling time
delta_t = 1.0
#benchmark_id = int(raw_input('Enter toy benchmark id: '))
benchmark_id = 1
# pvt simulator state required for initializing the simulator
plant_pvt_init_data = benchmark_id
#############################
# P1: Property Description
#############################
# Time Horizon
T = 2.0
initial_set, error_set, ci = toy_instance.select(benchmark_id)
############################
# Results Scratchpad:
# ##########################
# vio = _/100k took _ mins [plotting, logging?]
# SS = falsified in _ [plotting, logging?]
# grid_eps = <[0.0, 0.0]>
# num_samples = <2>
# SS + symex: falsified in _ [plotting, logging?]
########################
# Abstraction Params
########################
# initial abstraction grid size
grid_eps = [1.0, 1.0, 1.0, 1.0]
pi_grid_eps = []
# number of samples at every scatter step
#num_samples = 1 # symex
num_samples = 100 # ss-concrete
# maximum iteration before SS iter outs.
MAX_ITER = 5
min_smt_sample_dist = 0.05
########################
# initial controller states which are C ints
initial_controller_integer_state = []
# initial controller states which are C doubles
initial_controller_float_state = []
# number of control inputs to the plant
num_control_inputs = 1
################################
# Unimplemented
################################
# Initial plant discrete state: List all states
initial_discrete_state = []
# Rectangularly bounded exogenous inputs to the plant (plant noise).
pi = [[], []]
# Initial pvt simulator state, associated with with an execution trace.
initial_pvt_states = []
################################
################
# Simulators
################
## Plant ##
# is the plant simulator implemented in Python(python) or Matlab(matlab)?
plant_description = 'python'
# relative/absolute path for the simulator file containing sim()
plant_path = 'toy_model_10u_plant.py'
## Controller ##
# relative/absolute path for the controller .so
controller_path = 'toy_model_10u_controller.so'
# relative path for the directory containing smt2 files for each path
controller_path_dir_path = './paths'
###############
################
# DO NOT MODIFY
################
CONVERSION_FACTOR = 1.0
refinement_factor = 2.0
|
ea18debfca04463fa1611c934882367c4786efce
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3638/CH14/EX14.1/Ex14_1.sce
|
0fe0c03821548f228d6437e39cd979d45a60a65a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,134
|
sce
|
Ex14_1.sce
|
//Introduction to Fiber Optics by A. Ghatak and K. Thyagarajan, Cambridge, New Delhi, 1999
//Example 14.1
//OS=Windows XP sp3
//Scilab version 5.5.2
clc;
clear;
//given
lambda=980e-9;//Operating wavelength in m
Sigmapa=3.1e-25;//Absorption cross section at pump in m^2
tsp=12e-3;//spontaneous emission lifetime in sec
h=6.626e-34;//Planck's constant in SI Units
c=3e8;//speed of electrons in m/s
v=c/lambda;//frequency corresponding to given wavelength in Hz
Ip0=h*v/(Sigmapa*tsp);//Intensity at pump in W/(m^2)
mprintf("\n Ip0=%e W/(m^2)",Ip0)//The answers vary due to round off error
//Case (i)
lambdas=1536e-9;//Wavelength of signal used
Sigmasa=4.644e-25;//Absorption cross section at signal in m^2
Sigmase=4.644e-25;//Emission cross section at signal in m^2
etas=Sigmase/Sigmasa;//Ratio of emission to absorption cross sections
mprintf("\n\n For a signal wavelength of 1536 nm:");
Ipt=Ip0/etas;//Threshold pump intensity in W/(m^2)
mprintf("\n Threshold pump intensity = %.2e W/(m^2)",Ipt);//The answers vary due to round off error
vs=c/lambdas;//frequency corresponding to wavelength of signal used
Is0=h*vs/((Sigmasa+Sigmase)*tsp);//Corresponding intensity at signal in W/(m^2)
mprintf("\n Is0=%.2e W/(m^2)",Is0);//The answers vary due to round off error
//Case (ii)
lambdas=1550e-9;//Wavelength of signal used
Sigmasa=2.545e-25;//Absorption cross section at signal in m^2
Sigmase=3.410e-25;//Emission cross section at signal in m^2
etas=Sigmase/Sigmasa;//Ratio of emission to absorption cross sections
mprintf("\n\n For a signal wavelength of 1550 nm:");
Ipt=Ip0/etas;//Threshold pump intensity in W/(m^2)
mprintf("\n Threshold pump intensity = %.2e W/(m^2)",Ipt);
//Case (iii)
lambdas=15380e-9;//Wavelength of signal used
Sigmasa=0.654e-25;//Absorption cross section at signal in m^2
Sigmase=1.133e-25;//Emission cross section at signal in m^2
etas=Sigmase/Sigmasa;//Ratio of emission to absorption cross sections
mprintf("\n\n For a signal wavelength of 1580 nm:");
Ipt=Ip0/etas;//Threshold pump intensity in W/(m^2)
mprintf("\n Threshold pump intensity = %.2e W/(m^2)",Ipt);
|
af0b4e6863663df3a90c1614c7b497e418089d7e
|
9bc415d58bf063a1bca303fea640e644333dbdbd
|
/Scilab/Sinais_e_Sistemas/calc_Hs.sci
|
ba84ea8bfe98dacdd5001d337b011528abeaef2e
|
[] |
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
| 348
|
sci
|
calc_Hs.sci
|
function [H,f]=calc_Hs(Hs,fs,N)
//[H,f]=frmag(Hz,N)
a=coeff(Hs(2))
b=coeff(Hs(3))
npolos=length(b)-1
nzeros=length(a)-1
f=linspace(0,fs/2,N);
s=2*%i*%pi*f;
for n=1:N
num=0;
den=0;
for p=0:npolos
den=den+b(p+1)*s(n)^p;
end
for p=0:nzeros
num=num+a(p+1)*s(n)^p;
end
H(n)= num/den;
end
endfunction
|
33c86d40ff12251f788d893e2b896e369a22cf21
|
786b8b062cc8e4ad6a2a39294d02777c4ec4cb78
|
/FreeEDA/LPCSim/LPCSim/buildMatricesSymbolic.sci
|
3639e65c5c638c80acad713aca555c7a3f28c5e0
|
[] |
no_license
|
FOSSEE/FreeEDA
|
fc379b9927e63f0b29e66f69284beddff07d43c8
|
0c9f3b3885338be0420773ac2007d8ac54aa7412
|
refs/heads/master
| 2021-01-18T15:16:58.922680
| 2014-12-09T10:59:41
| 2014-12-09T10:59:41
| 23,788,370
| 6
| 3
| null | 2014-09-26T09:05:17
| 2014-09-08T11:29:52
|
Python
|
UTF-8
|
Scilab
| false
| false
| 25,551
|
sci
|
buildMatricesSymbolic.sci
|
// buildMatricesSymbolic.sci is a scilab file to build equations of the circuit symbolically. It is developed for a scilab based circuit simulator. It is written by Yogesh Dilip Save (yogessave@gmail.com).
// Copyright (C) 2012 Yogesh Dilip Save
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// It is modified by Yogesh Dilip Save for FreeEDA Software on October 2012
warning('off');
function [A,B,D,C,x,fx]=buildMatricesSymbolic(_T)
// Create Matrice A, D, C and vector b corresponding to circuit equation
global g;
global('model')
Nodes=node_number(g);
Edges=edge_number(g);
A = emptystr(Nodes-1+_T,Nodes-1+_T);
D = emptystr(Nodes-1+_T,length(model));
C = emptystr(Nodes-1+_T,Nodes-1+_T);
B = emptystr(Nodes-1+_T,1);
x = emptystr(Nodes-1+_T,1);
fx = emptystr(length(model),1);
_T=1;
X=1;
controlledSourceFlag=%F
for i=1:Nodes-1,
x(i,1)="v_"+ msprintf("%d",i)
end
for edge_cnt = 1:edge_number(g),
if(controlledSourceFlag)
controlledSourceFlag=%F
continue
end
source=g.edges.tail(edge_cnt)-1;
sink=g.edges.head(edge_cnt)-1;
value=g.edges.data.devName(edge_cnt);
select (g.edges.data.type(edge_cnt))
case 'R' then // Resistor
if(~(source==0))
A(source,source) = A(source,source) + "+"+ value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) +"+"+ value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) +"-"+ value;
A(sink,source) = A(sink,source) +"-"+ value;
end
case 'I' then // Current source
if(sscanf(value, "%c")=='I')
if(~(source==0))
B(source) = B(source)+"-"+value;
end
if(~(sink==0))
B(sink) =B(sink) +"+"+ value;
end
end
case 'V' then // Voltage source
if(~(source==0))
A(Nodes-1+_T,source) = "1";
A(source,Nodes-1+_T) = "1";
end
if(~(sink==0))
A(Nodes-1+_T,sink) = "-1";
A(sink,Nodes-1+_T) = "-1";
end
B(Nodes-1+_T) = value;
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
case 'C' then // Capacitor
if(~(source==0))
C(source,source) = C(source,source) +"+"+ value;
end
if(~(sink==0))
C(sink,sink) = C(sink,sink) +" + "+ value;
end
if(~(sink==0) & ~(source==0))
C(source,sink) = C(source,sink) +"-"+value;
C(sink,source) = C(sink,source) +"-"+value;
end
case 'D' then // Diode
if(~(source==0))
D(source,X) = value+"_f";
end
if(~(sink==0))
D(sink,X) = "-"+ value+"_f";
end
if(source==0)
fx(X)="(v_"+string(sink)+")";
elseif(sink==0)
fx(X)="(v_"+string(source)+")";
else
fx(X)="(v_"+string(source)+",v_"+string(sink)+")";
end
X=X+1;
case 'G' then // Voltage controlled current source
if(~(source==0))
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(source,g.edges.tail(edge_cnt+1)-1) = A(source,g.edges.tail(edge_cnt+1)-1) +"+"+ convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(source,g.edges.head(edge_cnt+1)-1) = A(source,g.edges.head(edge_cnt+1)-1) +"-"+ convstr(value,'l');
end
end
if(~(sink==0))
if(~(g.edges.tail(edge_cnt+1)==1))
A(sink,g.edges.tail(edge_cnt+1)-1) = A(sink,g.edges.tail(edge_cnt+1)-1) +"-"+ convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(sink,g.edges.head(edge_cnt+1)-1) = A(sink,g.edges.head(edge_cnt+1)-1) +"+"+ convstr(value,'l');
end
end
controlledSourceFlag=%T
case 'E' then // Voltage controlled voltage source
if(~(source==0))
A(source,Nodes-1+_T) = "1";
A(Nodes-1+_T,source) = "1";
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.tail(edge_cnt+1)-1) = convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)==1))
A(Nodes-1+_T,g.edges.head(edge_cnt+1)-1) = "-"+convstr(value,'l');
end
end
if(~(sink==0))
A(sink,Nodes-1+_T) = "-1";
A(Nodes-1+_T,sink) = "-1";
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.tail(edge_cnt+1)-1) = "-"+convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.head(edge_cnt+1)-1) = convstr(value,'l');
end
end
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
controlledSourceFlag=%T
case 'F' then // Current controlled current source
A(Nodes-1+_T,Nodes-1+_T) = 1;
A(Nodes-1+_T,Nodes-1+_T-1) = "-"+convstr(value,'l');
if(~(source==0))
A(source,Nodes-1+_T) = 1;
end
if(~(sink==0))
A(sink,Nodes-1+_T) = -1;
end
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
case 'H' then // Current controlled voltage source
A(Nodes-1+_T,Nodes-1+_T-1) = "-"+convstr(value,'l');
if(~(source==0))
A(source,Nodes-1+_T) = "1";
A(Nodes-1+_T,source) = "1";
end
if(~(sink==0))
A(sink,Nodes-1+_T) = "-1";
A(Nodes-1+_T,sink) = "-1";
end
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
case 'M' then // MOSFET
if(~(source==0))
A(source,source) = A(source,source) + value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) + value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) - value;
A(sink,source) = A(sink,source) - value;
end
case 'X' then // User defined component
if(~(source==0))
A(source,source) = A(source,source) +" + "+ value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) +" + "+ value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) +" - "+value;
A(sink,source) = A(sink,source) +" - "+value;
end
else
exit(0);
end
end
_T=_T-1;
firstValue=%T
mprintf("-----------------------------------------------------------\n");
mprintf("System of Equations representing the electrical circuit:\n");
mprintf("-----------------------------------------------------------\n");
// Fill zero entries
for i=1:Nodes-1+_T,
mprintf("\n ");
for j=1:Nodes-1+_T,
if(length(A(i,j))==0)
A(i,j)="0";
elseif(sscanf(A(i,j), "%c")=='+')
tempstr=strsplit(A(i,j),1);
A(i,j)=tempstr(2);
if firstValue then
if ~(strcmp(A(i,j),'1')) then
mprintf("%s",x(j));
else
mprintf("(%s)%s",A(i,j),x(j));
end
firstValue=%F;
else
if ~(strcmp(A(i,j),'1')) then
mprintf(" + %s",x(j));
else
mprintf(" + (%s)%s",A(i,j),x(j));
end
end
else
if firstValue then
if ~(strcmp(A(i,j),'1')) then
mprintf("%s",x(j));
else
mprintf("(%s)%s",A(i,j),x(j));
end
firstValue=%F;
else
if ~(strcmp(A(i,j),'1')) then
mprintf(" + %s",x(j));
else
mprintf(" + (%s)%s",A(i,j),x(j));
end
end
end
if(length(C(i,j))==0)
C(i,j)="0";
elseif(sscanf(C(i,j), "%c")=='+')
tempstr=strsplit(C(i,j),1);
C(i,j)=tempstr(2);
if firstValue then
mprintf("(%s)d%s/dt",C(i,j),x(j));
firstValue=%F;
else
mprintf(" + (%s)d%s/dt",C(i,j),x(j));
end
else
if firstValue then
mprintf("(%s)d%s/dt",C(i,j),x(j));
firstValue=%F;
else
mprintf(" + (%s)d%s/dt",C(i,j),x(j));
end
end
end
for j=1:length(model),
if(length(D(i,j))==0)
D(i,j)="0";
elseif(firstValue)
mprintf("%s%s",D(i,j),fx(j));
firstValue=%F;
else
mprintf(" + %s%s",D(i,j),fx(j));
end
end
if(length(B(i,1))==0)
B(i,1)="0";
elseif(sscanf(B(i,1), "%c")=='+')
tempstr=strsplit(B(i,1),1);
B(i,1)=tempstr(2);
end
mprintf(" = %s\n",B(i,1));
firstValue=%T
end
global('NLFlag');
if NLFlag then
mprintf("-----------------------------------------------------------\n");
mprintf(" Dn_f(v_a,v_b)=Is_n(1-e^((v_a-v_b)/vt_n))\n where Is_n=reverse saturation current and vt_n=threshold voltage of diode n\n")
end
mprintf("-----------------------------------------------------------\n");
endfunction
function [A,B,D,x,fx]=buildMatricesSymbStatic(_T)
global('currentAnalysis');
// Create Matrice A, D, C and vector b corresponding to circuit equation
global g;
global('model')
Nodes=node_number(g);
Edges=edge_number(g);
A = emptystr(Nodes-1+_T,Nodes-1+_T);
D = emptystr(Nodes-1+_T,length(model));
B = emptystr(Nodes-1+_T,1);
x = emptystr(Nodes-1+_T,1);
fx = emptystr(length(model),1);
_T=1;
X=1;
controlledSourceFlag=%F
for i=1:Nodes-1,
x(i,1)="v_"+ msprintf("%d",i)
end
for edge_cnt = 1:edge_number(g),
if(controlledSourceFlag)
controlledSourceFlag=%F
continue
end
source=g.edges.tail(edge_cnt)-1;
sink=g.edges.head(edge_cnt)-1;
value=g.edges.data.devName(edge_cnt);
select (g.edges.data.type(edge_cnt))
case 'R' then // Resistor
if(~(source==0))
A(source,source) = A(source,source) + "+"+ value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) +"+"+ value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) +"-"+ value;
A(sink,source) = A(sink,source) +"-"+ value;
end
case 'I' then // Current source
if(sscanf(value, "%c")=='I')
if(~(source==0))
B(source) = B(source)+"-"+value;
end
if(~(sink==0))
B(sink) =B(sink) +"+"+ value;
end
elseif((sscanf(value, "%c")=='C') & currentAnalysis)
if(~(source==0))
B(source) = B(source)+"-i_"+value;
end
if(~(sink==0))
B(sink) =B(sink) +"+i_"+ value;
end
end
case 'V' then // Voltage source
if(~(source==0))
A(Nodes-1+_T,source) = "1";
A(source,Nodes-1+_T) = "1";
end
if(~(sink==0))
A(Nodes-1+_T,sink) = "-1";
A(sink,Nodes-1+_T) = "-1";
end
B(Nodes-1+_T) = value;
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
case 'C' then // Capacitor
if currentAnalysis then
if(~(source==0))
A(source,source) = A(source,source) +"+R_"+ value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) +"+R_"+ value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) +"-R_"+value;
A(sink,source) = A(sink,source) +"-R_"+value;
end
end
case 'D' then // Diode
if(~(source==0))
D(source,X) = value+"_f";
end
if(~(sink==0))
D(sink,X) = "-"+ value+"_f";
end
if(source==0)
fx(X)="(v_"+string(sink)+")";
elseif(sink==0)
fx(X)="(v_"+string(source)+")";
else
fx(X)="(v_"+string(source)+",v_"+string(sink)+")";
end
X=X+1;
case 'G' then // Voltage controlled current source
if(~(source==0))
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(source,g.edges.tail(edge_cnt+1)-1) = A(source,g.edges.tail(edge_cnt+1)-1) +"+"+ convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(source,g.edges.head(edge_cnt+1)-1) = A(source,g.edges.head(edge_cnt+1)-1) +"-"+ convstr(value,'l');
end
end
if(~(sink==0))
if(~(g.edges.tail(edge_cnt+1)==1))
A(sink,g.edges.tail(edge_cnt+1)-1) = A(sink,g.edges.tail(edge_cnt+1)-1) +"-"+ convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(sink,g.edges.head(edge_cnt+1)-1) = A(sink,g.edges.head(edge_cnt+1)-1) +"+"+ convstr(value,'l');
end
end
controlledSourceFlag=%T
case 'E' then // Voltage controlled voltage source
if(~(source==0))
A(source,Nodes-1+_T) = "1";
A(Nodes-1+_T,source) = "1";
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.tail(edge_cnt+1)-1) = convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)==1))
A(Nodes-1+_T,g.edges.head(edge_cnt+1)-1) = "-"+convstr(value,'l');
end
end
if(~(sink==0))
A(sink,Nodes-1+_T) = "-1";
A(Nodes-1+_T,sink) = "-1";
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.tail(edge_cnt+1)-1) = "-"+convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.head(edge_cnt+1)-1) = convstr(value,'l');
end
end
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
controlledSourceFlag=%T
case 'F' then // Current controlled current source
A(Nodes-1+_T,Nodes-1+_T) = 1;
A(Nodes-1+_T,Nodes-1+_T-1) = "-"+convstr(value,'l');
if(~(source==0))
A(source,Nodes-1+_T) = 1;
end
if(~(sink==0))
A(sink,Nodes-1+_T) = -1;
end
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
case 'H' then // Current controlled voltage source
A(Nodes-1+_T,Nodes-1+_T-1) = "-"+convstr(value,'l');
if(~(source==0))
A(source,Nodes-1+_T) = "1";
A(Nodes-1+_T,source) = "1";
end
if(~(sink==0))
A(sink,Nodes-1+_T) = "-1";
A(Nodes-1+_T,sink) = "-1";
end
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
case 'M' then // MOSFET
if(~(source==0))
A(source,source) = A(source,source) + value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) + value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) - value;
A(sink,source) = A(sink,source) - value;
end
case 'X' then // User defined component
if(~(source==0))
A(source,source) = A(source,source) +" + "+ value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) +" + "+ value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) +" - "+value;
A(sink,source) = A(sink,source) +" - "+value;
end
else
exit(0);
end
end
_T=_T-1;
firstValue=%T
mprintf("-----------------------------------------------------------\n");
mprintf("System of Equations representing the electrical circuit:\n");
mprintf("-----------------------------------------------------------\n");
// Fill zero entries
for i=1:Nodes-1+_T,
mprintf("\n ");
for j=1:Nodes-1+_T,
if(length(A(i,j))==0)
A(i,j)="0";
elseif(sscanf(A(i,j), "%c")=='+')
tempstr=strsplit(A(i,j),1);
A(i,j)=tempstr(2);
if firstValue then
if ~(strcmp(A(i,j),'1')) then
mprintf("%s",x(j));
else
mprintf("(%s)%s",A(i,j),x(j));
end
firstValue=%F;
else
if ~(strcmp(A(i,j),'1')) then
mprintf(" + %s",x(j));
else
mprintf(" + (%s)%s",A(i,j),x(j));
end
end
else
if firstValue then
if ~(strcmp(A(i,j),'1')) then
mprintf("%s",x(j));
else
mprintf("(%s)%s",A(i,j),x(j));
end
firstValue=%F;
else
if ~(strcmp(A(i,j),'1')) then
mprintf(" + %s",x(j));
else
mprintf(" + (%s)%s",A(i,j),x(j));
end
end
end
end
for j=1:length(model),
if(length(D(i,j))==0)
D(i,j)="0";
elseif(firstValue)
mprintf("%s%s",D(i,j),fx(j));
firstValue=%F;
else
mprintf(" + %s%s",D(i,j),fx(j));
end
end
if(length(B(i,1))==0)
B(i,1)="0";
elseif(sscanf(B(i,1), "%c")=='+')
tempstr=strsplit(B(i,1),1);
B(i,1)=tempstr(2);
end
mprintf(" = %s\n",B(i,1));
firstValue=%T
end
if NLFlag then
mprintf("-----------------------------------------------------------\n");
mprintf(" Dn_f(v_a,v_b)=Is_n(1-e^((v_a-v_b)/vt_n))\n where Is_n=reverse saturation current and vt_n=threshold voltage of diode n\n")
end
mprintf("-----------------------------------------------------------\n");
endfunction
function [A,B,C,x]=buildMatricesSymbLin(_T)
// Create Matrice A, D, C and vector b corresponding to circuit equation
global g;
global('currentAnalysis');
Nodes=node_number(g);
A = emptystr(Nodes-1+_T,Nodes-1+_T);
C = emptystr(Nodes-1+_T,Nodes-1+_T);
B = emptystr(Nodes-1+_T,1);
x = emptystr(Nodes-1+_T,1);
_T=1;
controlledSourceFlag=%F
for i=1:Nodes-1,
x(i,1)="v_"+ msprintf("%d",i)
end
for edge_cnt = 1:edge_number(g),
if(controlledSourceFlag)
controlledSourceFlag=%F
continue
end
source=g.edges.tail(edge_cnt)-1;
sink=g.edges.head(edge_cnt)-1;
value=g.edges.data.devName(edge_cnt);
select (g.edges.data.type(edge_cnt))
case 'R' then // Resistor
if(~(source==0))
A(source,source) = A(source,source) + "+"+ value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) +"+"+ value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) +"-"+ value;
A(sink,source) = A(sink,source) +"-"+ value;
end
case 'I' then // Current source
if(sscanf(value, "%c")=='I')
if(~(source==0))
B(source) = B(source)+"-"+value;
end
if(~(sink==0))
B(sink) =B(sink) +"+"+ value;
end
elseif(~(sscanf(value, "%c")=='C') | currentAnalysis)
if(~(source==0))
B(source) = B(source)+"-i_"+value;
end
if(~(sink==0))
B(sink) =B(sink) +"+i_"+ value;
end
end
case 'V' then // Voltage source
if(~(source==0))
A(Nodes-1+_T,source) = "1";
A(source,Nodes-1+_T) = "1";
end
if(~(sink==0))
A(Nodes-1+_T,sink) = "-1";
A(sink,Nodes-1+_T) = "-1";
end
B(Nodes-1+_T) = value;
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
case 'C' then // Capacitor
if currentAnalysis then
if(~(source==0))
C(source,source) = C(source,source) +"+"+ value;
end
if(~(sink==0))
C(sink,sink) = C(sink,sink) +" + "+ value;
end
if(~(sink==0) & ~(source==0))
C(source,sink) = C(source,sink) +"-"+value;
C(sink,source) = C(sink,source) +"-"+value;
end
end
case 'D' then // Diode
if(~(source==0))
A(source,source) = A(source,source) +"+R_"+ value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) +"+R_"+ value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) +"-R_"+ value;
A(sink,source) = A(sink,source) +"-R_"+ value;
end
case 'G' then // Voltage controlled current source
if(~(source==0))
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(source,g.edges.tail(edge_cnt+1)-1) = A(source,g.edges.tail(edge_cnt+1)-1) +"+"+ convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(source,g.edges.head(edge_cnt+1)-1) = A(source,g.edges.head(edge_cnt+1)-1) +"-"+ convstr(value,'l');
end
end
if(~(sink==0))
if(~(g.edges.tail(edge_cnt+1)==1))
A(sink,g.edges.tail(edge_cnt+1)-1) = A(sink,g.edges.tail(edge_cnt+1)-1) +"-"+ convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(sink,g.edges.head(edge_cnt+1)-1) = A(sink,g.edges.head(edge_cnt+1)-1) +"+"+ convstr(value,'l');
end
end
controlledSourceFlag=%T
case 'E' then // Voltage controlled voltage source
if(~(source==0))
A(source,Nodes-1+_T) = "1";
A(Nodes-1+_T,source) = "1";
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.tail(edge_cnt+1)-1) = convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)==1))
A(Nodes-1+_T,g.edges.head(edge_cnt+1)-1) = "-"+convstr(value,'l');
end
end
if(~(sink==0))
A(sink,Nodes-1+_T) = "-1";
A(Nodes-1+_T,sink) = "-1";
if(~(g.edges.tail(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.tail(edge_cnt+1)-1) = "-"+convstr(value,'l');
end
if(~(g.edges.head(edge_cnt+1)-1==0))
A(Nodes-1+_T,g.edges.head(edge_cnt+1)-1) = convstr(value,'l');
end
end
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
controlledSourceFlag=%T
case 'F' then // Current controlled current source
A(Nodes-1+_T,Nodes-1+_T) = 1;
A(Nodes-1+_T,Nodes-1+_T-1) = "-"+convstr(value,'l');
if(~(source==0))
A(source,Nodes-1+_T) = 1;
end
if(~(sink==0))
A(sink,Nodes-1+_T) = -1;
end
x(Nodes-1+_T)="i_"+ value;
_T=_T+1;
case 'H' then // Current controlled voltage source
A(Nodes-1+_T,Nodes-1+_T-1) = "-"+convstr(value,'l');
if(~(source==0))
A(source,Nodes-1+_T) = 1;
A(Nodes-1+_T,source) = 1;
end
if(~(sink==0))
A(sink,Nodes-1+_T) = -1;
A(Nodes-1+_T,sink) = -1;
end
x(Nodes-1+_T)="i"+ value;
_T=_T+1;
case 'M' then // MOSFET
if(~(source==0))
A(source,source) = A(source,source) + value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) + value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) - value;
A(sink,source) = A(sink,source) - value;
end
case 'X' then // User defined component
if(~(source==0))
A(source,source) = A(source,source) +" + "+ value;
end
if(~(sink==0))
A(sink,sink) = A(sink,sink) +" + "+ value;
end
if(~(sink==0) & ~(source==0))
A(source,sink) = A(source,sink) +" - "+value;
A(sink,source) = A(sink,source) +" - "+value;
end
else
exit(0);
end
end
_T=_T-1;
firstValue=%T
mprintf("-----------------------------------------------------------\n");
mprintf("System of Equations representing the electrical circuit:\n");
mprintf("-----------------------------------------------------------\n");
// Fill zero entries
for i=1:Nodes-1+_T,
mprintf("\n ");
for j=1:Nodes-1+_T,
if(length(A(i,j))==0)
A(i,j)="0";
elseif(sscanf(A(i,j), "%c")=='+')
tempstr=strsplit(A(i,j),1);
A(i,j)=tempstr(2);
if firstValue then
if ~(strcmp(A(i,j),'1')) then
mprintf("%s",x(j));
else
mprintf("(%s)%s",A(i,j),x(j));
end
firstValue=%F;
else
if ~(strcmp(A(i,j),'1')) then
mprintf(" + %s",x(j));
else
mprintf(" + (%s)%s",A(i,j),x(j));
end
end
else
if firstValue then
if ~(strcmp(A(i,j),'1')) then
mprintf("%s",x(j));
else
mprintf("(%s)%s",A(i,j),x(j));
end
firstValue=%F;
else
if ~(strcmp(A(i,j),'1')) then
mprintf(" + %s",x(j));
else
mprintf(" + (%s)%s",A(i,j),x(j));
end
end
end
end
if(length(B(i,1))==0)
B(i,1)="0";
elseif(sscanf(B(i,1), "%c")=='+')
tempstr=strsplit(B(i,1),1);
B(i,1)=tempstr(2);
end
mprintf(" = %s\n",B(i,1));
firstValue=%T
end
mprintf("-----------------------------------------------------------\n");
endfunction
|
5baf13b70de4230af9a1c22595831f9f290186bc
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/572/CH14/EX14.2/c14_2.sce
|
bf766a74e8a6463cdab97182732b56e48528cc72
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,311
|
sce
|
c14_2.sce
|
//(14.2) One kilomole of carbon monoxide, CO, reacts with .5kmol of oxygen, O2, to form an equilibrium mixture of CO2, CO, and O2 at 2500 K and (a) 1 atm, (b) 10 atm. Determine the equilibrium composition in terms of mole fractions
//solution
//Applying conservation of mass, the overall balanced chemical reaction equation is
//CO + .5O2 -------> zCO + (z/2)O2 + (1-z)CO2
//At 2500 K, Table A-27 gives
log10K = -1.44
K = 10^log10K //equilibrium constant
//part(a)
p = 1 //in atm
//solving equation K = (z/(1-z))*(2/(2 + z))^.5 *(p/1)^.5 gives
z = .129
yCO = 2*z/(2 + z)
yO2 = z/(2 + z)
yCO2 = 2*(1 - z)/(2 + z)
printf('part(a) mole fraction of CO is: %f',yCO)
printf('\nmole fraction of O2 is: %f',yO2)
printf('\nmole fraction of CO2 is: %f',yCO2)
//part(b)
p = 10 //in atm
//solving equation K = (z/(1-z))*(2/(2 + z))^.5 *(p/1)^.5 gives
z = .062
yCO = 2*z/(2 + z)
yO2 = z/(2 + z)
yCO2 = 2*(1 - z)/(2 + z)
printf('\n\npart(b) mole fraction of CO is: %f',yCO)
printf('\nmole fraction of O2 is: %f',yO2)
printf('\nmole fraction of CO2 is: %f',yCO2)
|
fd4caaa693c206f8afb8f95449b0e93d76b6e126
|
931df7de6dffa2b03ac9771d79e06d88c24ab4ff
|
/zzz.sce
|
44de08c897ab565202bf7de7a5362cc810efe2df
|
[] |
no_license
|
MBHuman/Scenarios
|
be1a722825b3b960014b07cda2f12fa4f75c7fc8
|
1db6bfdec8cc42164ca9ff57dd9d3c82cfaf2137
|
refs/heads/master
| 2023-01-14T02:10:25.103083
| 2020-11-21T16:47:14
| 2020-11-21T16:47:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 13,419
|
sce
|
zzz.sce
|
Name=zzz
PlayerCharacters=H1Z1;H1Z1 Bot
BotCharacters=H1 Bot.bot
IsChallenge=false
Timelimit=60.0
PlayerProfile=
AddedBots=
PlayerMaxLives=0
BotMaxLives=
PlayerTeam=0
BotTeams=
MapName=
MapScale=3.8125
BlockProjectilePredictors=true
BlockCheats=true
InvinciblePlayer=false
InvincibleBots=false
Timescale=1.0
BlockHealthbars=false
TimeRefilledByKill=0.0
ScoreToWin=1000.0
ScorePerDamage=1.0
ScorePerKill=0.0
ScorePerMidairDirect=0.0
ScorePerAnyDirect=0.0
ScorePerTime=0.0
ScoreLossPerDamageTaken=0.0
ScoreLossPerDeath=0.0
ScoreLossPerMidairDirected=0.0
ScoreLossPerAnyDirected=0.0
ScoreMultAccuracy=false
ScoreMultDamageEfficiency=false
ScoreMultKillEfficiency=false
GameTag=H1Z1
WeaponHeroTag=AR-15
DifficultyTag=2
AuthorsTag=KandiVan
BlockHitMarkers=false
BlockHitSounds=false
BlockMissSounds=true
BlockFCT=false
Description=Bullet lead and drop practice at ranges from 50m to 300m
GameVersion=1.0.8.0
ScorePerDistance=0.0
MBSEnable=false
MBSTime1=0.25
MBSTime2=0.5
MBSTime3=0.75
MBSTime1Mult=1.0
MBSTime2Mult=2.0
MBSTime3Mult=3.0
MBSFBInstead=false
MBSRequireEnemyAlive=false
[Aim Profile]
Name=At Feet
MinReactionTime=0.3
MaxReactionTime=0.4
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=15.0
TrackSpeed=3.5
TrackError=3.5
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=40.0
ShootFOV=15.0
VerticalAimOffset=-200.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Aim Profile]
Name=Low Skill
MinReactionTime=0.35
MaxReactionTime=0.45
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=20.0
TrackSpeed=3.0
TrackError=5.0
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=60.0
ShootFOV=25.0
VerticalAimOffset=0.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Aim Profile]
Name=Default
MinReactionTime=0.3
MaxReactionTime=0.4
MinSelfMovementCorrectionTime=0.001
MaxSelfMovementCorrectionTime=0.05
FlickFOV=30.0
FlickSpeed=1.5
FlickError=15.0
TrackSpeed=3.5
TrackError=3.5
MaxTurnAngleFromPadCenter=75.0
MinRecenterTime=0.3
MaxRecenterTime=0.5
OptimalAimFOV=30.0
OuterAimPenalty=1.0
MaxError=40.0
ShootFOV=15.0
VerticalAimOffset=0.0
MaxTolerableSpread=5.0
MinTolerableSpread=1.0
TolerableSpreadDist=2000.0
MaxSpreadDistFactor=2.0
[Bot Profile]
Name=H1 Bot
DodgeProfileNames=H1Z1 Strafe
DodgeProfileWeights=1.5
DodgeProfileMaxChangeTime=1.25
DodgeProfileMinChangeTime=0.35
WeaponProfileWeights=0.0;0.0;1.0;1.0;1.0;1.0;1.0;1.0
AimingProfileNames=At Feet;At Feet;Low Skill;Default;Default;Default;Default;Default
WeaponSwitchTime=3.0
UseWeapons=false
CharacterProfile=H1Z1 Bot
SeeThroughWalls=false
NoDodging=false
NoAiming=false
[Character Profile]
Name=H1Z1
MaxHealth=300.0
WeaponProfileNames=AR-15 (H1);;;;;;;
MinRespawnDelay=1.0
MaxRespawnDelay=5.0
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=2.0
CameraOffset=X=0.000 Y=0.000 Z=0.000
HeadshotOnly=false
DamageKnockbackFactor=8.0
MovementType=Base
MaxSpeed=611.0
MaxCrouchSpeed=90.0
Acceleration=16000.0
AirAcceleration=16000.0
Friction=8.0
BrakingFrictionFactor=2.0
JumpVelocity=800.0
Gravity=3.0
AirControl=0.25
CanCrouch=true
CanPogoJump=false
CanCrouchInAir=false
CanJumpFromCrouch=false
EnemyBodyColor=X=255.000 Y=0.000 Z=0.000
EnemyHeadColor=X=255.000 Y=255.000 Z=255.000
TeamBodyColor=X=0.000 Y=0.000 Z=255.000
TeamHeadColor=X=255.000 Y=255.000 Z=255.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=800.0
MainBBType=Cylindrical
MainBBHeight=100.0
MainBBRadius=17.0
MainBBHasHead=true
MainBBHeadRadius=10.1
MainBBHeadOffset=0.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=100.0
ProjBBRadius=17.0
ProjBBHasHead=true
ProjBBHeadRadius=10.1
ProjBBHeadOffset=0.0
ProjBBHide=true
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=;;;
HideWeapon=false
AerialFriction=0.0
StrafeSpeedMult=0.4655
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.5
AllowBufferedJumps=true
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.25
ThirdPersonCamera=true
TPSArmLength=175.0
TPSOffset=X=0.000 Y=6.000 Z=15.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
SpawnXOffset=0.0
SpawnYOffset=0.0
InvertBlockedSpawn=false
[Character Profile]
Name=H1Z1 Bot
MaxHealth=300.0
WeaponProfileNames=AR-15 (H1);;;;;;;
MinRespawnDelay=1.0
MaxRespawnDelay=5.0
StepUpHeight=75.0
CrouchHeightModifier=0.5
CrouchAnimationSpeed=1.0
CameraOffset=X=0.000 Y=0.000 Z=0.000
HeadshotOnly=false
DamageKnockbackFactor=8.0
MovementType=Base
MaxSpeed=611.0
MaxCrouchSpeed=500.0
Acceleration=16000.0
AirAcceleration=16000.0
Friction=8.0
BrakingFrictionFactor=2.0
JumpVelocity=800.0
Gravity=3.0
AirControl=0.25
CanCrouch=true
CanPogoJump=false
CanCrouchInAir=false
CanJumpFromCrouch=false
EnemyBodyColor=X=255.000 Y=0.000 Z=0.000
EnemyHeadColor=X=255.000 Y=255.000 Z=255.000
TeamBodyColor=X=0.000 Y=0.000 Z=255.000
TeamHeadColor=X=255.000 Y=255.000 Z=255.000
BlockSelfDamage=false
InvinciblePlayer=false
InvincibleBots=false
BlockTeamDamage=false
AirJumpCount=0
AirJumpVelocity=800.0
MainBBType=Cylindrical
MainBBHeight=100.0
MainBBRadius=17.0
MainBBHasHead=true
MainBBHeadRadius=10.1
MainBBHeadOffset=0.0
MainBBHide=false
ProjBBType=Cylindrical
ProjBBHeight=100.0
ProjBBRadius=17.0
ProjBBHasHead=true
ProjBBHeadRadius=10.1
ProjBBHeadOffset=0.0
ProjBBHide=true
HasJetpack=false
JetpackActivationDelay=0.2
JetpackFullFuelTime=4.0
JetpackFuelIncPerSec=1.0
JetpackFuelRegensInAir=false
JetpackThrust=6000.0
JetpackMaxZVelocity=400.0
JetpackAirControlWithThrust=0.25
AbilityProfileNames=ADS.abilmov;;;
HideWeapon=false
AerialFriction=0.0
StrafeSpeedMult=0.4655
BackSpeedMult=1.0
RespawnInvulnTime=0.0
BlockedSpawnRadius=0.0
BlockSpawnFOV=0.0
BlockSpawnDistance=0.0
RespawnAnimationDuration=0.5
AllowBufferedJumps=true
BounceOffWalls=false
LeanAngle=0.0
LeanDisplacement=0.0
AirJumpExtraControl=0.0
ForwardSpeedBias=1.0
HealthRegainedonkill=0.0
HealthRegenPerSec=0.0
HealthRegenDelay=0.0
JumpSpeedPenaltyDuration=0.0
JumpSpeedPenaltyPercent=0.25
ThirdPersonCamera=true
TPSArmLength=175.0
TPSOffset=X=0.000 Y=6.000 Z=15.000
BrakingDeceleration=2048.0
VerticalSpawnOffset=0.0
SpawnXOffset=0.0
SpawnYOffset=0.0
InvertBlockedSpawn=false
[Dodge Profile]
Name=H1Z1 Strafe
MaxTargetDistance=2500.0
MinTargetDistance=750.0
ToggleLeftRight=true
ToggleForwardBack=true
MinLRTimeChange=3.0
MaxLRTimeChange=3.0
MinFBTimeChange=0.2
MaxFBTimeChange=0.5
DamageReactionChangesDirection=true
DamageReactionChanceToIgnore=0.5
DamageReactionMinimumDelay=0.125
DamageReactionMaximumDelay=0.25
DamageReactionCooldown=1.0
DamageReactionThreshold=0.0
DamageReactionResetTimer=0.1
JumpFrequency=0.02
CrouchInAirFrequency=0.0
CrouchOnGroundFrequency=0.0
TargetStrafeOverride=Ignore
TargetStrafeMinDelay=0.125
TargetStrafeMaxDelay=0.25
MinProfileChangeTime=0.0
MaxProfileChangeTime=0.0
MinCrouchTime=0.3
MaxCrouchTime=0.6
MinJumpTime=0.3
MaxJumpTime=0.6
LeftStrafeTimeMult=1.0
RightStrafeTimeMult=1.0
StrafeSwapMinPause=0.0
StrafeSwapMaxPause=0.25
BlockedMovementPercent=0.5
BlockedMovementReactionMin=0.125
BlockedMovementReactionMax=0.2
[Weapon Profile]
Name=AR-15 (H1)
Type=Projectile
ShotsPerClick=1
DamagePerShot=22.5
KnockbackFactor=0.0
TimeBetweenShots=0.1
Pierces=false
Category=SemiAuto
BurstShotCount=2
TimeBetweenBursts=0.1
ChargeStartDamage=0.1
ChargeStartVelocity=X=1500.000 Y=0.000 Z=0.000
ChargeTimeToAutoRelease=2.0
ChargeTimeToCap=1.0
ChargeMoveSpeedModifier=1.0
MuzzleVelocityMin=X=45000.000 Y=0.000 Z=0.000
MuzzleVelocityMax=X=45000.000 Y=0.000 Z=0.000
InheritOwnerVelocity=0.0
OriginOffset=X=0.000 Y=0.000 Z=0.000
MaxTravelTime=5.0
MaxHitscanRange=100000.0
GravityScale=3.15
HeadshotCapable=true
HeadshotMultiplier=1.5
MagazineMax=30
AmmoPerShot=1
ReloadTimeFromEmpty=1.5
ReloadTimeFromPartial=1.5
DamageFalloffStartDistance=1000000.0
DamageFalloffStopDistance=1000000.0
DamageAtMaxRange=22.5
DelayBeforeShot=0.0
HitscanVisualEffect=Tracer
ProjectileGraphic=Ball
VisualLifetime=0.02
WallParticleEffect=Gunshot
HitParticleEffect=Blood
BounceOffWorld=true
BounceFactor=0.6
BounceCount=0
HomingProjectileAcceleration=0.0
ProjectileEnemyHitRadius=0.1
CanAimDownSight=true
ADSZoomDelay=0.03
ADSZoomSensFactor=0.53
ADSMoveFactor=0.35
ADSStartDelay=0.0
ShootSoundCooldown=0.08
HitSoundCooldown=0.08
HitscanVisualOffset=X=0.000 Y=0.000 Z=-40.000
ADSBlocksShooting=false
ShootingBlocksADS=false
KnockbackFactorAir=0.0
RecoilNegatable=false
DecalType=1
DecalSize=30.0
DelayAfterShooting=0.0
BeamTracksCrosshair=false
AlsoShoot=
ADSShoot=
StunDuration=0.0
CircularSpread=true
SpreadStationaryVelocity=10000.0
PassiveCharging=false
BurstFullyAuto=true
FlatKnockbackHorizontal=0.0
FlatKnockbackVertical=0.0
HitscanRadius=0.0
HitscanVisualRadius=6.0
TaggingDuration=0.0
TaggingMaxFactor=1.0
TaggingHitFactor=1.0
ProjectileTrail=None
RecoilCrouchScale=1.0
RecoilADSScale=1.0
PSRCrouchScale=1.0
PSRADSScale=1.0
ProjectileAcceleration=0.0
AccelIncludeVertical=true
AimPunchAmount=0.0
AimPunchResetTime=0.05
AimPunchCooldown=0.5
AimPunchHeadshotOnly=false
AimPunchCosmeticOnly=true
MinimumDecelVelocity=0.0
PSRManualNegation=false
PSRAutoReset=true
AimPunchUpTime=0.05
AmmoReloadedOnKill=0
CancelReloadOnKill=false
FlatKnockbackHorizontalMin=0.0
FlatKnockbackVerticalMin=0.0
ADSScope=No Scope
ADSFOVOverride=61.84
ADSFOVScale=Vertical (1:1)
ADSAllowUserOverrideFOV=true
IsBurstWeapon=false
ForceFirstPersonInADS=true
ZoomBlockedInAir=false
ADSCameraOffsetX=0.0
ADSCameraOffsetY=0.0
ADSCameraOffsetZ=0.0
QuickSwitchTime=0.0
Explosive=false
Radius=500.0
DamageAtCenter=100.0
DamageAtEdge=0.1
SelfDamageMultiplier=0.5
ExplodesOnContactWithEnemy=true
DelayAfterEnemyContact=0.0
ExplodesOnContactWithWorld=true
DelayAfterWorldContact=0.0
ExplodesOnNextAttack=false
DelayAfterSpawn=5.0
BlockedByWorld=true
SpreadSSA=4.0,15.0,-9.0,2.5
SpreadSCA=4.0,15.0,-9.0,2.5
SpreadMSA=4.0,15.0,-9.0,2.5
SpreadMCA=4.0,15.0,-9.0,2.5
SpreadSSH=0.0,0.1,0.0,0.0
SpreadSCH=2.0,27.0,-9.0,0.0
SpreadMSH=0.0,0.1,0.0,0.0
SpreadMCH=4.0,15.0,-9.0,1.8
MaxRecoilUp=0.0
MinRecoilUp=0.0
MinRecoilHoriz=0.0
MaxRecoilHoriz=0.0
FirstShotRecoilMult=1.0
RecoilAutoReset=true
TimeToRecoilPeak=0.05
TimeToRecoilReset=0.15
AAMode=0
AAPreferClosestPlayer=false
AAAlpha=0.1
AAMaxSpeed=5.0
AADeadZone=0.0
AAFOV=10.0
AANeedsLOS=true
TrackHorizontal=true
TrackVertical=true
AABlocksMouse=false
AAOffTimer=0.0
AABackOnTimer=0.0
TriggerBotEnabled=false
TriggerBotDelay=0.0
TriggerBotFOV=0.1
StickyLock=false
HeadLock=true
VerticalOffset=0.0
DisableLockOnKill=false
UsePerShotRecoil=true
PSRLoopStartIndex=1
PSRViewRecoilTracking=1.0
PSRCapUp=90.0
PSRCapRight=90.0
PSRCapLeft=90.0
PSRTimeToPeak=0.07
PSRResetDegreesPerSec=3.6
PSR0=0.0,0.95
PSR1=0.0,-0.95
PSR2=0.0,0.95
PSR3=0.0,-0.95
PSR4=0.0,0.95
PSR5=0.0,0.95
PSR6=0.0,-0.95
PSR7=0.0,0.95
PSR8=0.0,-0.95
PSR9=0.0,0.95
PSR10=0.0,-0.95
PSR11=0.0,0.95
PSR12=0.0,-0.95
PSR13=0.0,0.95
PSR14=0.0,-0.95
PSR15=0.0,0.95
PSR16=0.0,-0.95
PSR17=0.0,0.95
PSR18=0.0,-0.95
PSR19=0.0,0.95
PSR20=0.0,-0.95
PSR21=0.0,0.95
PSR22=0.0,-0.95
PSR23=0.0,0.95
PSR24=0.0,-0.95
PSR25=0.0,0.95
PSR26=0.0,-0.95
PSR27=0.0,0.95
PSR28=0.0,-0.95
PSR29=0.0,0.95
PSR30=0.0,-0.95
UsePerBulletSpread=false
PBS0=0.0,0.0
[Movement Ability Profile]
Name=ADS
MaxCharges=1.0
ChargeTimer=0.5
ChargesRefundedOnKill=0.0
DelayAfterUse=3.0
FullyAuto=true
AbilityDuration=1.5
LockDirectionForDuration=true
NegateGravityForDuration=true
MainVelocity=90.0
MainVelocityCanGoVertical=false
MainVelocitySetToMovementKeys=true
UpVelocity=0.0
EndVelocityFactor=1.0
Hurtbox=false
HurtboxRadius=50.0
HurtboxDamage=50.0
HurtboxGroundKnockbackFactor=1.0
HurtboxAirKnockbackFactor=1.0
AbilityBlocksTurning=false
AbilityBlocksMovement=false
AbilityBlocksAttack=false
AttackCancelsAbility=false
AbilityReloadsWeapon=false
HealthRestore=0.0
AIUseInCombat=true
AIUseOutOfCombat=false
AIUseOnGround=true
AIUseInAir=false
AIReuseTimer=1.0
AIMinSelfHealth=0.0
AIMaxSelfHealth=100.0
AIMinTargHealth=0.0
AIMaxTargHealth=100.0
AIMinTargDist=0.0
AIMaxTargDist=500000.0
AIMaxTargFOV=15.0
AIDamageReaction=true
AIDamageReactionIgnoreChance=0.0
AIDamageReactionMinDelay=0.125
AIDamageReactionMaxDelay=0.25
AIDamageReactionCooldown=1.0
AIDamageReactionThreshold=0.0
AIDamageReactionResetTimer=0.1
[Map Data]
|
e3708d1b4d6cc7f42428c36ad5acbe3441eb3647
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1802/CH5/EX5.7/Exa5_7.sce
|
285bf0c4f2f472df1bba77502cf2a6dc4f34ae15
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 437
|
sce
|
Exa5_7.sce
|
//Exa 5.7
clc;
clear;
close;
//Given Data :
format('v',7);
I=180;//in Ampere
cos_fir=0.8;//unitless
R=0.7;//in ohm/phase
X=1.2;//in ohm/phase
ETA=90;//in %
Pdev_BY_VR=3*I*cos_fir;//in KW
Psending_BY_VR=Pdev_BY_VR/(ETA/100);//in kW
Losses=3*I^2*R;//in watt
VR=Losses/(Psending_BY_VR-Pdev_BY_VR);//in volt
Vs=sqrt((VR*cos_fir+I*R)^2+(VR*sqrt(1-cos_fir^2)+I*X)^2);
disp(Vs*sqrt(3),"Sending end voltage Vs(line) in volts :");
|
a04d3bbbfc6762add539cdb22686206fb3fa8b83
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1427/CH5/EX5.35/5_35.sce
|
d8f538931a9b40b8950e96bd4d285803080ef166
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 531
|
sce
|
5_35.sce
|
//ques-5.35
//Calculating transport number of Copper and sulphate ions
clc
x=0.6236;//weight of Cu in anodic solution after electrolysis (in g)
y=0.635;//weight of Cu in anodic solution before electrolysis (in g)
m=0.1351;//mass of Ag deposited in voltameter (in g)
z=(m*(63.6/2))/107.88;//equivalent of Cu deposited in voltameter (in g)
t1=(y-x)/z;//transport number of copper ions
t2=1-t1;//transport number of sulphate ions
printf("Transport number of Copper and sulphate ions are %.3f and %.3f respectively.",t1,t2);
|
e9f95df2a3cb77b3045b3f5014d0d6ed94743b3b
|
d13b729c94c45001726db99bfd7e3c9c2de166af
|
/01_blit/soundtest01_blit.sce
|
a80501bcf57cf340bd2ae19e13e706231e14def9
|
[] |
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,694
|
sce
|
soundtest01_blit.sce
|
// Band-Limited Impluse Train
// initial parameters *********************************************************/
fs = 44100/* Hz */; // sampling rate
f = 440/* Hz */; // frequecncy
/******************************************************************************/
exec("blit.sci");
exec("getPowerSpectrum.sci")
// The formular for a BLIT is as follows:
// BLIT(x) = (m/p) * (sin(PI*x*m/p)/(m*sin(PI*x/p))
// p is the exact numbers of samples per period (floating point value)
p = fs / f; // sampleRate/frequency
// m numbers of samples of a period (must be an odd integer value)
m = 2 * floor(p / 2) + 1;
// Generate wave
t = 0 : 1/fs : 1 - 1/fs;
wav = zeros(1, length(t));
wav(1, 1) = 0.5
for i = 1:length(t) - 1
wav(1, i + 1) = wav(1, i) + blit(p, m, i) - blit(p, m, i + int(m / 2))
end
// power spectrum
pow = getPowerSpectrum(wav);
playsnd(wav, fs);
wavwrite(wav,fs , "blit.wav");
clf();
subplot(2,1,1);
plot2d(t , wav, 2, rect=[0.0, -0.6, 4/f, 0.6]);
xgrid(color(128,128,128));
title("wave", 'fontsize',3)
xlabel("time [ms]]");
ylabel("wave");
// plot power spectrum
subplot(2,1,2);
plot2d(0:length(pow)-1, 10 * log10(pow), 2, rect=[0.0,-100, fs/2,0.0]);
xgrid(color(128,128,128));
title("spectrum", 'fontsize',3)
xlabel("freqency [Hz]");
ylabel("power spectrum [dB]");
/* 参考****** ******************************************************************
BLITのお話 | g200kg Music & Software
URL:http://www.g200kg.com/archives/2012/10/blit.html
Bandlimited waveforms synopsis
URL:http://www.musicdsp.org/files/waveforms.txt
*******************************************************************************/
|
bec3942cc890719303f819a1e066cd2e1be76e22
|
0896434fe17d3300e03ad0250029673ebf70bacc
|
/sheet_8/Scilab_codes/bode.sce
|
3c23c55ae29003e31af61f5cf597883fc38bda7a
|
[] |
no_license
|
TheShiningVampire/EE324_Controls_Lab
|
8ff1720b852bf24dca3c172082f5f898f80f69f3
|
9aea73eed3f5a4ac6c19a799f8aebe09f4af0be8
|
refs/heads/main
| 2023-07-09T17:30:38.041544
| 2021-08-23T12:14:29
| 2021-08-23T12:14:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 107
|
sce
|
bode.sce
|
clear
close
clc
s = poly(0,'s');
G = (s+1)/((s+5)*(s+10)*(s+100)) ;
Gs = syslin('c' ,G);
bode(Gs,'rad');
|
c30f1356c5a9d65a690b62cefa44f9dbf480472d
|
c884d985cf07964dbaf65b3204ef1bebb38d4f23
|
/Fourier.sce
|
80821c8408ca66b30ce8b82e4884161dccb3fb05
|
[] |
no_license
|
mbgaspar/Computacao-cientifica
|
710f99c81f2ae342c782584bae2fef666f78f76c
|
8168c0bdcaa14cf9d2b57ba34e15fd0833e69ee3
|
refs/heads/master
| 2021-11-05T01:50:18.159560
| 2021-10-29T12:09:10
| 2021-10-29T12:09:10
| 220,349,256
| 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,708
|
sce
|
Fourier.sce
|
clc;
clear;
funcprot(0);
t = poly(0,"t");
L= input("Entre com o período: ");
W0= (2*%pi)/L;
a0=0;
k= input ("Entre com o número de parcelas que formam sua função: "); // F(t)= ft1+ft2...
fx=zeros(1, k);
for j=1:k;
fn = input("Entre com a parcela da função fn(t): ");
ti = input("Entre com o limite inferior de fn(t) (tempo inicial): ");
tf= input ("Entre com o limite superior de fn(t) (tempo final): ");
deff('fn = f(t)','fn');
a0=(1/L)*(integrate('f(t)','t',ti,tf,1e-5))+a0;
disp(a0);
fx(j) = fn;
txi(j)=ti;
txf(j)=tf;
// a0 ok
end
disp(fx, "fx= ");
printf("a0 = %f\n",a0);
i=input("Digite a quantidade de termos a serem somados: ");
a=zeros(1, i);
b=zeros(1, i);
A=zeros(1, i);
fi=zeros(1, i);
for n=1:i
for j=1:k
y=fx(j);
deff('y=ft(t)','y');
a(n)=((2/L)*(integrate('ft(t)*cos(n*W0*t)','t',txi(j),txf(j),1e-5)))+ a(n);
b(n)=((2/L)*(integrate('ft(t)*sin(n*W0 *t)','t',txi(j),txf(j),1e-5)))+ b(n);
end
A(n)= sqrt(a(n)^2 + b(n)^2)+ A(n);
fi(n)= atan(b(n)/a(n))+ fi(n);
printf("a(%d)=%f,b(%d)=%f, A(%d)= %f, fi(%d)= %f\n",n, a(n), n, b(n), n, A(n), n, fi(n));
end
// plota forma de onda (função desejada); Tensão
Vs =a0;
function Vs=f(t)
for n=1:i;
Vs = Vs+(a(n)*cos(n*W0*t)+b(n)*sin(n*W0*t));
y=fft(Vs);
// plot(abs(y));
end
endfunction
t=-10:0.1:10;
plot(t,f(t));
xlabel("t");
ylabel("f(t)");
//Vo=a0/2;
//printf ("COMPONENTE CC DE Vo= %f",Vo);
//function Vo=s(t)
// for n=1:i;
// Vo = Vo+(z2(n)*(a(n)*cos(n*W0*t)+b(n)*sin(n*W0*t))/(z1(n)+z2(n)));
// y=fft(Vo);
// // plot(abs(y));
// end
//endfunction
//t=-10:0.01:10;
//plot(t,s(t));
|
4005d2e9de8c8d9a30e2d1efa5422a2aea4dee68
|
c5a6312b2689f29d943904ba13f3aca400a3a395
|
/communication/sixth.sce
|
c7a26522a55f117b363722cf994b38b9581f4585
|
[] |
no_license
|
orhitg/sem7
|
25b1430a300a28e8a70208abe06e776be08c695b
|
89b1184cfb8a95c6b5a38ab7cff5fccc6f596e67
|
refs/heads/master
| 2021-01-12T17:58:23.080274
| 2016-11-12T07:38:50
| 2016-11-12T07:38:50
| 71,317,126
| 2
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 80
|
sce
|
sixth.sce
|
vm=10;
fm=10;
t=0:0.001:1;
noise=rand(1,1001);
plot(vm*sin(2*3.14*fm*t)+noise);
|
133fddbda68b08e446908427fb8b3abfa923e800
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3809/CH1/EX1.2/EX1_2.sce
|
1b849ed7409d0dc87be409225782b5acf48107f3
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 282
|
sce
|
EX1_2.sce
|
//Chapter 1, Example 1.2
clc
//Initialisation
i1=10 //current in ampere
i3=3 //current in ampere
//Calculation
i2=i1-i3 //current in ampere
//Results
printf("Current, I = %.1f A",i2)
|
871721b85ab9bc2d5a11e3e9f60ef3206a05d415
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1787/CH4/EX4.4/Exa4_4.sce
|
1016c2d5b73cc024991cef6216a917e8389b0d04
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 241
|
sce
|
Exa4_4.sce
|
//Exa4.4
clc;
clear;
close;
//given data
T=300;//in Kelvin
ND=10^15;//in cm^-3
NA=10^18;//in cm^-3
ni=1.5*10^10;//in cm^-3
VT=T/11600;//in Volts
Vbi=VT*log(NA*ND/ni^2);//in Volts
disp(Vbi,"Built in potential barrier in volts : ");
|
c80366fabf31fb92f08165f7bc19a45108a24233
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1592/CH2/EX2.19/Example_2_19.sce
|
9705ff2eb1d06c4c94705177f5356fa1df5c169f
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 197
|
sce
|
Example_2_19.sce
|
//Scilab Code for Example 2.19 of Signals and systems by
//P.Ramakrishna Rao
clear;
clc;
syms t y;
s=%s;
y=laplace(exp(-t)-exp(2*t),t,s);
disp(y,"X(s)=");
y=(1/(s+1))-(1/(s-2));
plzr(y);
|
8fbb1d94081d5eedd88556000d4e518ce3167371
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1322/CH8/EX8.4/63ex4.sce
|
79b186397432cbbefef335dd3ffb1027d0882f64
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 234
|
sce
|
63ex4.sce
|
//0.5R1+1.2R2=1.486,4.5R1-2R2=4.67
clear;
clc;
close;
R2=poly(0,'R2');
R1=(1.486-1.2*R2)/0.5;
R=(4.67+2*R2)/4.5;
P=R1-R;
printf("THE SOLUTION IS: \n");
R2=roots(P)
//SUBSTITUTE IN THE EQUATION
R1=(1.486-1.2*R2)/0.5
|
70b24be0e04a1ecc13f0921b22b1ee542c27f24e
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1913/CH1/EX1.8/ex8.sce
|
097db69a8766b86346bb2bdc2ec8ed009fc5b9b4
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 317
|
sce
|
ex8.sce
|
clc
clear
//Input data
v1=1.5;//Initial volume in m^3
v2=2;//Final volume in m^3
w1=2;//Work receiving in Nm
p=6;//constsnt pressure of gas in N/m^2
//Calculations
w2=p*(v2-v1);//Work done in Nm
W=w2-w1;//Net work done by the system in Nm
//Output
printf('Net work done by the system W= %3.1f Nm',W)
|
5e8fb8ec2e4a5cc70ac5fd7613edda5ead9f0aa8
|
80bedece1d4391737a6c525e298c2f0b69c7f669
|
/highlight/static/Elwira/newton.sce
|
f704e9f348411aee33179402be49a676dde49e77
|
[] |
no_license
|
sacherus/psi_project
|
eef2171e08b9826d29cc953734a26f8312d43575
|
6938fa193b52724c90c869a1f79d9abb5a080b26
|
refs/heads/master
| 2020-04-20T22:05:22.732433
| 2012-12-20T11:16:52
| 2012-12-20T11:16:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 303
|
sce
|
newton.sce
|
function Y = newton(A)
n=size(A)
n=n(1)
matrixx=zeros(n,n+1)
for i=1:n
matrixx(i,1) = A(i,1)
matrixx(i,2) = A(i,2)
end
for i=3:(n+1)
for j=1:(n-i+2)
matrixx(j,i) = (matrixx(j+1,i-1) - matrixx(j,i-1))/(matrixx(i+j-2,1)-matrixx(j,1))
end
end
Y = matrixx
endfunction
|
4cf9df936570d7b28c1a64b9d4f3729783bd1c86
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/965/CH2/EX2.18/18.sci
|
9a1b3a8eb3bb7bfb97017c8da13d3442198652e8
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 648
|
sci
|
18.sci
|
clc;
clear all;
disp("composite wall system")
La=0.12;//m
Aa=1;//m^2
kA= 14.5;//W/(m*C)
RthA=La/(kA*Aa);
La1=0.000025;//m
Aa1=0.15;//m^2
kA1= 14.5;//W/(m*C)
RthA1=La1/(kA1*Aa1);
Lb=0.12;//m
Ab=1;//m^2
kB= 210;//W/(m*C)
RthB=Lb/(kB*Ab);
Lb1=0.000025;//m
Ab1=0.15;//m^2
kB1= 210;//W/(m*C)
RthB1=Lb1/(kB1*Ab1);
Lc=0.000025;//m
Ac=0.7;//m^2
kC=0.032;//W/(m*C)
RthC=Lc/(kC*Ac);
Req=RthA1*RthB1*RthC/(RthA1*RthC+RthB1*RthA1+RthB1*RthC);
Rtotal=RthA+Req+RthB
t1=220;// degree C
t2=30;// degree C
Q=(t1-t2)/Rtotal;
disp ("W",Q,"heat transfer = ")
delT=Q*Req;
disp("degree C",delT,"temperature drop in contact")
|
b4c0c111be30ab9dd6d74c7ade82828e6bbed37b
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/409/CH8/EX8.2/Example8_2.sce
|
4cf04244e7f2388a94ab97f12b375a004add410a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 828
|
sce
|
Example8_2.sce
|
clear ;
clc;
// Example 8.2
printf('Example 8.2\n\n');
// Page no. 199
// Solution Fig. E8.2b
F_O2 = 0.21 ;// fraction of O2 in feed(F)
F_N2 = 0.79 ;// fraction of N2 in feed(F)
P_O2 = 0.25 ;// fraction of O2 in product(P)
P_N2 = 0.75 ;// fraction of N2 in product(P)
F = 100 ;// Feed - [g mol]
w = 0.80 ;// Fraction of waste
W = w*F ;// Waste -[g mol]
// By analysis for degree of freedom , DOF comes to be zero
P = F - W ;// By overall balance - [g mol]
W_O2 = (F_O2*F - P*P_O2)/100 ;// Fraction of O2 in waste stream by O2 balance
W_N2 = (W - W_O2*100)/100 ;//Fraction of N2 in waste stream
printf('Composition of Waste Stream\n' );
printf('\n Component Fraction in waste stream\n' );
printf(' O2 %.2f\n',W_O2 );
printf(' N2 %.2f\n',W_N2 );
|
234a5ce5146ade878139ca0e29fe4e8974ef87e3
|
fdc5047b7bf8122bad1e621df236b0481226c36e
|
/virtualProcessComm_V4/demos/hrtSerialRead.sce
|
d4a428f2862082d280862c0722016bc3f2f50570
|
[] |
no_license
|
jpbevila/virtualHartSci
|
aea3c6ba23d054670eb193f441ea7de982b531cc
|
a3f5be6041d230bd9f0fd67e5d7efa71f41cfca5
|
refs/heads/main
| 2023-07-26T23:05:28.044194
| 2021-09-09T11:50:59
| 2021-09-09T11:50:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 619
|
sce
|
hrtSerialRead.sce
|
//
// This help file was automatically generated from hrtSerialRead.sci using help_from_sci().
// PLEASE DO NOT EDIT
//
mode(1)
//
// Demo of hrtSerialRead.sci
//
halt() // Press return to continue
serial = hrtSerialOpen(3,'19200,n,8,1');
[n,status] = hrtSerialStatus(serial);
if(n(1)>0)then
strFrame=hrtSerialRead(serial,n(1));
end
halt() // Press return to continue
halt() // Press return to continue
//========= E N D === O F === D E M O =========//
//
// Load this script into the editor
//
filename = "hrtSerialRead.sce";
dname = get_absolute_file_path(filename);
editor ( fullfile(dname,filename) );
|
429ac857859dae4a2b95e2d8cf2bb6c74901a325
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2870/CH14/EX14.1/Ex14_1.sce
|
aa258e1a40ee03fbf7270e521a10fe17e9b86c2d
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 609
|
sce
|
Ex14_1.sce
|
clc;clear;
//Example 14.1
//given data
V=5*5*3;//volume of the room
RH=0.75;
P=100;
T=25;
//constants used
Ra=0.287;//in kPa.m^3 / kg.k
Rv=0.4615;//in kPa.m^3 / kg.k
//from Table A-2a and A-4
cp=1.005;
Psat=3.1698;
hg=2564.6;
//calculation
Pv=RH*Psat;
Pa=P-Pv;
w=0.622*Pv/(P-Pv);
h=cp*T+w*hg;
ma=V*Pa/(Ra*(T+273));
mv=V*Pv/(Rv*(T+273));
disp(Pa,'the partial pressure of dry air in kPa');
disp(w,'the specific humidity in kg water/kg of dry air');
disp(h,'the enthalpy per unit mass of the dry air in kJ');
disp(ma,'mass of air in kg');
disp(mv,'mass of water vapour in kg');
|
4388d278988694e778ea179edf44d66ec9653112
|
ca8a1752ffab27d706f447f6671fec785bff91f6
|
/ncp/cs2/project 01/Mux16.tst
|
34ccc7d68626b808fd6eeab2a3e00ba4cac6d22d
|
[] |
no_license
|
aling94/school
|
0d01dbdd582107a58b0a59c564df2db6367777be
|
81d52961bc4c9244cf7abef2276ee69495eec351
|
refs/heads/master
| 2020-04-26T11:05:10.559842
| 2019-03-02T22:27:19
| 2019-03-02T22:27:19
| 173,504,921
| 0
| 1
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 738
|
tst
|
Mux16.tst
|
// This file is part of the materials accompanying the book
// "The Elements of Computing Systems" by Nisan and Schocken,
// MIT Press. Book site: www.idc.ac.il/tecs
// File name: projects/01/Mux16.tst
load Mux16.hdl,
output-file Mux16.out,
compare-to Mux16.cmp,
output-list a%B1.16.1 b%B1.16.1 sel%B2.1.2 out%B1.16.1;
set a %B0000000000000000,
set b %B0000000000000000,
set sel 0,
eval,
output;
set sel 1,
eval,
output;
set a %B0000000000000000,
set b %B0001001000110100,
set sel 0,
eval,
output;
set sel 1,
eval,
output;
set a %B1001100001110110,
set b %B0000000000000000,
set sel 0,
eval,
output;
set sel 1,
eval,
output;
set a %B1010101010101010,
set b %B0101010101010101,
set sel 0,
eval,
output;
set sel 1,
eval,
output;
|
8fa85b89128527276df3dca1f2bab0a8531faaae
|
a1f93c5ed7f19ec2dc6e698a305960c7eaacb3fd
|
/Practica4.1/Ejercicio1.sci
|
04cd94827f21596cbe79fb1c272f3c38b3d38914
|
[] |
no_license
|
hectoregm/numerico
|
813c74b87c976c2af4fe83adf59561a80141ea2f
|
ca0e16875746ad9d9c17da7ce0635669fc2410ed
|
refs/heads/master
| 2021-01-21T07:53:31.701526
| 2014-12-02T04:42:40
| 2014-12-02T04:42:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 13,010
|
sci
|
Ejercicio1.sci
|
function [val,numiter] = newton(p0,funcion,tol,iter)
// Funcion que realiza el metodo de newton para el calculo de ceros de
// funciones.
// Autor: Hector Gomez, Jorge Zavaleta
//*****************************************************************************
// ->Entrada
// p0 (Real) - Numero real que denota el punto inicial.
////
// funcion (String) - Es la funcion a la cual se le quiere encontrar un cero,
// donde la variable dependiente siempre se denota por x.
// Ejemplo 'sin(x)' para calcular un cero de la funcion
// seno(x).
//
// tol (Real - Opcional) - Numero real que especifica la tolerancia para la
// condicion de paro del metodo. Si no se especifica en
// los parametros de entrada el valor por default es
// 1D-10.
//
// iter (Real - Opcional) - Numero real que especifica el numero maximo de
// iteraciones que realiza el metodo (Segunda condicion
// de paro). Si no se especifica en los parametros de
// entrada el valor por default es 100.
//
// ->Salida
// val (Real) - Numero real con el valor del cero encontrado (funcion(val)=0).
//
// numiter (Real) - Numero real que da el numero de iteraciones que realizo el
// metodo. numiter<iter si se alcanzo la tolerancia (tol) o
// numiter=iter en caso contrario.
//*****************************************************************************
// Se verifica cuantos argumentos de entrada se tiene y se asignan valores por
// defecto a los argumentos opcionales que no se hayan definido
rhs = argn(2);// Da el numero de argumentos de entrada
if rhs < 4 then // Solo se definio el intervalo de busqueda y la funcion
tol = 1D-10;
iter = 100;
elseif rhs < 5 then // Se definio adicionalmente la tolerancia
iter = 100;
end
// Se define la funcion que se quiere evaluar y se inicializa el contador de
// iteraciones
numiter = 1;
cad1 = 'y=';
funcprot(0)
deff('[y]=f(x)',cad1 + funcion);
p1 = 100000
//Comienza el metodo
while abs(p0 - p1) > tol & numiter < iter //(b - a) > tol & numiter < iter
numiter = numiter + 1;
if p0 ~= 0
h = sqrt(%eps)*abs(p0)
else
h = sqrt(%eps)*abs(1)
end
fp = (f(p0 + h) - f(p0)) / h
if fp == 0
val = p0
return
end
p1 = p0
p0 = p0 - (f(p0)/fp)
end
val = p0
endfunction
function [val,numiter] = secante(p0,p1,funcion,tol,iter)
// Funcion que realiza el metodo de la secante para el calculo de ceros de
// funciones.
// Autor: Jorge Zavaleta
//*****************************************************************************
// ->Entrada
// p0 (Real) - Numero real que denota el lado izq del intervalo de busqueda.
//
// p1 (Real) - Numero real que denota el lado derecho del intervalo de busqueda.
//
// funcion (String) - Es la funcion a la cual se le quiere encontrar un cero,
// donde la variable dependiente siempre se denota por x.
// Ejemplo 'sin(x)' para calcular un cero de la funcion
// seno(x).
//
// tol (Real - Opcional) - Numero real que especifica la tolerancia para la
// condicion de paro del metodo. Si no se especifica en
// los parametros de entrada el valor por default es
// 1D-10.
//
// iter (Real - Opcional) - Numero real que especifica el numero maximo de
// iteraciones que realiza el metodo (Segunda condicion
// de paro). Si no se especifica en los parametros de
// entrada el valor por default es 100.
//
// ->Salida
// val (Real) - Numero real con el valor del cero encontrado (funcion(val)=0).
//
// numiter (Real) - Numero real que da el numero de iteraciones que realizo el
// metodo. numiter<iter si se alcanzo la tolerancia (tol) o
// numiter=iter en caso contrario.
//*****************************************************************************
// Se verifica cuantos argumentos de entrada se tiene y se asignan valores por
// defecto a los argumentos opcionales que no se hayan definido
rhs = argn(2);// Da el numero de argumentos de entrada
if rhs < 4 then // Solo se definio el intervalo de busqueda y la funcion
tol = 1D-10;
iter = 100;
elseif rhs < 5 then // Se definio adicionalmente la tolerancia
iter = 100;
end
// Se define la funcion que se quiere evaluar y se inicializa el contador de
// iteraciones
numiter = 2;
cad1 = 'y=';
funcprot(0)
deff('[y]=f(x)',cad1 + funcion);
// Se calculan las valuaciones de las aproximaciones iniciales
q0 = f(p0);
q1 = f(p1);
// Se verifica si alguna de estas es la solucion
if q0 == 0 then
val = p0;
return
elseif q1 == 0
val = p1;
return
end
// Se mueven las aproximaciones iniciales en el caso que las valuaciones sean
// las mismas (en este caso la secante no corta al eje x)
while q0 == q1
if p0 < p1 then
p1 = p0 + (p1 - p0)/2
q1 = f(p1);
elseif p0 > p1
p0 = p1 + (p0 - p1)/2
q0 = f(p0);
else
val = p0;
return
end
end
// Comienza el metodo de la secante
while numiter < iter
p = p1 - q1*(p1 - p0)/(q1 - q0);
if abs(p - p1) < tol then
val = p;
return
end
q = f(p);
p0 = p1;
q0 = q1;
p1 = p;
q1 = q;
numiter = numiter + 1;
end
val = p;
endfunction
function [val,numiter] = biseccion(a,b,funcion,tol,iter)
// Funcion que realiza el metodo de biseccion para el calculo de ceros de
// funciones.
// Autor: Jorge Zavaleta
//*****************************************************************************
// ->Entrada
// a (Real) - Numero real que denota el lado izq del intervalo de busqueda.
//
// b (Real) - Numero real que denota el lado derecho del intervalo de busqueda.
//
// funcion (String) - Es la funcion a la cual se le quiere encontrar un cero,
// donde la variable dependiente siempre se denota por x.
// Ejemplo 'sin(x)' para calcular un cero de la funcion
// seno(x).
//
// tol (Real - Opcional) - Numero real que especifica la tolerancia para la
// condicion de paro del metodo. Si no se especifica en
// los parametros de entrada el valor por defecto es
// 1D-10.
//
// iter (Real - Opcional) - Numero real que especifica el numero maximo de
// iteraciones que realiza el metodo (Segunda
// condicion de paro). Si no se especifica en los
// parametros de entrada el valor por defecto es 100.
//
//->Salida
// val (Real) - Numero real con el valor del cero encontrado (funcion(val)=0).
//
// numiter (Real) - Numero real que da el numero de iteraciones que realizo el
// metodo. numiter < iter si se alcanzo la tolerancia (tol) o
// numiter = iter en caso contrario.
//*****************************************************************************
// Se verifica cuantos argumentos de entrada se tiene y se asignan valores por
// defecto a los argumentos opcionales que no se hayan definido
rhs = argn(2); // Da el numero de argumentos de entrada
if rhs < 4 then // Solo se definio el intervalo de busqueda y la funcion
tol = 1D-10;
iter = 100;
elseif rhs < 5 then // Se definio adicionalmente la tolerancia
iter = 100;
end
// Se define la funcion que se quiere evaluar y se inicializa el contador de
// iteraciones
numiter = 0;
cad = 'y=';
funcprot(0)
deff('[y]=f(x)',cad + funcion);
//Comienza el metodo
while (b - a) > tol & numiter < iter
numiter = numiter + 1;
m = (b + a)/2;
if f(m) == 0 then
break;
end
if f(b)*f(m) <= 0 then
a = m;
else
b = m;
end
end
val = m;
endfunction
function [val,numiter] = reglafalsa(p0,p1,funcion,tol,iter)
// Funcion que realiza el metodo de la regla falsa para el calculo de ceros de
// funciones.
// Autor: Jorge Zavaleta
//*****************************************************************************
// ->Entrada
// p0 (Real) - Numero real que denota el lado izq del intervalo de busqueda.
//
// p1 (Real) - Numero real que denota el lado derecho del intervalo de busqueda.
//
// funcion (String) - Es la funcion a la cual se le quiere encontrar un cero,
// donde la variable dependiente siempre se denota por x.
// Ejemplo 'sin(x)' para calcular un cero de la funcion
// seno(x).
//
// tol (Real - Opcional) - Numero real que especifica la tolerancia para la
// condicion de paro del metodo. Si no se especifica en
// los parametros de entrada el valor por default es
// 1D-10.
//
// iter (Real - Opcional) - Numero real que especifica el numero maximo de
// iteraciones que realiza el metodo (Segunda condicion
// de paro). Si no se especifica en los parametros de
// entrada el valor por default es 100.
//
// ->Salida
// val (Real) - Numero real con el valor del cero encontrado (funcion(val)=0).
//
// numiter (Real) - Numero real que da el numero de iteraciones que realizo el
// metodo. numiter<iter si se alcanzo la tolerancia (tol) o
// numiter=iter en caso contrario.
//*****************************************************************************
// Se verifica cuantos argumentos de entrada se tiene y se asignan valores por
// defecto a los argumentos opcionales que no se hayan definido
rhs = argn(2);// Da el numero de argumentos de entrada
if rhs < 4 then // Solo se definio el intervalo de busqueda y la funcion
tol = 1D-10;
iter = 100;
elseif rhs < 5 then // Se definio adicionalmente la tolerancia
iter = 100;
end
// Se define la funcion que se quiere evaluar y se inicializa el contador de
// iteraciones
numiter = 2;
cad1 = 'y=';
funcprot(0)
deff('[y]=f(x)',cad1 + funcion);
// Se calculan las valuaciones de las aproximaciones iniciales
q0 = f(p0);
q1 = f(p1);
// Se verifica si alguna de estas es la solucion
if q0 == 0 then
val = p0;
return
elseif q1 == 0
val = p1;
return
end
// Se mueven las aproximaciones iniciales en el caso que las valuaciones sean
// las mismas (en este caso la secante no corta al eje x)
while q0 == q1
if p0 < p1 then
p1 = p0 + (p1 - p0)/2
q1 = f(p1);
elseif p0 > p1
p0 = p1 + (p0 - p1)/2
q0 = f(p0);
else
val = p0;
return
end
end
// Comienza el metodo de regla falsa
while numiter < iter
p = p1 - q1*(p1 - p0)/(q1 - q0);
if abs(p - p1) < tol then
val = p;
return
end
q = f(p);
if q * q1 < 0 then
p0 = p1;
q0 = q1;
end
p1 = p;
q1 = q;
numiter = numiter + 1;
end
val = p;
endfunction
func="230*x^4 + 18*x^3 + 9*x^2 - 221*x - 9"
disp("Función: 230*x^4 + 18*x^3 + 9*x^2 - 221*x - 9")
disp("Raíz obtenida intervalo [-1,0], usando método biseccion")
[val, numiter] = biseccion(-1,0,func,1D-7)
disp("Valor: "+string(val))
disp("Iteraciones: "+string(numiter))
disp("Raíz obtenida intervalo [0,1], usando método biseccion")
[val, numiter] = biseccion(0,1,func,1D-7)
disp("Valor: "+string(val))
disp("Iteraciones: "+string(numiter))
disp("Raíz obtenida intervalo [-1,0], usando método secante")
[val, numiter] = secante(-1,0,func,1D-7)
disp("Valor: "+string(val))
disp("Iteraciones: "+string(numiter))
disp("Raíz obtenida intervalo [0,1], usando método secante")
[val, numiter] = secante(0.5,1,func,1D-7)
disp("Valor: "+string(val))
disp("Iteraciones: "+string(numiter))
disp("Raíz obtenida intervalo [-1,0], usando método regla falsa")
[val, numiter] = reglafalsa(-1,0,func,1D-7)
disp("Valor: "+string(val))
disp("Iteraciones: "+string(numiter))
disp("Raíz obtenida intervalo [0,1], usando método regla falsa")
[val, numiter] = reglafalsa(0,1,func,1D-7)
disp("Valor: "+string(val))
disp("Iteraciones: "+string(numiter))
disp("Raíz obtenida empezando en 0, usando método newton")
[val, numiter] = newton(0,func,1D-7)
disp("Valor: "+string(val))
disp("Iteraciones: "+string(numiter))
disp("Raíz obtenida empezando en 1, usando método newton")
[val, numiter] = newton(1,func,1D-7)
disp("Valor: "+string(val))
disp("Iteraciones: "+string(numiter))
disp("Como se puede ver el método de newton es muy bueno es el que menos iteraciones realiza para encontrar")
disp("El valor en que se hace cero la función ademas vemos que es super simple de implementar")
disp("Solo es necesario calcular la derivada de la función que se puede aproximar muy bien según la definición")
|
ceed8367acde044630e3134e25bf755ff34422cd
|
717ddeb7e700373742c617a95e25a2376565112c
|
/1766/CH5/EX5.4/EX5_4.sce
|
8c8db0be2c412b83e8e66d0cd9ffaa8fa3f0fea5
|
[] |
no_license
|
appucrossroads/Scilab-TBC-Uploads
|
b7ce9a8665d6253926fa8cc0989cda3c0db8e63d
|
1d1c6f68fe7afb15ea12fd38492ec171491f8ce7
|
refs/heads/master
| 2021-01-22T04:15:15.512674
| 2017-09-19T11:51:56
| 2017-09-19T11:51:56
| 92,444,732
| 0
| 0
| null | 2017-05-25T21:09:20
| 2017-05-25T21:09:19
| null |
UTF-8
|
Scilab
| false
| false
| 1,460
|
sce
|
EX5_4.sce
|
clc;funcprot(0);//Example 5.4
//Initilisation of Variables
L=2;......//Length of flat plate in m
w=2;...//Width of flat plate in m
Tw=293;....//Temparature of water in K
Ta=353;....//Temparature maintained at plate in K
U=3;....//Velocity of water in m/s
//properties of water at 50 degrees celcius//
d=988.1;....//Density of water in kg/m^3
v=0.556*10^-6;...//Velocity of water in m^2/s
K=0.648;...//Thermal conductivity of water in W/m*K
Pr=3.54;....//prandtl number
Re=5*10^5;....//Reynolds number
Rel=10.791*10^6;....//Reynolds number
Xl=0.139;....//DIstance where turbulent flow is possible in m
//calculations
Tf=(Ta+Tw)/2;....//Filim temparature in degrees celcius
Xc=(Re*v)/U;....//Length of the plate upto which the flow is laminar in m
Xct=L-Xc;......//Length of turbulent region
Nua=0.664*Re^(1/2)*Pr^(1/3);....//Average Nusselt number
ha=(Nua*K)/(Xc);...//Heat transfer coefficient of laminar flow in W/m^2 K
Qlam=ha*Xc*L*(Ta-Tw);....//Heat transfer rate from plate in W
Nu=0.036*[(Rel^0.8)-(Re^0.8)]*Pr^(1/3);...//Nusselt number
hat=(Nu*K)/(L-Xl);...//Heat transfer coefficient of turbulent flow in W/m^2 K
Qtur=hat*Xct*L*(Ta-Tw);....//Heat transfer rate from plate in W
Qtot=Qtur+Qlam;.....//Heat transfer from the entire plate in W
disp(Xc,"Length of the plate upto which the flow is laminar in m:")
disp(Qtot,"Heat transfer from the entire plate in W:")
//Variation in answer is result of higher accuracy of scilab
|
2c8666ca46bddad854b5fbcdacdabf37d14ef9a9
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3769/CH2/EX2.16/Ex2_16.sce
|
a0e8b5c5d573b6fcb0bb7425102e30eddaafd5d9
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 200
|
sce
|
Ex2_16.sce
|
clear
//Given
qa=2.5*10**-7
qb=-2.5*10**-7
a=15
b=15
//Calculation
q=qa+qb
C=(a+b)*10**-2
E=qa*C
//Result
printf("\n Total charge is %0.3f \nElectric dipole moment of the system is %0.3f Cm",q,E)
|
e9076f0bb884fc124fbea16a5a583f51586aeb10
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3556/CH11/EX11.18/Ex11_18.sce
|
e4a6775567e4b6d572dbe4fd8076a23174742ded
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 768
|
sce
|
Ex11_18.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 11 : AC power Analysis
// Example 11 - 18
clear; clc; close;
//
// Given data
P = 300.0000;
Vrms = 13.0000;
pf = 0.8000;
Hours = 520;
Energy_Charge = 0.0600;
pf_penalty = 0.001;
pf_credit = 0.001;
// Calculations Energy Consumed
W = P * Hours;
// Calculations Delta Energy Consumed
Delta_W = (5*pf_penalty)*W;
// Calculation Total Energy Consumed
Wt = W + Delta_W;
// Calculations Cost Per Month
Cost = Energy_Charge * Wt;
//
disp("Example 11-18 Solution : ");
printf(" \n a. Cost = Cost For Month = %.3f Dollar",Cost)
|
aecfd286e21b3b96fdf799a06d31dd0e80004345
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3630/CH15/EX15.10/Ex15_10.sce
|
270c4454a8625a4821fd5fefa4cedbcdf6f18ef5
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 220
|
sce
|
Ex15_10.sce
|
clc;
funity=15000000;
Acl=500;
fc=funity/Acl;
BW=fc;
fc1=200000;
AcL=funity/fc1;
disp('kHz',fc/1000,"fc=");//The answers vary due to round off error
disp('',AcL,"AcL=");//The answers vary due to round off error
|
f18a7537edbdb1416917e159f02ee763e0321d8a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1775/CH5/EX5.16/Chapter5_Example16.sce
|
b93ec834cef9ce85913a1b5dfe5fa9075df190d8
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 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,760
|
sce
|
Chapter5_Example16.sce
|
//Chapter-5, Illustration 16, Page 265
//Title: Air Compressors
//=============================================================================
clc
clear
//INPUT DATA
N=220;//Speed of compressor in rpm
P1=1;//Pressure entering LP cylinder in bar
T1=300;//Temperature at point 1 in K
Dlp=0.36;//Bore of LP cylinder in m
Llp=0.4;//Stroke of LP cylinder in m
Lhp=0.4;//Stoke of HP cylinder in m
C=0.04;//Ratio of clearance volumes of both cylinders
P2=4;//Pressure leaving LP cylinder in bar
P5=3.8;//Pressure entering HP cylinder in bar
T3=300;//Temperature entering HP cylinder in K
P6=15.2;//Dicharge pressure in bar
n=1.3;//Adiabatic gas constant
Cp=1.0035;//Specific heat at constant pressure in kJ/kg-K
R=0.287;//Universal gas constant in kJ/kg-K
T5=T1;//Temperature at point 5 in K
//CALCULATIONS
x=(n-1)/n;//Ratio
Vslp=(3.147*(Dlp^2)*Llp*N*2)/4;//Swept volume of LP cylinder in m^3/min
nv=1+C-(C*((P2/P1)^(1/n)));//Volumetric efficiency
V1=nv*Vslp;//Volume of air drawn at point 1 in (m^3)/min
m=(P1*100*V1)/(R*T1);//Mass of air in kg/min
T2=T1*((P2/P1)^x);//Temperature at point 2 in K
QR=m*Cp*(T2-T5);//Heat rejected in kJ/min
V5=(m*R*T5)/(P5*100);//Volume of air drawn in HP cylinder M^3/min
Plp=P2/P1;//Pressure ratio of LP cylinder
Php=P6/P5;//Pressure ratio of HP cylinder
Vshp=V5/nv;//Swept volume of HP cylinder in m^3/min
Dhp=sqrt((Vshp*4)/(3.147*Lhp*N*2));//Bore of HP cylinder in m
P=(m*R*(T2-T1))/(x*60);//Power required for HP cylinder in kW
//OUTPUT
mprintf('Heat rejected in intercooler is %3.1f kJ/min \n Diameter of HP cylinder is %3.4f m \n Power required for HP cylinder is %3.0f kW',QR,Dhp,P)
//==============================END OF PROGRAM=================================
|
2b167d90b7cd19c43debe86e3485dbbcc60ac8c5
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3651/CH3/EX3.11/11.sce
|
6bc122469e3c6e493aeea723c0d5dc236f5db5e9
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 374
|
sce
|
11.sce
|
//Variable declaration
nx=1
ny=1
nz=1
a=1
h=6.63*10**-34
m=9.1*10**-31
//Calculations
E1=h**2*(nx**2+ny**2+nz**2)/(8*m*a**2)
E2=(h**2*6)/(8*m*a**2) //nx**2+ny**2+nz**2=6
diff=E2-E1
//Result
printf('E1 =%0.3f *10**-37 Joule \n ',(E1*10**37))
printf('E2 =%0.3f *10**-37 Joule \n ',(E2*10**37))
printf('E2-E1 =%0.3f *10**-37 J \n ',(diff*10**37))
|
ee71a3ca09ab88060eb6e4f956ec9793cdf3e8a0
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3204/CH17/EX17.2/Ex17_2.sce
|
ba58ea53f60a84be49668c319eb78675550c1dfc
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 830
|
sce
|
Ex17_2.sce
|
// Initiliation of variables
m_g=3000 // kg // mass of the gun
m_s=50 // kg // mass of the shell
v_s=300 // m/s // initial velocity of shell
s=0.6 // m // distance at which the gun is brought to rest
v=0 // m/s // initial velocity of gun
// Calculations
// On equating eq'n 1 & eq'n 2 we get v_g as,
v_g=(m_s*v_s)/(-m_g) // m/s
// Using v^2-u^2=2*a*s to find acceleration,
a=(v^2-v_g^2)/(2*s) // m/s^2
// Force required to stop the gun,
F=m_g*(-a) // N // here we make a +ve to find the Force
// Time required to stop the gun, using v=u+a*t:
t=(-v_g)/(-a) // seconds // we take -a to consider +ve value of acceleration
// Results
clc
printf('The recoil velocity of gun is %f m/s \n',v_g)
printf('The Force required to stop the gun is %f N \n',F)
printf('The time required to stop the gun is %f seconds \n',t)
|
8522339824a51fbb39e8d5f00aa0092a5cacf4c7
|
44c5bd026f039984c8dd48b7cedde971fbae68fa
|
/assets/sces/first_order_system_response.sce
|
51b85a5d9aa3b61c5912462dbe522f08211fbf09
|
[] |
no_license
|
nagahara-masaaki/nagahara-masaaki.github.io
|
65af7c16405c99f6b0f9d999afad1a5701c2b418
|
25f48075a74bc1c355985b3ed1c835eb62eb7387
|
refs/heads/master
| 2023-08-30T20:55:55.063546
| 2023-08-21T00:41:42
| 2023-08-21T00:41:42
| 61,338,396
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 829
|
sce
|
first_order_system_response.sce
|
//// 1次系のインパルス応答と過渡応答
// 初期設定
s = poly(0,'s'); // Laplace 変換の記号 s の定義
// 1次系の構成
T = 10; // 時定数
K = 1; // ゲイン
Gs = K/(T*s+1); // 1次系の伝達関数
// インパルス応答
t = 0:T/100:T*5; // シミュレーションの時間
gt = csim('impulse', t, Gs); // インパルス応答
// インパルス応答の描画
figure;
plot2d(t,gt,style=5)
title('1st-order system')
xlabel('time (sec)')
ylabel('amplitude')
// ステップ応答
t = 0:T/100:T*5; // シミュレーションの時間
yt = csim('step', t, Gs);//ステップ応答
// ステップ応答の描画
plot2d(t,yt,style=2);
A=gca();
P=A.children.children;
P(1).thickness=3;
P(2).thickness=3;
xgrid();
legend('impulse response','step response',1);
|
0d197432563708f984f21d3ad0abbab537cc6e45
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1967/CH18/EX18.1/18_1.sce
|
2aa604b418c1d9bbce449a4b9186e2c32e8fd7a9
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 227
|
sce
|
18_1.sce
|
clc
//initialisation of variables
clear
k1= 16.4 //ml mole^-1
k2= 2.5 //ml mole^-2
k3= -1.2 //ml mole^-3
m= 1 //molal
//CALCULATIONS
Ov= k1+k2*m+k3*m^2
//RESULTS
printf ('Apparent molar volume = %.1f ml mole^-1',Ov)
|
0955e8c8dbf9d01281964d6da32f2c1a51437f31
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3636/CH9/EX9.1/Ex9_1.sce
|
662f1740866828e73b7da2f3c2e6998c0c6b15c5
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 742
|
sce
|
Ex9_1.sce
|
clc;
clear;
Nd=5*10^16 //in cm^-3
Na=10^19 //in cm^-3
d=1.2*10^-4 //in cm
e=1.6*10^-19// in J
epsilon_r=11.7 //in F/cm
epsilon_0=8.85*10^-14 //in F/cm
L=18*10^-4 //in cm
W=80*10^-4 //in micro-W
myu_n=1350 //in cm^2/V*s
ni=1.5*10^10 //in cm^3
VGS=0 //in V
Const=0.026 //constant for kT/e in V
//Calculation
Vp=(e*Nd*d^2)/(2*epsilon_r*epsilon_0) //Pitch-off voltage in V
Ip=(W*myu_n*e^2*Nd^2*d^3)/(epsilon_r*epsilon_0*L) //Pitch-off current in A
Vbi=Const*log((Na*Nd)/ni^2) //in V
ID=Ip*(1/3-((VGS+Vbi)/Vp)+(2/3)*((VGS+Vbi)/Vp)^3/2)
mprintf("a) Pitch-off voltage= %1.1f V\n",Vp)
mprintf("b) Pitch-off current= %.3e A\n",Ip)
mprintf("c) Drain current at pinch-off= %.2e A",ID) //The answers vary dueto round off error
|
ee55d24a16972abdc2bcdc5dca7787b3992a190a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1163/CH3/EX3.21/example_3_21.sce
|
f7f7c5765a27caa0962de3dd23a12ed00a900222
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 646
|
sce
|
example_3_21.sce
|
clear;
clc;
disp("--------------Example 3.21---------------")
printf("An example of a dedicated channel where the entire bandwidth of the medium is used as one single channel is a LAN.\nAlmost every wired LAN today uses a dedicated channel for two stations communicating with each other.\nIn a bus topology LAN with multipoint connections, only two stations can communicate with each other at each moment\nin time (timesharing); the other stations need to refrain from sending data. In a star topology LAN,\nthe entire channel between each station and the hub is used for communication between these two entities."); // display the example
|
8800d13c48f1bd6864257d3287c0fdb098bd3b38
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/698/CH8/EX8.5/P5_dunkerley_method.sce
|
9b231d6ed3e15659ffc9c20ac97261461a99e198
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 735
|
sce
|
P5_dunkerley_method.sce
|
clc
//Example 8.5
// Dunkerley's Method
//------------------------------------------------------------------------------
//Given Data:
W1=1250
a11=6.213e-8
W2=325
a22=10.697e-8
res5= mopen(TMPDIR+'5_dunkerley_method.txt','wt')
w1=sqrt(9.81/(W1*a11))
mfprintf(res5,'w1 = %0.5f rad/s\n',w1)
w2=sqrt(9.81/(W2*a22))
mfprintf(res5,'w2 = %0.5f rad/s\n',w2)
wc=sqrt((w1^2 * w2^2)/(w1^2 + w2^2))
mfprintf(res5,'wc= %0.1f rad/s\n',wc)
Nc=(wc*60)/(2*%pi)
mfprintf(res5,'Nc= %0.1f rad/s',Nc)
mclose(res5);
editor(TMPDIR+'5_dunkerley_method.txt')
//------------------------------------------------------------------------------
//--------------------------------End of program--------------------------------
|
df6039b8c3f256de35cc9ef9a9dbfa663a5c45db
|
52cbfb547384bc9612dc59f5280971ed5a701a9d
|
/Histogram.sce
|
189e3aab5169859ba31ce3682d32b132c7d9f636
|
[] |
no_license
|
allenbenny419/Scilab-Codes
|
efa5402bea6d03088f77dafcf9ed87bd1f93e915
|
48109cd70c8a66a56e87f88152e866565dd52362
|
refs/heads/main
| 2023-06-23T21:10:24.227426
| 2021-07-21T11:09:15
| 2021-07-21T11:09:15
| 388,086,261
| 1
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 262
|
sce
|
Histogram.sce
|
d=rand(1,10000,'normal'); // the gaussian random sample
clf();histplot(20,d)
clf();histplot(20,d,normalization=%f)
clf();histplot(20,d,leg='rand(1,10000,''normal'')',style=5)
clf();histplot(20,d,leg='rand(1,10000,''normal'')',style=16, rect=[-3,0,3,0.5]);
|
6534d9ee562c953195cc5f282c4f9c262a5e0049
|
b667735486117d0c7bb30d616ee6ed37032e947d
|
/online/labca3_5/documentation/xmlhelp/en_US/lcaNewMonitorWait.sci
|
217d6c6f321bee82a136124725cdc3c9bf256de1
|
[
"EPICS",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
KIT-IBPT/MML
|
6b8093aec421162c56ada56daa2d43a1b6977e62
|
4ad8cbb61a36a8b145cc6b17e0b5a3a6b4213c26
|
refs/heads/master
| 2021-08-28T07:39:45.693497
| 2021-08-04T13:14:01
| 2021-08-04T13:14:01
| 226,303,582
| 0
| 0
| null | 2019-12-06T10:28:11
| 2019-12-06T10:28:11
| null |
UTF-8
|
Scilab
| false
| false
| 1,653
|
sci
|
lcaNewMonitorWait.sci
|
function lcaNewMonitorWait
// Similar to [1]lcaNewMonitorValue but instead of returning the status of monitored PVs this routine blocks until all PVs have fresh data available (e.
//
// Calling Sequence
//
//lcaNewMonitorValue(pvs, type)
//
// Description
//
// Similar to [1]lcaNewMonitorValue but instead of returning the status of
// monitored PVs this routine blocks until all PVs have fresh data
// available (e.g., due to initial connection or changes in value and/or
// severity status). Reading the actual data must be done using [2]lcaGet.
//
// Parameters
//
// pvs
// Column vector (in matlab: m x 1 cell- matrix) of m strings.
//
// type
// (optional argument) A string specifying the data type to be used
// for the channel access data transfer. The native type is used by
// default. See [3]here for more information.
//
// Note that monitors are specific to a particular data type and
// therefore lcaNewMonitorWait will only report the status for a
// monitor that had been established (by [4]lcaSetMonitor) with a
// matching type. Using the ``native'' type, which is the default,
// for both calls satisfies this condition.
//
// Examples
//
//try lcaNewMonitorWait(pvs)
// vals = lcaGet(pvs)
//catch
// errs = lcaLastError()
// handleErrors(errs)
//end
// __________________________________________________________________
//
//
// till 2017-08-08
//
//See also
//
// lcaNewMonitorValue 1. lcaNewMonitorValue
// lcaGet 2. lcaGet
// lcaGet 3. lcaGet
// lcaSetMonitor 4. lcaSetMonitor
endfunction
|
d7b0294dac73ef3c25baf2f6156751315a762860
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1658/CH10/EX10.1/Ex10_1.sce
|
05e8a3c63c8b826f6a13ceac9b9192d38aacc15b
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 293
|
sce
|
Ex10_1.sce
|
clc;
//e.g 10.1
Ic=10;
Vce=10;
hie=500;
hoe=10**-5;
hfe=100;
hre=10**-4;
gm=Ic/25;
disp('ohm',gm*1,"gm=");
rbe=hfe/gm;
disp('ohm',rbe*1,"rbe=");
rbb=hie-rbe;
disp(rbb);
gbc=hre/rbe;
disp('*10^-7',gbc*10**7,"gbc=");
rce=-1/((hoe-(1+hfe)*gbc));
disp('kohm',rce*10**-3,"rce=");
|
463df0f263ca3605073f7de4be8de3d3996a7adc
|
cbe0200a4874e9b1f2961da2da9623eade0d2006
|
/BogoSort.sce
|
82b4e20f73dbcee5e1bfb12861799851c6c3a94f
|
[] |
no_license
|
DylanMeeus/Scilab
|
d8ed392c28e2bf8662236a2fc8445eda67c91933
|
c8c2935f28226e7ea887df90398426f712ec94cf
|
refs/heads/master
| 2021-01-25T08:28:58.690792
| 2014-09-01T16:12:37
| 2014-09-01T16:12:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 1,200
|
sce
|
BogoSort.sce
|
// bogosort algorithm
clear;
function bogoSort()
// generate a vector of random numbers
clear;
bogoList = []
for i=1:100
bogoList(i) = round(rand()*10)
end
// We have now created a list of randomly generated numbers (0-100)
// We check to see if the numbers are sorted - if not - we jumble them up!
isSorted = checkSort(bogoList)
while(~isSorted)
disp('Try again')
bogoList = mixList(bogoList)
isSorted = checkSort(bogoList)
disp(bogoList)
c = [1:length(bogoList)]
clf();plot2d(c,bogoList)
input('space to shuffleeeeee!')
end
endfunction
function y=mixList(unsortedList)
for i=1:length(unsortedList)
randomPos = round(1+rand()*(length(unsortedList)-1))
currentNum = unsortedList(i)
unsortedList(i) = unsortedList(randomPos)
unsortedList(randomPos)=currentNum;
end
y=unsortedList
endfunction
function x=checkSort(sortedList)
x=%T
for i=1:length(sortedList)-1
if(sortedList(i)>sortedList(i+1))
// If the previous number is larger than the current one
x=%F
break;
end
end
endfunction
|
402c720542f3ef6665e44a5f773ab5bae8ad14a9
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/770/CH13/EX13.4/13_4.sce
|
8915b15529e881fc178cbbb921a4906848947a29
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817
| 2018-02-03T05:31:52
| 2018-02-03T05:31:52
| 37,975,407
| 3
| 12
| null | null | null | null |
UTF-8
|
Scilab
| false
| false
| 483
|
sce
|
13_4.sce
|
clear;
clc;
//Example - 13.4
//Page number - 436
printf("Example - 13.4 and Page number - 436\n\n");
//This problem involves proving a relation in which no mathematics and no calculations are involved.
//For prove refer to this example 13.4 on page number 436 of the book.
printf(" This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n");
printf(" For prove refer to this example 13.4 on page number 436 of the book.")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.