Is it possible to make Acos return values greater than pi?
Afficher commentaires plus anciens
I know the a, b and c and x values. I want to find Theta value. I use the command 'acos' for this, but 'acos' returns a value between [0, pi]. For example, it needs to return 240 degrees, but it retuns 120 deg. Since theta value is a phase shift, it is problematic. Any advice?

6 commentaires
Birdman
le 1 Avr 2020
Can you share your code?
David Hill
le 1 Avr 2020
Just generate both first and second quandrant solutions and discard the one that doesn't check.
Berke Ogulcan Parlak
le 1 Avr 2020
David Hill
le 1 Avr 2020
So faz should be roughly equal to phase? What are you trying to do (big picture)?
Berke Ogulcan Parlak
le 1 Avr 2020
David Hill
le 1 Avr 2020
I am still a bit confused. If you are only given C (sinusoidal input) how do you know what (a) and (c) are? If you know what A and B are, then you already know the (phase). Like I said before you could try all the possible solutions of (faz) and discard those that don't result in the equation equality.
Réponse acceptée
Plus de réponses (1)
Guillaume
le 1 Avr 2020
"Is it possible to make Acos return values greater than pi?"
No. The function codomain is mathematically defined as [0, π]. You can define your own reciprocal of the cosinus function with a different codomain but that won't be arccos.eg:
function y = myaccosd(x)
y = -accosd(x);
end
which would return your 240 degrees (mod 360) for an input of -0.5.
4 commentaires
Berke Ogulcan Parlak
le 1 Avr 2020
Guillaume
le 1 Avr 2020
"How can I get 240 degrees output from this function?"
360 - acosd(x)
Berke Ogulcan Parlak
le 1 Avr 2020
Walter Roberson
le 1 Avr 2020
Modifié(e) : Walter Roberson
le 1 Avr 2020
What information do you have that would permit you to distinguish whether 120 or 240 was the "actual" phase" ? And not (say) 600 ?
Catégories
En savoir plus sur Pulse and Transition Metrics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!