% neurcite vyrazy: sin(0)/0 Warning: Divide by zero. ans = NaN x=linspace(-pi,pi,101); y=sin(x)./x; Warning: Divide by zero. find(isnan(y)) ans = 51 plot(x,y) y(51)=1; plot(x,y) help limit --- help for sym/limit.m --- LIMIT Limit of an expression. LIMIT(F,x,a) takes the limit of the symbolic expression F as x -> a. LIMIT(F,a) uses findsym(F) as the independent variable. LIMIT(F) uses a = 0 as the limit point. LIMIT(F,x,a,'right') or LIMIT(F,x,a,'left') specify the direction of a one-sided limit. Examples: syms x a t h; limit(sin(x)/x) returns 1 limit((x-2)/(x^2-4),2) returns 1/4 limit((1+2*t/x)^(3*x),x,inf) returns exp(6*t) limit(1/x,x,0,'right') returns inf limit(1/x,x,0,'left') returns -inf limit((sin(x+h)-sin(x))/h,h,0) returns cos(x) v = [(1 + a/x)^x, exp(-x)]; limit(v,x,inf,'left') returns [exp(a), 0] syms x limit(sin(x)/x,x,0) ans = 1 0^0 ans = 1 quit syms x solve (x^6-1) ans = [ 1] [ -1] [ -1/2-1/2*i*3^(1/2)] [ -1/2+1/2*i*3^(1/2)] [ 1/2+1/2*i*3^(1/2)] [ 1/2-1/2*i*3^(1/2)] solve(x^4-x^3+2x^2-4x-8) ??? solve(x^4-x^3+2x^2-4x-8) | Error: ")" expected, "identifier" found. solve ((x^4)-(x^3)+2*(x^2)-(4*x-8)) ans = [ 1/4+1/12*3^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+1/12*6^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)-4*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)*(-35+3*i*1047^(1/2))^(2/3)-88*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+75*3^(1/2)*(-35+3*i*1047^(1/2))^(1/3))/(-35+3*i*1047^(1/2))^(1/3)/((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4+1/12*3^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)-1/12*6^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)-4*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)*(-35+3*i*1047^(1/2))^(2/3)-88*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+75*3^(1/2)*(-35+3*i*1047^(1/2))^(1/3))/(-35+3*i*1047^(1/2))^(1/3)/((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4-1/12*3^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+1/12*(-(78*(-35+3*i*1047^(1/2))^(1/3)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+24*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)*(-35+3*i*1047^(1/2))^(2/3)+528*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+450*3^(1/2)*(-35+3*i*1047^(1/2))^(1/3))/(-35+3*i*1047^(1/2))^(1/3)/((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4-1/12*3^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)-1/12*(-(78*(-35+3*i*1047^(1/2))^(1/3)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+24*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)*(-35+3*i*1047^(1/2))^(2/3)+528*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+450*3^(1/2)*(-35+3*i*1047^(1/2))^(1/3))/(-35+3*i*1047^(1/2))^(1/3)/((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2))^(1/2)] help simplify --- help for sym/simplify.m --- SIMPLIFY Symbolic simplification. SIMPLIFY(S) simplifies each element of the symbolic matrix S. Examples: simplify(sin(x)^2 + cos(x)^2) is 1 . simplify(exp(c*log(sqrt(alpha+beta)))) See also SIMPLE, FACTOR, EXPAND, COLLECT. S=solve ((x^4)-(x^3)+2*(x^2)-(4*x-8)) S = [ 1/4+1/12*3^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+1/12*6^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)-4*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)*(-35+3*i*1047^(1/2))^(2/3)-88*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+75*3^(1/2)*(-35+3*i*1047^(1/2))^(1/3))/(-35+3*i*1047^(1/2))^(1/3)/((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4+1/12*3^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)-1/12*6^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)-4*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)*(-35+3*i*1047^(1/2))^(2/3)-88*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+75*3^(1/2)*(-35+3*i*1047^(1/2))^(1/3))/(-35+3*i*1047^(1/2))^(1/3)/((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4-1/12*3^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+1/12*(-(78*(-35+3*i*1047^(1/2))^(1/3)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+24*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)*(-35+3*i*1047^(1/2))^(2/3)+528*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+450*3^(1/2)*(-35+3*i*1047^(1/2))^(1/3))/(-35+3*i*1047^(1/2))^(1/3)/((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4-1/12*3^(1/2)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)-1/12*(-(78*(-35+3*i*1047^(1/2))^(1/3)*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+24*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)*(-35+3*i*1047^(1/2))^(2/3)+528*((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2)+450*3^(1/2)*(-35+3*i*1047^(1/2))^(1/3))/(-35+3*i*1047^(1/2))^(1/3)/((-13*(-35+3*i*1047^(1/2))^(1/3)+8*(-35+3*i*1047^(1/2))^(2/3)+176)/(-35+3*i*1047^(1/2))^(1/3))^(1/2))^(1/2)] simplify(S) ans = [ 1/4+1/12*3^(1/2)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)+1/12*3^(1/2)*2^(1/2)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)-4*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)-88*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)+75*3^(1/2)*(-35+3*i*3^(1/2)*349^(1/2))^(1/3))/(-35+3*i*3^(1/2)*349^(1/2))^(1/3)/((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4+1/12*3^(1/2)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)-1/12*3^(1/2)*2^(1/2)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)-4*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)-88*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)+75*3^(1/2)*(-35+3*i*3^(1/2)*349^(1/2))^(1/3))/(-35+3*i*3^(1/2)*349^(1/2))^(1/3)/((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4-1/12*3^(1/2)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)+1/12*((-78*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)-24*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)-528*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)-450*3^(1/2)*(-35+3*i*3^(1/2)*349^(1/2))^(1/3))/(-35+3*i*3^(1/2)*349^(1/2))^(1/3)/((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2))^(1/2)] [ 1/4-1/12*3^(1/2)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)-1/12*((-78*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)-24*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)-528*((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2)-450*3^(1/2)*(-35+3*i*3^(1/2)*349^(1/2))^(1/3))/(-35+3*i*3^(1/2)*349^(1/2))^(1/3)/((-13*(-35+3*i*3^(1/2)*349^(1/2))^(1/3)+8*(-35+3*i*3^(1/2)*349^(1/2))^(2/3)+176)/(-35+3*i*3^(1/2)*349^(1/2))^(1/3))^(1/2))^(1/2)] x=linspace(-5,5) x = Columns 1 through 8 -5.0000 -4.8990 -4.7980 -4.6970 -4.5960 -4.4949 -4.3939 -4.2929 Columns 9 through 16 -4.1919 -4.0909 -3.9899 -3.8889 -3.7879 -3.6869 -3.5859 -3.4848 Columns 17 through 24 -3.3838 -3.2828 -3.1818 -3.0808 -2.9798 -2.8788 -2.7778 -2.6768 Columns 25 through 32 -2.5758 -2.4747 -2.3737 -2.2727 -2.1717 -2.0707 -1.9697 -1.8687 Columns 33 through 40 -1.7677 -1.6667 -1.5657 -1.4646 -1.3636 -1.2626 -1.1616 -1.0606 Columns 41 through 48 -0.9596 -0.8586 -0.7576 -0.6566 -0.5556 -0.4545 -0.3535 -0.2525 Columns 49 through 56 -0.1515 -0.0505 0.0505 0.1515 0.2525 0.3535 0.4545 0.5556 Columns 57 through 64 0.6566 0.7576 0.8586 0.9596 1.0606 1.1616 1.2626 1.3636 Columns 65 through 72 1.4646 1.5657 1.6667 1.7677 1.8687 1.9697 2.0707 2.1717 Columns 73 through 80 2.2727 2.3737 2.4747 2.5758 2.6768 2.7778 2.8788 2.9798 Columns 81 through 88 3.0808 3.1818 3.2828 3.3838 3.4848 3.5859 3.6869 3.7879 Columns 89 through 96 3.8889 3.9899 4.0909 4.1919 4.2929 4.3939 4.4949 4.5960 Columns 97 through 100 4.6970 4.7980 4.8990 5.0000 y=(1/2).^abs(x) y = Columns 1 through 8 0.0313 0.0335 0.0359 0.0386 0.0414 0.0443 0.0476 0.0510 Columns 9 through 16 0.0547 0.0587 0.0629 0.0675 0.0724 0.0777 0.0833 0.0893 Columns 17 through 24 0.0958 0.1027 0.1102 0.1182 0.1268 0.1360 0.1458 0.1564 Columns 25 through 32 0.1677 0.1799 0.1929 0.2069 0.2219 0.2380 0.2553 0.2738 Columns 33 through 40 0.2937 0.3150 0.3378 0.3623 0.3886 0.4168 0.4470 0.4794 Columns 41 through 48 0.5142 0.5515 0.5915 0.6344 0.6804 0.7297 0.7827 0.8394 Columns 49 through 56 0.9003 0.9656 0.9656 0.9003 0.8394 0.7827 0.7297 0.6804 Columns 57 through 64 0.6344 0.5915 0.5515 0.5142 0.4794 0.4470 0.4168 0.3886 Columns 65 through 72 0.3623 0.3378 0.3150 0.2937 0.2738 0.2553 0.2380 0.2219 Columns 73 through 80 0.2069 0.1929 0.1799 0.1677 0.1564 0.1458 0.1360 0.1268 Columns 81 through 88 0.1182 0.1102 0.1027 0.0958 0.0893 0.0833 0.0777 0.0724 Columns 89 through 96 0.0675 0.0629 0.0587 0.0547 0.0510 0.0476 0.0443 0.0414 Columns 97 through 100 0.0386 0.0359 0.0335 0.0313 plot(x,y) x=linspace(-5,5,101); y=abs(log(x)); Warning: Log of zero. plot(x,y) x(51)=Nan; ??? Capitalized internal function Nan; Caps Lock may be on. x(51)=NaN; y=abs(log(x)); plot(x,y) x=linspace(-10,10,101); help atan ATAN Inverse tangent. ATAN(X) is the arctangent of the elements of X. See also ATAN2. Overloaded methods help sym/atan.m y=atan(x+1); plot(x,y) grid x=linspace(-(pi)/2,pi/2,101); x(1)=[];x(end)=[]; y=log(abs(cos(x))); plot(x,y) x=linspace(-2*pi,2*pi,101); y=log(abs(cos(x))); plot(x,y) diary off