MATLAB Error Message while trying to Plot Magnification Factor

In summary, the conversation discusses an attempt to make a plot of the magnification factor of an underdamped vibrating system using MATLAB. The equation for the magnification factor is provided, along with the desired range for the x-axis. The issue of using element-wise exponentiation in the equation is addressed and a solution is found. The code "semilogy(r,MF);" will be used to generate the plot.
  • #1
amr55533
15
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
  • #2
Well, element-wise exponentiation is what you want. Did you try using .^ for ALL of the instances of ^ in your equation?
 
  • #3
I actually just figured that out. I kept leaving out the ".^" in front of the final power of 0.5. Thanks for the help!
 

1. What does the MATLAB error message "Plot Magnification Factor" mean?

The error message "Plot Magnification Factor" in MATLAB indicates that there is an issue with the magnification factor used while trying to plot a graph. This could be due to incorrect input values or a problem with the code.

2. How can I fix the "Plot Magnification Factor" error in MATLAB?

To fix the "Plot Magnification Factor" error in MATLAB, you should check your code to ensure that the input values for the magnification factor are correct. You can also try adjusting the magnification factor or using a different plotting function.

3. Why am I getting the "Plot Magnification Factor" error in MATLAB?

The "Plot Magnification Factor" error in MATLAB usually occurs when the magnification factor value is not specified or is incorrect. It can also occur if there is a problem with the code or if the plotting function being used does not support magnification.

4. Can I change the magnification factor in MATLAB after getting the error message?

Yes, you can change the magnification factor in MATLAB after getting the error message. You can adjust the value in your code or try using a different magnification factor to see if it resolves the error.

5. How can I prevent the "Plot Magnification Factor" error in MATLAB?

To prevent the "Plot Magnification Factor" error in MATLAB, make sure to specify the correct input values for the magnification factor and use a plotting function that supports magnification. It is also important to check your code for any errors before running it.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
882
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
4K
Back
Top