为什么MATLAB中cos(pi/2)不等于0,而是以分数的形式表示,怎么能让这些值很小的分数变为0呢?- | u, T' O P( ~, S/ O
说明:我在做一个计算时,最后出现的结果是下面这样的,但是其中的那些分数本来应该是零的
, t% n9 V" R1 w4 UT40 = P, u$ v: S [4 ? q. O
+ [: }6 S' H# _7 l; N
[ (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]+ _% c5 V6 V: l0 {3 \2 \- t2 t
[ (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]
! J6 Z5 a) L3 I" B6 J4 ?1 v[ 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]1 n0 U( {0 C( x5 d; |* ^
[ 0, 0, 0, 1]2 t3 f+ t& j5 ^7 O
|