2013-03-28 4 views
0

다음 작업을 단순화하고 싶지만 입력 인수가 너무 많습니다. 아무도 내가 뭘 잘못하고 있는지 말해 줄 수 있니 ???Matlab에서 어떻게 단순화 할 수 있습니까?

>> 
syms a b c d e f g h i j k l x y xy 

A=[1 a b a^2 a*b b^2; 1 c d c*2 c*d d^2; 1 e f e^2 e*f f^2; 1 g h g^2 g*h h^2; 1 i j   i^2 i*j j^2; 1 k l k^2 k*l l^2] 

B=[1; 0; 0; 0; 0; 0] 

A = 

[ 1, a, b, a^2, a*b, b^2] 
[ 1, c, d, 2*c, c*d, d^2] 
[ 1, e, f, e^2, e*f, f^2] 
[ 1, g, h, g^2, g*h, h^2] 
[ 1, i, j, i^2, i*j, j^2] 
[ 1, k, l, k^2, k*l, l^2] 


B = 

1 
0 
0 
0 
0 
0 

>> simplify(inv(A)*B, 'steps', 100)enter code here 

답변

0

붙여 넣은 코드를 matlab (R2013a) 사본에 넣었습니다. 오류없이 완료됩니다. 결과는 매우 단순화되지 않습니다.

컴퓨터가 계산에 질식하는 경우 (매우 길음) 사물을 조금씩 분리하여 도움이되는지 확인하십시오.

을하지만 그것은 단지 수학 공식 대신 복잡한 행렬 계산을 단순화 할 수 있다는 것을 의미 기호 수학 도구 상자에 있습니다

vec=inv(A)*B 
for n=1:6 
    results(n)=simplify(vec(n), 'steps', 100); 
end 
results 
0

귀하의 호출은 this MATLAB function에 속한다. 단순화 (F, 단계 =의 numberOfSteps)

그러나 무엇보다도 먼저, 당신이 재귀 또는 반복처럼 사용할 수있는 'F'를 필요

Simplify Favoring Real Numbers 

To force simplify favor real values over complex values, set the value of Criterion to preferReal: 

syms x 
f = (exp(x + exp(-x*i)/2 - exp(x*i)/2)*i)/2 - (exp(- x - exp(-x*i)/2 + exp(x*i)/2)*i)/2; 
simplify(f, 'Criterion','preferReal', 'Steps', 100) 
ans = 
cos(sin(x))*sinh(x)*i + sin(sin(x))*cosh(x) 
If x is a real value, then this form of expression explicitly shows the real and imaginary parts. 

Although the result returned by simplify with the default setting for Criterion is shorter, here the complex value is a parameter of the sine function: 

simplify(f, 'Steps', 100) 
ans = 
sin(x*i + sin(x)) 

대신, 나는 당신이 사용 this function을 시도 할 수 있다고 생각 기능.

Simplify(sin(x)^2 + cos(x)^2, All)

희망이 있습니다.

관련 문제