Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在matlab中创建产生信号的公式?_Matlab - Fatal编程技术网

如何在matlab中创建产生信号的公式?

如何在matlab中创建产生信号的公式?,matlab,Matlab,我很难在MATLAB中创建公式。首先是因为我不太了解这个软件 所以我想问,比如这个问题: % b is the input binary bit stream % f is the frequency of the carrier n = length(b); % determine the length of bit stream t = 0:0.01:n-0.01; % time axis for i = 1:n bw( ((i-1)*100)+1 : i*100 ) = b(i);

我很难在MATLAB中创建公式。首先是因为我不太了解这个软件

所以我想问,比如这个问题:

% b is the input binary bit stream
% f is the frequency of the carrier 
n = length(b); % determine the length of bit stream
t = 0:0.01:n-0.01;   % time axis
for i = 1:n
bw( ((i-1)*100)+1 : i*100 ) = b(i); % loop       
end
carrier = cos(2*pi*f*t); % carrier signal
modulated = bw.*carrier; % modulated signal
用载波信号
s1(t)=cos(10*pi*t)
和单极不归零二进制比特流
m1(t)
绘制ASK调制信号的时域


为什么我们必须使用循环?公式是如何产生信号的

您可能想从这里开始。通过使用循环,可以在时间(t)从0到无穷大变化时获得结果