# MOC_DISPLAY Estimate and plot the modulus of continuity function

MOC_DISPLAY is a MATLAB library of functions which estimate and plot the modulus of continuity function.

Given a function F(X) and an interval [A,B], the modulus of continuity may be defined as

MC(T) = max | F(X+DX) - F(X) |, for 0 <= DX <= T, and X and X+DX in [A,B].
The function MC(T) records the maximum change that can occur in F(X) over an interval of length T or less. MC(T) is a monotone increasing function.

For convenience, we define a related function

MC1(DX) = max | F(X+DX) - F(X) |, for 0 <= DX, and X and X+DX in [A,B].
The function MC1(DX) records the maximum change that can occur in F(X) over an interval of length exactly DX. MC1(DX) need not be a strictly increasing function, particularly if F(X) is periodic.

### Usage:

moc_display ( a, b, n, @f )
where
• a, b are the endpoints of the interval;
• n is the number of equally spaced sample points;
• @f is a handle to the function F(X).
This command will evaluate F(X) at N points, estimate the modulus of continuity function and displace F(X), MC1(DX) and MC(T).

### Languages:

MOC_DISPLAY is available in a MATLAB version.

### Source Code:

• moc.m estimates MC(T).
• moc_display.m estimates the modulus of continuity function, and displays F(X), MC1(DX) and MC(T).
• moc1.m estimates MC1(DX).

### Examples and Tests:

F1 = cos ( 6 * pi * x ) .* exp ( - pi * x .* x );

• f1.m, evaluates the function.
• f1.png, the plot created by MOC_DISPLAY.

F2 = cos ( 3 * pi * x );

• f2.m, evaluates the function.
• f2.png, the plot created by MOC_DISPLAY.

F3 = x .* x + 0.5 * x - 2;

• f3.m, evaluates the function.
• f3.png, the plot created by MOC_DISPLAY.

F4 = exp ( x ) + 3;

• f4.m, evaluates the function.
• f4.png, the plot created by MOC_DISPLAY.

F5 = floor ( ( x - 1 ).^2 );

• f5.m, evaluates the function.
• f5.png, the plot created by MOC_DISPLAY.

You can go up one level to the MATLAB source codes.

Last revised on 04 October 2010.