正在加载图片...
ATLAB Lecture 5 School of Mathematical Sciences Xiamen University http∥gdjpkc.xmu.edu.cr F how=simple() returns the shortest result in the first variable and the simplification method used to achieve the result in the second variable >>f, how]=simple(cos(x)2+sin(x)2) how combine The simple function sometimes improves on the result returned by simplify, one of the simplifications that it tries. For example, when applied to the examples given for simplify, le returns a simpler(or at least shorter) result in two cases implify(f) simple(f) (/a^3+6a2+12/a+8)(1/3)(2a+)3a^3y1/3)(2+a+1)/a syms xy positive; log(x*y) log(x)+log(y) In some cases, it is advantageous to apply simple twice to obtain the effect of two different simplification functions >>f=(1/a^3+6a^2+12/a+8)^(1/3) Simple f (2*a+1)a Simple Simple f-simple( Simple f) Simple Simple f= > Simple Simple f=simple(simple(f)) Simple Simple f= 2+1/a The simple function is particularly effective on expressions involving trigonometric functions ple(f os(x)2+sin(x 2 2°cos(x)y2-sin(x)^2 3°cos(x)^2-1 cos(x) 2-sin(x) cos(x)+(-sin(x)^2)(1/2) cos(x)+I sin(x) cos(x)+i*sin(x) cos(3°acos(x) 4*x^3-3*x ◆* he findsym command Lec5-8MATLAB Lecture 5  School of Mathematical Sciences Xiamen University  http://gdjpkc.xmu.edu.cn  Lec5­8  f =  1 [F, how] = simple(f) returns the shortest result in the first variable and the simplification  method used to achieve the result in the second variable.  >> [f, how] = simple(cos(x)^2+sin(x)^2) f =  1  how =  combine The simple function sometimes  improves  on the result returned by simplify,  one of the simplifications that it tries. For example, when applied to the examples given for simplify,  simple returns a simpler (or at least shorter) result in two cases.  f simplify(f) simple(f) (1/a^3+6/a^2+12/a+8)^(1/3)  ((2*a+1)^3/a^3)^(1/3)  (2*a+1)/a syms x y positive; log(x*y) log(x)+log(y) log(x*y) In some cases, it is advantageous to apply simple twice to obtain the effect of two different  simplification functions.  >> f = (1/a^3+6/a^2+12/a+8)^(1/3);  >> Simple_f=simple(f) Simple_f =  (2*a+1)/a >> Simple_Simple_f=simple(Simple_f) Simple_Simple_f =  2+1/a or >> Simple_Simple_f =simple(simple(f)) Simple_Simple_f =  2+1/a The simple function is particularly effective on expressions  involving trigonometric functions.  f simple(f) cos(x)^2+sin(x)^2  1  2*cos(x)^2­sin(x)^2  3*cos(x)^2­1  cos(x)^2­sin(x)^2  cos(2*x) cos(x)+(­sin(x)^2)^(1/2)  cos(x)+i*sin(x) cos(x) +i*sin(x) exp(i*x) cos(3*acos(x)) 4*x^3­3*x  ² *The findsym Command
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有