MATLAB Answers

0

Undefined function 'plotSpec' for input arguments of type 'double'

Asked by Bahaa Algebory on 29 Jul 2016
Latest activity Commented on by Walter Roberson
on 26 Aug 2019 at 4:49
Hello,
The following code should give the following graph, but there is an error appearing which is "Undefined function 'plotSpec' for input arguments of type 'double'." So, any one knows what is the problem?
Thanks,
f=10;
time=2;
Ts=1/1000;
t=Ts:Ts:time;
x=sign(cos(2*pi*f*t));
plotSpec(x,Ts)

  0 Comments

Sign in to comment.

2 Answers

Answer by Walter Roberson
on 29 Jul 2016
 Accepted Answer

plotSpec is not a function in any MATLAB toolbox.
I find plotspec (lower case 'S') defined in a couple of user-contributed files that look like homework; the files vary too much to say that "plotspec" has a well-defined purpose.

  0 Comments

Sign in to comment.