Skip to content

Commit 9c574db

Browse files
committed
garbage
1 parent 2164657 commit 9c574db

File tree

39 files changed

+80
-0
lines changed

39 files changed

+80
-0
lines changed

chapters/FFT/res/FT_example.png

-3 Bytes
Loading
-2 Bytes
Loading

chapters/FFT/res/fft.png

-1 Bytes
Loading

chapters/FFT/res/radix-2screen.jpg

-8 Bytes
Loading
-7 Bytes
Loading

chapters/FFT/res/radix-8screen.jpg

-7 Bytes
Loading

chapters/FFT/res/sinusoid.png

-1 Bytes
Loading
Loading
Loading
Loading
-1 Bytes
Loading
-1 Bytes
Loading
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#include <stdio.h>
2+
3+
4+
5+
#define n_rows 3
6+
#define n_cols 3
7+
8+
/*Prints a matrix in a nice way*/
9+
void print_matrix(double matrix[n_rows][n_cols]){
10+
int i;
11+
int j;
12+
for(i = 0; i < n_rows; i++){
13+
for(j = 0; j < n_cols; j++)
14+
printf(" %0.1f ", matrix[i][j]);
15+
printf("\n");
16+
}
17+
}
18+
19+
int find_col_max_ind(double matrix[n_rows][n_cols], int column){
20+
int i;
21+
int max_ind = 0;
22+
int max = matrix[0][column - 1];
23+
24+
for(i = 1; i < n_rows; i++){
25+
if(matrix[i][column - 1] > max){
26+
max = matrix[i][column - 1];
27+
max_ind = i;
28+
}
29+
}
30+
return max_ind;
31+
}
32+
33+
void swap_rows(double matrix[n_rows][n_cols], int row_ind1, int row_ind2){
34+
double tmp;
35+
int i;
36+
37+
for(i = 0; i < n_cols; i++){
38+
tmp = matrix[row_ind1][i];
39+
matrix[row_ind1][i] = matrix[row_ind2][i];
40+
matrix[row_ind2][i] = tmp;
41+
}
42+
}
43+
44+
void gaussian_elimination(double matrix[n_rows][n_cols]){
45+
}
46+
47+
int main(){
48+
double matrix[n_rows][n_cols] = {{1, 2, 3},
49+
{4, 5, 6},
50+
{7, 8, 9}};
51+
52+
print_matrix(matrix);
53+
printf("\n%d", find_col_max_ind(matrix, 1));
54+
swap_rows(matrix, 0, 2);
55+
printf("\n");
56+
print_matrix(matrix);
57+
58+
return 0;
59+
}
60+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>com.apple.xcode.dsym.gaussian_elimination</string>
9+
<key>CFBundleInfoDictionaryVersion</key>
10+
<string>6.0</string>
11+
<key>CFBundlePackageType</key>
12+
<string>dSYM</string>
13+
<key>CFBundleSignature</key>
14+
<string>????</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>1.0</string>
17+
<key>CFBundleVersion</key>
18+
<string>1</string>
19+
</dict>
20+
</plist>

chapters/monte_carlo/res/13311.png

-4 Bytes
Loading

chapters/monte_carlo/res/195583.png

-4 Bytes
Loading

chapters/monte_carlo/res/31.png

-3 Bytes
Loading
-16 Bytes
Loading
-1 Bytes
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

chapters/principles_of_code/clone.png

-3 Bytes
Loading

chapters/principles_of_code/fork.png

-6 Bytes
Loading
-1 Bytes
Loading

chapters/taylor/function_sum.png

-1 Bytes
Loading
Loading
-2 Bytes
Loading
-3 Bytes
Loading
-1 Bytes
Loading
-2 Bytes
Loading
-2 Bytes
Loading
-1 Bytes
Loading

0 commit comments

Comments
 (0)