2014-05-12 3 views
-1

두 변수가있는 4 방정식이 있는데 Matlab에서 해결하고 싶습니다. 누구든지 도와 줄 수 있습니다. 알아 내고 싶은 방정식의 두 변수는 \theta\phi입니다.Matlab에서 2 변수가있는 4 방정식

$\cos2\theta+sin2\theta+1=1$ 

$cos^2\phi cos^2\theta+cos^2\phi cos2\theta sin2\theta+cos^2\phi cos2\theta+sin2\phi cos2\phi cos2\theta sin2\theta+sin2\phi cos2\phi sin^2\theta+sin2\phi cos2\phi sin2\theta+0.4837=0$ 

$cos2\phi cos^2\theta sin2\phi + cos2\theta sin^2\phi sin2\theta +cos2\phi cos2\theta sin2\phi sin2\theta+cos2\phi cos2\theta sin2\phi +sin^2\phi sin2\theta=1$ 

$cos^2\theta sin2\phi -cos2\phi sin^2\theta-cos2\phi sin2\theta +cos2\theta sin2\phi - cos2\phi cos2\theta sin2\theta +cos2\theta sin2\phi sin2\theta=0 $ 
+0

심볼릭 도구 상자를 사용해 보셨습니까? 아래의 예를 참고하십시오 : http://www.mathworks.de/de/help/symbolic/solve.html – Daniel

답변

1

제대로 기능을 번역했다고 가정하면 문제가 해결되지 않은 것으로 보입니다. 모든 시작 값이 시도 :

function myFcn  

    X = fsolve(@F, 2*pi*rand(2,1)) 

end 

function val = F(X) 

    th = X(1); 
    ph = X(2); 

    val = [ 
     cos(2*th) + sin(2*th) 
     cos(ph).^2.*cos(th).^2 + cos(ph).^2.*cos(2*th).*sin(2*th) + cos(ph).^2.*cos(2*th) + sin(2*ph).*cos(2*ph).*cos(2*th).*sin(2*th) + sin(2*ph).*cos(2*ph).*sin(th).^2 + sin(2*ph).*cos(2*ph).*sin(2*th) + 0.4837 
     cos(2*ph).*cos(th).^2.*sin(2*ph) + cos(2*th).*sin(ph).^2.*sin(2*th) + cos(2*ph).*cos(2*th).*sin(2*ph).*sin(2*th) + cos(2*ph).*cos(2*th).*sin(2*ph) + sin(ph).^2.*sin(2*th) - 1 
     cos(th).^2.*sin(2*ph) - cos(2*ph).*sin(th).^2 - cos(2*ph).*sin(2*th) + cos(2*th).*sin(2*ph) - cos(2*ph).*cos(2*th).*sin(2*th) + cos(2*th).*sin(2*ph).*sin(2*th) 
    ]; 
end 
0

을 나는 당신이 overdetermined equations system이 있고 WLSE 모델을 해결한다고 생각합니다. 과대 결정 방정식 시스템에는 미지수 이상의 방정식이 있습니다. WLSE 모델은 문제를 해결하기 위해 방정식을 작성하는 데 도움이되는 알고리즘을 사용하여 이러한 시스템을 해결합니다. 그 후에는 쉽게 MATLAB에 쓸 수 있습니다

+0

_ 외부 리소스에 대한 링크가 권장됩니다. 그러나 링크를 둘러싼 컨텍스트를 추가하여 동료 사용자가 어떤 아이디어를 갖도록하십시오. 그것이 무엇이고 왜 그것이 존재하는지. 대상 사이트에 도달 할 수 없거나 영구적으로 오프라인 상태가되는 경우 중요한 링크의 가장 중요한 부분을 항상 인용하십시오 ._ – Bugs