본문 바로가기
삽질기초/ETC

MATLAB 미적.

by @가을바람 2009. 9. 15.
미분
    Examples:
       h = .001; x = 0:h:pi;
       diff(sin(x.^2))/h is an approximation to 2*cos(x.^2).*x
       diff((1:10).^2) is 3:2:19
 
       If X = [3 7 5
               0 9 2]
       then diff(X,1,1) is [-3 2 -3], diff(X,1,2) is [4 -2
                                                      9 -7],
       diff(X,2,2) is the 2nd order difference along the dimension 2, and
       diff(X,3,2) is the empty matrix.


>> syms x
>> diff(sin(x), x)
 
ans =
 
cos(x)





적분

int (S, v, a, b)

 

S : 수식, v : 인자, a : 시작값, b : 끝값

    Examples:

      syms x x1 alpha u t;

      A = [cos(x*t),sin(x*t);-sin(x*t),cos(x*t)];

      int(1/(1+x^2))           returns     atan(x)

      int(sin(alpha*u),alpha)  returns     -cos(alpha*u)/u

      int(besselj(1,x),x)      returns     -besselj(0,x)

      int(x1*log(1+x1),0,1)    returns     1/4

      int(4*x*t,x,2,sin(t))    returns     -2*t*cos(t)^2 - 6*t

      int([exp(t),exp(alpha*t)])  returns  [ exp(t), exp(alpha*t)/alpha]

      int(A,t)                 returns      [sin(t*x)/x, -cos(t*x)/x]

                                            [cos(t*x)/x,  sin(t*x)/x]


>>syms x

>>int(sin(x),x)

 

ans =

 

-cos(x)


'삽질기초 > ETC' 카테고리의 다른 글

MATLAB BODE PLOT.  (0) 2009.09.16
삼각함수 공식.  (0) 2009.09.15
MATLAB 이것저것..  (0) 2009.09.15
통신사별 DNS주소  (0) 2009.09.09
Gradient, Divergence, Curl ...  (0) 2009.06.05