-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.sci
56 lines (40 loc) · 1.07 KB
/
sample.sci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Functions for qualitative feature extraction
//## Sample
//line
//to be
//commented ##
//## another sample
//line to be commented ##
exec sample_header2.sci
exec abc.sce
exec some_folder/yass.sci
exec sample_header.sci
exec sample.sci
// function [NOO] = vector(something)
// exec this_wont_be_expanded.sci
// Some random pre-existsing comments
// functions
function [output1, output3] = sample_function(inputargs)
endfunction
function [output2] = sample_function2(inputargs)
function [sum_vector, variable_with_no_return_assigned] = vector_sum(image_mat, mode_str)
image_mat_size = size(image_mat);
select mode_str
case "cols" then // Sum of each column
cols_sum = []
for i = 1 : image_mat_size(2)
col_sum(1,$+1) = sum(image_mat(:,i)); // col_sum is row vector
end
sum_vector = col_sum;
col_sum = [];
case "rows" then // Sum of each row
row_sum = []
for i = 1 : image_mat_size(1)
row_sum(1,$+1) = sum(image_mat(i,:)); // row_sum is row vector
end
sum_vector = row_sum;
row_sum = [];
else
printf("check for args");
end
endfunction