这会不会是软件的问题。这样执行就是有的(MATLAB2013a)。
% https://www.ilovematlab.cn/thread-292179-1-1.html
% candice0507
% 2014/05/17 18:26:03
clear
clc
%%
sqrt_snr=3;
init=126424;
[x,xn]=wnoise(2,19,sqrt_snr,init);
%% plot
figure
a = subplot(2,2,1);plot(x)
title('initial signal')
axis square
b = subplot(2,2,2);plot(xn)
title('signal with noise')
axis square