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!