How might I make my script perform differentiation on a user-defined function? I also want the function and its derivative (in the form of a function) to be applied throughout the script, say in the forms of f and f' respectively, which I believe requires str2func.(adsbygoogle = window.adsbygoogle || []).push({});

Example: The user is prompted for an f(x). He enters x^3. Then both x^3 and 3*x^2 are applied in the place of f and f' throughout the script.

Thanks in advance!

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Differentiation in Script Matlab

Loading...

Similar Threads - Differentiation Script Matlab | Date |
---|---|

Mathematica Rescaling equations in Mathematica | May 5, 2017 |

Matlab Is MATLAB better for numerical simulation | Jan 16, 2017 |

Matlab Numerical Differentiation | Mar 19, 2016 |

Matlab script for central difference | Feb 5, 2015 |

**Physics Forums - The Fusion of Science and Community**