x = 0;
y = 0.3;
z = 0;
for t = 1:5
    x = x + 0.1;
    if x == y
        z = x;
    end
end
z
q = 1;
for i = 1:2
    q = q * 2i;
end
q
f = @(x)(x^2); z = 2; h = 0.0001;
(f(z + h) - f(z - h)) / (2 * h)
f = @(x)(sum(x .^2)); z = [1 2 3]; n = 3; h = 0.0001;
(f(z + h) - f(z - h)) / (2 * h)
(f(z + [0 h 0]) - f(z - [0 h 0])) / (2 * h)
f = @(x)(x .^ 2);
sum(f(0:0.01:1)) * 0.01
sum(f(0.005:0.01:0.995)) * 0.01
f = @(x) (x .^ -2);
x = 1.5:1:999.5; sum(f(x)) * 1
x = 0.005:0.01:0.995; sum(f(1 ./ (1 - x)) .* ((1 - x) .^ -2)) * 0.01
f = @(x, y)(x .* y);
x = 0.05:0.01:0.995; y = 0.05:0.01:0.995; sum(sum(f(x, y))) * 0.01 * 0.01
[x, y] = meshgrid(0.005:0.01:0.995, 0.005:0.01:0.995); sum(sum(f(x, y))) * 0.01 * 0.01