Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



differentiation
Posted:
Aug 11, 2014 3:10 AM


Hello, i am trying to differentiate an equation with respect to multiple variables my code is the following: F=0.5; dif=[0,0]; M=(abs(0.5cos(x(1))+cos(x(2))))^2; dif(1)=diff(M,x(1)); dif(2)=diff(M,x(2));
then i am trying to solve the system formed by the two equations using fsolve and what i an getting is this error
??? Error using ==> diff Difference order N must be a positive integer scalar.
can anyone help me reformulating my code? thanks in advance.



