Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: differentiation
Replies: 1   Last Post: Aug 12, 2014 12:24 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Physiker192

Posts: 1
Registered: 8/11/14
differentiation
Posted: Aug 11, 2014 3:10 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.5-cos(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.


Date Subject Author
8/11/14
Read differentiation
Physiker192
8/12/14
Read Re: differentiation
Steven Lord

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.