2018/04/13

Matlab: Differentiation of sine and cosine functions

To calculate the derivates of sin() and cos(), use the syms symbolic variable as below:

>> syms x
>> y = sin(x);
>> y_prime = diff(y)

y_prime =

cos(x)

>> y_prime_prime = diff(y_prime)

y_prime_prime =

-sin(x)

References

Matlab: Basic Differentiation and Integration with the syms symbolic variable
Basic Calculus Terms 基本微基分名詞

沒有留言:

張貼留言