Phase Plots Dropping when quadrant changes

6 ビュー (過去 30 日間)
Austin
Austin 2024 年 9 月 11 日
コメント済み: Sam Chak 2024 年 9 月 11 日
I am trying to plot the phase of a vibratory system with base excitation. I did the magnitude, but the phase is giving me problems. How can I make my equations so the phase equations are continuous and do not suddenly drop when the quadrant changes? atan2d does not show up with anything. Using atand shows the below result:
It should look something the phase plot on the top right of this:
Heres my code:

回答 (1 件)

Star Strider
Star Strider 2024 年 9 月 11 日
Use either the angle function or atan2d for this. The angle function returns the angle of a complex variable in radians, so you will need to use the rad2deg function with its output.
  3 件のコメント
Star Strider
Star Strider 2024 年 9 月 11 日
For atan2d, you need to enter the arguments as:
P = @(r) atan2d(2*SR.*r.^3, 1+(4.*SR.^2-1).*r.^2);
Here, the ‘y’ argument is first, ‘x’ second. I also used element-wise operations, since I assume ‘r’ is a vector. Unless you specifically intend matrix operations, use element-wise operations if any of the variables are arrays..
If ‘r’ is complex, consider:
P = @(r) atan2d(2*SR.*imag(r).^3, 1+(4.*SR.^2-1).*real(r).^2);
I don’t know what your variables are, so this is a guess on my part.
.
Sam Chak
Sam Chak 2024 年 9 月 11 日
Hi Austin,
Please share the full code for evaluation. You can click on the indentation icon and copy/paste the code to the grey field.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by