MATLAB: How to get second derivative in symblolic toolbox symbolic my expretion = cos(x*t^2)+x^2+4*t^3); how to get second derivative by t? Best Answer You should determine x and t as syms x t and use diff command diff(cos(x*t^2)+x^2+4*t^3),t,2); t, 2 means second derivative by t. Related SolutionsMATLAB: Second Derivative using diff I wouldn’t use diff to calculate numerical derivatives. It has its uses, but I always use the gradient function for derivative calculations, since gradient produces a result the same size as its argument. MATLAB: Substitute only first derivative in symbolic toolbox I remember doing vibration analysis, used to be pretty tricky: expr2 = subs(expr, diff(x, 2), diff(v)) Related Question
Best Answer