This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Choose Differentiation Function

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

MuPAD® provides two functions for differentiation. The choice of the function depends on which type of object you want to differentiate. To differentiate mathematical expressions, use the diff command. For example:

diff(cos(x), x);
diff(x^3, x)

To differentiate a function or functional expression, use D or its shortcut '. Using this command, you can differentiate any standard mathematical function or your custom created function. For example:

f := x -> x*sin(x):

Was this topic helpful?