> Unfortunately when doing it your way I get an error: > > ??? Error using ==> sym.sym>notimplemented at 2653 > Function 'lt' is not implemented for MuPAD symbolic objects.
That was new in 2012a, I believe. You should be able to use ?if double(focValue) < 0.5? in earlier versions.
> Additionally when I try to display the value of dydx_val I get: > > dydx_val = > > -(289129866313728*D(ceil)(965535013052404736/3125))/125
I assume one of your input parameters (za, zb, zc, zd) contains a symbolic ?ceil? expression then. That is not differentiable in the function sense. You may be able to get further by adding
after defining dydx. Just double-check that the result in the end looks reasonable. For the value you showed, that would result in zero ? if that is not a good result, go back to your problem and clearly state what the derivative of the ceiling function is supposed to be in this situation.