how to convert digital data into analog data using matlab code?
106 ビュー (過去 30 日間)
古いコメントを表示
Sivakumaran Chandrasekaran
2013 年 10 月 25 日
回答済み: Walter Roberson
2020 年 4 月 18 日
how to convert digital data into analog data using matlab code? and vice versa... i.e., converting back analog data into digital data?
2 件のコメント
Azzi Abdelmalek
2013 年 10 月 25 日
What is the range of your analog signal, how many bits are you sing?
Sharada Reddy
2017 年 1 月 31 日
can you tell me how is the DAC in matlab works..? Any codes to convert digital into analog signal
採用された回答
Azzi Abdelmalek
2013 年 10 月 25 日
編集済み: Azzi Abdelmalek
2013 年 10 月 25 日
U=10; % range signal from 0 to 10
n=3 % number of bits
q=U/(2^n-1) % quantization interval
t=0:0.1:10; % your time vector
y=abs(10*sin(t)); % your signal
% -------convert to a digital signal yd-----------
a=fix(y/q);
yd=dec2bin(a,n)
% ------you can calculate the signal yq ----------
yq=a*q
%-------------------------------------------------
plot(t,y,'r')
hold on
plot(t,yq,'g')
hold off
2 件のコメント
Richard Lyons
2017 年 1 月 20 日
Mr. Abdelmalek's code sure looks like analog to digital conversion to me. What the original poster wanted was digital to analog conversion!
その他の回答 (2 件)
po-wei huang
2020 年 4 月 18 日
You can try this sample. Here contain DAC procedure. (But quantizing is skipped.)
0 件のコメント
Walter Roberson
2020 年 4 月 18 日
The only built in facility for converting digital to analog are the ones that output to audio devices such as sound() or audiodevicewriter, unless you want to count graphics operators. Or if you want to include the ability to set and clear DTR on a serial port. Everything else needs to talk to a digital to analog converter.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Analog Filters についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!