為什么MATLAB中cos(pi/2)不等于0,而是以分數的形式表示,怎么能讓這些值很小的分數變為0呢?6 t. k# w, x9 l+ B. t" R0 }) u$ M' y
說明:我在做一個計算時,最后出現的結果是下面這樣的,但是其中的那些分數本來應該是零的
4 ]% B, H# m% VT40 =$ G/ s/ e3 F3 V6 v
3 @, F' J4 |0 D! F& M
[ (4967757600021511*cos(s1)^2)/81129638414606681695789005144064 - (4967757600021511*cos(s1)*sin(s1))/81129638414606681695789005144064 - (4967757600021511*3^(1/2)*sin(s1)^2)/243388915243820045087367015432192 + (2^(1/2)*3^(1/2)*sin(s1))/3 - (4967757600021511*3^(1/2)*cos(s1)*sin(s1))/243388915243820045087367015432192, (3^(1/2)*sin(s1)^2)/3 - (24678615572571482867467662723121*cos(s1)*sin(s1))/6582018229284824168619876730229402019930943462534319453394436096 - cos(s1)^2 + (4967757600021511*2^(1/2)*3^(1/2)*sin(s1))/243388915243820045087367015432192 - (24678615572571482867467662723121*3^(1/2)*cos(s1)*sin(s1))/19746054687854472505859630190688206059792830387602958360183308288, cos(s1)*sin(s1) + (4967757600021511*2^(1/2)*3^(1/2)*sin(s1))/243388915243820045087367015432192 + (3^(1/2)*cos(s1)*sin(s1))/3, a1*cos(s1) - a3*((3^(1/2)*sin(s1)^2)/3 - cos(s1)^2) + d4*(cos(s1)*sin(s1) + (3^(1/2)*cos(s1)*sin(s1))/3) + (2^(1/2)*3^(1/2)*d3*sin(s1))/3 + (4967757600021511*2^(1/2)*3^(1/2)*d4*sin(s1))/243388915243820045087367015432192]
^3 S9 T- I$ B8 X+ \: a4 w8 o[ (4967757600021511*cos(s1)*sin(s1))/81129638414606681695789005144064 - (4967757600021511*sin(s1)^2)/81129638414606681695789005144064 + (4967757600021511*3^(1/2)*cos(s1)^2)/243388915243820045087367015432192 + (4967757600021511*3^(1/2)*cos(s1)*sin(s1))/243388915243820045087367015432192 - (2^(1/2)*3^(1/2)*cos(s1))/3, (24678615572571482867467662723121*3^(1/2)*cos(s1)^2)/19746054687854472505859630190688206059792830387602958360183308288 - (24678615572571482867467662723121*sin(s1)^2)/6582018229284824168619876730229402019930943462534319453394436096 - cos(s1)*sin(s1) - (3^(1/2)*cos(s1)*sin(s1))/3 - (4967757600021511*2^(1/2)*3^(1/2)*cos(s1))/243388915243820045087367015432192, - (3^(1/2)*cos(s1)^2)/3 - (4967757600021511*2^(1/2)*3^(1/2)*cos(s1))/243388915243820045087367015432192 + sin(s1)^2, d4*(sin(s1)^2 - (3^(1/2)*cos(s1)^2)/3) + a1*sin(s1) + a3*(cos(s1)*sin(s1) + (3^(1/2)*cos(s1)*sin(s1))/3) - (2^(1/2)*3^(1/2)*d3*cos(s1))/3 - (4967757600021511*2^(1/2)*3^(1/2)*d4*cos(s1))/243388915243820045087367015432192]
% j7 \1 O$ g" y5 V0 ^' x: w) R3 F" R8 ^[ 3^(1/2)/3 + (4967757600021511*2^(1/2)*3^(1/2)*sin(s1))/243388915243820045087367015432192 + (4967757600021511*2^(1/2)*3^(1/2)*cos(s1))/243388915243820045087367015432192, (4967757600021511*3^(1/2))/243388915243820045087367015432192 - (2^(1/2)*3^(1/2)*sin(s1))/3 + (24678615572571482867467662723121*2^(1/2)*3^(1/2)*cos(s1))/19746054687854472505859630190688206059792830387602958360183308288, (4967757600021511*3^(1/2))/243388915243820045087367015432192 - (2^(1/2)*3^(1/2)*cos(s1))/3, (3^(1/2)*d3)/3 + (4967757600021511*3^(1/2)*d4)/243388915243820045087367015432192 - (2^(1/2)*3^(1/2)*d4*cos(s1))/3 + (2^(1/2)*3^(1/2)*a3*sin(s1))/3]
0 |; X" W' v2 T) Y[ 0, 0, 0, 1]4 N( r0 c, U# N* C" `
|