问题 I have the following function (Viviani's curve): Phi = @(t)[ cos(t)^2, cos(t)*sin(t), sin(t) ] Just a check that it's valid: s = linspace(0,T,1000); plot3(cos(s).^2, cos(s).*sin(s), sin(s)); How to derivate the function Phi (maybe multiple times), which represents Viviani's curve in a point t where t goes from 0 to 2*pi ? Did I defined Phi suitable for such a derivative? I've tried diff , but it did not keep the Phi as I would need it. If the second derivative would be Phi_d2 , I need to get