Why do I get unrecognized function for a built in function?
이전 댓글 표시
%%
% AM Signal Generation Routine
%
clear
close all
%%
% Select a test waveform
load train;
% Listen to the test waveform
p1 = audioplayer(y, Fs);
playblocking(p1);
[nrow,ncol]=size(y);
if ncol ==2
y=sum(y,2);
end
%%
% Set Signal Rates and Constants
Interprate=8;
Fmax=Fs/2;
Fis=Interprate*Fs;
Fc=Fis/4;
mu=0.5;
FFTsize=4096;
FreqAxis=((1:FFTsize)'-1)*Fis/FFTsize;
FreqAxis2=((1:FFTsize)'-1)*Fis/FFTsize - Fis/2;
%Determine the time sample instances
maxtime=length(y)/Fs;
timevect=(0:1/Fis:(maxtime-1/Fis))';
tvlength=length(timevect);
%%
% Increase the sampled data rate prior to modulation
% Built in MATLAB function to increase sample rate
[message,InterpFilter] = interp(y,Interprate);
SpecInterpFilter=fft(InterpFilter/sum(InterpFilter),FFTsize);
BeqnIntF=0.5*(sum(psdg(SpecInterpFilter))/psdg(SpecInterpFilter(1)))*(Fis/FFTsize);
Getting unrecognized function for psdg. Not sure why as this is a built in fucntion.
댓글 수: 2
chrisw23
2022년 10월 12일
Is the function called psd or really psdg
Walter Roberson
2022년 10월 12일
There is no Mathworks function by that name.
답변 (1개)
John D'Errico
2022년 10월 12일
편집: John D'Errico
2022년 10월 12일
which psdg -all
As you can see, psdg does not exist as a MATLAB function, in any toolbox we can search, and they are all pretty much accessible from here.
Most likely, psdg is a function that you got from somebody else, or one you should look to from someone else. Here, for example, we see a call with that name, but no code provided.
But it is not a built-in MATLAB function that I can find. A possibility is this is a typo, that you misspelled the name.
카테고리
도움말 센터 및 File Exchange에서 Pulsed Waveforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!