The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Calculating 1st derivative with a parameter
Replies: 4   Last Post: Jun 14, 2012 10:34 AM

Advanced Search

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

Posts: 8
Registered: 5/7/12
Calculating 1st derivative with a parameter
Posted: May 6, 2012 10:21 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

in my program I want to calculate the 1st derivative of a function y (it's a function of 'x1'). Let's say I want to check if the 1st derivative of this function in some specific point is smaller then 0.05. I have:

syms x1;
y = ( x1 - za )*( x1 - zb )*( x1 - zc )*( x1 - zd ); %my function, all the parameters like 'za' were previously declared


k2 = solve(dydx_val);
dydx_val =double(k2);

if (dydx_val<0.05)

unfortunately the derivative is not calculated. I get information:
Warning: 1 equations in 0 variables.
Warning: Explicit solution could not be found.
and when I try to display dydx_val i get:

dydx_val =


I tried different methods, none of them was good (although I could do something wrong). I will be grateful for suggestions how can I calculate 1st derivative in a specific point and have the value of this derivative in double.

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.