How to differentiate an expression in MatLab? - diff -- MatLab

 How to differentiate an expression in MatLab? - diff -- MatLab


How to differentiate an expression in MatLab?
[Ans]
 diff 

[description]
diff(f,x)
differentiation f of x by d x.  i.e. f(x)/dx 

more details on:

code:
clear
clc
syms f(x);
f(x)=3*x^2+5*x;
dfx=diff(f,x)
dfx(5)
result:



dfx(x) =

6*x + 5


ans =

35

Comments

Popular posts from this blog

How to simplify an algebraic formula in MatLab? - simplify -- MatLab

How to find all divisors of a number or expression in MatLab? - divisors -- MatLab