# Homework Help: MATLAB Error Message while trying to Plot Magnification Factor

1. Apr 11, 2013

### amr55533

1. The problem statement, all variables and given/known data

I am trying to make a plot of the magnification factor of an underdamped vibrating system versus the frequency ratio using MATLAB. However, my MATLAB skills are very basic and I keep getting an error message.

Basically I am trying to plot:

MF=1/√((1-r^2)^2+(2ζr)^2) where ζ=0.01

I will be making the plot for other values of ζ later.

2. Relevant equations

MF=1/√((1-r^2)^2+(2ζr)^2) where ζ=0.01

3. The attempt at a solution

http://img198.imageshack.us/img198/7758/matlabw.png [Broken]

*The x-axis will range from 0 to 3.0

After this, I will use the code semilogy(r,MF); to generate the plot.

Thanks!

Last edited by a moderator: May 6, 2017
2. Apr 11, 2013

### cepheid

Staff Emeritus
Well, element-wise exponentiation is what you want. Did you try using .^ for ALL of the instances of ^ in your equation?

3. Apr 11, 2013

### amr55533

I actually just figured that out. I kept leaving out the ".^" in front of the final power of 0.5. Thanks for the help!