符号付固定小数点の16進数をフーリエ変換する方法を教えてください。
Afficher commentaires plus anciens
下記のような符号付固定小数点の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);
Réponses (1)
①について
すみませんが、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)
1 commentaire
K_S_
le 26 Juil 2022
Catégories
En savoir plus sur フーリエ解析とフィルター処理 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!