フィルターのクリア

can anyone help me out from this Undefined function 'fftOneSide' for input arguments of type 'double' matlab error

1 回表示 (過去 30 日間)
Here is full code & error,
filename = 'D:\ME_3rd sem\hiral mam\1\pooja_matlab\data\data\s5.wav';
[y,fs]= audioread(filename);
%y=au.signal;
%fs=au.fs;
%nbits=au.nbits;
n=512;
t=(1:n)'/fs;
startIndex=30418;
endIndex=startIndex+n-1;
original=y(startIndex:endIndex+n+1);
windowed=original*hamming(length(original));
%signal=signal.*hamming(length(signal));
plotOpt=1;
[mag1, phase1, freq1,powerSpecInDb]=fftOneSide(original, fs); %error occur here
[mag2, phase2, freq2,powerSpecInDb]=fftOneSide(windowed, fs);
subplot(3,2,1); plot(original); grid on; axis([-inf inf -1 1]); title('Original signal');
subplot(3,2,2); plot(windowed); grid on; axis([-inf inf -1 1]); title('Windowed signal');
%subplot(3,2,3); plot(freq1, mag1); grid on; title('Energy spectrum (linear scale)');
%subplot(3,2,4); plot(freq2, mag2); grid on; title('Energy spectrum (linear scale)');
%subplot(3,2,5); plot(freq1, 20*log(mag1)); grid on; axis([-inf inf -80 120]); title('Energy spectrum (db)');
%subplot(3,2,6); plot(freq2, 20*log(mag2)); grid on; axis([-inf inf -80 120]); title('Energy spectrum (db)');

採用された回答

Walter Roberson
Walter Roberson 2017 年 1 月 29 日
https://github.com/torogmw/MusicSegmentation/blob/master/fftOneSide.m
  4 件のコメント
Pooja Prajapati
Pooja Prajapati 2017 年 1 月 30 日
編集済み: Pooja Prajapati 2017 年 1 月 30 日
ya tysm walter,
I realize that after,
but problem is there,
Actually i create new one for fftoneside function,
in that i call function hamming_window(which is my code i discuss earlier) instead selfdemo,
also in hamming i call fftoneside,
then graph is appear only for original,energy specturum(linear scale),energy specturum(db), it's not available for windowing n other remaining so now what to do?
is there any mistake of mine to call function in both files?
or something else?
please help me in this,
also 1 more question that is it ok to code about plotting in both of files or jst do it in one file ?if yes then which is good practice to write in fftoneside file or in hamming in my file?
doughted in it as fftoneside is just for calling that function (may b i am wrong).
check the output of that plotting from attachmnet.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by