Trying to convert cartesian coordinates to polar coordinates

5 ビュー (過去 30 日間)
Tyler S
Tyler S 2021 年 9 月 30 日
回答済み: Star Strider 2021 年 9 月 30 日
So when I use cart2pol(x,y) I am getting some random values on my plots that do not line up and are incorrect. I dont have a real good way of describing it but I know its wrong and has to do with my origins cooridnate frame and how I defined it but you can see with pictures what I am talking about.
The first photo is where my data is coming from, a double pendulum with the origin being the center where the pendulum rotates. It has full range of motion 360°. The point masses can and will pass over the x axis (this is where the negatives get to be a problem) If I plot this data take straight from my program(figure1) and use [theta,rho] = cart2pol(x,y) to convert my coordinates to polar my plot looks like this (figure 2). I am concerned about the random dips with the small valleys like mass B at about 1 second and mass A at 4 seconds. Are those dips normal, are the plots correct? Are my cooridnates that are being translated wrong? I dont know but I sure hope you do so please help....

回答 (1 件)

Star Strider
Star Strider 2021 年 9 月 30 日
I am concerned about the random dips with the small valleys like mass B at about 1 second and mass A at 4 seconds. Are those dips normal, are the plots correct?
The plots appear to be correct.
See if using the unwrap function will eliminate the apparent discontinuities.
.

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by