You know how can i create a signal with different frequencys?
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Walter Roberson
on 16 Feb 2022
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.
0 Comments
See Also
Categories
Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!