Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
freqs function

Subject: freqs function

From: Cory

Date: 22 Mar, 2011 23:28:04

Message: 1 of 8

Hello,
I am keep getting the following error message:

??? Undefined function or method 'freqs' for input arguments of type 'double'.

Error in ==> main at 82
mag=abs(freqs(num_poly,den_poly,w));

The freqs function worked fine at school, but it will not work at home. I am using the Student Version R2010a. Is this function not supported in the Student Version?
I have also included a portion of the script file that I am trying to run. Thanks for your help.

Cory

%%Task 3:
    disp('Task 3')
%Frequency Response:
    disp('Frequency Response:')
        s=w1*1i;
        a=polyval(num_poly,s);
        b=polyval(den_poly,s);
        FR=a/b
w=logspace(d1,d2,n);
resp=polyval(num_poly,w*1i)./polyval(den_poly,w*1i);
real_resp=real(resp);
imaginary_resp=imag(resp);
f=[w(1:3)' real(resp(1:3))' imag(resp(1:3))'];
f=[f; w(floor(n/2):floor(n/2)+2)' real(resp(floor(n/2):floor(n/2)+2))' imag(resp(floor(n/2):floor(n/2)+2))'];
f=[f; w(end-2:end)' real(resp(end-2:end))' imag(resp(end-2:end))'];
disp(' Frequency Real Imaginary')
%fix the 5 sig figures and the alignment
fprintf('%15.4f %6.4e %6.4e\n',f')
disp(' ')
%%Task 4
    disp('Task 4')
%Plot of Frequenct Response
    disp('Plot of Frequenct Response')
    disp('PRESS ANY KEY TO SEE FIGURE 1')
pause
plot (real_resp,imaginary_resp,'k')
xlabel('Real part')
ylabel('Imaginary part')
title('Frequency response of the system')
disp('PRESS ANY KEY TO CONTINUE')
pause
disp(' ')
%%Task 5
    disp('Task 5')
%Bode Diagram
    disp('Bode Diagram')
    disp('PRESS ANY KEY TO SEE FIGURE 2')
pause
mag=abs(freqs(num_poly,den_poly,w)); *************HERE*****************
%phase angle
phang=(phase(resp));
phadeg=phang*180/pi;
%Bode Plots
subplot(2,1,1)
semilogx(w,20*log10(mag))
ylabel('Log-Magnitude')
title('Bode diagram')
subplot(2,1,2)
semilogx(w,phaseang*(180/pi))
ylabel('Phase')
xlabel('Frequency')
disp(' ')

Subject: freqs function

From: Sadik

Date: 23 Mar, 2011 01:11:04

Message: 2 of 8

Hi Cory,

You can type

ver

in the command window to see if your installation includes the Signal Processing Toolbox.

Best.

Subject: freqs function

From: Cory

Date: 23 Mar, 2011 02:58:05

Message: 3 of 8

Sadik,
Thanks for your response! I typed in ver in the command window, and this is what I got:
EDU>> ver
-------------------------------------------------------------------------------------
MATLAB Version 7.10.0.499 (R2010a)
MATLAB License Number: STUDENT
Operating System: Microsoft Windows Vista Version 6.0 (Build 6002: Service Pack 2)
Java VM Version: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
-------------------------------------------------------------------------------------
MATLAB Version 7.10 (R2010a)

I guess this mean I do not have the Signals Toolbox...? Is there a way I can get it?



"Sadik " <sadik.hava@gmail.com> wrote in message <imbhb8$7j5$1@fred.mathworks.com>...
> Hi Cory,
>
> You can type
>
> ver
>
> in the command window to see if your installation includes the Signal Processing Toolbox.
>
> Best.

Subject: freqs function

From: Sadik

Date: 23 Mar, 2011 03:17:02

Message: 4 of 8

Yeah, it seems you don't.

Your school could be providing shareware Matlab CD's [with the license being renewed every semester, for example]. This is what I am doing so I don't know exactly how it works to purchase it directly from Mathworks.

Best.

Subject: freqs function

From: Steven_Lord

Date: 23 Mar, 2011 04:02:06

Message: 5 of 8



"Cory " <jefferscw@gmail.com> wrote in message
news:imbnjt$e5l$1@fred.mathworks.com...
> Sadik,
> Thanks for your response! I typed in ver in the command window, and this
> is what I got:
> EDU>> ver
> -------------------------------------------------------------------------------------
> MATLAB Version 7.10.0.499 (R2010a)
> MATLAB License Number: STUDENT
> Operating System: Microsoft Windows Vista Version 6.0 (Build 6002: Service
> Pack 2)
> Java VM Version: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java
> HotSpot(TM) Client VM mixed mode
> -------------------------------------------------------------------------------------
> MATLAB Version 7.10
> (R2010a)
>
> I guess this mean I do not have the Signals Toolbox...? Is there a way I
> can get it?

Signal Processing Toolbox is one of the products included with the Student
Version of MATLAB, so it sounds like you just didn't install it.

http://www.mathworks.com/academia/student_version/details.html#pisv

If you're not sure how to install the toolboxes anymore see chapter 2 of the
installation instructions.

http://www.mathworks.com/support/product/product.html?product=SV

or contact Technical Support for help with the installation process.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: freqs function

From: Cory

Date: 23 Mar, 2011 04:32:04

Message: 6 of 8

Steven,
Thank you for responding. When I installed the program, I used the recommended installation, so shouldn't have the Signals Processing Toolbox installed automatically? I read throught the links you sent, but it does not talk about installing just a certian 'add-on" product. I also tried to download the toolbox for Mathworks, but it told that I can not install add-ons to a student version... Any further guidance would be greatly appreciated. The project that I am working on is due tomorrow, and I am very close to completeing it if I can only fix this problem. Thanks again.

Cory

"Steven_Lord" <slord@mathworks.com> wrote in message <imbram$b6m$1@fred.mathworks.com>...
>
>
> "Cory " <jefferscw@gmail.com> wrote in message
> news:imbnjt$e5l$1@fred.mathworks.com...
> > Sadik,
> > Thanks for your response! I typed in ver in the command window, and this
> > is what I got:
> > EDU>> ver
> > -------------------------------------------------------------------------------------
> > MATLAB Version 7.10.0.499 (R2010a)
> > MATLAB License Number: STUDENT
> > Operating System: Microsoft Windows Vista Version 6.0 (Build 6002: Service
> > Pack 2)
> > Java VM Version: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java
> > HotSpot(TM) Client VM mixed mode
> > -------------------------------------------------------------------------------------
> > MATLAB Version 7.10
> > (R2010a)
> >
> > I guess this mean I do not have the Signals Toolbox...? Is there a way I
> > can get it?
>
> Signal Processing Toolbox is one of the products included with the Student
> Version of MATLAB, so it sounds like you just didn't install it.
>
> http://www.mathworks.com/academia/student_version/details.html#pisv
>
> If you're not sure how to install the toolboxes anymore see chapter 2 of the
> installation instructions.
>
> http://www.mathworks.com/support/product/product.html?product=SV
>
> or contact Technical Support for help with the installation process.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: freqs function

From: Cory

Date: 23 Mar, 2011 04:58:04

Message: 7 of 8

Steven,
I think I figured it out... I am downloading the program again from my original purcase, and was sure to check all products for installation. This should fix it, I hope... Thanks again for your help.

Cory


"Steven_Lord" <slord@mathworks.com> wrote in message <imbram$b6m$1@fred.mathworks.com>...
>
>
> "Cory " <jefferscw@gmail.com> wrote in message
> news:imbnjt$e5l$1@fred.mathworks.com...
> > Sadik,
> > Thanks for your response! I typed in ver in the command window, and this
> > is what I got:
> > EDU>> ver
> > -------------------------------------------------------------------------------------
> > MATLAB Version 7.10.0.499 (R2010a)
> > MATLAB License Number: STUDENT
> > Operating System: Microsoft Windows Vista Version 6.0 (Build 6002: Service
> > Pack 2)
> > Java VM Version: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java
> > HotSpot(TM) Client VM mixed mode
> > -------------------------------------------------------------------------------------
> > MATLAB Version 7.10
> > (R2010a)
> >
> > I guess this mean I do not have the Signals Toolbox...? Is there a way I
> > can get it?
>
> Signal Processing Toolbox is one of the products included with the Student
> Version of MATLAB, so it sounds like you just didn't install it.
>
> http://www.mathworks.com/academia/student_version/details.html#pisv
>
> If you're not sure how to install the toolboxes anymore see chapter 2 of the
> installation instructions.
>
> http://www.mathworks.com/support/product/product.html?product=SV
>
> or contact Technical Support for help with the installation process.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: freqs function

From: Steven_Lord

Date: 23 Mar, 2011 13:35:58

Message: 8 of 8



"Cory " <jefferscw@gmail.com> wrote in message
news:imbuks$313$1@fred.mathworks.com...
> Steven,
> I think I figured it out... I am downloading the program again from my
> original purcase, and was sure to check all products for installation.
> This should fix it, I hope... Thanks again for your help.

If it doesn't, please contact Technical Support. They will be able to work
with you to help you get Signal Processing Toolbox installed.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us