符号付固定小数点の16進数をフーリエ変換する方法を教えてください。
    1 visualizzazione (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
下記のような符号付固定小数点の16進数のfiオブジェクトy_fiをフーリエ変換する方法を教えてください。
fs = 1000e3;                        
Ts = 1/fs;
tsim = 0.001;
n = floor(tsim/Ts);
t = (0:n-1)'*Ts;
y = zeros(n,1);
fin = 1000;
a = 1;
y(1:end) = a*sin(2*pi*fin*t);
T = numerictype(true,64,60);
F = fimath('OverflowMode',          'saturate',...
           'RoundMode',             'round',...
           'SumMode',               'FullPrecision',...
           'ProductMode',           'FullPrecision',...
           'MaxProductWordLength',  256,...
           'MaxSumWordLength',      256);
y_fi = fi(y,T,F);
Risposte (1)
  Hernia Baby
      
 il 26 Lug 2022
        ①について
 すみませんが、double型に戻さないでのスペクトル解析はわかりませんでした。
②について
 double型でいいのなら1行で解析可能です
fs = 1000e3;                        
Ts = 1/fs;
tsim = 0.001;
n = floor(tsim/Ts);
t = (0:n-1)'*Ts;
y = zeros(n,1);
fin = 1000;
a = 1;
y(1:end) = a*sin(2*pi*fin*t);
T = numerictype(true,64,60);
F = fimath('OverflowMode',          'saturate',...
           'RoundMode',             'round',...
           'SumMode',               'FullPrecision',...
           'ProductMode',           'FullPrecision',...
           'MaxProductWordLength',  256,...
           'MaxSumWordLength',      256);
y_fi = fi(y,T,F);
double型にしてパワースペクトル解析を行います
pspectrum(double(y_fi),fs)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

