You know how can i create a signal with different frequencys?

2 次查看(过去 30 天)
I NEED TO SAMPLE AN ANALOGIC SIGNAL WITH DIFFERENTS FREQUENCYS.
T=7;
A=0.4;
F0=3000;
%MY FREQUENCYS ARE: WSA=40000*pi, WSB=30000*pi, and WSC=10000*pi
t=[0:0.1:T];
for k=1:3 % 3 Frequencys
x1=(0.4)^k * sin(k*ws*pi*t);
end

回答(1 个)

Walter Roberson
Walter Roberson 2022-2-16
To sample an analog signal with different frequencies, most often you need Data Acquisition Toolbox, or Instrument Control Toolbox, and either an Add-on hardware card or an external digital to analog device.
However, if the signal happens to be in the right voltage range and the sampling frequencies are within approximately the range 8 Hz to 48000 Hz, you might be able to connect the signal to your computer Line-In or Microphone-In, and use sound-related calls to sample the signal. Your hardware might be restricted as to which rates it supports.
You might also be able to get an Arduino or Raspberry Pi and connect the signal to it and use that as your analog to digital device.
Note that the code you show has nothing at all to do with sampling an analog signal: you are synthesizing digital signals instead. Analog signals always always involve using hardware to take a physical measurement of something.

类别

Help CenterFile Exchange 中查找有关 Digital Input and Output 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by