blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 6
214
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
50
| license_type
stringclasses 2
values | repo_name
stringlengths 6
87
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 15
values | visit_date
timestamp[us]date 2016-08-04 09:00:04
2023-09-05 17:18:33
| revision_date
timestamp[us]date 1998-12-11 00:15:10
2023-09-02 05:42:40
| committer_date
timestamp[us]date 2005-04-26 09:58:02
2023-09-02 05:42:40
| github_id
int64 436k
586M
⌀ | star_events_count
int64 0
12.3k
| fork_events_count
int64 0
6.3k
| gha_license_id
stringclasses 7
values | gha_event_created_at
timestamp[us]date 2012-11-16 11:45:07
2023-09-14 20:45:37
⌀ | gha_created_at
timestamp[us]date 2010-03-22 23:34:58
2023-01-07 03:47:44
⌀ | gha_language
stringclasses 36
values | src_encoding
stringclasses 17
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 1
class | length_bytes
int64 5
10.4M
| extension
stringclasses 15
values | filename
stringlengths 2
96
| content
stringlengths 5
10.4M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dbe0107c364bbdec781ba6624d9349009292eafd
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2153/CH3/EX3.5/ex_3_5.sce
|
e1c7d58d40eb63b992e38ba92aade2200abfc2eb
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 368 |
sce
|
ex_3_5.sce
|
//Example 3.5: miller indices
clc;
clear;
close;
//given data
x1=1;//
x2=1;//
x3=0;//
h1=1/x1//
h2=1/x2;//
h3=%inf;//
disp("Miller indices of the plane (110) are: "+string(h1)+","+string(h2)+","+string(h3))
x11=1;//
x21=1;//
x31=1;//
h11=1/x11;//
h21=1/x21;//
h31=1/x31;//
disp("Miller indices of the plane (111) are : "+string(h11)+","+string(h21)+","+string(h31))
|
b355388cadc08801b5e5ef65043c6e966350c2cd
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2240/CH32/EX31.4/EX31_4.sce
|
33f61e938efa1b855aeb885695b71e7821cfbc83
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 595 |
sce
|
EX31_4.sce
|
// Grob's Basic Electronics 11e
// Chapter No. 31
// Example No. 31_4
clear; clc;
// Calculate the following quantities Pl, Pcc & percent efficiency
// Given data
Rl = 8; // Load Resistor=8 Ohms
Vopp = 50; // Output Voltage(p-p)=50 Volts(p-p)
Vcc = 30; // Supply Voltage(Collector)=30 Volts
Vopk = Vopp/2; // Output Voltage(peak)
Pl = (Vopp*Vopp)/(8*Rl);
disp (Pl,'The Load Power in Watts');
Pcc = Vcc*0.636*(Vopk/Rl);
disp (Pcc,'The DC Input Power in Watts')
efficiency = ((Pl/Pcc)*100);
disp (efficiency,'The Efficiency in % is');
|
12bb791d96296eb4df16f9e57128481591c666c2
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/149/CH1/EX1.25/ex25.sce
|
adcc38d188590d01a3208b550f3875048b77b3b4
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 258 |
sce
|
ex25.sce
|
clear
clc
xset('window',3)
xtitle("My Graph","X axis","Y axis")
x=linspace(0,3,30)
y1=-sec(x)
y2=cosh(x)
plot(x,y1,"o-")
plot(x,y2,"+-")
legend("-sec(x)","cosh(x)")
disp("from the graph,it is clear that the point of intersection is nearly x=2.3 ")
|
e8ea4be1cad1525c4be42c85871fe46824998440
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/929/CH13/EX13.8/Example13_8.sce
|
ea67bcd689462d66ef2b2ee6e6ba6addec1eb00f
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 906 |
sce
|
Example13_8.sce
|
//Example 13.8
clear;
clc;
fOmin=1*10^6;
fI=1*10^3;
fOmax=2*10^6;
Nmin=fOmin/fI;
Nmax=fOmax/fI;
f0=(fOmin+fOmax)/2;
fR=f0/2;
vEmax=3.9;
vEmin=1.1;
Ko=(2*%pi*2*fR)/(vEmax-vEmin);
R1=28*10^3;
R2=287*10^3;
C=110*10^(-12);
VDD=5;
Kd=5/(4*%pi);
Kv=10^4;
Nmean=sqrt(Nmin*Nmax);
Kvmean=(Kd*Ko)/Nmean;
zeta=0.707;
fI=1*10^3;
wI=2*%pi*fI;
wn=wI/20;
wp=(wn^2)/Kv;
wz=wn/(2*zeta);
printf("R1=%.1f kohms",R1*10^(-3));
printf("\nR2=%.f kohms",R2*10^(-3));
printf("\nC=%.f pF",C*10^12);
printf("\nfI=%.d kHz",fI*10^(-3));
R3=6.17*10^3;
R4=3.45*10^3;
C1=1*10^(-6);
//Filter Components are taken from figure 13.33, as no procedure is mentioned for designing the filter
printf("\nFilter Components :");
printf("\nR3=%.2f kohms",R3*10^(-3));
printf("\nC1=%.f uF",C1*10^6);
printf("\nR4=%.2f kohms",R4*10^(-3));
|
7739f91a92341448b38b18b4c3bae1915f182649
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3769/CH25/EX25.18/Ex25_18.sce
|
57dd880fdca49616ad53101b209afbda88796bb7
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 325 |
sce
|
Ex25_18.sce
|
clear
//Given
T=30.0
//Calculation
//
l=0.693/T
T1=1/l
t=log(4)/l
t1=log(8)/l
//Result
printf("\n (i) average life is %0.4f /day",l)
printf("\n (ii) The time taken for 3/4 of the original no. to disintegrate is %0.2f days",T1)
printf("\n (iii) Time taken is %0.0f days",t)
printf("\n (iv) Time taken is %0.0f days",t1)
|
e4536651189421b5e4a4a6e191f16692c91518eb
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2792/CH9/EX9.10/Ex9_10.sce
|
5d86ffe8803a433c4d7562b9c629d2306466ee31
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,254 |
sce
|
Ex9_10.sce
|
clc
kbT = 0.026
disp("kbT = "+string(kbT)+"eV") //initializing value of kbT at 300K
apsilen = 11.9*8.85*10^-14
disp("apsilen = "+string(apsilen)+"F/cm") //initializing value of relative permitivity
e = 1.6*10^-19
disp("e= "+string(e)+"C")//initializing value of charge of electron
Na=2*10^16
disp("Na = "+string(Na)+"cm^-3") //initializing value of doped carrier concentration
ni = 1.5*10^10
disp("ni= "+string(ni)+"cm^-3")//initializing value of intrinsic carrier concentration
VSB = 1
disp("VSB= "+string(VSB)+"V")//initializing value of sorce body voltage
apsilen_ox = 3.9*8.85*10^-14
disp("apsilen_ox= "+string(apsilen_ox))//initializing value of relative permitivity of oxide
dox = 500*10^-8
disp("dox= "+string(dox)+"cm")//initializing value of thickness of oxide
Cox = apsilen_ox/dox
disp("The oxide capicitance per unit area is ,Cox = apsilen_ox/dox= "+string(Cox)+" F*cm^-2")//calculation
phi_F= (-kbT*log(Na/ni))
disp("The potential phi_F= (-kbT*log(Na/ni))= "+string(phi_F)+" V")//calculation
dVT = ((sqrt(2*e*apsilen*Na)/Cox)*((sqrt((-2*phi_F)+VSB)-sqrt(-2*phi_F))))
disp(" The shift in threshold voltage is ,dVT = ((sqrt(2*e*apsilen*Na)/Cox)*((sqrt((-2*phi_F)+VSB)-sqrt(-2*phi_F)))) = "+string(dVT)+" V")//calculation
|
2a34d3dd5135e0618021dddad6a2c5de35da26b2
|
abd7728083df51a785c94e61999237380b32c4f8
|
/examples/Presentation Packs/Cognitive Psychology Experiments III (Version 3)/Vigilance/Scenarios/Vigilance.sce
|
0029a2ae34025559e333faaf7e33f8361ed5bea2
|
[] |
no_license
|
LCTO-TLCO/UAVpresentation
|
93b0c0e0eb123b550218bbae4e0bb1db8c30cb5e
|
83e0f22cfdc2b7172bf0b90a9a14ddf77e6ccf2a
|
refs/heads/master
| 2023-07-25T14:03:39.874916 | 2021-09-07T07:19:38 | 2021-09-07T07:19:38 | 301,918,691 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 17,061 |
sce
|
Vigilance.sce
|
# -------------------------- Header Parameters --------------------------
scenario = "Vigilance";
write_codes = EXPARAM( "Send ERP Codes" );
default_font_size = EXPARAM( "Default Font Size" );
default_background_color = EXPARAM( "Default Background Color" );
default_text_color = EXPARAM( "Default Font Color" );
default_font = EXPARAM( "Default Font" );
max_y = 100;
active_buttons = 1;
response_matching = simple_matching;
stimulus_properties =
event_cond, string,
block_name, string,
block_number, number,
trial_number, number,
tgt_location, string,
stim_type, string,
ISI_dur, number;
event_code_delimiter = ";";
# ------------------------------- SDL Part ------------------------------
begin;
trial {
trial_duration = forever;
trial_type = specific_response;
terminator_button = 1;
picture {
text {
caption = "Instructions";
preload = false;
} instruct_text;
x = 0;
y = 0;
};
} instruct_trial;
trial {
clear_active_stimuli = false;
stimulus_event {
picture {} stim_pic;
} stim_event;
} stim_trial;
trial {
stimulus_event {
picture {
text {
caption = "+";
font_size = EXPARAM( "Fixation Point Size" );
font_color = EXPARAM( "Fixation Point Color" );
} fix_text;
x = 0;
y = 0;
} ISI_pic;
code = "ISI";
} ISI_event;
} ISI_trial;
# ----------------------------- PCL Program -----------------------------
begin_pcl;
include_once "../../Library/lib_visual_utilities.pcl";
include_once "../../Library/lib_utilities.pcl";
# --- Constants ---
string SPLIT_LABEL = "[SPLIT]";
string LINE_BREAK = "\n";
int BUTTON_FWD = 1;
int BUTTON_BWD = 0;
string STIM_EVENT_CODE = "Stim";
string PRACTICE_TYPE_PRACTICE = "Practice";
string PRACTICE_TYPE_MAIN = "Main";
string COND_TGT = "Target";
string COND_NTGT = "Non-target";
string LANGUAGE_FILE_TOTAL_BLOCKS_LABEL = "[TOTAL_BLOCKS]";
string LANGUAGE_FILE_BLOCK_NUMBER_LABEL = "[BLOCK_NUMBER]";
string TARGET_SIDE_LABEL = "[TARGET_SIDE]";
string TGT_LEFT = "Left";
string TGT_RIGHT = "Right";
string TGT_TOP = "Top";
string TGT_BOTTOM = "Bottom";
int PORT_CODE_TGT = 10;
int PORT_CODE_NTGT = 110;
int COND_TGT_IDX = 1;
int COND_NTGT_IDX = 2;
int BUTTON_TGT = 1;
int BUTTON_NTGT = 0;
string CHARACTER_WRAP = "Character";
# --- Set up fixed stimulus parameters ---
string language = parameter_manager.get_string( "Language" );
language_file lang = load_language_file( scenario_directory + language + ".xml" );
bool char_wrap = ( get_lang_item( lang, "Word Wrap Mode" ).lower() == CHARACTER_WRAP.lower() );
adjust_used_screen_size( parameter_manager.get_bool( "Use Widescreen if Available" ) );
double font_size = parameter_manager.get_double( "Default Font Size" );
trial_refresh_fix( stim_trial, parameter_manager.get_int( "Stimulus Duration" ) );
# --- Stimulus Setup ---
array<double> stim_locs[2][2] = { { 0.0, 0.0 }, { 0.0, 0.0 } };
string tgt_pos = parameter_manager.get_string( "Target Position" );
box stim_box = new box( 1.0, 1.0, parameter_manager.get_color( "Stimulus Box Color" ) );
box tgt_box = new box( 1.0, 1.0, parameter_manager.get_color( "Target Color" ) );
int box_part;
begin;
# Grab the box dimensions from parameter settings, exit if bad
array<double> stim_dims[0];
parameter_manager.get_doubles( "Stimulus Box Dimensions", stim_dims );
if ( stim_dims.count() != 2 ) then
exit( "Error: 'Stimulus Box Dimensions' must contain two values (width and height)." );
end;
array<double> tgt_dims[0];
parameter_manager.get_doubles( "Target Dimensions", tgt_dims );
if ( tgt_dims.count() != 2 ) then
exit( "Error: 'Target Dimensions' must contain two values (width and height)." );
end;
# Set the box sizes
stim_box.set_width( stim_dims[1] );
stim_box.set_height( stim_dims[2] );
tgt_box.set_width( tgt_dims[1] );
tgt_box.set_height( tgt_dims[2] );
# Find the positions of the tgt and stimulus boxes
# Based on buffer size and parameter setting
double buffer = parameter_manager.get_double( "Target Position Buffer" );
if ( tgt_pos == TGT_LEFT ) || ( tgt_pos == TGT_RIGHT ) then
if ( tgt_dims[1] + buffer >= ( stim_dims[1]/2.0 ) ) then
exit( "Error: Target width must be less than half the total stimulus width for left/right targets." );
end;
double temp_pos = ( stim_dims[1]/2.0 ) - ( tgt_dims[1]/2.0 ) - buffer;
if ( tgt_pos == TGT_LEFT ) then
stim_locs[COND_TGT_IDX][1] = -temp_pos;
stim_locs[COND_NTGT_IDX][1] = temp_pos;
else
stim_locs[COND_TGT_IDX][1] = temp_pos;
stim_locs[COND_NTGT_IDX][1] = -temp_pos;
end;
else
if ( tgt_dims[2] + buffer >= ( stim_dims[2]/2.0 ) ) then
exit( "Error: Target height must be less than half the total stimulus height for top/bottom targets." );
end;
double temp_pos = ( stim_dims[2]/2.0 ) - ( tgt_dims[2]/2.0 ) - buffer;
if ( tgt_pos == TGT_TOP ) then
stim_locs[COND_TGT_IDX][2] = temp_pos;
stim_locs[COND_NTGT_IDX][2] = -temp_pos;
else
stim_locs[COND_TGT_IDX][2] = -temp_pos;
stim_locs[COND_NTGT_IDX][2] = temp_pos;
end;
end;
# Add the stim and tgt to the stim picture
stim_pic.add_part( stim_box, 0, 0 );
stim_pic.add_part( tgt_box, 0, 0 );
box_part = stim_pic.part_count();
# Build the ISI pic
ISI_pic.clear();
if ( parameter_manager.get_bool( "Show Stimulus Box During ISI" ) ) then
ISI_pic.add_part( stim_box, 0, 0 );
fix_text.set_background_color( parameter_manager.get_color( "Stimulus Box Color" ) );
fix_text.redraw();
end;
if ( parameter_manager.get_bool( "Show Fixation Point" ) ) then
ISI_pic.add_part( fix_text, 0, 0 );
fix_text.redraw();
end;
end;
# --- sub main_instructions --- #
string next_screen = get_lang_item( lang, "Next Screen Caption" );
string prev_screen = get_lang_item( lang, "Previous Screen Caption" );
string final_screen = get_lang_item( lang, "Start Experiment Caption" );
string split_final_screen = get_lang_item( lang, "Multi-Screen Start Experiment Caption" );
bool split_instrucs = parameter_manager.get_bool( "Multi-Screen Instructions" );
sub
main_instructions( string instruct_string )
begin
bool has_splits = instruct_string.find( SPLIT_LABEL ) > 0;
# Split screens only if requested and split labels are present
if ( has_splits ) then
if ( split_instrucs ) then
# Split at split points
array<string> split_instructions[0];
instruct_string.split( SPLIT_LABEL, split_instructions );
# Hold onto the old terminator buttons for later
array<int> old_term_buttons[0];
instruct_trial.get_terminator_buttons( old_term_buttons );
array<int> new_term_buttons[0];
new_term_buttons.add( BUTTON_FWD );
# Present each screen in sequence
loop
int i = 1
until
i > split_instructions.count()
begin
# Remove labels and add screen switching/start experiment instructions
# Remove leading whitespace
string this_screen = split_instructions[i];
this_screen = this_screen.trim();
this_screen = this_screen.replace( SPLIT_LABEL, "" );
this_screen.append( LINE_BREAK + LINE_BREAK );
# Add the correct button options
bool can_go_backward = ( i > 1 ) && ( BUTTON_BWD > 0 );
new_term_buttons.resize( 0 );
new_term_buttons.add( BUTTON_FWD );
if ( can_go_backward ) then
new_term_buttons.add( BUTTON_BWD );
this_screen.append( prev_screen + " " );
end;
if ( i < split_instructions.count() ) then
this_screen.append( next_screen );
else
this_screen.append( split_final_screen );
end;
instruct_trial.set_terminator_buttons( new_term_buttons );
# Word wrap & present the screen
full_size_word_wrap( this_screen, font_size, char_wrap, instruct_text );
instruct_trial.present();
if ( response_manager.last_response_data().button() == BUTTON_BWD ) then
if ( i > 1 ) then
i = i - 1;
end;
else
i = i + 1;
end;
end;
# Reset terminator buttons
instruct_trial.set_terminator_buttons( old_term_buttons );
else
# If the caption has splits but multi-screen isn't requested
# Remove split labels and present everything on one screen
string this_screen = instruct_string.replace( SPLIT_LABEL, "" );
this_screen = this_screen.trim();
this_screen.append( LINE_BREAK + LINE_BREAK + final_screen );
full_size_word_wrap( this_screen, font_size, char_wrap, instruct_text );
instruct_trial.present();
end;
else
# If no splits and no multi-screen, present the entire caption at once
full_size_word_wrap( instruct_string, font_size, char_wrap, instruct_text );
instruct_trial.present();
end;
default.present();
end;
# --- sub present_instructions ---
sub
present_instructions( string instruct_string )
begin
full_size_word_wrap( instruct_string, font_size, char_wrap, instruct_text );
instruct_trial.present();
default.present();
end;
# --- sub block_status ---
string block_complete = get_lang_item( lang, "Block Complete Caption" );
sub
block_status( int total_blocks, int current_block )
begin
if ( current_block < total_blocks ) then
string block_temp = block_complete.replace( LANGUAGE_FILE_TOTAL_BLOCKS_LABEL, string(total_blocks) );
block_temp = block_temp.replace( LANGUAGE_FILE_BLOCK_NUMBER_LABEL, string(current_block) );
present_instructions( block_temp );
end;
end;
# --- sub show_block
int num_blocks = parameter_manager.get_int( "Blocks" );
array<int> ISI_durations[0];
parameter_manager.get_ints( "ISI Durations", ISI_durations );
if ( ISI_durations.count() == 0 ) then
exit( "Error: 'ISI Durations' must contain at least one value." );
end;
array<string> tgt_conds[2];
tgt_conds[COND_TGT_IDX] = COND_TGT;
tgt_conds[COND_NTGT_IDX] = COND_NTGT;
array<int> buttons[2];
buttons[COND_TGT_IDX] = BUTTON_TGT;
buttons[COND_NTGT_IDX] = BUTTON_NTGT;
array<int> p_codes[2];
p_codes[COND_TGT_IDX] = PORT_CODE_TGT;
p_codes[COND_NTGT_IDX] = PORT_CODE_NTGT;
# -- Set up info for summary stats -- #
int SUM_BLOCK_IDX = 1;
int SUM_COND_IDX = 2;
# Put all the condition names into an array
# Used later to add column headings
array<string> cond_names[2][0];
cond_names[SUM_COND_IDX].assign( tgt_conds );
loop
int i = 1
until
i > num_blocks
begin
cond_names[SUM_BLOCK_IDX].add( string(i) );
i = i + 1;
end;
# Now build an empty array for all DVs of interest
array<int> acc_stats[cond_names[1].count()][cond_names[2].count()][0];
array<int> RT_stats[cond_names[1].count()][cond_names[2].count()][0];
# --- End Summary Stats --- #
sub
double show_block( array<int,1>& block_order, string prac_check, int block_num )
begin
# Randomize the trial order
block_order.shuffle();
# Start with an ISI
trial_refresh_fix( ISI_trial, ISI_durations[random(1,ISI_durations.count())] );
ISI_trial.present();
# Show the trials
double block_acc = 0.0;
loop
int hits = 0;
int i = 1
until
i > block_order.count()
begin
int this_stim = block_order[i];
# Set up the picture
stim_pic.set_part_x( box_part, stim_locs[this_stim][1] );
stim_pic.set_part_y( box_part, stim_locs[this_stim][2] );
# Set target button
stim_event.set_target_button( buttons[this_stim] );
stim_event.set_response_active( true );
# Set ISI
trial_refresh_fix( ISI_trial, ISI_durations[random(1,ISI_durations.count())] );
# Set port code
stim_event.set_port_code( p_codes[this_stim] );
# Set event code
stim_event.set_event_code(
STIM_EVENT_CODE + ";" +
prac_check + ";" +
string( block_num ) + ";" +
string( i ) + ";" +
tgt_pos + ";" +
tgt_conds[this_stim] + ";" +
string( ISI_trial.duration() )
);
# Present the trial sequence
stim_trial.present();
stimulus_data last = stimulus_manager.last_stimulus_data();
ISI_trial.present();
# Update the block accuracy
if ( last.type() == last.HIT ) || ( last.type() == last.OTHER ) then
hits = hits + 1;
end;
block_acc = double( hits ) / double( i );
# Record trial info for summary stats
if ( prac_check == PRACTICE_TYPE_MAIN ) then
# Make an int array specifying the condition we're in
# This tells us which subarray to store the trial info
array<int> this_trial[cond_names.count()];
this_trial[SUM_BLOCK_IDX] = block_num;
this_trial[SUM_COND_IDX] = this_stim;
int this_acc = int( last.type() == last.HIT || last.type() == last.OTHER );
acc_stats[this_trial[1]][this_trial[2]].add( this_acc );
if ( last.reaction_time() > 0 ) then
RT_stats[this_trial[1]][this_trial[2]].add( last.reaction_time() );
end;
end;
i = i + 1;
end;
return block_acc
end;
# --- Conditions & Trial Order --- #
array<int> cond_array[0][0];
array<int> prac_array[0];
begin
# Grab the trial counts
array<int> tgt_set[0];
parameter_manager.get_ints( "Targets per Block", tgt_set );
array<int> ntgt_set[0];
parameter_manager.get_ints( "Non-targets per Block", ntgt_set );
# If the trial count arrays aren't the right size, then exit
if ( tgt_set.count() != num_blocks ) || ( ntgt_set.count() != num_blocks ) then
exit( "Error: 'Targets per Block' and 'Non-targets per Block' must both contain " + string( num_blocks ) + " values." );
end;
# Loop through the trial count arrays to build block orders
# Add each block order to the cond array
loop
int i = 1
until
i > num_blocks
begin
# Make a temporary block order and fill it with the correct
# number of targets and non-targets
array<int> temp_block[tgt_set[i] + ntgt_set[i]];
temp_block.fill( 1, 0, COND_TGT_IDX, 0 );
temp_block.fill( 1, ntgt_set[i], COND_NTGT_IDX, 0 );
# Shuffle the trial order
temp_block.shuffle();
# Add this block to the conditiona array
cond_array.add( temp_block );
i = i + 1;
end;
# Shuffle the block order if requested
if ( parameter_manager.get_bool( "Randomize Block Order" ) ) then
cond_array.shuffle();
end;
# Build the practice array
int prac_trials = parameter_manager.get_int( "Practice Trials" );
loop
until
prac_array.count() >= prac_trials
begin
prac_array.add( cond_array[1][random(1,cond_array[1].count())] );
end;
end;
# --- Main Sequence ---
bool show_block_status = parameter_manager.get_bool( "Show Status Between Blocks" );
int prac_threshold = parameter_manager.get_int( "Minimum Percent Correct to Complete Practice" );
string instructions = get_lang_item( lang, "Instructions" );
instructions = instructions.replace( TARGET_SIDE_LABEL, parameter_manager.get_string( "Target Position Label" ) );
# Practice trials and/or instructions
if ( prac_array.count() > 0 ) then
main_instructions( instructions + " " + get_lang_item( lang, "Practice Caption" ) );
loop
double block_accuracy = -1.0
until
block_accuracy >= ( double( prac_threshold ) / 100.0 )
begin
block_accuracy = show_block( prac_array, PRACTICE_TYPE_PRACTICE, 0 );
end;
present_instructions( get_lang_item( lang, "Practice Complete Caption" ) );
else
main_instructions( instructions );
end;
# loop to present blocks
loop
int a = 1
until
a > cond_array.count()
begin
show_block( cond_array[a], PRACTICE_TYPE_MAIN, a );
if ( show_block_status ) then
block_status( cond_array.count(), a );
end;
a = a + 1;
end;
present_instructions( get_lang_item( lang, "Completion Screen Caption" ) );
# --- Print Summary Stats --- #
string sum_log = logfile.filename();
if ( sum_log.count() > 0 ) then
# Open & name the output file
string TAB = "\t";
int ext = sum_log.find( ".log" );
sum_log = sum_log.substring( 1, ext - 1 ) + "-Summary-" + date_time( "yyyymmdd-hhnnss" ) + ".txt";
string subj = logfile.subject();
output_file out = new output_file;
out.open( sum_log );
# Print the headings for each columns
array<string> cond_headings[cond_names.count() + 1];
cond_headings[1] = "Subject ID";
cond_headings[SUM_BLOCK_IDX + 1] = "Block";
cond_headings[SUM_COND_IDX + 1] = "Target Type";
cond_headings.add( "Accuracy" );
cond_headings.add( "Accuracy (SD)" );
cond_headings.add( "Avg RT" );
cond_headings.add( "Avg RT (SD)" );
cond_headings.add( "Median RT" );
cond_headings.add( "Number of Trials" );
cond_headings.add( "Date/Time" );
loop
int i = 1
until
i > cond_headings.count()
begin
out.print( cond_headings[i] + TAB );
i = i + 1;
end;
# Loop through the DV arrays to print each condition in its own row
# Following the headings set up above
loop
int i = 1
until
i > acc_stats.count()
begin
loop
int j = 1
until
j > acc_stats[i].count()
begin
out.print( "\n" + subj + TAB );
out.print( cond_names[1][i] + TAB );
out.print( cond_names[2][j] + TAB );
out.print( round( arithmetic_mean( acc_stats[i][j] ), 3 ) );
out.print( TAB );
out.print( round( sample_std_dev( acc_stats[i][j] ), 3 ) );
out.print( TAB );
out.print( round( arithmetic_mean( RT_stats[i][j] ), 3 ) );
out.print( TAB );
out.print( round( sample_std_dev( RT_stats[i][j] ), 3 ) );
out.print( TAB );
out.print( round( median_value( RT_stats[i][j] ), 3 ) );
out.print( TAB );
out.print( acc_stats[i][j].count() );
out.print( TAB );
out.print( date_time() );
j = j + 1;
end;
i = i + 1;
end;
# Close the file and exit
out.close();
end;
|
cb42d3344cc29a31d9c63a60b6803986b3f8132d
|
df9b25ceab5916f0a9256bce2d326a82f8daa2b8
|
/app/public/views/home.sce
|
151e46e2c57fa50694205e8a0b21434f048ed0b9
|
[] |
no_license
|
TheBrenny/SAD-assignment2
|
6625611ebde9619ca45bdb7996ef51a653868059
|
1f2b247c275b2d3327e58b8752d3e2e5a0cc5823
|
refs/heads/master
| 2023-01-21T16:46:45.535129 | 2020-11-02T01:22:18 | 2020-11-02T01:22:18 | 297,238,799 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 675 |
sce
|
home.sce
|
[[i= partials/header ]]
<pre>
✅ Add a student to the DB
🔄 Record attendance (present in backend - UI not designed)
🔄 Record activity completed (present in backend - UI not designed)
✅ Search for students
✅ By Name
⬛ By Student number
⬛ By Age
⬛ By Activities Completed
⬛ By Activities Not Completed
⬛ Notify staff when a student completes a badge (NO)
⬛ Search for Activities that are widely NOT completed
⬛ Edit details for stuff
⬛ Student
⬛ Attendance
⬛ Activity
⬛ more?
⬛ Activity Planner
⬛ Staff Running Activity
⬛ more?
</pre>
[[i= partials/footer ]]
|
98fdf873b3db41ffea6118171c338a5e2b8fac94
|
4be0defdbe24271cce8f61cece32e7a4b15c65af
|
/signal_s1/ldussouc_tdimage/ldussouc.sce
|
e75cc9457c06346f00317fffcf3958551d0194d2
|
[] |
no_license
|
imac2018/tds
|
2c41830e26435bb2b8c4a40b3700c9f166bba4dc
|
8712438b81088d2f2d9c691b3c689e0926c597f5
|
refs/heads/master
| 2020-05-30T07:19:34.709677 | 2017-05-24T09:42:23 | 2017-05-24T09:42:23 | 69,675,399 | 2 | 2 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 1,094 |
sce
|
ldussouc.sce
|
y = imread("M:\Documents\c++\tds\signal_s1\ldussouc_tdimage/koala.jpg")
y_mono = y(:,:, 1)
function ret = moyenneur(img)
ret = img
for i = [2:1:299]
for j = [2:1:299]
moyenne = img(i,j) /9 + img(i+1,j) /9 + img(i-1,j) /9 + img(i,j+1) /9 + img(i,j-1) /9 + img(i-1,j-1) /9 + img(i+1,j+1) /9 + img(i-1,j+1) /9 + img(i+1,j-1) /9
ret(i,j) = floor(moyenne)
end
end
endfunction
function ret = derivateurH(img)
ret = img
for i = [2:1:299]
for j = [2:1:299]
ret(i,j) = abs(img(i-1,j) - img(i+1,j))
end
end
endfunction
function ret = median(img)
ret = img
for i = [2:1:299]
for j = [2:1:299]
tableau = [img(i,j), img(i+1,j), img(i-1,j), img(i,j+1), img(i,j-1), img(i-1,j-1), img(i+1,j+1), img(i-1,j+1), img(i+1,j-1)]
tableau_trie = gsort(tableau,'g','i')
ret(i,j) = tableau_trie(5)
end
end
endfunction
y_mono_moyenneur = moyenneur(y_mono)
y_mono_derivateurH = derivateurH(y_mono)
y_mono_median = median(y_mono)
imshow(y_mono_median)
|
1c9f3aaa580acf5989dee04be1400bc0a57376dc
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3685/CH8/EX8.6/Ex8_6.sce
|
e035ba4f858f296d0abe3f2cf79eabf96a791e5c
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,001 |
sce
|
Ex8_6.sce
|
clc
T1_ = 80 // Initial temperature of air in degree Celsius
T2_ = 5 // Final temperature of air in degree Celsius
V2 = 2 // Assumed final volume
V1 = 1 // Assumed initial volume
P0 = 100 // Final pressure of air in kPa
P1 = 500 // Initial pressure of air in kPa
R = 0.287 // Gas constant
cv = 0.718 // Specific heat capacity at constant volume for gas in kJ/kg K
m = 2 // Mass of gas in kg
printf("\n Example 8.6")
T1= T1_+273 // Initial temperature of air in K
T2 = T2_+273 // Final temperature of air in K
S = integrate('(m*cv)/T','T',T1,T2) + integrate('(m*R)/V','V',V1,V2) // Entropy change
U = m*cv*(T1-T2)// Change in internal energy
Wmax = U-(T2*(-S)) // Maximum possible work
V1_ = (m*R*T1)/P1 // volume calculation
CA = Wmax-P0*(V1_) // Change in availability
I = T2*S // Irreversibility
printf("\n The maximum work is %f kJ",Wmax)
printf("\n Change in availability is %f kJ",CA)
printf("\n Irreversibility is %f kJ",I)
//The answers vary due to round off error
|
98c54a99133db66d1372de3e395c1467a1c305ab
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1736/CH1/EX1.4/Ch01Ex4.sce
|
e45d0ae38eac0887e8add1ee9b924c7ba1f01bad
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 894 |
sce
|
Ch01Ex4.sce
|
// Scilab Code Ex1.4 : Page-17 (2006)
clc; clear;
c_by_a_ratio = 1.633; // Ideal c/a ratio
A = cell(2,4); // Declare a cell
// Assign values to the elements of the cell from the table
A(1,1).entries = 'Mg';
A(2,1).entries = 'Cd';
A(1,2).entries = 5.21;
A(2,2).entries = 5.62;
A(1,3).entries = 3.21;
A(2,3).entries = 2.98;
A(1,4).entries = A(1,2).entries/A(1,3).entries;
A(2,4).entries = A(2,2).entries/A(2,3).entries;
if (A(1,4).entries - c_by_a_ratio) < 0.01 then
printf("\n%s satisfies ideal c/a ratio and %s has large deviation from this value.", A(1,1).entries, A(2,1).entries);
else if (A(1,4).entries - c_by_a_ratio) < 0.01 then
printf("\n%s satisfies ideal c/a ratio and %s has large deviation from this value.", A(2,1).entries, A(1,1).entries);
end
end
// Result
// Mg satisfies ideal c/a ratio and Cd has large deviation from this value.
|
732197fd65c8bdec132001146f96ec85d5eec244
|
683d2599aa2be1a5f74b928d545b20e7ea656cd1
|
/microdaq/macros/microdaq_macros/mdaq_hs_ai_init.sci
|
1835fcc1edd367624a77cc9a0cf799a0f1cecbfe
|
[
"BSD-3-Clause"
] |
permissive
|
pj1974/Scilab
|
5c7fb67d5cae5ac0cdf78e3dd66b97ba50f9fc95
|
cd54f1bd8502d6914ad6ff5271ca0e6e3d323935
|
refs/heads/master
| 2020-12-25T17:12:56.934984 | 2015-10-06T17:16:11 | 2015-10-06T17:16:11 | 41,862,822 | 0 | 0 | null | 2015-09-03T14:00:56 | 2015-09-03T14:00:56 | null |
UTF-8
|
Scilab
| false | false | 319 |
sci
|
mdaq_hs_ai_init.sci
|
function mdaq_hs_ai_init(link_id)
if link_id < 0 then
disp("Wrong link ID!")
return;
end
result = call("sci_mlink_hs_ai_init",..
link_id, 1, "i",..
"out",..
[1, 1], 2, "i");
if result < 0 then
mdaq_error(result)
end
endfunction
|
5f6565ae2160d9119c3128c064663cd645f9bedb
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2660/CH2/EX2.17/Ex2_17.sce
|
36df9be0ffcf302c9bcc45a375b78299b386ff76
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 621 |
sce
|
Ex2_17.sce
|
clc
// from figure 2.75 (a)
r1 = 30 // radius in mm
t = 10 // thickness in mm
h1 = 300 // height in mm
ir1 = r1-t // inner radius of bends in mm
L1 = h1-(ir1+t) // mm
alpha1 = 90 // degree
r2 = 2*t // mm
k = 0.33*t // mm
L2 = alpha1*2*%pi*(r2+k)/360 // mm
w = 200 // mm
L3 = w-2*(t+ir1)// mm
L4 = L2 //mm
h2 = 100 // mm
L5 = h2 -(t+ir1) // mm
r3 = 150 //mm
ir2 = r3 - t // inner radius in mm
alpha2 = 180 // degree
L6 = alpha2*2*%pi*(ir2+k)/360 // mm
dl = L1+L2+L3+L4+L5+L6 // Total developed length in mm
printf("\n Total developed length = %0.2f mm" , dl)
// Answers vary due to round off error
|
1db0fc7e455d9e4cce0cf2d55c31d09ddf1f7591
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3850/CH31/EX31.3/Ex31_3.sce
|
13673936d4388812d0a7d83a3e512735103551bc
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 439 |
sce
|
Ex31_3.sce
|
//To Calculate the Capacitance of a parallel plate capacitor
//Example 31.3
clear;
clc;
a=20*10^-2;//Length of Side of Parallel Plate Capacitor
A=a^2;//Area of the Capacitor Plate
d=1*10^-3;//Separation between the two plates
e0=8.85*10^-12;//Permitivity in farad/meter
C=e0*A/d;//Formula for finding capacitance of parallel plate capacitor
printf("capacitance of the parallel plate capacitor=%f pF",C*10^12);
|
8d2f964ee1d03e0b860ed01fa5b965c0ac38a0b0
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3733/CH17/EX17.5/Ex17_5.sce
|
0ee28a1b9e37aa8562ce37463e2945e00c9e1db4
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 1,037 |
sce
|
Ex17_5.sce
|
// Example 17_5
clc;funcprot(0);
//Given data
T_s=56;// Temperature of steam entering the condenser in °C
T_a=46;// Temperature at the air pump suction in °C
P_b=76;// The barometer reading in cm of Hg
Q=90;// The discharge of dry air pump in m^3/min
R=287;// J/kg.k
//Calculation
//(a)
//From steam tables,at saturation temperature of 56°C
p_s=0.1684;//Pressure of steam in bar
p_s=p_s/0.01359// cm of Hg
p_a=0;// Partial pressureair at the inlet of condenser in cm of Hg
p_t=p_s+p_a;
p_v=P_b-p_t;//Vacuum in the condenser in cm of Hg
//(b)
//From steam tables,at saturation temperature of 46°C
p_s1=0.1028;// bar
v_s=14.56;// m^3/kg
p_a1=(p_t*0.01359)-p_s1;// bar
m_a=(p_a1*10^5*Q*60)/(R*(T_a+273));//The air leakage in the condenser per hour in kg/hr
//(c)
Ls=(Q*60)/v_s;// Loss of condensate in kg/hr
printf('\n(a)The vacuum in the condenser=%0.1f cm of Hg \n(b)The air leakage in the condenser=%0.1f kg/hr \n(c)Loss of condensate=%0.0f kg/hr',p_v,m_a,Ls);
// The answer vary due to round off error
|
0cf05633cfbfc84b3b351eb825b0ea16acadb30b
|
8217f7986187902617ad1bf89cb789618a90dd0a
|
/browsable_source/1.1/Unix/scilab-1.1/macros/metanet/concomp.sci
|
462a9a6cd40b46e8636b075b74a684ca4270a4e5
|
[
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] |
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 | 107 |
sci
|
concomp.sci
|
function ns=concomp(i,g)
[lhs,rhs]=argn(0), if rhs==1 then g=the_g, end
[l,nc]=connex(g)
ns=concom(i,nc,g)
|
72286673557c9e59b4308c38a7980c5fb258a2f6
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1247/CH6/EX6.15/example6_15.sce
|
0194f7e1028feeaca3af58e4aac658c5056a9bb0
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,021 |
sce
|
example6_15.sce
|
clear;
clc;
// Stoichiometry
// Chapter 6
// Stoichiometry and Unit Operations
// Example 6.15
// Page 385
printf("Example 6.15, Page 385 \n \n");
// solution
//basis 1kg of dry air entering the air washer
//from fig 6.15
H1 = 11.8 //g/kg dry air
H2 = 17.76 //g/kg dry air
H = H2-H1 // moisture added during saturation
DB = 300.95 //K
WB = 298.15 //K
DP = 297.15 //K
Ch = 1.006+1.84*.01776 //kJ/kg dry air K
dT = DB-DP
Hs = Ch*3.8
A = 25000 //m^3/h actual air at 41 and 24 degree celcius
// again from fig 6.15
Vh = .9067 //m^3/kg dry air
qm = A/Vh //kg dry air/h
fi = qm*Hs //kJ/h
P = 300 //kPa
lamda= 2163.2 //kJ/kg by appendix IV.2
SC = fi/lamda //kg/h steam consumption at the heater
printf(" the moisture added to the air = "+string(H)+" g/kg dry air \n DB temp of final air = "+string(DB)+"K \n WB temp of final air = "+string(WB)+"K \n The heating load of the steam coil per kg dry air = "+string(fi)+" kJ/h \n Steam consumption = "+string(SC)+" kg/h.")
|
c6e6a395c3bc7e01ac318fed75dac752f1f88cda
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1691/CH2/EX2.6/exmp2_6.sce
|
21b3f66c30e444ca1c4be4c8f5721df3dfb9d231
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 470 |
sce
|
exmp2_6.sce
|
//exmaple 2.6
clc
disp("The circuit is Wien bridge oscillator using op-amp. The gain of the op-amp is")
a=1+3
disp(a,"A = 1 + R3/R4 =")
disp("So A > 3")
disp("This satisfies the required oscillating condition. The feedback is given to non-inverting terminal ensuring the zero phase shift. Hence the circuit will work as the oscillator.")
f=1/(2*%pi*5.1*0.001)
format(8)
disp(f,"f(in kHz) = 1 / 2*pi*R*C =")
disp("This will be the frequency of oscillations")
|
71aadcbab4a844a95fbb59781c7019d9a5123818
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/767/CH2/EX2.2.2/CH02Exa2_2_2.sci
|
5185c7810b19bc5d60e4c3af8478a5d9b5bd5d89
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,569 |
sci
|
CH02Exa2_2_2.sci
|
// Scilab code Exa2.2.2 To calculate the difference in coulomb energy and nucleons' mass difference for mirror nuclei and show in agreement with actual mass difference Page 67 (2011)
// Calculation of coulomb energy for mirror nuclei : N-7 and O-8
// For N-7 nucleus
a_c = 0.7; // Coulomb energy constant, MeV
Z_N = 7; // Atpmic no.
A = 15; // Atomic mass
E_C_N = a_c*Z_N*(Z_N-1)/(A^(1/3)); // Coulomb energy for N-7, MeV
// For O-8 nucleus
a_c = 0.7; // Coulomb energy constant, MeV
Z_O = 8; // Atpmic no.
A = 15; // Atomic mass
E_C_O = a_c*Z_O*(Z_O-1)/(A^(1/3)); // Coulomb energy for O-8, MeV
C_E_d = E_C_O-E_C_N; // Coulomb energy difference, MeV
m_p = 1.007276*931.49; // Mass of proton, MeV
m_n = 1.008665*931.49; // Mass of neutron, MeV
M_d = m_n-m_p; // Mass difference of nucleons, MeV
D_C_M = round(C_E_d-M_d); // Difference in coulomb energy and nucleon mass difference, MeV
M_O = 15.003070*931.49; // Mass of O-8, MeV
M_N = 15.000108*931.49; // Mass of N-7, MeV
D_A = round(M_O-M_N); // Actual mass difference, MeV
printf("\nDifference in Coulomb energy = %5.3f MeV\nNucleon mass difference = %6.4f MeV\nDifference in Coulomb energy and nucleon mass difference = %5.3f MeV\nActual mass difference = %5.3f MeV",C_E_d, M_d ,D_C_M, D_A);
if D_A == D_C_M then printf("\nResult is verified")
end
// Result
// Difference in Coulomb energy = 3.974 MeV
// Nucleon mass difference = 1.2938 MeV
// Difference in Coulomb energy and nucleon mass difference = 3.000 MeV
// Actual mass difference = 3.000 MeV
// Result is verified
|
388eb2136606dfc4486c82bcb07fe7faa26f1466
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/812/CH12/EX12.03/12_03.sce
|
23bf28dac64ea6d3e8ec50cacde42165848b458b
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 767 |
sce
|
12_03.sce
|
//mass and area//
pathname=get_absolute_file_path('12.03.sce')
filename=pathname+filesep()+'12.03-data.sci'
exec(filename)
//Saturation pressure(in psia):
p0=p1*(1+(k-1)/2*M1^2)^(k/(k-1))
//Checking for choking:
x=pb/p0;
if(x>0.528)
//Not choked
else
//choked
end
//As there is choking:
Mt=1;
//Velocity at entry:
V1=M1*sqrt(k*R*(T1+460)*32.2)
//Density at the entry(in lbm/ft^3):
d1=p1/(R*(T1+460))*144
//Mass flow rate(in lbm/sec):
m=d1*V1*A1
//Finding the valueof A1/A*;
A=1/M1*((1+(k-1)/2*M1^2)/(1+(k-1)/2))^((k+1)/(2*(k-1)))
//For choked flow, At=A*
At=A1/A
printf("\n\nRESULTS\n\n")
printf("\n\nMach number at throat: %.3f\n\n",Mt)
printf("\n\nMass flow rate: %.3f lbm/sec\n\n",m)
printf("\n\nArea at throat: %.3f ft^2\n\n",At)
|
3c425cd2f926ba4a7142f594aa383ddb56fd584e
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1208/CH1/EX1.4/Exa4.sce
|
893e745999284db2212815884202f31e4fddb565
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 305 |
sce
|
Exa4.sce
|
//Exa4
clc;
clear;
close;
//given data :
Vo=500;//in Rs
r=16;//in % per annum
i=r/100;
n=5;//in years
//interest is calculated in quarterly basis
m=4;
//formula Vn=Vo*(1+i/m)^(m*n)
Vn=Vo*(1+i/m)^(m*n)
disp(Vn," The amount will be(in Rs.) : ")
//Note: answer given in the book is not accurate
|
0fcc34b258b2afe50750fe1efb11c547d228ec93
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1847/CH1/EX1.10/Ch01Ex10.sce
|
6d516d389e0fa4ae3cc53f8c1c9300e43f58a687
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 479 |
sce
|
Ch01Ex10.sce
|
// Scilab Code Ex1.10: Page-1.8 (2009)
clc; clear;
m = 1.67e-027; // Mass of the proton, kg
c = 3e+08; // Speed of light, m/s
v = 1/20*c; // Velocity of the proton, m/s
h = 6.626e-034; // Planck's constant, Js
lambda = h/(m*v); // de Broglie wavelength of the neutron, m
printf("\nThe de Broglie wavelength associated with moving proton = %5.3e m", lambda);
// Result
// The de Broglie wavelength associated with moving proton = 2.645e-14 m
|
0d7d7ae85af6473fdaba9d03ff4717b70c0f23b2
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3446/CH6/EX6.6/Ex6_6.sce
|
2a311c759e3d97c0659933b6bb7e99e87e125cc2
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,045 |
sce
|
Ex6_6.sce
|
// Exa 6.6
// To calculate capacity and spectral efficiency of the DS-CDMA system.
clc;
clear all;
nb=0.9;//bandwidth efficiency
nf=0.45;//frequency reuse efficiency
Cd=0.8; //capacity degradation factor
Vf=0.4;//voice activity factor
Eb_I0=7; // desired energy-to-interference ratio in dB
L=1;// efficiency of sector-antenna in cell
BW=12.5;//One way system BW in MHz
R=16.2;//Information rate in kbps
//solution
Eb_I=10^(Eb_I0*0.1);//To convert from dB to a normal value
Nu=(nf*nb*Cd*L/Vf)*(BW*1000/(Eb_I*R));//Capacity of system
Seff=round(Nu)*R/(12.5*10^3);
printf('Capacity of system is %d mobile users per cell\n ',round(Nu));
printf('Spectral efficiency of TDMA system is %.3f bits/sec/Hz\n',Seff);
disp("In these calculations, an omnidirectional antenna is assumed. If a three sector antenna (i.e., G=3) is used at a cell site with lamda(efficiency of sector-antenna in a cell)= 2.6, the capacity will be increased to 325 mobile users per cell, and spectral efficiency will be 0.421 bits/sec/Hz.")
|
d06e88fd6b68fa0dda7b2f30a7d2565d0a719e4c
|
3ce792f7690822183802ad8d56e9e15e620aac2f
|
/L2q1.sce
|
a202e54a80534cc851ce38a309234a82204fd557
|
[] |
no_license
|
ruhi2001/Problem_sheet2_EE324_codes
|
2da2b07ac2cf64f012d2f5a01bb448471fa45e4d
|
0c678d0ac115d3bbd556ad6b1fd5fc5f4f2767d1
|
refs/heads/main
| 2023-02-27T15:39:49.122724 | 2021-01-24T13:29:23 | 2021-01-24T13:29:23 | 332,431,794 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 783 |
sce
|
L2q1.sce
|
s=poly(0,"s")
//roll no. = 18d070046, esha
G1 = 46/(s+5)
sys1 = syslin("c",G1)
disp(G1)
//q1b
t = 0:0.01:5
y = csim("step",t,sys1)
z = 9.016
plot2d(t,y)
xlabel("t")
ylabel("y")
title("Step Response")
xpts = [0 5];
ypts = [9.016 9.016];
plot(xpts, ypts);
xpts = [0.2 0.2];
ypts = [0 10];
plot(xpts, ypts);
//q1c
s=poly(0,"s")
for a=46:46:4600
G1 = a/(s+5)
sys1 = syslin("c",G1);
t=0:0.01:5;
y = csim('step',t,sys1);
plot2d(t,y)
end
xlabel("t")
ylabel("y")
title("Step Responses")
//q1d
s=poly(0,"s")
for b=5:5:500
G1 = 46/(s+b)
sys1 = syslin("c",G1);
t=0:0.01:5;
y = csim('step',t,sys1);
plot2d(t,y)
end
xlabel("t")
ylabel("y")
title("Step Responses")
|
fadd293c37456050533bbb63b159c707a5a0b2c2
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1523/CH3/EX3.17/3_17.sce
|
1febbb4e43cecf09223f5dd54c59792ac32d0028
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 925 |
sce
|
3_17.sce
|
//Network Theorem 2
//pg no 3.18
//example 3.17
disp("removing the 3 Ohm resistor from the network");
disp("Applying KVL to mesh 1");
disp("11*I1-9*I2=50");....//equation 1
disp("Applying KVL to mesh 2");
disp("-9*I1+18*I2=0");....//equation 2
A=[11 -9;-9 18];//solving the equations in matrix form
B=[50 0]'
X=inv(A)*B;
disp(X);
disp("I1=7.69 A");
disp("I2=3.85 A");
//Calculation of Vth (Thevenin's voltage)
a=7.69;
b=3.85;
v=-((5*b)+(8*(b-a)));//the B terminal is positive w.r.t A
printf("\nWriting Vth equation, \n Vth = %.1f V",v);
//Calculation of Rth (Thevenin's resistance)
x=4;
y=2;
z=5;
//delta into star network
r1=((x*y)/(x+y+z));
r2=((x*z)/(x+y+z));
r3=((z*y)/(x+y+z));
mprintf("\nR1 = %.2f Ohm \nR2 = %.2f Ohm \nR3 = %.2f Ohm",r1,r2,r3);
m=1.73;
n=8.91;
r=(r2+(m*n)/(m+n));
printf("\nRth = %.2f Ohm",r);
//Claculation of IL (Load Current)
i=v/(r+3);
printf("\nIL = %.2f A",i);
|
6e1313f55fcc6c966a9665d57fb77b1391f4f689
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/587/CH4/EX4.3/example4_3.sce
|
8de8e73d6c38ba77327a66dee06158fd9e644615
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,016 |
sce
|
example4_3.sce
|
clear;
clc;
//Example4.3[Boiling Eggs]
//Given:-
T1=5;//Initial temperature of egg[degree Celcius]
T2=95;//Temperature of Boiling Water[degree Celcius]
h=1200;//Convection heat transfer coefficient of egg[W/m^2.degree Celcius]
r=0.025;//Radius of egg[m]
T3=70;//Final temperature attained by centre of egg[degree Celcius]
k=0.627;//Thermal conductivity[W/m.degree Celcius]
a=0.151*(10^(-6));//Thermal diffusivity[m^2/s]
//Solution:-
Bi=(h*r)/k;//Biot Number
if(Bi>0.1) then,
disp("the lumped system analysis is not applicable")
//Findinf coefficient for a sphere corresponding to this bi are,
lambda1=3.0754,A1=1.9959;
x=(T3-T2)/(T1-T2);
tau=(-1/(lambda1^2))*log(x/A1);
disp(tau,"Fourier no is")
//Since fourier no is greater than 0.2, cooking time is determined from the definition of fourier no to be
t=(tau*(r^2))/a;//[seconds]
disp("minutes",(t/60),"The time taken for center of egg to reach 70 degree Celcius temperature")
else,
disp("the lumped system is not applicable")
end
|
3c4feea5394f4194a118169d50cfee56c19164fd
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3689/CH6/EX6.17/6_17.sce
|
ec9f7fb232cfd9a113f12ea14887ba99f2e7a37c
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 510 |
sce
|
6_17.sce
|
////Variable Declaration
T = 298.15 //Std. Temperature, K
P = 1.0 //Initial Pressure, bar
[Hm0,Sm0] = (0.0,154.8)
[Sm0H2,Sm0O2] = (130.7,205.2)
dGfH2O = -237.1 //Gibbs energy of formation for H2O(l), kJ/mol
[nH2,nO2] = (1,1/2)
//Calculations
Gm0 = Hm0 - T*Sm0
dGmH2O = dGfH2O*1000 - T*(nH2*Sm0H2 + nO2*Sm0O2)
//Results
printf("\n Molar Gibbs energy of Ar %4.3f kJ/mol",Gm0/1e3)
printf("\n Molar Gibbs energy of Water %4.3f kJ/mol",dGmH2O/1e3)
|
4ef0f6dd72ef2dc3a4ae1d4099cf699b99ad6cab
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/564/DEPENDENCIES/5_6data.sci
|
16e25e8ada9269dc4befd87518f62b4cd01b85ee
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 32 |
sci
|
5_6data.sci
|
r=1000;//in mm
M0=1000;//in N.mm
|
5937838563b1e28b11c7a7678114086bba442092
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/343/CH2/EX2.4/ex2_4.sce
|
d91003de30482422e99a34aae6ce1ea617fb01ee
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 152 |
sce
|
ex2_4.sce
|
function y=f(t),y=20*sin(t),endfunction //defining the voltage function
T=2*%pi;
Res=intg(0,%pi,f)/(T);
disp("Volts",Res,"Average voltage value");
|
407da04d0b1281679c7764b2a17b4fb5d0fd0ed4
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3537/CH2/EX2.22/Ex2_22.sce
|
0886d74575f8b8cefd92f929fd1089949aa30972
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 426 |
sce
|
Ex2_22.sce
|
//Example 2_22
clc();
clear;
//To calculate slit width
lemda=6000 //units in angstrom
x=4.2 //units in millimeters
x=4.2*10^-3 //units in meters
D=60 //units in centimeters
D=60*10^-3 //units in meters
d=((D*lemda)/x)*10^-9
printf("The Slit width of the screen is %f",d)
|
d28fbb92dfeb69484761ae6ce4452b2062faa5ff
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1427/CH18/EX18.16/18_16.sce
|
0e1b7a81adabbf067612e4c496fe9a8bb2b9f242
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 279 |
sce
|
18_16.sce
|
//ques-18.16
//Calculating increase in entropy
clc
v1=2.8;//volume of O2 (in L)
v2=19.6;//volume of H2 (in L)
n1=v1/22.4; n2=v2/22.4;//(in moles)
x1=n1/(n1+n2); x2=n2/(n1+n2);
S=-8.314*2.303*(x1*log10(x1)+x2*log10(x2));
printf("The increase in entropy is %.3f J/K.",S);
|
1d6c1487621881c1f6bab5372f78f80b60d1036a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1847/CH2/EX2.61/Ch02Ex61.sce
|
2c35a0cb2ffa22f27aeed9fcc12906d7c0dcb3ae
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 595 |
sce
|
Ch02Ex61.sce
|
// Scilab Code Ex2.61:: Page-2.48(2009)
clc; clear;
R1 = 200; // Radius of curvature of the convex surface, cm
R2 = 250; // Radius of curvature of the concave surface, cm
lambda = 5500e-008; // Wavelength of light used, cm
n = 15; // Order of interfernce Newton ring
// As r_n^2*(1/R1-1/R2) = (2*n-1)*lambda/2, solving for r_n
r_n = sqrt((2*n-1)*lambda/(2*(1/R1-1/R2))); // Radius of nth ring, cm
D_15 = 2*r_n; // Daimeter of 15th bright ring, cm
printf("\nThe daimeter of 15th bright ring = %4.2f cm", D_15);
// Result
// The daimeter of 15th bright ring = 1.79 cm
|
0ab6a048bbbbc09e8e99de717757ee407c16196f
|
8217f7986187902617ad1bf89cb789618a90dd0a
|
/browsable_source/2.5/Unix-Windows/scilab-2.5/tests/examples/load.man.tst
|
b53dffdcf5645c9c9cdee1b0698b8fe4b4af3c6b
|
[
"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 | 102 |
tst
|
load.man.tst
|
clear;lines(0);
a=eye(2,2);b=ones(a);
save('vals.dat',a,b);
clear a
clear b
load('vals.dat','a','b');
|
66579969c4002d743b566f1e7f7b7ff3e96f4a03
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/830/CH10/EX10.5.2/FIR_INTERPOLATION_5.sce
|
1720e5155358660a7f52799236041e41fcdd5a5c
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,242 |
sce
|
FIR_INTERPOLATION_5.sce
|
//Graphical//
//Example 10.5.2
//Interpolation by 5, Filter Length = 30
//Cutoff Frequency Wc = %pi/5
//Pass band Edge frequency fp = 0.1 and a Stop band edge frequency fs = 0.16
// Choose the number of cosine functions and create a dense grid
// in [0,0.1) and [0.16,0.5)
//magnitude for pass band = 1 & stop band = 0 (i.e) [1 0]
//Weighting function =[3 1]
clear;
clc;
close;
M = 30; //Filter Length
I = 5; //Interpolation Factor = 5
Wc = %pi/5; //Cutoff Frequency
Wp = Wc/(2*%pi); //Passband Edge Frequency
Ws = 0.16; //Stopband Edge Frequency
hn=eqfir(M,[0 Wp;Ws .5],[1 0],[3 1]);
[hm,fr]=frmag(hn,256);
disp('The LPF Filter Coefficients are:')
hn
//Obtaining Polyphase Filter Coefficients from hn
p = zeros(I,M/I);
for k = 1:I
for n = 1:(length(hn)/I)
p(k,n) = hn(I*(n-1)+k);
end
end
disp('The Polyphase Interpolator for I =5 are:')
p
figure
plot(fr,hm)
xlabel('Normalized Digital Frequency fr');
ylabel('Magnitude');
title('Frequency Response of FIR LPF using REMEZ algorithm M=61')
figure
plot(.5*(0:255)/256,20*log10(frmag(hn,256)));
xlabel('Normalized Digital Frequency fr');
ylabel('Magnitude in dB');
title('Frequency Response of INTERPOLATOR(I=5) using REMEZ algorithm M=30')
|
821fc0f76579bd4633b40364f07f8a26830e866a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/845/CH3/EX3.1/Ex3_1.sce
|
cc74f2226b24b736d0a4ecab4d9d989cf7df50f4
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 568 |
sce
|
Ex3_1.sce
|
//Example 3.1
clc
clear
A = [2 3 -1; 4 4 -3; -2 3 -1]; //Coefficient Matrix
B = [5; 3; 1]; //Constant Matrix
n = length(B);
Aug = [A,B];
// Forward Elimination
for j = 1:n-1
for i = j+1:n
Aug(i,j:n+1) = Aug(i,j:n+1) - Aug(i,j) / Aug(j,j) * Aug(j,j:n+1);
end
end
// Backward Substitution
x = zeros(n,1);
x(n) = Aug(n,n+1) / Aug(n,n);
for i = n-1:-1:1
x(i) = (Aug(i,n+1)-Aug(i,i+1:n)*x(i+1:n))/Aug(i,i);
end
disp(strcat(["x = ",string(x(1))]))
disp(strcat(["y = ",string(x(2))]))
disp(strcat(["z = ",string(x(3))]))
|
d637c98431311ee4117b8cc6fb7742ee3fc915f8
|
91bba043768342a4e23ee3a4ff1aa52fe67f7826
|
/cs/142/2/tests/test16.tst
|
14d88459654253589dfc63a1b7979b1fcb166aba
|
[] |
no_license
|
MaxNanasy/old-homework
|
6beecc3881c953c93b847f1d0d93a64ec991d6de
|
48b7997a49a8f111344f30787c178e1661db04bd
|
refs/heads/master
| 2016-09-08T04:37:44.932977 | 2010-03-02T00:48:59 | 2010-03-02T00:48:59 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 63 |
tst
|
test16.tst
|
type t = array 100 of array 100 of array 100 of int;
main() {}
|
83bb5e145ba5240c59b7f3992855d3bf6f4435f5
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/671/CH6/EX6.12/6_12.sce
|
6316ff84b54276a479e9e21e1be9fdad0fa03325
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 311 |
sce
|
6_12.sce
|
V=400
w=2*50*%pi
P=25000
pf1=0.7
theta1=acos(pf1)
Il1=P/(sqrt(3)*V*pf1)*exp(-%i*theta1)
Ip1=Il1/sqrt(3)
pf2=0.85
theta2=acos(pf2)
Il2=P/(sqrt(3)*V*pf2)*exp(-%i*theta2)
Ip2=Il2/sqrt(3)
Ic=Ip2-Ip1 ////calculation mistake in the book at this step
C=real(Ic/(V*w*%i))
disp(C)
|
f10db10df359292c35af5047ec06e6d4d0dd6ce9
|
f934e15695c77d0a1015c230c5ed65c4f16a2425
|
/bp.sce
|
6617fb6bad4d8349357e7f71aa168575f0f1c00a
|
[] |
no_license
|
manasdas17/Scilab-for-Signal-Processing-
|
6efc5adb507243c7302f7b4f3f12d12060112038
|
5f6e6ce941c0a11212a83674b5d35d97a2cf4396
|
refs/heads/master
| 2021-01-10T07:49:58.006357 | 2016-04-07T07:45:26 | 2016-04-07T07:45:26 | 55,673,271 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 249 |
sce
|
bp.sce
|
//By Manas,FOSSEE,IITB
hz=iir(3,'bp','ellip',[.15 .25],[.08 .03]);
[hzm,fr]=frmag(hz,256);
plot2d(fr',hzm')
xtitle('Discrete IIR filter band pass);
q=poly(0,'q'); //to express the result in terms of the delay operator q=z^-1
hzd=horner(hz,1/q)
|
bf3e56b0f51784d064daa31862d1c548c280e944
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/545/CH5/EX5.3/ch_5_eg_3.sce
|
a72e58cb1a13c34cade4961015da8e0f76436967
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 571 |
sce
|
ch_5_eg_3.sce
|
clc
disp("the solution of eg 5.3 -->Discretization in 1-D space");
//given the source term f(x)=4x^2-2x-4
//given eqn d2y/dx2-2y=f(x)
y_1=0
y_4=-1
delta_x=1/3 //since given 3 parts and length=1
for i=0:3,j=0:delta_x:1;
end
//given to divide the line in 3 parts
//at node 2
//y_3-2*y_2
function d=fx3(x),
d=(4*x^2-2*x-4)
endfunction
f2=fx3(j(2))
f3=fx3(j(3))
y_3=((f2)*delta_x^2+(2+2*delta_x^2)*((f3)*delta_x^2-y_4)-y_1)/(1-(2+2*delta_x^2)^2)
y_2=(f3+2*y_3)*delta_x^2+2*y_3-y_4
disp(y_3,y_2,"is respectively",j(3),j(2),"the value of y at x=");
|
0e3ae318985c4fbba8c9380391ff8cbb4c099601
|
c9e04373e33a2721547c7ae2be20ee84f115be1c
|
/evaluationData/tempcostrevenue.sce
|
5d1d7bc29144a6f9a24be707358cb8a137286f03
|
[] |
no_license
|
lspxian/junsp
|
f944ce163267608cb9cdb939a0ac809f724fb396
|
ca1571bbc30e6a9a183fa8d675567e169288acf4
|
refs/heads/master
| 2021-01-23T14:10:34.141815 | 2017-10-06T17:03:10 | 2017-10-06T17:03:10 | 34,068,408 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 116 |
sce
|
tempcostrevenue.sce
|
tempcost= read("tempCostRevenue.txt",-1,2);
time = tempcost(:,$-1);
tempcost= tempcost(:,$);
plot2d(time,tempcost);
|
73a1368ae3c345145c6f83513e5afe44b6e615a3
|
5523237709a6b6082f723934030bd36314a3b267
|
/frontend/animation.sce
|
2f73f65225e71ae4b1f641195f538ee24050e8a9
|
[] |
no_license
|
mode777/retrolove
|
54d8bd852ed67f4b6c27cdee63f35a5195fadc8c
|
4626062c98797f3d4b3c7510ce4d5de1cf3b66e2
|
refs/heads/master
| 2021-06-01T22:36:42.600874 | 2017-12-18T09:40:50 | 2017-12-18T09:40:50 | 19,409,879 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 3,311 |
sce
|
animation.sce
|
local scene = {}
local cfg = require("frontend/config")
function scene:onLoad()
local color_bg, color1, color2 = cfg.bgColor, cfg.color1, cfg.color2
love.graphics.setBackgroundColor(unpack(color_bg))
local sw,sh = love.window.getDimensions()
local layer = cine.layer.new()
local sprite = cine.sprite.new(sw/2,-265,cine.sourceImage.new("frontend/lovelogo.png"))
--sprite:setTint(unpack(color1))
sprite:center("middle","bottom")
local iD = love.image.newImageData(3,3)
iD:setPixel(1,1,0,0,0,255)
local shadow = cine.sprite.new(sw/2,sh/2-15,cine.sourceImage.new(iD))
local sfx = love.audio.newSource("frontend/sounds/fadein.wav", "static")
sfx:play()
shadow:setSca(256/10,64/10)
shadow:setTint(255,255,255,0)
shadow:center()
layer:insertSprite(shadow)
layer:insertSprite(sprite)
shadow:moveScaTo(256/2,64/2,1)
shadow:moveTintTo(255,255,255,128,1)
sprite:setTweenStyle("easein")
sprite:moveScaTo(0.8,1.2,0.4)
cine.thread.waitThread(sprite:movePosTo(sw/2,sh/2,1))
cine.thread.waitThread(sprite:moveScaTo(1.2,0.8,0.1))
shadow:moveScaTo(256/2.5,64/2.5,0.25)
shadow:moveTintTo(255,255,255,100,0.25)
sprite:setTweenStyle("easeout")
sprite:moveScaTo(0.8,1.2,0.25)
cine.thread.waitThread(sprite:movePos(0,-100,0.25))
shadow:moveScaTo(256/2,64/2,0.15)
shadow:moveTintTo(255,255,255,128,0.15)
sprite:setTweenStyle("easein")
cine.thread.waitThread(sprite:movePosTo(sw/2,sh/2,0.15))
cine.thread.waitThread(sprite:moveScaTo(1,1,0.1))
local sfx2 = love.audio.newSource("frontend/sounds/logo.wav", "static")
cine.thread.wait(1)
--rolling
sprite:center()
sprite:movePos(0,-128)
sprite:setTweenStyle("easeout")
shadow:setTweenStyle("easeout")
sprite:movePos(60,0,1)
local r,g,b = unpack(color2)
shadow:movePos(60,0,1)
sprite:moveRot(math.rad(30),1)
local r,g,b = unpack(color1)
sprite:moveTintTo(r,g,b,255,0.5)
local sFont4 = cfg.font[5]
local sRetro = cine.sprite.new(sw/2-50,sh/2,sFont4,"retrr ")
sRetro:setTweenStyle("easeinout")
sRetro:center("right","top")
sRetro:setIndex("retro")
local r,g,b = unpack(color1)
sRetro:setTint(r,g,b,0)
local sLove = cine.sprite.new(sw/2+50,sh/2,sFont4,"löve")
sRetro:setTweenStyle("easeinout")
local r,g,b = unpack(color2)
sLove:setTint(r,g,b,0)
layer:insertSprite(sRetro)
layer:insertSprite(sLove)
sfx2:play()
sRetro:moveTint(0,0,0,255,1)
sRetro:movePos(50,0,1)
cine.thread.wait(1)
sprite:movePos(-60,0,1)
local r,g,b = unpack(color2)
shadow:movePos(-60,0,1)
sprite:moveRot(math.rad(-30),1)
local r,g,b = unpack(color2)
sprite:moveTintTo(r,g,b,255,1)
sLove:moveTint(0,0,0,255,1)
sLove:movePos(-50,0,1)
cine.thread.wait(2.5)
local sprite = cine.sprite.new(0,0,cine.sourceRectangle.new(),{sw,sh})
sprite:setTint(255,255,255,0)
layer:insertSprite(sprite)
sprite:moveTintTo(255,255,255,255,1)
cine.thread.wait(1)
cine.layer.remove(layer)
cine.thread.wait(0.25)
self:stop()
--initialize your scene here
end
function scene:onUpdate()
--update your scene here.
end
function scene:onStop()
--define what is going to happen when your scene stops
end
return scene
|
711930bbcc1257a3b59725b5e532786cf9d3deab
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/55/CH11/EX11.4/11ex4.sci
|
85aaa29d3fcfa2cae47cdf592277a3a563ee6792
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 206 |
sci
|
11ex4.sci
|
disp('Divisibility and Primes')
x=50;
disp('prime numbers less than 50 are')
y=primes(x)
disp('the prime factorisation of 21,24 and 1729 respectively are:')
k=factor(21)
l=factor(24)
n=factor(1729)
|
fdaabd661431db866087912c916c8e13d1c11bbd
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2321/CH7/EX7.10.1/EX7_10_1.sce
|
2092864e6ecdc02efb0e9a23627cb1d428f41367
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 418 |
sce
|
EX7_10_1.sce
|
//Example No. 7.10.1
clc;
clear;
close;
format('v',6);
A=1;//m²(Area of loop)
N=400;//no. of turns
Q=100;//Quality factor
theta=60;//degree(angle)
Erms=10;//µV/m(field strength)
f=1;//MHz(tuned frequency)
c=3*10^8;//m/s////Speed of light
lambda=c/(f*10^6);//m(Wavelength)
Vr=Q*2*%pi*A*N*cosd(theta)*Erms*10^-6/lambda;//V(reciever input voltage)
disp(Vr*1000,"Input voltage to the receiver in mV : ");
|
ce51f00b11b202514250653a83352fd6bf8c918c
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2087/CH10/EX10.3/example10_3.sce
|
e0a24bb35d0087554518cfab169362029f364db5
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 631 |
sce
|
example10_3.sce
|
//example10.3
//calculate factor of safety for slope
clc;funcprot(0);
//given
x=4; //given scale
An=14.4; //area of N rectangle
At=6.4; //area of T rectangle
Au=4.9; //area of U rectangle
L=12.6; //length of arc;
gamma_m=19; //unit weigth of soil
gamma_w=9.81; //unit weigth of water
fi=26; //effective angle(degree)
co=19.5; //cohesion value
//consider 1m length of dam
SumN=An*x^2*gamma_m;
SumT=At*x^2*gamma_m;
SumU=Au*x^2*gamma_w;
Le=x*L;
F=((Le*co)+(SumN-SumU)*tand(fi))/SumT;
F=round(F*100)/100;
mprintf("Factor of safety for slope=%f.",F);
|
01f5dfccae0146ccd1da8f51296ea92ed011f495
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3547/CH2/EX2.8/Ex2_8.sce
|
a35a8ec89764e4672c9f11f6c1f89a68350023de
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 885 |
sce
|
Ex2_8.sce
|
// Example no 2.8
// To find the total loss and output power in mW and dBm in fiber
// Page no. 72
clc;
clear;
// Given data
losscoe=0.046; // Loss coefficient in km^-1
L=80; // Length of fiber in km
PindBm=3; // Input power in dBm
// To find total loss of fiber
loss=round(4.343*losscoe*L); // Total loss in fiber
// Displaying the result in command window
printf('\n Total loss in fiber = %0.0f dB',loss);
// To find output power
PoutdBm=PindBm-loss; // Output power in dBm
PoutmW=10^(PoutdBm/10); // Output power in mW
//Displaying the result in command window
printf('\n Output power of fiber = %0.0f dBm',PoutdBm);
printf('\n Output power of fiber = %0.2f mW',PoutmW);
|
d040693851de21341b9a1df2fac75cd609c58ce6
|
8217f7986187902617ad1bf89cb789618a90dd0a
|
/source/2.4.1/macros/scicos/do_color.sci
|
4d4b7e54b2de7f3ef041806d6f06380dc660451b
|
[
"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 | 947 |
sci
|
do_color.sci
|
function scs_m=do_color(scs_m)
// do_block - edit a block icon
// Copyright INRIA
while %t
[btn,xc,yc,win,Cmenu]=getclick()
if Cmenu<>[] then
Cmenu=resume(Cmenu)
end
K=getobj(scs_m,[xc;yc])
if K<>[] then break,end
end
o=scs_m(K)
if o(1)=='Link' then
[nam,pos,ct]=o(5:7)
c=getcolor('Choose a color',ct(1));
if c<>[] then
connected=connected_links(scs_m,K)
for kc=connected
o=scs_m(kc);ct=o(7)
if ct(1)<>c then
drawobj(o)
o(7)(1)=c;
drawobj(o)
scs_m(kc)=o
end
end
end
elseif o(1)=='Block' then
graphics=o(2)
gr_i=graphics(9)
if type(gr_i)==10 then,gr_i=list(gr_i,[]),end
if gr_i(2)==[] then
coli=0
else
coli=gr_i(2)
end
coln=getcolor('color',coli)
if coln<>[] then
if coln<>coli then
gr_i(2)=coln
graphics(9)=gr_i
drawblock(o)
o(2)=graphics
scs_m(K)=o
drawblock(o)
end
end
elseif o(1)=='Text' then
//not implemented
end
|
e5bc56f087ed90de2096187f9fec95e85147f634
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1913/CH1/EX1.12/ex12.sce
|
007619899ef11925688a468ccb2628cd2a12f6b6
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 338 |
sce
|
ex12.sce
|
clc
clear
//Input data
Z=70;//Vaccum gauge reading in cm of Hg
Pa=101.325;//Atmospheric pressure in kPa
d=13.6*10^3;//Density of Hg in kg/m^3
g=9.81;//Gravity in m/sec^2
//Calculations
Pv=(d*g*Z)/10^5;//Vaccum pressure in kPa
Pab=Pa-Pv;//Absolute pressure in kPa
//Output
printf('Absolute pressure Pab = %3.4f kPa ',Pab)
|
1f310e1d80c89d4cfb17a9d0c1cde62c0814a967
|
b32474ae2727233775f44c71edfe1f10b6a3430f
|
/EliminacaoGaussiana.sci
|
1159680e8302b949360639c11d30140c28c37a91
|
[] |
no_license
|
lucaslyon96/scilab
|
8400b98c25dafa13069dd64bd391c15218323575
|
8fe45fd3bd27ab21490682874f72f9c20c8717e1
|
refs/heads/master
| 2020-03-18T12:25:20.253687 | 2018-05-24T14:49:08 | 2018-05-24T14:49:08 | 134,725,468 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 1,652 |
sci
|
EliminacaoGaussiana.sci
|
function u=EliminacaoGaussiana(a)
[l,c]=size(a)
u=[a]
np=1 //numero do pivo
disp(a)
for n=1:c // numero da coluna a ser escalonada
if np==l+1 then // numero do pivo e menor ou igual ao numero de linhas
break
end
//
if u(np,n)==0 then
for i=np+1:l // se a primeira entrada for zero, entao procure entradas não nulas
if u(i,n)~=0 then
disp("L"+string(i)+" <=> L"+string(np))
for j=n:c // permutar a linha da primeira entrada com uma linha de entrada nao nula
aux=u(i,j)
u(i,j)=u(np,j);
u(np,j)=aux;
end
disp(u)
break
end
end
end
if u(np,n)~=0 then //se a linha possui entrada nao nula, entao escalonar
if u(np,n)~=1 then
k=u(np,n)
u(np,n)=1
disp("(1/"+string(k)+")L"+string(np)+" => L"+string(np))
for j=n+1:c // deixar o pivo igual a 1 e dividir as demais entradas
u(np,j)=u(np,j)/k
end
disp(u)
end
for i=np+1:l
if u(i,n)~=0 then
disp("L"+string(i)+"+("+string(-u(i,n))+")L"+string(np)+ " => L"+string(i))
u(i,:)=u(i,:)-u(i,n)*u(np,:) // zerar as entradas abaixo do pivo
disp(u)
end
end
b(np)=n
np=np+1
end
//
end
//m = np-1
//for n=2:m
//for i=1:m-n+1
// disp("L"+string(i)+"+("+string(-u(i,b(m-n+2)))+")L"+string(n)+ " => L"+string(i))
// u(i,:)=u(i,:)-u(i,b(m-n+2))*u(m-n+2,:) // zerar as entradas acima do pivo
// disp(u)
//end
//end
endfunction
|
a8b0bfb7d067c283f611c26ca8448453cc92da3e
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1514/CH4/EX4.7/4_7.sce
|
7c19c81894be0b4b54f8307acdcf09271f8f1e70
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 506 |
sce
|
4_7.sce
|
//chapter 4
//example 4.7
//page 112
clear all;
clc ;
//given
Vcc=15;//supply voltage
Vce=5;//collector to emitter voltage
Ic=5;//mA
hfe=100;Vbe=0.7;
//drop across RE & RC
Vrc=Vcc-Vce;
VRC=Vrc/2;
Ve=VRC;
Rc=VRC/Ic;
printf("\nRc=%d kohm,standard value 1 kohm",Rc);
Ie=Ic;
Re=Ve/Ic;
printf("\nRe=%d kohm,standard value 1 kohm",Re);
Vb=Ve+Vbe;
I2=Ic/10;
R2=Vb/I2;
printf("\nR2=%.1f kohm,standard value 12 kohm",R2);
R1=(Vcc-Vb)/I2;
printf("\nR1=%.1f kohm,standard value 18 kohm",R1);
|
48355d9f702f0f1caff8c7d463225370bbd11063
|
8217f7986187902617ad1bf89cb789618a90dd0a
|
/source/2.5/tests/examples/ui_observer.man.tst
|
adf574273664ca6132fa4e6bd930befdbba142e7
|
[
"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 | 744 |
tst
|
ui_observer.man.tst
|
clear;lines(0);
A=diag([3,-3,7,4,-4,8]);
B=[eye(3,3);zeros(3,3)];
C=[0,0,1,2,3,4;0,0,0,0,0,1];
D=[1,2,3;0,0,0];
rand('seed',0);w=ss2ss(syslin('c',A,B,C,D),rand(6,6));
[A,B,C,D]=abcd(w);
B=[B,matrix(1:18,6,3)];D=[D,matrix(-(1:6),2,3)];
reject=1:3;
Sys=syslin('c',A,B,C,D);
N1=[-2,-3];C1=-N1*C;D1=-N1*D;
nw=length(reject);nu=size(Sys('B'),2)-nw;
ny=size(Sys('C'),1);nz=size(C1,1);
[UIobs,J,N]=ui_observer(Sys,reject,C1,D1);
W=[zeros(nu,nw),eye(nu,nu);Sys];UIobsW=UIobs*W;
//(w,u) --> z=UIobs*[0,I;Sys](w,u)
clean(ss2tf(UIobsW));
wu_to_z=syslin('c',A,B,C1,D1);clean(ss2tf(wu_to_z));
clean(ss2tf(wu_to_z)-ss2tf(UIobsW),1.d-7)
/////2nd example//////
nx=2;ny=3;nwu=2;Sys=ssrand(ny,nwu,nx);
C1=rand(1,nx);D1=[0,1];
UIobs=ui_observer(Sys,1,C1,D1);
|
521f1cc52b46e8db3cfab4d68df1fe439115448b
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3547/CH9/EX9.2/EX9_2.sce
|
089134582ddda648cfdc770d2ef529967aca52fc
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 490 |
sce
|
EX9_2.sce
|
// Example 9.2
// Calculation of the total power at the fiber output.
// Page no 393
clc;
clear;
close;
//Given data
p=0; // Power per channel
fl=0.2; // Fiber loss
f=50; // Wavelength
// The total power at the fiber output.
pc=10^(0.1*p);
tp=pc*11;
tp1=10*log10(tp);
tfl=fl*f;
to=tp1-tfl;
//Displaying results in the command window
printf("\n The total power at the fiber output = %0.3f dBm ",to);
|
ddce0de3f3159a50e4db6e514109590092e39e87
|
5c808b0f55fefd29b91c7cb73f2f3a08093c5033
|
/Code/Scilab Code/Convert2DIndexTo1D.sci
|
cbc3538812e51ad256b5a3d410fd12815f01c44a
|
[] |
no_license
|
JOfTheAncientGermanSpear/Filter-Bank-Guitar-Note-Chord-Detection
|
a01e2ce521561dfea555a588d6bb1e0f1deca18e
|
cb0d54c74275a990dcb984c4ec349e6ca4e72a1a
|
refs/heads/master
| 2021-01-20T12:00:42.472605 | 2013-06-14T03:04:33 | 2013-06-14T03:04:33 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 133 |
sci
|
Convert2DIndexTo1D.sci
|
function OneDIndx = Convert2DIndexTo1D(rowNum, colNum, numberOfCols)
OneDIndx = rowNum * numberOfCols + colNum;
endfunction
|
6a8f3d5d31d1b379fe05035c7e63a66dc901b7a0
|
527c41bcbfe7e4743e0e8897b058eaaf206558c7
|
/Positive_Negative_test/Netezza-Base-StatisticalFunctions/FLRank-NZ-01.tst
|
658a687041f88ba2dfdd603ce518f210b0c56a47
|
[] |
no_license
|
kamleshm/intern_fuzzy
|
c2dd079bf08bede6bca79af898036d7a538ab4e2
|
aaef3c9dc9edf3759ef0b981597746d411d05d34
|
refs/heads/master
| 2021-01-23T06:25:46.162332 | 2017-07-12T07:12:25 | 2017-07-12T07:12:25 | 93,021,923 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 8,331 |
tst
|
FLRank-NZ-01.tst
|
-- Fuzzy Logix, LLC: Functional Testing Script for DB Lytix functions on Netezza
--
-- Copyright (c): 2014 Fuzzy Logix, LLC
--
-- NOTICE: All information contained herein is, and remains the property of Fuzzy Logix, LLC.
-- The intellectual and technical concepts contained herein are proprietary to Fuzzy Logix, LLC.
-- and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
-- secret or copyright law. Dissemination of this information or reproduction of this material is
-- strictly forbidden unless prior written permission is obtained from Fuzzy Logix, LLC.
-- Functional Test Specifications:
--
-- Test Category: Basic Statistics
--
-- Test Unit Number: FLrank-Netezza-01
--
-- Name(s): FLRank
--
-- Description: Calculates the rank of each observation in a data series
--
-- Applications:
--
-- Signature: FLRank(pValue DOUBLE PRECISION,
-- pOrder VARCHAR(10))
--
-- Parameters: See Documentation
--
-- Return value: INTEGER
--
-- Last Updated: 03-04-2017
--
-- Author: Kamlesh Meena
--
-- BEGIN: TEST SCRIPT
\time
--.run file=../PulsarLogOn.sql
--.set width 2500
SELECT COUNT(*) AS CNT,
CASE WHEN CNT = 0 THEN ' Please Load Test Data!!! ' ELSE ' Test Data Loaded ' END AS TestOutcome
FROM fzzlSerial a;
-- BEGIN: POSITIVE TEST(s)
---- Positive Test 1: Returns expected result
--- Return expected results, Good
WITH z (pTxnDate,pGroupID,pTickerSymbol,pValue, pRankOrder) AS (
SELECT a.TxnDate,
a.TickerID,
a.TickerSymbol,
a.ClosePrice,
'D'
FROM finStockPrice a
WHERE a.TickerSymbol IN ('AAPL','HPQ','IBM','MSFT','ORCL')
AND a.TxnDate BETWEEN '2002-01-01' AND '2002-02-01')
SELECT z.pTickerSymbol,z.pTxnDate,z.pGroupID,z.pValue,
FLRank(z.pValue, z.pRankOrder) OVER (PARTITION BY z.pTickerSymbol)
AS Rank FROM z
ORDER BY 1,2
LIMIT 20 ;
---- Positive Test 2: One observation
--- Return 1, Good
WITH z (pGroupID, pRandVal,pRankOrder) AS (
SELECT 1,
a.RandVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <=1
)
SELECT z.pGroupID,z.pRandVal,
FLRank(z.pRandVal,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 1
LIMIT 20 ;
---- Positive Test 3: Two observations
--- Return expected results, Good
WITH z (pGroupID, pRandVal,pRankOrder) AS (
SELECT 1,
a.RandVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <=2
)
SELECT z.pGroupID,z.pRandVal,
FLRank(z.pRandVal,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 1
LIMIT 20 ;
---- Positive Test 4: With all ties, Results should be 1
--- Return expected results, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
CASE WHEN a.SerialVal <= 100 THEN 1 ELSE a.SerialVal END,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <=100
)
SELECT z.pGroupID,z.pSerialVal,
FLRank(z.pSerialVal,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 1
LIMIT 20 ;
---- Positive Test 5: Mix with ties
--- Return expected results, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
CASE WHEN a.SerialVal <= 10 THEN 1 ELSE a.SerialVal END,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <=100
)
SELECT z.pGroupID,z.pSerialVal,
FLRank(z.pSerialVal,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2
LIMIT 20 ;
---- Positive Test 6: Mix With Nulls
--- Output error: The value argument can not be Null, need to be mentioned in manual
--- To be investigated
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
CASE WHEN a.SerialVal <= 10 THEN NULL ELSE a.SerialVal END,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <=100
)
SELECT z.pGroupID,z.pSerialVal,
FLRank(z.pSerialVal,z.pRankOrder) OVER (PARTITION BY z.pGroupID)
AS Rank FROM z
ORDER BY 2
LIMIT 20 ;
---- Positive Test 7: Positive test case with more than one observations
--- Return expected results, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
a.SerialVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <=100
)
SELECT z.pGroupID,z.pSerialVal,
FLRank(z.pSerialVal,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2
LIMIT 20 ;
---- Positive Test 8: Percent Rank of -1.0 * Value
--- Return expected results, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
a.SerialVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <=100
)
SELECT z.pGroupID,-1.0*z.pSerialVal,
FLRank(-1.0*z.pSerialVal,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2 DESC
LIMIT 20 ;
---- Positive Test 9: Percent Rank of Value + 1.0, Results should not change
--- Return expected results, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
a.SerialVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <= 100
)
SELECT z.pGroupID,z.pSerialVal+1.0,
FLRank(z.pSerialVal+1.0,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2
LIMIT 20 ;
---- Positive Test 10: Multiply by a very small number, Results should not change
--- Return expected results, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
a.SerialVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <= 100
)
SELECT z.pGroupID,z.pSerialVal*1e-100,
FLRank(z.pSerialVal*1e-100,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2
LIMIT 20 ;
---- Positive Test 11: Multiply by a very large number, Results should not change
--- Return expected results, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
a.SerialVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <= 100
)
SELECT z.pGroupID,z.pSerialVal*1e100,
FLRank(z.pSerialVal*1e100,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2
LIMIT 20 ;
---- Positive Test 12: Add a very large number, Results should not change
--- Precision of Double issue, all values become 1e100, so output 0, which is expected
--- to be investigated
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
a.SerialVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <= 100
)
SELECT z.pGroupID,z.pSerialVal+1e100,
FLRank(z.pSerialVal+1e100,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2
LIMIT 20 ;
-- END: POSITIVE TEST(s)
-- BEGIN: NEGATIVE TEST(s)
---- Negative Test 1: Rank Order can be 'A' or 'D'
--- Error
WITH z (pTxnDate,pGroupID,pTickerSymbol,pValue, pRankOrder) AS (
SELECT a.TxnDate,a.TickerID,a.TickerSymbol,a.ClosePrice,'X'
FROM finStockPrice a
WHERE a.TickerSymbol IN ('AAPL','HPQ','IBM','MSFT','ORCL')
AND a.TxnDate BETWEEN '2002-01-01' AND '2002-02-01')
SELECT z.pTickerSymbol,z.pTxnDate,z.pGroupID,z.pValue,
FLRank(z.pValue, z.pRankOrder) OVER (PARTITION BY z.pTickerSymbol)
AS Rank
FROM z
ORDER BY 1,2;
---- Negative test 2: TicketSymbol is set to values which are not present
--- No Output
WITH z (pTxnDate,pGroupID,pTickerSymbol,pValue, pRankOrder) AS (
SELECT a.TxnDate,a.TickerID,a.TickerSymbol,a.ClosePrice,'D'
FROM finStockPrice a
WHERE a.TickerSymbol IN ('ORCLX')
AND a.TxnDate BETWEEN '2002-01-01' AND '2002-02-01')
SELECT z.pTickerSymbol,z.pTxnDate,z.pGroupID,z.pValue,
FLRank(z.pValue, z.pRankOrder) OVER (PARTITION BY z.pTickerSymbol)
AS Rank
FROM z
ORDER BY 1,2;
---- Negative Test 3: No data
--- No Output
WITH z (pGroupID, pRandVal,pRankOrder) AS (
SELECT 1,
a.RandVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <= -1
)
SELECT z.pGroupID,z.pRandVal,
FLRank(z.pRandVal,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2;
---- Negative Test 4: Value(Double Precision) out of range: Percent Rank of 1.0e400 * Value
--- Return expected error, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
a.SerialVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <= 100
)
SELECT z.pGroupID,z.pSerialVal*1e400,
FLRank(z.pSerialVal*1e400,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2;
---- Negative Test 5: Value(Double Precision) out of range: Percent Rank of 1.0e-400 * Value
--- Return 0 value, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
a.SerialVal,
'A'
FROM fzzlSerial a
WHERE a.SerialVal <= 100
)
SELECT z.pGroupID,z.pSerialVal*1e-400,
FLRank(z.pSerialVal*1e-400,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2
LIMIT 20;
---- Negative Test 6: Invalid Data Type: Input Varchar Value
--- Return expected error, Good
WITH z (pGroupID, pSerialVal,pRankOrder) AS (
SELECT 1,
CAST(a.SerialVal AS VARCHAR(30)),
'A'
FROM fzzlSerial a
WHERE a.SerialVal <= 100
)
SELECT z.pGroupID,z.pSerialVal,
FLRank(z.pSerialVal,pRankOrder) OVER (PARTITION BY 1)
AS Rank FROM z
ORDER BY 2
LIMIT 20;
-- END: NEGATIVE TEST(s)
\time
-- END: TEST SCRIPT
|
7a69d6d00d97f86ebcb0298f507777ab142c338d
|
7778eeb8ad33a5ddb1ec9149b6426edcd724a98b
|
/machine-learning-ex4/ex4/codeSwap.sce
|
d38e51f9a92031ab17dca6212dbcea33d66c27b3
|
[] |
no_license
|
swap2ag/coursera-ML-assignments
|
ec9ad9c1c1303644476b5dd9c6a99ccb70040e24
|
593565dca6a9a82c851ee0af99a72305f32afb2d
|
refs/heads/master
| 2020-06-19T13:28:57.633218 | 2019-07-13T14:53:06 | 2019-07-13T14:53:06 | 196,726,038 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 2,222 |
sce
|
codeSwap.sce
|
clc;
clear;
close;
function g = sigmoid(z)
//SIGMOID Compute sigmoid functoon
// J = SIGMOID(z) computes the sigmoid of z.
g = 1.0 ./ (1.0 + exp(-z));
end
function theta = thetaInit(m,n)
theta = rand(m,n,'normal')
endfunction
function val = sigmoidDiff(net)
val = sigmoid(net).*(1-sigmoid(net))
endfunction
loadmatfile('irisDataset.mat')
X = irisInputs';
y = irisTargets';
//load trainingData.dat
// loads data into X variable and outputs in y variable
// ---------Architecture--------------------------------------
num_h = 4; // number of nodes in each hidden layer
n = size(X,2); // number of inputs
p = size(y,2); // number of outputs
m = size(X,1); // no. of training exaples(patterns) in matrix
h = 7; // no.of nodes in the hidden layer
eta = 0.3; // learning rate
Xnew = [ones(m,1),X];
// numTheta = 6;
//----generate random initial thetas -----
theta1 = thetaInit(h,n+1);
theta2 = thetaInit(h,h+1);
theta3 = thetaInit(h,h+1);
theta4 = thetaInit(h,h+1);
theta5 = thetaInit(h,h+1);
theta6 = thetaInit(p,h+1);
//----Calculating outward---------
net2 = Xnew * theta1'; // X(m*n+1) * theta1'((n+1),h1)
fNet2 = sigmoid(net2);
net3 = [ones(size(fNet2,1),1),fNet2]*theta2';
fNet3 = sigmoid(net3);
net4 = [ones(size(fNet3,1),1),fNet3]*theta3';
fNet4 = sigmoid(net4);
net5 = [ones(size(fNet4,1),1),fNet4]*theta4';
fNet5 = sigmoid(net5);
net6 = [ones(size(fNet5,1),1),fNet5]*theta5';
fNet6 = sigmoid(net6);
net7 = [ones(size(fNet6,1),1),fNet6]*theta6';
fNet7 = sigmoid(net7);
//------Calculating deltas -------
// at o/p neuron
delta7 = (y-fNet7) .* sigmoidDiff(net7);
// at hidden neurons
delta6 = (delta7 * theta6(:,2:$)) .* sigmoidDiff(net6);
delta5 = (delta6 * theta5(:,2:$)) .* sigmoidDiff(net5);
delta4 = (delta5 * theta4(:,2:$)) .* sigmoidDiff(net4);
delta3 = (delta4 * theta3(:,2:$)) .* sigmoidDiff(net3);
delta2 = (delta3 * theta2(:,2:$)) .* sigmoidDiff(net2);
//delta1 = (delta2 * theta1(:,2:$)) .* sigmoidDiff(net1);
//------ Calculating gradients-----
//deltaTheta7 = eta * (delta7*fNet6);
deltaTheta6 = zeros(3,8);
for i = 1:size(fNet7,1)
for j = 1:size(fNet7,2)
deltaTheta6(1:3) = deltaTheta6(1:3) + eta* fNet7(i,j)*delta7(i,1:3);
end
end
|
e1f6614eba747891bf763707ca583ff686373102
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1919/CH5/EX5.5/Ex5_5.sce
|
de758a411d228e31b3078b8023b3875c968c4842
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 576 |
sce
|
Ex5_5.sce
|
// Theory and Problems of Thermodynamics
// Chapter 5
// Second law of Thermodynamics
// Example 5
clear ;clc;
//Given data
n = 0.6 //n = efficiency of carnot engine
COP_R = 5 //TH = High temperature of reservoir
// To find the energy absorbed from the cold body by the refrigerator for each kJ
QL_Q1 = n * COP_R; // energy in kJ
// n = W/Q1 => W = n*Q1
// COP_R = QL/W => W = QL/COP_R
// n*Q1 = QL/COP_R => QL/Q1 = n * COP_R
// Results
mprintf('The energy absorbed from the cold body by the refrigerator for each kJ = %1.0f kJ', QL_Q1)
|
ebf6060d10fd8cfcdd2d13a6ac90fe581c7dc2a4
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3808/CH2/EX2.16/Ex2_16.sce
|
23615d90ae16642ee554ddd8eabc3bf018d84627
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 800 |
sce
|
Ex2_16.sce
|
//Chapter 02:Basic Structures: Sets, Functions, Sequences, Sums and Matrices
clc;
clear;
matA=[]
mprintf("Enter the dimensions of MATRIX A:")
row=input("Enter the no. of rows:")
col=input("Entet the no.of columns:")
mprintf("Enter the elements:")
for i=1:row
for j=1:col
mprintf('\nInput for Row %d , Column %d:',i,j)
n=input(" ")
matA(i)(j)=n
end
end
matB=[]
mprintf("Enter the dimensions of MATRIX B:")
row1=input("Enter the no. of rows:")
col1=input("Entet the no.of columns:")
mprintf("Enter the elements:")
for i=1:row1
for j=1:col1
mprintf('\nInput for Row %d , Column %d:',i,j)
n=input(" ")
matB(i)(j)=n
end
end
mprintf("Matrix A:")
disp(matA)
mprintf("Matrix B:")
disp(matB)
matADD=matA+matB
mprintf("Sum of Matrices:")
disp(matADD)
|
a3431eb87ede2bb068d7eaaafef3b2b283b3592b
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2129/CH4/EX4.12.1/ex4_12_1.sce
|
b723c4475572c017d39537fd41ad8ae7d54ccd6b
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 658 |
sce
|
ex4_12_1.sce
|
//Exa 4.12.1
clc;
clear;
close;
// Given data
q = 1.6 * 10^-19;// in C
N_D = 10^15;// in electrons/cm^3
N_D = N_D * 10^6;// in electrons/m^3
epsilon_r = 12;
epsilon_o = (36 * %pi * 10^9)^-1;
epsilon = epsilon_o * epsilon_r;
a = 3 * 10^-4;// in cm
a = a * 10^-2;// in m
V_P = (q * N_D * a^2)/( 2 * epsilon);// in V
disp(V_P,"The Pinch off voltage in V is");
// V_GS = V_P * (1-(b/a))^2
b = (1-0.707) *a;// in m
disp(b*10^6,"The value of b in µm is : ")
disp("Hence the channel width has been reduced to about one third of its value for V_GS = 0");//
// Note : The unit of b in the book is wrong since the value of b is calculated in µm.
|
cb5375768a5ee9cc9392c1b3561fa40662786b9a
|
2f14b5754bf00d8f425d930813ec9fbb37443f20
|
/Fibo.sce
|
10d182c072679ff282f76c7ce2eb645e3c3c98d9
|
[] |
no_license
|
sohamkan/Sci-projects
|
9f14b01e4937ccf3cf59732fc19d495d566bfaae
|
5baf7456498ba0075760095655826b7ddcae471e
|
refs/heads/master
| 2022-11-22T04:03:53.155413 | 2020-07-12T04:31:34 | 2020-07-12T04:31:34 | 278,990,043 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 87 |
sce
|
Fibo.sce
|
//fibo
clc
s=zeros(1,10)
s(1)=1;
s(2)=1;
for i=3:10
s(i)=s(i-2)+s(i-1)
end
disp(s)
|
e5ccf29549519d42788fe3f029e4da689a6a0835
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2339/CH8/EX8.5.1/Ex8_5.sce
|
5ed415f52a78dd614955da46af1a33b29e1ec0fa
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 249 |
sce
|
Ex8_5.sce
|
clc
clear
n=1.2;
P1=1;
P2=6;
Vs=1.5/60;
IP=[n/(n-1)]*[P1*100*Vs]*[((P2/P1)^((n-1)/n))-1];
printf('Indicated Power= %2.1f kW',IP);
printf('\n');
MP=6.55;
Em=IP/MP;
printf('Mechanical Efficiency= %2.1f Percent',Em*100);
printf('\n');
|
36356bd6780bc1b1e87a75c54a6ff91a6326f86f
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/551/CH2/EX2.17/17.sce
|
22257a89b81849b138b58e57311b9247e835b575
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 216 |
sce
|
17.sce
|
clc
T=1.25; //N.m
N=9500;
W1=2*%pi*N*T/1000; //kJ
p=101.3; //kPa
d=0.65; //m
A=%pi/4*d^2; //m^2
L=0.6; //m
W2=p*A*L; //kJ
Wnet=(-W1)+W2;
disp("The net work transfer for the system=")
disp(Wnet)
disp("kJ")
|
ec4426a5c606b6b7c599c32958367533ade0251c
|
4ebea1be375a38f07d1b8536e25cd91584882389
|
/src/test/example017.tst
|
967062943bc1765ea5b1255fc83b187c57187330
|
[
"MIT"
] |
permissive
|
robertsmeets/rjhg-pl
|
f5c2d850ba7a5e3daa0d4147357d37a275c7100a
|
87721b77f92d5180c34123265fac70dcf54c77a9
|
refs/heads/master
| 2021-05-22T06:46:14.395448 | 2021-02-21T05:54:35 | 2021-02-21T05:54:35 | 32,521,807 | 1 | 1 |
MIT
| 2020-05-17T16:48:51 | 2015-03-19T13:07:49 |
C
|
UTF-8
|
Scilab
| false | false | 55 |
tst
|
example017.tst
|
false
false
false
true
false
true
true
true
true
false
|
aa4224d309b9bea83cae61a42467525b96e6c652
|
b29e9715ab76b6f89609c32edd36f81a0dcf6a39
|
/ketpicscifiles6/Unscaling.sci
|
74910ceb2c323c2f9dd1d47ac2ea785e854bdbd2
|
[] |
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 | 230 |
sci
|
Unscaling.sci
|
function Out=Unscaling(G)
global LOGX LOGY SCALEX SCALEY;
GLg=[G(:,1)/SCALEX,G(:,2)/SCALEY];
Out=GLg;
if LOGX==1
Out=[10^(GLg(:,1)),GLg(:,2)];
end;
if LOGY==1
Out=[GLg(:,1),10^(GLg(:,2))];
end;
endfunction;
|
ea4168701c4d4badf60ac60f2d179652145f8c26
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3311/CH9/EX9.19/Ex9_19.sce
|
583cb654f9f13af6c6cfbc9cec1d41774c56eafc
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,183 |
sce
|
Ex9_19.sce
|
// chapter 9
// example 9.19
// Design a self-commutated invertor circuit and compute output power
// page-608-609
clear;
clc;
// given
f0=3; // in KHz
R=5; // in ohm (load resistance)
L=5; // in mH
Edc=100; // in V (dc source)
// calculate
f0=f0*1E3; // changing unit from KHz to Hz
fr=1.35*f0; // calculation of resonant frequency
L=L*1E-3; // changing unit from mH to H
w0=2*%pi*f0; // calculation of normal angular frequency
wr=2*%pi*fr; // calculation of resonant angular velocity
// since L/L1=200, therefore we get
L1=L/200; // calculation of inductance L1
// since fr=1/(2*%pi*sqrt(2*L1*C)), therefore we get
C=(1/(2*%pi*fr))^2/(2*L1); // calculation of capacitance
tou=R*C; // calculation of time constant
T=1/f0; // calculation of time period
K=exp(-T/(2*tou)); // calculation of attenuation factor
Z0=(R*%i*w0*L)/((R+(%i*w0*L))); // calculation of output impedence
Z0_magnitude=abs(Z0);
I=(Edc/Z0_magnitude)*(1/(1-4*tou*((1-K)/(1+K)))); // calculation of current flowing through Thyristor
E0_max=I*Z0_magnitude*(1-2*K/(1+K)); // calculation of maximum output vltage
E0_rms=E0_max/sqrt(2); // calculation of rms output voltage
V_BO=2*(Edc+E0_max); // calculation of forward blocking voltage rating
I_T=2*I; // calculation of Thyristor current
tq=tou*log(2/(1+K)); // calculation of invertor trun off-time
Vc=2*E0_max; // calculation of capacitor voltage
P0=(E0_max*E0_rms/R)*cosd(atand(imag(Z0),real(Z0))); // calculation of output power
printf("\nThe resonant frequency is \t\t\t fr=%.2f KHz",fr*1E-3);
printf("\nThe inductance L1 is \t\t\t\t L1=%.f uH",L1*1E6);
printf("\nThe capacitance is \t\t\t\t C=%.f uF",C*1E6);
printf("\nThe current flowing through Thyristor is \t I=%.f A",I);
printf("\nThe maximum output voltage is \t\t\t E0_max=%.2f V",E0_max);
printf("\nThe rms output voltage is \t\t\t E0_rms=%.2f V",E0_rms);
printf("\nThe forward blocking voltage is \t\t V_BO>=%.2f V",V_BO);
printf("\nThe Thyristor current is \t\t\t I_T=%.f A",I_T);
printf("\nThe invertor turn-off time is \t\t\t tq=%.1f us",tq*1E6);
printf("\nThe output power is \t\t\t\t P0=%.2f W",P0);
// Note: The answer varies slightly due to precise calculations and round off as done in the book
|
963292c3c1a341d2b5a998cf4eeb341cc76ec39e
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2582/CH5/EX5.8/Ex5_8.sce
|
84407b96692402dbc71d1d97517432f8e054e313
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 288 |
sce
|
Ex5_8.sce
|
//Ex 5.8
clc;clear;close;
format('v',5);
//vo/v1=1+R2/R1;//
//For v2/v1 i.e. gain=2, R1 & R2 should be equal
Vpp=10;//V
R1=10;//kohm
R2=10;//kohm
//Avg=1/T*integrate('Vpp*sin(2*%pi*t/T)','t',0,T/2);
Avg=-Vpp/(2*%pi)*[cos(%pi)-cos(0)];
disp(Avg,"Average output voltage(V) : ");
|
b9db646f4a552a93bd0918a01f949cb7388b6e5a
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2534/CH2/EX2.7/Ex2_7.sce
|
6ad62d0548b58dab04b556d8305ee33a430103de
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 382 |
sce
|
Ex2_7.sce
|
//Ex2_7
clc
C = 0.2*10^-6
f1 = 1.0*10^3
f2 = 50
disp("C = "+string(C)+"F")//capacitance
disp("at... f = "+string(f1)+"Hz")//frequency
disp("Xc = 1/(2*pi*f*C) = "+string(1/(2*%pi*f1*C))+"ohm")//calculation for capacitive reactance
disp("at... f = "+string(f2)+"Hz")//frequency
disp("Xc = 1/(2*pi*f*C) = "+string(1/(2*%pi*f2*C))+"ohm")//calculation for capacitive reactance
|
bb5eb7a1fa1309936ecb822526b4b27fd47beecc
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/26/CH2/EX2.2.7/2_2_7.sce
|
3df602ad4427b521c770a09dad1e03537088d0dd
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 162 |
sce
|
2_2_7.sce
|
disp('the co-efficient matrix is:')
a=[1 2;5 12]
disp(a)
disp('inverse of the matrix is:')
disp(inv(a))
disp('solution is:')
b=[-1;3];
c=inv(a);
disp(c*b)
|
fc2187081004f071236969574dcfc59023d94982
|
8217f7986187902617ad1bf89cb789618a90dd0a
|
/browsable_source/2.1/Unix/scilab-2.1/macros/util/g_eye.sci
|
b4b588b4b27e3466f3c83eaf48739fa8b99ba885
|
[
"MIT",
"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 | 336 |
sci
|
g_eye.sci
|
function x=g_eye(a)
// only to be called by function eye
//!
select type(a)
case 1 then
x=eye(a)
case 2 then
x=eye(a)
case 5 then
[m,n]=size(a)
x=sparse([],[],[m,n])
case 15 then
if a(1)=='r' then
x=eye(a(2));
elseif a(1)='lss' then
x=eye(a(5))
end
case 10 then
[m,n]=size(a)
x=eye(m,n)
else
error(43)
end
|
33fdc1bc47bd9699ff70e53f6dd47b8a23444fbe
|
c711f1c2ec6f58422bb04ec3b5227f34c623d872
|
/visualizacion/func.sce
|
9b1667e430636e32432534b0aaf7142cfe4b53a8
|
[] |
no_license
|
bleudp/machine-learning
|
4150c37242964c79afaeba31ee1388de79204cab
|
4281d6aeb32bcfe38c0b681f18b8fb50e4d0560d
|
refs/heads/master
| 2022-03-22T16:31:56.444228 | 2019-12-31T20:16:39 | 2019-12-31T20:16:39 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 72 |
sce
|
func.sce
|
function y=f(x)
y = (x^2+5*x+1)
endfunction
x=linspace(-1,8)
plot(x, f)
|
d4f2d774b55e11ba859a149d8f1dcd84a2197bdf
|
139d4a83f28a14dc04c48d99a492bec7abcc3229
|
/lab3_v8/support.sce
|
507be1e28381f7e562ee509251b0ec0532d285c7
|
[
"MIT"
] |
permissive
|
s-kostyuk/labs_alg
|
0f78d0a5df7b94f9190bc3b45a077fb3e68e74fb
|
320902e94d9bfde9d7a13a427b315605929dec17
|
refs/heads/master
| 2021-01-10T03:54:40.483782 | 2015-12-03T22:52:39 | 2015-12-03T22:56:46 | 44,764,651 | 0 | 2 | null | 2015-12-01T15:07:01 | 2015-10-22T18:20:28 |
Scilab
|
UTF-8
|
Scilab
| false | false | 833 |
sce
|
support.sce
|
exec( get_absolute_file_path('support.sce') + "0_bisection.sce", -1 );
exec( get_absolute_file_path('support.sce') + "1_chord.sce", -1 );
exec( get_absolute_file_path('support.sce') + "2_tangent.sce", -1 );
exec( get_absolute_file_path('support.sce') + "3_simple_iter.sce", -1 );
function [ a, b ] = askBorders( fun )
x = [ 0 : 0.1 : 5 ]';
plot2d( x, fun( x ) );
desc = gca();
desc.x_location = "origin";
desc.y_location = "origin";
xgrid();
while( %T )
a = input( "Input left border of the root isolation interval: " );
b = input( "Input right border of the root isolation interval: " );
if( b < a ) then
disp( "a value cant be bigger than b value. Try again." );
else
break;
end
end
endfunction
|
f13b15d03ef329b9f5919dfd4b833cc95a1e445f
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2021/CH19/EX19.2/EX19_2.sce
|
0b746ef96d24572f733c2cb99a1e396f0a7378cc
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 478 |
sce
|
EX19_2.sce
|
//Finding of vane angle , Work done , Efficiency
//Given
D1=0.6;
D=0.3;
a=30;
b=0.05;
N=1200;
g=9.81;
Hm=75;
Vf=3;
rho=1000;
B1=1;
//To Find
u=(%pi*D*N)/60;
u1=(%pi*D1*N)/60;
Q=%pi*D1*B1*Vf;
a=atand(Vf/u);disp(u1);
Vw1=((u1*tan(%pi/6))-Vf)/tan(%pi/6);
W=(rho*g*Q*u1*Vw1)/g;
W1=W/1000;
E=((g*Hm)/(u1*Vw1))*100;
disp("Vane Angle ="+string(a)+" degrees");
disp("Work Done ="+string(W1)+" KW/sec");
disp("Manometric Efficiency ="+string(E)+" Percentage");
|
0f8afe273c41c8c99b146f92f5f7dc37d76b1135
|
8781912fe931b72e88f06cb03f2a6e1e617f37fe
|
/scilab/solar-coupling1/generalhl_shootingmethod/test.sci
|
895a4951484844dd4a97bd28107968b098d68724
|
[] |
no_license
|
mikeg2105/matlab-old
|
fe216267968984e9fb0a0bdc4b9ab5a7dd6e306e
|
eac168097f9060b4787ee17e3a97f2099f8182c1
|
refs/heads/master
| 2021-05-01T07:58:19.274277 | 2018-02-11T22:09:18 | 2018-02-11T22:09:18 | 121,167,118 | 1 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 762 |
sci
|
test.sci
|
exec('myfunc.sci');
//y=ode("rk",y0,t0,t,f)
//initial condition at r=0
//chidashi
//chii
//final condition at tub wal r=R (tube radius)
//chidashf
//chif
n=200;
tchi(1:n)=zeros(n);
tpi(1:n)=zeros(n);
rw(1:4)=zeros(4);
dchi(1:4)=zeros(4);
dpi(1:4)=zeros(4);
rtube=4.2e6;
params.m=0;
params.k=0.8e-6;
params.om=2e-2; //s^-1rad
params.p=2.4e4;
params.rpi=1e-6; //Uuse initial bc
params.rchi=1e-6; //use initial bc
tchi(1)=params.rchi;
tpi(1)=params.rpi;
h=(rtube)/n;
for i=1:n
res(i)=1./N(rar(i),params.m,params.k,params.om,params.p);
end
|
8ef109271ccd3a9c571a6c8f433eb5c9d703972d
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2330/CH11/EX11.4/ex11_4.sce
|
450fcfb1229653b6d732519d9f0c0aad1a243fd2
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 297 |
sce
|
ex11_4.sce
|
// Example 11.4
format('v',5)
clc;
clear;
close;
// given data
h_fe= 120;// unit less
h_ie= 3.5*10^3;//in Ω
r_L= 2*10^3;// in Ω
h_oe= 8.5*10^-6;// in S
h_re= 1.3*10^-4;// unit less
// The voltage gain
A= h_fe*r_L/(h_ie*(1+h_oe*r_L)-h_re*h_fe*r_L)
disp(A,"The voltage gain is : ")
|
8f7714a1a4203a35eca272d0d59214922127121b
|
734830c483d7180158343b9b5599994878b8b197
|
/make-tests/autograder_make09.tst
|
a1cf3e5c8f036d8bd3c3bb6f60016e5317a0b7cd
|
[] |
no_license
|
aykamko/proj61b
|
b53a3b569f82522144e010505859aa3ab66585bb
|
5f6688b70f907107512267712a325f907e5e627b
|
refs/heads/master
| 2021-01-16T22:08:56.235971 | 2013-12-12T09:19:39 | 2013-12-12T09:19:39 | 13,669,280 | 1 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 89 |
tst
|
autograder_make09.tst
|
java -ea make.Main -f make-tests/autograder_make09.mk -D make-tests/autograder_file09 T1
|
1497c7102283bba4cd08c38061bd36a25a504d23
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1367/CH14/EX14.1/14_1.sce
|
59d18e05606d2cede24e2c2a93fd7b6ab294030c
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 332 |
sce
|
14_1.sce
|
//Find relative permeability and Intensity of magnetisation
//Ex:14.1
clc;
clear;
close;
x=1500;//susceptibility
h=2400;//mafnetic field in A/m
u_r=1+x;
disp(u_r,"relative permeability = ");
m=x*h;//in A/m
disp(m,"Intensity of magnetisation (in A/m)");
u_0=4*3.14*10^-7;
b=u_0*u_r*h;//in T
disp(b,"Remanance (in T) = ")
|
d5ba2aa60e54d76c59c6f15d5ba872e36a2574c6
|
b9117a375dfd4994834bffe24f28414f4599c02e
|
/test/simple.tst
|
fc5c6016d992d048bbbafca5acca76c1f9e5b191
|
[] |
no_license
|
mdolgun/NLPParser
|
2a7e1ab5f820c902ecb7ecd05a90a9caca7fb4bf
|
54d8494a8799efb94ff0dfa21c8c46292dd9cb22
|
refs/heads/master
| 2021-07-16T08:32:55.973580 | 2020-10-17T20:28:51 | 2020-10-17T20:28:51 | 218,727,320 | 2 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 4,656 |
tst
|
simple.tst
|
###grammar
S -> NP VP
S -> S PP
NP -> i
NP -> the man
NP -> the telescope
NP -> the house
NP -> NP PP
PP -> in NP
PP -> with NP
VP -> saw NP
###input
i saw the man in the house with the telescope
###pformat
S(
S(
S(
NP(i)
VP(
saw
NP(the man)
)
)
PP(
in
NP(the house)
)
|
NP(i)
VP(
saw
NP(
NP(the man)
PP(
in
NP(the house)
)
)
)
)
PP(
with
NP(the telescope)
)
|
S(
NP(i)
VP(
saw
NP(the man)
)
)
PP(
in
NP(
NP(the house)
PP(
with
NP(the telescope)
)
)
)
|
NP(i)
VP(
saw
NP(
NP(
NP(the man)
PP(
in
NP(the house)
)
)
PP(
with
NP(the telescope)
)
|
NP(the man)
PP(
in
NP(
NP(the house)
PP(
with
NP(the telescope)
)
)
)
)
)
)
###pformat_ext
S(
#2
S(
#2
S(
#1
NP(
#3
i
)
VP(
#10
saw
NP(
#4
the
man
)
)
)
PP(
#8
in
NP(
#6
the
house
)
)
|
#1
NP(
#3
i
)
VP(
#10
saw
NP(
#7
NP(
#4
the
man
)
PP(
#8
in
NP(
#6
the
house
)
)
)
)
)
PP(
#9
with
NP(
#5
the
telescope
)
)
|
#2
S(
#1
NP(
#3
i
)
VP(
#10
saw
NP(
#4
the
man
)
)
)
PP(
#8
in
NP(
#7
NP(
#6
the
house
)
PP(
#9
with
NP(
#5
the
telescope
)
)
)
)
|
#1
NP(
#3
i
)
VP(
#10
saw
NP(
#7
NP(
#7
NP(
#4
the
man
)
PP(
#8
in
NP(
#6
the
house
)
)
)
PP(
#9
with
NP(
#5
the
telescope
)
)
|
#7
NP(
#4
the
man
)
PP(
#8
in
NP(
#7
NP(
#6
the
house
)
PP(
#9
with
NP(
#5
the
telescope
)
)
)
)
)
)
)
###format
S(S(S(NP(i) VP(saw NP(the man))) PP(in NP(the house))|NP(i) VP(saw NP(NP(the man) PP(in NP(the house))))) PP(with NP(the telescope))|S(NP(i) VP(saw NP(the man))) PP(in NP(NP(the house) PP(with NP(the telescope))))|NP(i) VP(saw NP(NP(NP(the man) PP(in NP(the house))) PP(with NP(the telescope))|NP(the man) PP(in NP(NP(the house) PP(with NP(the telescope)))))))
|
901cf578a76299676308f2fb8764f4ef6ba8ac53
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/626/CH2/EX2.9/2_9.sce
|
e84bb02f4f8b238a7d30b5bbe2f0184386affd7a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 707 |
sce
|
2_9.sce
|
clear;
clc;
close;
disp("Example2.9")
d=0.2 //diameter in meters.
l=0.2 //length in meters.
Cf=0.005 //average wall friction coefficient.
M1=0.24 //inlet mach no.
gm=1.4 //gamma.
//From FANNO tbale
L1cr=(9.3866*d/2)/(4*Cf);
L2cr=L1cr-l;
//from FANNO table
M2=0.3;
x=2.4956;
y=2.0351;
a=4.5383;
b=3.6191;
i1=2.043;
i2=1.698;
//% total pressure drop due to friction:
dpt=(x-y)/(x)*100;
//static pressur drop:
dps=(a-b)/a*100;
//Loss pf fluid:
lf=(i2-i1);
disp(L1cr,"(a)The choking length of duct in m:")
disp(M2,"(b)The exit Mach no.:")
disp(dpt,"(c)% total pressure loss:")
disp(dps,"(d)The static pressure drop in %:")
disp(lf,"(e)Loss of impulse due to friction(I* times):")
|
e52ec924ec597cdad77b164515f5fed654ac56bf
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/291/CH2/EX2.3d/eg2_3d.sce
|
7aab989e144bcc4e46da8c35a3ec4785d998927e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 529 |
sce
|
eg2_3d.sce
|
germ_free_mice = [158 192 193 194 195 202 212 215 229 230 237 240 244 247 259 301 301 321 337 415 434 444 485 496 529 537 624 707 800];
conventional_mice = [159 189 191 198 235 245 250 256 261 265 266 280 343 356 383 403 414 428 432];
disp (mean(germ_free_mice), "Sample mean for germ-free mice is ");
disp (median(germ_free_mice), "Sample median for germ-free mice is ");
disp (mean(conventional_mice), "Sample mean for conventional mice is ");
disp (median(conventional_mice), "Sample mean for conventional mice is ");
|
dd8c1d96a0cbcb8b6e904ae2806eae8bc9de6179
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/43/CH4/EX4.6/ex4_6.sce
|
dbfd70dda108bb62f407e5ab74ad900624d7d8b5
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 96 |
sce
|
ex4_6.sce
|
clc;
clear;
Wo=2*%pi/3;
n=-8:8;
for i=1:length(n)
x(i)=cos(Wo*n(i));
end
X=fft(x,-1);
|
f0b779c22c37215c1ce6762f1c4f562259551f6c
|
29778da8b2321b9b111665ee097446f393795813
|
/automatique/Td/td5/calculs(quentin).sce
|
31bd66d82ba5dd08c041a6d598d177b8d9b29ba7
|
[] |
no_license
|
RomainCocogne/Elec3
|
947fe8590fcc084f496e0934c2bda195adb4d33f
|
47833a7112d50c6278898ee388044d5364fb482c
|
refs/heads/master
| 2020-04-27T02:23:00.159518 | 2019-08-26T22:29:00 | 2019-08-26T22:29:00 | 173,992,180 | 2 | 0 | null | 2019-05-16T14:59:40 | 2019-03-05T17:37:22 |
Jupyter Notebook
|
UTF-8
|
Scilab
| false | false | 557 |
sce
|
calculs(quentin).sce
|
t = linspace(0,1,1000)
p = poly(0,'p')
R=0.8;
L=400E-6;
Kc=20.52E-3;
J=18E-5;
Cr=9.23E-3;
taum=R*J/Kc^2;
taue=L/R;
Krpm=60/(2*%pi);
Kci=1;
Kd=0.001;
Kdrad = Kd*Krpm
Gi = 1;
K1 = Gi*taum/(R*taue + Kci*Gi*taum);
tau1 = taum/(1+Kci*Gi*taum/R/taue);
Gw = J/(4*(0.7)^2*Kc*Kdrad*K1*tau1)
//AI = syslin('c',K1/(1+tau1*p))
Bo = syslin('c',Kdrad*K1*Kc/((J*p)*(1+tau1*p)))
//B1 = syslin('c',Gw*AI*Kc/(J*p)/(1+Gw*AI*Kc*Kd/(J*p)))
evans(Bo,2000);
sgrid(0.7,1787);
//e = 11000*ones(t)
//s = csim(e,t,Kd*B1)
//scf(1)
//plot2d(t,s)
|
7a1b050e0dba6208c975d12b2153e769edb6f0ec
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/764/CH11/EX11.6.b/solution11_6.sce
|
8949422e82e7ca535a9b7c5f8ea6dc3b550304ad
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,606 |
sce
|
solution11_6.sce
|
//Obtain the path of solution file
path = get_absolute_file_path('solution11_6.sce')
//Obtain the path of data file
datapath = path + filesep() + 'data11_6.sci'
//Clear all
clc
//Execute the data file
exec(datapath)
//Step1: Clutch being brand new, apply uniform-pressure theory
//Consider torque transmission by one pair of contacting surfaces
Mt = Mt / 2
//Total force obtained from n springs
P = n * P
//Evaluate torque transmitting capacity Mtp (N-mm)
Mtp = (mu * P * ((D^3)-(d^3)))/(3 * ((D^2)-(d^2)))
//Evaluate corresponding factor of safety
fsp = Mtp / (Mt * 1000)
//Step2: Clutch subjected to initial wear, apply uniform-wear theory
//Assuming there is negligible change in spring force after wear
//Evaluate torque transmitting capacity Mtw (N-mm)
Mtw = (mu * P * (D + d))/4
//Evaluate corresponding factor of safety
fsw = Mtw / (Mt * 1000)
//Step3: Wear of friction lining before slippage
//Evaluate spring force required to transmit the torque(Mt) Pmax (N)
Pmax = (Mt * 4 * 1000)/(mu * (D + d))
//Evaluate force provided by each spring
Pmax = Pmax / n
//Evaluate stiffness of spring s (N/mm)
s = P / (delta * n)
//Evaluate allowable wear of friction lining x (mm)
x = delta - (Pmax / s)
//Print results
printf('\nStep1: Clutch being brand new,')
printf('applying uniform-pressure theory\n')
printf('\nFactor of safety(fsp) = %f\n',fsp)
printf('\nStep2: Clutch being subjected to initial wear,')
printf('applying uniform-wear theory\n')
printf('\nFactor of safety(fsw) = %f\n',fsw)
printf('\nStep3: Allowable wear of friction lining(x) = %f mm\n',x)
|
31be6a04f2ef9b527aaa1072d952e3b70781028e
|
a62e0da056102916ac0fe63d8475e3c4114f86b1
|
/set6/s_Electrical_Measurements_And_Measuring_Instruments_N._V._Suryanarayana_1376.zip/Electrical_Measurements_And_Measuring_Instruments_N._V._Suryanarayana_1376/CH4/EX4.8/4_8.sci
|
c346556c242434f9d5a3ff8fb39862ce1f26107f
|
[] |
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 | 197 |
sci
|
4_8.sci
|
errcatch(-1,"stop");mode(2);//4.8
;
Q=100.5;
M=300;
q=100.6;
m=300.25;
r=0.1;
S=0.0045;
X=((M*S/Q)+((r)/(r+m*q))*((M*q/Q)-(m)))*10^6;
printf("Unknown resistance=%.2f micro-ohm",X)
exit();
|
826237d3702228a08a01dc0d84145a45bae6d913
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/61/CH7/EX7.3/ex7_3.sce
|
4950f6718e0a1862a117d38f25c12e1c903b9904
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 263 |
sce
|
ex7_3.sce
|
//ex7.3
I_DSS=9*10^-3;
V_GS_off=-8;
V_GS=0;
I_D=value_of_I_D(9*10^-3,0,-8);
disp(I_D,'Value of I_D for V_GS=0V')
I_D=value_of_I_D(9*10^-3,-1,-8);
disp(I_D,'Value of I_D for V_GS=-1V')
I_D=value_of_I_D(9*10^-3,-4,-8);
disp(I_D,'Value of I_D for V_GS=-4V')
|
bd4b8bf050c950b4c5be2e9af7c09226c08c4263
|
d03450e9645c09cb7389514ec5d4d8d9c06bdf4d
|
/Least-Squares Data Fitting/newton.sce
|
55f899c2ace3deedb2966427e345d0ff86262c7f
|
[] |
no_license
|
amiedemmel/Optimization-Projects
|
29f3d11950c19f89aa2295d316888e4c6fa36ab4
|
bc574f4311d6fc1534e7c4892dbadb52f5e4213f
|
refs/heads/master
| 2021-01-01T05:47:41.682448 | 2015-05-08T15:56:59 | 2015-05-08T15:56:59 | 35,288,132 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 541 |
sce
|
newton.sce
|
//Newton's Method
//Amie Demmel
//4/1/15
//model to be fitted contained in myfuncn.sci
exec myfuncn.sci;
disp('Newton Method: ')
maxiter=100;
tol=10^-6;
iter=0;
x=input('enter x vector: ');
t=input('time vector: ');
y=input('y vector: ');
[f,g,h]=myfuncn(x,t,y)
h0=h;
titl=[' iter' ' f(x)' ' df(x)/dx1' ' df(x)/dx2' 'norm(df(x)'];
disp(titl);
while((norm(g) > tol)&(iter < maxiter))
iter=iter+1;
p=-h\g;
x=x+p;
[f,g,h]=myfuncn(x,t,y);
n=[iter f g' norm(g)];
disp(n);
end
hm=h;
disp('Solution: ')
disp(x)
|
41fc2c6553a739d1a627b9c0409d1ab037ced713
|
b67defe3c1cae63dd1a79578f840d069568034e6
|
/scilab/normalluck.sci
|
7cb6ada8c589cb94327b8f924dabd6e4bea1f173
|
[] |
no_license
|
wmacevoy/luck
|
bf5d93ce00e8136634d715057a97706d3aa804b3
|
47e5c8eb1782a1b4f3f5b9e7583290d9a842532e
|
refs/heads/master
| 2023-05-03T14:46:51.353817 | 2023-04-25T03:13:44 | 2023-04-25T03:13:44 | 33,452,250 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 134 |
sci
|
normalluck.sci
|
exec("zluck.sci",-1);
function [L,U]=normalluck(x,mu,Sigma)
zl=zluck(x,mu,Sigma);
L=0.5*erfc(-zl);
U=0.5*erfc(zl);
endfunction
|
e44c06fb28db2d435a2512455cfa1ca7c7473867
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1247/CH5/EX5.50/example5_50.sce
|
c927ee4fbf396305dc2d6839ddbdb02769d1f001
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 769 |
sce
|
example5_50.sce
|
clear;
clc;
// Stoichiometry
// Chapter 5
// Energy Balances
// Example 5.50
// Page 302
printf("Example 5.50, Page 302 \n \n");
// solution
// from fig 5.18
Ta = 379.5 // K
dH = -274-(-106.5) // kJ/kg sol
Cm = 2.05 // kJ/kg K
dHc = Cm*(Ta-298.15)
// basis 100 kg of 93 % acid
// acid balance
x = poly(0, 'x')
p = .93*100+x*.15-(100+x)*.77
y = roots(p)
//from fig
y1 = 25.3
printf(" (a) \n \n Resultant T of 77 percent sol = "+string(Ta)+" K. \n \n \n (b) \n \n Heat to be removed to cool it to 298.15 K = "+string(dH)+" kJ/kg sol \n \n \n (c) \n \n By mean heat capacity method : "+string(dHc)+" kJ/kg sol \n \n \n (d) \n \n Quantity of 15 percent acid to be mixed = "+string(y)+" kg. \n \n \n (e) \n \n from fig : "+string(y1)+" kg.")
|
2fb27270778e5d6ce24468fab4072abfb36039cc
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3760/CH4/EX4.2/Ex4_2.sce
|
84878809e717c6f7e61af33c12748afe15a2f3e4
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 486 |
sce
|
Ex4_2.sce
|
clc;
l=0.3;//core length
r=0.2;//radius
n=20;//speed in r.p.s.
Ia=20;//armature current
Z=500;//total conductors
Bav=0.5;//avg. flux density
a=4;//lap-wound
P=4;//no of poles
Wm=2*%pi*n
phi=((0.5*2*%pi*0.2*0.3)/4);
Ea=((P*n*Z*phi)/a);//generated emf
Pm=Ea*Ia;//gross mechanical power developed
Te=((Ea*Ia)/Wm);//internal torque
printf('Generated E.M.F. is %f V.\n',Ea);
printf('Gross mechanical power developed is %f W.\n',Pm);
printf('Internal Torque is %f Nm.',Te);
|
44c862343813a12af5ab66e34970b7ed8b8cfc33
|
f891f5aed2e66371488173c2b9c4e8f977a9f64a
|
/UL 1741 SA/Tests/Normal Ramp Rate/RR.tst
|
76cb1d49c7291eaaac59339670a1c218b78772ba
|
[] |
no_license
|
jakedm/svp_directories
|
d9b85c41b45a3ded7572f9f730e8d1efc8515099
|
19272f8784baabf83e197778768933aef015432c
|
refs/heads/master
| 2021-01-18T18:08:29.224016 | 2017-01-16T20:09:35 | 2017-01-16T20:09:35 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 1,104 |
tst
|
RR.tst
|
<scriptConfig name="RR" script="RR">
<params>
<param name="invt.pretest_delay" type="int">0</param>
<param name="rr.RRnorm_up_min" type="float">2.0</param>
<param name="rr.MSARR" type="float">2.5</param>
<param name="rr.t_dwell" type="float">3.0</param>
<param name="comm.slave_id" type="int">5</param>
<param name="invt.verification_delay" type="int">5</param>
<param name="invt.posttest_delay" type="int">10</param>
<param name="rr.Ilow" type="float">20.0</param>
<param name="rr.Irated" type="float">100.0</param>
<param name="rr.RRnorm_up_max" type="float">100.0</param>
<param name="comm.baudrate" type="int">9600</param>
<param name="comm.ifc_name" type="string">COM7</param>
<param name="datatrig.dsm_method" type="string">Disabled - Data from EUT</param>
<param name="datatrig.trigger_method" type="string">Disabled - Data from EUT</param>
<param name="pvsim.mode" type="string">Manual</param>
<param name="comm.parity" type="string">N</param>
<param name="comm.ifc_type" type="string">RTU</param>
</params>
</scriptConfig>
|
12f4df239f962cb73d0fb63ca0b6d16127cd7e69
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1646/CH1/EX1.17/Ch01Ex17.sce
|
eb8357765900181e6da16b00276ad108fd3a2a5a
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 704 |
sce
|
Ch01Ex17.sce
|
// Scilab Code Ex1.17: Page:35 (2011)
clc;clear;
c = 3e+008; // Speed of light in vacuum, unit
m0 = 9.1e-031; // Rest mass of the electron, kg
E_k = 0.1*1e+006*1.6e-019; // Kinetic energy of the electron, J
v = sqrt(2*E_k/m0); // Classical speed of the electron, m/s
printf("\nThe classical speed of the electron = %5.3e m/s", v);
// As E_k = (m-m0)*c^2 = (1/sqrt(1-v^2/c^2)-1)*m0*c^2, solving for v
v = c*sqrt(1-(m0*c^2/(E_k+m0*c^2))^2); // Relativistic speed of the electron, m/s
printf("\nThe relativistic speed of the electron = %5.3e m/s", v);
// Result
// The classical speed of the electron = 1.875e+008 m/s
// The relativistic speed of the electron = 1.644e+008 m/s
|
398260051d8b08beac942f1868725dde40d49a04
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1847/CH1/EX1.2/Ch01Ex2.sce
|
9e91a4e192c37bcad04a4a5fb667bdf4711b6183
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 469 |
sce
|
Ch01Ex2.sce
|
// Scilab Code Ex1.2: Page-1.5 (2009)
clc; clear;
m = 1.67e-027; // Mass of the particle, kg
h = 6.626e-034; // Planck's constant, Js
e = 1.6e-019; // Energy equivalent of 1 eV, J/eV
E = 1e+011*e; // Energy of the particle, J
lambda = h/sqrt(2*m*E); // de Broglie wavelength of the particle, m
printf("\nThe de Broglie wavelength of the particle = %4.2e m", lambda);
// Result
// The de Broglie wavelength of the particle = 9.06e-017 m
|
2ad3a1a5dc14f4bd74538caa2df4f23dadc8a98a
|
be70eb1ce95e82a3041bedbc88c6a0fe9500cf24
|
/functions/Laplacian/Scilab/testing.sce
|
acea9d1575b290d513a3ba6fb9b2256be9830f70
|
[] |
no_license
|
BhavaniKJ/IPT-Testing
|
7e120a63dee91c987ac8a43027336871be8974b4
|
11cde33484f8123748d93d58c98343bc1cb90f8e
|
refs/heads/master
| 2020-04-10T20:01:40.086780 | 2015-10-06T17:39:57 | 2015-10-06T17:39:57 | 42,509,792 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 3,258 |
sce
|
testing.sce
|
clear all;
clc;
cd /home/lavitha/Scilab-Image-Processing-Toolbox-master
exec builder.sce
exec loader.sce
diary("Read_image.txt")
A_jpeg=imread("color.jpeg")
A_png=imread("color.png")
A_bmp=imread("color.bmp")
A_tif=imread("color.tif")
diary(0)
diary("scilab_laplacian.txt")
//JPEG
B_jpeg_64F=laplacian(A_jpeg, "CV_64F", 5, 5, 1)
B_jpeg_32F=laplacian(A_jpeg, "CV_32F", 5, 5, 1)
B_jpeg_16S=laplacian(A_jpeg, "CV_16S", 5, 5, 1)
B_jpeg_16U=laplacian(A_jpeg, "CV_16U", 5, 5, 1)
B_jpeg_8U=laplacian(A_jpeg, "CV_8U", 5, 5, 1)
//PNG
B_png_64F=laplacian(A_png, "CV_64F", 5, 5, 1)
B_png_32F=laplacian(A_png, "CV_32F", 5, 5, 1)
B_png_16S=laplacian(A_png, "CV_16S", 5, 5, 1)
B_png_16U=laplacian(A_png, "CV_16U", 5, 5, 1)
B_png_8U=laplacian(A_png, "CV_8U", 5, 5, 1)
//bmp
B_bmp_64F=laplacian(A_bmp, "CV_64F", 5, 5, 1)
B_bmp_32F=laplacian(A_bmp, "CV_32F", 5, 5, 1)
B_bmp_16S=laplacian(A_bmp, "CV_16S", 5, 5, 1)
B_bmp_16U=laplacian(A_bmp, "CV_16U", 5, 5, 1)
B_bmp_8U=laplacian(A_bmp, "CV_8U", 5, 5, 1)
//tif
B_tif_64F=laplacian(A_tif, "CV_64F", 5, 5, 1)
B_tif_32F=laplacian(A_tif, "CV_32F", 5, 5, 1)
B_tif_16S=laplacian(A_tif, "CV_16S", 5, 5, 1)
B_tif_16U=laplacian(A_tif, "CV_16U", 5, 5, 1)
B_tif_8U=laplacian(A_tif, "CV_8U", 5, 5, 1)
diary(0)
//jpeg
imshow(B_jpeg_64F)
xs2png(0,'laplacian_jpeg_64F.png')
xs2png(gcf(),'laplacian_jpeg_64F.png')
imshow(B_jpeg_32F)
xs2png(0,'laplacian_jpeg_32F.png')
xs2png(gcf(),'laplacian_jpeg_32F.png')
imshow(B_jpeg_16U)
xs2png(0,'laplacian_jpeg_16U.png')
xs2png(gcf(),'laplacian_jpeg_16U.png')
imshow(B_jpeg_16S)
xs2png(0,'laplacian_jpeg_16S.png')
xs2png(gcf(),'laplacian_jpeg_16S.png')
imshow(B_jpeg_16S)
xs2png(0,'laplacian_jpeg_16S.png')
xs2png(gcf(),'laplacian_jpeg_16S.png')
//imshow(B_png)
//xs2png(0,'laplacian_png.png')
//xs2png(gcf(),'laplacian_png.png')
//png
imshow(B_png_64F)
xs2png(0,'laplacian_png_64F.png')
xs2png(gcf(),'laplacian_png_64F.png')
imshow(B_png_32F)
xs2png(0,'laplacian_png_32F.png')
xs2png(gcf(),'laplacian_png_32F.png')
imshow(B_png_16U)
xs2png(0,'laplacian_png_16U.png')
xs2png(gcf(),'laplacian_png_16U.png')
imshow(B_png_16S)
xs2png(0,'laplacian_png_16S.png')
xs2png(gcf(),'laplacian_png_16S.png')
imshow(B_png_16S)
xs2png(0,'laplacian_png_16S.png')
xs2png(gcf(),'laplacian_png_16S.png')
//bmp
imshow(B_bmp_64F)
xs2png(0,'laplacian_bmp_64F.png')
xs2png(gcf(),'laplacian_bmp_64F.png')
imshow(B_bmp_32F)
xs2png(0,'laplacian_bmp_32F.png')
xs2png(gcf(),'laplacian_bmp_32F.png')
imshow(B_bmp_16U)
xs2png(0,'laplacian_bmp_16U.png')
xs2png(gcf(),'laplacian_bmp_16U.png')
imshow(B_bmp_16S)
xs2png(0,'laplacian_bmp_16S.png')
xs2png(gcf(),'laplacian_bmp_16S.png')
imshow(B_bmp_16S)
xs2png(0,'laplacian_bmp_16S.png')
xs2png(gcf(),'laplacian_bmp_16S.png')
//tif
imshow(B_tif_64F)
xs2png(0,'laplacian_tif_64F.png')
xs2png(gcf(),'laplacian_tif_64F.png')
imshow(B_tif_32F)
xs2png(0,'laplacian_tif_32F.png')
xs2png(gcf(),'laplacian_tif_32F.png')
imshow(B_tif_16U)
xs2png(0,'laplacian_tif_16U.png')
xs2png(gcf(),'laplacian_tif_16U.png')
imshow(B_tif_16S)
xs2png(0,'laplacian_tif_16S.png')
xs2png(gcf(),'laplacian_tif_16S.png')
imshow(B_tif_16S)
xs2png(0,'laplacian_tif_16S.png')
xs2png(gcf(),'laplacian_tif_16S.png')
|
163c6c2583af7c338eb05078fda987dc91e2ac10
|
d7232d0b1a2442e91e35d2358ae5ff781a611588
|
/pre_amp_e_passa_alta/filtro PA.sce
|
4395bc3179bca55fb6de7fc476115d1cac1f6ae6
|
[] |
no_license
|
gutovsk49/MyoLab
|
2f178c0bced6866b45b8f1ddc8be13601811a918
|
d75d6309e994af14e108f11d966cdea6c51471bc
|
refs/heads/master
| 2020-11-25T21:32:20.851108 | 2019-12-18T14:22:11 | 2019-12-18T14:22:11 | 228,855,879 | 1 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 98 |
sce
|
filtro PA.sce
|
f = 25;
w = 2*%pi*f;
G = 51;
R1 = 1000;
C = sqrt((-1)/((w^2)*(((sqrt(2) + 2*sqrt(2))/G)-(R1^2))))
|
63a5ca211bd276575c674ccaa938070b22b25a26
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1309/CH1/EX1.7/ch1_7.sce
|
07e10a8c18d3a12a680c0adaceeaba00db617124
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 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,319 |
sce
|
ch1_7.sce
|
clear;
clc;
printf("\t\t\tchapter1_example7\n\n\n");
// Identification of all resistances and their values
// Estimation of heat transfer per unit area
// Determination of the inside and outside wall temperatures
printf("\n\t\t\tSolution to part (b)\n");
A=1; // assuming A=1 m^2 for convenience
hc1_avg=(5+25)/2; // taking average of extreme values for hc [W/m^2.K]
Rc1=1/(hc1_avg*A); // resistance on left side of wall [K/W]
printf("\nThe resistance on left side of wall is %.3f K/W",Rc1);
k=(0.38+0.52)/2; // thermal conductivity of common brick in W/M.k
L=0.1; //10 cm converted into m
Rk=(L/(k*A));// resistance of construction material, assume common brick
printf("\nThe resistance of construction material of wall is %.3f K/W",Rk);
Rc2=Rc1;
printf("\nThe resistance on right side of wall is %.3f K/W",Rc2);
printf("\n\n\t\t\tSolution to part (c)\n");
T_inf1=1000; // temperature of exhaust gases in K
T_inf2=283; // temperature of ambient air in K
q=(T_inf1-T_inf2)/(Rc1+Rk+Rc2); // heat transferred per unit area
printf("\nThe Heat transferred per unit area is %d W = %.3f kW",q,q/1000);
printf("\n\n\t\t\tSolution to part (d)\n");
T_in=T_inf1-Rc1*q; //
T_out=T_inf2+Rc2*q;
printf("\nThe inside wall temperature is %d K",T_in);
printf("\nThe outside wall temperature is %d K",T_out);
|
3af8107cf4f2100fae413e9dcc892a5a41273de4
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/1022/CH9/EX9.4/9_4.sce
|
dde1269d1f9f54b8f7cfe7f8b1b6687769dad4d6
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 381 |
sce
|
9_4.sce
|
clc
//initialisation of variables
m= 0.45 //kg
v1= 0.03 //m^3
v2= 0.06 //m^3
P= 6.9*10^5 //Pa
K= 1.4
R= 287.1 //J/Kg K
//CALCULATIONS
T1= (P*v1)/(m*R)
T2= T1
P2= P*v1/v2
T3= T2*(v2/v1)^(K-1)
P3= P2*(v2/v1)^K
//RESULTS
printf ('T1 = %.f K ',T1)
printf (' \n T2= %.f K',T2)
printf (' \n T3= %.f K',T3)
printf (' \n P2= %.2e Pa',P2)
printf (' \n P3= %.2e Pa',P3)
|
6e258cbff02d3031e92e50156dc6a566c17fb8ae
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3014/CH6/EX6.3/Ex6_3.sce
|
51313c93d96255019762d48beba4e6124ce8a69e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 225 |
sce
|
Ex6_3.sce
|
clc
//Given that
T =40 // Thickness of steel bar in cm
t1 = 40 // Time in ms
t2 = 80 // Time in ms
printf("Example 6.3\n")
X = T*t1/t2 // Calculation of depth of defect
printf("Depth of defect is %d cm.\n\n\n",X)
|
fdc82832d5e0c5d8cb87d56c0a1deec0b6f4f7bb
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2126/CH8/EX8.1.40/8_1_40.sce
|
8f0ae91370f14dde04938a348660490ca0e5a23d
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 267 |
sce
|
8_1_40.sce
|
clc
clear
//Input data
To=15+273 //Air Temperature in K
Cp=1005 //Specific heat capacity at constnat pressure in J/kg-K
//Calculation
Cmax=sqrt(2*Cp*To) //Highest possible velocity in m/s
//Output
printf('Highest possible velocity is %3.2f m/s',Cmax)
|
9fbb07b39bcd89fddcd5aa099adccfc33126fa4d
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/3869/CH1/EX1.42/Ex1_42.sce
|
b80dbac8167561d6be4d8549e48dee76e2401251
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 294 |
sce
|
Ex1_42.sce
|
clear
//
//
//
//Variable declaration
lamda=5000*10**-8 //wavelength(cm)
D=50 //separation between screen and slit(cm)
d=0.05 //separation between slits(cm)
//Calculation
beta1=lamda*D/d //fringe width(cm)
//Result
printf("\n fringe width is %0.3f cm",beta1)
|
2ee38d4b18b73016b3ebc9862bf6fb8c5edc9402
|
23573b967e8324d44226379d70559b8f0ea34905
|
/code/fminunc/SStemperature.sce
|
cdbd08d96dfc47085d5c8d3d2564ebb4e20d8e17
|
[] |
no_license
|
FOSSEE/FOT_Examples
|
91c8b8e9dc58545604b2c2af41a7e22f702b78f3
|
75947a7aa5a3955fe5a72e09f55bbdc05e3b8751
|
refs/heads/master
| 2020-03-22T09:00:48.306061 | 2018-07-24T04:49:25 | 2018-07-24T04:49:25 | 139,807,736 | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 2,255 |
sce
|
SStemperature.sce
|
//Reference: S.S. Rao,Engineering Optimization Theory and Practice, 3rd enlarged edition, New age international publishers,2011,chapter 6
// The steady state temperature (t1 and t2) at two points (mid point and the free end) of the one dimensional fin correspond to the minimum of the function.
// f(t1,t2) = 0.6382*t(1)^2 + 0.3191*t(2)^2 - 0.2809*t(1)*t(2) - 67.906*t(1) - 14.29*t(2)
//=====================================================================
// Copyright (C) 2018 - IIT Bombay - FOSSEE
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Author: Remya Kommadath
// Organization: FOSSEE, IIT Bombay
// Email: [email protected]
//=====================================================================
clc;
// Objective function
function f = ObjectiveFunction(t)
f = 0.6382*t(1)^2 + 0.3191*t(2)^2 - 0.2809*t(1)*t(2) - 67.906*t(1) - 14.29*t(2);
endfunction
// Initial guess
x0 = [100 200];
disp(x0, "Initial guess given to the solver is ")
input("Press enter to proceed: ")
[xopt,fopt,exitflag,output,gradient,hessian] = fminunc(ObjectiveFunction,x0)
// Result representation
clc
select exitflag
case 0
disp("Optimal Solution Found")
disp(xopt', "The steady state temperature at the points are")
disp(fopt, "The optimum objective function value is")
case 1
disp("Maximum Number of Iterations Exceeded. Output may not be optimal.")
disp(xopt', "The temperature at the points are")
disp(fopt, "The objective function value is")
case 2
disp("Maximum CPU Time exceeded. Output may not be optimal.")
disp(xopt', "The temperature at the points are")
disp(fopt, "The objective function value is")
case 3
disp("Stop at Tiny Step.")
disp(xopt', "The temperature at the points are")
disp(fopt, "The objective function value is")
case 4
disp("Solved To Acceptable Level.")
disp(xopt', "The temperature at the points are")
disp(fopt, "The objective function value is")
case 5
disp("Converged to a point of local infeasibility.")
end
disp(output)
|
ce2604504c2d983a8cedd5dc911f33fbaf17fb0a
|
89dea31a969e428f3ba6bbe7e01abe63875ecc6e
|
/scilab/sqr_2.sce
|
5133a659059870b2c265cf86a8e3bad11b4f1041
|
[] |
no_license
|
arvinsingh/b_tech
|
9603a83121f8b6beb7ee7d4aae9c2a27599b6f92
|
40e4d29ddfbe13d613709d8303faaccd9bb2db33
|
refs/heads/master
| 2020-03-19T14:40:00.460378 | 2018-06-08T15:25:19 | 2018-06-08T15:25:19 | 136,634,452 | 1 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 180 |
sce
|
sqr_2.sce
|
a_count = 0
for i = 0:1000
x = grand(1,1,"unf",0,2)
f = x * x
if sign(2 - f) == 1 then
a_count = a_count + 1
end
end
z = (a_count / 1000.0) * 2
disp(z)
|
b06ff6878652ab7e7bd33e20ac13d8b161055805
|
449d555969bfd7befe906877abab098c6e63a0e8
|
/2993/CH2/EX2.3/Ex2_3.sce
|
e9b485d87829a4a74785f0e178463f031d82934e
|
[] |
no_license
|
FOSSEE/Scilab-TBC-Uploads
|
948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1
|
7bc77cb1ed33745c720952c92b3b2747c5cbf2df
|
refs/heads/master
| 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 375 |
sce
|
Ex2_3.sce
|
clc;
close;
Num_of_pixels_in_width = 2400; // Given width of the image in pixels
Num_of_pixels_in_height = 2400;//Given height of the image in pixels
Resolution = 300 // Scanning resoltuion in DPI
//The Physical size of the Image
disp(string(Num_of_pixels_in_width/Resolution)+" inches x "+ string(Num_of_pixels_in_width/Resolution)+" inches","The physical size is = ")
|
3dc8737b44341b7e719933948416deba683cce17
|
d2b4190265ddc2ddd6f63bacfdafae9504390fd0
|
/SimpsonOneThird.sce
|
b5f0393e9a661ba5a8753be7d254e91a4365778f
|
[] |
no_license
|
santushtisharma10/AppliedMathematics_with_Scilab
|
8dd80f3a36298d844a42a37619e309b53022204d
|
28b4de4244768c0bb0eba1daea86d69021d89400
|
refs/heads/main
| 2023-05-29T04:40:42.507269 | 2021-06-04T13:25:58 | 2021-06-04T13:25:58 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Scilab
| false | false | 258 |
sce
|
SimpsonOneThird.sce
|
clc;
clear;
close;
deff('y=f(x)','y=sin(x)')
x0=0;
xn=%pi;
n=10; //n should be even
h=(xn-x0)/n;
s=0;
for i=1:2:n
s=s+f(x0+(i-1)*h)+4*f(x0+i*h)+f(x0+(i+1)*h);
end
integral=(h*s)/3;
printf('\nThe value of integral is=%g\n',integral)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.