Skip to content

Commit 4ba62b5

Browse files
committed
Better comments
1 parent 7166421 commit 4ba62b5

25 files changed

+76
-76
lines changed

differentiation/derivative_backward_difference.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
% All values in 'x' must be equally spaced.
55
%
66
% Args:
7-
% x: array containing x values.
8-
% y: array containing y values.
7+
% x: an array containing x values.
8+
% y: an array containing y values.
99
%
1010
% Returns:
11-
% dy: array containing the first derivative values.
11+
% dy: an array containing the first derivative values.
1212

1313
x_size = size(x, 2);
1414
y_size = size(y, 2);

differentiation/derivative_five_point.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
% All values in 'x' must be equally spaced.
55
%
66
% Args:
7-
% x: array containing x values.
8-
% y: array containing y values.
7+
% x: an array containing x values.
8+
% y: an array containing y values.
99
%
1010
% Returns:
11-
% dy: array containing the first derivative values.
11+
% dy: an array containing the first derivative values.
1212

1313
x_size = size(x, 2);
1414
y_size = size(y, 2);

differentiation/derivative_three_point.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
% All values in 'x' must be equally spaced.
55
%
66
% Args:
7-
% x: array containing x values.
8-
% y: array containing y values.
7+
% x: an array containing x values.
8+
% y: an array containing y values.
99
%
1010
% Returns:
11-
% dy: array containing the first derivative values.
11+
% dy: an array containing the first derivative values.
1212

1313
x_size = size(x, 2);
1414
y_size = size(y, 2);

integration/composite2_simpson.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
% Calculate the integral from 1/3 Simpson's Rule.
33
%
44
% Args:
5-
% x: array containing x values.
6-
% y: array containing y values.
5+
% x: an array containing x values.
6+
% y: an array containing y values.
77
%
88
% Returns:
99
% xi: integral value.

integration/composite2_trapezoidal.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
function [xi] = composite2_trapezoidal(x, y)
2-
% Calculate the integral from Trapezoidal Rule.
2+
% Calculate the integral from the Trapezoidal Rule.
33
%
44
% Args:
5-
% x: array containing x values.
6-
% y: array containing y values.
5+
% x: an array containing x values.
6+
% y: an array containing y values.
77
%
88
% Returns:
99
% xi: integral value.

integration/composite_simpson.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
%
44
% Args:
55
% f: function f(x).
6-
% a: initial point.
7-
% b: end point.
6+
% a: the initial point.
7+
% b: the final point.
88
% n: number of intervals.
99
%
1010
% Returns:

integration/composite_trapezoidal.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
function [xi] = composite_trapezoidal(f, b, a, n)
2-
% Calculate the integral from Trapezoidal Rule.
2+
% Calculate the integral from the Trapezoidal Rule.
33
%
44
% Args:
55
% f: function f(x).
6-
% a: initial point.
7-
% b: end point.
6+
% a: the initial point.
7+
% b: the final point.
88
% n: number of intervals.
99
%
1010
% Returns:

interpolation/lagrange.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
function [y_int] = lagrange(x, y, x_int)
2-
% Interpolates a value using Lagrange polynomial.
2+
% Interpolates a value using the 'Lagrange polynomial'.
33
%
44
% Args:
5-
% x: array containing x values.
6-
% y: array containing y values.
5+
% x: an array containing x values.
6+
% y: an array containing y values.
77
% x_int: value to interpolate.
88
%
99
% Returns:

interpolation/neville.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
function [y_int, q] = neville(x, y, x_int)
2-
% Interpolates a value using Neville polynomial.
2+
% Interpolates a value using the 'Neville polynomial'.
33
%
44
% Args:
5-
% x: array containing x values.
6-
% y: array containing y values.
5+
% x: an array containing x values.
6+
% y: an array containing y values.
77
% x_int: value to interpolate.
88
%
99
% Returns:

linear_systems/backward_substitution.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
%
44
% Args:
55
% upper: upper triangular matrix.
6-
% d: array containing d values.
6+
% d: an array containing d values.
77
%
88
% Returns:
9-
% x: solution of linear system.
9+
% x: solution of linear the system.
1010

1111
[n, m] = size(u);
1212

0 commit comments

Comments
 (0)