Huh? Where's the problem?

In two dimensions, try the following, which I have just happened to have available:

[X,Y] = meshgrid(0:.1:5,-1:.1:4); <-prepares a sortof collection of (x,y) points.

z = X.^2 - 4.*X + Y.^2 - Y - X.*Y; <-Calculates some function at every such point, saving in z

surfc(X,Y,z);view([1,1,1]); <-Plots a surface, z = f(x,y)

What do you mean by periodic and aperiodic? A function f(x) = x**2 which is not periodic can be made into a periodic function by repeating its x-parameter, that is, say

F(x) = f(x) for 0 <= x < 1,

= f(x - 1) for 1 <= x < 2,

= f(x - 3) for 2 <= x < 3, etc.

It is considered polite to avoid discontinuities at the chop points, but no matter.

Conversely, a periodic function, such as sine(x) can be made aperiodic by computing sine(exp(x))

Endless, endless possibilities.

In two dimensions, try the following, which I have just happened to have available:

[X,Y] = meshgrid(0:.1:5,-1:.1:4); <-prepares a sortof collection of (x,y) points.

z = X.^2 - 4.*X + Y.^2 - Y - X.*Y; <-Calculates some function at every such point, saving in z

surfc(X,Y,z);view([1,1,1])

What do you mean by periodic and aperiodic? A function f(x) = x**2 which is not periodic can be made into a periodic function by repeating its x-parameter, that is, say

F(x) = f(x) for 0 <= x < 1,

= f(x - 1) for 1 <= x < 2,

= f(x - 3) for 2 <= x < 3, etc.

It is considered polite to avoid discontinuities at the chop points, but no matter.

Conversely, a periodic function, such as sine(x) can be made aperiodic by computing sine(exp(x))

Endless, endless possibilities.