MATLAB Error Message while trying to Plot Magnification Factor

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 4K views
amr55533
Messages
15
Reaction score
0

Homework Statement



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.

Homework Equations



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

The Attempt at a Solution



http://img198.imageshack.us/img198/7758/matlabw.png

*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:
Physics news on Phys.org
Well, element-wise exponentiation is what you want. Did you try using .^ for ALL of the instances of ^ in your equation?
 
I actually just figured that out. I kept leaving out the ".^" in front of the final power of 0.5. Thanks for the help!