How to solve an equation with one unknown and both sine and cosine
    5 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Michael Boyte
 il 17 Giu 2022
  
    
    
    
    
    Risposto: Star Strider
      
      
 il 17 Giu 2022
            I am trying to solve an equation for a theta value. The theta is th eonly unknown and it appears in both a sine and a cosine function. An example of an equation I am trying to solve looks like this:
3.0179 = 6*cos(theta) - 2*sin(theta)*0.8660254038
I know that theta must equal 45 or 315 degrees. But when I use solve(), I get this answer:
 -log((2989227959^(1/2) - 30179i)/(10000*(3^(1/2) - 6i)))*1i
-log(-(2989227959^(1/2) + 30179i)/(10000*(3^(1/2) - 6i)))*1i
How can I go about solving this equation for theta?
0 Commenti
Risposta accettata
  Star Strider
      
      
 il 17 Giu 2022
        Try this — 
syms theta 
Eqn = 3.0179 == 6*cos(theta) - 2*sin(theta)*0.8660254038
theta = solve(Eqn, theta)
thetav = vpa(theta, 9)
format long
thetad = double(theta)
.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Assumptions in Help Center e File Exchange
			
	Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


