记F = f(x1),则如下构造F:F1 = repmat([0 100 200 300], 20, 1);F = repmat(F1(:), 1, 100);那么,不难求f0:x1 = 1;f0 = 1+cos(2*pi*n*x1+F);