Why do I get unrecognized function for a built in function?
Afficher commentaires plus anciens
%%
% 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 commentaires
chrisw23
le 12 Oct 2022
Is the function called psd or really psdg
Walter Roberson
le 12 Oct 2022
There is no Mathworks function by that name.
Réponses (1)
John D'Errico
le 12 Oct 2022
Modifié(e) : John D'Errico
le 12 Oct 2022
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.
Catégories
En savoir plus sur Pulsed Waveforms 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!