Inverse of atan2d
    9 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Hi,
Does anyone know how to do the "inverse" of this matlab command atan2d?
answer = atan2d(y,x);
I have the "answer" but I need to know what y and x are.
I am not sure what to do :(
Thanks a lot!
3 件のコメント
  John D'Errico
      
      
 2019 年 1 月 9 日
				Sadly, I can't add a +1 to a comment. :)
You need to recognize that you can multiply x and y by any constant value, and the same answer will result. So both of these computations will produce the same value for Answer.
    answer = atan2d(y,x);
    answer = atan2d(2*y,2*x);
The same applies for any other constant multiplier. The conclusion is you cannot ever uniquely recover the original x and y. The best you can do is recover arbitrarily one of the many values for x and y that all lie at the same "angle".
Star showed you one way to do that.
採用された回答
  Star Strider
      
      
 2019 年 1 月 9 日
        Try this: 
y = 2;
x = 3;
answer = atan2d(y,x)
xa = cosd(answer)
ya = sind(answer)
test = atan2d(ya,xa)
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


