필터 지우기
필터 지우기

Dont understand this error- unable to resolve filename

조회 수: 5 (최근 30일)
Amir Hussain
Amir Hussain 2022년 3월 28일
댓글: Amir Hussain 2022년 3월 28일
%Set the Sampling frequency and Sample Period
Fs=10000;
Ts=1/Fs;
%Generate the waveforms that we are looking for. NB this can be
%performed more elegantly using a loop.
t=0:Ts:10;
wave =sin(2*pi*100*t) +sin(2*pi*200*t) +sin(2*pi*300*t)
+sin(2*pi*400*t)+sin(2*pi*500*t)+sin(2*pi*600*t);
%You can use the commands
figure; plot(t,wave);
axis([0 0.1000 -5 5]);
xlabel("Time");
ylabel("Amplitude");
DataLength = length(wave);
NFFT = 2^nextpow2(DataLength); % Next power of 2 from length of wave
Amplitude = abs(fft(wave,NFFT)) / (DataLength / 2);
% The amplitude is scaled by Datalength/2 to reflect the fact that %the FFT is
double sided
RMSPower = Amplitude(1:NFFT/2)/sqrt(2);
% The amplitude measurement returned by the FFT is the peak
% amplitude. Since we are more used to working in Power, convert
% this by a factor of 1/sqrt(2) knowing that we are dealing with
% sinusoids.
PowerdB = 20*log10(RMSPower);
% Generate the frequency binds that are required for plotting the FFT
step=(Fs/NFFT);
f=0:step:Fs/2-step;
%Plot single-sided amplitude spectrum.
figure(2); plot(f,PowerdB);
D=fdesign.lowpass('N,Fc',50,500,Fs);
designmethods(D);
Hd = design(D);
%The output of the filter design can be viewed using the filter view tool
fvtool(Hd);
ERROR is
D=fdesign.lowpass('N,Fc',50,500,Fs); line
and it says
Unable to resolve the name fdesign.lowpass.
  댓글 수: 2
Torsten
Torsten 2022년 3월 28일
Do you have the DSP System Toolbox licenced and installed ?
Amir Hussain
Amir Hussain 2022년 3월 28일
that did the trick.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2022년 3월 28일
Either you do not have DSP System Toolbox installed or else you are using 2008 or earlier MATLAB.

카테고리

Help CenterFile Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by